ethyca-fides 2.58.2b5__py2.py3-none-any.whl → 2.58.2rc0__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.
Files changed (213) hide show
  1. {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/METADATA +11 -20
  2. {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/RECORD +178 -188
  3. {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/WHEEL +1 -1
  4. {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/entry_points.txt +1 -0
  5. fides/_version.py +3 -3
  6. fides/api/api/deps.py +2 -8
  7. fides/api/api/v1/endpoints/user_endpoints.py +12 -8
  8. fides/api/cryptography/identity_salt.py +13 -12
  9. fides/api/custom_types.py +1 -6
  10. fides/api/db/base.py +0 -5
  11. fides/api/db/system.py +3 -1
  12. fides/api/migrations/hash_migration_job.py +2 -2
  13. fides/api/models/attachment.py +11 -80
  14. fides/api/models/comment.py +15 -45
  15. fides/api/models/detection_discovery.py +0 -31
  16. fides/api/models/fides_user.py +9 -26
  17. fides/api/models/fides_user_invite.py +0 -2
  18. fides/api/models/privacy_experience.py +0 -68
  19. fides/api/models/privacy_request/privacy_request.py +6 -23
  20. fides/api/schemas/connection_configuration/connection_config.py +16 -30
  21. fides/api/schemas/user.py +1 -5
  22. fides/api/service/deps.py +0 -9
  23. fides/api/service/storage/s3.py +1 -14
  24. fides/api/service/user/fides_user_service.py +128 -0
  25. fides/api/task/graph_task.py +1 -1
  26. fides/api/util/collection_util.py +9 -48
  27. fides/cli/commands/pull.py +13 -77
  28. fides/core/api.py +1 -2
  29. fides/core/pull.py +7 -38
  30. fides/ui-build/static/admin/404.html +1 -1
  31. fides/ui-build/static/admin/_next/static/chunks/1150-035a721a04f4451e.js +1 -0
  32. fides/ui-build/static/admin/_next/static/chunks/1376-5cea5ef9362215e8.js +1 -0
  33. fides/ui-build/static/admin/_next/static/chunks/{2397-0d1c289b788fcc11.js → 2397-ee53235fb21b5e97.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/3412-7ec8751b8182e1bf.js +1 -0
  35. fides/ui-build/static/admin/_next/static/chunks/{3855-63495367531cb776.js → 3855-b6b7865dedd7bc2a.js} +1 -1
  36. fides/ui-build/static/admin/_next/static/chunks/{3872-472bb47eb34d8fdb.js → 3872-4e053c20d546f027.js} +1 -1
  37. fides/ui-build/static/admin/_next/static/chunks/{4060-53a5c6347690a8fa.js → 4060-8d165e1236ea521a.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/4450-36234280bee624ff.js +1 -0
  39. fides/ui-build/static/admin/_next/static/chunks/4481-aab99ff80f707473.js +1 -0
  40. fides/ui-build/static/admin/_next/static/chunks/{5258-cf7b27ef51f38392.js → 5258-0658dc2274df6832.js} +1 -1
  41. fides/ui-build/static/admin/_next/static/chunks/{5480-52dc446be40725f5.js → 5480-f49696df5e8ae500.js} +1 -1
  42. fides/ui-build/static/admin/_next/static/chunks/{5487-8678d75ee1d1ef09.js → 5487-3ad50d21cdbc9209.js} +1 -1
  43. fides/ui-build/static/admin/_next/static/chunks/5973-52aee296edc44f7e.js +1 -0
  44. fides/ui-build/static/admin/_next/static/chunks/6315-fa1519cdf080f42d.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/{6372-e0bb9f8d07cc3b04.js → 6372-ca9c12ac8902365b.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/{6853-09e831e9dff7fd3b.js → 6853-8941824350c3c1a8.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/{6954-ec5276bb464d42b2.js → 6954-3b887fb444f9228c.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/7453-39761c38da31257e.js +1 -0
  49. fides/ui-build/static/admin/_next/static/chunks/{7751-a70fe0e5f67f5538.js → 7751-a8f31c062d4cb09d.js} +1 -1
  50. fides/ui-build/static/admin/_next/static/chunks/{79-8e060d36d36c752c.js → 79-f9b948ebb186900f.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/{7980-72f745bff9fabcc9.js → 7980-4bd08957448dea32.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/{9046-a69fa8f99c414570.js → 9046-04bd7becea207cb1.js} +1 -1
  53. fides/ui-build/static/admin/_next/static/chunks/9767-1a23925d2cb27b51.js +1 -0
  54. fides/ui-build/static/admin/_next/static/chunks/{main-090643377c8254e6.js → main-24f422f93845a596.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/{main-app-59156a9331ac7bce.js → main-app-94a0711202e08b15.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-0c1548ca3b158123.js → _app-fc89ce7bed454c84.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-9f9500c639362aa6.js → manual-9acaab973dfe86e2.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-fac606150b65d494.js → add-systems-d258f0c25fa020bf.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-fb75fa0aea77678d.js +1 -0
  60. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-c02b14c50b19bd91.js → new-a9d9402c219d13e5.js} +1 -1
  61. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-c946b33b0322b8ad.js +1 -0
  62. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-ea57f9d6ad17e957.js +1 -0
  63. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-100234c23a85d235.js → reporting-788cf0e34829af46.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-49bffaf07973fead.js → data-catalog-900004e402c31797.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-727f1f5d06be674b.js → [systemId]-b66831fdafcdf67c.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-5f9ef1f99818117c.js +1 -0
  67. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-d001337d1bb73bd1.js +1 -0
  68. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-11b3ce9f61d9bfe9.js +1 -0
  69. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-4d4a31d0186a4a5b.js → new-803c1b577ab17ae3.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-29317d18ce34adfe.js → dataset-fa743ddc7f89d76b.js} +1 -1
  71. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-14c57e5069e9cccd.js → [id]-bbe1ca2793798e6b.js} +1 -1
  72. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-f0a4e385c1ad8fee.js → new-abc17fef69cd951b.js} +1 -1
  73. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-a78a73b65929853a.js +1 -0
  74. fides/ui-build/static/admin/_next/static/chunks/pages/{index-b70def65e264270e.js → index-bfaacdb55a5a6c9f.js} +1 -1
  75. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-d4329043219fed9b.js +1 -0
  76. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-1e60754abec1ee6b.js +1 -0
  77. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-72d64a02b7ef175e.js → [id]-fe765154315782cf.js} +1 -1
  78. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-f5f7a8069909ef24.js +1 -0
  79. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-9f7eaad05e5b9292.js +1 -0
  80. fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-fd81714d811db7b3.js → privacy-requests-d85c0d16ba09ba35.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-f035cddf17f4d898.js → datamap-afedc48ef4e7f858.js} +1 -1
  82. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-89524101b7279f6e.js +1 -0
  83. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-dfcd7a4b6aa773bd.js → custom-fields-52d030b1db2ca1b9.js} +1 -1
  84. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-24cba38685dc872c.js +1 -0
  85. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-0e0aa552f520f913.js → organization-a08693d0d1e10bc8.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-1d83d5178b3eb216.js → test-datasets-151571cff4e85894.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-a158fa77df288523.js → [id]-4f5a28226575c976.js} +1 -1
  88. fides/ui-build/static/admin/_next/static/chunks/pages/{systems-8490aaaee9d76a4a.js → systems-abd68fc5ddde5482.js} +1 -1
  89. fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-be1ffe267b1602e1.js → taxonomy-16b4d75c49276add.js} +1 -1
  90. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-082c3156175f9267.js → new-be690621a944bfe2.js} +1 -1
  91. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-78eaf933f755bfe8.js +1 -0
  92. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-a1db56f1cbfba373.js → user-management-6c9ad62479a7d03e.js} +1 -1
  93. fides/ui-build/static/admin/_next/static/css/{cf2744a40308fc4a.css → 113d823fe71f6af0.css} +1 -1
  94. fides/ui-build/static/admin/_next/static/o0mKeH0cB6eAYV6qOlVD0/_buildManifest.js +1 -0
  95. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  96. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  97. fides/ui-build/static/admin/add-systems.html +1 -1
  98. fides/ui-build/static/admin/ant-poc.html +1 -1
  99. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  100. fides/ui-build/static/admin/consent/configure.html +1 -1
  101. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  102. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  103. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  104. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  105. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  106. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  107. fides/ui-build/static/admin/consent/properties.html +1 -1
  108. fides/ui-build/static/admin/consent/reporting.html +1 -1
  109. fides/ui-build/static/admin/consent.html +1 -1
  110. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  111. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  112. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  113. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  114. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  115. fides/ui-build/static/admin/data-catalog.html +1 -1
  116. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  117. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  118. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  119. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  120. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  121. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  122. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  123. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  124. fides/ui-build/static/admin/datamap.html +1 -1
  125. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  126. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  127. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  128. fides/ui-build/static/admin/dataset/new.html +1 -1
  129. fides/ui-build/static/admin/dataset.html +1 -1
  130. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  131. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  132. fides/ui-build/static/admin/datastore-connection.html +1 -1
  133. fides/ui-build/static/admin/index.html +1 -1
  134. fides/ui-build/static/admin/integrations/[id].html +1 -1
  135. fides/ui-build/static/admin/integrations.html +1 -1
  136. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  137. fides/ui-build/static/admin/lib/fides-headless.js +1 -1
  138. fides/ui-build/static/admin/lib/fides-tcf.js +4 -4
  139. fides/ui-build/static/admin/lib/fides.js +3 -3
  140. fides/ui-build/static/admin/login/[provider].html +1 -1
  141. fides/ui-build/static/admin/login.html +1 -1
  142. fides/ui-build/static/admin/messaging/[id].html +1 -1
  143. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  144. fides/ui-build/static/admin/messaging.html +1 -1
  145. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  146. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  147. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  148. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  149. fides/ui-build/static/admin/privacy-requests.html +1 -1
  150. fides/ui-build/static/admin/properties/[id].html +1 -1
  151. fides/ui-build/static/admin/properties/add-property.html +1 -1
  152. fides/ui-build/static/admin/properties.html +1 -1
  153. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  154. fides/ui-build/static/admin/settings/about.html +1 -1
  155. fides/ui-build/static/admin/settings/consent.html +1 -1
  156. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  157. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  158. fides/ui-build/static/admin/settings/domains.html +1 -1
  159. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  160. fides/ui-build/static/admin/settings/locations.html +1 -1
  161. fides/ui-build/static/admin/settings/organization.html +1 -1
  162. fides/ui-build/static/admin/settings/regulations.html +1 -1
  163. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  164. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  165. fides/ui-build/static/admin/systems.html +1 -1
  166. fides/ui-build/static/admin/taxonomy.html +1 -1
  167. fides/ui-build/static/admin/user-management/new.html +1 -1
  168. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  169. fides/ui-build/static/admin/user-management.html +1 -1
  170. fides/api/alembic/migrations/versions/67d01c4e124e_add_reject_all_mechanism_to_privacy_.py +0 -56
  171. fides/api/alembic/migrations/versions/6e565c16dae1_add_tcf_publisher_restrictions.py +0 -107
  172. fides/api/alembic/migrations/versions/9288f729cac4_add_tcf_configuration_fk_to_experience_.py +0 -62
  173. fides/api/alembic/migrations/versions/99c603c1b8f9_add_password_login_enabled_and_totp_secret_to_fidesuser.py +0 -45
  174. fides/api/models/tcf_publisher_restrictions.py +0 -465
  175. fides/service/error_handling/__init__.py +0 -0
  176. fides/service/error_handling/error_handler.py +0 -202
  177. fides/service/user/__init__.py +0 -0
  178. fides/service/user/user_service.py +0 -140
  179. fides/ui-build/static/admin/_next/static/_o6WH0hDzNEhnUJyvLex7/_buildManifest.js +0 -1
  180. fides/ui-build/static/admin/_next/static/chunks/1376-87058e04584cff20.js +0 -1
  181. fides/ui-build/static/admin/_next/static/chunks/146-0ae2d30ec71fce09.js +0 -1
  182. fides/ui-build/static/admin/_next/static/chunks/1817-48e1c9d3504e18f0.js +0 -1
  183. fides/ui-build/static/admin/_next/static/chunks/3938-6a1c07d06a80cf4c.js +0 -1
  184. fides/ui-build/static/admin/_next/static/chunks/4121-4d5273d7a354994d.js +0 -1
  185. fides/ui-build/static/admin/_next/static/chunks/4450-9c3086ccb55c66aa.js +0 -1
  186. fides/ui-build/static/admin/_next/static/chunks/4481-275aa9f4c10bce53.js +0 -1
  187. fides/ui-build/static/admin/_next/static/chunks/5973-d3d3872692c1d0fa.js +0 -1
  188. fides/ui-build/static/admin/_next/static/chunks/6315-24a0483ee1cab6cc.js +0 -1
  189. fides/ui-build/static/admin/_next/static/chunks/9767-8179ce7336727141.js +0 -1
  190. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-ab3ef485f6101697.js +0 -1
  191. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-ba5325035c71a97e.js +0 -1
  192. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-ef31c181cac86c64.js +0 -1
  193. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-53efbed54d230f07.js +0 -1
  194. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-17d1525551d8904f.js +0 -1
  195. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-7d2cb947eee11262.js +0 -1
  196. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-d2f88a8fc68944db.js +0 -1
  197. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-b75ab4ee677f118d.js +0 -1
  198. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-26407674949bcbc4.js +0 -1
  199. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-28d4bdf060ec8cb2.js +0 -1
  200. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-208e49ef43361d6f.js +0 -1
  201. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-ff1985f72d50ef47.js +0 -1
  202. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-5a0b10ec955097d4.js +0 -1
  203. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-af83245e9373a064.js +0 -1
  204. fides/ui-build/static/admin/images/connector-logos/website.svg +0 -10
  205. {ethyca_fides-2.58.2b5.dist-info/licenses → ethyca_fides-2.58.2rc0.dist-info}/LICENSE +0 -0
  206. {ethyca_fides-2.58.2b5.dist-info → ethyca_fides-2.58.2rc0.dist-info}/top_level.txt +0 -0
  207. /fides/ui-build/static/admin/_next/static/chunks/{4723-1dd1d16f404d56a2.js → 4723-0a3c5e2ce143a7d0.js} +0 -0
  208. /fides/ui-build/static/admin/_next/static/chunks/{5826-ef0aa43ffad83acc.js → 5826-e5dcb4e68cfe6289.js} +0 -0
  209. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-a4e636eecaba5324.js → configure-723cc3d4f5740ea6.js} +0 -0
  210. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-606457ef5bd1eb04.js → [id]-72251b48e2e03a1e.js} +0 -0
  211. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-2ae030f3a28f057a.js → about-a49d0f84cf0cf05e.js} +0 -0
  212. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-72ec54ee8755a503.js → domain-records-fa42d8f18df44927.js} +0 -0
  213. /fides/ui-build/static/admin/_next/static/{_o6WH0hDzNEhnUJyvLex7 → o0mKeH0cB6eAYV6qOlVD0}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{49536:function(e,r,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(39461)}])},69e3:function(e,r,s){"use strict";var n=s(24246),t=s(77181),i=s(91507),o=s.n(i);r.Z=e=>{let{color:r,description:s,title:i,icon:a}=e;return(0,n.jsx)(t.xuv,{borderLeft:"9px solid ".concat(r),borderRadius:"6px",className:o().container,children:(0,n.jsxs)(t.V4A,{className:o().card,"data-testid":"tile-".concat(i),children:[(0,n.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[a,(0,n.jsx)(t.AntTypography.Title,{level:5,style:{marginBottom:1,textAlign:"left"},children:i})]}),(0,n.jsx)(t.AntTypography.Text,{style:{textAlign:"left"},children:s})]})})}},77213:function(e,r,s){"use strict";s.d(r,{Z:function(){return p}});var n=s(24246),t=s(77181),i=s(88038),o=s.n(i),a=s(86677);s(27378);var c=s(25980),l=s(90867),d=s(77830),u=()=>{let e=(0,a.useRouter)();return(0,n.jsx)(t.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)(t.xuv,{children:[(0,n.jsxs)(t.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(t.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(t.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,n.jsxs)(t.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:r,title:s,padded:i=!0,mainProps:d}=e,p=(0,c.hz)(),m=(0,a.useRouter)(),h="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,f=!(p.flags.privacyRequestsConfiguration&&h),{data:x}=(0,l.JE)(void 0,{skip:f}),{data:g}=(0,l.PW)(void 0,{skip:f}),y=p.flags.privacyRequestsConfiguration&&(!x||!g)&&h;return(0,n.jsxs)(t.kCb,{"data-testid":s,direction:"column",h:"100vh",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(t.kCb,{as:"main",direction:"column",py:i?6:0,px:i?10:0,h:i?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[y?(0,n.jsx)(u,{}):null,r]})]})}},39461:function(e,r,s){"use strict";s.r(r),s.d(r,{default:function(){return T}});var n,t,i=s(24246),o=s(77181),a=s(27378),c=s(77213),l=s(3124),d=s.n(l),u=s(25980),p=()=>{let{systemsCount:e}=(0,u.hz)(),r=e>0;return(0,i.jsx)(o.kCb,{background:d().FIDESUI_CORINTH,children:(0,i.jsxs)(o.kCb,{flexDir:"column",maxWidth:"600px",padding:"10",paddingBottom:"16",children:[r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.xvT,{fontSize:"3xl",fontWeight:"semibold",children:"Welcome back!"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"lg",fontWeight:"semibold",children:"".concat(e," system").concat(e>1?"s":""," currently under management")}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"sm",children:"Fides is currently managing privacy for ".concat(e," system").concat(e>1?"s":"",". From here you can continue adding and managing systems, process privacy requests or generate reports for your privacy compliance requirements.")})]}),!r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.xvT,{fontSize:"3xl",fontWeight:"semibold",children:"Welcome to Fides!"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"lg",fontWeight:"semibold",children:"Start your privacy engineering journey today"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"sm",children:"Step one in setting up your privacy engineering platform is adding the systems you need to manage. Use the links below to add and configure systems within Fides for data mapping and privacy request automation."})]})]})})},m=s(79894),h=s.n(m),f=s(16134),x=s(69e3),g=s(31793),y=s(77830),E=s(28120);(n=t||(t={}))[n.ADD_SYSTEMS=1]="ADD_SYSTEMS",n[n.VIEW_SYSTEMS=2]="VIEW_SYSTEMS",n[n.REVIEW_PRIVACY_REQUESTS=3]="REVIEW_PRIVACY_REQUESTS",n[n.VIEW_MAP=4]="VIEW_MAP",n[n.CONFIGURE_CONSENT=5]="CONFIGURE_CONSENT";let S=[{color:d().FIDESUI_SANDSTONE,description:"Explore the systems and data flow across your organization and create custom reports.",href:"".concat(y.oG),key:4,name:"View data map",sortOrder:0,title:"VM",requiresPlus:!0,requiresSystems:!0,scopes:[E.Sh.DATAMAP_READ]},{color:d().FIDESUI_OLIVE,description:"Add third party applications and databases to your data map.",href:"".concat(y.xo),key:1,name:"Add systems",sortOrder:1,title:"AS",scopes:[E.Sh.SYSTEM_CREATE]},{color:d().FIDESUI_TERRACOTTA,description:"Review system information for all systems in your organization.",href:"".concat(y.So),key:2,name:"View systems",sortOrder:2,title:"VS",scopes:[E.Sh.SYSTEM_READ],requiresSystems:!0},{color:d().FIDESUI_MINOS,description:"Review, approve and process privacy requests across your systems on behalf of your users.",href:"".concat(y.Jw),key:3,name:"Review privacy requests",sortOrder:4,title:"RP",scopes:[E.Sh.PRIVACY_REQUEST_REVIEW],requiresConnections:!0},{color:d().FIDESUI_NECTAR,description:"Manage privacy notices and experiences for all domains in your organization.",href:"".concat(y.zo),key:5,name:"Manage consent",sortOrder:5,title:"MC",scopes:[E.Sh.PRIVACY_NOTICE_READ],requiresPlus:!0}],v=e=>{let{config:r,userScopes:s,hasPlus:n=!1,flags:t}=e,i=r;i=n?i.filter(e=>!e.requiresOss):i.filter(e=>!e.requiresPlus);let o=[];i.forEach(e=>{0===e.scopes.length?o.push(e):e.scopes.filter(e=>s.includes(e)).length>0&&o.push(e)});let a=[];return o.forEach(e=>{e.requiresFlag?t[e.requiresFlag]&&a.push(e):a.push(e)}),a};var _=()=>{let{plus:e,flags:r}=(0,u.hz)(),s=(0,f.C)(g.uu),n=(0,a.useMemo)(()=>v({config:S,hasPlus:e,userScopes:s,flags:r}),[e,s,r]);return(0,i.jsx)(o.kCb,{paddingX:10,"data-testid":"home-content",children:(0,i.jsx)(o.MIq,{columns:{md:2,xl:3},spacing:"24px",children:n.sort((e,r)=>e.sortOrder>r.sortOrder?1:-1).map(e=>(0,i.jsx)(h(),{href:e.href,className:"flex",children:(0,i.jsx)(x.Z,{title:e.name,description:e.description,color:e.color})},e.key))})})},j=()=>(0,i.jsx)(c.Z,{title:"Home",padded:!1,children:(0,i.jsxs)(o.kCb,{direction:"column",gap:10,pb:6,children:[(0,i.jsx)(p,{}),(0,i.jsx)(_,{})]})}),T=()=>(0,i.jsx)(j,{})},91507:function(e){e.exports={container:"CalloutNavCard_container__DXPJb",card:"CalloutNavCard_card__q_XX6"}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=49536)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{49536:function(e,r,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(39461)}])},69e3:function(e,r,s){"use strict";var n=s(24246),t=s(77181),i=s(91507),o=s.n(i);r.Z=e=>{let{color:r,description:s,title:i,icon:a}=e;return(0,n.jsx)(t.xuv,{borderLeft:"9px solid ".concat(r),borderRadius:"6px",className:o().container,children:(0,n.jsxs)(t.V4A,{className:o().card,"data-testid":"tile-".concat(i),children:[(0,n.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[a,(0,n.jsx)(t.AntTypography.Title,{level:5,style:{marginBottom:1,textAlign:"left"},children:i})]}),(0,n.jsx)(t.AntTypography.Text,{style:{textAlign:"left"},children:s})]})})}},77213:function(e,r,s){"use strict";s.d(r,{Z:function(){return p}});var n=s(24246),t=s(77181),i=s(88038),o=s.n(i),a=s(86677);s(27378);var c=s(25980),l=s(90867),d=s(77830),u=()=>{let e=(0,a.useRouter)();return(0,n.jsx)(t.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)(t.xuv,{children:[(0,n.jsxs)(t.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(t.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(t.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,n.jsxs)(t.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:r,title:s,padded:i=!0,mainProps:d}=e,p=(0,c.hz)(),m=(0,a.useRouter)(),h="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,f=!(p.flags.privacyRequestsConfiguration&&h),{data:x}=(0,l.JE)(void 0,{skip:f}),{data:g}=(0,l.PW)(void 0,{skip:f}),y=p.flags.privacyRequestsConfiguration&&(!x||!g)&&h;return(0,n.jsxs)(t.kCb,{"data-testid":s,direction:"column",h:"100vh",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(t.kCb,{as:"main",direction:"column",py:i?6:0,px:i?10:0,h:i?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[y?(0,n.jsx)(u,{}):null,r]})]})}},39461:function(e,r,s){"use strict";s.r(r),s.d(r,{default:function(){return T}});var n,t,i=s(24246),o=s(77181),a=s(27378),c=s(77213),l=s(3124),d=s.n(l),u=s(25980),p=()=>{let{systemsCount:e}=(0,u.hz)(),r=e>0;return(0,i.jsx)(o.kCb,{background:d().FIDESUI_CORINTH,children:(0,i.jsxs)(o.kCb,{flexDir:"column",maxWidth:"600px",padding:"10",paddingBottom:"16",children:[r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.xvT,{fontSize:"3xl",fontWeight:"semibold",children:"Welcome back!"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"lg",fontWeight:"semibold",children:"".concat(e," system").concat(e>1?"s":""," currently under management")}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"sm",children:"Fides is currently managing privacy for ".concat(e," system").concat(e>1?"s":"",". From here you can continue adding and managing systems, process privacy requests or generate reports for your privacy compliance requirements.")})]}),!r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.xvT,{fontSize:"3xl",fontWeight:"semibold",children:"Welcome to Fides!"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"lg",fontWeight:"semibold",children:"Start your privacy engineering journey today"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"sm",children:"Step one in setting up your privacy engineering platform is adding the systems you need to manage. Use the links below to add and configure systems within Fides for data mapping and privacy request automation."})]})]})})},m=s(79894),h=s.n(m),f=s(16134),x=s(69e3),g=s(31793),y=s(77830),E=s(21702);(n=t||(t={}))[n.ADD_SYSTEMS=1]="ADD_SYSTEMS",n[n.VIEW_SYSTEMS=2]="VIEW_SYSTEMS",n[n.REVIEW_PRIVACY_REQUESTS=3]="REVIEW_PRIVACY_REQUESTS",n[n.VIEW_MAP=4]="VIEW_MAP",n[n.CONFIGURE_CONSENT=5]="CONFIGURE_CONSENT";let S=[{color:d().FIDESUI_SANDSTONE,description:"Explore the systems and data flow across your organization and create custom reports.",href:"".concat(y.oG),key:4,name:"View data map",sortOrder:0,title:"VM",requiresPlus:!0,requiresSystems:!0,scopes:[E.Sh.DATAMAP_READ]},{color:d().FIDESUI_OLIVE,description:"Add third party applications and databases to your data map.",href:"".concat(y.xo),key:1,name:"Add systems",sortOrder:1,title:"AS",scopes:[E.Sh.SYSTEM_CREATE]},{color:d().FIDESUI_TERRACOTTA,description:"Review system information for all systems in your organization.",href:"".concat(y.So),key:2,name:"View systems",sortOrder:2,title:"VS",scopes:[E.Sh.SYSTEM_READ],requiresSystems:!0},{color:d().FIDESUI_MINOS,description:"Review, approve and process privacy requests across your systems on behalf of your users.",href:"".concat(y.Jw),key:3,name:"Review privacy requests",sortOrder:4,title:"RP",scopes:[E.Sh.PRIVACY_REQUEST_REVIEW],requiresConnections:!0},{color:d().FIDESUI_NECTAR,description:"Manage privacy notices and experiences for all domains in your organization.",href:"".concat(y.zo),key:5,name:"Manage consent",sortOrder:5,title:"MC",scopes:[E.Sh.PRIVACY_NOTICE_READ],requiresPlus:!0}],v=e=>{let{config:r,userScopes:s,hasPlus:n=!1,flags:t}=e,i=r;i=n?i.filter(e=>!e.requiresOss):i.filter(e=>!e.requiresPlus);let o=[];i.forEach(e=>{0===e.scopes.length?o.push(e):e.scopes.filter(e=>s.includes(e)).length>0&&o.push(e)});let a=[];return o.forEach(e=>{e.requiresFlag?t[e.requiresFlag]&&a.push(e):a.push(e)}),a};var _=()=>{let{plus:e,flags:r}=(0,u.hz)(),s=(0,f.C)(g.uu),n=(0,a.useMemo)(()=>v({config:S,hasPlus:e,userScopes:s,flags:r}),[e,s,r]);return(0,i.jsx)(o.kCb,{paddingX:10,"data-testid":"home-content",children:(0,i.jsx)(o.MIq,{columns:{md:2,xl:3},spacing:"24px",children:n.sort((e,r)=>e.sortOrder>r.sortOrder?1:-1).map(e=>(0,i.jsx)(h(),{href:e.href,className:"flex",children:(0,i.jsx)(x.Z,{title:e.name,description:e.description,color:e.color})},e.key))})})},j=()=>(0,i.jsx)(c.Z,{title:"Home",padded:!1,children:(0,i.jsxs)(o.kCb,{direction:"column",gap:10,pb:6,children:[(0,i.jsx)(p,{}),(0,i.jsx)(_,{})]})}),T=()=>(0,i.jsx)(j,{})},91507:function(e){e.exports={container:"CalloutNavCard_container__DXPJb",card:"CalloutNavCard_card__q_XX6"}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=49536)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1500],{50697:function(e,a,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations/[id]",function(){return i(327)}])},67991:function(e,a,i){"use strict";i.d(a,{Od:function(){return l},QZ:function(){return t}});var n=i(27378);let t=e=>{let{items:a,selected:i,onChange:n}=e,t=a.every(e=>i.includes(e.id))&&!!a.length;return{allSelected:t,someSelected:a.some(e=>i.includes(e.id))&&!!a.length,handleToggleAll:()=>{t?n([]):n(a.map(e=>e.id))},handleToggleSelection:e=>{i.includes(e)?n(i.filter(a=>a!==e)):n([...i,e])}}},l=e=>{let{initialSelected:a,initialExcluded:i,initialAllSelected:t,itemCount:l}=e,[o,r]=(0,n.useState)(a),[s,d]=(0,n.useState)(i),[c,u]=(0,n.useState)(t||o.length===l),_=!!o.length||!!s.length;return{selected:o,excluded:s,allSelected:c,someSelected:_,handleToggleAll:()=>{c?(d([]),s.length||u(!1)):(r([]),u(!0))},handleToggleItemSelected:e=>{if(c)d(s.includes(e)?s.filter(a=>a!==e):[...s,e]);else{let a=o.includes(e)?o.filter(a=>a!==e):[...o,e];r(a),a.length===l&&u(!0)}}}}},90111:function(e,a,i){"use strict";var n=i(24246),t=i(77181);a.Z=e=>{let{children:a,...i}=e;return(0,n.jsx)(t.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...i,children:a})}},8411:function(e,a,i){"use strict";i.d(a,{NA:function(){return l},Z8:function(){return t}});var n=i(21702);let t={[n._F.ER]:"Eritrea",[n._F.DJ]:"Djibouti",[n._F.MR]:"Mauritania",[n._F.NA]:"Namibia",[n._F.GH]:"Ghana",[n._F.SS]:"South Sudan",[n._F.SC]:"Seychelles",[n._F.IO]:"British Indian Ocean Territory",[n._F.GQ]:"Equatorial Guinea",[n._F.AO]:"Angola",[n._F.CG]:"Republic of the Congo",[n._F.BW]:"Botswana",[n._F.BI]:"Burundi",[n._F.DZ]:"Algeria",[n._F.TD]:"Chad",[n._F.NG]:"Nigeria",[n._F.TZ]:"Tanzania",[n._F.EH]:"Western Sahara",[n._F.SN]:"Senegal",[n._F.LR]:"Liberia",[n._F.ZA]:"South Africa",[n._F.CV]:"Cape Verde",[n._F.GM]:"Gambia",[n._F.SD]:"Sudan",[n._F.KM]:"Comoros",[n._F.SZ]:"Eswatini",[n._F.UG]:"Uganda",[n._F.MG]:"Madagascar",[n._F.RW]:"Rwanda",[n._F.CD]:"DR Congo",[n._F.CM]:"Cameroon",[n._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[n._F.TG]:"Togo",[n._F.MU]:"Mauritius",[n._F.NE]:"Niger",[n._F.BJ]:"Benin",[n._F.EG]:"Egypt",[n._F.LS]:"Lesotho",[n._F.ET]:"Ethiopia",[n._F.MA]:"Morocco",[n._F.YT]:"Mayotte",[n._F.BF]:"Burkina Faso",[n._F.RE]:"R\xe9union",[n._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[n._F.CF]:"Central African Republic",[n._F.MZ]:"Mozambique",[n._F.MW]:"Malawi",[n._F.ML]:"Mali",[n._F.ZM]:"Zambia",[n._F.LY]:"Libya",[n._F.GW]:"Guinea-Bissau",[n._F.SO]:"Somalia",[n._F.KE]:"Kenya",[n._F.GN]:"Guinea",[n._F.ZW]:"Zimbabwe",[n._F.TN]:"Tunisia",[n._F.SL]:"Sierra Leone",[n._F.GA]:"Gabon",[n._F.CI]:"Ivory Coast",[n._F.JO]:"Jordan",[n._F.PK]:"Pakistan",[n._F.KP]:"North Korea",[n._F.MO]:"Macau",[n._F.AM]:"Armenia",[n._F.SY]:"Syria",[n._F.TJ]:"Tajikistan",[n._F.SA]:"Saudi Arabia",[n._F.KR]:"South Korea",[n._F.NP]:"Nepal",[n._F.PH]:"Philippines",[n._F.IQ]:"Iraq",[n._F.LB]:"Lebanon",[n._F.MN]:"Mongolia",[n._F.PS]:"Palestine",[n._F.YE]:"Yemen",[n._F.JP]:"Japan",[n._F.KZ]:"Kazakhstan",[n._F.LK]:"Sri Lanka",[n._F.MM]:"Myanmar",[n._F.KG]:"Kyrgyzstan",[n._F.CN]:"China",[n._F.AF]:"Afghanistan",[n._F.OM]:"Oman",[n._F.IN]:"India",[n._F.LA]:"Laos",[n._F.UZ]:"Uzbekistan",[n._F.MV]:"Maldives",[n._F.ID]:"Indonesia",[n._F.VN]:"Vietnam",[n._F.MY]:"Malaysia",[n._F.TW]:"Taiwan",[n._F.KH]:"Cambodia",[n._F.AE]:"United Arab Emirates",[n._F.HK]:"Hong Kong",[n._F.GE]:"Georgia",[n._F.BD]:"Bangladesh",[n._F.KW]:"Kuwait",[n._F.TM]:"Turkmenistan",[n._F.QA]:"Qatar",[n._F.BH]:"Bahrain",[n._F.BN]:"Brunei",[n._F.TH]:"Thailand",[n._F.BT]:"Bhutan",[n._F.SG]:"Singapore",[n._F.IL]:"Israel",[n._F.AZ]:"Azerbaijan",[n._F.TL]:"Timor-Leste",[n._F.IR]:"Iran",[n._F.TR]:"Turkey",[n._F.MK]:"North Macedonia",[n._F.IE]:"Ireland",[n._F.DK]:"Denmark",[n._F.SK]:"Slovakia",[n._F.MD]:"Moldova",[n._F.AX]:"\xc5land Islands",[n._F.PL]:"Poland",[n._F.BA]:"Bosnia and Herzegovina",[n._F.SM]:"San Marino",[n._F.CZ]:"Czechia",[n._F.EE]:"Estonia",[n._F.XK]:"Kosovo",[n._F.FO]:"Faroe Islands",[n._F.SJ]:"Svalbard and Jan Mayen",[n._F.GG]:"Guernsey",[n._F.FR]:"France",[n._F.NL]:"Netherlands",[n._F.FI]:"Finland",[n._F.PT]:"Portugal",[n._F.DE]:"Germany",[n._F.MT]:"Malta",[n._F.JE]:"Jersey",[n._F.IS]:"Iceland",[n._F.ES]:"Spain",[n._F.GI]:"Gibraltar",[n._F.NO]:"Norway",[n._F.CY]:"Cyprus",[n._F.RS]:"Serbia",[n._F.LT]:"Lithuania",[n._F.MC]:"Monaco",[n._F.LU]:"Luxembourg",[n._F.UA]:"Ukraine",[n._F.IM]:"Isle of Man",[n._F.RO]:"Romania",[n._F.BE]:"Belgium",[n._F.SE]:"Sweden",[n._F.ME]:"Montenegro",[n._F.LV]:"Latvia",[n._F.VA]:"Vatican City",[n._F.AT]:"Austria",[n._F.AL]:"Albania",[n._F.LI]:"Liechtenstein",[n._F.GR]:"Greece",[n._F.IT]:"Italy",[n._F.AD]:"Andorra",[n._F.GB]:"United Kingdom",[n._F.RU]:"Russia",[n._F.SI]:"Slovenia",[n._F.BY]:"Belarus",[n._F.CH]:"Switzerland",[n._F.HU]:"Hungary",[n._F.BG]:"Bulgaria",[n._F.HR]:"Croatia",[n._F.TC]:"Turks and Caicos Islands",[n._F.CW]:"Cura\xe7ao",[n._F.GP]:"Guadeloupe",[n._F.UM]:"United States Minor Outlying Islands",[n._F.GT]:"Guatemala",[n._F.PM]:"Saint Pierre and Miquelon",[n._F.BQ]:"Caribbean Netherlands",[n._F.GL]:"Greenland",[n._F.SX]:"Sint Maarten",[n._F.PA]:"Panama",[n._F.AW]:"Aruba",[n._F.MQ]:"Martinique",[n._F.AG]:"Antigua and Barbuda",[n._F.BM]:"Bermuda",[n._F.CU]:"Cuba",[n._F.GD]:"Grenada",[n._F.NI]:"Nicaragua",[n._F.LC]:"Saint Lucia",[n._F.KN]:"Saint Kitts and Nevis",[n._F.DO]:"Dominican Republic",[n._F.VC]:"Saint Vincent and the Grenadines",[n._F.BZ]:"Belize",[n._F.HT]:"Haiti",[n._F.JM]:"Jamaica",[n._F.BS]:"Bahamas",[n._F.MX]:"Mexico",[n._F.MF]:"Saint Martin",[n._F.SV]:"El Salvador",[n._F.BL]:"Saint Barth\xe9lemy",[n._F.AI]:"Anguilla",[n._F.MS]:"Montserrat",[n._F.VG]:"British Virgin Islands",[n._F.BB]:"Barbados",[n._F.HN]:"Honduras",[n._F.KY]:"Cayman Islands",[n._F.DM]:"Dominica",[n._F.TT]:"Trinidad and Tobago",[n._F.CR]:"Costa Rica",[n._F.SR]:"Suriname",[n._F.CX]:"Christmas Island",[n._F.WS]:"Samoa",[n._F.PF]:"French Polynesia",[n._F.AS]:"American Samoa",[n._F.NC]:"New Caledonia",[n._F.TK]:"Tokelau",[n._F.PW]:"Palau",[n._F.KI]:"Kiribati",[n._F.VU]:"Vanuatu",[n._F.PN]:"Pitcairn Islands",[n._F.CK]:"Cook Islands",[n._F.FJ]:"Fiji",[n._F.PG]:"Papua New Guinea",[n._F.MP]:"Northern Mariana Islands",[n._F.NU]:"Niue",[n._F.TV]:"Tuvalu",[n._F.NF]:"Norfolk Island",[n._F.TO]:"Tonga",[n._F.FM]:"Micronesia",[n._F.SB]:"Solomon Islands",[n._F.NR]:"Nauru",[n._F.WF]:"Wallis and Futuna",[n._F.GU]:"Guam",[n._F.AU]:"Australia",[n._F.NZ]:"New Zealand",[n._F.MH]:"Marshall Islands",[n._F.CC]:"Cocos (Keeling) Islands",[n._F.VE]:"Venezuela",[n._F.PY]:"Paraguay",[n._F.BR]:"Brazil",[n._F.CO]:"Colombia",[n._F.PE]:"Peru",[n._F.CL]:"Chile",[n._F.UY]:"Uruguay",[n._F.AR]:"Argentina",[n._F.GY]:"Guyana",[n._F.BO]:"Bolivia",[n._F.GF]:"French Guiana",[n._F.EC]:"Ecuador",[n._F.FK]:"Falkland Islands",[n._F.US_AL]:"Alabama",[n._F.US_AK]:"Alaska",[n._F.US_AZ]:"Arizona",[n._F.US_AR]:"Arkansas",[n._F.US_CA]:"California",[n._F.US_CO]:"Colorado",[n._F.US_CT]:"Connecticut",[n._F.US_DE]:"Delaware",[n._F.US_DC]:"District of Columbia (DC)",[n._F.US_FL]:"Florida",[n._F.US_GA]:"Georgia",[n._F.US_HI]:"Hawaii",[n._F.US_ID]:"Idaho",[n._F.US_IL]:"Illinois",[n._F.US_IN]:"Indiana",[n._F.US_IA]:"Iowa",[n._F.US_KS]:"Kansas",[n._F.US_KY]:"Kentucky",[n._F.US_LA]:"Louisiana",[n._F.US_ME]:"Maine",[n._F.US_MD]:"Maryland",[n._F.US_MA]:"Massachusetts",[n._F.US_MI]:"Michigan",[n._F.US_MN]:"Minnesota",[n._F.US_MS]:"Mississippi",[n._F.US_MO]:"Missouri",[n._F.US_MT]:"Montana",[n._F.US_NE]:"Nebraska",[n._F.US_NV]:"Nevada",[n._F.US_NH]:"New Hampshire",[n._F.US_NJ]:"New Jersey",[n._F.US_NM]:"New Mexico",[n._F.US_NY]:"New York",[n._F.US_NC]:"North Carolina",[n._F.US_ND]:"North Dakota",[n._F.US_OH]:"Ohio",[n._F.US_OK]:"Oklahoma",[n._F.US_OR]:"Oregon",[n._F.US_PA]:"Pennsylvania",[n._F.US_PR]:"Puerto Rico",[n._F.US_RI]:"Rhode Island",[n._F.US_SC]:"South Carolina",[n._F.US_SD]:"San Diego",[n._F.US_TN]:"Tennessee",[n._F.US_TX]:"Texas",[n._F.US_UT]:"Utah",[n._F.US_VA]:"Virginia",[n._F.US_VI]:"United States Virgin Islands",[n._F.US_VT]:"Vermon",[n._F.US_WA]:"Washington",[n._F.US_WV]:"West Virginia",[n._F.US_WI]:"Wisconsin",[n._F.US_WY]:"Wyoming",[n._F.CA_AB]:"Alberta",[n._F.CA_BC]:"British Columbia",[n._F.CA_MB]:"Manitoba",[n._F.CA_NB]:"New Brunswick",[n._F.CA_NL]:"Newfoundland and Labrador",[n._F.CA_NS]:"Nova Scotia",[n._F.CA_ON]:"Ontario",[n._F.CA_PE]:"Prince Edward Island",[n._F.CA_QC]:"Quebec",[n._F.CA_SK]:"Saskatchewan",[n._F.CA_NT]:"Northwest Territories",[n._F.CA_NU]:"Nunavut",[n._F.CA_YT]:"Yukon",[n._F.CA]:"Canada",[n._F.US]:"United States",[n._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[n._F.CARIBBEAN]:"Caribbean",[n._F.EEA]:"European Economic Area (EEA)",[n._F.NON_EEA]:"Non European Economic Area"},l=new Map(Object.entries(t));Object.entries(t).map(e=>({value:e[0],label:e[1]}))},79494:function(e,a,i){"use strict";var n=i(24246),t=i(77181);a.Z=e=>{let{title:a,icon:i,type:l,...o}=e;return(0,n.jsx)(t.wpx,{size:"small",type:l,"data-testid":"action-".concat(a),icon:i,iconPosition:"start",...o,children:a})}},48515:function(e,a,i){"use strict";var n,t;i.d(a,{O:function(){return n}}),(t=n||(n={})).ACKNOWLEDGE="acknowledge",t.OPT_IN_OPT_OUT="opt_in_opt_out"},60325:function(e,a,i){"use strict";i.d(a,{DD:function(){return s},Go:function(){return d},TK:function(){return l},Uv:function(){return u},k1:function(){return o},y3:function(){return _}});var n=i(21702),t=i(48515);let l=e=>{var a;return null!==(a=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==a?a:[]},o=e=>{var a;return null!==(a=null==e?void 0:e.filter(e=>e.selected))&&void 0!==a?a:[]},r=[{language:n.eU.EN,is_default:!0,title:"Title",description:"Description",accept_button_label:"Accept",reject_button_label:"Reject",save_button_label:"Save",acknowledge_button_label:"OK",privacy_preferences_link_label:"Privacy Preferences"}],s={name:"",disabled:!1,dismissable:!0,allow_language_selection:!1,show_layer1_notices:!1,layer1_button_options:t.O.OPT_IN_OPT_OUT,regions:[],translations:r,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},d=(e,a)=>{let i=a.find(a=>a.id===e.language);return i?i.name:e.language},c=e=>{var a,i,n,t,l,o,r,s,d;let{language:c,is_default:u,accept_button_label:_,reject_button_label:F}=e;return{language:c,is_default:u,accept_button_label:_,reject_button_label:F,title:e.title,description:e.description,acknowledge_button_label:null!==(a=e.acknowledge_button_label)&&void 0!==a?a:void 0,banner_title:null!==(i=e.banner_title)&&void 0!==i?i:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(t=e.purpose_header)&&void 0!==t?t:void 0,privacy_policy_link_label:null!==(l=e.privacy_policy_link_label)&&void 0!==l?l:void 0,privacy_policy_url:null!==(o=e.privacy_policy_url)&&void 0!==o?o:void 0,privacy_preferences_link_label:null!==(r=e.privacy_preferences_link_label)&&void 0!==r?r:void 0,save_button_label:null!==(s=e.save_button_label)&&void 0!==s?s:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},u=e=>{let{created_at:a,updated_at:i,privacy_notices:n,origin:t,id:l,...o}=e;return{...o,privacy_notice_ids:n?n.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>c(e)):[]}},_=e=>e===n.re.PRIVACY_CENTER?{title:{included:!0,required:!0},description:{included:!0,required:!0},save_button_label:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},modal_link_label:{included:!0}}:e===n.re.MODAL?{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0},modal_link_label:{included:!0}}:e===n.re.BANNER_AND_MODAL?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:e===n.re.TCF_OVERLAY?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},purpose_header:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}},327:function(e,a,i){"use strict";i.r(a),i.d(a,{default:function(){return es}});var n=i(24246),t=i(77181),l=i(86677),o=i(7617),r=i(77213),s=i(77830),d=i(58754),c=i(94725),u=i(45216),_=i(7621),F=i(92222),m=i(59003),p=i(27378),b=i(18225);let g=(0,t.IUT)({displayName:"MonitorIcon",viewBox:"0 0 12 12",path:(0,n.jsx)("path",{d:"M1.33333 2.21875C1.15 2.21875 1 2.37344 1 2.5625V5.65625H3.66667C3.84167 5.65625 4.00417 5.75078 4.09583 5.90762L4.62708 6.8207L5.88542 4.22324C5.96667 4.05566 6.13125 3.94609 6.3125 3.93965C6.49375 3.9332 6.66667 4.02773 6.76042 4.18887L7.61458 5.65625H8.83333C9.11042 5.65625 9.33333 5.88613 9.33333 6.17188C9.33333 6.45762 9.11042 6.6875 8.83333 6.6875H7.33333C7.15833 6.6875 6.99583 6.59297 6.90417 6.43613L6.37292 5.52305L5.11458 8.12051C5.03333 8.28809 4.86875 8.39766 4.6875 8.4041C4.50625 8.41055 4.33333 8.31602 4.23958 8.15488L3.38542 6.6875H1V9.4375C1 9.62656 1.15 9.78125 1.33333 9.78125H10.6667C10.85 9.78125 11 9.62656 11 9.4375V2.5625C11 2.37344 10.85 2.21875 10.6667 2.21875H1.33333ZM0 2.5625C0 1.8041 0.597917 1.1875 1.33333 1.1875H10.6667C11.4021 1.1875 12 1.8041 12 2.5625V9.4375C12 10.1959 11.4021 10.8125 10.6667 10.8125H1.33333C0.597917 10.8125 0 10.1959 0 9.4375V2.5625Z",fill:"currentColor"})});var x=i(14481),h=i(72625),y=i(70675),S=i(812),v=e=>{let{defaultSuccessMsg:a,defaultErrorMsg:i}=e,n=(0,t.pmc)();return{toastResult:e=>{(0,S.D4)(e)?n({status:"error",description:(0,S.e$)(e.error,i)}):n({status:"success",description:a})}}},C=i(8133),f=i(46628),j=i(67991),M=i(91613);let A=(0,F.Cl)();var k=e=>{let{items:a,totalItemCount:i,selected:l,excluded:o,allSelected:r,someSelected:s,moreLoading:d,handleToggleSelection:c,handleToggleAll:u,onMoreClick:_}=e,g=a.map(e=>({id:e,isSelected:l.includes(e),isExcluded:o.includes(e)})),h=(0,p.useMemo)(()=>[A.display({id:"select",cell:e=>{let{row:a}=e;return(0,n.jsx)(x.k,{isChecked:a.original.isSelected||r&&!a.original.isExcluded,onChange:()=>c(a.original.id),dataTestId:"".concat(a.original.id,"-checkbox")})},header:()=>(0,n.jsx)(x.k,{isChecked:r,isIndeterminate:s,onChange:u,dataTestId:"select-all-checkbox"}),size:1}),A.accessor(e=>e.id,{id:"id",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Scope",...e})})],[c,u,r,s]),y=(0,m.b7)({getCoreRowModel:(0,F.sC)(),getRowId:e=>e.id,manualPagination:!0,data:g,columns:h,columnResizeMode:"onChange"});return(0,n.jsx)(t.kCb,{w:"full",direction:"column",maxH:"lg",children:(0,n.jsx)(x.ZK,{tableInstance:y,onRowClick:e=>c(e.id),footer:!!_&&(0,n.jsx)(x.vr,{totalColumns:2,children:(0,n.jsx)(t.kCb,{justify:"center",children:d?(0,n.jsx)(b.Z,{size:"xs"}):(0,n.jsxs)(t.kCb,{align:"center",children:[(0,n.jsxs)(t.xvT,{fontSize:"xs",mr:4,children:["Showing ",a.length," of ",i]}),(0,n.jsx)(t.wpx,{onClick:_,size:"small","data-testid":"load-more-btn",children:"Load more..."})]})})})})})};let N={items:[],total:1,page:1,size:50,pages:0};var T=(e,a)=>{let[i,n]=(0,p.useState)(2),{data:t,isLoading:l}=(0,y.oN)({page:1,size:25,connection_config_key:e}),o=(0,p.useRef)(l),{items:r,total:s}=null!=t?t:N,d=!!(null==t?void 0:t.pages)&&i>t.pages,[c,u]=(0,p.useState)(r);(0,p.useEffect)(()=>{o.current=l,u(r)},[l,r]),(0,p.useEffect)(()=>{let e=setTimeout(()=>{o.current&&a&&a()},5e3);return()=>clearTimeout(e)},[]);let[_,{isLoading:F,isFetching:m}]=(0,y.j3)(),b=F||m||l,g=async()=>{var a,t;if(d)return;let l=await _({connection_config_key:e,size:25,page:i+1});l.isError||(n(i+1),u([...c,...null!==(t=null===(a=l.data)||void 0===a?void 0:a.items)&&void 0!==t?t:[]]))};return{databases:c,totalDatabases:s,fetchMore:g,initialIsLoading:l,isLoading:b,reachedEnd:d}},w=e=>{var a;let{monitor:i,isEditing:l,isSubmitting:o,integrationKey:r,onSubmit:s,onClose:d}=e,c=(0,t.pmc)(),{databases:u,totalDatabases:_,fetchMore:F,reachedEnd:m,isLoading:p,initialIsLoading:g}=T(r,()=>{s({...i,databases:[]}),c({...f.MA,status:"info",description:"Loading resources is taking longer than expected. The monitor has been saved and is tracking all available resources. You can return later to limit its scope if needed"}),d()}),x=null!==(a=null==i?void 0:i.databases)&&void 0!==a?a:[],{selected:h,excluded:y,allSelected:S,someSelected:v,handleToggleItemSelected:C,handleToggleAll:A}=(0,j.Od)({initialSelected:x,initialExcluded:[],initialAllSelected:l&&!x.length,itemCount:_}),N=!S&&0===h.length;return g?(0,n.jsx)(b.Z,{my:12}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.kCb,{p:4,direction:"column",children:[(0,n.jsxs)(t.kCb,{direction:"row",mb:4,gap:1,align:"center",children:[(0,n.jsx)(t.xvT,{fontSize:"sm",children:"Select projects to monitor"}),(0,n.jsx)(M.Z,{label:"Selecting a project will monitor all current and future datasets within that project."})]}),(0,n.jsx)(k,{items:u,totalItemCount:_,selected:h,excluded:y,allSelected:S,someSelected:v,moreLoading:p,handleToggleSelection:C,handleToggleAll:A,onMoreClick:m?void 0:F})]}),(0,n.jsxs)("div",{className:"mt-4 flex w-full justify-between",children:[(0,n.jsx)(t.wpx,{onClick:d,children:"Cancel"}),(0,n.jsx)(t.ua7,{label:"Select one or more projects to save",isDisabled:!N,children:(0,n.jsx)(t.wpx,{onClick:()=>{s({...i,excluded_databases:y,databases:S?[]:h})},loading:o,type:"primary","data-testid":"save-btn",disabled:N,children:"Save"})})]})]})},E=i(19508),U=i(96063),I=i(34090),R=i(55484),L=i(97181),q=i(40324),D=i(21702),O=e=>{var a,i;let{monitor:o,integrationOption:r,isSubmitting:s,databasesAvailable:d,onClose:c,onAdvance:u,onSubmit:_}=e,F=!!o,{query:m}=(0,l.useRouter)(),p=Array.isArray(m.id)?m.id[0]:m.id,b=R.Ry().shape({name:R.Z_().required().label("Name"),execution_frequency:R.Z_().nullable().label("Execution frequency"),execution_start_date:R.hT().nullable().label("Execution start date")}),g=(null==o?void 0:o.execution_start_date)?(0,E.D)(o.execution_start_date):Date.now(),x={name:null!==(a=null==o?void 0:o.name)&&void 0!==a?a:"",execution_start_date:(0,U.WU)(g,"yyyy-MM-dd'T'HH:mm"),execution_frequency:null!==(i=null==o?void 0:o.execution_frequency)&&void 0!==i?i:D.hV.MONTHLY},h=(0,S.MM)(D.hV);return(0,n.jsx)(I.J9,{initialValues:x,enableReinitialize:!0,onSubmit:e=>{let a=e.execution_frequency!==D.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:D.hV.NOT_SCHEDULED,execution_start_date:void 0},i=F?{...o,...a,name:e.name}:{...a,name:e.name,connection_config_key:p,classify_params:{num_samples:25,num_threads:1}};r.identifier===D.Rj.DYNAMODB&&(i.datasource_params={single_dataset:!1}),d?u(i):_(i)},validationSchema:b,children:e=>{let{values:a,isValid:i,resetForm:l}=e;return(0,n.jsx)(I.l0,{children:(0,n.jsxs)(t.gCW,{alignItems:"start",spacing:6,mt:4,children:[(0,n.jsx)(q.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsx)(L.d,{name:"execution_frequency",id:"execution_frequency",tooltip:"Interval to run the monitor automatically after the start date",options:h,label:"Automatic execution frequency",layout:"stacked"}),(0,n.jsx)(q.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:a.execution_frequency===D.hV.NOT_SCHEDULED,id:"execution_start_date"}),(0,n.jsxs)("div",{className:"flex w-full justify-between",children:[(0,n.jsx)(t.wpx,{onClick:()=>{l(),c()},children:"Cancel"}),(0,n.jsx)(t.wpx,{htmlType:"submit",type:"primary",disabled:!i,loading:s,"data-testid":"next-btn",children:d?"Next":"Save"})]})]})})}})},P=i(90111),B=i(8411),G=i(3968),V=i(64781),Z=i(60325);let K=R.Ry().shape({name:R.Z_().required().label("Name"),execution_frequency:R.Z_().nullable().label("Execution frequency"),execution_start_date:R.hT().nullable().label("Execution start date"),datasource_params:R.Ry().shape({locations:R.IX().label("Locations"),exclude_domains:R.IX().label("Exclude domains"),sitemap_url:R.Z_().nullable().url().label("Sitemap URL")})});var H=e=>{var a,i,o;let{monitor:r,url:s,onClose:d,onSubmit:c}=e,{query:u}=(0,l.useRouter)(),_=Array.isArray(u.id)?u.id[0]:u.id,F=(null==r?void 0:r.execution_start_date)?(0,E.D)(r.execution_start_date):Date.now(),{data:m,isLoading:p}=(0,V.gT)(),b=[...(0,Z.TK)(null!==(a=null==m?void 0:m.locations)&&void 0!==a?a:[]),...(0,Z.TK)(null!==(i=null==m?void 0:m.location_groups)&&void 0!==i?i:[])].map(e=>({value:e,label:B.Z8[e]})),g={name:(null==r?void 0:r.name)||"",execution_frequency:(null==r?void 0:r.execution_frequency)||D.hV.MONTHLY,execution_start_date:(0,U.WU)(F,"yyyy-MM-dd'T'HH:mm"),url:s,connection_config_key:_,datasource_params:null!==(o=null==r?void 0:r.datasource_params)&&void 0!==o?o:{locations:[]}},x=async e=>{let a=e.execution_frequency!==D.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:D.hV.NOT_SCHEDULED,execution_start_date:void 0};c({...r,...e,...a,key:(null==r?void 0:r.key)||(0,G.E)(e.name),classify_params:(null==r?void 0:r.classify_params)||{},datasource_params:e.datasource_params||{},connection_config_key:_})};return(0,n.jsxs)(t.jqI,{vertical:!0,className:"pt-4",children:[(0,n.jsx)(P.Z,{children:(0,n.jsx)(t.xvT,{fontSize:"sm",children:"This monitor allows you to simulate and verify user consent actions, such as 'accept,' 'reject,' or 'opt-out,' on consent experiences. For each detected activity, the monitor will record whether it occurred before or after the configured user actions, ensuring compliance with user consent choices."})}),(0,n.jsx)(I.J9,{initialValues:g,enableReinitialize:!0,onSubmit:x,validationSchema:K,children:e=>{let{values:a,resetForm:i}=e;return(0,n.jsx)(I.l0,{children:(0,n.jsxs)(t.jqI,{vertical:!0,gap:"middle",children:[(0,n.jsx)(q.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsx)(q.j0,{name:"datasource_params.sitemap_url",id:"sitemap_url",label:"Sitemap URL",variant:"stacked"}),(0,n.jsx)(L.d,{mode:"tags",name:"datasource_params.exclude_domains",placeholder:"Enter domains to exclude",id:"exclude_domains",label:"Exclude domains",options:[],open:!1,layout:"stacked"}),(0,n.jsx)(q.j0,{name:"url",id:"url",label:"URL",isRequired:!0,disabled:!0,variant:"stacked"}),(0,n.jsx)(L.d,{mode:"multiple",isRequired:!0,name:"datasource_params.locations",id:"locations",label:"Locations",loading:p,options:b,optionFilterProp:"label",tooltip:"Specify the region(s) to include in the scan. The monitor will scan the same URL across these locations to identify tracking technologies, such as cookies served by ad tech vendors.",layout:"stacked"}),(0,n.jsx)(L.d,{name:"execution_frequency",id:"execution_frequency",options:(0,S.MM)(D.hV),label:"Automatic execution frequency",layout:"stacked"}),(0,n.jsx)(q.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:a.execution_frequency===D.hV.NOT_SCHEDULED,id:"execution_start_date",tooltip:"Set the start time for the scan. For optimal performance and minimal disruption, schedule scans during periods of low traffic."}),(0,n.jsxs)(t.jqI,{className:"mt-2 justify-between",children:[(0,n.jsx)(t.wpx,{onClick:()=>{i(),d()},children:"Cancel"}),(0,n.jsx)(t.wpx,{type:"primary",htmlType:"submit","data-testid":"save-btn",children:"Save"})]})]})})}})]})},z=i(31883),W=e=>{let{isOpen:a,onClose:i,formStep:l,onAdvance:o,monitor:r,isEditing:s,integration:d,integrationOption:c}=e,[u,{isLoading:_}]=(0,y.Fy)(),{data:F}=(0,y.oN)({page:1,size:25,connection_config_key:d.key}),m=!!F&&!!F.total,p=(0,t.pmc)(),{toastResult:g}=v({defaultSuccessMsg:"Monitor ".concat(s?"updated":"created"," successfully"),defaultErrorMsg:"A problem occurred while ".concat(s?"updating":"creating"," this monitor")}),x=async e=>{let a;let n=setTimeout(()=>{a||(p({...f.MA,status:"info",description:"Saving this monitor is taking longer than expected. Fides will continue processing it in the background, and you can check back later to view the updates."}),i())},5e3);(a=await u(e))&&(clearTimeout(n),g(a),(0,z.D4)(a)||i())};return c.identifier===D.Rj.WEBSITE?(0,n.jsx)(C.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure website monitor",isOpen:a,onClose:i,children:(0,n.jsx)(H,{monitor:r,url:d.secrets.url,onClose:i,onSubmit:x})}):(0,n.jsxs)(C.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure discovery monitor",isOpen:a,onClose:i,children:[0===l&&(0,n.jsx)(O,{monitor:r,onClose:i,onAdvance:o,onSubmit:x,isSubmitting:_,databasesAvailable:m,integrationOption:c}),1===l&&(r?(0,n.jsx)(w,{monitor:r,isEditing:s,isSubmitting:_,onSubmit:x,onClose:i,integrationKey:d.key}):(0,n.jsx)(b.Z,{}))]})},Y=i(58452),J=i(79494),X=e=>{let{monitorId:a,onEditClick:i}=e,[l]=(0,y.Sb)(),{toastResult:o}=v({defaultErrorMsg:"A problem occurred deleting this monitor",defaultSuccessMsg:"Monitor deleted successfully"}),[r,{isLoading:s}]=(0,y.V9)(),{toastResult:d}=v({defaultErrorMsg:"A problem occurred initiating monitor execution",defaultSuccessMsg:"Monitor execution successfully started"}),c=async()=>{o(await l({monitor_config_id:a}))},{isOpen:u,onOpen:_,onClose:F}=(0,t.qY0)(),m=async()=>{d(await r({monitor_config_id:a}))};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y.Z,{isOpen:u,onClose:F,onConfirm:c,title:"Delete monitor",message:"Are you sure you want to delete this discovery monitor?",continueButtonText:"Delete",isCentered:!0}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(t.ua7,{label:"Edit",children:(0,n.jsx)(t.wpx,{onClick:i,size:"small",icon:(0,n.jsx)(t.dY8,{}),"data-testid":"edit-monitor-btn","aria-label":"Edit monitor"})}),(0,n.jsx)(t.ua7,{label:"Delete",children:(0,n.jsx)(t.wpx,{onClick:_,size:"small",icon:(0,n.jsx)(t.pJl,{}),"aria-label":"Delete monitor","data-testid":"delete-monitor-btn"})}),(0,n.jsx)(J.Z,{onClick:m,title:"Scan",loading:s})]})]})};let Q=e=>{let{row:a,getValue:i}=e,[t]=(0,y.Fy)(),l=async e=>t({...a.original,enabled:e}),o=i();return(0,n.jsx)(h.S1,{enabled:o,onToggle:l,title:"Disabling monitor",message:"You are about to disable this monitor. If you continue, it will no longer scan automatically."})},$={items:[],total:0,page:1,size:50,pages:0},ee=(0,F.Cl)(),ea=e=>{let{onAddClick:a}=e;return(0,n.jsx)(t.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,n.jsxs)(t.gCW,{children:[(0,n.jsx)(t.xvT,{fontSize:"md",fontWeight:"600",children:"No monitors"}),(0,n.jsx)(t.xvT,{fontSize:"sm",children:'You have not configured any data discovery monitors. Click "Add monitor" to configure data discovery now.'}),(0,n.jsx)(t.wpx,{onClick:a,type:"primary",children:"Add monitor"})]})})};var ei=e=>{let{integration:a,integrationOption:i}=e,{PAGE_SIZES:l,pageSize:o,setPageSize:r,onPreviousPageClick:s,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:_,endRange:S,pageIndex:v,setTotalPages:C}=(0,x.oi)(),{isLoading:f,isFetching:j,data:M}=(0,y.Fu)({page:v,size:o,connection_config_key:a.key}),A=(0,t.qY0)(),[k,N]=(0,p.useState)(void 0),[T,w]=(0,p.useState)(!1),[E,U]=(0,p.useState)(0),I=e=>{N(e),w(!0),A.onOpen()},R=null!=M?M:$,{items:L,total:q,pages:O}=(0,p.useMemo)(()=>R,[R]);(0,p.useEffect)(()=>{C(O)},[O,C]);let P=(0,p.useMemo)(()=>[ee.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(x.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Name",...e})}),ee.accessor(e=>e.databases,{id:"projects",cell:e=>0===e.getValue().length?(0,n.jsx)(x.G3,{value:"All projects"}):(0,n.jsx)(x.WP,{suffix:"Projects",value:e.getValue(),...e,cellState:{isExpanded:!0}}),header:e=>(0,n.jsx)(x.Rr,{value:"Scope",...e})}),ee.accessor(e=>e.execution_frequency,{id:"frequency",cell:e=>{var a;return(0,n.jsx)(x.G3,{value:null!==(a=e.getValue())&&void 0!==a?a:"Not scheduled"})},header:e=>(0,n.jsx)(x.Rr,{value:"Scan frequency",...e})}),ee.accessor(e=>e.last_monitored,{id:"last_monitored",cell:e=>(0,n.jsx)(h.Cy,{time:e.getValue()}),header:e=>(0,n.jsx)(x.Rr,{value:"Last scan",...e})}),ee.accessor(e=>e.enabled,{id:"status",cell:Q,header:e=>(0,n.jsx)(x.Rr,{value:"Status",...e}),size:0,meta:{disableRowClick:!0}}),ee.display({id:"action",cell:e=>(0,n.jsx)(X,{onEditClick:()=>I(e.row.original),monitorId:e.row.original.key}),header:"Actions",meta:{disableRowClick:!0}})],[]),B=(0,m.b7)({getCoreRowModel:(0,F.sC)(),getGroupedRowModel:(0,F.qe)(),getExpandedRowModel:(0,F.rV)(),getRowId:e=>e.name,manualPagination:!0,data:L,columns:P,columnResizeMode:"onChange"});return f?(0,n.jsx)(b.Z,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.xvT,{maxW:"720px",mb:6,fontSize:"sm","data-testid":"monitor-description",children:(null==i?void 0:i.identifier)===D.Rj.WEBSITE?"Configure your website monitor to identify active ad tech vendors and tracking technologies across your site. This monitor will analyze selected pages for vendor activity, compliance with privacy requirements, and data collection practices. Set your preferences below to customize the monitor frequency and scan locations.":"A data discovery monitor observes configured systems for data model changes to proactively discover and classify data risks. Monitors can observe part or all of a project, dataset, table, or API for changes and each can be assigned to a different data steward."}),(0,n.jsxs)(x.Q$,{children:[(0,n.jsx)(t.LZC,{}),(0,n.jsx)(t.wpx,{onClick:A.onOpen,icon:(0,n.jsx)(g,{}),iconPosition:"end","data-testid":"add-monitor-btn",children:"Add monitor"}),(0,n.jsx)(W,{isOpen:A.isOpen,onClose:()=>{N(void 0),w(!1),U(0),A.onClose()},formStep:E,onAdvance:e=>{N(e),U(1)},monitor:k,isEditing:T,integration:a,integrationOption:i})]}),(0,n.jsx)(x.ZK,{tableInstance:B,onRowClick:I,emptyTableNotice:(0,n.jsx)(ea,{onAddClick:A.onOpen})}),(0,n.jsx)(x.s8,{totalRows:q||0,pageSizes:l,setPageSize:r,onPreviousPageClick:s,isPreviousPageDisabled:d||j,onNextPageClick:c,isNextPageDisabled:u||j,startRange:_,endRange:S})]})},en=i(15987),et=i(64176),el=e=>{let{isOpen:a,onClose:i,connection:t}=e,l=(0,et.Z)(t.connection_type);return(0,n.jsx)(C.Z,{title:"Manage integration secret",isOpen:a,onClose:i,children:(0,n.jsx)(en.Z,{connection:t,connectionOption:l,onCancel:i})})},eo=i(41553),er=i(75595),es=()=>{var e,a;let{query:i}=(0,l.useRouter)(),F=Array.isArray(i.id)?i.id[0]:i.id,{data:m,isLoading:p}=(0,c.jA)(null!=F?F:""),b=(0,et.Z)(null==m?void 0:m.connection_type),{testConnection:g,isLoading:x,testData:h}=(0,u.Z)(m),{onOpen:y,isOpen:S,onClose:v}=(0,t.qY0)(),{overview:C,instructions:f}=(0,_.ZP)(null==m?void 0:m.connection_type),j=(0,l.useRouter)();m&&!_.jq.includes(m.connection_type)&&j.push(s.KH);let M=[{label:"Connection",content:(0,n.jsxs)(t.xuv,{maxW:"720px",children:[(0,n.jsxs)(t.kCb,{borderRadius:"md",outline:"1px solid",outlineColor:"gray.100",align:"center",p:3,children:[(0,n.jsx)(t.kCb,{flexDirection:"column",children:(0,n.jsx)(eo.Z,{testData:h})}),(0,n.jsx)(t.LZC,{}),(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)(t.wpx,{onClick:g,loading:x,"data-testid":"test-connection-btn",children:"Test connection"}),(0,n.jsx)(t.wpx,{onClick:y,"data-testid":"manage-btn",children:"Manage"})]})]}),(0,n.jsx)(el,{isOpen:S,onClose:v,connection:m}),C,f]})},{label:"Data discovery",content:(0,n.jsx)(ei,{integration:m,integrationOption:b})}];return(0,n.jsx)(r.Z,{title:"Integrations",children:(0,n.jsxs)(d.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations",href:s.KH},{title:null!==(a=null!==(e=null==m?void 0:m.name)&&void 0!==e?e:null==m?void 0:m.key)&&void 0!==a?a:""}],children:[(0,n.jsx)(er.Z,{integration:m,showDeleteButton:!0}),p?(0,n.jsx)(t.$jN,{}):!!m&&(0,n.jsx)(o.Z,{data:M,isLazy:!0})]})})}}},function(e){e.O(0,[8033,6060,2858,2866,9278,9255,4481,5973,2888,9774,179],function(){return e(e.s=50697)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2815],{79349:function(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},52033:function(e,t,n){var i=n(26194),r=n(26789)(i);e.exports=r},23545:function(e,t,n){var i=n(97141),r=n(72889);e.exports=function e(t,n,s,a,o){var l=-1,c=t.length;for(s||(s=r),o||(o=[]);++l<c;){var u=t[l];n>0&&s(u)?n>1?e(u,n-1,s,a,o):i(o,u):a||(o[o.length]=u)}return o}},49819:function(e,t,n){var i=n(18911)();e.exports=i},26194:function(e,t,n){var i=n(49819),r=n(50098);e.exports=function(e,t){return e&&i(e,t,r)}},67375:function(e,t,n){var i=n(52033),r=n(80068);e.exports=function(e,t){var n=-1,s=r(e)?Array(e.length):[];return i(e,function(e,i,r){s[++n]=t(e,i,r)}),s}},98497:function(e,t,n){var i=n(66070),r=n(79867),s=n(89278),a=n(67375),o=n(73303),l=n(39334),c=n(96348),u=n(31137),d=n(19785);e.exports=function(e,t,n){t=t.length?i(t,function(e){return d(e)?function(t){return r(t,1===e.length?e[0]:e)}:e}):[u];var p=-1;return t=i(t,l(s)),o(a(e,function(e,n,r){return{criteria:i(t,function(t){return t(e)}),index:++p,value:e}}),function(e,t){return c(e,t,n)})}},1197:function(e,t,n){var i=n(31137),r=n(11871),s=n(63132);e.exports=function(e,t){return s(r(e,t,i),e+"")}},54459:function(e,t,n){var i=n(551),r=n(42630),s=n(31137),a=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:s;e.exports=a},73303:function(e){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},17845:function(e,t,n){var i=n(55193);e.exports=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,s=e==e,a=i(e),o=void 0!==t,l=null===t,c=t==t,u=i(t);if(!l&&!u&&!a&&e>t||a&&o&&c&&!l&&!u||r&&o&&c||!n&&c||!s)return 1;if(!r&&!a&&!u&&e<t||u&&n&&s&&!r&&!a||l&&n&&s||!o&&s||!c)return -1}return 0}},96348:function(e,t,n){var i=n(17845);e.exports=function(e,t,n){for(var r=-1,s=e.criteria,a=t.criteria,o=s.length,l=n.length;++r<o;){var c=i(s[r],a[r]);if(c){if(r>=l)return c;return c*("desc"==n[r]?-1:1)}}return e.index-t.index}},26789:function(e,t,n){var i=n(80068);e.exports=function(e,t){return function(n,r){if(null==n)return n;if(!i(n))return e(n,r);for(var s=n.length,a=t?s:-1,o=Object(n);(t?a--:++a<s)&&!1!==r(o[a],a,o););return n}}},18911:function(e){e.exports=function(e){return function(t,n,i){for(var r=-1,s=Object(t),a=i(t),o=a.length;o--;){var l=a[e?o:++r];if(!1===n(s[l],l,s))break}return t}}},42630:function(e,t,n){var i=n(81822),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},72889:function(e,t,n){var i=n(96539),r=n(2900),s=n(19785),a=i?i.isConcatSpreadable:void 0;e.exports=function(e){return s(e)||r(e)||!!(a&&e&&e[a])}},57535:function(e,t,n){var i=n(85638),r=n(80068),s=n(42383),a=n(11611);e.exports=function(e,t,n){if(!a(n))return!1;var o=typeof t;return("number"==o?!!(r(n)&&s(t,n.length)):"string"==o&&t in n)&&i(n[t],e)}},11871:function(e,t,n){var i=n(79349),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var s=arguments,a=-1,o=r(s.length-t,0),l=Array(o);++a<o;)l[a]=s[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=s[a];return c[t]=n(l),i(e,this,c)}}},63132:function(e,t,n){var i=n(54459),r=n(49591)(i);e.exports=r},49591:function(e){var t=Date.now;e.exports=function(e){var n=0,i=0;return function(){var r=t(),s=16-(r-i);if(i=r,s>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},551:function(e){e.exports=function(e){return function(){return e}}},95099:function(e,t,n){var i=n(23545),r=n(98497),s=n(1197),a=n(57535),o=s(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,i(t,1),[])});e.exports=o},24081:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/messaging",function(){return n(18504)}])},35287:function(e,t,n){"use strict";var i=n(24246),r=n(77181),s=n(88038),a=n.n(s);n(27378),t.Z=e=>{let{children:t,title:n,mainProps:s}=e;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...s,children:t})]})}},87361:function(e,t,n){"use strict";var i=n(24246),r=n(77181);t.Z=e=>{let{title:t,text:n,onClose:s}=e;return(0,i.jsxs)(r.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:[s&&(0,i.jsx)(r.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:s}),(0,i.jsx)(r.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,i.jsxs)(r.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,i.jsx)(r.X6q,{fontSize:"md",children:t}),(0,i.jsx)(r.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:n})]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(77181),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:c,...u}=e;return(0,i.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",...c}:{paddingBottom:"24px",...c},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(s.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var i=n(24246),r=n(77181),s=n(79894),a=n.n(s),o=n(27378);let{Text:l}=r.AntTypography,c=e=>{let{items:t,...n}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,o={...e},c=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),c)?o.title=(0,i.jsx)(r.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},7426:function(e,t,n){"use strict";n.d(t,{D2:function(){return p},L:function(){return o},U7:function(){return c},Yh:function(){return f},ak:function(){return l},km:function(){return a},tB:function(){return s}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:s,usePutConfigurationSettingsMutation:a,usePatchConfigurationSettingsMutation:o}=r,l=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{var i,r,s;let{data:a}=t,{data:o}=n;return{configSet:{cors_origins:(null==o?void 0:null===(i=o.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==o?void 0:null===(r=o.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==a?void 0:null===(s=a.security)||void 0===s?void 0:s.cors_origins)||[]}}}),c=()=>(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:n}=t;return n}),u={enabled:!1,cmp_api_required:!1},d=(e,t,n,i)=>{let r=n&&n[e],s=i&&i[e];return r&&s?{...i[e],...n[e]}:s?i[e]:r?{...n[e]}:t},p=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("gpp",u,i,r)}),g={tcf_publisher_country_code:null},f=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("plus_consent_settings",g,i,r)})},67810:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}}),(i=r||(r={})).PRIVACY_REQUEST_REVIEW_APPROVE="privacy_request_review_approve",i.PRIVACY_REQUEST_REVIEW_DENY="privacy_request_review_deny",i.PRIVACY_REQUEST_RECEIPT="privacy_request_receipt",i.PRIVACY_REQUEST_COMPLETE_ACCESS="privacy_request_complete_access",i.PRIVACY_REQUEST_COMPLETE_DELETION="privacy_request_complete_deletion",i.SUBJECT_IDENTITY_VERIFICATION="subject_identity_verification";var i,r,s={[r.PRIVACY_REQUEST_COMPLETE_ACCESS]:"Access request completed",[r.PRIVACY_REQUEST_COMPLETE_DELETION]:"Erasure request completed",[r.PRIVACY_REQUEST_RECEIPT]:"Privacy request received",[r.PRIVACY_REQUEST_REVIEW_APPROVE]:"Privacy request approved",[r.PRIVACY_REQUEST_REVIEW_DENY]:"Privacy request denied",[r.SUBJECT_IDENTITY_VERIFICATION]:"Subject identity verification"}},5058:function(e,t,n){"use strict";n.d(t,{Vw:function(){return s},ms:function(){return i},pS:function(){return r},vm:function(){return a}});let{useGetSummaryMessagingTemplatesQuery:i,usePutMessagingTemplateByIdMutation:r,useCreateMessagingTemplateByTypeMutation:s,usePatchMessagingTemplateByIdMutation:a}=n(78780).u.injectEndpoints({endpoints:e=>({getSummaryMessagingTemplates:e.query({query:e=>({method:"GET",url:"plus/messaging/templates/summary",params:e}),providesTags:()=>["Property-Specific Messaging Templates"]}),putMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"PUT",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),patchMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"PATCH",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),createMessagingTemplateByType:e.mutation({query:e=>{let{templateType:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"POST",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]})})})},18504:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return N}});var i=n(24246),r=n(92222),s=n(59003),a=n(77181),o=n(95099),l=n.n(o),c=n(86677),u=n(27378),d=n(35287),p=n(71795),g=n(87361),f=n(77830),m=n(58754),x=n(91613),h=n(14481),v=n(42904),y=n(7426),_=n(67810),j=e=>{let{isOpen:t,onClose:n,onAccept:r}=e,[s,o]=(0,u.useState)(void 0),l=Object.keys(_.Z).map(e=>({value:e,label:_.Z[e]}));return(0,i.jsxs)(a.u_l,{isOpen:t,onClose:n,size:"2xl",isCentered:!0,children:[(0,i.jsx)(a.ZAr,{}),(0,i.jsxs)(a.hzk,{"data-testid":"add-messaging-template-modal",children:[(0,i.jsx)(a.xBx,{borderBottomWidth:1,fontWeight:"bold",children:"Select message template"}),(0,i.jsxs)(a.fef,{children:[(0,i.jsx)(a.xvT,{color:"gray.700",fontWeight:"medium",fontSize:"sm",marginBottom:3,marginTop:1,children:"Add a new email message by selecting a template below and clicking accept."}),(0,i.jsx)(a.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"medium",marginBottom:2,children:"Choose template:"}),(0,i.jsx)(a.xuv,{"data-testid":"template-type-selector",children:(0,i.jsx)(a.WPr,{options:l,onChange:e=>{o(e)},className:"w-full"})})]}),(0,i.jsx)(a.mzw,{justifyContent:"flex-start",children:(0,i.jsxs)("div",{className:"flex w-full gap-4",children:[(0,i.jsx)(a.wpx,{onClick:n,"data-testid":"cancel-btn",className:"grow",children:"Cancel"}),(0,i.jsx)(a.wpx,{onClick:()=>r(s),type:"primary","data-testid":"confirm-btn",disabled:!s,className:"grow",children:"Next"})]})})]})]})},b=n(5058),C=n(812),E=n(46628),T=n(31883),S=()=>{let e=(0,a.pmc)(),[t]=(0,b.vm)();return{toggleIsTemplateEnabled:(0,u.useCallback)(async n=>{let{isEnabled:i,templateId:r}=n,s=await t({templateId:r,template:{is_enabled:i}});if((0,T.D4)(s)){e((0,E.Vo)((0,C.e$)(s.error)));return}e((0,E.t5)("Messaging template ".concat(i?"enabled":"disabled")))},[t,e])}},P=n(64826);let w=(0,r.Cl)(),R={items:[],total:0,page:1,size:50,pages:1},I=()=>(0,i.jsx)(a.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",textAlign:"center",children:(0,i.jsxs)(a.gCW,{children:[(0,i.jsx)(a.xvT,{fontSize:"md",fontWeight:"600",children:"It looks like it’s your first time here!"}),(0,i.jsxs)(a.xvT,{fontSize:"sm",children:["Add new email templates with the ",'"Add message +"'," button.",(0,i.jsx)("br",{})]})]})}),k=()=>{let{isLoading:e,data:t}=(0,P.gz)({page:1,size:100}),n=null==t?void 0:t.items.filter(e=>!e.messaging_templates||0===e.messaging_templates.length),r=!!(!e&&(null==n?void 0:n.length)),s="missing-messages-notice-".concat(null==n?void 0:n.map(e=>e.id).join("-")),[o,l]=(0,p._)("notices.dismissedMessageNoticeId",""),c=s===o;return r&&!c?(0,i.jsx)(a.xuv,{mb:6,"data-testid":"notice-properties-without-messaging-templates",children:(0,i.jsx)(g.Z,{title:"Not all properties have messages configured.",text:(0,i.jsxs)(a.xvT,{as:"span",children:["You have properties that do not have messages configured. Users who submit privacy requests for these properties may not receive the necessary emails regarding their requests."," ",(0,i.jsx)(a.xuv,{as:"span",children:(0,i.jsx)(x.Z,{label:null==n?void 0:n.map(e=>e.name).join(", ")})})]}),onClose:()=>{l(s)}})}):null},A=()=>{let{data:e}=(0,y.tB)({api_set:!1});return(null==e?void 0:e.notifications.enable_property_specific_messaging)?null:(0,i.jsx)(a.xuv,{mb:6,"data-testid":"notice-properties-without-messaging-templates",children:(0,i.jsx)(g.Z,{title:"Basic messaging enabled",text:(0,i.jsxs)(a.xvT,{as:"span",children:["In basic messaging mode, you can edit the content of your messages from this screen. Please note that in basic messaging, the “Enable” toggle does not apply. Fides also supports property specific messaging mode. Read our"," ",(0,i.jsx)(a.rUS,{href:"https://fid.es/property-specific-messaging",target:"_blank",rel:"nofollow",textDecoration:"underline",children:"docs"})," ","for more information about property specific mode or contact"," ",(0,i.jsx)(a.rUS,{href:"mailto:support@ethyca.com",textDecoration:"underline",children:"Ethyca support"})," ","to enable this mode on your Fides instance."]})})})};var N=()=>{let e=(0,c.useRouter)(),{toggleIsTemplateEnabled:t}=S(),{PAGE_SIZES:n,pageSize:o,setPageSize:p,onPreviousPageClick:g,isPreviousPageDisabled:x,onNextPageClick:y,isNextPageDisabled:C,startRange:E,endRange:T,pageIndex:P,setTotalPages:N}=(0,h.oi)(),{data:q,isLoading:M,isFetching:z}=(0,b.ms)({page:P,size:o}),{items:V,total:U,pages:O}=(0,u.useMemo)(()=>null!=q?q:R,[q]);(0,u.useEffect)(()=>{N(O)},[O,N]);let[B,W]=(0,u.useState)(!1),Y=(0,u.useMemo)(()=>[w.accessor(e=>e.type,{id:"message",cell:e=>(0,i.jsx)(h.G3,{value:_.Z[e.getValue()]}),header:e=>(0,i.jsx)(h.Rr,{value:"Message",...e}),size:150}),w.accessor(e=>(e.properties||[]).map(e=>e.name),{id:"properties",cell:e=>(0,i.jsx)(h.WP,{suffix:"properties",value:e.getValue(),...e}),header:e=>(0,i.jsx)(h.Rr,{value:"Properties",...e}),meta:{showHeaderMenu:!0},size:250}),w.accessor(e=>e.is_enabled,{id:"is_enabled",cell:e=>(0,i.jsx)(a.kCb,{align:"center",justifyContent:"flex-start",w:"full",h:"full",children:(0,i.jsx)(a.rAg,{checked:e.getValue(),onChange:n=>{t({isEnabled:n,templateId:e.row.original.id})}})}),header:e=>(0,i.jsx)(h.Rr,{value:"Enable",...e}),size:200,meta:{disableRowClick:!0}})],[t]),D=(0,u.useMemo)(()=>l()(V,"id"),[V]),Z=(0,s.b7)({getCoreRowModel:(0,r.sC)(),getFilteredRowModel:(0,r.vL)(),getSortedRowModel:(0,r.tj)(),columns:Y,data:D,columnResizeMode:"onChange"});return(0,i.jsxs)(d.Z,{title:"Messaging",children:[(0,i.jsx)(m.Z,{heading:"Messaging"}),(0,i.jsx)(A,{}),(0,i.jsx)(k,{}),(0,i.jsx)(h.Q$,{children:(0,i.jsx)(a.Ugi,{alignItems:"center",spacing:4,marginLeft:"auto",children:(0,i.jsx)(a.wpx,{type:"primary","data-testid":"add-message-btn",onClick:()=>W(!0),children:"Add message +"})})}),M?(0,i.jsx)(h.I4,{rowHeight:36,numRows:15}):(0,i.jsx)(h.ZK,{tableInstance:Z,onRowClick:t=>{e.push({pathname:f.ax,query:{id:t.id}})},emptyTableNotice:(0,i.jsx)(I,{})}),(0,i.jsx)(v.s8,{totalRows:U||0,pageSizes:n,setPageSize:p,onPreviousPageClick:g,isPreviousPageDisabled:x||z,onNextPageClick:y,isNextPageDisabled:C||z,startRange:E,endRange:T}),(0,i.jsx)(j,{isOpen:B,onClose:()=>W(!1),onAccept:t=>{e.push({pathname:f.sM,query:{templateType:t}})}})]})}},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=n(19043)}},function(e){e.O(0,[8033,6060,2858,2866,9278,4481,2888,9774,179],function(){return e(e.s=24081)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9650],{6554:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/[id]",function(){return n(93299)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var i=n(24246),s=n(77181),l=n(88038),r=n.n(l),a=n(86677);n(27378);var o=n(25980),c=n(90867),d=n(77830),u=()=>{let e=(0,a.useRouter)();return(0,i.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,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:n,padded:l=!0,mainProps:d}=e,h=(0,o.hz)(),x=(0,a.useRouter)(),p="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,g=!(h.flags.privacyRequestsConfiguration&&p),{data:j}=(0,c.JE)(void 0,{skip:g}),{data:m}=(0,c.PW)(void 0,{skip:g}),f=h.flags.privacyRequestsConfiguration&&(!j||!m)&&p;return(0,i.jsxs)(s.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(s.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[f?(0,i.jsx)(u,{}):null,t]})]})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return l.D4},MM:function(){return h},Ot:function(){return c},c6:function(){return s},cj:function(){return p},e$:function(){return a},fn:function(){return o},iC:function(){return x},nU:function(){return u},tB:function(){return d}});var i,s,l=n(19043);let r="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;if((0,l.Bw)(e)){if((0,l.hE)(e.data))return e.data.detail;if((0,l.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,l.Dy)(e.data)||404===e.status&&(0,l.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:r};if((0,l.oK)(e))return{status:e.originalStatus,message:e.data};if((0,l.Bw)(e)){let{status:n}=e;return{status:n,message:a(e,t.message)}}return t},h=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=s||(s={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},93299:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ea}});var i,s,l=n(24246),r=n(77181),a=n(86677),o=n(77213),c=n(77830),d=n(58754),u=n(99716),h=n(27378),x=n(28120);(i=s||(s={})).IN_PROCESSING="in_processing",i.PENDING="pending",i.COMPLETE="complete",i.ERROR="error",i.PAUSED="paused",i.RETRYING="retrying",i.SKIPPED="skipped";var p=n(88340);let g=e=>{switch(e){case s.SKIPPED:return"warning";case s.ERROR:default:return"error"}};var j=e=>{let{errorMessage:t,status:n=s.ERROR}=e;return(0,l.jsxs)(r.xuv,{height:"100%",id:"outer",children:[(0,l.jsxs)(r.kCb,{alignItems:"center",paddingBottom:"8px",children:[(0,l.jsx)(r.xvT,{size:"sm",color:"gray.700",fontWeight:"medium",marginRight:"8px",lineHeight:"20px",children:"Status"}),(0,l.jsx)(r.j8w,{color:g(n),children:n}),(0,l.jsx)(r.xuv,{padding:"0px",marginBottom:"3px",children:(0,l.jsx)(p.Z,{copyText:t})})]}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xuv,{id:"errorWrapper",overflow:"auto",height:"100%",children:(0,l.jsx)(r.xvT,{children:t})})]})},m=n(16394),f=n(3124),v=n.n(f);let y=e=>{switch(e){case x.Us.ACCESS:return"Data Retrieval";case x.Us.ERASURE:return"Data Deletion";case x.Us.CONSENT:return"Consent";case x.Us.UPDATE:return"Data Update";default:return e}};var b=e=>{let{eventLogs:t,openErrorPanel:n}=e,i=null==t?void 0:t.map(e=>(0,l.jsxs)(r.Tr,{_hover:{backgroundColor:e.status===s.ERROR||e.status===s.SKIPPED&&e.message?v().FIDESUI_NEUTRAL_50:"unset"},onClick:()=>{(e.status===s.ERROR||e.status===s.SKIPPED&&e.message)&&n(e.message,e.status)},style:{cursor:e.status===s.ERROR||e.status===s.SKIPPED&&e.message?"pointer":"unset"},children:[(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:(0,m.p6)(e.updated_at)})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:y(e.action_type)})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.status})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.collection_name})})]},e.updated_at));return(0,l.jsx)(r.xuv,{width:"100%",paddingTop:"0px",height:"100%",children:(0,l.jsx)(r.xJi,{id:"tableContainer",height:"100%",style:{overflowY:"auto"},children:(0,l.jsxs)(r.iA_,{size:"sm",id:"table",position:"relative",children:[(0,l.jsx)(r.hrZ,{id:"tableHeader",position:"sticky",top:"0px",backgroundColor:"white",children:(0,l.jsxs)(r.Tr,{children:[(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Time"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Action Type"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Status"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Collection"})})]})}),(0,l.jsx)(r.p3B,{id:"tableBody",children:i})]})})})},R=e=>{let{isOpen:t,onClose:n,currentLogs:i,isViewingError:a,errorMessage:o,currentStatus:c=s.ERROR,onCloseErrorPanel:d,onOpenErrorPanel:u}=e;return(0,l.jsxs)(r.dys,{isOpen:t,placement:"right",onClose:n,size:"full",autoFocus:!1,children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{style:{width:"50%"},children:[(0,l.jsx)(r.OXI,{style:{paddingBottom:"0px"},children:(0,l.jsxs)(r.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:[(0,l.jsxs)(r.kCb,{alignItems:"center",children:[a&&(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.Rpv,{}),"aria-label":"Close error logs",size:"small",onClick:d}),(0,l.jsx)(r.xvT,{color:"gray.900",fontSize:"md",lineHeight:"6",fontWeight:"medium",ml:1,children:a?"Event detail":"Event log"})]}),(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.LGN,{width:"17px"}),"aria-label":"Stop viewing error message",size:"small",onClick:n})]})}),(0,l.jsxs)(r.Ng0,{id:"drawerBody",overflow:"hidden",children:[i&&!a?(0,l.jsx)(b,{eventLogs:i,openErrorPanel:u}):null,a?(0,l.jsx)(j,{errorMessage:o,status:c}):null]})]})]})};let w=(e,t)=>{if(0===e.length)return!1;let n=Array.from(e).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime());if(!n[0].collection_name)return n[0].status===t;let i={};return n.forEach(e=>{e.collection_name&&!i[e.collection_name]&&(i[e.collection_name]=e)}),Object.values(i).some(e=>e.status===t)},C=e=>w(e,s.ERROR),_=e=>w(e,s.SKIPPED),S=e=>C(e)?(0,l.jsx)(r.f9v,{}):_(e)?(0,l.jsx)(r.XXw,{}):(0,l.jsx)(r.StI,{});var k=e=>{let{entryKey:t,logs:n,isLast:i,onViewLog:s}=e;return(0,l.jsxs)(r.xuv,{children:[(0,l.jsxs)(r.kCb,{alignItems:"center",height:23,position:"relative",children:[(0,l.jsx)(r.xuv,{zIndex:1,children:S(n)}),!i&&(0,l.jsx)(r.xuv,{width:"2px",height:"63px",backgroundColor:"gray.700",position:"absolute",top:"16px",left:"6px",zIndex:0}),(0,l.jsx)(r.xvT,{color:"gray.600",fontWeight:"500",fontSize:"sm",ml:2,children:t})]}),(0,l.jsx)(r.xvT,{cursor:"pointer",color:"link.900",fontWeight:"500",fontSize:"sm",ml:6,mb:7,onClick:()=>s(),children:"View log"})]})},E=e=>{let{subjectRequest:t}=e,{isOpen:n,onOpen:i,onClose:a}=(0,r.qY0)(),[o,c]=(0,h.useState)([]),[d,u]=(0,h.useState)(""),[x,p]=(0,h.useState)(!1),[g,j]=(0,h.useState)(""),[m,f]=(0,h.useState)(s.ERROR),{results:v}=t,y=v?Object.keys(v):[];(0,h.useEffect)(()=>{d&&v&&v[d]&&c(v[d])},[v,d]);let b=()=>{p(!1)},w=(e,t)=>{u(e),c(t),i()};return(0,l.jsxs)(r.xuv,{width:"100%",children:[v&&y.map((e,t)=>(0,l.jsx)(k,{entryKey:e,logs:v[e],isLast:t===y.length-1,onViewLog:()=>w(e,v[e])},e)),(0,l.jsx)(R,{isOpen:n,onClose:()=>{x&&b(),u(""),a()},currentLogs:o,isViewingError:x,errorMessage:g,currentStatus:m,onOpenErrorPanel:(e,t)=>{j(e),t&&f(t),p(!0)},onCloseErrorPanel:b})]})},T=n(14047),q=n(14207),A=n(90867),P=n(16134);let N=e=>Array.from(new Set(e.filter(e=>Object.values(x.Us).includes(e.action_type)).map(e=>e.action_type)));var I=e=>{let{rules:t}=e,n=N(t).map(e=>(0,m.kC)(e)).map(e=>e);return(0,l.jsx)(r.AntTypography.Text,{children:n.join(" - ")})},O=n(34090),z=n(55484),D=e=>{let{connectorName:t,data:n,isSubmitting:i=!1,onSaveClick:s}=e,{isOpen:a,onOpen:o,onClose:c}=(0,r.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({connection_key:n.connection_key,privacy_request_id:n.privacy_request_id,body:{...e}}),c()};return(0,l.jsxs)(l.Fragment,{children:[(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",children:"Review"}),!(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",type:"primary",children:"Begin manual input"}),(0,l.jsx)(O.J9,{enableReinitialize:!0,initialValues:{...n.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:z.Ry().shape({}),children:e=>(0,l.jsxs)(r.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{children:[(0,l.jsx)(r.cCv,{}),(0,l.jsxs)(r.OXI,{color:"gray.900",children:[(0,l.jsx)(r.xvT,{fontSize:"xl",mb:8,children:t}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xvT,{fontSize:"md",mt:"4",children:"Manual access"}),(0,l.jsx)(r.xuv,{mt:"8px",children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please complete the following PII fields that have been collected for the selected subject."})})]}),(0,l.jsx)(r.Ng0,{children:(0,l.jsx)(O.l0,{id:"manual-detail-form",noValidate:!0,children:(0,l.jsx)(r.gCW,{align:"stretch",gap:"16px",children:Object.entries(n.fields).map((e,t)=>{let[n]=e;return(0,l.jsx)(r.Ugi,{children:(0,l.jsx)(O.gN,{id:n,name:n,children:e=>{let{field:i}=e;return(0,l.jsxs)(r.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,l.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:n,w:"50%",children:n}),(0,l.jsx)(r.IIB,{...i,autoComplete:"off",color:"gray.700",placeholder:"Please enter ".concat(n),ref:0===t?d:void 0,size:"sm"})]})}})},n)})})})}),(0,l.jsx)(r.zeN,{justifyContent:"flex-start",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(r.wpx,{onClick:c,children:"Cancel"}),(0,l.jsx)(r.wpx,{form:"manual-detail-form",loading:i,htmlType:"submit",children:"Save"})]})})]})]})})]})},U=e=>{let{connectorName:t,data:n,isSubmitting:i=!1,onSaveClick:s}=e,{isOpen:a,onOpen:o,onClose:c}=(0,r.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({connection_key:n.connection_key,privacy_request_id:n.privacy_request_id,body:{...e}}),c()};return(0,l.jsxs)(l.Fragment,{children:[(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",children:"Review"}),!(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",type:"primary",children:"Begin manual input"}),(0,l.jsx)(O.J9,{enableReinitialize:!0,initialValues:{...n.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:z.Ry().shape({}),children:e=>(0,l.jsxs)(r.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{children:[(0,l.jsx)(r.cCv,{}),(0,l.jsxs)(r.OXI,{color:"gray.900",children:[(0,l.jsx)(r.xvT,{fontSize:"xl",mb:8,children:t}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xvT,{fontSize:"md",mt:"4",children:"Manual erasure"}),(0,l.jsx)(r.xuv,{mt:"8px",children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please delete the following PII fields associated with the selected subject if they are available. Once deleted, check the box to confirm the deletion."})})]}),(0,l.jsx)(r.Ng0,{children:(0,l.jsx)(O.l0,{id:"manual-detail-form",noValidate:!0,children:(0,l.jsx)(r.gCW,{align:"stretch",gap:"16px",children:Object.entries(n.fields).map(e=>{let[t]=e;return(0,l.jsx)(r.Ugi,{children:(0,l.jsx)(O.gN,{id:t,name:t,children:e=>{let{field:n}=e;return(0,l.jsxs)(r.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,l.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:t,w:"50%",children:t}),(0,l.jsx)(r.XZJ,{...n,isChecked:!!n.value,onChange:n.onChange,name:t,id:t})]})}})},t)})})})}),(0,l.jsx)(r.zeN,{justifyContent:"flex-start",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(r.wpx,{onClick:c,children:"Cancel"}),(0,l.jsx)(r.wpx,{form:"manual-detail-form",loading:i,htmlType:"submit",children:"Save"})]})})]})]})})]})};let M=(e,t,n)=>e.includes(x.Us.ACCESS)?{ProcessingDetailComponent:D,uploadMutation:t,getUploadedWebhookDataEndpoint:A.$I.endpoints.getUploadedManualAccessWebhookData}:e.includes(x.Us.ERASURE)?{ProcessingDetailComponent:U,uploadMutation:n,getUploadedWebhookDataEndpoint:A.$I.endpoints.getUploadedManualErasureWebhookData}:null;var W=e=>{let{subjectRequest:t,onComplete:n}=e,i=(0,P.T)(),{errorAlert:s,successAlert:a}=(0,T.V)(),{handleError:o}=(0,T.H)(),[c,d]=(0,h.useState)([]),[u,p]=(0,h.useState)(!1),[g,j]=(0,h.useState)(!1),{data:m,isFetching:f,isLoading:v,isSuccess:y}=(0,q.W6)(),[b]=(0,A.w3)(),R=N(t.policy.rules),[w]=(0,A.nL)(),[C]=(0,A.UR)(),{ProcessingDetailComponent:_,uploadMutation:S,getUploadedWebhookDataEndpoint:k}=M(R,w,C),E=async()=>{try{p(!0),await b(t.id).unwrap(),a("Manual request has been received. Request now processing."),n()}catch(e){o(e)}finally{p(!1)}},I=async e=>{try{j(!0),await S(e).unwrap();let t={connection_key:e.connection_key,fields:{}};Object.entries(e.body).forEach(e=>{let[n,i]=e;t.fields[n]=i||""});let n=c.map(e=>e.connection_key===t.connection_key?{...e,checked:!0,fields:{...t.fields}}:e);d(n),a("Manual input successfully saved!")}catch(e){o(e)}finally{j(!1)}};return((0,h.useEffect)(()=>(y&&m.length>0&&0===c.length&&(()=>{if(c.length>0)return;let e=[],n=null==m?void 0:m.map(e=>e.connection_config.key);null==n||n.every(n=>e.push(i(k.initiate({connection_key:n,privacy_request_id:t.id})))),Promise.allSettled(e).then(e=>{let t=[];e.forEach((e,n)=>{if("fulfilled"===e.status&&e.value.isSuccess&&e.value.data){let n={checked:e.value.data.checked,fields:{},connection_key:e.value.originalArgs.connection_key,privacy_request_id:e.value.originalArgs.privacy_request_id};Object.entries(e.value.data.fields).forEach(e=>{let[t,i]=e;n.fields[t]=i||""}),t.push(n)}else s("An error occurred while loading manual input data for ".concat(m[n].connection_config.name))}),d(t)})})(),()=>{}),[m,c.length,i,s,y,t.id,k]),R.includes(x.Us.ACCESS)||R.includes(x.Us.ERASURE))?(0,l.jsxs)(r.gCW,{align:"stretch",spacing:8,children:[(0,l.jsx)(r.xuv,{children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",children:"The following table details the integrations that require manual input from you."})}),(0,l.jsxs)(r.xuv,{children:[(f||v)&&(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.$jN,{})}),y&&m?(0,l.jsx)(r.xJi,{children:(0,l.jsxs)(r.iA_,{size:"sm",variant:"unstyled",children:[(0,l.jsx)(r.hrZ,{children:(0,l.jsxs)(r.Tr,{children:[(0,l.jsx)(r.Th,{fontSize:"sm",fontWeight:"semibold",pl:"0",textTransform:"none",children:"Integration Identifier"}),(0,l.jsx)(r.Th,{})]})}),(0,l.jsxs)(r.p3B,{children:[m.length>0&&m.map(e=>(0,l.jsxs)(r.Tr,{display:"block",children:[(0,l.jsx)(r.Td,{pl:"0",children:e.connection_config.key}),(0,l.jsx)(r.Td,{children:c.length>0?(0,l.jsx)(_,{connectorName:e.connection_config.name,data:c.find(t=>t.connection_key===e.connection_config.key),isSubmitting:g,onSaveClick:I}):null})]},e.id)),0===m.length&&(0,l.jsx)(r.Tr,{children:(0,l.jsx)(r.Td,{colSpan:3,pl:"0",children:(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.xvT,{children:"You don‘t have any Manual Process connections set up yet."})})})})]}),c.length>0&&c.every(e=>e.checked)?(0,l.jsx)(r.$RU,{children:(0,l.jsx)(r.Tr,{children:(0,l.jsx)(r.Th,{pl:"0px",children:(0,l.jsx)(r.wpx,{type:"primary",loading:u,onClick:E,className:"mt-2",children:"Complete DSR"})})})}):null]})}):null]})]}):null},L=n(8557),F=e=>{let{daysLeft:t,includeText:n,status:i}=e;if(!t||i===L.q.COMPLETE||i===L.q.CANCELED||i===L.q.DENIED||i===L.q.IDENTITY_UNVERIFIED)return(0,l.jsx)("span",{children:"-"});let s="";switch(!0){case t>=10:s="success";break;case t<10&&t>4:s="warning";break;case t<5:s="error"}return(0,l.jsx)(r.j8w,{color:s,children:n?"".concat(t," days left"):t})},B=n(25980);let V={approved:{color:"success",label:"Approved"},complete:{color:"success",label:"Completed"},awaiting_email_send:{color:"marble",label:"Awaiting Email Send"},denied:{color:"warning",label:"Denied"},canceled:{color:"marble",label:"Canceled"},error:{color:"error",label:"Error"},in_processing:{color:"caution",label:"In Progress"},paused:{color:"marble",label:"Paused"},pending:{color:"info",label:"New"},identity_unverified:{color:"marble",label:"Unverified"},requires_input:{color:"alert",label:"Requires Input"}};var Y=e=>{let{status:t}=e;return(0,l.jsx)(r.j8w,{color:V[t].color,className:"justify-center","data-testid":"request-status-badge",children:V[t].label})},X=n(15709),Z=n.n(X),H=e=>{let{label:t,children:n}=e;return(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)("div",{className:"shrink-0 grow-0 basis-1/2 pr-2 ".concat(Z().label),children:(0,l.jsxs)(r.AntTypography.Text,{children:[t,":"]})}),(0,l.jsx)("div",{className:"min-w-0 shrink grow ".concat(Z().value),"data-testid":"request-detail-value-".concat(t),children:n})]})},G=e=>{let{subjectRequest:t}=e,{custom_privacy_request_fields:n}=t;return(0,l.jsx)("div",{className:"flex flex-col gap-2",children:n&&Object.keys(n).length>0&&Object.entries(n).filter(e=>{let[,t]=e;return t.value}).map(e=>{let[t,n]=e;return(0,l.jsx)(H,{label:n.label,children:(0,l.jsx)(r.AntTypography.Text,{children:Array.isArray(n.value)?n.value.join(", "):n.value})},t)})})},J=e=>{let{subjectRequest:t}=e,{plus:n}=(0,B.hz)(),{id:i,status:s,policy:a,identity:o,identity_verified_at:c}=t;return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-6",children:(0,l.jsx)(r.AntTypography.Title,{level:2,children:"Request details"})}),(0,l.jsxs)(r.jqI,{vertical:!0,gap:12,className:"mb-6",children:[(0,l.jsx)(H,{label:"Status",children:(0,l.jsx)(Y,{status:s})}),(0,l.jsx)(H,{label:"Time remaining",children:(0,l.jsx)(F,{daysLeft:t.days_left,includeText:!0,status:t.status})}),(0,l.jsx)(H,{label:"Request type",children:(0,l.jsx)(I,{rules:a.rules})}),(0,l.jsx)(H,{label:"Source",children:n&&(0,l.jsx)(r.AntTypography.Text,{children:t.source||"-"})}),Object.entries(o).filter(e=>{let[,{value:t}]=e;return null!==t}).map(e=>{let[t,{value:n="",label:i}]=e,s="".concat(n).concat(c?"":" (Unverified)");return(0,l.jsx)(H,{label:"Subject ".concat(i.toLocaleLowerCase()),children:(0,l.jsx)(r.esZ,{title:s,trigger:"click",children:(0,l.jsx)(r.AntTypography.Text,{ellipsis:!0,children:s})})},t)}),(0,l.jsx)(G,{subjectRequest:t})]}),(0,l.jsxs)(r.PPS,{layout:"vertical",children:[(0,l.jsx)(r.PPS.Item,{label:"Request ID:",className:"mb-4",children:(0,l.jsxs)(r.jqI,{gap:1,children:[(0,l.jsx)(r.uFc,{readOnly:!0,value:i,"data-testid":"request-detail-value-id"}),(0,l.jsx)(p.Z,{copyText:i,size:"small"})]})}),(0,l.jsx)(r.PPS.Item,{label:"Policy key:",className:"mb-4",children:(0,l.jsx)(r.uFc,{readOnly:!0,value:t.policy.key,"data-testid":"request-detail-value-policy"})})]})]})},K=e=>{var t;let{data:n}=e,i=(0,h.useMemo)(()=>({id:n.id,verbose:!0}),[n.id]),{data:s}=(0,u.QA)(i,{pollingInterval:n.status===x.q2.APPROVED||n.status===x.q2.IN_PROCESSING?2e3:0,skip:!n.id}),a=null!==(t=null==s?void 0:s.items[0])&&void 0!==t?t:n,o=a.status===x.q2.REQUIRES_INPUT,[c,d]=(0,h.useState)(o?"manual-steps":"activity"),p=(0,h.useMemo)(()=>[{key:"activity",label:"Activity",children:(0,l.jsx)(E,{subjectRequest:a})},{key:"manual-steps",label:"Manual steps",children:(0,l.jsx)(W,{subjectRequest:a,onComplete:()=>d("activity")}),disabled:!o}],[o,a]);return(0,l.jsxs)("div",{className:"flex gap-8",children:[(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.A5g,{items:p,activeKey:c,onChange:d})}),(0,l.jsx)("div",{className:"w-[432px]","data-testid":"privacy-request-details",children:(0,l.jsx)(J,{subjectRequest:a})})]})},$=n(57526),Q=n(66548),ee=n(45489),et=e=>{let{privacyRequest:t,action:n}=e,{handleApproveRequest:i,handleDenyRequest:s}=(0,ee.Z)({subjectRequest:t}),l=t.status===x.q2.PENDING,a=(0,r.qY0)(),o=async e=>{let{reason:t}=e,l=r.sYd.loading({content:"approve"===n?"Approving request...":"Denying request..."});"deny"===n&&await s(t),"approve"===n&&await i(),l()};return{showAction:l,closeModal:a.onClose,performAction:o,openConfirmationModal:a.onOpen,isModalOpen:a.isOpen}},en=n(812),ei=n(19904),es=e=>{var t,n,i;let{privacyRequest:s}=e,l=null===(n=(0,B.hz)())||void 0===n?void 0:null===(t=n.flags)||void 0===t?void 0:t.downloadAccessRequestResults,r=s.status===x.q2.COMPLETE,a=N(s.policy.rules).includes(x.Us.ACCESS),o=(0,ei.Tg)([x.Sh.PRIVACY_REQUEST_ACCESS_RESULTS_READ]),{data:c,isLoading:d,isError:u,error:h}=(0,A.br)({privacy_request_id:s.id}),p=null!==(i=null==c?void 0:c.access_result_urls[0])&&void 0!==i?i:"",g=!!p&&"your local fides_uploads folder"!==p,j=null;return u?j=(0,en.e$)(h,"Unable to resolve download URL"):g||(j="Requests stored locally cannot be downloaded"),{showDownloadResults:l&&o&&a&&r,downloadResults:()=>{let e=document.createElement("a");e.href=p,e.target="_blank",e.rel="noopener noreferrer",e.click(),e.remove()},infoTooltip:j,isLoading:d,isDisabled:!g}},el=e=>{let{privacyRequest:t}=e,{errorAlert:n,successAlert:i}=(0,T.V)(),s=t.status===x.q2.ERROR,[l]=(0,A.Fq)();return{reprocessPrivacyRequest:async()=>{if(!t)return;let e=r.sYd.loading("Reprocessing privacy request...",0),s=await l(t);"error"in s?n((0,en.e$)(s.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):i("Privacy request is now being reprocessed."),e()},showReprocess:s}},er=e=>{let{privacyRequest:t}=e,{showDownloadResults:n,downloadResults:i,infoTooltip:s,isDisabled:a}=es({privacyRequest:t}),{isModalOpen:o,closeModal:c,performAction:d,openConfirmationModal:u,showAction:x}=et({privacyRequest:t,action:"approve"}),{isModalOpen:p,closeModal:g,performAction:j,openConfirmationModal:m,showAction:f}=et({privacyRequest:t,action:"deny"}),{reprocessPrivacyRequest:v,showReprocess:y}=el({privacyRequest:t}),b=(0,h.useMemo)(()=>{let e=[];return e.push({key:"approve",label:(0,l.jsx)("span",{"data-testid":"privacy-request-approve-btn",children:"Approve"}),onClick:u,disabled:!x}),e.push({key:"deny",label:(0,l.jsx)("span",{"data-testid":"privacy-request-deny-btn",children:"Deny"}),onClick:m,disabled:!f}),e.push({key:"reprocess",label:(0,l.jsx)("span",{"data-testid":"privacy-request-action-reprocess",children:"Reprocess"}),onClick:v,disabled:!y}),n&&e.push({key:"download",label:(0,l.jsx)(r.esZ,{title:a?s:null,placement:"bottom",children:(0,l.jsx)("span",{"data-testid":"download-results-btn",children:"Download request results"})}),onClick:i,disabled:a}),e},[n,i,s,a,x,f,u,m,y,v]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.S0p,{menu:{items:b},trigger:["click"],overlayStyle:{minWidth:"160px"},children:(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.PJP.pO,{}),"data-testid":"privacy-request-actions-dropdown-btn",iconPosition:"end",type:"primary",disabled:!b.length,size:"large",children:"Actions"})}),(0,l.jsx)($.Z,{isOpen:o,isLoading:!1,onClose:c,onApproveRequest:()=>d({reason:""}),subjectRequest:t}),(0,l.jsx)(Q.Z,{isOpen:p,onClose:g,onDenyRequest:e=>j({reason:e})})]})},ea=()=>{let e=(0,a.useRouter)().query.id,{data:t,isLoading:n}=(0,u.QA)({id:e,verbose:!0},{skip:!e}),i=(null==t?void 0:t.items[0])||null;return(0,l.jsxs)(o.Z,{title:"Privacy Request - ".concat(e),children:[(0,l.jsx)(d.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Request details"}],rightContent:!!i&&(0,l.jsx)(er,{privacyRequest:i})}),n&&(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.$jN,{})}),!n&&!i&&(0,l.jsx)(r.xvT,{children:"404 no privacy request found"}),!n&&i&&(0,l.jsx)(K,{data:i})]})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return r},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return d},hE:function(){return a},oK:function(){return l}});var i=n(76649);let s=e=>"error"in e,l=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,r=e=>(0,i.Ln)({status:"number",data:{}},e),a=e=>(0,i.Ln)({detail:"string"},e),o=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},15709:function(e){e.exports={value:"RequestDetailsRow_value__WMXn3",label:"RequestDetailsRow_label__dn3CQ"}},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>l(e,t),s=Symbol("SOME"),l=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>l(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>l(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>l(n,t[e]));class r{static narrow(e){return new r(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof r?e.NF:e instanceof Function?e:t=>i(e,t);return new r(e=>t(e)&&n(e))}}new r(e=>!0)}},function(e){e.O(0,[8433,2888,9774,179],function(){return e(e.s=6554)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9650],{6554:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/[id]",function(){return n(93299)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var i=n(24246),s=n(77181),l=n(88038),r=n.n(l),a=n(86677);n(27378);var o=n(25980),c=n(90867),d=n(77830),u=()=>{let e=(0,a.useRouter)();return(0,i.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,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:n,padded:l=!0,mainProps:d}=e,h=(0,o.hz)(),x=(0,a.useRouter)(),p="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,g=!(h.flags.privacyRequestsConfiguration&&p),{data:j}=(0,c.JE)(void 0,{skip:g}),{data:m}=(0,c.PW)(void 0,{skip:g}),f=h.flags.privacyRequestsConfiguration&&(!j||!m)&&p;return(0,i.jsxs)(s.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(s.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[f?(0,i.jsx)(u,{}):null,t]})]})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return l.D4},MM:function(){return h},Ot:function(){return c},c6:function(){return s},cj:function(){return p},e$:function(){return a},fn:function(){return o},iC:function(){return x},nU:function(){return u},tB:function(){return d}});var i,s,l=n(19043);let r="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;if((0,l.Bw)(e)){if((0,l.hE)(e.data))return e.data.detail;if((0,l.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,l.Dy)(e.data)||404===e.status&&(0,l.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:r};if((0,l.oK)(e))return{status:e.originalStatus,message:e.data};if((0,l.Bw)(e)){let{status:n}=e;return{status:n,message:a(e,t.message)}}return t},h=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=s||(s={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},93299:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ea}});var i,s,l=n(24246),r=n(77181),a=n(86677),o=n(77213),c=n(77830),d=n(58754),u=n(99716),h=n(27378),x=n(21702);(i=s||(s={})).IN_PROCESSING="in_processing",i.PENDING="pending",i.COMPLETE="complete",i.ERROR="error",i.PAUSED="paused",i.RETRYING="retrying",i.SKIPPED="skipped";var p=n(88340);let g=e=>{switch(e){case s.SKIPPED:return"warning";case s.ERROR:default:return"error"}};var j=e=>{let{errorMessage:t,status:n=s.ERROR}=e;return(0,l.jsxs)(r.xuv,{height:"100%",id:"outer",children:[(0,l.jsxs)(r.kCb,{alignItems:"center",paddingBottom:"8px",children:[(0,l.jsx)(r.xvT,{size:"sm",color:"gray.700",fontWeight:"medium",marginRight:"8px",lineHeight:"20px",children:"Status"}),(0,l.jsx)(r.j8w,{color:g(n),children:n}),(0,l.jsx)(r.xuv,{padding:"0px",marginBottom:"3px",children:(0,l.jsx)(p.Z,{copyText:t})})]}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xuv,{id:"errorWrapper",overflow:"auto",height:"100%",children:(0,l.jsx)(r.xvT,{children:t})})]})},m=n(16394),f=n(3124),v=n.n(f);let y=e=>{switch(e){case x.Us.ACCESS:return"Data Retrieval";case x.Us.ERASURE:return"Data Deletion";case x.Us.CONSENT:return"Consent";case x.Us.UPDATE:return"Data Update";default:return e}};var b=e=>{let{eventLogs:t,openErrorPanel:n}=e,i=null==t?void 0:t.map(e=>(0,l.jsxs)(r.Tr,{_hover:{backgroundColor:e.status===s.ERROR||e.status===s.SKIPPED&&e.message?v().FIDESUI_NEUTRAL_50:"unset"},onClick:()=>{(e.status===s.ERROR||e.status===s.SKIPPED&&e.message)&&n(e.message,e.status)},style:{cursor:e.status===s.ERROR||e.status===s.SKIPPED&&e.message?"pointer":"unset"},children:[(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:(0,m.p6)(e.updated_at)})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:y(e.action_type)})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.status})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.collection_name})})]},e.updated_at));return(0,l.jsx)(r.xuv,{width:"100%",paddingTop:"0px",height:"100%",children:(0,l.jsx)(r.xJi,{id:"tableContainer",height:"100%",style:{overflowY:"auto"},children:(0,l.jsxs)(r.iA_,{size:"sm",id:"table",position:"relative",children:[(0,l.jsx)(r.hrZ,{id:"tableHeader",position:"sticky",top:"0px",backgroundColor:"white",children:(0,l.jsxs)(r.Tr,{children:[(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Time"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Action Type"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Status"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Collection"})})]})}),(0,l.jsx)(r.p3B,{id:"tableBody",children:i})]})})})},R=e=>{let{isOpen:t,onClose:n,currentLogs:i,isViewingError:a,errorMessage:o,currentStatus:c=s.ERROR,onCloseErrorPanel:d,onOpenErrorPanel:u}=e;return(0,l.jsxs)(r.dys,{isOpen:t,placement:"right",onClose:n,size:"full",autoFocus:!1,children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{style:{width:"50%"},children:[(0,l.jsx)(r.OXI,{style:{paddingBottom:"0px"},children:(0,l.jsxs)(r.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:[(0,l.jsxs)(r.kCb,{alignItems:"center",children:[a&&(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.Rpv,{}),"aria-label":"Close error logs",size:"small",onClick:d}),(0,l.jsx)(r.xvT,{color:"gray.900",fontSize:"md",lineHeight:"6",fontWeight:"medium",ml:1,children:a?"Event detail":"Event log"})]}),(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.LGN,{width:"17px"}),"aria-label":"Stop viewing error message",size:"small",onClick:n})]})}),(0,l.jsxs)(r.Ng0,{id:"drawerBody",overflow:"hidden",children:[i&&!a?(0,l.jsx)(b,{eventLogs:i,openErrorPanel:u}):null,a?(0,l.jsx)(j,{errorMessage:o,status:c}):null]})]})]})};let w=(e,t)=>{if(0===e.length)return!1;let n=Array.from(e).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime());if(!n[0].collection_name)return n[0].status===t;let i={};return n.forEach(e=>{e.collection_name&&!i[e.collection_name]&&(i[e.collection_name]=e)}),Object.values(i).some(e=>e.status===t)},C=e=>w(e,s.ERROR),_=e=>w(e,s.SKIPPED),S=e=>C(e)?(0,l.jsx)(r.f9v,{}):_(e)?(0,l.jsx)(r.XXw,{}):(0,l.jsx)(r.StI,{});var k=e=>{let{entryKey:t,logs:n,isLast:i,onViewLog:s}=e;return(0,l.jsxs)(r.xuv,{children:[(0,l.jsxs)(r.kCb,{alignItems:"center",height:23,position:"relative",children:[(0,l.jsx)(r.xuv,{zIndex:1,children:S(n)}),!i&&(0,l.jsx)(r.xuv,{width:"2px",height:"63px",backgroundColor:"gray.700",position:"absolute",top:"16px",left:"6px",zIndex:0}),(0,l.jsx)(r.xvT,{color:"gray.600",fontWeight:"500",fontSize:"sm",ml:2,children:t})]}),(0,l.jsx)(r.xvT,{cursor:"pointer",color:"link.900",fontWeight:"500",fontSize:"sm",ml:6,mb:7,onClick:()=>s(),children:"View log"})]})},E=e=>{let{subjectRequest:t}=e,{isOpen:n,onOpen:i,onClose:a}=(0,r.qY0)(),[o,c]=(0,h.useState)([]),[d,u]=(0,h.useState)(""),[x,p]=(0,h.useState)(!1),[g,j]=(0,h.useState)(""),[m,f]=(0,h.useState)(s.ERROR),{results:v}=t,y=v?Object.keys(v):[];(0,h.useEffect)(()=>{d&&v&&v[d]&&c(v[d])},[v,d]);let b=()=>{p(!1)},w=(e,t)=>{u(e),c(t),i()};return(0,l.jsxs)(r.xuv,{width:"100%",children:[v&&y.map((e,t)=>(0,l.jsx)(k,{entryKey:e,logs:v[e],isLast:t===y.length-1,onViewLog:()=>w(e,v[e])},e)),(0,l.jsx)(R,{isOpen:n,onClose:()=>{x&&b(),u(""),a()},currentLogs:o,isViewingError:x,errorMessage:g,currentStatus:m,onOpenErrorPanel:(e,t)=>{j(e),t&&f(t),p(!0)},onCloseErrorPanel:b})]})},T=n(14047),q=n(14207),A=n(90867),P=n(16134);let N=e=>Array.from(new Set(e.filter(e=>Object.values(x.Us).includes(e.action_type)).map(e=>e.action_type)));var I=e=>{let{rules:t}=e,n=N(t).map(e=>(0,m.kC)(e)).map(e=>e);return(0,l.jsx)(r.AntTypography.Text,{children:n.join(" - ")})},O=n(34090),z=n(55484),D=e=>{let{connectorName:t,data:n,isSubmitting:i=!1,onSaveClick:s}=e,{isOpen:a,onOpen:o,onClose:c}=(0,r.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({connection_key:n.connection_key,privacy_request_id:n.privacy_request_id,body:{...e}}),c()};return(0,l.jsxs)(l.Fragment,{children:[(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",children:"Review"}),!(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",type:"primary",children:"Begin manual input"}),(0,l.jsx)(O.J9,{enableReinitialize:!0,initialValues:{...n.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:z.Ry().shape({}),children:e=>(0,l.jsxs)(r.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{children:[(0,l.jsx)(r.cCv,{}),(0,l.jsxs)(r.OXI,{color:"gray.900",children:[(0,l.jsx)(r.xvT,{fontSize:"xl",mb:8,children:t}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xvT,{fontSize:"md",mt:"4",children:"Manual access"}),(0,l.jsx)(r.xuv,{mt:"8px",children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please complete the following PII fields that have been collected for the selected subject."})})]}),(0,l.jsx)(r.Ng0,{children:(0,l.jsx)(O.l0,{id:"manual-detail-form",noValidate:!0,children:(0,l.jsx)(r.gCW,{align:"stretch",gap:"16px",children:Object.entries(n.fields).map((e,t)=>{let[n]=e;return(0,l.jsx)(r.Ugi,{children:(0,l.jsx)(O.gN,{id:n,name:n,children:e=>{let{field:i}=e;return(0,l.jsxs)(r.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,l.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:n,w:"50%",children:n}),(0,l.jsx)(r.IIB,{...i,autoComplete:"off",color:"gray.700",placeholder:"Please enter ".concat(n),ref:0===t?d:void 0,size:"sm"})]})}})},n)})})})}),(0,l.jsx)(r.zeN,{justifyContent:"flex-start",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(r.wpx,{onClick:c,children:"Cancel"}),(0,l.jsx)(r.wpx,{form:"manual-detail-form",loading:i,htmlType:"submit",children:"Save"})]})})]})]})})]})},U=e=>{let{connectorName:t,data:n,isSubmitting:i=!1,onSaveClick:s}=e,{isOpen:a,onOpen:o,onClose:c}=(0,r.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({connection_key:n.connection_key,privacy_request_id:n.privacy_request_id,body:{...e}}),c()};return(0,l.jsxs)(l.Fragment,{children:[(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",children:"Review"}),!(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",type:"primary",children:"Begin manual input"}),(0,l.jsx)(O.J9,{enableReinitialize:!0,initialValues:{...n.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:z.Ry().shape({}),children:e=>(0,l.jsxs)(r.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{children:[(0,l.jsx)(r.cCv,{}),(0,l.jsxs)(r.OXI,{color:"gray.900",children:[(0,l.jsx)(r.xvT,{fontSize:"xl",mb:8,children:t}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xvT,{fontSize:"md",mt:"4",children:"Manual erasure"}),(0,l.jsx)(r.xuv,{mt:"8px",children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please delete the following PII fields associated with the selected subject if they are available. Once deleted, check the box to confirm the deletion."})})]}),(0,l.jsx)(r.Ng0,{children:(0,l.jsx)(O.l0,{id:"manual-detail-form",noValidate:!0,children:(0,l.jsx)(r.gCW,{align:"stretch",gap:"16px",children:Object.entries(n.fields).map(e=>{let[t]=e;return(0,l.jsx)(r.Ugi,{children:(0,l.jsx)(O.gN,{id:t,name:t,children:e=>{let{field:n}=e;return(0,l.jsxs)(r.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,l.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:t,w:"50%",children:t}),(0,l.jsx)(r.XZJ,{...n,isChecked:!!n.value,onChange:n.onChange,name:t,id:t})]})}})},t)})})})}),(0,l.jsx)(r.zeN,{justifyContent:"flex-start",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(r.wpx,{onClick:c,children:"Cancel"}),(0,l.jsx)(r.wpx,{form:"manual-detail-form",loading:i,htmlType:"submit",children:"Save"})]})})]})]})})]})};let M=(e,t,n)=>e.includes(x.Us.ACCESS)?{ProcessingDetailComponent:D,uploadMutation:t,getUploadedWebhookDataEndpoint:A.$I.endpoints.getUploadedManualAccessWebhookData}:e.includes(x.Us.ERASURE)?{ProcessingDetailComponent:U,uploadMutation:n,getUploadedWebhookDataEndpoint:A.$I.endpoints.getUploadedManualErasureWebhookData}:null;var W=e=>{let{subjectRequest:t,onComplete:n}=e,i=(0,P.T)(),{errorAlert:s,successAlert:a}=(0,T.V)(),{handleError:o}=(0,T.H)(),[c,d]=(0,h.useState)([]),[u,p]=(0,h.useState)(!1),[g,j]=(0,h.useState)(!1),{data:m,isFetching:f,isLoading:v,isSuccess:y}=(0,q.W6)(),[b]=(0,A.w3)(),R=N(t.policy.rules),[w]=(0,A.nL)(),[C]=(0,A.UR)(),{ProcessingDetailComponent:_,uploadMutation:S,getUploadedWebhookDataEndpoint:k}=M(R,w,C),E=async()=>{try{p(!0),await b(t.id).unwrap(),a("Manual request has been received. Request now processing."),n()}catch(e){o(e)}finally{p(!1)}},I=async e=>{try{j(!0),await S(e).unwrap();let t={connection_key:e.connection_key,fields:{}};Object.entries(e.body).forEach(e=>{let[n,i]=e;t.fields[n]=i||""});let n=c.map(e=>e.connection_key===t.connection_key?{...e,checked:!0,fields:{...t.fields}}:e);d(n),a("Manual input successfully saved!")}catch(e){o(e)}finally{j(!1)}};return((0,h.useEffect)(()=>(y&&m.length>0&&0===c.length&&(()=>{if(c.length>0)return;let e=[],n=null==m?void 0:m.map(e=>e.connection_config.key);null==n||n.every(n=>e.push(i(k.initiate({connection_key:n,privacy_request_id:t.id})))),Promise.allSettled(e).then(e=>{let t=[];e.forEach((e,n)=>{if("fulfilled"===e.status&&e.value.isSuccess&&e.value.data){let n={checked:e.value.data.checked,fields:{},connection_key:e.value.originalArgs.connection_key,privacy_request_id:e.value.originalArgs.privacy_request_id};Object.entries(e.value.data.fields).forEach(e=>{let[t,i]=e;n.fields[t]=i||""}),t.push(n)}else s("An error occurred while loading manual input data for ".concat(m[n].connection_config.name))}),d(t)})})(),()=>{}),[m,c.length,i,s,y,t.id,k]),R.includes(x.Us.ACCESS)||R.includes(x.Us.ERASURE))?(0,l.jsxs)(r.gCW,{align:"stretch",spacing:8,children:[(0,l.jsx)(r.xuv,{children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",children:"The following table details the integrations that require manual input from you."})}),(0,l.jsxs)(r.xuv,{children:[(f||v)&&(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.$jN,{})}),y&&m?(0,l.jsx)(r.xJi,{children:(0,l.jsxs)(r.iA_,{size:"sm",variant:"unstyled",children:[(0,l.jsx)(r.hrZ,{children:(0,l.jsxs)(r.Tr,{children:[(0,l.jsx)(r.Th,{fontSize:"sm",fontWeight:"semibold",pl:"0",textTransform:"none",children:"Integration Identifier"}),(0,l.jsx)(r.Th,{})]})}),(0,l.jsxs)(r.p3B,{children:[m.length>0&&m.map(e=>(0,l.jsxs)(r.Tr,{display:"block",children:[(0,l.jsx)(r.Td,{pl:"0",children:e.connection_config.key}),(0,l.jsx)(r.Td,{children:c.length>0?(0,l.jsx)(_,{connectorName:e.connection_config.name,data:c.find(t=>t.connection_key===e.connection_config.key),isSubmitting:g,onSaveClick:I}):null})]},e.id)),0===m.length&&(0,l.jsx)(r.Tr,{children:(0,l.jsx)(r.Td,{colSpan:3,pl:"0",children:(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.xvT,{children:"You don‘t have any Manual Process connections set up yet."})})})})]}),c.length>0&&c.every(e=>e.checked)?(0,l.jsx)(r.$RU,{children:(0,l.jsx)(r.Tr,{children:(0,l.jsx)(r.Th,{pl:"0px",children:(0,l.jsx)(r.wpx,{type:"primary",loading:u,onClick:E,className:"mt-2",children:"Complete DSR"})})})}):null]})}):null]})]}):null},L=n(8557),F=e=>{let{daysLeft:t,includeText:n,status:i}=e;if(!t||i===L.q.COMPLETE||i===L.q.CANCELED||i===L.q.DENIED||i===L.q.IDENTITY_UNVERIFIED)return(0,l.jsx)("span",{children:"-"});let s="";switch(!0){case t>=10:s="success";break;case t<10&&t>4:s="warning";break;case t<5:s="error"}return(0,l.jsx)(r.j8w,{color:s,children:n?"".concat(t," days left"):t})},B=n(25980);let V={approved:{color:"success",label:"Approved"},complete:{color:"success",label:"Completed"},awaiting_email_send:{color:"marble",label:"Awaiting Email Send"},denied:{color:"warning",label:"Denied"},canceled:{color:"marble",label:"Canceled"},error:{color:"error",label:"Error"},in_processing:{color:"caution",label:"In Progress"},paused:{color:"marble",label:"Paused"},pending:{color:"info",label:"New"},identity_unverified:{color:"marble",label:"Unverified"},requires_input:{color:"alert",label:"Requires Input"}};var Y=e=>{let{status:t}=e;return(0,l.jsx)(r.j8w,{color:V[t].color,className:"justify-center","data-testid":"request-status-badge",children:V[t].label})},X=n(15709),Z=n.n(X),H=e=>{let{label:t,children:n}=e;return(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)("div",{className:"shrink-0 grow-0 basis-1/2 pr-2 ".concat(Z().label),children:(0,l.jsxs)(r.AntTypography.Text,{children:[t,":"]})}),(0,l.jsx)("div",{className:"min-w-0 shrink grow ".concat(Z().value),"data-testid":"request-detail-value-".concat(t),children:n})]})},G=e=>{let{subjectRequest:t}=e,{custom_privacy_request_fields:n}=t;return(0,l.jsx)("div",{className:"flex flex-col gap-2",children:n&&Object.keys(n).length>0&&Object.entries(n).filter(e=>{let[,t]=e;return t.value}).map(e=>{let[t,n]=e;return(0,l.jsx)(H,{label:n.label,children:(0,l.jsx)(r.AntTypography.Text,{children:Array.isArray(n.value)?n.value.join(", "):n.value})},t)})})},J=e=>{let{subjectRequest:t}=e,{plus:n}=(0,B.hz)(),{id:i,status:s,policy:a,identity:o,identity_verified_at:c}=t;return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-6",children:(0,l.jsx)(r.AntTypography.Title,{level:2,children:"Request details"})}),(0,l.jsxs)(r.jqI,{vertical:!0,gap:12,className:"mb-6",children:[(0,l.jsx)(H,{label:"Status",children:(0,l.jsx)(Y,{status:s})}),(0,l.jsx)(H,{label:"Time remaining",children:(0,l.jsx)(F,{daysLeft:t.days_left,includeText:!0,status:t.status})}),(0,l.jsx)(H,{label:"Request type",children:(0,l.jsx)(I,{rules:a.rules})}),(0,l.jsx)(H,{label:"Source",children:n&&(0,l.jsx)(r.AntTypography.Text,{children:t.source||"-"})}),Object.entries(o).filter(e=>{let[,{value:t}]=e;return null!==t}).map(e=>{let[t,{value:n="",label:i}]=e,s="".concat(n).concat(c?"":" (Unverified)");return(0,l.jsx)(H,{label:"Subject ".concat(i.toLocaleLowerCase()),children:(0,l.jsx)(r.esZ,{title:s,trigger:"click",children:(0,l.jsx)(r.AntTypography.Text,{ellipsis:!0,children:s})})},t)}),(0,l.jsx)(G,{subjectRequest:t})]}),(0,l.jsxs)(r.PPS,{layout:"vertical",children:[(0,l.jsx)(r.PPS.Item,{label:"Request ID:",className:"mb-4",children:(0,l.jsxs)(r.jqI,{gap:1,children:[(0,l.jsx)(r.uFc,{readOnly:!0,value:i,"data-testid":"request-detail-value-id"}),(0,l.jsx)(p.Z,{copyText:i,size:"small"})]})}),(0,l.jsx)(r.PPS.Item,{label:"Policy key:",className:"mb-4",children:(0,l.jsx)(r.uFc,{readOnly:!0,value:t.policy.key,"data-testid":"request-detail-value-policy"})})]})]})},K=e=>{var t;let{data:n}=e,i=(0,h.useMemo)(()=>({id:n.id,verbose:!0}),[n.id]),{data:s}=(0,u.QA)(i,{pollingInterval:n.status===x.q2.APPROVED||n.status===x.q2.IN_PROCESSING?2e3:0,skip:!n.id}),a=null!==(t=null==s?void 0:s.items[0])&&void 0!==t?t:n,o=a.status===x.q2.REQUIRES_INPUT,[c,d]=(0,h.useState)(o?"manual-steps":"activity"),p=(0,h.useMemo)(()=>[{key:"activity",label:"Activity",children:(0,l.jsx)(E,{subjectRequest:a})},{key:"manual-steps",label:"Manual steps",children:(0,l.jsx)(W,{subjectRequest:a,onComplete:()=>d("activity")}),disabled:!o}],[o,a]);return(0,l.jsxs)("div",{className:"flex gap-8",children:[(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.A5g,{items:p,activeKey:c,onChange:d})}),(0,l.jsx)("div",{className:"w-[432px]","data-testid":"privacy-request-details",children:(0,l.jsx)(J,{subjectRequest:a})})]})},$=n(57526),Q=n(66548),ee=n(45489),et=e=>{let{privacyRequest:t,action:n}=e,{handleApproveRequest:i,handleDenyRequest:s}=(0,ee.Z)({subjectRequest:t}),l=t.status===x.q2.PENDING,a=(0,r.qY0)(),o=async e=>{let{reason:t}=e,l=r.sYd.loading({content:"approve"===n?"Approving request...":"Denying request..."});"deny"===n&&await s(t),"approve"===n&&await i(),l()};return{showAction:l,closeModal:a.onClose,performAction:o,openConfirmationModal:a.onOpen,isModalOpen:a.isOpen}},en=n(812),ei=n(19904),es=e=>{var t,n,i;let{privacyRequest:s}=e,l=null===(n=(0,B.hz)())||void 0===n?void 0:null===(t=n.flags)||void 0===t?void 0:t.downloadAccessRequestResults,r=s.status===x.q2.COMPLETE,a=N(s.policy.rules).includes(x.Us.ACCESS),o=(0,ei.Tg)([x.Sh.PRIVACY_REQUEST_ACCESS_RESULTS_READ]),{data:c,isLoading:d,isError:u,error:h}=(0,A.br)({privacy_request_id:s.id}),p=null!==(i=null==c?void 0:c.access_result_urls[0])&&void 0!==i?i:"",g=!!p&&"your local fides_uploads folder"!==p,j=null;return u?j=(0,en.e$)(h,"Unable to resolve download URL"):g||(j="Requests stored locally cannot be downloaded"),{showDownloadResults:l&&o&&a&&r,downloadResults:()=>{let e=document.createElement("a");e.href=p,e.target="_blank",e.rel="noopener noreferrer",e.click(),e.remove()},infoTooltip:j,isLoading:d,isDisabled:!g}},el=e=>{let{privacyRequest:t}=e,{errorAlert:n,successAlert:i}=(0,T.V)(),s=t.status===x.q2.ERROR,[l]=(0,A.Fq)();return{reprocessPrivacyRequest:async()=>{if(!t)return;let e=r.sYd.loading("Reprocessing privacy request...",0),s=await l(t);"error"in s?n((0,en.e$)(s.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):i("Privacy request is now being reprocessed."),e()},showReprocess:s}},er=e=>{let{privacyRequest:t}=e,{showDownloadResults:n,downloadResults:i,infoTooltip:s,isDisabled:a}=es({privacyRequest:t}),{isModalOpen:o,closeModal:c,performAction:d,openConfirmationModal:u,showAction:x}=et({privacyRequest:t,action:"approve"}),{isModalOpen:p,closeModal:g,performAction:j,openConfirmationModal:m,showAction:f}=et({privacyRequest:t,action:"deny"}),{reprocessPrivacyRequest:v,showReprocess:y}=el({privacyRequest:t}),b=(0,h.useMemo)(()=>{let e=[];return e.push({key:"approve",label:(0,l.jsx)("span",{"data-testid":"privacy-request-approve-btn",children:"Approve"}),onClick:u,disabled:!x}),e.push({key:"deny",label:(0,l.jsx)("span",{"data-testid":"privacy-request-deny-btn",children:"Deny"}),onClick:m,disabled:!f}),e.push({key:"reprocess",label:(0,l.jsx)("span",{"data-testid":"privacy-request-action-reprocess",children:"Reprocess"}),onClick:v,disabled:!y}),n&&e.push({key:"download",label:(0,l.jsx)(r.esZ,{title:a?s:null,placement:"bottom",children:(0,l.jsx)("span",{"data-testid":"download-results-btn",children:"Download request results"})}),onClick:i,disabled:a}),e},[n,i,s,a,x,f,u,m,y,v]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.S0p,{menu:{items:b},trigger:["click"],overlayStyle:{minWidth:"160px"},children:(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.PJP.pO,{}),"data-testid":"privacy-request-actions-dropdown-btn",iconPosition:"end",type:"primary",disabled:!b.length,size:"large",children:"Actions"})}),(0,l.jsx)($.Z,{isOpen:o,isLoading:!1,onClose:c,onApproveRequest:()=>d({reason:""}),subjectRequest:t}),(0,l.jsx)(Q.Z,{isOpen:p,onClose:g,onDenyRequest:e=>j({reason:e})})]})},ea=()=>{let e=(0,a.useRouter)().query.id,{data:t,isLoading:n}=(0,u.QA)({id:e,verbose:!0},{skip:!e}),i=(null==t?void 0:t.items[0])||null;return(0,l.jsxs)(o.Z,{title:"Privacy Request - ".concat(e),children:[(0,l.jsx)(d.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Request details"}],rightContent:!!i&&(0,l.jsx)(er,{privacyRequest:i})}),n&&(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.$jN,{})}),!n&&!i&&(0,l.jsx)(r.xvT,{children:"404 no privacy request found"}),!n&&i&&(0,l.jsx)(K,{data:i})]})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return r},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return d},hE:function(){return a},oK:function(){return l}});var i=n(76649);let s=e=>"error"in e,l=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,r=e=>(0,i.Ln)({status:"number",data:{}},e),a=e=>(0,i.Ln)({detail:"string"},e),o=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},15709:function(e){e.exports={value:"RequestDetailsRow_value__WMXn3",label:"RequestDetailsRow_label__dn3CQ"}},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>l(e,t),s=Symbol("SOME"),l=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>l(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>l(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>l(n,t[e]));class r{static narrow(e){return new r(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof r?e.NF:e instanceof Function?e:t=>i(e,t);return new r(e=>t(e)&&n(e))}}new r(e=>!0)}},function(e){e.O(0,[8433,2888,9774,179],function(){return e(e.s=6554)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{13687:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/messaging",function(){return i(61463)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var n=i(24246),s=i(77181),r=i(88038),l=i.n(r),a=i(86677);i(27378);var o=i(25980),c=i(90867),u=i(77830),d=()=>{let e=(0,a.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(u.fz)},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."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:u}=e,m=(0,o.hz)(),p=(0,a.useRouter)(),g="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(m.flags.privacyRequestsConfiguration&&g),{data:f}=(0,c.JE)(void 0,{skip:h}),{data:x}=(0,c.PW)(void 0,{skip:h}),y=m.flags.privacyRequestsConfiguration&&(!f||!x)&&g;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{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",...u,children:[y?(0,n.jsx)(d,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(77181),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:a,rightContent:o,style:c,...u}=e;return(0,n.jsxs)("div",{...u,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.X6q,{className:i||a?"pb-4":void 0,fontSize:"2xl","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:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return c},c6:function(){return s},cj:function(){return g},e$:function(){return a},fn:function(){return o},iC:function(){return p},nU:function(){return d},tB:function(){return u}});var n,s,r=i(19043);let l="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:l};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:i}=e;return{status:i,message:a(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=s||(s={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),s=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var n=i(24246),s=i(77181);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)},successAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var n=i(24246),s=i(77181),r=i(79894),l=i.n(r),a=i(27378);let{Text:o}=s.AntTypography,c=e=>{let{items:t,...i}=e,r=(0,a.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,a={...e},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:a.title})),c)?a.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,n.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},7426:function(e,t,i){"use strict";i.d(t,{D2:function(){return m},L:function(){return a},U7:function(){return c},Yh:function(){return g},ak:function(){return o},km:function(){return l},tB:function(){return r}});var n=i(3228);let s=i(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:r,usePutConfigurationSettingsMutation:l,usePatchConfigurationSettingsMutation:a}=s,o=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{var n,s,r;let{data:l}=t,{data:a}=i;return{configSet:{cors_origins:(null==a?void 0:null===(n=a.security)||void 0===n?void 0:n.cors_origins)||[],cors_origin_regex:null==a?void 0:null===(s=a.security)||void 0===s?void 0:s.cors_origin_regex},apiSet:{cors_origins:(null==l?void 0:null===(r=l.security)||void 0===r?void 0:r.cors_origins)||[]}}}),c=()=>(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:i}=t;return i}),u={enabled:!1,cmp_api_required:!1},d=(e,t,i,n)=>{let s=i&&i[e],r=n&&n[e];return s&&r?{...n[e],...i[e]}:r?n[e]:s?{...i[e]}:t},m=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:s}=i;return d("gpp",u,n,s)}),p={tcf_publisher_country_code:null},g=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:s}=i;return d("plus_consent_settings",p,n,s)})},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return s},kN:function(){return l},qX:function(){return a},rE:function(){return r}});var n=i(21702);let s=[...new Map([[n.q2.APPROVED,"Approved"],[n.q2.CANCELED,"Canceled"],[n.q2.COMPLETE,"Completed"],[n.q2.DENIED,"Denied"],[n.q2.ERROR,"Error"],[n.q2.IN_PROCESSING,"In Progress"],[n.q2.PENDING,"New"],[n.q2.PAUSED,"Paused"],[n.q2.IDENTITY_UNVERIFIED,"Unverified"],[n.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[n.Us.ACCESS,"Access"],[n.Us.ERASURE,"Erasure"],[n.Us.CONSENT,"Consent"],[n.Us.UPDATE,"Update"]]),l=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),a={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3"}},61463:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var n=i(24246),s=i(77181),r=i(27378),l=i(812),a=i(14047),o=i(77213),c=i(77830),u=i(58754),d=i(7426),m=i(71784),p=i(90867),g=i(34090),h=i(40324),f=e=>{let{messagingDetails:t}=e,{successAlert:i}=(0,a.V)(),{handleError:r}=(0,a.H)(),[o]=(0,p.SU)(),c=t.service_type===m.qX.twilio_email||t.service_type===m.qX.mailgun,u=t.service_type===m.qX.twilio_text,d=async e=>{if(c){let t=await o({email:e.email});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}if(u){let t=await o({phone_number:e.phone});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,mb:5,children:"Test connection"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{email:"",phone:""},onSubmit:d,children:e=>{let{isSubmitting:t,resetForm:i}=e;return(0,n.jsxs)(g.l0,{children:[c?(0,n.jsx)(h.j0,{name:"email",label:"Email",placeholder:"youremail@domain.com",isRequired:!0}):null,u?(0,n.jsx)(h.j0,{name:"phone",label:"Phone",placeholder:"+10000000000",isRequired:!0}):null,(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]})},x=()=>{var e;let{successAlert:t}=(0,a.V)(),[i,o]=(0,r.useState)(""),{handleError:c}=(0,a.H)(),{data:u}=(0,p.S3)({type:m.qX.mailgun}),[d]=(0,p.h9)(),[x]=(0,p.iI)(),y=async e=>{let i=await d({service_type:m.qX.mailgun,details:{is_eu_domain:"false",domain:e.domain}});(0,l.D4)(i)?c(i.error):(t("Mailgun email successfully updated. You can now enter your security key."),o("apiKey"))},v=async e=>{let i=await x({details:{mailgun_api_key:e.api_key},service_type:m.qX.mailgun});(0,l.D4)(i)?c(i.error):(t("Mailgun security key successfully updated."),o("testConnection"))},j={domain:null!==(e=null==u?void 0:u.details.domain)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Mailgun messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:j,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(h.j0,{name:"domain",label:"Domain",placeholder:"Enter domain","data-testid":"option-twilio-domain",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"apiKey"===i||"testConnection"===i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===i?(0,n.jsx)(f,{messagingDetails:u||{service_type:m.qX.mailgun}}):null]})},y=()=>{var e;let[t,i]=(0,r.useState)(""),{successAlert:o}=(0,a.V)(),{handleError:c}=(0,a.H)(),{data:u}=(0,p.S3)({type:m.qX.twilio_email}),[d]=(0,p.h9)(),[x]=(0,p.iI)(),y=async e=>{let t=await d({service_type:m.qX.twilio_email,details:{twilio_email_from:e.email}});(0,l.D4)(t)?c(t.error):(o("Twilio email successfully updated. You can now enter your security key."),i("configureTwilioEmailSecrets"))},v=async e=>{let t=await x({details:{twilio_api_key:e.api_key},service_type:m.qX.twilio_email});(0,l.D4)(t)?c(t.error):(o("Twilio email secrets successfully updated."),i("testConnection"))},j={email:null!==(e=null==u?void 0:u.details.twilio_email_from)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio Email messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:j,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(h.j0,{name:"email",label:"Email",placeholder:"Enter email",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"configureTwilioEmailSecrets"===t||"testConnection"===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===t?(0,n.jsx)(f,{messagingDetails:u||{service_type:m.qX.twilio_email}}):null]})},v=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,o]=(0,r.useState)(""),{data:c}=(0,p.S3)({type:"twilio_text"}),[u]=(0,p.iI)(),d=async i=>{let n=await u({details:{twilio_account_sid:i.account_sid,twilio_auth_token:i.auth_token,twilio_messaging_service_sid:i.messaging_service_sid,twilio_sender_phone_number:i.phone},service_type:m.qX.twilio_text});(0,l.D4)(n)?t(n.error):(e("Twilio text secrets successfully updated."),o("testConnection"))};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio SMS messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{account_sid:"",auth_token:"",messaging_service_sid:"",phone:""},onSubmit:d,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(h.j0,{name:"account_sid",label:"Account SID",placeholder:"Enter account SID",isRequired:!0}),(0,n.jsx)(h.j0,{name:"auth_token",label:"Auth token",placeholder:"Enter auth token",type:"password",isRequired:!0}),(0,n.jsx)(h.j0,{name:"messaging_service_sid",label:"Messaging Service SID",placeholder:"Enter messaging service SID"}),(0,n.jsx)(h.j0,{name:"phone",label:"Phone Number",placeholder:"Enter phone number"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"testConnection"===i?(0,n.jsx)(f,{messagingDetails:c||{service_type:m.qX.twilio_text}}):null]})},j=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,g]=(0,r.useState)(""),[h]=(0,p.h9)(),[f]=(0,d.L)(),{data:j}=(0,p.JE)();(0,r.useEffect)(()=>{j&&g(null==j?void 0:j.service_type)},[j]);let _=async i=>{let{value:n}=i.target,s=await f({notifications:{notification_service_type:n,send_request_completion_notification:!0,send_request_receipt_notification:!0,send_request_review_notification:!0},execution:{subject_identity_verification_required:!0}});if((0,l.D4)(s))t(s.error);else if(n!==m.qX.twilio_text)g(n);else{let i=await h({service_type:m.qX.twilio_text});(0,l.D4)(i)?t(i.error):(e("Messaging provider saved successfully."),g(n))}};return(0,n.jsxs)(o.Z,{title:"Configure Privacy Requests - Messaging",children:[(0,n.jsx)(u.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Configure requests",href:c.fz},{title:"Messaging"}]}),(0,n.jsx)(s.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure your messaging provider"}),(0,n.jsxs)(s.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,n.jsxs)(s.xuv,{children:["Fides requires a messsaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,n.jsx)(s.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,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose service type to configure"}),(0,n.jsx)(s.y02.Group,{onChange:_,value:i,"data-testid":"privacy-requests-messaging-provider-selection",className:"p-3",children:(0,n.jsxs)(s.jqI,{children:[(0,n.jsx)(s.y02,{value:m.qX.mailgun,"data-testid":"option-mailgun",children:"Mailgun Email"},m.qX.mailgun),(0,n.jsx)(s.y02,{value:m.qX.twilio_email,"data-testid":"option-twilio-email",children:"Twilio Email"},m.qX.twilio_email),(0,n.jsx)(s.y02,{value:m.qX.twilio_text,"data-testid":"option-twilio-sms",children:"Twilio SMS"},m.qX.twilio_text)]})}),i===m.qX.mailgun?(0,n.jsx)(x,{}):null,i===m.qX.twilio_email?(0,n.jsx)(y,{}):null,i===m.qX.twilio_text?(0,n.jsx)(v,{}):null]})]})},_=()=>(0,n.jsx)(j,{})},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return l},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return u},hE:function(){return a},oK:function(){return r}});var n=i(76649);let s=e=>"error"in e,r=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,l=e=>(0,n.Ln)({status:"number",data:{}},e),a=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>r(e,t),s=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>r(i,t[e]));class l{static narrow(e){return new l(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof l?e.NF:e instanceof Function?e:t=>n(e,t);return new l(e=>t(e)&&i(e))}}new l(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=13687)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return n(49755)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var i=n(24246),r=n(77181),s=n(88038),a=n.n(s),o=n(86677);n(27378);var l=n(25980),u=n(90867),c=n(77830),d=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(r.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:n,padded:s=!0,mainProps:c}=e,g=(0,l.hz)(),p=(0,o.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,m=!(g.flags.privacyRequestsConfiguration&&f),{data:h}=(0,u.JE)(void 0,{skip:m}),{data:v}=(0,u.PW)(void 0,{skip:m}),x=g.flags.privacyRequestsConfiguration&&(!h||!v)&&f;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[x?(0,i.jsx)(d,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(77181),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:u,...c}=e;return(0,i.jsxs)("div",{...c,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",...u}:{paddingBottom:"24px",...u},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(s.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var i=n(24246),r=n(77181),s=n(34090),a=n(27378),o=n(91613),l=n(40324);let u=e=>{let{name:t,label:n,labelProps:u,tooltip:c,isRequired:d,layout:g="inline",...p}=e,[f,m,{setValue:h}]=(0,s.U$)(t),v=!!(m.touched&&m.error),[x,y]=(0,a.useState)("");f.value||"tags"!==p.mode&&"multiple"!==p.mode||(f.value=[]),"tags"===p.mode&&"string"==typeof f.value&&(f.value=[f.value]);let j="tags"===p.mode?(e,t)=>e?e.value!==x||f.value.includes(x)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(x,'"'):void 0:p.optionRender||void 0,_=e=>{y(e),p.onSearch&&p.onSearch(e)},b=(e,t)=>{h(e),p.onChange&&p.onChange(e,t)};return"inline"===g?(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:d,children:(0,i.jsxs)(r.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,i.jsx)(l.__,{htmlFor:p.id||t,...u,children:n}):null,(0,i.jsxs)(r.jqI,{align:"center",children:[(0,i.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(r.WPr,{...f,id:p.id||t,"data-testid":"controlled-select-".concat(f.name),...p,optionRender:j,onSearch:"tags"===p.mode?_:void 0,onChange:b,value:f.value||void 0,status:v?"error":void 0}),(0,i.jsx)(l.Bc,{isInvalid:v,message:m.error,fieldName:f.name})]}),c?(0,i.jsx)(o.Z,{label:c}):null]})]})}):(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:d,children:(0,i.jsxs)(r.gCW,{alignItems:"start",children:[(0,i.jsxs)(r.jqI,{align:"center",children:[n?(0,i.jsx)(l.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...u,children:n}):null,c?(0,i.jsx)(o.Z,{label:c}):null]}),(0,i.jsx)(r.WPr,{...f,id:p.id||t,"data-testid":"controlled-select-".concat(f.name),...p,optionRender:j,onSearch:"tags"===p.mode?_:void 0,onChange:b,value:f.value||void 0,status:v?"error":void 0}),(0,i.jsx)(l.Bc,{isInvalid:v,message:m.error,fieldName:f.name})]})})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return s.D4},MM:function(){return g},Ot:function(){return u},c6:function(){return r},cj:function(){return f},e$:function(){return o},fn:function(){return l},iC:function(){return p},nU:function(){return d},tB:function(){return c}});var i,r,s=n(19043);let a="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function l(e){return"object"==typeof e&&null!=e&&"status"in e}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:n}=e;return{status:n,message:o(e,t.message)}}return t},g=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},f=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,n){"use strict";n.d(t,{H:function(){return s},V:function(){return i.V}});var i=n(84306),r=n(812);let s=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,r.Ot)(t)?n=t.data.detail:(0,r.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var i=n(24246),r=n(77181);let s=()=>{let e=(0,r.pmc)();return{errorAlert:(t,n,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)},successAlert:(t,n,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)}}}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return u}});var i=n(24246),r=n(77181),s=n(79894),a=n.n(s),o=n(27378);let{Text:l}=r.AntTypography,u=e=>{let{items:t,...n}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,o={...e},u=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),u)?o.title=(0,i.jsx)(r.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},7426:function(e,t,n){"use strict";n.d(t,{D2:function(){return g},L:function(){return o},U7:function(){return u},Yh:function(){return f},ak:function(){return l},km:function(){return a},tB:function(){return s}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:s,usePutConfigurationSettingsMutation:a,usePatchConfigurationSettingsMutation:o}=r,l=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{var i,r,s;let{data:a}=t,{data:o}=n;return{configSet:{cors_origins:(null==o?void 0:null===(i=o.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==o?void 0:null===(r=o.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==a?void 0:null===(s=a.security)||void 0===s?void 0:s.cors_origins)||[]}}}),u=()=>(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:n}=t;return n}),c={enabled:!1,cmp_api_required:!1},d=(e,t,n,i)=>{let r=n&&n[e],s=i&&i[e];return r&&s?{...i[e],...n[e]}:s?i[e]:r?{...n[e]}:t},g=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("gpp",c,i,r)}),p={tcf_publisher_country_code:null},f=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("plus_consent_settings",p,i,r)})},71784:function(e,t,n){"use strict";n.d(t,{DE:function(){return l},I3:function(){return r},kN:function(){return a},qX:function(){return o},rE:function(){return s}});var i=n(21702);let r=[...new Map([[i.q2.APPROVED,"Approved"],[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"]])].map(e=>{let[t,n]=e;return{label:n,value:t}}),s=new Map([[i.Us.ACCESS,"Access"],[i.Us.ERASURE,"Erasure"],[i.Us.CONSENT,"Consent"],[i.Us.UPDATE,"Update"]]),a=[...s].map(e=>{let[t,n]=e;return{label:n,value:t}}),o={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},l={local:"local",s3:"s3"}},49755:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return y}});var i=n(24246),r=n(77181),s=n(27378),a=n(812),o=n(14047),l=n(77213),u=n(77830),c=n(58754),d=n(7426),g=n(71784),p=n(90867),f=n(34090),m=n(97181),h=n(40324),v=e=>{var t,n,l,u,c;let{storageDetails:d}=e,[v,x]=(0,s.useState)(""),[y]=(0,p.gC)(),[j]=(0,p.cf)(),{handleError:_}=(0,o.H)(),{successAlert:b}=(0,o.V)(),C={type:g.DE.s3,auth_method:null!==(l=null==d?void 0:null===(t=d.details)||void 0===t?void 0:t.auth_method)&&void 0!==l?l:"",bucket:null!==(u=null==d?void 0:null===(n=d.details)||void 0===n?void 0:n.bucket)&&void 0!==u?u:"",format:null!==(c=null==d?void 0:d.format)&&void 0!==c?c:""},S=async e=>{let t=await y({type:g.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,a.D4)(t)?_(t.error):(x(e.auth_method),b("S3 storage credentials successfully updated."))},q=async e=>{let t=await j({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:g.DE.s3});(0,a.D4)(t)?_(t.error):b("S3 storage secrets successfully updated.")};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,i.jsx)(r.Kqy,{children:(0,i.jsx)(f.J9,{initialValues:C,onSubmit:S,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:n}=e;return(0,i.jsxs)(f.l0,{children:[(0,i.jsxs)(r.Kqy,{mt:5,spacing:5,children:[(0,i.jsx)(m.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,i.jsx)(m.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,i.jsx)(h.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,i.jsx)(r.wpx,{onClick:()=>n(),className:"mr-2 mt-5",children:"Cancel"}),(0,i.jsx)(r.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===v?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.izJ,{mt:5}),(0,i.jsx)(r.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,i.jsx)(r.Kqy,{children:(0,i.jsx)(f.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:q,children:e=>{let{isSubmitting:t,handleReset:n}=e;return(0,i.jsxs)(f.l0,{children:[(0,i.jsxs)(r.Kqy,{mt:5,spacing:5,children:[(0,i.jsx)(h.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,i.jsx)(h.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,i.jsxs)(r.xuv,{mt:10,children:[(0,i.jsx)(r.wpx,{onClick:()=>n(),className:"mr-2 mt-5",children:"Cancel"}),(0,i.jsx)(r.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},x=()=>{let{successAlert:e}=(0,o.V)(),{handleError:t}=(0,o.H)(),[n,f]=(0,s.useState)(""),{data:m}=(0,p.PW)(),{data:h}=(0,p.Au)({type:n}),[x,{isLoading:y}]=(0,p.gC)(),[j]=(0,d.L)();(0,s.useEffect)(()=>{m&&f(m.type)},[m]);let _=async n=>{let{value:i}=n.target;if(i===g.DE.local){let n=await x({type:i,details:{},format:"json"});(0,a.D4)(n)?t(n.error):e("Configured storage details successfully.")}let r=await j({storage:{active_default_storage_type:i}});(0,a.D4)(r)?t(r.error):f(i)};return(0,i.jsxs)(l.Z,{title:"Configure Privacy Requests - Storage",children:[(0,i.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:u.Jw},{title:"Configure requests",href:u.fz},{title:"Storage"}]}),(0,i.jsx)(r.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,i.jsxs)(r.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,i.jsx)(r.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,i.jsxs)(r.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,i.jsx)(r.xvT,{as:"span",color:"complimentary.500",children:"Local"})," ","and"," ",(0,i.jsx)(r.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","storage methods."]}),(0,i.jsx)(r.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,i.jsx)(r.y02.Group,{disabled:y,onChange:_,value:n,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,i.jsxs)(r.jqI,{children:[(0,i.jsx)(r.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,i.jsx)(r.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3")]})}),"s3"===n&&h?(0,i.jsx)(v,{storageDetails:h}):null]})]})},y=()=>(0,i.jsx)(x,{})},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a},D4:function(){return r},Dy:function(){return l},XD:function(){return u},cz:function(){return c},hE:function(){return o},oK:function(){return s}});var i=n(76649);let r=e=>"error"in e,s=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,i.Ln)({status:"number",data:{}},e),o=e=>(0,i.Ln)({detail:"string"},e),l=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>s(n,t[e]));class a{static narrow(e){return new a(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof a?e.NF:e instanceof Function?e:t=>i(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2369],{1565:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests",function(){return r(22017)}])},35287:function(e,t,r){"use strict";var l=r(24246),i=r(77181),a=r(88038),n=r.n(a);r(27378),t.Z=e=>{let{children:t,title:r,mainProps:a}=e;return(0,l.jsxs)(i.kCb,{"data-testid":r,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,l.jsxs)(n(),{children:[(0,l.jsxs)("title",{children:["Fides Admin UI - ",r]}),(0,l.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,l.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,l.jsx)(i.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...a,children:t})]})}},87361:function(e,t,r){"use strict";var l=r(24246),i=r(77181);t.Z=e=>{let{title:t,text:r,onClose:a}=e;return(0,l.jsxs)(i.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,l.jsx)(i.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:a}),(0,l.jsx)(i.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,l.jsxs)(i.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,l.jsx)(i.X6q,{fontSize:"md",children:t}),(0,l.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:r})]})]})}},96718:function(e,t,r){"use strict";r.d(t,{z:function(){return a}});var l=r(24246),i=r(77181);let a=e=>{let{...t}=e,r="multiple"===t.mode;return(0,l.jsx)(i.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,dropdownStyle:r?void 0:{width:"auto",minWidth:"200px"},className:"w-auto","data-testid":"filter-select",...t})}},97181:function(e,t,r){"use strict";r.d(t,{d:function(){return d}});var l=r(24246),i=r(77181),a=r(34090),n=r(27378),s=r(91613),o=r(40324);let d=e=>{let{name:t,label:r,labelProps:d,tooltip:u,isRequired:c,layout:p="inline",...m}=e,[h,v,{setValue:x}]=(0,a.U$)(t),f=!!(v.touched&&v.error),[y,b]=(0,n.useState)("");h.value||"tags"!==m.mode&&"multiple"!==m.mode||(h.value=[]),"tags"===m.mode&&"string"==typeof h.value&&(h.value=[h.value]);let _="tags"===m.mode?(e,t)=>e?e.value!==y||h.value.includes(y)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:m.optionRender||void 0,j=e=>{b(e),m.onSearch&&m.onSearch(e)},g=(e,t)=>{x(e),m.onChange&&m.onChange(e,t)};return"inline"===p?(0,l.jsx)(i.NIc,{isInvalid:f,isRequired:c,children:(0,l.jsxs)(i.rjZ,{templateColumns:r?"1fr 3fr":"1fr",children:[r?(0,l.jsx)(o.__,{htmlFor:m.id||t,...d,children:r}):null,(0,l.jsxs)(i.jqI,{align:"center",children:[(0,l.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(i.WPr,{...h,id:m.id||t,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:_,onSearch:"tags"===m.mode?j:void 0,onChange:g,value:h.value||void 0,status:f?"error":void 0}),(0,l.jsx)(o.Bc,{isInvalid:f,message:v.error,fieldName:h.name})]}),u?(0,l.jsx)(s.Z,{label:u}):null]})]})}):(0,l.jsx)(i.NIc,{isInvalid:f,isRequired:c,children:(0,l.jsxs)(i.gCW,{alignItems:"start",children:[(0,l.jsxs)(i.jqI,{align:"center",children:[r?(0,l.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:r}):null,u?(0,l.jsx)(s.Z,{label:u}):null]}),(0,l.jsx)(i.WPr,{...h,id:m.id||t,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:_,onSearch:"tags"===m.mode?j:void 0,onChange:g,value:h.value||void 0,status:f?"error":void 0}),(0,l.jsx)(o.Bc,{isInvalid:f,message:v.error,fieldName:h.name})]})})}},71784:function(e,t,r){"use strict";r.d(t,{DE:function(){return o},I3:function(){return i},kN:function(){return n},qX:function(){return s},rE:function(){return a}});var l=r(28120);let i=[...new Map([[l.q2.APPROVED,"Approved"],[l.q2.CANCELED,"Canceled"],[l.q2.COMPLETE,"Completed"],[l.q2.DENIED,"Denied"],[l.q2.ERROR,"Error"],[l.q2.IN_PROCESSING,"In Progress"],[l.q2.PENDING,"New"],[l.q2.PAUSED,"Paused"],[l.q2.IDENTITY_UNVERIFIED,"Unverified"],[l.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,r]=e;return{label:r,value:t}}),a=new Map([[l.Us.ACCESS,"Access"],[l.Us.ERASURE,"Erasure"],[l.Us.CONSENT,"Consent"],[l.Us.UPDATE,"Update"]]),n=[...a].map(e=>{let[t,r]=e;return{label:r,value:t}}),s={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3"}},22017:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return es}});var l,i,a=r(24246),n=r(35287),s=r(77181),o=r(65218),d=r.n(o),u=r(27378),c=r(25980),p=r(19904),m=r(59003),h=r(92222),v=r(86677),x=r(16125),f=r(91317),y=r(14048),b=r(14481),_=r(90867),j=r(16394),g=r(71784),q=r(28120);let C={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:"alert",label:"Requires Input"}},E=e=>{let{value:t}=e;return(0,a.jsx)(b.A4,{color:C[t].colorScheme,value:C[t].label,"data-testid":"request-status-badge"})},R=e=>{let t,{daysLeft:r,timeframe:l=45,status:i,includeText:n=!1}=e;if(null==r||i===q.q2.COMPLETE||i===q.q2.CANCELED||i===q.q2.DENIED||i===q.q2.IDENTITY_UNVERIFIED)return null;let s=100*r/l;return s<25?t="error":s>=75?t="success":s>=25&&(t="warning"),(0,a.jsx)(b.A4,{value:n?"".concat(r," days left"):r.toString(),color:t})},w=e=>Array.from(new Set(e.filter(e=>Object.values(q.Us).includes(e.action_type)).map(e=>e.action_type))),S=e=>{let{value:t}=e,r=w(t).map(e=>g.rE.get(e));return(0,a.jsx)(b.WP,{value:r,cellState:{isExpanded:!0}})};var I=r(58452),P=r(57526),k=r(66548),T=r(45489);let D=e=>{let{subjectRequest:t,...r}=e,l=(0,s.qY0)(),i=(0,s.qY0)(),n=(0,s.qY0)(),{handleApproveRequest:o,handleDenyRequest:d,handleDeleteRequest:u,isLoading:c}=(0,T.Z)({subjectRequest:t});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.Ugi,{...r,children:["pending"!==t.status?null:(0,a.jsx)(s.wpx,{title:"Approve","aria-label":"Approve",icon:(0,a.jsx)(s.nQG,{w:2,h:2}),onClick:l.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-approve-btn",size:"small"}),"pending"!==t.status?null:(0,a.jsx)(s.wpx,{title:"Deny","aria-label":"Deny",icon:(0,a.jsx)(s.Two,{w:2,h:2}),onClick:i.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-deny-btn",size:"small"}),(0,a.jsx)(p.ZP,{scopes:[q.Sh.PRIVACY_REQUEST_DELETE],children:(0,a.jsx)(s.wpx,{title:"Delete","aria-label":"Delete",icon:(0,a.jsx)(s.pJl,{w:2,h:2}),onClick:n.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-delete-btn",size:"small"})})]}),(0,a.jsx)(s.h_i,{children:(0,a.jsx)(P.Z,{isOpen:l.isOpen,isLoading:c,onClose:l.onClose,onApproveRequest:o,subjectRequest:t})}),(0,a.jsx)(s.h_i,{children:(0,a.jsx)(k.Z,{isOpen:i.isOpen,onClose:i.onClose,onDenyRequest:d})}),(0,a.jsx)(I.Z,{isOpen:n.isOpen,onClose:n.onClose,onConfirm:u,message:(0,a.jsx)(s.xvT,{children:"You are about to permanently delete the privacy request. Are you sure you would like to continue?"})})]})};(l=i||(i={})).STATUS="status",l.DAYS_LEFT="due_date",l.SOURCE="source",l.REQUEST_TYPE="request_type",l.SUBJECT_IDENTITY="subject_identity",l.TIME_RECEIVED="created_at",l.CREATED_BY="created_by",l.REVIEWER="reviewer",l.ID="id",l.ACTIONS="actions";let A=(0,h.Cl)(),O=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return[A.accessor(e=>e.status,{id:"status",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(E,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Status",...e})}),A.accessor(e=>e.days_left,{id:"due_date",cell:e=>{let{row:t,getValue:r}=e;return(0,a.jsx)(R,{daysLeft:r(),timeframe:t.original.policy.execution_timeframe,status:t.original.status})},header:e=>(0,a.jsx)(b.Rr,{value:"Days left",...e})}),...e?[A.accessor(e=>e.source,{id:"source",cell:e=>e.getValue()?(0,a.jsx)(b.A4,{value:e.getValue()}):(0,a.jsx)(b.G3,{value:void 0}),header:e=>(0,a.jsx)(b.Rr,{value:"Source",...e}),enableSorting:!1})]:[],A.accessor(e=>e.policy.rules,{id:"request_type",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(S,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Request type",...e}),enableSorting:!1}),A.accessor(e=>{var t,r;return(null===(t=e.identity)||void 0===t?void 0:t.email.value)||(null===(r=e.identity)||void 0===r?void 0:r.phone_number.value)||""},{id:"subject_identity",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Subject identity",...e}),enableSorting:!1}),A.accessor(e=>e.created_at,{id:"created_at",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:(0,j.p6)(t())})},header:e=>(0,a.jsx)(b.Rr,{value:"Time received",...e})}),A.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)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Reviewed by",...e}),enableSorting:!1}),A.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Request ID",...e}),enableSorting:!1}),A.display({id:"actions",cell:e=>{let{row:t}=e;return(0,a.jsx)(D,{subjectRequest:t.original})},header:e=>(0,a.jsx)(b.Rr,{value:"Actions",...e}),meta:{disableRowClick:!0}})]},N=e=>{let t=(0,x.v9)(_.dp),r=(0,x.I0)();return{handleStatusChange:t=>{r((0,_.CI)(t)),e()},handleActionTypeChange:t=>{r((0,_.aM)(t)),e()},handleFromChange:t=>{r((0,_.su)(null==t?void 0:t.target.value)),e()},handleToChange:t=>{r((0,_.Ue)(null==t?void 0:t.target.value)),e()},handleClearAllFilters:()=>{r((0,_.Mk)()),e()},...t}};var U=r(96718);let F=e=>{let{onClose:t,onFilterChange:r,...l}=e,{handleStatusChange:i,handleActionTypeChange:n,handleFromChange:o,handleToChange:d,handleClearAllFilters:u,from:c,to:p,status:m,action_type:h}=N(r);return(0,a.jsxs)(s.u_l,{onClose:t,size:"xl",...l,children:[(0,a.jsx)(s.ZAr,{}),(0,a.jsxs)(s.hzk,{children:[(0,a.jsx)(s.xBx,{borderBottomWidth:1,borderBottomColor:"gray.200",children:"All Filters"}),(0,a.jsx)(s.olH,{}),(0,a.jsx)(s.fef,{py:4,sx:{"& label":{mb:0}},children:(0,a.jsxs)(s.Kqy,{gap:4,children:[(0,a.jsxs)(s.Kqy,{children:[(0,a.jsx)(s.lXp,{size:"md",id:"request-date-range-label",children:"Date range"}),(0,a.jsxs)(s.Ugi,{gap:3,children:[(0,a.jsxs)(s.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(s.UiE,{as:"label",htmlFor:"from-date",borderRadius:"md",children:"From"}),(0,a.jsx)(s.IIB,{type:"date",name:"From",value:c,max:p||void 0,onChange:o,borderRadius:"md",id:"from-date","aria-describedby":"request-date-range-label"})]}),(0,a.jsxs)(s.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(s.UiE,{as:"label",htmlFor:"to-date",borderRadius:"md",children:"To"}),(0,a.jsx)(s.IIB,{type:"date",borderRadius:"md",name:"To",value:p,min:c||void 0,onChange:d,id:"to-date","aria-describedby":"request-date-range-label"})]})]})]}),(0,a.jsxs)(s.Kqy,{children:[(0,a.jsx)(s.lXp,{size:"md",htmlFor:"request-status",children:"Status"}),(0,a.jsx)(U.z,{id:"request-status",mode:"multiple",options:g.I3,value:m,onChange:i,"data-testid":"request-status-filter"})]}),(0,a.jsxs)(s.Kqy,{children:[(0,a.jsx)(s.lXp,{size:"md",htmlFor:"request-action-type",children:"Request Type"}),(0,a.jsx)(U.z,{id:"request-action-type",mode:"multiple",options:g.kN,value:h,onChange:n,"data-testid":"request-action-type-filter"})]})]})}),(0,a.jsxs)(s.mzw,{justifyContent:"space-between",children:[(0,a.jsx)(s.wpx,{type:"text",onClick:u,children:"Clear all"}),(0,a.jsx)(s.wpx,{type:"primary",onClick:t,children:"Done"})]})]})]})},z=e=>{let{...t}=e,{plus:r}=(0,c.hz)(),[l,i]=(0,u.useState)(""),n=(0,x.v9)(_.dp),o=(0,x.v9)(f.rK),d=(0,s.pmc)(),p=(0,v.useRouter)(),j=(0,x.I0)(),{PAGE_SIZES:g,pageSize:q,setPageSize:C,onPreviousPageClick:E,isPreviousPageDisabled:R,onNextPageClick:w,isNextPageDisabled:S,startRange:I,endRange:P,pageIndex:k,setTotalPages:T,resetPageIndexToDefault:D}=(0,b.oi)(),{isOpen:A,onOpen:N,onClose:U}=(0,s.qY0)(),{data:z,isLoading:Z,isFetching:M}=(0,_.QA)({...n,page:k,size:q}),{items:V,total:Y}=(0,u.useMemo)(()=>{let e=z||{items:[],total:0,pages:0};return T(e.pages),e},[z,T]),G=(0,u.useCallback)(e=>{j((0,_.mU)(e)),i(e),D()},[j,D,i]),B=async()=>{let e;try{await (0,_.py)({...n,token:o})}catch(t){e=t instanceof Error?t.message:"Unknown error occurred"}e&&d({description:"".concat(e),duration:5e3,status:"error"})},L=e=>{p.push("/privacy-requests/".concat(e))},W=(0,m.b7)({getCoreRowModel:(0,h.sC)(),data:V,columns:(0,u.useMemo)(()=>O(r),[r]),getRowId:e=>"".concat(e.status,"-").concat(e.id),manualPagination:!0,columnResizeMode:"onChange"});return(0,a.jsxs)(s.xuv,{...t,children:[(0,a.jsxs)(b.Q$,{children:[(0,a.jsx)(b.HO,{globalFilter:l,setGlobalFilter:G,placeholder:"Search by request ID or identity value"}),(0,a.jsxs)(s.Ugi,{alignItems:"center",spacing:2,children:[(0,a.jsx)(s.wpx,{"data-testid":"filter-btn",onClick:N,children:"Filter"}),(0,a.jsx)(s.wpx,{"aria-label":"Export report","data-testid":"export-btn",icon:(0,a.jsx)(y.nM,{ml:"1.5px"}),onClick:B})]}),(0,a.jsx)(s.h_i,{children:(0,a.jsx)(F,{isOpen:A,onClose:U,onFilterChange:D})})]}),Z?(0,a.jsx)(s.xuv,{p:2,borderWidth:1,children:(0,a.jsx)(b.I4,{rowHeight:26,numRows:10})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.ZK,{tableInstance:W,onRowClick:e=>L(e.id),onSort:e=>{if(!e){j((0,_.p2)()),D();return}let{id:t,desc:r}=e;j((0,_.PU)(t)),j((0,_.iX)(r?"desc":"asc")),D()}}),(0,a.jsx)(b.s8,{totalRows:Y||0,pageSizes:g,setPageSize:C,onPreviousPageClick:E,isPreviousPageDisabled:R||M,onNextPageClick:w,isNextPageDisabled:S||M,startRange:I,endRange:P})]})]})};var Z=r(812),M=r(87361),V=r(46628),Y=r(34090),G=r(55484),B=r(40324);let L=(e,t)=>null==t?void 0:t.find(t=>t.policy_key===e),W=e=>{var t,r;if(!e)return G.Ry().shape({policy_key:G.Z_().required().label("Request type")});let l=e.custom_privacy_request_fields?Object.entries(e.custom_privacy_request_fields).map(e=>{let[t,r]=e;return{[t]:G.Ry().shape({value:r.required&&!r.hidden?G.Z_().required().label(r.label):G.Z_().nullable()})}}).reduce((e,t)=>({...e,...t}),{}):{};return G.Ry().shape({policy_key:G.Z_().required().label("Request type"),identity:G.Ry().shape({email:(null===(t=e.identity_inputs)||void 0===t?void 0:t.email)==="required"?G.Z_().email().required().label("Email address"):G.Z_().nullable(),phone_number:(null===(r=e.identity_inputs)||void 0===r?void 0:r.phone)==="required"?G.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").required().label("Phone number"):G.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").nullable()}),custom_privacy_request_fields:G.Ry().shape(l)})};var X=r(97181);let K={is_verified:!1,policy_key:"",identity:{}},Q=e=>{let{identityInputs:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[t.email?(0,a.jsx)(B.j0,{name:"identity.email",label:"User email address",isRequired:"required"===t.email,variant:"stacked"}):null,t.phone?(0,a.jsx)(B.j0,{name:"identity.phone_number",label:"User phone number",isRequired:"required"===t.phone,variant:"stacked"}):null]}):null},H=e=>{let{customFieldInputs:t}=e;if(!t)return null;let r=Object.entries(t);return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let[t,r]=e;return(0,a.jsx)(B.j0,{name:"custom_privacy_request_fields.".concat(t,".value"),label:r.label,isRequired:!!r.required,variant:"stacked"},t)})})};var $=e=>{let{onSubmit:t,onCancel:r}=e,{data:l}=(0,_.xv)();return(0,a.jsx)(Y.J9,{initialValues:K,onSubmit:t,validationSchema:()=>(0,G.Vo)(e=>W(L(e.policy_key,null==l?void 0:l.actions))),children:e=>{var t;let{values:i,dirty:n,isValid:o,isSubmitting:d,setFieldValue:u}=e,c=L(i.policy_key,null==l?void 0:l.actions);return(0,a.jsx)(Y.l0,{children:(0,a.jsxs)(s.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(X.d,{name:"policy_key",label:"Request type",options:null!==(t=null==l?void 0:l.actions.map(e=>({label:e.title,value:e.policy_key})))&&void 0!==t?t:[],onChange:e=>{let t=L(e,null==l?void 0:l.actions);if(!(null==t?void 0:t.custom_privacy_request_fields)){u("custom_privacy_request_fields",void 0);return}u("custom_privacy_request_fields",Object.entries(t.custom_privacy_request_fields).map(e=>{let[t,r]=e;return{[t]:{label:r.label,value:r.default_value}}}).reduce((e,t)=>({...e,...t}),{}))},layout:"stacked",isRequired:!0}),(0,a.jsx)(Q,{identityInputs:null==c?void 0:c.identity_inputs}),(0,a.jsx)(H,{customFieldInputs:null==c?void 0:c.custom_privacy_request_fields}),(0,a.jsx)(B.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)(s.wpx,{onClick:r,children:"Cancel"}),(0,a.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:!i.is_verified||!n||!o,loading:d,"data-testid":"submit-btn",children:"Create"})]})]})})}})},J=r(31883);let ee=e=>{let{isOpen:t,onClose:r}=e,[l]=(0,_.M6)(),i=(0,s.pmc)(),n=async e=>{let{is_verified:t,...a}=e,n=a.custom_privacy_request_fields?Object.entries(a.custom_privacy_request_fields).map(e=>{let[t,r]=e;return r.value?{[t]:r}:{}}).reduce((e,t)=>({...e,...t}),{}):void 0,s={...a,custom_privacy_request_fields:n},o=await l([s]);(0,J.D4)(o)?i((0,V.Vo)((0,Z.e$)(o.error,"An error occurred while creating this privacy request. Please try again"))):i((0,V.t5)("Privacy request created")),r()};return(0,a.jsxs)(s.u_l,{isOpen:t,onClose:r,size:"2xl",isCentered:!0,children:[(0,a.jsx)(s.ZAr,{}),(0,a.jsxs)(s.hzk,{"data-testid":"submit-request-modal",maxHeight:"80%",overflowY:"auto",children:[(0,a.jsx)(s.xBx,{children:"Create privacy request"}),(0,a.jsx)(s.fef,{children:(0,a.jsxs)(s.Kqy,{spacing:4,children:[(0,a.jsx)(M.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)($,{onSubmit:n,onCancel:()=>r()})]})})]})]})};var et=()=>{let{onOpen:e,isOpen:t,onClose:r}=(0,s.qY0)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ee,{isOpen:t,onClose:r}),(0,a.jsx)(s.wpx,{type:"primary",onClick:e,"data-testid":"submit-request-btn",children:"Create request"})]})},er=r(58754),el=r(14047);let ei=()=>{let{errorAlert:e}=(0,el.V)(),[t,r]=(0,u.useState)(!1),[l,i]=(0,u.useState)({count:0,total:0}),[n,o]=(0,u.useState)(!0),d=q.q2.ERROR,{data:c}=(0,_.tE)(),{data:p}=(0,_.QA)({status:[d]},{pollingInterval:15e3,skip:n});return(0,u.useEffect)(()=>{o(!(c&&c.notify_after_failures>0))},[c]),(0,u.useEffect)(()=>{let e=(null==p?void 0:p.total)||0;e>=((null==c?void 0:c.notify_after_failures)||0)&&e>l.total?(i({count:e-l.total,total:e}),r(!0)):r(!1)},[null==p?void 0:p.total,null==c?void 0:c.notify_after_failures,l.total]),{processing:()=>{t&&e((0,a.jsxs)(s.xuv,{children:["DSR automation has failed for"," ",(0,a.jsx)(s.xvT,{as:"span",fontWeight:"semibold",children:l.count})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null,id:"dsrErrorAlert"})}}},ea=d()(()=>r.e(9676).then(r.bind(r,59676)),{loadableGenerated:{webpack:()=>[59676]},loading:()=>(0,a.jsx)("div",{children:"Loading..."})});var en=()=>{let{processing:e}=ei(),{plus:t}=(0,c.hz)();return(0,u.useEffect)(()=>{e()},[e]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(er.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests"}],rightContent:(0,a.jsxs)(s.vyj,{children:[t&&(0,a.jsx)(p.ZP,{scopes:[q.Sh.PRIVACY_REQUEST_CREATE],children:(0,a.jsx)(et,{})}),(0,a.jsx)(ea,{})]}),"data-testid":"privacy-requests"}),(0,a.jsx)(z,{})]})},es=()=>(0,a.jsx)(n.Z,{title:"Privacy Requests",children:(0,a.jsx)(en,{})})},31883:function(e,t,r){"use strict";r.d(t,{Bw:function(){return l.Bw},D4:function(){return l.D4}});var l=r(19043)},76737:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},noSSR:function(){return n}});let l=r(51538);r(24246),r(27378);let i=l._(r(21887));function a(e){return{default:(null==e?void 0:e.default)||e}}function n(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let r=i.default,l={loading:e=>{let{error:t,isLoading:r,pastDelay:l}=e;return null}};e instanceof Promise?l.loader=()=>e:"function"==typeof e?l.loader=e:"object"==typeof e&&(l={...l,...e});let s=(l={...l,...t}).loader;return(l.loadableGenerated&&(l={...l,...l.loadableGenerated},delete l.loadableGenerated),"boolean"!=typeof l.ssr||l.ssr)?r({...l,loader:()=>null!=s?s().then(a):Promise.resolve(a(()=>null))}):(delete l.webpack,delete l.modules,n(r,l))}("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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return l}});let l=r(51538)._(r(27378)).default.createContext(null)},21887:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let l=r(51538)._(r(27378)),i=r(28438),a=[],n=[],s=!1;function o(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}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 r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;function o(){if(!a){let t=new d(e,r);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!s){let e=r.webpack?r.webpack():r.modules;e&&n.push(t=>{for(let r of e)if(t.includes(r))return o()})}function u(e,t){!function(){o();let e=l.default.useContext(i.LoadableContext);e&&Array.isArray(r.modules)&&r.modules.forEach(t=>{e(t)})}();let n=l.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return l.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),l.default.useMemo(()=>{var t;return n.loading||n.error?l.default.createElement(r.loading,{isLoading:n.loading,pastDelay:n.pastDelay,timedOut:n.timedOut,error:n.error,retry:a.retry}):n.loaded?l.default.createElement((t=n.loaded)&&t.default?t.default:t,e):null},[e,n])}return u.preload=()=>o(),u.displayName="LoadableComponent",l.default.forwardRef(u)}(o,e)}function c(e,t){let r=[];for(;e.length;){let l=e.pop();r.push(l(t))}return Promise.all(r).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(a).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(s=!0,t());c(n,e).then(r,r)})),window.__NEXT_PRELOADREADY=u.preloadReady;let p=u},65218:function(e,t,r){e.exports=r(76737)}},function(e){e.O(0,[8033,6060,4481,8433,2888,9774,179],function(){return e(e.s=1565)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2369],{1565:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests",function(){return r(22017)}])},35287:function(e,t,r){"use strict";var l=r(24246),i=r(77181),a=r(88038),n=r.n(a);r(27378),t.Z=e=>{let{children:t,title:r,mainProps:a}=e;return(0,l.jsxs)(i.kCb,{"data-testid":r,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,l.jsxs)(n(),{children:[(0,l.jsxs)("title",{children:["Fides Admin UI - ",r]}),(0,l.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,l.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,l.jsx)(i.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...a,children:t})]})}},87361:function(e,t,r){"use strict";var l=r(24246),i=r(77181);t.Z=e=>{let{title:t,text:r,onClose:a}=e;return(0,l.jsxs)(i.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,l.jsx)(i.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:a}),(0,l.jsx)(i.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,l.jsxs)(i.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,l.jsx)(i.X6q,{fontSize:"md",children:t}),(0,l.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:r})]})]})}},96718:function(e,t,r){"use strict";r.d(t,{z:function(){return a}});var l=r(24246),i=r(77181);let a=e=>{let{...t}=e,r="multiple"===t.mode;return(0,l.jsx)(i.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,dropdownStyle:r?void 0:{width:"auto",minWidth:"200px"},className:"w-auto","data-testid":"filter-select",...t})}},97181:function(e,t,r){"use strict";r.d(t,{d:function(){return d}});var l=r(24246),i=r(77181),a=r(34090),n=r(27378),s=r(91613),o=r(40324);let d=e=>{let{name:t,label:r,labelProps:d,tooltip:u,isRequired:c,layout:p="inline",...m}=e,[h,v,{setValue:x}]=(0,a.U$)(t),f=!!(v.touched&&v.error),[y,b]=(0,n.useState)("");h.value||"tags"!==m.mode&&"multiple"!==m.mode||(h.value=[]),"tags"===m.mode&&"string"==typeof h.value&&(h.value=[h.value]);let _="tags"===m.mode?(e,t)=>e?e.value!==y||h.value.includes(y)?m.optionRender?m.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:m.optionRender||void 0,j=e=>{b(e),m.onSearch&&m.onSearch(e)},g=(e,t)=>{x(e),m.onChange&&m.onChange(e,t)};return"inline"===p?(0,l.jsx)(i.NIc,{isInvalid:f,isRequired:c,children:(0,l.jsxs)(i.rjZ,{templateColumns:r?"1fr 3fr":"1fr",children:[r?(0,l.jsx)(o.__,{htmlFor:m.id||t,...d,children:r}):null,(0,l.jsxs)(i.jqI,{align:"center",children:[(0,l.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,l.jsx)(i.WPr,{...h,id:m.id||t,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:_,onSearch:"tags"===m.mode?j:void 0,onChange:g,value:h.value||void 0,status:f?"error":void 0}),(0,l.jsx)(o.Bc,{isInvalid:f,message:v.error,fieldName:h.name})]}),u?(0,l.jsx)(s.Z,{label:u}):null]})]})}):(0,l.jsx)(i.NIc,{isInvalid:f,isRequired:c,children:(0,l.jsxs)(i.gCW,{alignItems:"start",children:[(0,l.jsxs)(i.jqI,{align:"center",children:[r?(0,l.jsx)(o.__,{htmlFor:m.id||t,fontSize:"xs",my:0,mr:1,...d,children:r}):null,u?(0,l.jsx)(s.Z,{label:u}):null]}),(0,l.jsx)(i.WPr,{...h,id:m.id||t,"data-testid":"controlled-select-".concat(h.name),...m,optionRender:_,onSearch:"tags"===m.mode?j:void 0,onChange:g,value:h.value||void 0,status:f?"error":void 0}),(0,l.jsx)(o.Bc,{isInvalid:f,message:v.error,fieldName:h.name})]})})}},71784:function(e,t,r){"use strict";r.d(t,{DE:function(){return o},I3:function(){return i},kN:function(){return n},qX:function(){return s},rE:function(){return a}});var l=r(21702);let i=[...new Map([[l.q2.APPROVED,"Approved"],[l.q2.CANCELED,"Canceled"],[l.q2.COMPLETE,"Completed"],[l.q2.DENIED,"Denied"],[l.q2.ERROR,"Error"],[l.q2.IN_PROCESSING,"In Progress"],[l.q2.PENDING,"New"],[l.q2.PAUSED,"Paused"],[l.q2.IDENTITY_UNVERIFIED,"Unverified"],[l.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,r]=e;return{label:r,value:t}}),a=new Map([[l.Us.ACCESS,"Access"],[l.Us.ERASURE,"Erasure"],[l.Us.CONSENT,"Consent"],[l.Us.UPDATE,"Update"]]),n=[...a].map(e=>{let[t,r]=e;return{label:r,value:t}}),s={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3"}},22017:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return es}});var l,i,a=r(24246),n=r(35287),s=r(77181),o=r(65218),d=r.n(o),u=r(27378),c=r(25980),p=r(19904),m=r(59003),h=r(92222),v=r(86677),x=r(16125),f=r(91317),y=r(14048),b=r(14481),_=r(90867),j=r(16394),g=r(71784),q=r(21702);let C={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:"alert",label:"Requires Input"}},E=e=>{let{value:t}=e;return(0,a.jsx)(b.A4,{color:C[t].colorScheme,value:C[t].label,"data-testid":"request-status-badge"})},R=e=>{let t,{daysLeft:r,timeframe:l=45,status:i,includeText:n=!1}=e;if(null==r||i===q.q2.COMPLETE||i===q.q2.CANCELED||i===q.q2.DENIED||i===q.q2.IDENTITY_UNVERIFIED)return null;let s=100*r/l;return s<25?t="error":s>=75?t="success":s>=25&&(t="warning"),(0,a.jsx)(b.A4,{value:n?"".concat(r," days left"):r.toString(),color:t})},w=e=>Array.from(new Set(e.filter(e=>Object.values(q.Us).includes(e.action_type)).map(e=>e.action_type))),S=e=>{let{value:t}=e,r=w(t).map(e=>g.rE.get(e));return(0,a.jsx)(b.WP,{value:r,cellState:{isExpanded:!0}})};var I=r(58452),P=r(57526),k=r(66548),T=r(45489);let D=e=>{let{subjectRequest:t,...r}=e,l=(0,s.qY0)(),i=(0,s.qY0)(),n=(0,s.qY0)(),{handleApproveRequest:o,handleDenyRequest:d,handleDeleteRequest:u,isLoading:c}=(0,T.Z)({subjectRequest:t});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.Ugi,{...r,children:["pending"!==t.status?null:(0,a.jsx)(s.wpx,{title:"Approve","aria-label":"Approve",icon:(0,a.jsx)(s.nQG,{w:2,h:2}),onClick:l.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-approve-btn",size:"small"}),"pending"!==t.status?null:(0,a.jsx)(s.wpx,{title:"Deny","aria-label":"Deny",icon:(0,a.jsx)(s.Two,{w:2,h:2}),onClick:i.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-deny-btn",size:"small"}),(0,a.jsx)(p.ZP,{scopes:[q.Sh.PRIVACY_REQUEST_DELETE],children:(0,a.jsx)(s.wpx,{title:"Delete","aria-label":"Delete",icon:(0,a.jsx)(s.pJl,{w:2,h:2}),onClick:n.onOpen,loading:c,disabled:c,"data-testid":"privacy-request-delete-btn",size:"small"})})]}),(0,a.jsx)(s.h_i,{children:(0,a.jsx)(P.Z,{isOpen:l.isOpen,isLoading:c,onClose:l.onClose,onApproveRequest:o,subjectRequest:t})}),(0,a.jsx)(s.h_i,{children:(0,a.jsx)(k.Z,{isOpen:i.isOpen,onClose:i.onClose,onDenyRequest:d})}),(0,a.jsx)(I.Z,{isOpen:n.isOpen,onClose:n.onClose,onConfirm:u,message:(0,a.jsx)(s.xvT,{children:"You are about to permanently delete the privacy request. Are you sure you would like to continue?"})})]})};(l=i||(i={})).STATUS="status",l.DAYS_LEFT="due_date",l.SOURCE="source",l.REQUEST_TYPE="request_type",l.SUBJECT_IDENTITY="subject_identity",l.TIME_RECEIVED="created_at",l.CREATED_BY="created_by",l.REVIEWER="reviewer",l.ID="id",l.ACTIONS="actions";let A=(0,h.Cl)(),O=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return[A.accessor(e=>e.status,{id:"status",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(E,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Status",...e})}),A.accessor(e=>e.days_left,{id:"due_date",cell:e=>{let{row:t,getValue:r}=e;return(0,a.jsx)(R,{daysLeft:r(),timeframe:t.original.policy.execution_timeframe,status:t.original.status})},header:e=>(0,a.jsx)(b.Rr,{value:"Days left",...e})}),...e?[A.accessor(e=>e.source,{id:"source",cell:e=>e.getValue()?(0,a.jsx)(b.A4,{value:e.getValue()}):(0,a.jsx)(b.G3,{value:void 0}),header:e=>(0,a.jsx)(b.Rr,{value:"Source",...e}),enableSorting:!1})]:[],A.accessor(e=>e.policy.rules,{id:"request_type",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(S,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Request type",...e}),enableSorting:!1}),A.accessor(e=>{var t,r;return(null===(t=e.identity)||void 0===t?void 0:t.email.value)||(null===(r=e.identity)||void 0===r?void 0:r.phone_number.value)||""},{id:"subject_identity",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Subject identity",...e}),enableSorting:!1}),A.accessor(e=>e.created_at,{id:"created_at",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:(0,j.p6)(t())})},header:e=>(0,a.jsx)(b.Rr,{value:"Time received",...e})}),A.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)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Reviewed by",...e}),enableSorting:!1}),A.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(b.G3,{value:t()})},header:e=>(0,a.jsx)(b.Rr,{value:"Request ID",...e}),enableSorting:!1}),A.display({id:"actions",cell:e=>{let{row:t}=e;return(0,a.jsx)(D,{subjectRequest:t.original})},header:e=>(0,a.jsx)(b.Rr,{value:"Actions",...e}),meta:{disableRowClick:!0}})]},N=e=>{let t=(0,x.v9)(_.dp),r=(0,x.I0)();return{handleStatusChange:t=>{r((0,_.CI)(t)),e()},handleActionTypeChange:t=>{r((0,_.aM)(t)),e()},handleFromChange:t=>{r((0,_.su)(null==t?void 0:t.target.value)),e()},handleToChange:t=>{r((0,_.Ue)(null==t?void 0:t.target.value)),e()},handleClearAllFilters:()=>{r((0,_.Mk)()),e()},...t}};var U=r(96718);let F=e=>{let{onClose:t,onFilterChange:r,...l}=e,{handleStatusChange:i,handleActionTypeChange:n,handleFromChange:o,handleToChange:d,handleClearAllFilters:u,from:c,to:p,status:m,action_type:h}=N(r);return(0,a.jsxs)(s.u_l,{onClose:t,size:"xl",...l,children:[(0,a.jsx)(s.ZAr,{}),(0,a.jsxs)(s.hzk,{children:[(0,a.jsx)(s.xBx,{borderBottomWidth:1,borderBottomColor:"gray.200",children:"All Filters"}),(0,a.jsx)(s.olH,{}),(0,a.jsx)(s.fef,{py:4,sx:{"& label":{mb:0}},children:(0,a.jsxs)(s.Kqy,{gap:4,children:[(0,a.jsxs)(s.Kqy,{children:[(0,a.jsx)(s.lXp,{size:"md",id:"request-date-range-label",children:"Date range"}),(0,a.jsxs)(s.Ugi,{gap:3,children:[(0,a.jsxs)(s.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(s.UiE,{as:"label",htmlFor:"from-date",borderRadius:"md",children:"From"}),(0,a.jsx)(s.IIB,{type:"date",name:"From",value:c,max:p||void 0,onChange:o,borderRadius:"md",id:"from-date","aria-describedby":"request-date-range-label"})]}),(0,a.jsxs)(s.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(s.UiE,{as:"label",htmlFor:"to-date",borderRadius:"md",children:"To"}),(0,a.jsx)(s.IIB,{type:"date",borderRadius:"md",name:"To",value:p,min:c||void 0,onChange:d,id:"to-date","aria-describedby":"request-date-range-label"})]})]})]}),(0,a.jsxs)(s.Kqy,{children:[(0,a.jsx)(s.lXp,{size:"md",htmlFor:"request-status",children:"Status"}),(0,a.jsx)(U.z,{id:"request-status",mode:"multiple",options:g.I3,value:m,onChange:i,"data-testid":"request-status-filter"})]}),(0,a.jsxs)(s.Kqy,{children:[(0,a.jsx)(s.lXp,{size:"md",htmlFor:"request-action-type",children:"Request Type"}),(0,a.jsx)(U.z,{id:"request-action-type",mode:"multiple",options:g.kN,value:h,onChange:n,"data-testid":"request-action-type-filter"})]})]})}),(0,a.jsxs)(s.mzw,{justifyContent:"space-between",children:[(0,a.jsx)(s.wpx,{type:"text",onClick:u,children:"Clear all"}),(0,a.jsx)(s.wpx,{type:"primary",onClick:t,children:"Done"})]})]})]})},z=e=>{let{...t}=e,{plus:r}=(0,c.hz)(),[l,i]=(0,u.useState)(""),n=(0,x.v9)(_.dp),o=(0,x.v9)(f.rK),d=(0,s.pmc)(),p=(0,v.useRouter)(),j=(0,x.I0)(),{PAGE_SIZES:g,pageSize:q,setPageSize:C,onPreviousPageClick:E,isPreviousPageDisabled:R,onNextPageClick:w,isNextPageDisabled:S,startRange:I,endRange:P,pageIndex:k,setTotalPages:T,resetPageIndexToDefault:D}=(0,b.oi)(),{isOpen:A,onOpen:N,onClose:U}=(0,s.qY0)(),{data:z,isLoading:Z,isFetching:M}=(0,_.QA)({...n,page:k,size:q}),{items:V,total:Y}=(0,u.useMemo)(()=>{let e=z||{items:[],total:0,pages:0};return T(e.pages),e},[z,T]),G=(0,u.useCallback)(e=>{j((0,_.mU)(e)),i(e),D()},[j,D,i]),B=async()=>{let e;try{await (0,_.py)({...n,token:o})}catch(t){e=t instanceof Error?t.message:"Unknown error occurred"}e&&d({description:"".concat(e),duration:5e3,status:"error"})},L=e=>{p.push("/privacy-requests/".concat(e))},W=(0,m.b7)({getCoreRowModel:(0,h.sC)(),data:V,columns:(0,u.useMemo)(()=>O(r),[r]),getRowId:e=>"".concat(e.status,"-").concat(e.id),manualPagination:!0,columnResizeMode:"onChange"});return(0,a.jsxs)(s.xuv,{...t,children:[(0,a.jsxs)(b.Q$,{children:[(0,a.jsx)(b.HO,{globalFilter:l,setGlobalFilter:G,placeholder:"Search by request ID or identity value"}),(0,a.jsxs)(s.Ugi,{alignItems:"center",spacing:2,children:[(0,a.jsx)(s.wpx,{"data-testid":"filter-btn",onClick:N,children:"Filter"}),(0,a.jsx)(s.wpx,{"aria-label":"Export report","data-testid":"export-btn",icon:(0,a.jsx)(y.nM,{ml:"1.5px"}),onClick:B})]}),(0,a.jsx)(s.h_i,{children:(0,a.jsx)(F,{isOpen:A,onClose:U,onFilterChange:D})})]}),Z?(0,a.jsx)(s.xuv,{p:2,borderWidth:1,children:(0,a.jsx)(b.I4,{rowHeight:26,numRows:10})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.ZK,{tableInstance:W,onRowClick:e=>L(e.id),onSort:e=>{if(!e){j((0,_.p2)()),D();return}let{id:t,desc:r}=e;j((0,_.PU)(t)),j((0,_.iX)(r?"desc":"asc")),D()}}),(0,a.jsx)(b.s8,{totalRows:Y||0,pageSizes:g,setPageSize:C,onPreviousPageClick:E,isPreviousPageDisabled:R||M,onNextPageClick:w,isNextPageDisabled:S||M,startRange:I,endRange:P})]})]})};var Z=r(812),M=r(87361),V=r(46628),Y=r(34090),G=r(55484),B=r(40324);let L=(e,t)=>null==t?void 0:t.find(t=>t.policy_key===e),W=e=>{var t,r;if(!e)return G.Ry().shape({policy_key:G.Z_().required().label("Request type")});let l=e.custom_privacy_request_fields?Object.entries(e.custom_privacy_request_fields).map(e=>{let[t,r]=e;return{[t]:G.Ry().shape({value:r.required&&!r.hidden?G.Z_().required().label(r.label):G.Z_().nullable()})}}).reduce((e,t)=>({...e,...t}),{}):{};return G.Ry().shape({policy_key:G.Z_().required().label("Request type"),identity:G.Ry().shape({email:(null===(t=e.identity_inputs)||void 0===t?void 0:t.email)==="required"?G.Z_().email().required().label("Email address"):G.Z_().nullable(),phone_number:(null===(r=e.identity_inputs)||void 0===r?void 0:r.phone)==="required"?G.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").required().label("Phone number"):G.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").nullable()}),custom_privacy_request_fields:G.Ry().shape(l)})};var X=r(97181);let K={is_verified:!1,policy_key:"",identity:{}},Q=e=>{let{identityInputs:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[t.email?(0,a.jsx)(B.j0,{name:"identity.email",label:"User email address",isRequired:"required"===t.email,variant:"stacked"}):null,t.phone?(0,a.jsx)(B.j0,{name:"identity.phone_number",label:"User phone number",isRequired:"required"===t.phone,variant:"stacked"}):null]}):null},H=e=>{let{customFieldInputs:t}=e;if(!t)return null;let r=Object.entries(t);return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let[t,r]=e;return(0,a.jsx)(B.j0,{name:"custom_privacy_request_fields.".concat(t,".value"),label:r.label,isRequired:!!r.required,variant:"stacked"},t)})})};var $=e=>{let{onSubmit:t,onCancel:r}=e,{data:l}=(0,_.xv)();return(0,a.jsx)(Y.J9,{initialValues:K,onSubmit:t,validationSchema:()=>(0,G.Vo)(e=>W(L(e.policy_key,null==l?void 0:l.actions))),children:e=>{var t;let{values:i,dirty:n,isValid:o,isSubmitting:d,setFieldValue:u}=e,c=L(i.policy_key,null==l?void 0:l.actions);return(0,a.jsx)(Y.l0,{children:(0,a.jsxs)(s.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(X.d,{name:"policy_key",label:"Request type",options:null!==(t=null==l?void 0:l.actions.map(e=>({label:e.title,value:e.policy_key})))&&void 0!==t?t:[],onChange:e=>{let t=L(e,null==l?void 0:l.actions);if(!(null==t?void 0:t.custom_privacy_request_fields)){u("custom_privacy_request_fields",void 0);return}u("custom_privacy_request_fields",Object.entries(t.custom_privacy_request_fields).map(e=>{let[t,r]=e;return{[t]:{label:r.label,value:r.default_value}}}).reduce((e,t)=>({...e,...t}),{}))},layout:"stacked",isRequired:!0}),(0,a.jsx)(Q,{identityInputs:null==c?void 0:c.identity_inputs}),(0,a.jsx)(H,{customFieldInputs:null==c?void 0:c.custom_privacy_request_fields}),(0,a.jsx)(B.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)(s.wpx,{onClick:r,children:"Cancel"}),(0,a.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:!i.is_verified||!n||!o,loading:d,"data-testid":"submit-btn",children:"Create"})]})]})})}})},J=r(31883);let ee=e=>{let{isOpen:t,onClose:r}=e,[l]=(0,_.M6)(),i=(0,s.pmc)(),n=async e=>{let{is_verified:t,...a}=e,n=a.custom_privacy_request_fields?Object.entries(a.custom_privacy_request_fields).map(e=>{let[t,r]=e;return r.value?{[t]:r}:{}}).reduce((e,t)=>({...e,...t}),{}):void 0,s={...a,custom_privacy_request_fields:n},o=await l([s]);(0,J.D4)(o)?i((0,V.Vo)((0,Z.e$)(o.error,"An error occurred while creating this privacy request. Please try again"))):i((0,V.t5)("Privacy request created")),r()};return(0,a.jsxs)(s.u_l,{isOpen:t,onClose:r,size:"2xl",isCentered:!0,children:[(0,a.jsx)(s.ZAr,{}),(0,a.jsxs)(s.hzk,{"data-testid":"submit-request-modal",maxHeight:"80%",overflowY:"auto",children:[(0,a.jsx)(s.xBx,{children:"Create privacy request"}),(0,a.jsx)(s.fef,{children:(0,a.jsxs)(s.Kqy,{spacing:4,children:[(0,a.jsx)(M.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)($,{onSubmit:n,onCancel:()=>r()})]})})]})]})};var et=()=>{let{onOpen:e,isOpen:t,onClose:r}=(0,s.qY0)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ee,{isOpen:t,onClose:r}),(0,a.jsx)(s.wpx,{type:"primary",onClick:e,"data-testid":"submit-request-btn",children:"Create request"})]})},er=r(58754),el=r(14047);let ei=()=>{let{errorAlert:e}=(0,el.V)(),[t,r]=(0,u.useState)(!1),[l,i]=(0,u.useState)({count:0,total:0}),[n,o]=(0,u.useState)(!0),d=q.q2.ERROR,{data:c}=(0,_.tE)(),{data:p}=(0,_.QA)({status:[d]},{pollingInterval:15e3,skip:n});return(0,u.useEffect)(()=>{o(!(c&&c.notify_after_failures>0))},[c]),(0,u.useEffect)(()=>{let e=(null==p?void 0:p.total)||0;e>=((null==c?void 0:c.notify_after_failures)||0)&&e>l.total?(i({count:e-l.total,total:e}),r(!0)):r(!1)},[null==p?void 0:p.total,null==c?void 0:c.notify_after_failures,l.total]),{processing:()=>{t&&e((0,a.jsxs)(s.xuv,{children:["DSR automation has failed for"," ",(0,a.jsx)(s.xvT,{as:"span",fontWeight:"semibold",children:l.count})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null,id:"dsrErrorAlert"})}}},ea=d()(()=>r.e(9676).then(r.bind(r,59676)),{loadableGenerated:{webpack:()=>[59676]},loading:()=>(0,a.jsx)("div",{children:"Loading..."})});var en=()=>{let{processing:e}=ei(),{plus:t}=(0,c.hz)();return(0,u.useEffect)(()=>{e()},[e]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(er.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests"}],rightContent:(0,a.jsxs)(s.vyj,{children:[t&&(0,a.jsx)(p.ZP,{scopes:[q.Sh.PRIVACY_REQUEST_CREATE],children:(0,a.jsx)(et,{})}),(0,a.jsx)(ea,{})]}),"data-testid":"privacy-requests"}),(0,a.jsx)(z,{})]})},es=()=>(0,a.jsx)(n.Z,{title:"Privacy Requests",children:(0,a.jsx)(en,{})})},31883:function(e,t,r){"use strict";r.d(t,{Bw:function(){return l.Bw},D4:function(){return l.D4}});var l=r(19043)},76737:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},noSSR:function(){return n}});let l=r(51538);r(24246),r(27378);let i=l._(r(21887));function a(e){return{default:(null==e?void 0:e.default)||e}}function n(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let r=i.default,l={loading:e=>{let{error:t,isLoading:r,pastDelay:l}=e;return null}};e instanceof Promise?l.loader=()=>e:"function"==typeof e?l.loader=e:"object"==typeof e&&(l={...l,...e});let s=(l={...l,...t}).loader;return(l.loadableGenerated&&(l={...l,...l.loadableGenerated},delete l.loadableGenerated),"boolean"!=typeof l.ssr||l.ssr)?r({...l,loader:()=>null!=s?s().then(a):Promise.resolve(a(()=>null))}):(delete l.webpack,delete l.modules,n(r,l))}("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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return l}});let l=r(51538)._(r(27378)).default.createContext(null)},21887:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let l=r(51538)._(r(27378)),i=r(28438),a=[],n=[],s=!1;function o(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}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 r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;function o(){if(!a){let t=new d(e,r);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!s){let e=r.webpack?r.webpack():r.modules;e&&n.push(t=>{for(let r of e)if(t.includes(r))return o()})}function u(e,t){!function(){o();let e=l.default.useContext(i.LoadableContext);e&&Array.isArray(r.modules)&&r.modules.forEach(t=>{e(t)})}();let n=l.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return l.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),l.default.useMemo(()=>{var t;return n.loading||n.error?l.default.createElement(r.loading,{isLoading:n.loading,pastDelay:n.pastDelay,timedOut:n.timedOut,error:n.error,retry:a.retry}):n.loaded?l.default.createElement((t=n.loaded)&&t.default?t.default:t,e):null},[e,n])}return u.preload=()=>o(),u.displayName="LoadableComponent",l.default.forwardRef(u)}(o,e)}function c(e,t){let r=[];for(;e.length;){let l=e.pop();r.push(l(t))}return Promise.all(r).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(a).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(s=!0,t());c(n,e).then(r,r)})),window.__NEXT_PRELOADREADY=u.preloadReady;let p=u},65218:function(e,t,r){e.exports=r(76737)}},function(e){e.O(0,[8033,6060,4481,8433,2888,9774,179],function(){return e(e.s=1565)}),_N_E=e.O()}]);