ethyca-fides 2.68.1b3__py2.py3-none-any.whl → 2.68.1b4__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (248) hide show
  1. {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.68.1b4.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.68.1b4.dist-info}/RECORD +227 -221
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/b1a2c3d4e5f6_add_location_to_privacy_request.py +26 -0
  5. fides/api/api/v1/api.py +2 -0
  6. fides/api/api/v1/endpoints/dsr_package_link.py +167 -0
  7. fides/api/api/v1/endpoints/privacy_request_endpoints.py +30 -0
  8. fides/api/api/v1/endpoints/user_endpoints.py +4 -0
  9. fides/api/models/privacy_request/privacy_request.py +1 -0
  10. fides/api/models/privacy_request/webhook.py +33 -1
  11. fides/api/oauth/utils.py +122 -57
  12. fides/api/schemas/application_config.py +7 -0
  13. fides/api/schemas/connection_configuration/connection_type_system_map.py +6 -0
  14. fides/api/schemas/enums/__init__.py +0 -0
  15. fides/api/schemas/enums/connection_category.py +20 -0
  16. fides/api/schemas/enums/integration_feature.py +23 -0
  17. fides/api/schemas/external_https.py +9 -0
  18. fides/api/schemas/privacy_request.py +16 -0
  19. fides/api/schemas/saas/display_info.py +19 -0
  20. fides/api/schemas/saas/saas_config.py +2 -0
  21. fides/api/schemas/storage/storage.py +2 -0
  22. fides/api/service/privacy_request/request_runner_service.py +41 -4
  23. fides/api/util/connection_type.py +20 -0
  24. fides/api/util/text.py +51 -0
  25. fides/common/api/v1/urn_registry.py +3 -0
  26. fides/service/privacy_request/privacy_request_service.py +83 -0
  27. fides/ui-build/static/admin/404.html +1 -1
  28. fides/ui-build/static/admin/_next/static/LRCvfOqg1kP5kGnkD84G4/_buildManifest.js +1 -0
  29. fides/ui-build/static/admin/_next/static/chunks/1099-b973dfdfc5c3de90.js +1 -0
  30. fides/ui-build/static/admin/_next/static/chunks/{1345-ab756811e19ff4fc.js → 1345-b60d1f3442379c73.js} +1 -1
  31. fides/ui-build/static/admin/_next/static/chunks/{1817-fd21f1f5ef0faffa.js → 1817-74692de5d760a664.js} +1 -1
  32. fides/ui-build/static/admin/_next/static/chunks/{1975.16126463309143e3.js → 1975.78e719130cfe3fd6.js} +1 -1
  33. fides/ui-build/static/admin/_next/static/chunks/{2921-0e5cc63a82e31830.js → 2921-2d9261e8e2e127c0.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/{3620-6cceae71bae5b531.js → 3620-ebd89f91b82661e8.js} +1 -1
  35. fides/ui-build/static/admin/_next/static/chunks/3729-ccf90cdaae158f39.js +1 -0
  36. fides/ui-build/static/admin/_next/static/chunks/3847-2759bf1f47a1d29e.js +1 -0
  37. fides/ui-build/static/admin/_next/static/chunks/{3855-64541570e2f838fb.js → 3855-4174a4d4c205d6e8.js} +1 -1
  38. fides/ui-build/static/admin/_next/static/chunks/{3872-7a18d18a5e287e4e.js → 3872-660aba76572c811b.js} +1 -1
  39. fides/ui-build/static/admin/_next/static/chunks/{3923-5c87b3d7f1626678.js → 3923-c6cdc2e5278ae9a7.js} +1 -1
  40. fides/ui-build/static/admin/_next/static/chunks/{401-3902e3e98790d401.js → 401-8bc2c6c84172c096.js} +1 -1
  41. fides/ui-build/static/admin/_next/static/chunks/{4121-64ef70ef906bbdd0.js → 4121-9a4ebceff9accb7f.js} +1 -1
  42. fides/ui-build/static/admin/_next/static/chunks/{4608-70521532195124de.js → 4608-4d31340b0d0157c1.js} +1 -1
  43. fides/ui-build/static/admin/_next/static/chunks/4786-aaef673b30c19e2e.js +1 -0
  44. fides/ui-build/static/admin/_next/static/chunks/4808-a654c7f7a1ca62c8.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/{4844-351f99b6644b654e.js → 4844-cd7e1d0c7bb94094.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/{5258-c6f96dc740eb5fb1.js → 5258-bc4a25d43e4aa07d.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/{5487-338800277d36b8d7.js → 5487-37c78c4799ba5223.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/549-2213dc1c34143cda.js +1 -0
  49. fides/ui-build/static/admin/_next/static/chunks/{6084-da63f20d9416a982.js → 6084-55cc66e7c94f0686.js} +1 -1
  50. fides/ui-build/static/admin/_next/static/chunks/{6853-1d947b75eb07188c.js → 6853-313ce974d33432fb.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/{6954-24f9a4f27d67b732.js → 6954-021bd06d0ab59c3c.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/{7476-a0dd03bfccf60d0c.js → 7476-2fc286c2a9125eb8.js} +1 -1
  53. fides/ui-build/static/admin/_next/static/chunks/{7630-9fbe06cfb98266fe.js → 7630-b9a41262a69edf5e.js} +1 -1
  54. fides/ui-build/static/admin/_next/static/chunks/768-034e121688a3bbdd.js +1 -0
  55. fides/ui-build/static/admin/_next/static/chunks/{787-3dd31844cf7fec55.js → 787-8df7118742e84908.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/{79-dcd20e8b09501c17.js → 79-d2ace89108ead8ae.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/{796-8773e04b64ce2260.js → 796-2de6dac5f311d54a.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/8002-cfdc6574bd841892.js +1 -0
  59. fides/ui-build/static/admin/_next/static/chunks/{9046-57eab238570b8bf4.js → 9046-c44e41da49338c6c.js} +1 -1
  60. fides/ui-build/static/admin/_next/static/chunks/{9676.bf0a8a6ff6dfd2af.js → 9676.b7d5d1d90b9da224.js} +1 -1
  61. fides/ui-build/static/admin/_next/static/chunks/{9826-756c958aecab59a2.js → 9826-d9addbd5ac990fa4.js} +1 -1
  62. fides/ui-build/static/admin/_next/static/chunks/{9951-cdf73904a3adb27b.js → 9951-6ee5c0a23951a07f.js} +1 -1
  63. fides/ui-build/static/admin/_next/static/chunks/pages/{404-dd625a559ada46ca.js → 404-9644eb282f2dcd71.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-b6b09b2878b77b21.js → _app-284cba7174fa1f16.js} +11 -11
  65. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-92cf5e313be1f9e2.js → manual-42b7fd34712f49bd.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-d6c525ee731a2993.js → multiple-4f164eab0960bbe0.js} +1 -1
  67. fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-5664a3ea796e5ffb.js → add-systems-985d3c9179e69d7f.js} +1 -1
  68. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-78f13de90111fd80.js → add-vendors-61090926e5f98a5d.js} +1 -1
  69. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-0fc678f3d6d2fcec.js → configure-17ffe691b91cee2e.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-126db59dc25ca326.js → [id]-95c13bca5c1e575e.js} +1 -1
  71. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-289605267d6cce7e.js → privacy-experience-609399510a60beb9.js} +1 -1
  72. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-e9fd9b28ac9705af.js → [id]-d7d8f228ac74b26e.js} +1 -1
  73. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-28c003b6043bd16c.js → new-821c0f82d5a2b7d4.js} +1 -1
  74. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-c643eff04525298e.js → privacy-notices-8365782543cf6ab9.js} +1 -1
  75. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-3ef5d01779a26455.js → properties-40a7aa65f4d13cf9.js} +1 -1
  76. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-baa4a2f8f08ac224.js → reporting-e4bacfc5c2ed2324.js} +1 -1
  77. fides/ui-build/static/admin/_next/static/chunks/pages/{consent-8d4be9e7ec7d2a35.js → consent-70c5c6aa5389d99f.js} +1 -1
  78. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-f27ec4578c674181.js → [resourceUrn]-adc500a03e239857.js} +1 -1
  79. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-27b6c255bd9e73b6.js → [projectUrn]-3207f62e5012611b.js} +1 -1
  80. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-0f66dac32040519c.js → projects-7b42dee0fb696658.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-3b938562df81c4b0.js → [resourceUrn]-c8b3d090e4ba60d3.js} +1 -1
  82. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-31a45ea2ca2a7f04.js +1 -0
  83. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-6172c2eb539319fd.js +1 -0
  84. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-945d354ff057fb03.js +1 -0
  85. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-d9795e00f39cf4e9.js +1 -0
  86. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-21c141279e66237a.js → activity-657833fd8528280f.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-3bc6a207693fd175.js → [resourceUrn]-22eec362dfbb1d2a.js} +1 -1
  88. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-da16e73df395ad1d.js → detection-4decce5ef996e563.js} +1 -1
  89. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-04b242632a114405.js → [resourceUrn]-01acdd1ad492fd89.js} +1 -1
  90. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-900fe50183a40d72.js → discovery-85fdbf4cde60d910.js} +1 -1
  91. fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-4f1f7c3a9531a8f4.js → datamap-3a4b89fb21d14753.js} +1 -1
  92. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-343294dcb10d9532.js → [...subfieldNames]-cb8d303f56091bd5.js} +1 -1
  93. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-1c097a0809fa5b6f.js → [collectionName]-401c8be76d9daec7.js} +1 -1
  94. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-b47fa2498b534719.js → [datasetId]-97e2d375b21cfe43.js} +1 -1
  95. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-a31f881cab25704a.js → new-40ef544ca1f2c9b9.js} +1 -1
  96. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-858c59c9e67e318d.js → dataset-e3c763f8e71f8e24.js} +1 -1
  97. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-16c28d272225afb6.js → [id]-152e5d15705ec072.js} +1 -1
  98. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-651b10cae0e99a05.js +1 -0
  99. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-03c54bc9fb18d2b0.js +1 -0
  100. fides/ui-build/static/admin/_next/static/chunks/pages/{index-fec557d99211f577.js → index-3d19b9ffa15a928a.js} +1 -1
  101. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-4b0bb4ccfb237d41.js +1 -0
  102. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-78d4e0c14654148b.js +1 -0
  103. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-4a08ca7762a19700.js → [id]-72cb360a6d14e701.js} +1 -1
  104. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-343a965dcdb3d11e.js → add-template-0ed67cf774d5cbf5.js} +1 -1
  105. fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-3ade4c54b1c8a11e.js → messaging-b06a2204e2a5b667.js} +1 -1
  106. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-9103bfb854f71410.js → ant-components-7050899b3f792129.js} +1 -1
  107. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-3b97029bd4d3c3ea.js → AntForm-7c3466f4d5797e55.js} +1 -1
  108. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-9d9beb8f0d8a278c.js → FormikAntFormItem-8de252f25871bab9.js} +1 -1
  109. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-84a4d8fc60f839ed.js → FormikControlled-cd6de0da47f980cf.js} +1 -1
  110. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-1fccf542ab2e33bf.js → FormikField-7c238a881fe30e28.js} +1 -1
  111. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-aa75263ae1ba67bb.js → forms-d4f3e8f67f76f146.js} +1 -1
  112. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-db334a1cbb102255.js → table-migration-c9220e20c1d93758.js} +1 -1
  113. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-11c1e4545c8f528c.js → [id]-b9d6886a3f157120.js} +1 -1
  114. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-192a986f61c23268.js → messaging-9c1fd7867b2d80d7.js} +1 -1
  115. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-9216ac993d71387e.js → storage-fc959ed21dbce38c.js} +1 -1
  116. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-e55ec84d5380401d.js → configure-44a4a638dcb2722a.js} +1 -1
  117. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-1433c9f9501a884f.js +1 -0
  118. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-a74b51b704b80cb2.js → [id]-16e0b42cb342aa5f.js} +1 -1
  119. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-8d23f0c55ff6510a.js → add-property-ebd114a86b809391.js} +1 -1
  120. fides/ui-build/static/admin/_next/static/chunks/pages/{properties-77acceac4f99e7af.js → properties-901be5fa4a48f48c.js} +1 -1
  121. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-da9ced1e20681154.js +1 -0
  122. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-6aad3f563ed03b3f.js → alpha-0174554c0ac5958f.js} +1 -1
  123. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-c1b8f3606d160bb1.js → about-6f45ddbf675e66d2.js} +1 -1
  124. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-d9f7f78810d58d08.js → [purpose_id]-275c49e6089c5c9f.js} +1 -1
  125. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-ee2c7dde99b1dafb.js → consent-1a8d05e19f06d857.js} +1 -1
  126. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-49d86b9ca4523ca6.js +1 -0
  127. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-31c270d228e00581.js → domain-records-f71b4b95d91db926.js} +1 -1
  128. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-996b3f250dd3ea1f.js → domains-a595cad18cf04673.js} +1 -1
  129. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-ee94981326ddcbf4.js → email-templates-6f7f9751689b042c.js} +1 -1
  130. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-0b831c58966782b8.js → locations-e2c88d7f779fe604.js} +1 -1
  131. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-94271ba4a224a353.js → organization-c65acd2b7ab04753.js} +1 -1
  132. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-41b8136e50320fd3.js → regulations-c1c699eeb40a9dc0.js} +1 -1
  133. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-52b45569cbc82e60.js → test-datasets-a274e2191b87e315.js} +1 -1
  134. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-36d74e93e54aabaf.js → [id]-4a48b4f996a64957.js} +1 -1
  135. fides/ui-build/static/admin/_next/static/chunks/pages/{systems-24dfc8e2279ced2e.js → systems-30debc87925634d9.js} +1 -1
  136. fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-d9675cf5e6083b27.js → taxonomy-ca625b1296a029f0.js} +1 -1
  137. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-866826d7959df487.js → [id]-7a3180b235eb8846.js} +1 -1
  138. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-e63b61a8f99ccd57.js → user-management-5e2d0acf575252ca.js} +1 -1
  139. fides/ui-build/static/admin/_next/static/chunks/{webpack-6d0a487039bcf30c.js → webpack-4502d4d67006b48f.js} +1 -1
  140. fides/ui-build/static/admin/_next/static/css/43d0c0fc207767eb.css +1 -0
  141. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  142. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  143. fides/ui-build/static/admin/add-systems.html +1 -1
  144. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  145. fides/ui-build/static/admin/consent/configure.html +1 -1
  146. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  147. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  148. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  149. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  150. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  151. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  152. fides/ui-build/static/admin/consent/properties.html +1 -1
  153. fides/ui-build/static/admin/consent/reporting.html +1 -1
  154. fides/ui-build/static/admin/consent.html +1 -1
  155. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  156. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  157. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  158. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  159. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  160. fides/ui-build/static/admin/data-catalog.html +1 -1
  161. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  162. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  163. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  164. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  165. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  166. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  167. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  168. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  169. fides/ui-build/static/admin/datamap.html +1 -1
  170. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  171. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  172. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  173. fides/ui-build/static/admin/dataset/new.html +1 -1
  174. fides/ui-build/static/admin/dataset.html +1 -1
  175. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  176. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  177. fides/ui-build/static/admin/datastore-connection.html +1 -1
  178. fides/ui-build/static/admin/index.html +1 -1
  179. fides/ui-build/static/admin/integrations/[id].html +1 -1
  180. fides/ui-build/static/admin/integrations.html +1 -1
  181. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  182. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  183. fides/ui-build/static/admin/login/[provider].html +1 -1
  184. fides/ui-build/static/admin/login.html +1 -1
  185. fides/ui-build/static/admin/messaging/[id].html +1 -1
  186. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  187. fides/ui-build/static/admin/messaging.html +1 -1
  188. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  189. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  190. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  191. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  192. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  193. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  194. fides/ui-build/static/admin/poc/forms.html +1 -1
  195. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  196. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  197. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  198. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  199. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  200. fides/ui-build/static/admin/privacy-requests.html +1 -1
  201. fides/ui-build/static/admin/properties/[id].html +1 -1
  202. fides/ui-build/static/admin/properties/add-property.html +1 -1
  203. fides/ui-build/static/admin/properties.html +1 -1
  204. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  205. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  206. fides/ui-build/static/admin/settings/about.html +1 -1
  207. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  208. fides/ui-build/static/admin/settings/consent.html +1 -1
  209. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  210. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  211. fides/ui-build/static/admin/settings/domains.html +1 -1
  212. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  213. fides/ui-build/static/admin/settings/locations.html +1 -1
  214. fides/ui-build/static/admin/settings/organization.html +1 -1
  215. fides/ui-build/static/admin/settings/regulations.html +1 -1
  216. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  217. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  218. fides/ui-build/static/admin/systems.html +1 -1
  219. fides/ui-build/static/admin/taxonomy.html +1 -1
  220. fides/ui-build/static/admin/user-management/new.html +1 -1
  221. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  222. fides/ui-build/static/admin/user-management.html +1 -1
  223. fides/ui-build/static/admin/_next/static/_BLI2ArqQzY5XnXbrcxa2/_buildManifest.js +0 -1
  224. fides/ui-build/static/admin/_next/static/chunks/1099-7b2085a3931da9e4.js +0 -1
  225. fides/ui-build/static/admin/_next/static/chunks/1138-0d846ffef62c580f.js +0 -1
  226. fides/ui-build/static/admin/_next/static/chunks/3729-7d2d52400f1f7413.js +0 -1
  227. fides/ui-build/static/admin/_next/static/chunks/4786-53ef1662f2d0d98c.js +0 -1
  228. fides/ui-build/static/admin/_next/static/chunks/4808-8713433c84a62efe.js +0 -1
  229. fides/ui-build/static/admin/_next/static/chunks/549-e6453a3526023e85.js +0 -1
  230. fides/ui-build/static/admin/_next/static/chunks/602-80d113e801d7407d.js +0 -1
  231. fides/ui-build/static/admin/_next/static/chunks/8002-dcd02da6e5649a1c.js +0 -1
  232. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-ebf5e7fa4e2ffb49.js +0 -1
  233. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-b27c660039d951c9.js +0 -1
  234. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-8ce5d24af470888e.js +0 -1
  235. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-8e35e33928abbcdc.js +0 -1
  236. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-68f502d8b0b5792c.js +0 -1
  237. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-1eb9acb17b133fd1.js +0 -1
  238. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-e613543818d6cbd2.js +0 -1
  239. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-8069f7c33695fd45.js +0 -1
  240. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-48f447b31c786b80.js +0 -1
  241. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-e60d398e255f4e00.js +0 -1
  242. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-a4dad8ca9de2d07b.js +0 -1
  243. fides/ui-build/static/admin/_next/static/css/92441453b27e9c34.css +0 -1
  244. {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.68.1b4.dist-info}/WHEEL +0 -0
  245. {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.68.1b4.dist-info}/entry_points.txt +0 -0
  246. {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.68.1b4.dist-info}/licenses/LICENSE +0 -0
  247. {ethyca_fides-2.68.1b3.dist-info → ethyca_fides-2.68.1b4.dist-info}/top_level.txt +0 -0
  248. /fides/ui-build/static/admin/_next/static/{_BLI2ArqQzY5XnXbrcxa2 → LRCvfOqg1kP5kGnkD84G4}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4786],{30454:function(e,s,t){var a=t(40699);e.exports=function(e){return a(e,5)}},77867:function(e,s,t){"use strict";var a=t(24246),i=t(39941);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},59301:function(e,s,t){"use strict";var a=t(24246);let{Link:i}=t(39941).AntTypography;s.Z=e=>(0,a.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...e})},19904:function(e,s,t){"use strict";t.d(s,{Tg:function(){return r}});var a=t(24246),i=t(16134),n=t(31793);let r=e=>(0,i.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return r(s)?(0,a.jsx)(a.Fragment,{children:t}):null}},83099:function(e,s,t){"use strict";var a=t(24246),i=t(79283),n=t(34929);s.Z=e=>{let{selectedTaxonomies:s,showDisabled:t=!1,...r}=e,{getDataUseDisplayNameProps:l,getDataUses:o}=(0,n.Z)(),d=(t?o():o().filter(e=>e.active)).filter(e=>!s.includes(e.fides_key)).map(e=>{let{name:s,primaryName:t}=l(e.fides_key);return{value:e.fides_key,name:s,primaryName:t,description:e.description||""}});return(0,a.jsx)(i.l,{options:d,...r})}},16220:function(e,s,t){"use strict";t.d(s,{V:function(){return n}});var a=t(25980),i=t(77830);let n=()=>({systemOrDatamapRoute:(0,a.hz)().plus?i.oG:i.So})},90111:function(e,s,t){"use strict";var a=t(24246),i=t(39941);s.Z=e=>{let{children:s,...t}=e;return(0,a.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...t,children:s})}},44553:function(e,s,t){"use strict";t.d(s,{Z:function(){return g}});var a=t(24246),i=t(39941),n=t(27378),r=t(45277),l=t(16125),o=t(812),d=t(46628),c=t(20682),u=t(54427),p=t(52253),m=t(78780);let{reducer:h}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:x}=m.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let s=new FormData;return s.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:s}},invalidatesTags:()=>["Connection Type"]})})});var g=e=>{let{isOpen:s,onClose:t,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[m,h]=(0,n.useState)(null),g=(0,i.pmc)(),{getRootProps:y,getInputProps:f,isDragActive:_}=(0,r.uI)({onDrop:e=>{var s;if("zip"!==(null===(s=e[0].name.split(".").pop())||void 0===s?void 0:s.toLowerCase())){g((0,d.Vo)("Only zip files are allowed."));return}h(e[0])}}),[b,{isLoading:j}]=x(),{refetch:v}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(m)try{var e;await b(m).unwrap(),g((0,d.t5)("Integration template uploaded successfully."));let{data:s}=await v();p((0,c.fP)(null!==(e=null==s?void 0:s.items)&&void 0!==e?e:[])),t()}catch(e){g((0,d.Vo)((0,o.e$)(e)))}finally{h(null)}};return(0,a.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"2xl",children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,a.jsx)(i.xBx,{children:"Upload integration template"}),(0,a.jsxs)(i.fef,{children:[(0,a.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,a.jsxs)(i.xuv,{...y(),bg:_?"gray.100":"gray.50",border:"2px dashed",borderColor:_?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,a.jsx)("input",{...f()}),m?(0,a.jsx)(i.xvT,{children:m.name}):_?(0,a.jsx)(i.xvT,{children:"Drop the file here..."}):(0,a.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,a.jsx)(i.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,a.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,a.jsx)(i.wpx,{onClick:t,"data-testid":"cancel-btn",disabled:j,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!m||j,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},26183:function(e,s,t){"use strict";var a=t(24246);t(27378),s.Z=e=>{let{children:s,className:t,...i}=e;return(0,a.jsx)("div",{className:"relative flex w-full flex-wrap items-center gap-2 overflow-x-auto py-2 ".concat(t||""),...i,children:s})}},3765:function(e,s,t){"use strict";var a=t(39941),i=t(812),n=t(46628),r=t(1315),l=t(31883);s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,r.qQ)(),o=t=>!!e.privacy_declarations.find(e=>e.data_use===t.data_use&&e.name===t.name)&&(s((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,t)=>{if((0,l.D4)(e)){let t=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");s((0,n.Vo)(t));return}return s.closeAll(),s((0,n.t5)(t?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(s,a)=>{let i=s.map(e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:""}}),n={...e,privacy_declarations:i};return d(await t(n),a)};return{createDataUse:async t=>{if(!o(t))return s.closeAll(),c([...e.privacy_declarations,t])},updateDataUse:async(s,t)=>{if(!(t.id!==s.id&&o(t)))return c(e.privacy_declarations.map(e=>e.id===s.id?t:e))},deleteDataUse:async s=>c(e.privacy_declarations.filter(e=>e.id!==s.id),!0),deleteDeclarationByDataUse:async s=>c(e.privacy_declarations.filter(e=>e.data_use!==s),!0)}}},73183:function(e,s,t){"use strict";var a=t(24246),i=t(39941);t(27378);var n=t(14207);s.Z=e=>{let{connection_key:s,disabled:t,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:u,onClose:p}=(0,i.qY0)(),[m,h]=(0,n.XX)(),x=async()=>{await m({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},g=()=>{h.isLoading||p()};return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,a.jsx)(i.rAg,{className:"ml-2",checked:!t,onChange:()=>u()})]}):(0,a.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,a.jsx)(i.xvT,{fontSize:"sm",children:t?"Enable":"Disable"})}),(0,a.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:g,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{children:[(0,a.jsxs)(i.xBx,{children:[t?"Enable":"Disable"," Connection"]}),(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.fef,{pb:6,children:(0,a.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[t?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,a.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,a.jsx)(i.wpx,{onClick:g,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:x,loading:h.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,s,t){"use strict";t.d(s,{s:function(){return l}});var a=t(24246),i=t(39941),n=t(77867),r=t(16394);let l=e=>{let{succeeded:s,timestamp:t}=e,l=t?(0,r.p6)(t):"";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{connected:s}),(0,a.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:t?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},27259:function(e,s,t){"use strict";var a=t(24246),i=t(39941),n=t(34090);s.Z=e=>{let{disabled:s=!1,isRequired:t=!1,label:r,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[p,m]=(0,n.U$)(d);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:t,isInvalid:!!(m.error&&m.touched),children:[r&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:r}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...p,autoComplete:"off",autoFocus:u}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===o&&(0,a.jsx)(i.IIB,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:s,placeholder:l,size:"sm"}),"textarea"===o&&(0,a.jsx)(i.gxH,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:p.value||""}),(0,a.jsx)(i.J1D,{children:m.error})]})]})}},72774:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});var a=t(24246),i=t(39941),n=e=>{let{title:s,description:t,button:n}=e;return(0,a.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:[(0,a.jsx)(i.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,a.jsxs)(i.xuv,{flexGrow:1,children:[(0,a.jsx)(i.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,a.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:t})]}),n]})},r=()=>(0,a.jsx)(i.xuv,{mb:"6",maxW:"720px","data-testid":"locked-for-GVL-notice",children:(0,a.jsx)(n,{title:"This system is part of the TCF Global Vendor List (GVL)",description:(0,a.jsxs)(a.Fragment,{children:["As a result, certain fields are not editable as they come directly from Fides Compass and the Global Vendor List (GVL). In some cases, where the legal basis has been declared to be flexible, you may update the legal basis for particular data uses."," ",(0,a.jsx)(i.rUS,{href:"https://fid.es/tcf_gvl",isExternal:!0,color:"complimentary.500",children:"For more information on the Global Vendor List, click here."})]})})})},69525:function(e,s,t){"use strict";t.d(s,{U:function(){return a}});let a=e=>{let s=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:s,features:e.features,legal_basis_for_processing:e.legal_basis_for_processing,flexible_legal_basis_for_processing:e.flexible_legal_basis_for_processing,retention_period:e.retention_period?e.retention_period:""}}},72250:function(e,s,t){"use strict";t.d(s,{Z:function(){return sH}});var a,i,n,r,l=t(24246),o=t(39941),d=t(79894),c=t.n(d),u=t(86677),p=t.n(u),m=t(27378),h=t(16134),x=t(25980),g=t(45938),y=t(16220),f=t(77830),_=t(84720),b=t(14908),j=t(46628),v=t(26089),k=t(19904),w=t(16394),C=t(20682),S=t(41337);let D=e=>{let{connectionConfig:s}=e,t=(0,h.C)(C.pw),{data:a}=(0,C.$I)(t),i=(0,m.useMemo)(()=>(null==a?void 0:a.items)||[],[a]),[n,r]=(0,m.useState)(),l=(0,m.useMemo)(()=>[...i].sort((e,s)=>e.human_readable>s.human_readable?1:-1),[i]),o=(0,m.useMemo)(()=>{let e=new Map;return null==l||l.map(s=>e.set(s.human_readable,{value:s})),e},[l]),d=(0,m.useMemo)(()=>{var e;return(null===(e=i.find(e=>e.identifier===(null==s?void 0:s.connection_type)||(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[s,i]);return(0,m.useMemo)(()=>{let e=i.find(e=>(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)||e.identifier===(null==s?void 0:s.connection_type));e&&r(e)},[s,i]),{dropDownOptions:o,selectedValue:n,setSelectedValue:r,systemType:d}};var T=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:n,onChange:r,selectedValue:d}=e,c=(0,m.useRef)(null),[u,p]=(0,m.useState)(!1),[h,x]=(0,m.useState)(""),g=()=>{p(!1)},y=null===(s=[...n].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],f=(0,m.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(x(e.target.value),setTimeout(()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},0))},[]),_=(0,m.useMemo)(()=>(0,w.Ds)(f,100),[f]),b=(0,m.useMemo)(()=>[...n].filter(e=>e[0].toLowerCase().includes(h.toLowerCase())),[n,h]);return(0,l.jsxs)(o.v2r,{isLazy:!0,onClose:g,onOpen:()=>{p(!0)},strategy:"fixed",matchWidth:!0,children:[(0,l.jsx)(o.j2t,{"aria-label":null!=y?y:i,as:o.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,l.jsx)(o.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,l.jsx)(o.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,l.jsxs)(o.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,l.jsx)(o.xuv,{px:"8px",mt:2,children:(0,l.jsxs)(o.BZy,{size:"sm",children:[(0,l.jsx)(o.Z8_,{pointerEvents:"none",children:(0,l.jsx)(o.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,l.jsx)(o.IIB,{"data-testid":"input-search-integrations",ref:c,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:_,placeholder:"Search integrations",size:"sm",type:"search"})]})}),a&&(0,l.jsx)(o.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,l.jsx)(o.wpx,{onClick:()=>{r(void 0),x(""),g()},size:"small",children:"Clear"})}),(0,l.jsx)(o.xuv,{overflowY:"auto",maxHeight:"272px",children:b.map(e=>{let[s,t]=e;return(0,l.jsx)(o.esZ,{title:t.toolTip,placement:"rightTop",mouseEnterDelay:.5,children:(0,l.jsxs)(o.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>r(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,l.jsx)(S.Z,{data:t.value}),(0,l.jsx)(o.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},A=t(25010),E=t(1315),q=t(54682),I=t(84306),R=t(14207),z=t(59301),F=(0,o.IUT)({displayName:"RightArrow",viewBox:"0 0 16 16",d:"M10.7814 7.33312L7.20541 3.75712L8.14808 2.81445L13.3334 7.99979L8.14808 13.1851L7.20541 12.2425L10.7814 8.66645H2.66675V7.33312H10.7814Z"}),L=t(19812),Z=e=>{let{status:s,failure_reason:t}=e;if("error"===s){let e="Connection test failed.";return t&&(e+=" ".concat(t)),(0,l.jsx)(o.xvT,{"data-testid":"toast-error-msg",children:e})}return(0,l.jsx)(o.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"})},O=t(8627),P=t(32885),W=t(65450),N=t(40324),U=t(34090),V=t(55484),M=t(97181),B=t(57072),K=t(39864),H=t(27259);let Y=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,l.jsxs)(o.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,l.jsx)(o.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,l.jsx)(o.zxk,{bg:"primary.800",color:"white",isDisabled:s,isLoading:s,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var G=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:n}=(0,B.MO)(),r=(0,h.C)(K.qb),{errorAlert:d}=(0,A.VY)();return n?null:(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}a(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:V.Ry({fields:V.IX().of(V.Ry().shape({pii_field:V.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:V.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:V.IX(V.Z_()).label("Data Categories")}))}),children:e=>(0,l.jsx)(U.l0,{style:{marginTop:0},noValidate:!0,children:(0,l.jsx)(o.gCW,{align:"stretch",children:(0,l.jsx)(U.F2,{name:"fields",render:s=>{let{fields:a}=e.values;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,l.jsx)(o.xuv,{w:"416px",children:"PII Field"}),(0,l.jsx)(o.xuv,{w:"416px",children:"DSR Package Label"}),(0,l.jsx)(o.xuv,{w:"416px",children:"Data Categories"}),(0,l.jsx)(o.xuv,{visibility:"hidden",children:(0,l.jsx)(o.lr0,{})})]}),(0,l.jsx)(o.xuv,{children:a&&a.length>0?a.map((e,t)=>(0,l.jsxs)(o.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(H.Z,{autoFocus:0===t,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(H.Z,{isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(M.d,{name:"fields.".concat(t,".data_categories"),options:r.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,l.jsx)(o.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,l.jsx)(o.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,l.jsx)(o.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{s.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,l.jsx)(Y,{isSubmitting:t,onCancelClick:i})]})}})})})})},$=e=>{let{connectionConfig:s}=e,t=(0,m.useRef)(!1),{successAlert:a}=(0,A.VY)(),{handleError:i}=(0,A.HK)(),[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)([]),{isOpen:u,onOpen:p,onClose:h}=(0,o.qY0)(),{data:x,isFetching:g,isLoading:y,isSuccess:f}=(0,R.QV)(s?s.key:"",{skip:!s}),[_]=(0,R.jF)(),[b]=(0,R._d)(),j=async(e,t)=>{try{r(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await b(t).unwrap():await _(t).unwrap(),a("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){i(e)}finally{r(!1)}};(0,m.useEffect)(()=>(t.current=!0,f&&x&&c(x.fields),()=>{t.current=!1}),[x,f]);let v=(0,l.jsx)(o.wpx,{disabled:!s||n,loading:n,onClick:p,children:"Customize DSR"});return(0,l.jsxs)(l.Fragment,{children:[s?v:(0,l.jsx)(o.esZ,{title:"Save an Integration first to customize the DSR",placement:"top",children:v}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:h,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{minWidth:"775px",children:[(0,l.jsx)(o.xBx,{children:"Customize DSR"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsxs)(o.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsx)(o.xuv,{color:"gray.700",fontSize:"14px",children:'Customize your PII fields to create a friendly label name for your privacy request packages. This "Package Label" is the label your user will see in their downloaded package.'}),(g||y)&&(0,l.jsx)(o.M5Y,{children:(0,l.jsx)(o.$jN,{})}),t.current&&!y?(0,l.jsx)(G,{data:d,isSubmitting:n,onSaveClick:j,onCancel:h}):null]})})]})]})]})},Q=t(98784),J=t.n(Q),X=t(71248),ee=t(46782),es=t(73183),et=t(95492),ea=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:a,onOpen:i,onClose:n}=(0,o.qY0)(),r=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&n()};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(o.xvT,{fontSize:"sm",children:"Delete integration"}),(0,l.jsx)(o.wpx,{"aria-label":"Delete integration",icon:(0,l.jsx)(et.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:a,onClose:r,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsx)(o.xBx,{children:"Delete integration"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsx)(o.Kqy,{direction:"column",spacing:"15px",children:(0,l.jsx)(o.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"Deleting an integration may impact any privacy request that is currently in progress. Do you wish to proceed?"})})}),(0,l.jsxs)(o.mzw,{children:[(0,l.jsx)(o.wpx,{onClick:r,className:"w-1/2",children:"Cancel"}),(0,l.jsx)(o.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},ei=t(99792);let en=(e,s)=>{let t={...e};return s&&Object.entries(s.properties).forEach(e=>{let[s,a]=e;if("secrets"in t||(t.secrets={}),"integer"===a.type)t.secrets[s]=a.default?Number(a.default):0;else{var i;t.secrets[s]=null!==(i=a.default)&&void 0!==i?i:""}}),t},er=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===ei.Z.SAAS&&(t+="_api"),t},el=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:a=!1,isAuthorizing:i=!1,onSaveClick:n,onTestConnectionClick:r,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:m,initialDatasets:h,datasetDropdownOptions:g,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[b,{isLoading:j,isFetching:v}]=(0,R.h2)(),{plus:k}=(0,x.hz)(),{getFieldValidation:w,preprocessValues:C}=(0,ee.l)(s),S=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(C(e))},D=async e=>{Object.keys(await e.validateForm()).length>0||r(await b(m.key))},T=(null==m?void 0:m.disabled)||!1;return(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==m?void 0:m.key){var a,i;return e.name=null!==(i=m.name)&&void 0!==i?i:"",e.description=m.description,e.instance_key=m.connection_type===q.Rj.SAAS?null===(a=m.saas_config)||void 0===a?void 0:a.fides_key:m.key,e.enabled_actions=(m.enabled_actions||[]).map(e=>e.toString()),e.secrets=m.secrets?J().cloneDeep(m.secrets):{},e.dataset=h,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(s=>{var t;let[a,i]=s;if((null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)===ee.j){let s=e.secrets[a];s&&(e.secrets[a]="".concat(s.dataset,".").concat(s.field))}}),e}return J().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),en(e,s)})(),onSubmit:(e,s)=>{n(C(e),s)},validateOnBlur:!0,children:e=>{var t;let n=!e.dirty&&(null==m?void 0:m.authorized);return(0,l.jsx)(U.l0,{children:(0,l.jsxs)(o.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsxs)("div",{className:"flex flex-row",children:[m?(0,l.jsx)(es.Z,{connection_key:null==m?void 0:m.key,disabled:T,connection_type:null==m?void 0:m.connection_type,access_type:null==m?void 0:m.access,name:null!==(t=null==m?void 0:m.name)&&void 0!==t?t:m.key,isSwitch:!0}):null,m?(0,l.jsx)(ea,{onDelete:f,deleteResult:_}):null]}),!!(null==m?void 0:m.key)&&(0,l.jsx)(N.j0,{name:"instance_key",id:"instance_key",label:"Integration identifier",isRequired:!0,disabled:!!(null==m?void 0:m.key),tooltip:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this integration."},"instance_key"),s?Object.entries(s.properties).map(e=>{var t;let[a,i]=e;return"advanced_settings"===a?null:(0,l.jsx)(X.A,{name:"secrets.".concat(a),fieldSchema:i,isRequired:null===(t=s.required)||void 0===t?void 0:t.includes(a),secretsSchema:s,validate:w(a,i),layout:"inline"},"secrets.".concat(a))}):null,k&&(0,l.jsx)(M.d,{name:"enabled_actions",id:"enabled_actions",label:"Request types",isRequired:!0,layout:"inline",mode:"multiple",tooltip:"The request types that are supported for this integration",options:p.supported_actions.map(e=>({label:J().upperFirst(e),value:e}))},"enabled_actions"),q.Zi.DATABASE===p.type&&!y&&(0,l.jsx)(M.d,{name:"dataset",id:"dataset",tooltip:"Select datasets to associate with this integration",label:"Datasets",options:g,layout:"inline",mode:"multiple"}),(0,l.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||n?(0,l.jsx)(o.wpx,{disabled:!(null==m?void 0:m.key)||a||_.isLoading,loading:j||v,onClick:()=>D(e),"data-testid":"test-connection-button",children:u}):null,k&&q.Zi.DATABASE===p.type&&!J().isEmpty(h)&&(0,l.jsx)(o.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!n?(0,l.jsx)(o.wpx,{loading:i,onClick:()=>S(e.values,e),children:"Authorize integration"}):null,p.type===q.Zi.MANUAL?(0,l.jsx)($,{connectionConfig:m}):null,(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit","data-testid":"save-integration-btn",children:"Save"})]})]})})}})},eo=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:er(a,t),saas_connector_type:t.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{r.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(r).unwrap()},ed=async(e,s,t,a,i)=>{var n;let r=a?a.key:er(t,s),l={access:q.uv.WRITE,connection_type:s.type===q.Zi.SAAS?s.type:s.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[l]}).unwrap();if((null===(n=o.failed)||void 0===n?void 0:n.length)>0){let e=o.failed[0].message;throw Object.assign(Error(e),{data:{detail:e}})}return o},ec=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},eu=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,I.V)(),{handleError:l}=(0,A.HK)(),o=(0,h.T)(),[d,c]=(0,m.useState)(!1),[u,p]=(0,m.useState)(!1),{dropdownOptions:g,patchConnectionDatasetConfig:y,initialDatasets:f}=(0,L.t)({connectionConfig:i}),[_]=(0,R.NG)(),[b]=(0,P.IB)(),[j]=(0,R.rO)(),[v]=(0,W.Zh)(),[k]=(0,W.qd)(),[w]=(0,P.kg)(),[C,S]=(0,W._w)(),{plus:D}=(0,x.hz)(),T=(0,m.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]),E=(0,h.C)(W.NC);return{isSubmitting:d,isAuthorizing:u,handleSubmit:async e=>{let n=!i;try{if(c(!0),a.type===q.Zi.SAAS&&n)i=(await eo(e,s,a,t,D?b:_)).connection;else{let n=await ed(e,a,t,i,D?w:k);i||a.type!==q.Zi.DATABASE||(i=n.succeeded[0]),a.type!==q.Zi.MANUAL&&await ec(e,s,t,T,v)}i&&e.dataset&&a.type===q.Zi.DATABASE&&await y(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{c(!1)}},handleAuthorization:async e=>{let n=!i;try{p(!0),n?i=(await eo(e,s,a,t,_)).connection:await ec(e,s,t,T,v);let r=await j(i.key).unwrap();p(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{p(!1)}},datasetDropdownOptions:g,initialDatasets:f,handleDelete:async()=>{try{await C(t),o((0,W.db)({...E,connection_configs:null})),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:S}},ep=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[n,r]=(0,m.useState)(),d=(0,o.pmc)(),c=t.type===q.Zi.MANUAL,{data:u}=(0,C.n3)(t.identifier,{skip:c}),{isSubmitting:h,isAuthorizing:x,handleSubmit:g,handleAuthorization:y,datasetDropdownOptions:f,initialDatasets:_,handleDelete:b,deleteDatastoreConnectionResult:v}=eu({secretsSchema:u,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return u||t.type===q.Zi.MANUAL?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,l.jsxs)("div",{children:["Connect to your ",t.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),t.user_guide&&(0,l.jsx)("div",{style:{marginTop:"12px"},children:(0,l.jsxs)(z.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,l.jsx)(F,{})]})})]}),(0,l.jsx)(el,{secretsSchema:u,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:h,isAuthorizing:x,onSaveClick:g,onTestConnectionClick:e=>{var s,t;r(e);let a=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";d({...j.MA,status:a,description:(0,l.jsx)(Z,{status:a,failure_reason:null===(t=e.data)||void 0===t?void 0:t.failure_reason})})},onTestDatasetsClick:()=>{p().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:a,datasetDropdownOptions:f,initialDatasets:_,isCreatingConnectionConfig:!a,onDelete:b,deleteResult:v}),a?(0,l.jsxs)(o.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[n&&n.data&&void 0!==n.fulfilledTimeStamp?(0,l.jsx)(O.s,{succeeded:"succeeded"===n.data.test_status,timestamp:n.fulfilledTimeStamp}):(0,l.jsx)(O.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,l.jsx)(o.LZC,{})]}):null]}):null};var em=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:n}=(0,o.qY0)(),[r,d]=(0,m.useState)(null),{successAlert:c}=(0,A.VY)(),[u,{isLoading:p}]=(0,E.qd)(),x=(0,h.C)(C.pw),{data:g}=(0,C.$I)(x),y=(0,m.useMemo)(()=>(null==g?void 0:g.items)||[],[g]),{handleError:f}=(0,A.HK)(),_=()=>{p||(r&&d(null),n())},b=async()=>{try{if(r){var e;let s={...r,instance_key:r.connection_type===q.Rj.SAAS?null===(e=r.saas_config)||void 0===e?void 0:e.fides_key:r.key},a=y.find(e=>(null==r?void 0:r.saas_config)&&e.identifier===(null==r?void 0:r.saas_config.type)||e.identifier===(null==r?void 0:r.connection_type));(await ed(s,a,t,r,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),n()}}catch(e){f(e)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.wpx,{onClick:i,children:"Link integration"}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsx)(o.xBx,{children:"Unlinked Integrations"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsxs)(o.Kqy,{direction:"column",spacing:"15px",children:[(0,l.jsx)(o.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"These are all the integrations that are not linked to a system. Please select an integration to link to a system."}),(0,l.jsx)(o.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,l.jsxs)(o.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==r?void 0:r.key)===e.key?"gray.100":"unset",color:(null==r?void 0:r.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},className:"mb-2",children:[(0,l.jsx)(S.Z,{data:e,className:"mr-2"}),(0,l.jsx)(o.xvT,{children:e.name})]},e.key))})]})}),(0,l.jsxs)(o.mzw,{className:"flex gap-4",children:[(0,l.jsx)(o.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,l.jsx)(o.wpx,{onClick:b,loading:p,disabled:!r||p,className:"w-1/2",children:"Link integration"})]})]})]})]})},eh=t(44553),ex=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:n}=D({connectionConfig:s}),r=(0,h.C)(R.dR),{data:d}=(0,R.AZ)({...r,orphaned_from_system:!0}),[c,u]=(0,m.useState)([]);(0,m.useEffect)(()=>{d&&u(d.items)},[d]);let p=(0,o.qY0)();return(0,l.jsxs)(o.xuv,{id:"con-wrapper",px:6,children:[(0,l.jsxs)(o.kCb,{py:5,children:[(0,l.jsxs)(o.Kqy,{direction:{base:"column",lg:"row"},children:[(0,l.jsx)(T,{list:a,label:"Integration type",selectedValue:i,onChange:n,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,l.jsx)(em,{connectionConfigs:c,systemFidesKey:t}):null,(0,l.jsx)(k.ZP,{scopes:[q.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,l.jsx)(o.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:p.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,l.jsx)(eh.Z,{isOpen:p.isOpen,onClose:p.onClose})]}),(null==i?void 0:i.type)&&[q.Zi.DATABASE,q.Zi.DATA_CATALOG,q.Zi.SAAS,q.Zi.MANUAL,q.Zi.EMAIL].includes(i.type)?(0,l.jsx)(ep,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:n,systemFidesKey:t}):null]})},eg=t(71922),ey=t(31883);let ef=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:n,name:r}=s,d="".concat(n,"-notice_id"),[c,,u]=(0,U.U$)(d),{setValue:p}=u;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Ugi,{flexGrow:1,children:[i&&(0,l.jsx)(o.LqM,{}),(0,l.jsx)(o.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:r})]}),(0,l.jsx)(o.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:t,onChange:e=>{p(e),a(s={...s,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},e_=e=>{let{connectionKey:s,...t}=e,a=(0,o.pmc)(),{data:i,isLoading:n}=(0,P.EQ)(s),[r,{isLoading:d}]=(0,P.Am)(),c=(0,h.C)(eg.Zp),u=(0,h.C)(eg.G1),{data:p,isLoading:x}=(0,eg.J6)({page:c,size:u}),[g,y]=(0,m.useState)(),[f,_]=(0,m.useState)([]),b=(0,m.useMemo)(()=>null==g?void 0:g.reduce((e,s)=>{var t;return s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id),(null===(t=s.children)||void 0===t?void 0:t.length)&&s.children.forEach(s=>{s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id)}),e},{}),[g]),v=e=>{let s=e.notice_id;if(s){let e=null==p?void 0:p.items.filter(e=>e.id===s);if(null==e?void 0:e.length){var t;let s=(null===(t=e[0].children)||void 0===t?void 0:t.map(e=>e.id))||[];return f.filter(e=>s.includes(e.value))}}return f},k=async()=>{let e=await r({connectionKey:s,consentableItems:g});(0,ey.D4)(e)?a((0,j.Vo)("Failed to save consent automation")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,l.jsx)(o.xvT,{"data-testid":"toast-success-msg",children:"Your consent automation settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,m.useEffect)(()=>{i&&y(i)},[i]),(0,m.useEffect)(()=>{p&&_(p.items.map(e=>({label:e.name,value:e.id})))},[p]),n||x)return(0,l.jsx)(o.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,l.jsx)(o.OdW,{height:"35px"})});if(!g||!g.length||!p)return null;let w=(e,s)=>{y(g.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,l.jsx)(o.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,l.jsx)(o.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,l.jsxs)(o.Qdk,{border:"none",children:[(0,l.jsxs)(o.KFZ,{children:[(0,l.jsx)(o.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,l.jsx)(o.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Consent automation"})}),(0,l.jsx)(o.XEm,{})]}),(0,l.jsxs)(o.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,l.jsx)(o.xvT,{mb:7,children:"Map consentable items, such as channels and subscriptions, from your integration to Fides privacy notices. This ensures that updates to consent preferences in either location remain accurate and up-to-date."}),(0,l.jsx)(U.J9,{initialValues:b||{},onSubmit:k,children:(0,l.jsxs)(U.l0,{children:[(0,l.jsx)(o.MIq,{columns:2,spacing:3,children:g.map(e=>{var s;return(0,l.jsxs)(m.Fragment,{children:[(0,l.jsx)(ef,{item:e,options:f,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,l.jsx)(ef,{item:s,options:v(e),isChild:!0,onNoticeChange:s=>w(s,e)},s.external_id))]},e.external_id)})}),(0,l.jsx)(o.Ugi,{justifyContent:"flex-end",mt:3,children:(0,l.jsx)(o.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var eb=t(57865),ej=t(3124),ev=t.n(ej),ek=(0,o.IUT)({displayName:"NextArrow",viewBox:"0 0 12 12",d:"M6.58584 5.99999L4.11084 3.52499L4.81784 2.81799L7.99984 5.99999L4.81784 9.18199L4.11084 8.47499L6.58584 5.99999Z"}),ew=(0,o.IUT)({displayName:"PrevArrow",viewBox:"0 0 12 12",d:"M5.414 5.99999L7.889 8.47499L7.182 9.18199L4 5.99999L7.182 2.81799L7.889 3.52499L5.414 5.99999Z"});let eC=e=>{let s=new Date(e),t=navigator.language;return{formattedTime:s.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:s.toLocaleDateString(t,{year:"numeric",month:"long",day:"numeric"})}},eS=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,eD=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=eS(t),l=e[t],o=s[t];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((J().isNil(l)||J().isEmpty(l))&&(J().isNil(o)||J().isEmpty(o)))&&(J().isEqual(l,o)||(J().isNil(l)||J().isEmpty(l)?a.push(r):J().isNil(o)||J().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},eT=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,n=[],r=[],o=[];t.custom_fields||a.custom_fields?{addedFields:n,removedFields:r,changedFields:o}=eD(t.custom_fields,a.custom_fields):{addedFields:n,removedFields:r,changedFields:o}=eD(t,a);let d=[];if(n.length>0&&d.push(["added ",(0,l.jsx)("b",{children:n.join(", ")})]),r.length>0&&d.push(["removed ",(0,l.jsx)("b",{children:r.join(", ")})]),o.length>0&&d.push(["changed ",(0,l.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let c=d.pop(),u=d.length>0?(0,l.jsxs)(l.Fragment,{children:[d.map((e,s)=>(0,l.jsxs)(m.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",c]}):c,{formattedTime:p,formattedDate:h}=eC(i);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("b",{children:s})," ",u," on ",h," at ",p]})},eA=(e,s)=>{let t=e=>e.map(e=>{let t=s.find(s=>s.fides_key===e.fides_key);return t&&t.name?t.name:e.fides_key}),a={...e.before},i={...e.after};return a.ingress&&(a.ingress=t(a.ingress)),a.egress&&(a.egress=t(a.egress)),i.ingress&&(i.ingress=t(i.ingress)),i&&i.egress&&(i.egress=t(i.egress)),{...e,before:a,after:i}},eE=(e,s)=>{if(J().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eq=e=>{let s=e.before.privacy_declarations||[],t=e.after.privacy_declarations||[],a=new Set([...s,...t].map(e=>e.data_use)),i=[],n=[];return a.forEach(e=>{let a=s.find(s=>s.data_use===e)||{data_use:"",data_categories:[]},r=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},eI=e=>{let s={...e.before.custom_fields},t={...e.after.custom_fields};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,custom_fields:s},after:{...e.after,custom_fields:t}}},eR=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let s={...e.before.privacy_declarations[0].custom_fields},t=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:s}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:t}]}}},ez=(0,m.createContext)(null),eF=()=>(0,m.useContext)(ez);var eL=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,m.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,l.jsx)(ez.Provider,{value:i,children:s})},eZ=t(62165),eO=t(30320),eP=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eF(),i=m.Children.toArray(t).filter(e=>{if(m.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=J().get(null==a?void 0:a.before,s),i=J().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&J().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&J().isEmpty(i);return!n||!r}return!1});return 0===i.length?null:(0,l.jsx)(o.Kqy,{marginTop:"0px !important",children:(0,l.jsxs)(o.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,l.jsx)(o.X6q,{as:"h3",size:"xs",children:s})}),(0,l.jsx)(o.Kqy,{children:i})]})})},eW=t(46238),eN=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:n,formType:r}=eF(),[d]=(0,U.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,m.useRef)(null),[p,h]=(0,m.useState)(null),[x,g]=(0,m.useState)([]),[y,f]=(0,m.useState)(!1);(0,m.useEffect)(()=>{let e=J().get(null==n?void 0:n.before,i.name)||[],s=J().get(null==n?void 0:n.after,i.name)||[];f(!J().isEqual(e,s)),g(e.length>s.length?e:s)},[n,i.name]),(0,m.useEffect)(()=>{u.current&&h(u.current.offsetHeight)},[x]);let _={};return y&&(_="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,l.jsx)(eW.b,{label:a})]}),(0,l.jsx)(o.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(p,"px")},children:(p?c.value:x).map((e,s)=>(0,l.jsx)(o.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===r&&y&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eU=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:n,formType:r}=eF(),[d]=(0,U.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,m.useRef)(null),[p,h]=(0,m.useState)(null),[x,g]=(0,m.useState)(!1);(0,m.useEffect)(()=>{let e=J().get(null==n?void 0:n.before,i.name)||"",s=J().get(null==n?void 0:n.after,i.name)||"";g(!J().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,h(u.current.offsetHeight),u.current.textContent=c.value)},[n,i.name,c.value]);let y={};return x&&(y="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,l.jsx)(eW.b,{label:a})]}),(0,l.jsx)(o.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(p,"px")},children:c.value}),"before"===r&&x&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eV=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,eO.m)({resourceType:t}),i=e=>Array.from(a.values()).some(s=>s.name===e&&!!s.allow_list_id),n=t===q.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",r=Object.keys(s).sort();return(0,l.jsx)(eP,{heading:"Custom fields",children:r.map(e=>i(e)?(0,l.jsx)(eN,{label:e,name:"".concat(n,".").concat(e)},e):(0,l.jsx)(eU,{label:e,name:"".concat(n,".").concat(e)},e))})},eM=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:n}=eF(),[r]=(0,U.U$)(a),d={...r,value:r.value},[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{u(J().get(null==i?void 0:i.before,a.name)!==J().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let p={};return c&&(p="before"===n?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:p,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",minHeight:"46px",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),(0,l.jsx)(eW.b,{label:t})]}),void 0!==d.value&&(0,l.jsx)(o.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===n&&c&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eB=e=>{let{initialValues:s}=e,t=(0,eZ.hz)();return(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,l.jsx)(U.l0,{children:(0,l.jsxs)(o.Kqy,{children:[(0,l.jsxs)(eP,{heading:"System details",children:[t.dictionaryService?(0,l.jsx)(eU,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,l.jsx)(eU,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,l.jsx)(eU,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,l.jsx)(eU,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,l.jsx)(eN,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,l.jsx)(eP,{heading:"Dataset reference",children:(0,l.jsx)(eN,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,l.jsxs)(eP,{heading:"Data processing properties",children:[(0,l.jsx)(eM,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,l.jsx)(eM,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,l.jsx)(eU,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,l.jsx)(eM,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,l.jsx)(eN,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,l.jsx)(eM,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,l.jsx)(eN,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,l.jsx)(eM,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,l.jsx)(eU,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,l.jsxs)(eP,{heading:"Administrative properties",children:[(0,l.jsx)(eU,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,l.jsx)(eU,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,l.jsx)(eU,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,l.jsx)(eU,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,l.jsx)(eU,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,l.jsx)(eN,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,l.jsx)(eU,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,l.jsx)(eU,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,l.jsx)(eU,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,l.jsx)(eV,{customFields:s.custom_fields,resourceType:q.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,l.jsxs)(m.Fragment,{children:[(0,l.jsxs)(eP,{heading:"Data use",children:[(0,l.jsx)(eU,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,l.jsx)(eN,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,l.jsx)(eN,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,l.jsx)(eP,{heading:"Features",children:(0,l.jsx)(eN,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,l.jsx)(eP,{heading:"Dataset reference",children:(0,l.jsx)(eN,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,l.jsxs)(eP,{heading:"Special category data",children:[(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,l.jsxs)(eP,{heading:"Third parties",children:[(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,l.jsx)(eN,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,l.jsx)(eV,{customFields:s.privacy_declarations[0].custom_fields,resourceType:q.P6.PRIVACY_DECLARATION})]},t)),(0,l.jsxs)(eP,{heading:"Data flow",children:[(0,l.jsx)(eN,{name:"ingress",label:"Sources"}),(0,l.jsx)(eN,{name:"egress",label:"Destinations"})]})]})})})};let eK=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eH=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,l.jsxs)(o.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsxs)(o.xBx,{backgroundColor:ev().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,l.jsxs)(o.X6q,{size:"xs",children:[(0,l.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,l.jsx)(l.Fragment,{children:eK(s.before,s.after).map((e,s)=>(0,l.jsx)(o.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.olH,{})]})]}),(0,l.jsx)(o.fef,{paddingTop:0,paddingBottom:6,children:(0,l.jsxs)(o.kCb,{justifyContent:"space-between",children:[(0,l.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,l.jsx)(eL,{selectedHistory:s,formType:"before",children:(0,l.jsx)(eB,{initialValues:null==s?void 0:s.before})})}),(0,l.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,l.jsx)(eL,{selectedHistory:s,formType:"after",children:(0,l.jsx)(eB,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eY=e=>{let{system:s}=e,[t,a]=(0,m.useState)(1),{data:i}=(0,P.Xc)({system_key:s.fides_key,page:t,size:10}),[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)(null),u=(0,h.C)(P.o),{data:p=[]}=(0,W.K3)(),x=(null==i?void 0:i.items)||[],g=e=>{c(e=eR(e=eI(e=eA(e=eE(e=eq(e),u),p)))),r(!0)},{formattedTime:y,formattedDate:f}=eC(s.created_at),_=i&&i.total?Math.ceil(i.total/10):0;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.iA_,{ml:"24px",children:[(0,l.jsx)(o.hrZ,{children:(0,l.jsx)(o.Tr,{children:(0,l.jsxs)(o.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:ev().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,l.jsx)(o.p3B,{children:x.map((e,s)=>{let t=eT(e);return t?(0,l.jsx)(o.Tr,{onClick:()=>g(e),style:{cursor:"pointer"},children:(0,l.jsx)(o.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:t})},s):null})})]}),((null==i?void 0:i.total)||0)>10&&(0,l.jsxs)(o.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,l.jsxs)(o.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(t-1)*10+1," -"," ",Math.min(10*t,(null==i?void 0:i.total)||0)," of"," ",(null==i?void 0:i.total)||0]}),(0,l.jsx)(o.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,l.jsx)(ew,{})}),(0,l.jsx)(o.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,l.jsx)(ek,{})})]}),(0,l.jsx)(eH,{selectedHistory:d,isOpen:n,onClose:()=>{r(!1),c(null)}})]})},eG=t(52368),e$=t(3765),eQ=e=>{let{title:s,description:t,handleAdd:a}=e;return(0,l.jsx)(o.Kqy,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.500",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:(0,l.jsxs)(o.Ugi,{children:[(0,l.jsx)(o.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,l.jsxs)(o.xuv,{children:[(0,l.jsx)(o.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,l.jsx)(o.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,l.jsx)(o.Ugi,{mt:4,children:(0,l.jsx)(o.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,l.jsx)(o.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},eJ=t(58452);let eX=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:n,onOpen:r,onClose:d}=(0,o.qY0)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,l.jsx)(o.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,l.jsxs)(o.Ugi,{children:[(0,l.jsx)(o.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,l.jsx)(o.xvT,{children:t||s.data_use})}),(0,l.jsx)(o.LZC,{}),a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:r,"data-testid":"delete-btn",children:(0,l.jsx)(o.pJl,{})}),(0,l.jsx)(eJ.Z,{isOpen:n,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,l.jsxs)(o.xvT,{children:["You are about to delete the data use declaration"," ",(0,l.jsx)(o.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:t||s.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,l.jsx)(o.izJ,{})]})},e0=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,l.jsx)(o.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,l.jsxs)(o.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,l.jsxs)(o.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,l.jsx)(o.X6q,{as:"h3",size:"xs",children:s}),(0,l.jsx)(o.LZC,{}),a||null]}),(0,l.jsx)(o.Kqy,{spacing:0,children:t}),(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:i||null})]})})},e1=e=>{let{heading:s,declarations:t,handleAdd:a,handleDelete:i,handleEdit:n,allDataUses:r}=e,d=e=>{let s=r.filter(s=>s.fides_key===e.data_use)[0];return s?e.name?"".concat(s.name," - ").concat(e.name):s.name:""},c=(0,h.C)(eb.gU);return(0,l.jsx)(e0,{heading:s,footerButton:!c&&(0,l.jsx)(o.wpx,{onClick:a,size:"small",icon:(0,l.jsx)(o.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,l.jsx)(eX,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:n},e.id))})};var e4=t(95346),e2=t(54748),e3=t(28325),e5=t(30234);let e9=V.Ry().shape({data_categories:V.IX(V.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:V.Z_().required().label("Data use")}),e6={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},id:""},e8=e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0}},e7=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,values:n,includeCustomFields:r,privacyDeclarationId:d,lockedForGVL:c}=e,u=!!d,{legalBasisOptions:p}=(0,e2.Z)(),{specialCategoryLegalBasisOptions:h}=(0,e3.Z)(),x=(0,m.useMemo)(()=>i?i.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[i]);return(0,l.jsxs)(o.Kqy,{spacing:4,children:[(0,l.jsxs)(e5.Z,{heading:"Data use declaration",children:[(0,l.jsx)(N.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:u,variant:"stacked"}),(0,l.jsx)(M.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:u}),(0,l.jsx)(M.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:c,layout:"stacked"}),(0,l.jsx)(M.d,{name:"data_subjects",label:"Data subjects",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",layout:"stacked"}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(M.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:p,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:c}),(0,l.jsx)(o.UO1,{in:"Legitimate interests"===n.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked"})})})]}),(0,l.jsx)(o.xuv,{mt:5,pl:4,children:(0,l.jsx)(N.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked",isDisabled:c})}),(0,l.jsx)(N.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:c})]}),(0,l.jsx)(e5.Z,{heading:"Features",children:(0,l.jsx)(M.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:c,mode:"tags"})}),(0,l.jsx)(e5.Z,{heading:"Dataset reference",children:(0,l.jsx)(M.d,{name:"dataset_references",label:"Dataset references",options:x,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked"})}),(0,l.jsx)(e5.Z,{heading:"Special category data",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"processes_special_category_data",label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:n.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(M.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:h,isRequired:n.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked"})})})]})}),(0,l.jsx)(e5.Z,{heading:"Third parties",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"data_shared_with_third_parties",label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:n.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsxs)(o.Kqy,{mt:4,spacing:4,children:[(0,l.jsx)(N.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked"}),(0,l.jsx)(M.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple"})]})})]})}),r?(0,l.jsx)(e4.uc,{resourceType:q.P6.PRIVACY_DECLARATION,resourceFidesKey:d}):null]})},se=(e,s)=>e?{...e,customFieldValues:s||{}}:e6,ss=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,e4.mZ)({resourceType:q.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e8(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,m.useMemo)(()=>se(t,i),[t,i])}},st=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,n=null==a?void 0:a.id,{handleSubmit:r,initialValues:d}=ss({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:n}),c=(0,h.C)(eb.gU);return(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:d,onSubmit:r,validationSchema:e9,children:e=>{let{dirty:s,values:a}=e;return(0,l.jsxs)(U.l0,{"data-testid":"declaration-form",children:[(0,l.jsx)(g.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,l.jsxs)(o.Kqy,{spacing:4,children:[(0,l.jsx)(e7,{values:a,lockedForGVL:c,privacyDeclarationId:n,...i}),(0,l.jsxs)(o.kCb,{w:"100%",children:[(0,l.jsx)(o.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})}})},sa=e=>{let{isOpen:s,onClose:t,heading:a,isCentered:i=!1,testId:n="privacy-declaration-modal",children:r}=e;return(0,l.jsxs)(o.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{textAlign:"left",p:0,"data-testid":n,children:[(0,l.jsx)(o.xBx,{p:0,children:(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,l.jsx)(o.X6q,{as:"h3",size:"sm",children:a})})}),(0,l.jsx)(o.fef,{pb:4,children:r})]})]})};var si=e=>{let{system:s,includeCustomFields:t,...a}=e,{isOpen:i,onClose:n,onOpen:r}=(0,o.qY0)(),[d,c]=(0,m.useState)(void 0),{createDataUse:u,updateDataUse:p,deleteDataUse:h}=(0,e$.Z)(s),x=()=>{n(),c(void 0)},g=()=>{r(),c(void 0)},y=async e=>(x(),d)?p(d,e):u(e);return(0,m.useEffect)(()=>{n()},[n,s.fides_key]),(0,l.jsxs)(o.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,l.jsx)(eQ,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:g}):(0,l.jsx)(e1,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:g,handleEdit:e=>{r(),c(e)},handleDelete:h,allDataUses:a.allDataUses}),(0,l.jsx)(sa,{isOpen:i,onClose:x,heading:"Configure data use",children:(0,l.jsx)(st,{initialValues:d,onSubmit:y,onCancel:x,includeCustomFields:t,...a})})]})},sn=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eG.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),n=a.allDataUses.filter(e=>e.active),r=a.allDataSubjects.filter(e=>e.active),d={...a,allDataCategories:i,allDataUses:n,allDataSubject:r};return(0,l.jsxs)(o.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,l.jsx)(o.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,l.jsxs)(o.xvT,{fontSize:"sm",fontWeight:"medium",children:["Data Uses describe the business purpose for which the personal data is processed or collected. Within a Data Use, you assign which categories of personal information are collected for this purpose and for which categories of data subjects. To update the available categories and uses, please visit"," ",(0,l.jsx)(o.rUS,{as:c(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,l.jsx)(o.$jN,{}):(0,l.jsx)(si,{system:s,includeCustomFields:!0,...d})]})},sr=t(812),sl=t(93237),so=t(69525),sd=t(33335);let sc={system_type:"",fides_key:"",tags:[],name:"",description:"",dataset_references:[],processes_personal_data:!0,exempt_from_privacy_regulations:!1,reason_for_exemption:"",uses_profiling:!1,does_international_transfers:!1,requires_data_protection_assessments:!1,privacy_policy:"",legal_name:"",legal_address:"",administrating_department:"",responsibility:[],joint_controller_info:"",data_security_practices:"",privacy_declarations:[],data_stewards:"",dpo:"",cookie_max_age_seconds:void 0,uses_cookies:!1,cookie_refresh:!1,uses_non_cookie_access:!1,legitimate_interest_disclosure_url:""},su=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a}},sp=e=>{let s=e.fides_key?e.fides_key:(0,sd.E)(e.name),t=""===e.privacy_policy?void 0:e.privacy_policy,a={system_type:e.system_type,fides_key:s,name:e.name,description:e.description?e.description:"",dataset_references:e.dataset_references,tags:e.tags,processes_personal_data:e.processes_personal_data,exempt_from_privacy_regulations:e.exempt_from_privacy_regulations,reason_for_exemption:e.exempt_from_privacy_regulations?e.reason_for_exemption:void 0,privacy_declarations:e.processes_personal_data?e.privacy_declarations:[],vendor_id:e.vendor_id,ingress:e.ingress,egress:e.egress,meta:e.meta,fidesctl_meta:e.fidesctl_meta,organization_fides_key:e.organization_fides_key,dpa_progress:e.dpa_progress,previous_vendor_id:e.previous_vendor_id,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0};return e.processes_personal_data&&(a={...a,dataset_references:e.dataset_references,uses_profiling:e.uses_profiling,legal_basis_for_profiling:e.uses_profiling?e.legal_basis_for_profiling:void 0,does_international_transfers:e.does_international_transfers,legal_basis_for_transfers:e.does_international_transfers?e.legal_basis_for_transfers:void 0,requires_data_protection_assessments:e.requires_data_protection_assessments,dpa_location:e.requires_data_protection_assessments?e.dpa_location:void 0,privacy_policy:t,legal_name:e.legal_name,legal_address:e.legal_address,responsibility:e.responsibility,dpo:e.dpo,data_security_practices:e.data_security_practices},e.administrating_department&&(a.administrating_department=e.administrating_department),e.joint_controller_info&&(a.joint_controller_info=e.joint_controller_info)),a},{useGetSystemAssetsQuery:sm,useAddSystemAssetMutation:sh,useUpdateSystemAssetsMutation:sx,useDeleteSystemAssetsMutation:sg,usePopulateSystemAssetsMutation:sy}=t(78780).u.injectEndpoints({endpoints:e=>({getSystemAssets:e.query({query:e=>{let{fides_key:s,...t}=e;return{method:"GET",url:"/plus/system-assets/".concat(s),params:t}},providesTags:["System Assets"]}),addSystemAsset:e.mutation({query:e=>{let{systemKey:s,asset:t}=e;return{method:"POST",url:"/plus/system-assets/".concat(s,"/assets"),body:t}},invalidatesTags:["System Assets"]}),updateSystemAssets:e.mutation({query:e=>{let{systemKey:s,assets:t}=e;return{method:"PUT",url:"/plus/system-assets/".concat(s,"/assets/"),body:t}},invalidatesTags:["System Assets"]}),deleteSystemAssets:e.mutation({query:e=>{let{systemKey:s,asset_ids:t}=e;return{method:"DELETE",url:"/plus/system-assets/".concat(s,"/assets?").concat((0,w.du)(t,"asset_ids"))}},invalidatesTags:["System Assets"]}),populateSystemAssets:e.mutation({query:e=>{let{systemKey:s}=e;return{method:"POST",url:"/plus/dictionary/system-vendors/cookie-assets",body:[s]}}})})});var sf=t(36345);let s_=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sb=[{value:"Adequacy Decision",label:"Adequacy decision"},{value:"Supplementary measures",label:"Supplementary measures"},{value:"SCCs",label:"Standard contractual clauses"},{value:"BCRs",label:"Binding corporate rules"},{value:"Other",label:"Other"}],sj=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),sv=e=>{var s;let{system:t}=e,a=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,l.jsxs)(o.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sk=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:n=[]}=(0,W.K3)(),r=(0,h.T)(),d=(0,e4.mZ)({resourceType:q.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...c}=(0,eG.f)({includeDatasets:!0,includeDisabled:!1}),u=(0,m.useMemo)(()=>t?su(t,d.customFieldValues):sc,[t,d.customFieldValues]),[p]=(0,W.in)(),x=(0,m.useMemo)(()=>V.Ry().shape({name:V.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await p({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==u.name).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:V.Z_().min(1).url().nullable()}),[p,u.name]),y=(0,eZ.hz)(),[f,_]=(0,W.f7)(),[b,v]=(0,W.qQ)(),[k]=sy();(0,P.Rd)(void 0,{skip:!y.dictionaryService});let[w]=(0,P.qz)(),C=(0,h.C)(P.o),S=(0,h.C)(eb.gU),D=(0,m.useMemo)(()=>!!(t&&(null==n?void 0:n.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,n]),T=(0,m.useMemo)(()=>c.allDatasets?c.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[c.allDatasets]),A=(0,o.pmc)(),E=async(e,t)=>{var a;let i,n;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await w({vendor_id:e.vendor_id});if(s.isError){if(!((0,sr.fn)(s.error)&&404===s.error.status)){let e=(0,sr.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.");A((0,j.Vo)(e))}}else s.data&&s.data.items.length>0&&(i=s.data.items.map(e=>{var s;return{...(0,so.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let l=sp({...e,privacy_declarations:null!=i?i:e.privacy_declarations});if(n=D?await b(l):await f(l),await d.upsertCustomFields(e),!D&&e.vendor_id&&(null===(a=n.data)||void 0===a?void 0:a.fides_key)){let e=await k({systemKey:n.data.fides_key});(0,sr.D4)(e)&&A((0,j.Vo)("An unexpected error occurred while populating the system assets from Compass. Please try again."))}(0,sr.D4)(n)?A({status:"error",description:(0,sr.e$)(n.error,"An unexpected error occurred while ".concat(D?"editing":"creating"," the system. Please try again."))}):(A.closeAll(),t.resetForm({values:e}),s(n.data),r((0,eb.b3)("initial")))},I=e=>{if(y.dictionaryService){if(!e){r((0,eb.b3)("hiding")),r((0,eb.gQ)(!1));return}r((0,eb.b3)("showing")),y.tcf&&(0,sr.cj)(e)===sr.c6.GVL?r((0,eb.gQ)(!0)):r((0,eb.gQ)(!1))}},R=v.isLoading||_.isLoading||d.isLoading;return(0,l.jsx)(U.J9,{initialValues:u,enableReinitialize:!0,onSubmit:E,validationSchema:x,children:e=>{let{dirty:s,values:n,isValid:r}=e;return(0,l.jsxs)(U.l0,{children:[(0,l.jsx)(g.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,l.jsxs)(o.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,l.jsx)(sv,{system:t}):null,(0,l.jsx)(o.xvT,{fontSize:"sm",fontWeight:"medium",children:"By providing a small amount of additional context for each system we can make reporting and understanding our tech stack much easier for everyone from engineering to legal teams. So let’s do this now."}),a?(0,l.jsx)(sv,{system:t}):null,(0,l.jsxs)(e5.Z,{heading:"System details",children:[y.dictionaryService?(0,l.jsx)(sf.Z,{label:"System name",options:C,onVendorSelected:I,isCreate:!t,lockedForGVL:S}):(0,l.jsx)(N.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(null==t?void 0:t.fides_key)&&(0,l.jsx)(N.j0,{id:"fides_key",name:"fides_key",label:"Unique ID",disabled:!0,variant:"stacked",tooltip:"An auto-generated unique ID based on the system name"}),(0,l.jsx)(sl.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?"}),(0,l.jsx)(M.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:u.tags?u.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?"})]}),(0,l.jsx)(e5.Z,{heading:"Dataset reference",children:(0,l.jsx)(M.d,{name:"dataset_references",label:"Dataset references",options:T,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked"})}),(0,l.jsx)(e5.Z,{heading:"Data processing properties",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(o.xuv,{mb:4,children:(0,l.jsx)(sl.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:S})}),(0,l.jsx)(o.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(sl.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!n.processes_personal_data||S}),(0,l.jsx)(o.UO1,{in:n.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:n.exempt_from_privacy_regulations,disabled:S})})})]})}),(0,l.jsx)(o.UO1,{in:n.processes_personal_data&&!n.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,l.jsxs)(o.Kqy,{spacing:4,mt:4,children:[(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(sl.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:S}),(0,l.jsx)(o.UO1,{in:n.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(M.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:s_,tooltip:"What is the legal basis under which profiling is performed?",disabled:S,isRequired:n.uses_profiling})})})]}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(sl.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:S}),(0,l.jsx)(o.UO1,{in:n.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(M.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sb,tooltip:"What is the legal basis under which the data is transferred?",isRequired:n.does_international_transfers,disabled:S})})})]}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:S}),(0,l.jsx)(o.UO1,{in:n.requires_data_protection_assessments,animateOpacity:!0,children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:S,isRequired:n.requires_data_protection_assessments})})})]})]})})]})}),(0,l.jsxs)(o.UO1,{in:n.processes_personal_data&&!n.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,l.jsxs)(e5.Z,{heading:"Cookie properties",children:[(0,l.jsx)(sl.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:S}),(0,l.jsx)(sl.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:S}),(0,l.jsx)(sl.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:S}),(0,l.jsx)(sl.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:S})]}),(0,l.jsxs)(e5.Z,{heading:"Administrative properties",children:[(0,l.jsx)(N.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,l.jsx)(sl.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:S}),(0,l.jsx)(sl.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,l.jsx)(sl.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,l.jsx)(N.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(M.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sj,tooltip:"What is the role of the business with regard to data processing?",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(sl.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:S}),(0,l.jsx)(N.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(sl.Yb,{label:"Data security practices",name:"data_security_practices",id:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"}),(0,l.jsx)(sl.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:S}),(0,l.jsx)(sl.Yb,{label:"Vendor deleted date",name:"vendor_deleted_date",id:"vendor_deleted_date",tooltip:"If this vendor is no longer active, it will be 'soft' deleted. When that occurs, it's deleted date will be recorded here for reporting.",disabled:!0})]}),n.fides_key?(0,l.jsx)(e4.uc,{resourceType:q.P6.SYSTEM,resourceFidesKey:n.fides_key}):null]})]}),(0,l.jsx)(o.xuv,{mt:6,children:(0,l.jsx)(o.wpx,{htmlType:"submit",type:"primary",disabled:R||!s||!r,loading:R,"data-testid":"save-btn",children:"Save"})}),i]})}})},sw=t(59003),sC=t(92222),sS=t(30952),sD=t(47935),sT=t(90111),sA=t(8133),sE=t(83099),sq=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[n,r,{setValue:d,setTouched:c}]=(0,U.U$)(s),u=!!(r.touched&&r.error);return(0,l.jsx)(o.NIc,{isInvalid:u,isRequired:!0,children:(0,l.jsxs)(o.jqI,{vertical:!0,children:[(0,l.jsxs)(o.jqI,{align:"center",children:[t&&(0,l.jsx)(N.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,l.jsx)(eW.b,{label:i})]}),(0,l.jsx)(sE.Z,{...n,mode:"multiple",selectedTaxonomies:[],onChange:e=>{d(e)},onBlur:()=>c(!0),variant:"outlined",autoFocus:!1,status:u?"error":void 0,"data-testid":"controlled-select-".concat(s)}),(0,l.jsx)(N.Bc,{isInvalid:u,message:r.error,fieldName:s})]})})};(a=n||(n={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sI=V.Ry().shape({name:V.Z_().required("Enter a name for this asset"),domain:V.Z_().required("Enter a valid domain for this asset"),asset_type:V.Z_().required("Select an asset type"),data_uses:V.IX().min(1,"Select at least one data use"),base_url:V.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sR={name:"",description:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sz=e=>{let{isOpen:s,onClose:t,systemKey:a,asset:i,...r}=e,d=!i,[c,{isLoading:u}]=sh(),[p,{isLoading:m}]=sx(),h=(0,o.pmc)(),x=async e=>{let s=await c({systemKey:a,asset:e});if((0,sr.D4)(s)){let e=(0,sr.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,j.Vo)(e))}else h((0,j.t5)("Asset added successfully")),t()},g=async e=>{let s=await p({systemKey:a,assets:[e]});if((0,sr.D4)(s)){let e=(0,sr.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,j.Vo)(e))}else h((0,j.t5)("Asset updated successfully")),t()};return(0,l.jsx)(sA.Z,{title:d?"Add asset":"Edit asset",onClose:t,isOpen:s,...r,children:(0,l.jsx)(U.J9,{initialValues:null!=i?i:sR,onSubmit:e=>{d?x(e):g(e)},validationSchema:sI,children:e=>{let{values:s,isValid:a,dirty:i}=e;return(0,l.jsxs)(U.l0,{children:[(0,l.jsxs)(o.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,l.jsx)(sT.Z,{children:(0,l.jsx)(o.xvT,{fontSize:"sm",children:"Create and configure assets (e.g. cookies, pixels, tags) for this system to ensure proper consent enforcement. Adding assets manually allows you to define key attributes, assign categories, and align them with compliance requirements."})}),(0,l.jsxs)(o.jqI,{vertical:!0,gap:20,children:[(0,l.jsx)(N.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!d}),(0,l.jsx)(M.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,sr.MM)(n),layout:"stacked",disabled:!d}),(0,l.jsx)(sq,{name:"data_uses",label:"Data uses",layout:"stacked"}),(0,l.jsx)(N.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!d}),(0,l.jsx)(N.Ks,{id:"description",name:"description",label:"Description",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:!!s.asset_type&&"Cookie"!==s.asset_type,children:(0,l.jsx)(N.j0,{id:"base_url",name:"base_url",label:"Base URL",variant:"stacked",isRequired:!!s.asset_type&&"Cookie"!==s.asset_type})})]})]}),(0,l.jsxs)(o.jqI,{justify:"space-between",children:[(0,l.jsx)(o.wpx,{onClick:t,children:"Cancel"}),(0,l.jsx)(o.wpx,{type:"primary",htmlType:"submit",loading:u||m,disabled:!a||!i,"data-testid":"save-btn",children:"Save"})]})]})}})})},sF=t(8411),sL=t(72625),sZ=t(29850),sO=t(77685),sP=e=>{let{systemKey:s,systemName:t,asset:a,readonly:i}=e,[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)(),[u,p]=(0,m.useState)(!1),[h,{isLoading:x}]=sx(),{successAlert:g,errorAlert:y}=(0,A.VY)(),f=(0,o.qY0)(),{asset_type:_,name:b}=a,j=(0,m.useCallback)(e=>{e.preventDefault(),p(!0)},[]),v=async e=>{if(!e)return;let{newSystemKey:t,newSystemName:i,isNewSystem:n}=e,l=await h({systemKey:s,assets:[{id:a.id,system_key:t}]});(0,ey.D4)(l)?y((0,sr.e$)(l.error)):g(n?"".concat(i," has been added to your system inventory and the ").concat(_,' "').concat(b,'" has been assigned to that system.'):"".concat(_," ").concat(b," has been assigned to ").concat(i)),r(!1),c(void 0)},k=e=>{c(e),f.onOpen()};return i?(0,l.jsx)(o.j8w,{"data-testid":"system-badge",color:"white",children:t}):(0,l.jsxs)(l.Fragment,{children:[!n&&(0,l.jsxs)(o.j8w,{"data-testid":"system-badge",color:"white",onClick:()=>r(!0),children:[t," ",(0,l.jsx)(o.PJP.I8b,{})]}),!!n&&(0,l.jsx)(sZ.R,{variant:"borderless",className:"w-full",autoFocus:!0,defaultOpen:!0,defaultValue:s,onBlur:e=>{var s;(null===(s=e.relatedTarget)||void 0===s?void 0:s.getAttribute("id"))!=="add-new-system"&&r(!1)},onAddSystem:j,onSelect:(e,s)=>k({newSystemKey:e,newSystemName:s.label}),loading:x}),u&&(0,l.jsx)(sO.i,{isOpen:!0,onClose:()=>p(!1),onSuccessfulSubmit:(e,s)=>k({newSystemKey:e,newSystemName:s,isNewSystem:!0})}),(0,l.jsx)(o.cVQ,{isOpen:f.isOpen,onClose:f.onClose,onConfirm:()=>{v(d)},title:"Reassign asset",message:"Are you sure you want to reassign this asset to ".concat(null==d?void 0:d.newSystemName,"?"),isCentered:!0})]})},sW=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:n}]=sg(),r=(0,o.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,o.qY0)(),p=async()=>{let e=await i({systemKey:t,asset_ids:[s.id]});(0,ey.D4)(e)?r((0,j.Vo)((0,sr.e$)(e.error,"A problem occurred removing this asset. Please try again"))):r((0,j.t5)("Asset removed successfully"))};return(0,l.jsxs)(o.jqI,{className:"gap-1",children:[(0,l.jsx)(o.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,l.jsx)(o.wpx,{size:"small",onClick:u,loading:n,"data-testid":"remove-btn",children:"Remove"}),(0,l.jsx)(o.cVQ,{isOpen:d,onClose:c,onConfirm:p,title:"Remove asset",message:"Are you sure you want to ignore the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]})},sN=t(34929),sU=t(26183),sV=e=>{var s,t;let{asset:a,systemId:i,readonly:n}=e,{getDataUseDisplayName:r}=(0,sN.Z)(),[d]=sx(),{errorAlert:c,successAlert:u}=(0,I.V)(),[p,h]=(0,m.useState)(!1),x=async e=>{let s=[...a.data_uses||[],e],t=await d({systemKey:i,assets:[{id:a.id,data_uses:s}]});(0,ey.D4)(t)?c((0,sr.e$)(t.error)):u("Consent category added to ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},g=async e=>{var s;let t=null===(s=a.data_uses)||void 0===s?void 0:s.filter(s=>s!==e),n=await d({systemKey:i,assets:[{id:a.id,data_uses:t}]});(0,ey.D4)(n)?c((0,sr.e$)(n.error)):u("Consent category removed from ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},y=null!==(t=null===(s=a.data_uses)||void 0===s?void 0:s.map(e=>({label:r(e),key:e})))&&void 0!==t?t:[];return n?(0,l.jsx)(sU.Z,{children:y.map(e=>(0,l.jsx)(o.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",children:e.label},e.key))}):(0,l.jsxs)(sU.Z,{children:[!p&&(0,l.jsxs)(l.Fragment,{children:[y.map(e=>(0,l.jsx)(o.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",closable:!0,onClose:()=>g(e.key),closeButtonLabel:"Remove data use",children:e.label},e.key)),(0,l.jsx)(o.j8w,{onClick:()=>h(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),p&&(0,l.jsx)(o.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,l.jsx)(sE.Z,{selectedTaxonomies:a.data_uses||[],onSelect:x,onBlur:()=>h(!1),open:!0})})]})},sM=e=>{let{systemKey:s,systemName:t,lockedForGVL:a,onEditClick:i}=e,n=(0,sC.Cl)(),r=n.display({id:"select",cell:e=>{let{row:s}=e;return(0,l.jsx)(sL.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(sL.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),o=n.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(sD.G3,{value:e.getValue()}),header:"Asset"}),d=n.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,l.jsx)(sD.G3,{value:e.getValue()}),header:"Type"}),c=n.display({id:"system",cell:e=>(0,l.jsx)(sP,{systemKey:s,systemName:t,asset:e.row.original,readonly:a}),header:"System"}),u=n.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,l.jsx)(sV,{asset:e.row.original,systemId:s,readonly:a}),header:"Categories of consent",size:200}),p=n.accessor(e=>e.locations,{id:"locations",cell:e=>(0,l.jsx)(sL.mb,{values:e.getValue().map(e=>({label:sF.Z8[e],key:e}))}),header:"Locations",size:300}),m=n.accessor(e=>e.domain,{id:"domain",cell:e=>(0,l.jsx)(sD.G3,{value:e.getValue()}),header:"Domain"}),h=n.accessor(e=>e.page,{id:"page",cell:e=>(0,l.jsx)(sL.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,l.jsx)(sL.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),x=n.display({id:"actions",cell:e=>{let{row:t}=e;return(0,l.jsx)(sW,{asset:t.original,systemKey:s,onEditClick:()=>i(t.original)})},header:"Actions"}),g=[o,d,c,u,p,m,h];return a?g:[r,...g,x]},sB=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:n,onPreviousPageClick:r,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:p,endRange:x,pageIndex:g,setTotalPages:y,resetPageIndexToDefault:f}=(0,sD.oi)(),[_,b]=(0,m.useState)(""),[v,k]=(0,m.useState)(void 0),[w,C]=(0,m.useState)({}),[S]=sg(),D=(0,h.C)(eb.gU),T=(0,o.pmc)(),{data:A,isLoading:E,isFetching:q}=sm({fides_key:t.fides_key,search:_,page:g,size:i}),{isOpen:I,onClose:R,onOpen:z}=(0,o.qY0)(),{isOpen:F,onClose:L,onOpen:Z}=(0,o.qY0)();(0,m.useEffect)(()=>{f()},[_,f]),(0,m.useEffect)(()=>{y(null==A?void 0:A.pages)},[A,y]);let O=sM({systemName:null!==(s=t.name)&&void 0!==s?s:t.fides_key,systemKey:t.fides_key,onEditClick:e=>{k(e),z()},lockedForGVL:D}),P=(0,sw.b7)({getCoreRowModel:(0,sC.sC)(),columns:O,manualPagination:!0,data:(null==A?void 0:A.items)||[],columnResizeMode:"onChange",onRowSelectionChange:C,state:{rowSelection:w}}),W=P.getSelectedRowModel().rows.map(e=>e.original.id),N=async()=>{let e=await S({systemKey:t.fides_key,asset_ids:W});(0,ey.D4)(e)?T((0,j.Vo)((0,sr.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(P.resetRowSelection(),T((0,j.t5)("Assets removed successfully"))),L()};return t?E?(0,l.jsx)(sD.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.xvT,{fontSize:"sm",mb:4,children:D?"This page displays all assets associated with this system. Use the table below to review these technologies for compliance and detailed insights.":"This page displays all assets associated with this system. Use the table below to review and manage these technologies for compliance and detailed insights."}),(0,l.jsxs)(sD.Q$,{children:[(0,l.jsx)(sS.f,{value:_,onChange:b}),!D&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.PJP.mm_,{}),iconPosition:"end",onClick:z,"data-testid":"add-asset-btn",children:"Add asset"}),(0,l.jsx)(sz,{isOpen:I,onClose:()=>{k(void 0),R()},systemKey:t.fides_key,asset:v}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.PJP.ZNm,{}),iconPosition:"end",onClick:Z,disabled:!W.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,l.jsx)(o.cVQ,{isOpen:F,onClose:L,onConfirm:N,title:"Remove assets",message:"Are you sure you want to remove the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]})]}),(0,l.jsx)(sD.ZK,{tableInstance:P,emptyTableNotice:(0,l.jsx)(o.oj8,{image:o.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,l.jsx)(sD.s8,{totalRows:(null==A?void 0:A.total)||0,pageSizes:a,setPageSize:n,onPreviousPageClick:r,isPreviousPageDisabled:d||q,onNextPageClick:c,isNextPageDisabled:u||q,startRange:p,endRange:x})]}):null};(i=r||(r={})).INFORMATION="information",i.DATA_USES="data-uses",i.DATA_FLOW="data-flow",i.INTEGRATIONS="integrations",i.ASSETS="assets",i.HISTORY="history";let sK=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,l.jsxs)(o.xuv,{children:[(0,l.jsx)(o.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,l.jsxs)(o.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,l.jsx)(v.Z,{onClick:s,children:"view it now"})," or"," ",(0,l.jsx)(v.Z,{onClick:t,children:"add privacy declarations in the next tab"}),"."]})]})};var sH=e=>{var s,t;let{isCreate:a}=e,i=(0,u.useRouter)(),{activeTab:n,onTabChange:d}=(0,b.Z)({tabKeys:Object.values(r)}),[p,v]=(0,m.useState)(!1),{systemOrDatamapRoute:k}=(0,y.V)(),w=(0,o.pmc)(),C=(0,h.T)(),S=(0,h.C)(W.NC),[D,T]=(0,m.useState)(void 0),{plus:A}=(0,x.hz)(),{plus:E}=(0,x.hz)(),{data:q}=(0,W.rn)(null==S?void 0:S.fides_key,{skip:!S});(0,m.useEffect)(()=>{C((0,W.db)(q))},[q,C]),(0,m.useEffect)(()=>{S&&T(S.processes_personal_data)},[S]);let I=(0,m.useCallback)(e=>{void 0===S&&v(!0),C((0,W.db)(e)),i.push({pathname:f.Dv,query:{id:e.fides_key}});let s={...j.MA,description:(0,l.jsx)(sK,{onViewDatamap:()=>{i.push(k).then(()=>{w.closeAll()})},onAddPrivacyDeclaration:()=>{d("data-uses"),w.closeAll()}})};w({...s})},[S,C,i,k,w,d]);(0,m.useEffect)(()=>(a&&(C((0,W.db)(void 0)),C((0,eb.b3)("initial")),C((0,eb.gQ)(!1))),()=>{C((0,W.db)(void 0))}),[C,a]);let{attemptAction:R}=(0,g.oI)(),z=(0,m.useCallback)(e=>{R().then(async s=>{if(s){let{status:s}=i.query;if(s&&("succeeded"===s?w((0,j.t5)("Integration successfully authorized.")):w((0,j.Vo)("Failed to authorize integration."))),i.isReady){let e={...i.query};delete e.status,await i.replace({pathname:i.pathname,query:e},void 0,{shallow:!0})}d(e)}})},[R,i,w,d]);(0,m.useEffect)(()=>{let{status:e}=i.query;e&&z("integrations")},[i.query,z]);let F=[{label:"Information",key:"information",children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.xuv,{px:6,mb:9,children:[(0,l.jsx)(g.eB,{}),(0,l.jsx)(sk,{onSuccess:I,system:S})]}),p?(0,l.jsx)(o.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,l.jsxs)(o.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,l.jsx)(o.rUS,{as:c(),href:k,textDecor:"underline",children:"ready to view in your data map"}),". You can return to this setup at any time to add privacy declarations to this system."]})}):null]})},{label:"Data uses",key:"data-uses",children:S?(0,l.jsx)(o.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,l.jsx)(sn,{system:S})}):null,disabled:!S||!D},{label:"Data flow",key:"data-flow",children:S?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsxs)(o.xuv,{px:6,paddingBottom:2,children:[(0,l.jsx)(o.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"Data flow describes the flow of data between systems in your Data Map. Below, you can configure Source and Destination systems and the corresponding links will be drawn in the Data Map graph. Source systems are systems that send data to this system while Destination systems receive data from this system."})]}),(0,l.jsx)(_.q,{system:S,isSystemTab:!0})]}):null,disabled:!S},{label:"Integrations",key:"integrations",children:S?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsx)(o.xuv,{px:6,paddingBottom:2,children:(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,children:E?(0,l.jsxs)(l.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,l.jsx)(o.rUS,{href:f.KH,color:"link.900",children:"Integration Management"})," ","to set up monitoring on databases."]}):"Integrations are used to process privacy requests for access erasure, portability, rectification, and consent."})}),(0,l.jsx)(ex,{connectionConfig:S.connection_configs,systemFidesKey:S.fides_key}),(null===(s=S.connection_configs)||void 0===s?void 0:s.key)&&(0,l.jsx)(e_,{m:6,connectionKey:null===(t=S.connection_configs)||void 0===t?void 0:t.key})]}):null,disabled:!S}];return A&&F.push({label:"Assets",key:"assets",children:S?(0,l.jsx)(sB,{system:S}):null,disabled:!S}),A&&F.push({label:"History",key:"history",children:S?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsx)(o.xuv,{px:6,paddingBottom:6,children:(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"All changes to this system are tracked here in this audit table by date and by user. You can inspect the changes by selecting any of the events listed."})}),(0,l.jsx)(eY,{system:S})]}):null,disabled:!S}),{tabData:F,activeKey:n,onTabChange:z}}},54748:function(e,s,t){"use strict";var a=t(27378),i=t(54682);s.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},28325:function(e,s,t){"use strict";var a=t(27378),i=t(54682);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4808],{77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return v}});var n=i(24246),l=i(39941),o=i(88038),r=i.n(o),a=i(86677);i(27378);var s=i(25980),d=i(90867),u=i(77830),c=()=>{let e=(0,a.useRouter)();return(0,n.jsx)(l.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)(l.xuv,{children:[(0,n.jsxs)(l.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(l.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(l.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,n.jsxs)(l.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},v=e=>{let{children:t,title:i,padded:o=!0,mainProps:u}=e,v=(0,s.hz)(),f=(0,a.useRouter)(),p="/privacy-requests"===f.pathname||"/datastore-connection"===f.pathname,m=!(v.flags.privacyRequestsConfiguration&&p),{data:g}=(0,d.JE)(void 0,{skip:m}),{data:y}=(0,d.PW)(void 0,{skip:m}),h=v.flags.privacyRequestsConfiguration&&(!g||!y)&&p;return(0,n.jsxs)(l.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(r(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(l.kCb,{as:"main",direction:"column",py:o?6:0,px:o?10:0,h:o?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[h?(0,n.jsx)(c,{}):null,t]})]})}},79283:function(e,t,i){"use strict";i.d(t,{l:function(){return s}});var n=i(24246),l=i(39941),o=i(72707),r=i.n(o);let a=e=>{let{data:{formattedTitle:t,description:i,name:o,primaryName:r}}=e;return(0,n.jsxs)(l.jqI,{gap:12,title:"".concat(t," - ").concat(i),children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:r||o}),r&&": ".concat(o)]}),(0,n.jsx)("em",{children:i})]})},s=e=>{let{options:t,...i}=e,o=null==t?void 0:t.map(e=>({...e,className:r().option,formattedTitle:[e.primaryName,e.name].filter(e=>e).join(": ")}));return(0,n.jsx)(l.WPr,{options:o,filterOption:(e,t)=>(null==t?void 0:t.formattedTitle.toLowerCase().includes(e.toLowerCase()))||(null==t?void 0:t.value.toLowerCase().includes(e.toLowerCase()))||!1,optionFilterProp:"label",autoFocus:!0,variant:"borderless",optionRender:a,dropdownStyle:{minWidth:"500px"},className:"w-full p-0","data-testid":"taxonomy-select",...i})}},71248:function(e,t,i){"use strict";i.d(t,{A:function(){return s}});var n=i(24246),l=i(34090),o=i(46782),r=i(97181),a=i(40324);let s=e=>{var t,i;let{name:s,fieldSchema:d,isRequired:u,layout:c="stacked",secretsSchema:v,validate:f}=e,p=(null===(i=d.allOf)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.$ref)&&d.allOf[0].$ref!==o.j?null==v?void 0:v.definitions[d.allOf[0].$ref.replace("#/definitions/","")]:void 0,m=!!(null==p?void 0:p.enum)||d.options,g="boolean"===d.type,y=()=>{var e;if((null===(e=d.allOf)||void 0===e?void 0:e[0].$ref)===o.j)return"Enter dataset.collection.field"};return(0,n.jsx)(l.gN,{id:s,name:s,validate:f,children:e=>{let{field:t}=e;if(m){var i,l,o;let e=null!==(o=null==p?void 0:null===(i=p.enum)||void 0===i?void 0:i.map(e=>({label:e,value:e})))&&void 0!==o?o:null===(l=d.options)||void 0===l?void 0:l.map(e=>({label:e,value:e}));return(0,n.jsx)(r.d,{name:t.name,id:t.name,label:d.title,isRequired:u,tooltip:d.description,layout:c,options:e,mode:d.multiselect?"multiple":void 0},t.name)}return g?(0,n.jsx)(r.d,{name:t.name,id:t.name,label:d.title,isRequired:u,tooltip:d.description,layout:c,options:[{label:"False",value:"false"},{label:"True",value:"true"}]},t.name):(0,n.jsx)(a.j0,{...t,label:d.title,tooltip:d.description,isRequired:u,type:d.sensitive?"password":"text",placeholder:y(),autoComplete:"off",color:"gray.700",variant:c})}},s)}},46782:function(e,t,i){"use strict";i.d(t,{j:function(){return o},l:function(){return r}});var n=i(30454),l=i.n(n);let o="#/definitions/FidesDatasetReference",r=e=>{let t=(e,t,i)=>{let n;return(void 0===t||""===t||void 0===t)&&(n="".concat(e," is required")),i===o&&((null==t?void 0:t.includes("."))?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},i=t=>{var i,n;return null!==(n=null==e?void 0:null===(i=e.required)||void 0===i?void 0:i.includes(t))&&void 0!==n&&n};return{validateField:t,isRequiredField:i,getFieldValidation:(e,n)=>{if(i(e))return e=>{var i;return t(n.title,e,null===(i=n.allOf)||void 0===i?void 0:i[0].$ref)}},preprocessValues:t=>{let i=l()(t);return e&&Object.keys(e.properties).forEach(t=>{var n,l;if((null===(n=e.properties[t].allOf)||void 0===n?void 0:n[0].$ref)===o){let e=null===(l=i.secrets[t])||void 0===l?void 0:l.split(".");e&&(i.secrets[t]={dataset:e.shift(),field:e.join("."),direction:"from"})}"WebsiteSchema"!==e.title||"URL"!==e.properties[t].title||i.secrets[t].startsWith("http://")||i.secrets[t].startsWith("https://")||(i.secrets[t]="https://".concat(i.secrets[t]))}),i}}}},34929:function(e,t,i){"use strict";var n=i(24246),l=i(64925),o=i.n(l),r=i(27378),a=i(16134),s=i(30002),d=i(28079),u=i(57072);let c=()=>{let{isLoading:e}=(0,d.fd)(),t=(0,a.C)(d.U3),{isLoading:i}=(0,u.MO)(),n=(0,a.C)(u.qb),{isLoading:l}=(0,s.te)();return{dataUses:t,dataSubjects:(0,a.C)(s.ZL),dataCategories:n,isLoading:e||i||l}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:i,isLoading:l}=c(),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},s=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=t(e);if(!n)return{};let l=t(a(e,i)),o=!!n.parent_key;return{name:n.name||void 0,primaryName:o&&(null==l?void 0:l.name)!==n.name&&(null==l?void 0:l.name)||void 0}},d=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:l,primaryName:o}=s(e,t,i);return l?o?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsxs)("strong",{children:[o,":"]})," ",l]},e):(0,n.jsx)("strong",{children:l},e):e},u=t=>o()(e,{fides_key:t}),v=e=>o()(t,{fides_key:e}),f=e=>o()(i,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:u,getDataUseDisplayName:e=>d(e,u,1),getDataUseDisplayNameProps:e=>s(e,u,1),getDataCategories:()=>t,getDataCategoryByKey:v,getDataCategoryDisplayName:e=>d(e,v,2),getDataCategoryDisplayNameProps:e=>s(e,v,2),getDataSubjects:()=>i,getDataSubjectByKey:f,getDataSubjectDisplayName:e=>{let t=f(e);return t?t.name:e},getPrimaryKey:a,isLoading:l}}},41337:function(e,t,i){"use strict";var n=i(24246),l=i(39941);i(27378);var o=i(88337),r=i(16394),a=i(14746);let s=a.Ny+a.iW.get(o.R.WEBSITE),d=e=>void 0!==e.connection_type,u=e=>void 0!==e.encoded_icon,c=e=>(null==e?void 0:e.connection_type)===o.R.WEBSITE,v=e=>(null==e?void 0:e.connection_type)===o.R.SAAS;t.Z=e=>{let{data:t,...i}=e;return(0,n.jsx)(l.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{var e,i;let n;if(u(t)&&t.encoded_icon)return"data:image/svg+xml;base64,".concat(t.encoded_icon);if(c(t)){let i=null===(e=t.secrets)||void 0===e?void 0:e.url;if(!i)return s;let n=(0,r.ge)(i);return(0,r.tl)(n,100)}if(d(t)){if(v(t)&&(null===(i=t.saas_config)||void 0===i?void 0:i.type)){let e=t.saas_config.type,i=a.LN.get(e);return i?a.Ny+i:a.Ny+a.iW.get(o.R.SAAS)}n=[...a.iW].find(e=>{let[i]=e;return t.connection_type.toString()===i.toString()})}else if(u(t)){let{identifier:e}=t;n=[...a.iW].find(t=>{let[i]=t;return i.toLowerCase()===e.toLowerCase()})}return n?a.Ny+n[1]:a.VD})(),fallbackSrc:c(t)?s:a.VD,alt:(()=>{if(d(t)){var e;return null!==(e=t.name)&&void 0!==e?e:t.key}return u(t)?t.human_readable:t})(),...i})}},19812:function(e,t,i){"use strict";i.d(t,{t:function(){return a}});var n=i(25010),l=i(14207),o=i(27378),r=i(41966);let a=e=>{var t,i,a;let{connectionConfig:s}=e,[d]=(0,l.S6)(),{data:u}=(0,l.Eg)(null!==(i=null==s?void 0:s.key)&&void 0!==i?i:""),c=null!==(a=null==u?void 0:null===(t=u.items)||void 0===t?void 0:t.map(e=>e.fides_key))&&void 0!==a?a:[],v=c.map(e=>({label:e,value:e})),{data:f}=(0,r.LH)({onlyUnlinkedDatasets:!0,minimal:!0}),p=(0,o.useMemo)(()=>{var e;return null!==(e=null==f?void 0:f.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[f]),{errorAlert:m,successAlert:g}=(0,n.VY)();return{dropdownOptions:[...v,...p],initialDatasets:c,patchConnectionDatasetConfig:async function(e,t){var i,n,l;let{showSuccessAlert:o=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null!==(l=null===(i=e.dataset)||void 0===i?void 0:i.map(e=>({fides_key:e,ctl_dataset_fides_key:e})))&&void 0!==l?l:[],a=await d({connection_key:t,dataset_pairs:r}).unwrap();(null===(n=a.failed)||void 0===n?void 0:n.length)>0?m(a.failed[0].message):o&&g("Dataset successfully updated!")}}}},72707:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[549],{78859:function(e,t,n){var r=n(71928),o=n(76747),i=n(42383),a=n(11611),l=n(37948);e.exports=function(e,t,n,s){if(!a(e))return e;t=o(t,e);for(var u=-1,c=t.length,d=c-1,f=e;null!=f&&++u<c;){var p=l(t[u]),v=n;if("__proto__"===p||"constructor"===p||"prototype"===p)break;if(u!=d){var m=f[p];void 0===(v=s?s(m,p,f):void 0)&&(v=a(m)?m:i(t[u+1])?[]:{})}r(f,p,v),f=f[p]}return e}},74833:function(e,t,n){var r=n(56127),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},80396:function(e,t,n){var r=n(79867),o=n(78859);e.exports=function(e,t,n,i){return o(e,t,n(r(e,t)),i)}},62079:function(e,t,n){var r=n(31137);e.exports=function(e){return"function"==typeof e?e:r}},56632:function(e,t,n){var r=n(89278),o=n(80068),i=n(50098);e.exports=function(e){return function(t,n,a){var l=Object(t);if(!o(t)){var s=r(n,3);t=i(t),n=function(e){return s(l[e],e,l)}}var u=e(t,n,a);return u>-1?l[s?t[u]:u]:void 0}}},56127:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},30454:function(e,t,n){var r=n(40699);e.exports=function(e){return r(e,5)}},64925:function(e,t,n){var r=n(56632)(n(66259));e.exports=r},66259:function(e,t,n){var r=n(95372),o=n(89278),i=n(47991),a=Math.max;e.exports=function(e,t,n){var l=null==e?0:e.length;if(!l)return -1;var s=null==n?0:i(n);return s<0&&(s=a(l+s,0)),r(e,o(t,3),s)}},47215:function(e,t,n){var r=n(78859);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},94919:function(e,t,n){var r=n(91936),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,n){var r=n(94919);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},91936:function(e,t,n){var r=n(74833),o=n(11611),i=n(55193),a=0/0,l=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):l.test(e)?a:+e}},90271:function(e,t,n){var r=n(80396),o=n(62079);e.exports=function(e,t,n){return null==e?e:r(e,t,o(n))}},12627:function(e,t,n){"use strict";var r=n(24246),o=n(79283),i=n(34929);t.Z=e=>{let{selectedTaxonomies:t,showDisabled:n=!1,...a}=e,{getDataCategoryDisplayNameProps:l,getDataCategories:s}=(0,i.Z)(),u=(n?s():s().filter(e=>e.active)).filter(e=>!t.includes(e.fides_key)).map(e=>{let{name:t,primaryName:n}=l(e.fides_key);return{value:e.fides_key,name:t,primaryName:n,description:e.description||""}});return(0,r.jsx)(o.l,{options:u,...a})}},79283:function(e,t,n){"use strict";n.d(t,{l:function(){return s}});var r=n(24246),o=n(39941),i=n(72707),a=n.n(i);let l=e=>{let{data:{formattedTitle:t,description:n,name:i,primaryName:a}}=e;return(0,r.jsxs)(o.jqI,{gap:12,title:"".concat(t," - ").concat(n),children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:a||i}),a&&": ".concat(i)]}),(0,r.jsx)("em",{children:n})]})},s=e=>{let{options:t,...n}=e,i=null==t?void 0:t.map(e=>({...e,className:a().option,formattedTitle:[e.primaryName,e.name].filter(e=>e).join(": ")}));return(0,r.jsx)(o.WPr,{options:i,filterOption:(e,t)=>(null==t?void 0:t.formattedTitle.toLowerCase().includes(e.toLowerCase()))||(null==t?void 0:t.value.toLowerCase().includes(e.toLowerCase()))||!1,optionFilterProp:"label",autoFocus:!0,variant:"borderless",optionRender:l,dropdownStyle:{minWidth:"500px"},className:"w-full p-0","data-testid":"taxonomy-select",...n})}},34929:function(e,t,n){"use strict";var r=n(24246),o=n(64925),i=n.n(o),a=n(27378),l=n(16134),s=n(30002),u=n(28079),c=n(57072);let d=()=>{let{isLoading:e}=(0,u.fd)(),t=(0,l.C)(u.U3),{isLoading:n}=(0,c.MO)(),r=(0,l.C)(c.qb),{isLoading:o}=(0,s.te)();return{dataUses:t,dataSubjects:(0,l.C)(s.ZL),dataCategories:r,isLoading:e||n||o}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:n,isLoading:o}=d(),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=t(e);if(!r)return{};let o=t(l(e,n)),i=!!r.parent_key;return{name:r.name||void 0,primaryName:i&&(null==o?void 0:o.name)!==r.name&&(null==o?void 0:o.name)||void 0}},u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:o,primaryName:i}=s(e,t,n);return o?i?(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("strong",{children:[i,":"]})," ",o]},e):(0,r.jsx)("strong",{children:o},e):e},c=t=>i()(e,{fides_key:t}),f=e=>i()(t,{fides_key:e}),p=e=>i()(n,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:c,getDataUseDisplayName:e=>u(e,c,1),getDataUseDisplayNameProps:e=>s(e,c,1),getDataCategories:()=>t,getDataCategoryByKey:f,getDataCategoryDisplayName:e=>u(e,f,2),getDataCategoryDisplayNameProps:e=>s(e,f,2),getDataSubjects:()=>n,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:l,isLoading:o}}},66112:function(e,t,n){"use strict";var r=n(24246),o=n(39941),i=n(27378),a=n(12627),l=n(34929),s=n(26183);t.Z=e=>{let{selectedTaxonomies:t,onAddTaxonomy:n,onRemoveTaxonomy:u}=e,[c,d]=(0,i.useState)(!1),{getDataCategoryDisplayName:f}=(0,l.Z)();return(0,r.jsxs)(s.Z,{children:[t.map(e=>(0,r.jsx)(o.j8w,{"data-testid":"classification-".concat(e),color:"white",closable:!0,onClose:()=>u(e),closeButtonLabel:"Remove category",children:f(e)},e)),(0,r.jsx)(o.j8w,{onClick:()=>d(!0),"data-testid":"add-category-btn",addable:!0,"aria-label":"Add category"}),c&&(0,r.jsx)(o.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,r.jsx)(a.Z,{selectedTaxonomies:t,onChange:e=>{d(!1),n(e)},onBlur:()=>d(!1),open:c})})]})}},26183:function(e,t,n){"use strict";var r=n(24246);n(27378),t.Z=e=>{let{children:t,className:n,...o}=e;return(0,r.jsx)("div",{className:"relative flex w-full flex-wrap items-center gap-2 overflow-x-auto py-2 ".concat(n||""),...o,children:t})}},76252:function(e,t,n){"use strict";var r=n(24246),o=n(39941),i=n(30454),a=n.n(i),l=n(47215),s=n.n(l),u=n(90271),c=n.n(u),d=n(79806),f=n(20386),p=n(63927),v=n(69435);t.Z=e=>{let{field:t,isOpen:n,onClose:i,dataset:l,collectionName:u,subfields:m}=e,[x]=(0,f.TG)(),{isOpen:h,onOpen:g,onClose:y}=(0,o.qY0)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.ZP,{isOpen:n,onClose:i,description:"Fields are an array of objects that describe the collection's fields. Provide additional context to this field by filling out the fields below.",header:(0,r.jsx)(d.zR,{title:"Field Name: ".concat(null==t?void 0:t.name)}),footer:(0,r.jsx)(d.Gn,{onClose:i,onDelete:g,formId:p.e}),children:(0,r.jsx)(p.Z,{values:t,onSubmit:e=>{let n=(0,v.Fk)({dataset:l,collectionName:u,subfields:m?[...m,(null==t?void 0:t.name)||""]:[(null==t?void 0:t.name)||""]}),r={...t,...e},o=a()(l);s()(o,n,r),x(o),i()},dataType:"field"})}),(0,r.jsx)(o.cVQ,{isOpen:h,onClose:y,onConfirm:()=>{let e=(0,v.Fk)({dataset:l,collectionName:u,subfields:m}),n=a()(l);c()(n,e,e=>({...e,fields:e.fields.filter(e=>e.name!==(null==t?void 0:t.name))})),x(n),i(),y()},title:"Delete Field",message:(0,r.jsxs)(o.xvT,{children:["You are about to permanently delete the field named"," ",(0,r.jsx)(o.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name})," ","from this dataset. Are you sure you would like to continue?"]})})]})}},72707:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[602],{58754:function(e,t,r){var i=r(24246),n=r(39941),s=r(70788);t.Z=e=>{let{heading:t,breadcrumbItems:r,isSticky:l=!0,children:a,rightContent:o,style:d,...u}=e;return(0,i.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",...d}:{paddingBottom:"24px",...d},children:[(0,i.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(n.lQT,{className:r||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!r&&(0,i.jsx)(s.m,{className:a?"pb-4":void 0,items:r,"data-testid":"page-breadcrumb"}),a]})}},25010:function(e,t,r){r.d(t,{HK:function(){return p},VY:function(){return i.V},h0:function(){return u},Rx:function(){return g},rK:function(){return v}});var i=r(84306),n=r(27378),s=r(40431),l=r(32735),a=r(55484);let o=(0,s.jo)({parse(e){let t=parseInt(e,10);try{return a.Rx().integer().positive().validateSync(t),t}catch(e){return null}},serialize:e=>e.toString()}),d=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{page:o.withDefault(l.Ej),size:r.pageSizeOptions?(0,s.bJ)(r.pageSizeOptions).withDefault(null!==(e=r.pageSize)&&void 0!==e?e:l.L8):o.withDefault(null!==(t=r.pageSize)&&void 0!==t?t:l.L8)}},u=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:i=l.L8,pageSizeOptions:a,showSizeChanger:o=!0}=r,u=null!=a?a:l.VZ,c=(0,n.useMemo)(()=>d({pageSize:i,pageSizeOptions:a}),[i,a]),[p,h]=(0,s.XI)(c,{history:"push"}),g={pageIndex:null!==(e=p.page)&&void 0!==e?e:l.Ej,pageSize:null!==(t=p.size)&&void 0!==t?t:i};return{...g,updatePageIndex:e=>{h({page:e})},updatePageSize:e=>{h({page:e!==g.pageSize?l.Ej:g.pageIndex,size:e})},resetPagination:()=>{h({page:l.Ej,size:i})},pageSizeOptions:u,showSizeChanger:o}};var c=r(812);let p=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let r="An unexpected error occurred. Please try again.";(0,c.Ot)(t)?r=t.data.detail:(0,c.tB)(t)&&(r=t.data.detail[0].msg),e(r)}}},h=()=>({search:s.Oi.withDefault("")}),g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:t,onSearchChange:r}=e,i=(0,n.useMemo)(()=>h(),[]),[l,a]=(0,s.XI)(i,{history:"push"}),o=(0,n.useMemo)(()=>({searchQuery:l.search||t||void 0}),[l,t]),d=(0,n.useCallback)(e=>{a({search:e||null})},[a]),u=(0,n.useCallback)(()=>{a({search:null})},[a]);return(0,n.useEffect)(()=>{r&&r(o)},[o,r]),{...o,updateSearch:d,resetSearch:u,searchProps:{value:o.searchQuery||"",onChange:d,onClear:()=>d("")}}},x=e=>({sortKey:e?(0,s.jx)([...e]):s.Oi.withDefault(""),sortOrder:(0,s.km)(["ascend","descend"])}),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:t,defaultSortOrder:r,onSortingChange:i,validColumns:l}=e,a=(0,n.useMemo)(()=>x(l),[l]),[o,d]=(0,s.XI)(a,{history:"push"}),u=(0,n.useMemo)(()=>{var e;return{sortKey:o.sortKey||t,sortOrder:null!==(e=o.sortOrder)&&void 0!==e?e:r}},[o,t,r]),c=(0,n.useCallback)((e,t)=>{d({sortKey:e?String(e):null,sortOrder:null!=t?t:null})},[d]),p=(0,n.useCallback)(()=>{d({sortKey:null,sortOrder:null})},[d]);return(0,n.useEffect)(()=>{i&&i(u)},[u,i]),{...u,updateSorting:c,resetSorting:p,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:u.sortOrder,sortedInfo:u.sortKey?{field:u.sortKey,order:u.sortOrder}:void 0}}}},84306:function(e,t,r){r.d(t,{V:function(){return s}});var i=r(24246),n=r(39941);let s=()=>{let e=(0,n.pmc)();return{errorAlert:(t,r,s)=>{let l={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,i.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(n.zMQ,{}),(0,i.jsxs)(n.xuv,{children:[r&&(0,i.jsx)(n.CdC,{children:r}),(0,i.jsx)(n.XaZ,{children:t})]}),(0,i.jsx)(n.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,l):e(l)},successAlert:(t,r,s)=>{let l={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,i.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(n.zMQ,{}),(0,i.jsxs)(n.xuv,{children:[r&&(0,i.jsx)(n.CdC,{children:r}),(0,i.jsx)(n.XaZ,{children:t})]}),(0,i.jsx)(n.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,l):e(l)}}}},70788:function(e,t,r){r.d(t,{m:function(){return d}});var i=r(24246),n=r(39941),s=r(79894),l=r.n(s),a=r(27378);let{Text:o}=n.AntTypography,d=e=>{let{items:t,...r}=e,s=(0,a.useMemo)(()=>null==t?void 0:t.map((e,r)=>{let s=r===t.length-1,a={...e},d=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,i.jsx)(o,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,id:s?"breadcrumb-current-page":void 0,children:a.title})),d)?a.title=(0,i.jsx)(n.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,i.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,i.jsx)(n.zrq,{items:s,...r})}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8002],{74833:function(e,t,n){var i=n(56127),r=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(r,""):e}},56127:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},66726:function(e,t,n){var i=n(11611),r=n(82846),s=n(91936),o=Math.max,l=Math.min;e.exports=function(e,t,n){var c,u,a,d,f,v,h=0,x=!1,I=!1,E=!0;if("function"!=typeof e)throw TypeError("Expected a function");function j(t){var n=c,i=u;return c=u=void 0,h=t,d=e.apply(i,n)}function L(e){var n=e-v,i=e-h;return void 0===v||n>=t||n<0||I&&i>=a}function _(){var e,n,i,s=r();if(L(s))return C(s);f=setTimeout(_,(e=s-v,n=s-h,i=t-e,I?l(i,a-n):i))}function C(e){return(f=void 0,E&&c)?j(e):(c=u=void 0,d)}function S(){var e,n=r(),i=L(n);if(c=arguments,u=this,v=n,i){if(void 0===f)return h=e=v,f=setTimeout(_,t),x?j(e):d;if(I)return clearTimeout(f),f=setTimeout(_,t),j(v)}return void 0===f&&(f=setTimeout(_,t)),d}return t=s(t)||0,i(n)&&(x=!!n.leading,a=(I="maxWait"in n)?o(s(n.maxWait)||0,t):a,E="trailing"in n?!!n.trailing:E),S.cancel=function(){void 0!==f&&clearTimeout(f),h=0,c=v=u=f=void 0},S.flush=function(){return void 0===f?d:C(r())},S}},82846:function(e,t,n){var i=n(77400);e.exports=function(){return i.Date.now()}},91936:function(e,t,n){var i=n(74833),r=n(11611),s=n(55193),o=0/0,l=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,a=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return o;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=c.test(e);return n||u.test(e)?a(e.slice(2),n?2:8):l.test(e)?o:+e}},30952:function(e,t,n){"use strict";n.d(t,{f:function(){return c}});var i=n(24246),r=n(66726),s=n.n(r),o=n(27378),l=n(26917);let c=e=>{let{value:t,onChange:n,placeholder:r,...c}=e,[u,a]=(0,o.useState)(t);(0,o.useEffect)(()=>{a(t||"")},[t]);let d=s()(n,500),f=(0,o.useCallback)(e=>{a(e),d(e)},[]);return(0,i.jsx)(l.Z,{value:u,onChange:f,onClear:()=>{a(""),n("")},placeholder:r,...c})}},35287:function(e,t,n){"use strict";var i=n(24246),r=n(39941),s=n(88038),o=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)(o(),{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})]})}},79494:function(e,t,n){"use strict";var i=n(24246),r=n(39941);t.Z=e=>{let{title:t,icon:n,type:s,...o}=e;return(0,i.jsx)(r.wpx,{size:"small",type:s,"data-testid":"action-".concat(t),icon:n,iconPosition:"start",...o,children:t})}},38347:function(e,t,n){"use strict";var i=n(24246),r=n(39941),s=n(76904);t.Z=()=>(0,i.jsxs)(r.J2e,{isLazy:!0,trigger:"hover",children:[(0,i.jsx)(r.xol,{children:(0,i.jsx)(r.UOT,{color:"gray.400"})}),(0,i.jsxs)(r.yky,{bgColor:"gray.800",color:"white",fontSize:"sm",w:"auto",border:"none",children:[(0,i.jsx)(r.Ytg,{fontWeight:"semibold",border:"none",pb:0,children:"Activity legend:"}),(0,i.jsx)(r.QHN,{bgColor:"gray.800"}),(0,i.jsx)(r.baG,{border:"none",children:(0,i.jsxs)(r.MIq,{columns:2,spacing:2,children:[(0,i.jsxs)(r.vyj,{children:[(0,i.jsx)(s.Rv,{}),(0,i.jsx)("div",{children:"Change detected"})]}),(0,i.jsxs)(r.vyj,{children:[(0,i.jsx)(s.$P,{}),(0,i.jsx)("div",{children:"Data labeled"})]}),(0,i.jsxs)(r.vyj,{children:[(0,i.jsx)(s.zj,{}),(0,i.jsx)("div",{children:"Monitoring"})]}),(0,i.jsxs)(r.vyj,{children:[(0,i.jsx)(s.dK,{}),(0,i.jsx)("div",{children:"Addition detected"})]}),(0,i.jsxs)(r.vyj,{children:[(0,i.jsx)(s.Kr,{}),(0,i.jsx)("div",{children:"Unmonitored"})]}),(0,i.jsxs)(r.vyj,{children:[(0,i.jsx)(s.q1,{}),(0,i.jsx)("div",{children:"Removal detected"})]})]})})]})]})},47182:function(e,t,n){"use strict";var i=n(86677),r=n(77830);t.Z=()=>{let e=(0,i.useRouter)();return{monitorId:e.query.monitorId,resourceUrn:e.query.resourceUrn,navigateToDetectionResults:t=>{let{resourceUrn:n,filterTab:i}=t;e.push({pathname:r.dS,query:{resourceUrn:n},hash:i})},navigateToDiscoveryResults:t=>{let{resourceUrn:n,filterTab:i}=t;e.push({pathname:r.Sj,query:{resourceUrn:n},hash:i})}}}},76904:function(e,t,n){"use strict";n.d(t,{dK:function(){return d},Rv:function(){return x},$P:function(){return v},zj:function(){return I},Kr:function(){return E},q1:function(){return f},QL:function(){return j}});var i=n(24246),r=n(39941),s=n(3124),o=n.n(s);let l=e=>{let{...t}=e;return(0,i.jsx)("svg",{viewBox:"0 0 8 8",focusable:"false",...t,children:(0,i.jsx)("path",{fill:"currentColor",d:"M7.23192 8H8V7.23192V1.85539V1.08731H6.46385V1.85539V5.37654L1.62976 0.544855L1.08731 0L0 1.08731L0.542454 1.62976L5.37654 6.46385H1.85539H1.08731V8H1.85539H7.23192Z"})})},c=e=>{let{...t}=e;return(0,i.jsx)("svg",{viewBox:"0 0 8 8",focusable:"false",...t,children:(0,i.jsx)("path",{fill:"currentColor",d:"M7.23192 0H8V0.768077V6.14461V6.91269H6.46385V6.14461V2.62346L1.62976 7.45515L1.08731 8L0 6.91269L0.542454 6.37024L5.37654 1.53615H1.85539H1.08731V0H1.85539H7.23192Z"})})},u=e=>{let{...t}=e;return(0,i.jsx)("svg",{viewBox:"0 0 9 10",focusable:"false",...t,children:(0,i.jsx)("path",{fill:"currentColor",d:"M0 0.5V5L4.5 9.5L9 5L4.5 0.5H0ZM2.25 2.10714C2.4205 2.10714 2.58401 2.17487 2.70457 2.29543C2.82513 2.41599 2.89286 2.5795 2.89286 2.75C2.89286 2.9205 2.82513 3.08401 2.70457 3.20457C2.58401 3.32513 2.4205 3.39286 2.25 3.39286C2.0795 3.39286 1.91599 3.32513 1.79543 3.20457C1.67487 3.08401 1.60714 2.9205 1.60714 2.75C1.60714 2.5795 1.67487 2.41599 1.79543 2.29543C1.91599 2.17487 2.0795 2.10714 2.25 2.10714Z"})})};var a=n(28278);let d=()=>(0,i.jsx)(c,{style:{color:o().FIDESUI_SUCCESS},className:"size-2","data-testid":"add-icon"}),f=()=>(0,i.jsx)(l,{style:{color:o().FIDESUI_ERROR},className:"size-2","data-testid":"remove-icon"}),v=()=>(0,i.jsx)(u,{style:{color:o().FIDESUI_WARNING},className:"size-3","data-testid":"classify-icon"}),h=e=>{let{color:t,...n}=e;return(0,i.jsx)(r.PJP.fRw,{style:{color:t},className:"size-2",...n})},x=()=>(0,i.jsx)(h,{color:o().FIDESUI_INFO,"data-testid":"change-icon"}),I=()=>(0,i.jsx)(h,{color:o().FIDESUI_SUCCESS,"data-testid":"monitored-icon"}),E=()=>(0,i.jsx)(h,{color:o().FIDESUI_ERROR,"data-testid":"muted-icon"}),j={[a.E.ADDITION]:(0,i.jsx)(d,{}),[a.E.REMOVAL]:(0,i.jsx)(f,{}),[a.E.CLASSIFICATION]:(0,i.jsx)(v,{}),[a.E.CHANGE]:(0,i.jsx)(x,{}),[a.E.MONITORED]:(0,i.jsx)(I,{}),[a.E.MUTED]:(0,i.jsx)(E,{}),[a.E.IN_PROGRESS]:(0,i.jsx)(()=>(0,i.jsx)(h,{color:o().FIDESUI_WARNING,"data-testid":"in-progress-icon"}),{}),[a.E.NONE]:null}},87667:function(e,t,n){"use strict";var i=n(24246),r=n(39941),s=n(76904),o=n(20449),l=n(98559),c=n(80356);t.Z=e=>{let{result:t,changeTypeOverride:n}=e,u=null!=n?n:(0,o.Z)(t);return(0,i.jsxs)(r.vyj,{className:"h-full",children:[(0,i.jsx)(r.esZ,{title:u,children:(0,i.jsx)("span",{children:s.QL[u]})}),(0,i.jsx)(r.xvT,{fontSize:"xs",lineHeight:4,fontWeight:(0,c.Z)(t)?"semibold":"normal",overflow:"hidden",textOverflow:"ellipsis",children:(0,l.Z)(t)})]})}},50169:function(e,t,n){"use strict";var i=n(24246),r=n(47935),s=n(28278),o=n(20449);let l={[s.E.MUTED]:{color:"marble",label:"Unmonitored"},[s.E.MONITORED]:{color:"success",label:"Monitoring"},[s.E.IN_PROGRESS]:{color:"info",label:"Classifying"}};t.Z=e=>{var t,n,s,c,u;let{result:a,changeTypeOverride:d}=e;if(null===(t=a.user_assigned_data_categories)||void 0===t?void 0:t.length)return(0,i.jsx)(r.A4,{color:"success",value:"Reviewed"});let f=null!=d?d:(0,o.Z)(a);return(0,i.jsx)(r.A4,{color:null!==(c=null===(n=l[f])||void 0===n?void 0:n.color)&&void 0!==c?c:"warning",value:null!==(u=null===(s=l[f])||void 0===s?void 0:s.label)&&void 0!==u?u:"Pending review"})}},28278:function(e,t,n){"use strict";var i,r;n.d(t,{E:function(){return i}}),(r=i||(i={})).ADDITION="Addition",r.CHANGE="Change",r.REMOVAL="Removal",r.CLASSIFICATION="Classification",r.IN_PROGRESS="Classifying",r.MONITORED="Monitoring",r.MUTED="Unmonitored",r.NONE="--"},74241:function(e,t){"use strict";t.Z=e=>{let t=e.split(".");return t.length>1?t[1]:""}},20449:function(e,t,n){"use strict";var i=n(28278),r=n(54682);t.Z=e=>e.diff_status===r.LL.ADDITION?i.E.ADDITION:e.diff_status===r.LL.REMOVAL?i.E.REMOVAL:e.diff_status===r.LL.CLASSIFYING||e.diff_status===r.LL.CLASSIFICATION_QUEUED?i.E.IN_PROGRESS:e.diff_status===r.LL.CLASSIFICATION_ADDITION||e.diff_status===r.LL.CLASSIFICATION_UPDATE?i.E.CLASSIFICATION:e.child_diff_statuses?e.child_diff_statuses[r.LL.CLASSIFYING]||e.child_diff_statuses[r.LL.CLASSIFICATION_QUEUED]?i.E.IN_PROGRESS:e.child_diff_statuses[r.LL.CLASSIFICATION_ADDITION]||e.child_diff_statuses[r.LL.CLASSIFICATION_UPDATE]?i.E.CLASSIFICATION:e.child_diff_statuses[r.LL.ADDITION]||e.child_diff_statuses[r.LL.REMOVAL]?i.E.CHANGE:e.diff_status===r.LL.MONITORED?i.E.MONITORED:e.diff_status===r.LL.MUTED?i.E.MUTED:i.E.NONE:i.E.NONE},7940:function(e,t,n){"use strict";n.d(t,{G:function(){return r}});var i=n(54682);let r=e=>{var t,n,r;return e?e.resource_type?e.resource_type:(null===(t=e.schemas)||void 0===t?void 0:t.length)?i.D$.DATABASE:(null===(n=e.tables)||void 0===n?void 0:n.length)?i.D$.SCHEMA:(null===(r=e.fields)||void 0===r?void 0:r.length)?i.D$.TABLE:i.D$.FIELD:void 0}},98559:function(e,t){"use strict";t.Z=e=>{let{name:t,urn:n,monitor_config_id:i,database_name:r,schema_name:s,table_name:o,top_level_field_name:l,top_level_field_urn:c}=e;if(!l)return t;let u=n.split(".");return c?n.replace("".concat(c).concat("."),""):([i,r,s,o,l].forEach(e=>{if(e){let t=u.indexOf(e);t>-1&&u.splice(t,1)}}),u.join("."))}},80285:function(e,t){"use strict";t.Z=e=>e.urn},36168:function(e,t){"use strict";t.Z=e=>{var t;return!!e.parent_table_urn&&null!==(t=e.sub_field_urns)&&void 0!==t&&!!t.length&&!e.top_level_field_name}},80356:function(e,t,n){"use strict";var i=n(7940),r=n(36168),s=n(54682);t.Z=e=>(0,i.G)(e)!==s.D$.FIELD||(0,r.Z)(e)}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4231],{74833:function(e,t,s){var a=s(56127),i=/^\s+/;e.exports=function(e){return e?e.slice(0,a(e)+1).replace(i,""):e}},56632:function(e,t,s){var a=s(89278),i=s(80068),n=s(50098);e.exports=function(e){return function(t,s,r){var l=Object(t);if(!i(t)){var o=a(s,3);t=n(t),s=function(e){return o(l[e],e,l)}}var d=e(t,s,r);return d>-1?l[o?t[d]:d]:void 0}}},56127:function(e){var t=/\s/;e.exports=function(e){for(var s=e.length;s--&&t.test(e.charAt(s)););return s}},64925:function(e,t,s){var a=s(56632)(s(66259));e.exports=a},66259:function(e,t,s){var a=s(95372),i=s(89278),n=s(47991),r=Math.max;e.exports=function(e,t,s){var l=null==e?0:e.length;if(!l)return -1;var o=null==s?0:n(s);return o<0&&(o=r(l+o,0)),a(e,i(t,3),o)}},94919:function(e,t,s){var a=s(91936),i=1/0;e.exports=function(e){return e?(e=a(e))===i||e===-i?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,s){var a=s(94919);e.exports=function(e){var t=a(e),s=t%1;return t==t?s?t-s:t:0}},91936:function(e,t,s){var a=s(74833),i=s(11611),n=s(55193),r=0/0,l=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(n(e))return r;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=a(e);var s=o.test(e);return s||d.test(e)?c(e.slice(2),s?2:8):l.test(e)?r:+e}},66248:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-catalog",function(){return s(99375)}])},77213:function(e,t,s){"use strict";s.d(t,{Z:function(){return p}});var a=s(24246),i=s(39941),n=s(88038),r=s.n(n),l=s(86677);s(27378);var o=s(25980),d=s(90867),c=s(77830),u=()=>{let e=(0,l.useRouter)();return(0,a.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,a.jsxs)(i.xuv,{children:[(0,a.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,a.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,a.jsx)(i.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,a.jsxs)(i.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:t,title:s,padded:n=!0,mainProps:c}=e,p=(0,o.hz)(),m=(0,l.useRouter)(),x="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,v=!(p.flags.privacyRequestsConfiguration&&x),{data:f}=(0,d.JE)(void 0,{skip:v}),{data:h}=(0,d.PW)(void 0,{skip:v}),g=p.flags.privacyRequestsConfiguration&&(!f||!h)&&x;return(0,a.jsxs)(i.kCb,{"data-testid":s,direction:"column",h:"100vh",children:[(0,a.jsxs)(r(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsxs)(i.kCb,{as:"main",direction:"column",py:n?6:0,px:n?10:0,h:n?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[g?(0,a.jsx)(u,{}):null,t]})]})}},58754:function(e,t,s){"use strict";var a=s(24246),i=s(39941),n=s(70788);t.Z=e=>{let{heading:t,breadcrumbItems:s,isSticky:r=!0,children:l,rightContent:o,style:d,...c}=e;return(0,a.jsxs)("div",{...c,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,a.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,a.jsx)(i.lQT,{className:s||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,a.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!s&&(0,a.jsx)(n.m,{className:l?"pb-4":void 0,items:s,"data-testid":"page-breadcrumb"}),l]})}},79789:function(e,t,s){"use strict";s.d(t,{Hn:function(){return l},XU:function(){return r},Z5:function(){return o},aG:function(){return u},cB:function(){return n},hX:function(){return c},vQ:function(){return d}});var a=s(24246),i=s(39941);let n=e=>{let{text:t,...s}=e;return(0,a.jsx)(i.X6q,{fontSize:"sm",mt:4,mb:1,...s,children:t})},r=e=>{let{children:t}=e;return(0,a.jsx)(i.xvT,{fontSize:"14px",mb:4,children:t})},l=e=>{let{children:t,href:s}=e;return(0,a.jsx)(i.rUS,{href:s,textDecoration:"underline",isExternal:!0,children:t})},o=e=>{let{children:t}=e;return(0,a.jsx)(i.QI$,{fontSize:"14px",mb:4,children:t})},d=e=>{let{children:t}=e;return(0,a.jsx)(i.GSI,{fontSize:"14px",mb:4,ml:6,children:t})},c=e=>{let{children:t}=e;return(0,a.jsx)(i.EKh,{display:"block",whiteSpace:"pre",p:4,mb:4,overflowX:"scroll",children:t})},u=e=>{let{data:t}=e;return(0,a.jsxs)(i.iA_,{fontSize:"14px",children:[(0,a.jsx)(i.hrZ,{children:(0,a.jsxs)(i.Tr,{children:[(0,a.jsx)(i.Th,{children:"Permission"}),(0,a.jsx)(i.Th,{children:"Description"})]})}),(0,a.jsx)(i.p3B,{children:t.map(e=>(0,a.jsxs)(i.Tr,{children:[(0,a.jsx)(i.Td,{children:(0,a.jsx)(i.Vp9,{children:e.permission})}),(0,a.jsx)(i.Td,{children:e.description})]},e.permission))})]})}},83099:function(e,t,s){"use strict";var a=s(24246),i=s(79283),n=s(34929);t.Z=e=>{let{selectedTaxonomies:t,showDisabled:s=!1,...r}=e,{getDataUseDisplayNameProps:l,getDataUses:o}=(0,n.Z)(),d=(s?o():o().filter(e=>e.active)).filter(e=>!t.includes(e.fides_key)).map(e=>{let{name:t,primaryName:s}=l(e.fides_key);return{value:e.fides_key,name:t,primaryName:s,description:e.description||""}});return(0,a.jsx)(i.l,{options:d,...r})}},79283:function(e,t,s){"use strict";s.d(t,{l:function(){return o}});var a=s(24246),i=s(39941),n=s(72707),r=s.n(n);let l=e=>{let{data:{formattedTitle:t,description:s,name:n,primaryName:r}}=e;return(0,a.jsxs)(i.jqI,{gap:12,title:"".concat(t," - ").concat(s),children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("strong",{children:r||n}),r&&": ".concat(n)]}),(0,a.jsx)("em",{children:s})]})},o=e=>{let{options:t,...s}=e,n=null==t?void 0:t.map(e=>({...e,className:r().option,formattedTitle:[e.primaryName,e.name].filter(e=>e).join(": ")}));return(0,a.jsx)(i.WPr,{options:n,filterOption:(e,t)=>(null==t?void 0:t.formattedTitle.toLowerCase().includes(e.toLowerCase()))||(null==t?void 0:t.value.toLowerCase().includes(e.toLowerCase()))||!1,optionFilterProp:"label",autoFocus:!0,variant:"borderless",optionRender:l,dropdownStyle:{minWidth:"500px"},className:"w-full p-0","data-testid":"taxonomy-select",...s})}},97181:function(e,t,s){"use strict";s.d(t,{d:function(){return d}});var a=s(24246),i=s(39941),n=s(34090),r=s(27378),l=s(46238),o=s(40324);let d=e=>{let{name:t,label:s,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:m,...x}=e,[v,f,{setValue:h}]=(0,n.U$)(t),g=!!(f.touched&&f.error),[j,y]=(0,r.useState)("");v.value||"tags"!==x.mode&&"multiple"!==x.mode||(v.value=[]),"tags"===x.mode&&"string"==typeof v.value&&(v.value=[v.value]);let b="tags"===x.mode?(e,t)=>e?e.value!==j||v.value.includes(j)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(j,'"'):void 0:x.optionRender||void 0,_=e=>{y(e),x.onSearch&&x.onSearch(e)},w=(e,t)=>{h(e),x.onChange&&x.onChange(e,t)};return"inline"===p?(0,a.jsx)(i.NIc,{isInvalid:g,isRequired:u,children:(0,a.jsxs)(i.rjZ,{templateColumns:s?"1fr 3fr":"1fr",children:[s?(0,a.jsx)(o.__,{htmlFor:x.id||t,...d,children:s}):null,(0,a.jsxs)(i.jqI,{align:"center",children:[(0,a.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,a.jsx)(i.WPr,{...v,id:x.id||t,"data-testid":"controlled-select-".concat(v.name),...x,optionRender:b,onSearch:"tags"===x.mode?_:void 0,onChange:w,value:v.value||void 0,status:g?"error":void 0}),m&&(0,a.jsx)(i.Q6r,{children:m}),(0,a.jsx)(o.Bc,{isInvalid:g,message:f.error,fieldName:v.name})]}),(0,a.jsx)(l.b,{label:c,className:g?"mt-2 self-start":void 0})]})]})}):(0,a.jsx)(i.NIc,{isInvalid:g,isRequired:u,children:(0,a.jsxs)(i.gCW,{alignItems:"start",children:[(0,a.jsxs)(i.jqI,{align:"center",children:[s?(0,a.jsx)(o.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...d,children:s}):null,(0,a.jsx)(l.b,{label:c})]}),(0,a.jsx)(i.WPr,{...v,id:x.id||t,"data-testid":"controlled-select-".concat(v.name),...x,optionRender:b,onSearch:"tags"===x.mode?_:void 0,onChange:w,value:v.value||void 0,status:g?"error":void 0}),m&&(0,a.jsx)(i.Q6r,{style:{marginTop:0},children:m}),(0,a.jsx)(o.Bc,{isInvalid:g,message:f.error,fieldName:v.name})]})})}},34929:function(e,t,s){"use strict";var a=s(24246),i=s(64925),n=s.n(i),r=s(27378),l=s(16134),o=s(30002),d=s(28079),c=s(57072);let u=()=>{let{isLoading:e}=(0,d.fd)(),t=(0,l.C)(d.U3),{isLoading:s}=(0,c.MO)(),a=(0,l.C)(c.qb),{isLoading:i}=(0,o.te)();return{dataUses:t,dataSubjects:(0,l.C)(o.ZL),dataCategories:a,isLoading:e||s||i}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:s,isLoading:i}=u(),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},o=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=t(e);if(!a)return{};let i=t(l(e,s)),n=!!a.parent_key;return{name:a.name||void 0,primaryName:n&&(null==i?void 0:i.name)!==a.name&&(null==i?void 0:i.name)||void 0}},d=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:i,primaryName:n}=o(e,t,s);return i?n?(0,a.jsxs)(r.Fragment,{children:[(0,a.jsxs)("strong",{children:[n,":"]})," ",i]},e):(0,a.jsx)("strong",{children:i},e):e},c=t=>n()(e,{fides_key:t}),p=e=>n()(t,{fides_key:e}),m=e=>n()(s,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:c,getDataUseDisplayName:e=>d(e,c,1),getDataUseDisplayNameProps:e=>o(e,c,1),getDataCategories:()=>t,getDataCategoryByKey:p,getDataCategoryDisplayName:e=>d(e,p,2),getDataCategoryDisplayNameProps:e=>o(e,p,2),getDataSubjects:()=>s,getDataSubjectByKey:m,getDataSubjectDisplayName:e=>{let t=m(e);return t?t.name:e},getPrimaryKey:l,isLoading:i}}},8133:function(e,t,s){"use strict";var a=s(24246),i=s(39941);t.Z=e=>{let{title:t,children:s,isOpen:n,onClose:r,modalContentProps:l,showCloseButton:o=!1,footer:d,...c}=e;return(0,a.jsxs)(i.u_l,{isOpen:n,onClose:r,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...c,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",...l,children:[o&&(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.xBx,{p:0,children:(0,a.jsx)(i.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,a.jsx)(i.X6q,{as:"h3",size:"sm",children:t})})}),(0,a.jsx)(i.fef,{pb:4,overflow:"auto",children:s}),d&&(0,a.jsx)(i.mzw,{children:d})]})]})}},70788:function(e,t,s){"use strict";s.d(t,{m:function(){return d}});var a=s(24246),i=s(39941),n=s(79894),r=s.n(n),l=s(27378);let{Text:o}=i.AntTypography,d=e=>{let{items:t,...s}=e,n=(0,l.useMemo)(()=>null==t?void 0:t.map((e,s)=>{let n=s===t.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,a.jsx)(o,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,id:n?"breadcrumb-current-page":void 0,children:l.title})),d)?l.title=(0,a.jsx)(i.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,a.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,a.jsx)(i.zrq,{items:n,...s})}},79609:function(e,t,s){"use strict";s.d(t,{N4:function(){return r},UG:function(){return i},xw:function(){return n}});var a=s(54427);let{useGetCatalogSystemsQuery:i,useGetCatalogProjectsQuery:n,useGetCatalogDatasetsQuery:r}=s(78780).u.injectEndpoints({endpoints:e=>({getCatalogSystems:e.query({query:e=>({method:"GET",url:"/plus/data-catalog/system",params:e}),providesTags:["Catalog Systems","System"]}),getCatalogProjects:e.query({query:e=>{let{...t}=e;return{method:"GET",url:"/plus/data-catalog/project",params:t}},providesTags:["Discovery Monitor Results"]}),getCatalogDatasets:e.query({query:e=>{let{...t}=e;return{method:"GET",url:"/plus/data-catalog/dataset",params:t}},providesTags:["Discovery Monitor Results"]})})});(0,a.oM)({name:"dataCatalog",initialState:{page:1,pageSize:50},reducers:{}})},81406:function(e,t,s){"use strict";var a=s(24246),i=s(39941);t.Z=()=>(0,a.jsxs)(i.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,a.jsx)(i.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,a.jsx)(i.xvT,{fontSize:"sm",children:"You're up to date!"})]})},26183:function(e,t,s){"use strict";var a=s(24246);s(27378),t.Z=e=>{let{children:t,className:s,...i}=e;return(0,a.jsx)("div",{className:"relative flex w-full flex-wrap items-center gap-2 overflow-x-auto py-2 ".concat(s||""),...i,children:t})}},3765:function(e,t,s){"use strict";var a=s(39941),i=s(812),n=s(46628),r=s(1315),l=s(31883);t.Z=e=>{let t=(0,a.pmc)(),[s]=(0,r.qQ)(),o=s=>!!e.privacy_declarations.find(e=>e.data_use===s.data_use&&e.name===s.name)&&(t((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,s)=>{if((0,l.D4)(e)){let s=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");t((0,n.Vo)(s));return}return t.closeAll(),t((0,n.t5)(s?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(t,a)=>{let i=t.map(e=>{var t;return{...e,name:null!==(t=e.name)&&void 0!==t?t:""}}),n={...e,privacy_declarations:i};return d(await s(n),a)};return{createDataUse:async s=>{if(!o(s))return t.closeAll(),c([...e.privacy_declarations,s])},updateDataUse:async(t,s)=>{if(!(s.id!==t.id&&o(s)))return c(e.privacy_declarations.map(e=>e.id===t.id?s:e))},deleteDataUse:async t=>c(e.privacy_declarations.filter(e=>e.id!==t.id),!0),deleteDeclarationByDataUse:async t=>c(e.privacy_declarations.filter(e=>e.data_use!==t),!0)}}},54748:function(e,t,s){"use strict";var a=s(27378),i=s(54682);t.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},28325:function(e,t,s){"use strict";var a=s(27378),i=s(54682);t.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})},99375:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return L}});var a=s(24246),i=s(77213),n=s(58754),r=s(92222),l=s(59003),o=s(86677),d=s(27378),c=s(77830),u=s(47935),p=s(16394),m=s(79609),x=s(81406),v=s(39941),f=s(79789),h=s(83099),g=s(34929),j=s(34090),y=s(55484),b=s(97181),_=s(40324),w=s(8133),C=s(54748),k=s(28325),S=s(34151),N=s.n(S);let D=y.Ry().shape({data_use:y.Z_().required("Data use is required")});var R=e=>{let{isOpen:t,onClose:s,onSave:i,declaration:n}=e,{getDataUses:r,getDataCategories:l,getDataSubjects:o}=(0,g.Z)(),{isOpen:d,onToggle:c}=(0,v.qY0)(),u=r().map(e=>({label:e.fides_key,value:e.fides_key})),p=l().map(e=>({label:e.fides_key,value:e.fides_key})),m=o().map(e=>({label:e.fides_key,value:e.fides_key})),{legalBasisOptions:x}=(0,C.Z)(),{specialCategoryLegalBasisOptions:f}=(0,k.Z)();return(0,a.jsx)(j.J9,{initialValues:n,enableReinitialize:!0,onSubmit:e=>{i(e),s()},validationSchema:D,children:e=>{let{dirty:i,isValid:n,values:r,resetForm:l}=e;return(0,a.jsx)(w.Z,{title:"Edit data use",isOpen:t,onClose:s,children:(0,a.jsxs)(j.l0,{children:[(0,a.jsxs)(v.jqI,{vertical:!0,className:"gap-6 py-4",children:[(0,a.jsx)(b.d,{name:"data_use",label:"Data use",options:u,layout:"stacked",isRequired:!0}),(0,a.jsx)(b.d,{name:"data_categories",label:"Data categories",options:p,mode:"multiple",layout:"stacked"}),(0,a.jsx)(b.d,{name:"data_subjects",label:"Data subjects",options:m,mode:"multiple",layout:"stacked"}),(0,a.jsx)(_.j0,{name:"name",label:"Declaration name",variant:"stacked"}),(0,a.jsxs)(v.jqI,{vertical:!0,className:"gap-6 p-4 ".concat(N().advancedSettings),children:[(0,a.jsxs)(v.jqI,{className:"cursor-pointer justify-between",onClick:c,children:[(0,a.jsx)(v.xvT,{fontSize:"xs",children:"Advanced settings"}),(0,a.jsx)(v.v4q,{className:d?"rotate-180":void 0})]}),(0,a.jsx)(v.UO1,{in:d,children:(0,a.jsxs)(v.jqI,{vertical:!0,className:"gap-4",children:[(0,a.jsx)(b.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:x,layout:"stacked"}),(0,a.jsx)(v.UO1,{in:(null==r?void 0:r.legal_basis_for_processing)==="Legitimate interests",animateOpacity:!0,style:{overflow:"visible"},children:(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(_.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked"})})}),(0,a.jsx)(_.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked"}),(0,a.jsx)(_.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked"}),(0,a.jsxs)(v.Kqy,{spacing:0,children:[(0,a.jsx)(_.w8,{name:"processes_special_category_data",label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?",variant:"stacked"}),(0,a.jsx)(v.UO1,{in:null==r?void 0:r.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(b.d,{isRequired:!0,name:"special_category_legal_basis",label:"Legal basis for processing",options:f,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked"})})})]})]})})]})]}),(0,a.jsxs)("div",{className:"flex w-full justify-between",children:[(0,a.jsx)(v.wpx,{onClick:()=>{l(),s()},children:"Cancel"}),(0,a.jsx)(v.wpx,{type:"primary",htmlType:"submit",disabled:!i||!n,loading:!1,"data-testid":"save-btn",children:"Save"})]})]})})}})},q=s(26183),T=s(3765);let z=e=>({data_use:e,data_categories:["system"]});var I=e=>{var t,s;let{system:i}=e,[n,r]=(0,d.useState)(!1),[l,o]=(0,d.useState)(void 0),{getDataUseDisplayName:c}=(0,g.Z)(),{isOpen:u,onOpen:p,onClose:m}=(0,v.qY0)(),x=e=>{o(e),p()},{createDataUse:f,deleteDeclarationByDataUse:j,updateDataUse:y}=(0,T.Z)(i),b=null!==(s=null===(t=i.privacy_declarations)||void 0===t?void 0:t.map(e=>e.data_use))&&void 0!==s?s:[];return(0,a.jsxs)(q.Z,{children:[!n&&(0,a.jsxs)(a.Fragment,{children:[b.map((e,t)=>(0,a.jsxs)(v.j8w,{"data-testid":"data-use-".concat(e),color:"white",onClick:()=>x(i.privacy_declarations[t]),closable:!0,onClose:()=>j(e),closeButtonLabel:"Remove data use",children:[(0,a.jsx)(v.PJP.I8b,{size:10}),c(e)]},e)),(0,a.jsx)(v.j8w,{onClick:()=>r(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"}),(0,a.jsx)(R,{isOpen:u,onClose:m,onSave:e=>y(l,e),declaration:l})]}),n&&(0,a.jsx)(v.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,a.jsx)(h.Z,{onChange:e=>{f(z(e)),r(!1)},selectedTaxonomies:b,onBlur:()=>r(!1),open:!0})})]})},P=e=>{var t;let{system:s,onEdit:i,onClose:n}=e;return(0,a.jsxs)(v.dys,{isOpen:!!s,onClose:n,size:"md",children:[(0,a.jsx)(v.P1B,{}),(0,a.jsxs)(v.scA,{"data-testid":"system-details",children:[(0,a.jsx)(v.OXI,{children:(null==s?void 0:s.name)||(null==s?void 0:s.fides_key)}),(0,a.jsx)(v.cCv,{}),(0,a.jsxs)(v.Ng0,{children:[(0,a.jsx)(f.cB,{text:"Title",mt:0}),(0,a.jsx)(f.XU,{children:null!==(t=null==s?void 0:s.name)&&void 0!==t?t:null==s?void 0:s.fides_key}),(null==s?void 0:s.description)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.cB,{text:"Description"}),(0,a.jsx)(f.XU,{children:null==s?void 0:s.description})]}),(0,a.jsx)(f.cB,{text:"Data uses"}),(0,a.jsx)(I,{system:s})]}),(0,a.jsx)(v.zeN,{children:(0,a.jsx)(v.wpx,{onClick:i,"data-testid":"edit-system-btn",children:"Edit system"})})]})]})},Z=e=>{let{onDetailClick:t}=e;return(0,a.jsxs)(v.v2r,{children:[(0,a.jsx)(v.j2t,{as:v.wpx,size:"small",type:"text",className:"max-w-4",icon:(0,a.jsx)(v.nXP,{transform:"rotate(90deg)",ml:2}),"data-testid":"system-actions-menu"}),(0,a.jsx)(v.qyq,{children:t&&(0,a.jsx)(v.sNh,{onClick:t,"data-testid":"view-system-details",children:"View details"})})]})},O=s(70675);let B={items:[],total:0,page:1,size:50,pages:1},U=(0,r.Cl)();var E=()=>{let[e,t]=(0,d.useState)({}),s=(0,o.useRouter)(),{PAGE_SIZES:i,pageSize:n,setPageSize:v,onPreviousPageClick:f,isPreviousPageDisabled:h,onNextPageClick:g,isNextPageDisabled:j,startRange:y,endRange:b,pageIndex:_,setTotalPages:w}=(0,u.oi)(),{data:C,isLoading:k}=(0,m.UG)({page:_,size:n,show_hidden:!1}),[S]=(0,O.j3)(),{items:N,total:D,pages:R}=(0,d.useMemo)(()=>null!=C?C:B,[C]);(0,d.useEffect)(()=>{w(R)},[R,w]);let[q,T]=(0,d.useState)(void 0),z=(0,d.useMemo)(()=>N.find(e=>e.fides_key===q),[N,q]),E=async e=>{var t,a;let i=await S({connection_config_key:e.connection_configs.key,page:1,size:1}),n=!!(null==i?void 0:null===(t=i.data)||void 0===t?void 0:t.total),r=(0,p.du)(null!==(a=e.monitor_config_keys)&&void 0!==a?a:[],"monitor_config_ids"),l="".concat(c.mX,"/").concat(e.fides_key,"/").concat(n?"projects":"resources","?").concat(r);s.push(l)},L=(0,d.useMemo)(()=>[U.accessor(e=>e.name,{id:"name",cell:e=>{var t;let{getValue:s,row:i}=e;return(0,a.jsx)(u.G3,{value:s(),fontWeight:(null===(t=i.original.connection_configs)||void 0===t?void 0:t.key)?"semibold":"normal"})},header:e=>(0,a.jsx)(u.Rr,{value:"Name",...e})}),U.display({id:"data-uses",cell:e=>{let{row:t}=e;return(0,a.jsx)(I,{system:t.original})},header:e=>(0,a.jsx)(u.Rr,{value:"Data uses",...e}),meta:{disableRowClick:!0},minSize:280}),U.display({id:"actions",cell:e=>(0,a.jsx)(Z,{onDetailClick:()=>T(e.row.original.fides_key)}),maxSize:20,enableResizing:!1,meta:{cellProps:{borderLeft:"none"},disableRowClick:!0}})],[]),M=(0,l.b7)({getCoreRowModel:(0,r.sC)(),getGroupedRowModel:(0,r.qe)(),getExpandedRowModel:(0,r.rV)(),getRowId:e=>e.fides_key,manualPagination:!0,columnResizeMode:"onChange",columns:L,data:N,onRowSelectionChange:t,state:{rowSelection:e}});return k?(0,a.jsx)(u.I4,{rowHeight:36,numRows:36}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.ZK,{tableInstance:M,emptyTableNotice:(0,a.jsx)(x.Z,{}),onRowClick:E,getRowIsClickable:e=>{var t;return!!(null===(t=e.connection_configs)||void 0===t?void 0:t.key)}}),(0,a.jsx)(u.s8,{totalRows:D||0,pageSizes:i,setPageSize:v,onPreviousPageClick:f,isPreviousPageDisabled:h,onNextPageClick:g,isNextPageDisabled:j,startRange:y,endRange:b}),(0,a.jsx)(P,{system:z,onClose:()=>T(void 0),onEdit:()=>s.push({pathname:c.Dv,query:{id:q}})})]})},L=()=>(0,a.jsxs)(i.Z,{title:"Data catalog",children:[(0,a.jsx)(n.Z,{heading:"Data catalog",breadcrumbItems:[{title:"All systems"}]}),(0,a.jsx)(E,{})]})},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return a.Bw},D4:function(){return a.D4}});var a=s(19043)},72707:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}},34151:function(e){e.exports={advancedSettings:"EditMinimalDataUseModal_advancedSettings___i9jS"}}},function(e){e.O(0,[8765,9278,5163,2888,9774,179],function(){return e(e.s=66248)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4154],{58095:function(e,t,n){var s=n(8817);e.exports=function(e,t){return!!(null==e?0:e.length)&&s(e,t,0)>-1}},21796:function(e){e.exports=function(e,t,n){for(var s=-1,a=null==e?0:e.length;++s<a;)if(n(t,e[s]))return!0;return!1}},8817:function(e,t,n){var s=n(95372),a=n(1129),i=n(58263);e.exports=function(e,t,n){return t==t?i(e,t,n):s(e,a,n)}},1129:function(e){e.exports=function(e){return e!=e}},92198:function(e,t,n){var s=n(52485),a=n(58095),i=n(21796),o=n(65581),l=n(47111),r=n(43735);e.exports=function(e,t,n){var d=-1,c=a,u=e.length,g=!0,h=[],p=h;if(n)g=!1,c=i;else if(u>=200){var m=t?null:l(e);if(m)return r(m);g=!1,c=o,p=new s}else p=t?[]:h;e:for(;++d<u;){var v=e[d],y=t?t(v):v;if(v=n||0!==v?v:0,g&&y==y){for(var f=p.length;f--;)if(p[f]===y)continue e;t&&p.push(y),h.push(v)}else c(p,y,n)||(p!==h&&p.push(y),h.push(v))}return h}},47111:function(e,t,n){var s=n(46151),a=n(50344),i=n(43735),o=s&&1/i(new s([,-0]))[1]==1/0?function(e){return new s(e)}:a;e.exports=o},58263:function(e){e.exports=function(e,t,n){for(var s=n-1,a=e.length;++s<a;)if(e[s]===t)return s;return -1}},50344:function(e){e.exports=function(){}},83766:function(e,t,n){var s=n(92198);e.exports=function(e){return e&&e.length?s(e):[]}},25654:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-discovery/action-center/[monitorId]/[systemId]",function(){return n(48024)}])},79283:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});var s=n(24246),a=n(39941),i=n(72707),o=n.n(i);let l=e=>{let{data:{formattedTitle:t,description:n,name:i,primaryName:o}}=e;return(0,s.jsxs)(a.jqI,{gap:12,title:"".concat(t," - ").concat(n),children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:o||i}),o&&": ".concat(i)]}),(0,s.jsx)("em",{children:n})]})},r=e=>{let{options:t,...n}=e,i=null==t?void 0:t.map(e=>({...e,className:o().option,formattedTitle:[e.primaryName,e.name].filter(e=>e).join(": ")}));return(0,s.jsx)(a.WPr,{options:i,filterOption:(e,t)=>(null==t?void 0:t.formattedTitle.toLowerCase().includes(e.toLowerCase()))||(null==t?void 0:t.value.toLowerCase().includes(e.toLowerCase()))||!1,optionFilterProp:"label",autoFocus:!0,variant:"borderless",optionRender:l,dropdownStyle:{minWidth:"500px"},className:"w-full p-0","data-testid":"taxonomy-select",...n})}},45938:function(e,t,n){"use strict";n.d(t,{Gt:function(){return g},eB:function(){return h},oI:function(){return u}});var s=n(24246),a=n(34090),i=n(27378),o=n(16134),l=n(38602),r=n(58452);let d=(0,i.createRef)(),c=(0,i.createRef)(),u=()=>{let e=(0,o.T)(),t=(0,o.C)(l.DB),n=(0,i.useCallback)(()=>{c.current=void 0,d.current=void 0},[]),s=(0,i.useCallback)(()=>{e((0,l.Mr)()),c.current&&(c.current(!0),n())},[e,n]),a=(0,i.useCallback)(()=>{e((0,l.Mr)()),c.current&&(c.current(!1),n())},[e,n]);return{attemptAction:(0,i.useCallback)(()=>t?(e((0,l.h7)()),d.current||(d.current=new Promise(e=>{c.current=e})),d.current):Promise.resolve(!0),[t,e]),onConfirm:s,onClose:a}},g=e=>{let{id:t,name:n}=e,{dirty:s}=(0,a.u6)(),r=(0,o.T)();return(0,i.useEffect)(()=>(r((0,l.Zu)({id:t,name:n})),()=>{r((0,l.dz)({id:t}))}),[r,t,n]),(0,i.useEffect)(()=>{r((0,l.$p)({id:t,isDirty:s}))},[s,r,t]),null},h=()=>{let{onConfirm:e,onClose:t}=u(),n=(0,o.C)(l.uv);return(0,s.jsx)(r.Z,{isOpen:n,onClose:t,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},48024:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ei}});var s=n(24246),a=n(86677),i=n(27378),o=n(35287),l=n(77830),r=n(58754),d=n(39941),c=n(25415),u=n(54682),g=n(30952),h=n(8133),p=n(79283),m=n(34929),v=n(78238),y=e=>{let{selectedTaxonomies:t,...n}=e,{getDataUseDisplayNameProps:a,getDataUses:i}=(0,m.Z)(),o=i().filter(e=>e.active&&v.g.includes(e.fides_key)).map(e=>{let{name:t,primaryName:n}=a(e.fides_key);return{value:e.fides_key,name:t,primaryName:n,description:e.description||""}});return(0,s.jsx)(p.l,{options:o,...n})};let{Text:f}=d.AntTypography;var x=e=>{let{onSave:t,isSaving:n,onClose:a,...o}=e,[l,r]=(0,i.useState)([]),c=()=>{r([]),a()};return(0,s.jsxs)(h.Z,{title:"Add consent category",...o,onClose:c,children:[(0,s.jsxs)(d.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,s.jsx)(f,{children:"Assign consent categories to selected assets. This configures the system for consent management. Consent categories apply to both individual assets and the system."}),(0,s.jsx)(y,{mode:"tags",selectedTaxonomies:l,onSelect:(e,t)=>r([...l,t.value]),variant:"outlined"})]}),(0,s.jsxs)(d.jqI,{justify:"space-between",children:[(0,s.jsx)(d.wpx,{htmlType:"reset",onClick:c,"data-testid":"cancel-btn",children:"Cancel"}),(0,s.jsx)(d.wpx,{htmlType:"submit",type:"primary",disabled:!l.length,loading:n,onClick:()=>{t(l),c()},"data-testid":"save-btn",children:"Save"})]})]})},j=n(29850),C=n(77685);let{Text:_}=d.AntTypography,b=e=>{let{onSave:t,isSaving:n,...a}=e,[o,l]=(0,i.useState)(),[r,c]=(0,i.useState)(!1),u=(0,i.useCallback)(e=>{e.preventDefault(),c(!0)},[]),g=()=>{c(!1)},p=()=>{l(void 0),a.onClose()};return(0,s.jsxs)(h.Z,{title:"Assign system",...a,onClose:p,children:[(0,s.jsxs)(d.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,s.jsx)(_,{children:"Assign a system to the selected assets. If no system exists, select 'Add new system' to create one."}),(0,s.jsx)(j.R,{placeholder:"Search or select...",onSelect:(e,t)=>{l(t)},onAddSystem:u,value:o})]})," ",(0,s.jsxs)(d.jqI,{justify:"space-between",children:[(0,s.jsx)(d.wpx,{htmlType:"reset",onClick:p,"data-testid":"cancel-btn",children:"Cancel"}),(0,s.jsx)(d.wpx,{htmlType:"submit",type:"primary",disabled:!o,loading:n,onClick:()=>{t(o),p()},"data-testid":"save-btn",children:"Save"})]}),r&&(0,s.jsx)(C.i,{isOpen:!0,onClose:g,onSuccessfulSubmit:(e,t)=>{g(),l({label:t,value:e})},toastOnSuccess:!0})]})};var S=n(8411),w=n(32735),k=n(47935),T=n(37059);let{Paragraph:E,Text:N,Link:A}=d.AntTypography,I=e=>{var t,n,a;let{isOpen:o,stagedResource:l,status:r,onCancel:c,onDownload:u}=e,[g,h]=(0,i.useState)(1),[p,m]=(0,i.useState)(k.W3[0]),{data:v,isFetching:y,isError:f}=(0,T.mi)({stagedResourceUrn:l.urn,status:r,page:g,size:p}),{items:x,total:j}=(0,i.useMemo)(()=>v||{items:[],total:0,pages:0,filterOptions:{assigned_users:[],systems:[]}},[v]);return(0,s.jsx)(d.$zI,{title:"Consent discovery",width:768,open:o,onCancel:c,footer:[(0,s.jsx)(d.wpx,{onClick:c,children:"Cancel"},"cancel"),!!u&&(0,s.jsx)(d.wpx,{type:"primary",onClick:u,children:"Download"},"download")],"data-testid":"consent-breakdown-modal",children:(0,s.jsxs)(d.jqI,{vertical:!0,className:"gap-6","data-testid":"consent-breakdown-modal-content",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(E,{children:"View all instances where this asset was detected without consent, organized by location and page. Use this to investigate potential compliance issues."}),(0,s.jsxs)(E,{children:[(0,s.jsx)(N,{strong:!0,children:"Asset name:"})," ",null!==(t=l.name)&&void 0!==t?t:(0,s.jsx)(N,{italic:!0,children:"Unknown"}),","," ",(0,s.jsx)(N,{strong:!0,children:"System:"})," ",null!==(n=l.system)&&void 0!==n?n:(0,s.jsx)(N,{italic:!0,children:"Unassigned"}),","," ",(0,s.jsx)(N,{strong:!0,children:"Domain:"})," ",null!==(a=l.domain)&&void 0!==a?a:(0,s.jsx)(N,{italic:!0,children:"Unknown"})]})]}),f?(0,s.jsx)(d.DUx,{type:"error",message:"Error fetching data",description:"Please try again later.",showIcon:!0}):(0,s.jsx)(d.V5H,{columns:[{title:"Location",dataIndex:"location",key:"location",render:e=>{var t;return null!==(t=S.Z8[e])&&void 0!==t?t:e}},{title:"Page",dataIndex:"page",key:"page",render:e=>(0,s.jsx)(A,{href:e,target:"_blank",rel:"noopener noreferrer",children:e})}],rowKey:e=>e.location,dataSource:x,pagination:!!j&&(g>1||p>k.W3[0])&&{current:g,pageSize:p,pageSizeOptions:w.VZ,total:j||0,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," items"),onChange:(e,t)=>{h(e),t!==p&&(m(t),h(1))}},loading:y,"data-testid":"consent-breakdown-modal-table"})]})})};var O=n(83766),D=n.n(O),R=n(62165),L=n(812),P=n(26070),z=n(3110);let M=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{enableSelection:n=!1,getRowKey:s,bulkActions:a,isLoading:o=!1,isFetching:l=!1,dataSource:r=[],totalRows:d=0,currentPage:c,pageSize:u,customTableProps:g={}}=t,h=(0,i.useCallback)(e=>{if(e&&"object"==typeof e){if(e.id)return String(e.id);if(e.key)return String(e.key)}return String(e)},[]),p=s||h,[m,v]=(0,i.useState)([]),[y,f]=(0,i.useState)([]),x=(0,i.useCallback)(()=>{v([]),f([])},[]),j=(0,i.useMemo)(()=>({selectedRowKeys:m,selectedRows:y,resetSelections:x}),[m,y,x]),C=(0,i.useMemo)(()=>{if(n)return{selectedRowKeys:m,onChange:(e,t)=>{v(e),f(t)}}},[n,m]),_=(0,i.useCallback)((t,n,s)=>{var a,i;let o=null!==(a=t.current)&&void 0!==a?a:e.pageIndex,l=null!==(i=t.pageSize)&&void 0!==i?i:e.pageSize,r=o!==e.pageIndex||l!==e.pageSize;r?(t.current&&t.current!==e.pageIndex&&e.updatePageIndex(t.current),t.pageSize&&t.pageSize!==e.pageSize&&e.updatePageSize(t.pageSize)):e.updateFilters(n||{});let d=s&&!Array.isArray(s)?s.field:void 0,c=s&&!Array.isArray(s)&&null!==s.order?s.order:void 0;r||e.updateSorting(d,c)},[e]),b=(0,i.useMemo)(()=>{var t,n,s,a,i;return{current:null!=c?c:e.pageIndex,pageSize:null!=u?u:e.pageSize,total:d,showSizeChanger:null===(a=null===(t=e.paginationConfig)||void 0===t?void 0:t.showSizeChanger)||void 0===a||a,pageSizeOptions:null!==(i=null===(s=e.paginationConfig)||void 0===s?void 0:null===(n=s.pageSizeOptions)||void 0===n?void 0:n.map(String))&&void 0!==i?i:w.VZ}},[c,e.pageIndex,u,e.pageSize,d,e.paginationConfig]),S=(0,i.useMemo)(()=>({dataSource:r,loading:o||l,pagination:b,onChange:_,rowKey:p,scroll:{x:"max-content",scrollToFirstRowOnChange:!0},size:"small",bordered:!0,...g}),[r,o,l,b,_,p,g]),k=m.map(String),T=y.length>0,E=(0,i.useCallback)(e=>{let t=null==a?void 0:a.actions.find(t=>t.key===e);return t?{disabled:!T||!!t.disabled&&t.disabled(y),loading:t.loading||!1,onClick:()=>t.onClick(y)}:{disabled:!0,loading:!1}},[a,T,y]);return(0,i.useMemo)(()=>({tableProps:S,selectionProps:C,selectionState:j,selectedRows:y,selectedKeys:k,hasSelectedRows:T,resetSelections:x,getBulkActionProps:E,isLoadingOrFetching:o||l,hasData:r.length>0}),[S,C,j,y,k,T,x,E,o,l,r.length])};var U=n(40431),Z=n(25010);let V=()=>({filters:(0,U.WJ)(e=>e).withDefault({})}),G=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pagination:t={},sorting:n={},search:s={},onStateChange:a}=e,{pageIndex:o,pageSize:l,resetPagination:r,updatePageIndex:d,updatePageSize:c,pageSizeOptions:u,showSizeChanger:g}=(0,Z.h0)(t),{sortKey:h,sortOrder:p,updateSorting:m,resetSorting:v}=(0,Z.rK)(n),{searchQuery:y,updateSearch:f,resetSearch:x}=(0,Z.Rx)(s),j=(0,i.useMemo)(()=>V(),[]),[C,_]=(0,U.XI)(j,{history:"push"}),b=(0,i.useMemo)(()=>{var e;return{pageIndex:o,pageSize:l,sortKey:h,sortOrder:p,columnFilters:null!==(e=C.filters)&&void 0!==e?e:{},searchQuery:y}},[C,o,l,h,p,y]),S=(0,i.useCallback)((e,t)=>{m(e,t),r()},[m,r]),w=(0,i.useCallback)(e=>{let t=Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return null!=t}));_({filters:Object.keys(t).length>0?t:null}),r()},[_,r]),k=(0,i.useCallback)(e=>{f(e),r()},[f,r]),T=(0,i.useCallback)(()=>{_({filters:null}),r(),v(),x()},[_,r,v,x]);return(0,i.useEffect)(()=>{a&&a(b)},[b,a]),{state:b,pageIndex:b.pageIndex,pageSize:b.pageSize,updatePageIndex:d,updatePageSize:c,sortKey:b.sortKey,sortOrder:b.sortOrder,updateSorting:S,columnFilters:b.columnFilters,updateFilters:w,searchQuery:b.searchQuery,updateSearch:k,resetState:T,paginationConfig:{pageSizeOptions:u,showSizeChanger:g}}};var W=n(46628),K=n(16394),F=n(98145),X=n(54762),$=n(9320),Y=n(88708);let B=e=>{let{asset:t,onTabChange:n}=e,[i,{isLoading:o}]=(0,T.EY)(),[r,{isLoading:c}]=(0,T.nS)(),[g,{isLoading:h}]=(0,T.Tj)(),p=(0,d.pmc)(),m=(0,a.useRouter)(),v=o||c||h,{urn:y,name:f,resource_type:x,diff_status:j,system_key:C,user_assigned_system_key:_}=t,b=async()=>{let e=await i({urnList:[y]});if((0,L.D4)(e))p((0,W.Vo)((0,L.e$)(e.error)));else{let e=_||C,t="".concat(l.So,"/configure/").concat(e,"#assets");p((0,W.t5)((0,$._)("".concat(x,' "').concat(f,'" has been added to the system inventory.'),e?()=>m.push(t):void 0)))}},S=async()=>{let e=await r({urnList:[y]});(0,L.D4)(e)?p((0,W.Vo)((0,L.e$)(e.error))):p((0,W.t5)((0,$._)("".concat(x,' "').concat(f,'" has been ignored and will not appear in future scans.'),()=>n(Y.A.IGNORED))))},w=async()=>{let e=await g({urnList:[y]});(0,L.D4)(e)?p((0,W.Vo)((0,L.e$)(e.error))):p((0,W.t5)("".concat(x,' "').concat(f,'" is no longer ignored and will appear in future scans.')))};return(0,s.jsxs)(d.vyj,{children:[j!==u.LL.MUTED&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.esZ,{title:t.system?void 0:"This asset requires a system before you can add it to the inventory.",children:(0,s.jsx)(d.wpx,{"data-testid":"add-btn",size:"small",onClick:b,disabled:!t.system||v,loading:o,children:"Add"})}),(0,s.jsx)(d.wpx,{"data-testid":"ignore-btn",size:"small",onClick:S,disabled:v,loading:c,children:"Ignore"})]}),j===u.LL.MUTED&&(0,s.jsx)(d.wpx,{"data-testid":"restore-btn",size:"small",onClick:w,disabled:v,loading:h,children:"Restore"})]})};var q=n(18992),H=n.n(q),J=n(31883),Q=e=>{var t,n,a;let{asset:o,readonly:l}=e,[r,c]=(0,i.useState)(!1),[u]=(0,T.Ak)(),{successAlert:g,errorAlert:h}=(0,Z.VY)(),{getDataUseDisplayName:p}=(0,m.Z)(),f=(null===(t=o.user_assigned_data_uses)||void 0===t?void 0:t.length)?o.user_assigned_data_uses:(null===(n=o.data_uses)||void 0===n?void 0:n.length)?o.data_uses:[],x=async e=>{let t=await u({monitorId:o.monitor_config_id,urnList:[o.urn],dataUses:[...f,e]});(0,J.D4)(t)?h((0,L.e$)(t.error)):g("Consent category added to ".concat(o.resource_type,' "').concat(o.name,'" .'),"Confirmed"),c(!1)},j=async e=>{let t=await u({monitorId:o.monitor_config_id,urnList:[o.urn],dataUses:f.filter(t=>t!==e)});(0,J.D4)(t)?h((0,L.e$)(t.error)):g("Consent category removed from ".concat(o.resource_type,' "').concat(o.name,'".'),"Confirmed")},C=(null===(a=o.user_assigned_data_uses)||void 0===a?void 0:a.length)?o.user_assigned_data_uses:o.data_uses,_=null==C?void 0:C.filter(e=>(0,v.Z)(e));return l?(0,s.jsx)(d.vyj,{direction:"vertical",children:null==_?void 0:_.map(e=>(0,s.jsx)(d.j8w,{color:"white",children:p(e)},e))}):(0,s.jsxs)(s.Fragment,{children:[!r&&(0,s.jsxs)(d.vyj,{wrap:!0,children:[null==_?void 0:_.map(e=>(0,s.jsx)(d.j8w,{"data-testid":"data-use-".concat(e),color:"white",closable:!0,onClose:()=>j(e),closeButtonLabel:"Remove data use",children:p(e)},e)),(0,s.jsx)(d.j8w,{onClick:()=>c(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),r&&(0,s.jsx)("div",{className:H().cellBleed,style:{backgroundColor:"var(--fides-color-white)"},children:(0,s.jsx)(y,{selectedTaxonomies:_||[],onSelect:x,onBlur:()=>c(!1),open:!0})})]})};let ee=e=>{let{consentAggregated:t,stagedResource:n,onShowBreakdown:a}=e;return(0,s.jsxs)(s.Fragment,{children:[t===u.lg.WITHOUT_CONSENT&&(0,s.jsx)(d.esZ,{title:"Asset was detected before the user gave consent or without any consent. Click the info icon for more details.",children:(0,s.jsx)(d.j8w,{color:"error",closeIcon:(0,s.jsx)(d.PJP.daM,{style:{width:12,height:12}}),closeButtonLabel:"View details",onClose:()=>{null==a||a(n,t)},"data-testid":"status-badge_without-consent",children:F.X.WITHOUT_CONSENT})}),t===u.lg.WITH_CONSENT&&(0,s.jsx)(d.esZ,{title:"Asset was detected after the user gave consent",children:(0,s.jsx)(d.j8w,{color:"success","data-testid":"status-badge_with-consent",children:F.X.WITH_CONSENT})}),t===u.lg.EXEMPT&&(0,s.jsx)(d.esZ,{title:"Asset is valid regardless of consent",children:(0,s.jsx)(d.j8w,{"data-testid":"status-badge_consent-exempt",children:F.X.EXEMPT})}),t===u.lg.UNKNOWN&&(0,s.jsx)(d.esZ,{title:"Did not find consent information for this asset. You may need to re-run the monitor.",children:(0,s.jsx)(d.j8w,{"data-testid":"status-badge_unknown",children:F.X.UNKNOWN})})]})};var et=n(70675);let en=e=>{let{aggregateSystem:t,monitorConfigId:n,readonly:a}=e,{resource_type:o,name:l,urn:r,system:c,user_assigned_system_key:u,system_key:g}=t,[h,p]=(0,i.useState)(!1),[m,v]=(0,i.useState)(!1),[y,{isLoading:f}]=(0,et.NA)(),{successAlert:x,errorAlert:_}=(0,Z.VY)(),b=(0,i.useCallback)(e=>{e.preventDefault(),v(!0)},[]),S=async(e,t,s)=>{let a=await y({staged_resource_urn:r,monitor_config_id:n,user_assigned_system_key:e});(0,L.D4)(a)?_((0,L.e$)(a.error)):x(s?"".concat(t," has been added to your system inventory and the ").concat(o,' "').concat(l,'" has been assigned to that system.'):"".concat(o,' "').concat(l,'" has been assigned to ').concat(t,"."),"Confirmed"),p(!1)};return a?c?(0,s.jsx)(d.j8w,{"data-testid":"system-badge",color:"white",children:c}):null:(0,s.jsxs)(s.Fragment,{children:[!h&&(c?(0,s.jsxs)(d.j8w,{onClick:()=>p(!0),"data-testid":"system-badge",children:[c,(0,s.jsx)(d.PJP.I8b,{})]}):(0,s.jsx)(d.j8w,{onClick:()=>p(!0),"data-testid":"add-system-btn",addable:!0})),!!h&&(0,s.jsx)("div",{className:H().cellBleed,children:(0,s.jsx)(j.R,{variant:"borderless",autoFocus:!0,defaultOpen:!0,defaultValue:u||g,onBlur:e=>{var t;(null===(t=e.relatedTarget)||void 0===t?void 0:t.getAttribute("id"))!=="add-new-system"&&p(!1)},onAddSystem:b,onSelect:(e,t)=>S(e,t.label),loading:f})}),m&&(0,s.jsx)(C.i,{isOpen:!0,onClose:()=>{v(!1)},onSuccessfulSubmit:(e,t)=>S(e,t,!0)})]})},es=e=>{let{monitorId:t,systemId:n,onSystemName:o,onShowBreakdown:r}=e,c=(0,a.useRouter)(),g=(0,d.pmc)(),[h,p]=(0,i.useState)(n),[m,y]=(0,i.useState)(),[f,x]=(0,i.useState)(!1),[j,C]=(0,i.useState)(!1),{flags:_}=(0,R.hz)(),{assetConsentStatusLabels:b}=_,{filterTabs:w,activeTab:k,onTabChange:E,activeParams:N,actionsDisabled:A}=(0,Y.Z)(n),I=G({sorting:{validColumns:Object.values(F.r)}}),{columnFilters:O,pageIndex:U,pageSize:Z,resetState:V,sortKey:q,sortOrder:H,searchQuery:J,updateSearch:et,updateFilters:es,updateSorting:ea,updatePageIndex:ei,updatePageSize:eo}=I,{data:el,isLoading:er,isFetching:ed}=(0,T.WJ)({key:t,page:U,size:Z,search:J,sort_by:q?[q]:[F.r.CONSENT_AGGREGATED,"urn"],sort_asc:"descend"!==H,...N,...O}),[ec,{isLoading:eu}]=(0,T.EY)(),[eg,{isLoading:eh}]=(0,T.nS)(),[ep,{isLoading:em}]=(0,T.rs)(),[ev,{isLoading:ey}]=(0,T.sX)(),[ef,{isLoading:ex}]=(0,T.Vr)(),[ej,{isLoading:eC}]=(0,T.Tj)(),e_=eu||eh||em||ey||eC||ex,eb=e_||n===l.Kl,{data:eS}=(0,T.ut)({monitor_config_id:t,resolved_system_id:n,diff_status:null==N?void 0:N.diff_status,search:J,...O}),ew=M(I,(0,i.useMemo)(()=>({enableSelection:k!==Y.A.RECENT_ACTIVITY,getRowKey:e=>e.urn,isLoading:er,isFetching:ed,dataSource:(null==el?void 0:el.items)||[],totalRows:(null==el?void 0:el.total)||0,customTableProps:{locale:{emptyText:(0,s.jsx)("div",{children:(0,s.jsx)("div",{children:"All caught up!"})})}}}),[k,er,ed,null==el?void 0:el.items,null==el?void 0:el.total])),ek=(0,i.useMemo)(()=>{var e;let t=[{title:"Asset",dataIndex:F.r.NAME,key:F.r.NAME,sorter:!0,sortOrder:q===F.r.NAME?H:null,render:e=>(0,s.jsx)(d.lKn,{ellipsis:{tooltip:!0},style:{maxWidth:300},children:e}),fixed:"left"},{title:"Type",dataIndex:F.r.RESOURCE_TYPE,key:F.r.RESOURCE_TYPE,sorter:!0,sortOrder:q===F.r.RESOURCE_TYPE?H:null,filters:(0,K.nZ)(null==eS?void 0:eS.resource_type),filteredValue:(null==O?void 0:O.resource_type)||null},{title:"System",dataIndex:F.r.SYSTEM,key:F.r.SYSTEM,width:200,render:(e,t)=>!!t.monitor_config_id&&(0,s.jsx)(en,{aggregateSystem:t,monitorConfigId:t.monitor_config_id,readonly:null!=A&&A})},{title:"Categories of consent",key:F.r.DATA_USES,width:400,filters:(0,K.nZ)(null==eS?void 0:null===(e=eS.data_uses)||void 0===e?void 0:e.filter(e=>(0,v.Z)(e))),filteredValue:(null==O?void 0:O.data_uses)||null,render:(e,t)=>(0,s.jsx)(Q,{asset:t,readonly:null!=A&&A})},{title:"Locations",dataIndex:F.r.LOCATIONS,key:F.r.LOCATIONS,width:250,menu:{items:z.D,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?x(!0):"collapse-all"===e.key&&x(!1)}},filters:(0,K.nZ)(null==eS?void 0:eS.locations,e=>{var t;return null!==(t=S.Z8[e])&&void 0!==t?t:e}),filteredValue:(null==O?void 0:O.locations)||null,render:e=>{var t;return(0,s.jsx)(P.Q,{values:null!==(t=null==e?void 0:e.map(e=>{var t;return{label:null!==(t=S.Z8[e])&&void 0!==t?t:e,key:e}}))&&void 0!==t?t:[],columnState:{isExpanded:f,isWrapped:!0}})}},{title:"Domain",dataIndex:F.r.DOMAIN,key:F.r.DOMAIN},{title:"Detected on",dataIndex:F.r.PAGE,menu:{items:z.D,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?C(!0):"collapse-all"===e.key&&C(!1)}},key:F.r.PAGE,render:e=>(0,s.jsx)(P.v,{values:e,valueSuffix:"pages",columnState:{isExpanded:j}})}];return b&&t.push({title:()=>(0,s.jsxs)(d.vyj,{children:[(0,s.jsx)("div",{children:"Compliance"}),m===u.lg.WITHOUT_CONSENT&&(0,s.jsx)(X.l,{consentStatus:{status:u.pF.ALERT,message:"One or more assets were detected without consent"}})]}),dataIndex:F.r.CONSENT_AGGREGATED,key:F.r.CONSENT_AGGREGATED,sorter:!0,sortOrder:q===F.r.CONSENT_AGGREGATED?H:null,filters:(0,K.nZ)(null==eS?void 0:eS[F.r.CONSENT_AGGREGATED],e=>{var t;return null!==(t=({with_consent:F.X.WITH_CONSENT,without_consent:F.X.WITHOUT_CONSENT,exempt:F.X.EXEMPT,unknown:F.X.UNKNOWN})[e])&&void 0!==t?t:e}),filteredValue:(null==O?void 0:O[F.r.CONSENT_AGGREGATED])||null,render:(e,t)=>(0,s.jsx)(ee,{consentAggregated:null!=e?e:u.lg.UNKNOWN,stagedResource:t,onShowBreakdown:r})}),A||t.push({title:"Actions",key:F.r.ACTIONS,fixed:"right",render:(e,t)=>(0,s.jsx)(B,{asset:t,onTabChange:E})}),t},[eS,O,q,H,b,A,f,j,m,r,E]);(0,i.useEffect)(()=>{if(el){var e;let t=(null===(e=el.items[0])||void 0===e?void 0:e.system)||h||n||"";p(t),null==o||o(t)}},[el,n,o,h]),(0,i.useEffect)(()=>{if((null==el?void 0:el.items)&&!m){var e;y(null===(e=el.items.find(e=>e.consent_aggregated===u.lg.WITHOUT_CONSENT))||void 0===e?void 0:e.consent_aggregated)}},[el,m]);let{selectedKeys:eT,selectedRows:eE,resetSelections:eN}=ew,eA=(0,i.useCallback)(async()=>{var e,t;let n=await ec({urnList:eT}),s=(null===(e=eE[0])||void 0===e?void 0:e.user_assigned_system_key)||(null===(t=eE[0])||void 0===t?void 0:t.system_key),a=eE.every(e=>(e.user_assigned_system_key||e.system_key)===s)?s:void 0;(0,L.D4)(n)?g((0,W.Vo)((0,L.e$)(n.error))):(g((0,W.t5)((0,$._)("".concat(eT.length," assets from ").concat(h," have been added to the system inventory."),a?()=>c.push("".concat(l.So,"/configure/").concat(a,"#assets")):()=>c.push(l.So)))),eN())},[ec,eT,eE,h,g,c,eN]),eI=(0,i.useCallback)(async e=>{if("string"==typeof(null==e?void 0:e.value)){let n=await ev({monitorId:t,urnList:eT,systemKey:e.value});(0,L.D4)(n)?g((0,W.Vo)((0,L.e$)(n.error))):g((0,W.t5)("".concat(eT.length," assets have been assigned to ").concat(e.label,"."),"Confirmed"))}},[ev,t,eT,g]),eO=(0,i.useCallback)(async e=>{if(!eE.length)return;let n=eE.map(t=>{let n=D()([...t.user_assigned_data_uses||t.data_uses||[],...e]);return{urn:t.urn,user_assigned_data_uses:n}}),s=await ef({monitorId:t,assets:n});(0,L.D4)(s)?g((0,W.Vo)((0,L.e$)(s.error))):g((0,W.t5)("Consent categories added to ".concat(eT.length," assets").concat(h?" from ".concat(h):"","."),"Confirmed"))},[eE,ef,t,eT,h,g]),eD=(0,i.useCallback)(async()=>{let e=await eg({urnList:eT});(0,L.D4)(e)?g((0,W.Vo)((0,L.e$)(e.error))):(g((0,W.t5)(h===l.Kl?"".concat(eT.length," uncategorized assets have been ignored and will not appear in future scans."):"".concat(eT.length," assets from ").concat(h," have been ignored and will not appear in future scans."),"Confirmed")),eN())},[eg,eT,h,g,eN]),eR=(0,i.useCallback)(async()=>{let e=await ej({urnList:eT});(0,L.D4)(e)?g((0,W.Vo)((0,L.e$)(e.error))):(g((0,W.t5)("".concat(eT.length," assets have been restored and will appear in future scans."),"Confirmed")),eN())},[ej,eT,g,eN]),eL=(0,i.useCallback)(async()=>{let e=(null==el?void 0:el.items.length)||0,s=await ep({monitor_config_key:t,resolved_system_ids:[n]});(0,L.D4)(s)?g((0,W.Vo)((0,L.e$)(s.error))):(c.push("".concat(l.vi,"/").concat(t)),g((0,W.t5)("".concat(e," assets from ").concat(h," have been added to the system inventory."),"Confirmed")),eN())},[null==el?void 0:el.items.length,ep,t,n,c,g,h,eN]),eP=(0,i.useCallback)(async e=>{await E(e),V(),eN()},[E,V,eN]);return{columns:ek,data:el,isLoading:er,isFetching:ed,tableState:I,searchQuery:J,updateSearch:et,updateFilters:es,updateSorting:ea,updatePageIndex:ei,updatePageSize:eo,resetState:V,tableProps:ew.tableProps,selectionProps:ew.selectionProps,filterTabs:w,activeTab:k,handleTabChange:eP,activeParams:N,actionsDisabled:A,selectedRows:eE,selectedUrns:eT,hasSelectedRows:ew.hasSelectedRows,resetSelections:eN,systemName:h,firstItemConsentStatus:m,handleBulkAdd:eA,handleBulkAssignSystem:eI,handleBulkAddDataUse:eO,handleBulkIgnore:eD,handleBulkRestore:eR,handleAddAll:eL,anyBulkActionIsLoading:e_,isAddingResults:eu,isIgnoringResults:eh,isAddingAllResults:em,isBulkUpdatingSystem:ey,isBulkAddingDataUses:ex,isRestoringResults:eC,disableAddAll:eb}},ea=e=>{var t;let{monitorId:n,systemId:a,onSystemName:o}=e,[l,r]=(0,i.useState)(!1),[h,p]=(0,i.useState)(!1),[m,v]=(0,i.useState)(null),{columns:y,searchQuery:f,updateSearch:j,resetState:C,tableProps:_,selectionProps:S,filterTabs:w,activeTab:k,handleTabChange:T,activeParams:E,actionsDisabled:N,selectedUrns:A,hasSelectedRows:O,resetSelections:D,handleBulkAdd:R,handleBulkAssignSystem:L,handleBulkAddDataUse:P,handleBulkIgnore:z,handleBulkRestore:M,handleAddAll:U,anyBulkActionIsLoading:Z,isAddingAllResults:V,isBulkUpdatingSystem:G,isBulkAddingDataUses:W,disableAddAll:K}=es({monitorId:n,systemId:a,onSystemName:o,onShowBreakdown:(e,t)=>{v({stagedResource:e,status:t})}}),F=async e=>{await L(e),r(!1)},X=async e=>{await P(e),p(!1)};return n&&a?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Niu,{"aria-label":"Asset state filter",mode:"horizontal",items:w.map(e=>({key:e.hash,label:e.label})),selectedKeys:[k],onClick:e=>T(e.key),className:"mb-4","data-testid":"asset-state-filter"}),(0,s.jsxs)(d.jqI,{justify:"space-between",align:"center",className:"mb-4",children:[(0,s.jsx)(g.f,{value:f,onChange:j,placeholder:"Search by asset name..."}),(0,s.jsxs)(d.vyj,{size:"large",children:[O&&(0,s.jsx)(c.a,{count:A.length}),(0,s.jsxs)(d.vyj,{size:"small",children:[(0,s.jsx)(d.wpx,{onClick:()=>{C(),D()},"data-testid":"clear-filters",children:"Clear filters"}),(0,s.jsx)(d.S0p,{overlayClassName:"bulk-actions-menu-dropdown",menu:{items:[{key:"add",label:"Add",onClick:R},{key:"add-data-use",label:"Add consent category",onClick:()=>p(!0)},{key:"assign-system",label:"Assign system",onClick:()=>r(!0)},...(null==E?void 0:null===(t=E.diff_status)||void 0===t?void 0:t.includes(u.LL.MUTED))?[{key:"restore",label:"Restore",onClick:M}]:[{type:"divider"},{key:"ignore",label:"Ignore",onClick:z}]]},trigger:["click"],children:(0,s.jsx)(d.wpx,{icon:(0,s.jsx)(d.PJP._ME,{}),iconPosition:"end",loading:Z,"data-testid":"bulk-actions-menu",disabled:!O||Z||N,type:"primary",children:"Actions"})}),(0,s.jsx)(d.esZ,{title:K?"These assets require a system before you can add them to the inventory.":void 0,children:(0,s.jsx)(d.wpx,{onClick:U,disabled:K,loading:V,type:"primary",icon:(0,s.jsx)(d.PJP.MCw,{}),iconPosition:"end","data-testid":"add-all",children:"Add all"})})]})]})]}),(0,s.jsx)(d.V5H,{..._,columns:y,rowSelection:S,locale:{emptyText:(0,s.jsx)(d.oj8,{image:d.oj8.PRESENTED_IMAGE_SIMPLE,description:"All caught up!"})},"aria-labelledby":"breadcrumb-current-page"}),(0,s.jsx)(b,{isOpen:l,onClose:()=>{r(!1)},onSave:F,isSaving:G}),(0,s.jsx)(x,{isOpen:h,onClose:()=>{p(!1)},onSave:X,isSaving:W}),m&&(0,s.jsx)(I,{isOpen:!!m,stagedResource:m.stagedResource,status:m.status,onCancel:()=>{v(null)}})]}):null};var ei=()=>{let e=(0,a.useRouter)(),t=decodeURIComponent(e.query.monitorId),n=decodeURIComponent(e.query.systemId),[d,c]=(0,i.useState)(n===l.Kl?"Uncategorized assets":n);return(0,s.jsxs)(o.Z,{title:"Action center - Discovered assets",children:[(0,s.jsx)(r.Z,{heading:"Action center",breadcrumbItems:[{title:"All activity",href:l.vi},{title:t,href:"".concat(l.vi,"/").concat(t)},{title:n===l.Kl?"Uncategorized assets":d}]}),(0,s.jsx)(ea,{monitorId:t,systemId:n,onSystemName:c})]})}},72707:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}},18992:function(e){e.exports={cellBleed:"Cells_cellBleed__dik43"}}},function(e){e.O(0,[8765,431,9278,5163,602,401,4844,1138,2888,9774,179],function(){return e(e.s=25654)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2423],{74833:function(e,a,n){var t=n(56127),i=/^\s+/;e.exports=function(e){return e?e.slice(0,t(e)+1).replace(i,""):e}},56632:function(e,a,n){var t=n(89278),i=n(80068),r=n(50098);e.exports=function(e){return function(a,n,s){var o=Object(a);if(!i(a)){var l=t(n,3);a=r(a),n=function(e){return l(o[e],e,o)}}var _=e(a,n,s);return _>-1?o[l?a[_]:_]:void 0}}},56127:function(e){var a=/\s/;e.exports=function(e){for(var n=e.length;n--&&a.test(e.charAt(n)););return n}},66726:function(e,a,n){var t=n(11611),i=n(82846),r=n(91936),s=Math.max,o=Math.min;e.exports=function(e,a,n){var l,_,u,d,c,F,m=0,S=!1,h=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function p(a){var n=l,t=_;return l=_=void 0,m=a,d=e.apply(t,n)}function v(e){var n=e-F,t=e-m;return void 0===F||n>=a||n<0||h&&t>=u}function g(){var e,n,t,r=i();if(v(r))return C(r);c=setTimeout(g,(e=r-F,n=r-m,t=a-e,h?o(t,u-n):t))}function C(e){return(c=void 0,f&&l)?p(e):(l=_=void 0,d)}function y(){var e,n=i(),t=v(n);if(l=arguments,_=this,F=n,t){if(void 0===c)return m=e=F,c=setTimeout(g,a),S?p(e):d;if(h)return clearTimeout(c),c=setTimeout(g,a),p(F)}return void 0===c&&(c=setTimeout(g,a)),d}return a=r(a)||0,t(n)&&(S=!!n.leading,u=(h="maxWait"in n)?s(r(n.maxWait)||0,a):u,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==c&&clearTimeout(c),m=0,l=F=_=c=void 0},y.flush=function(){return void 0===c?d:C(i())},y}},64925:function(e,a,n){var t=n(56632)(n(66259));e.exports=t},66259:function(e,a,n){var t=n(95372),i=n(89278),r=n(47991),s=Math.max;e.exports=function(e,a,n){var o=null==e?0:e.length;if(!o)return -1;var l=null==n?0:r(n);return l<0&&(l=s(o+l,0)),t(e,i(a,3),l)}},82846:function(e,a,n){var t=n(77400);e.exports=function(){return t.Date.now()}},94919:function(e,a,n){var t=n(91936),i=1/0;e.exports=function(e){return e?(e=t(e))===i||e===-i?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,a,n){var t=n(94919);e.exports=function(e){var a=t(e),n=a%1;return a==a?n?a-n:a:0}},91936:function(e,a,n){var t=n(74833),i=n(11611),r=n(55193),s=0/0,o=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,_=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return s;if(i(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=i(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=t(e);var n=l.test(e);return n||_.test(e)?u(e.slice(2),n?2:8):o.test(e)?s:+e}},86850:function(e,a,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-discovery/action-center/[monitorId]",function(){return n(99948)}])},30952:function(e,a,n){"use strict";n.d(a,{f:function(){return l}});var t=n(24246),i=n(66726),r=n.n(i),s=n(27378),o=n(26917);let l=e=>{let{value:a,onChange:n,placeholder:i,...l}=e,[_,u]=(0,s.useState)(a);(0,s.useEffect)(()=>{u(a||"")},[a]);let d=r()(n,500),c=(0,s.useCallback)(e=>{u(e),d(e)},[]);return(0,t.jsx)(o.Z,{value:_,onChange:c,onClear:()=>{u(""),n("")},placeholder:i,...l})}},58754:function(e,a,n){"use strict";var t=n(24246),i=n(39941),r=n(70788);a.Z=e=>{let{heading:a,breadcrumbItems:n,isSticky:s=!0,children:o,rightContent:l,style:_,...u}=e;return(0,t.jsxs)("div",{...u,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",..._}:{paddingBottom:"24px",..._},children:[(0,t.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof a?(0,t.jsx)(i.lQT,{className:n||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:a}):a,l&&(0,t.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,t.jsx)(r.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},26089:function(e,a,n){"use strict";var t=n(24246),i=n(39941),r=n(99830),s=n.n(r);a.Z=e=>{let{onClick:a,children:n}=e;return(0,t.jsx)(i.wpx,{onClick:a,type:"link",role:"link",size:"small",className:s().toastLink,children:n})}},70788:function(e,a,n){"use strict";n.d(a,{m:function(){return _}});var t=n(24246),i=n(39941),r=n(79894),s=n.n(r),o=n(27378);let{Text:l}=i.AntTypography,_=e=>{let{items:a,...n}=e,r=(0,o.useMemo)(()=>null==a?void 0:a.map((e,n)=>{let r=n===a.length-1,o={...e},_=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,t.jsx)(l,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,id:r?"breadcrumb-current-page":void 0,children:o.title})),_)?o.title=(0,t.jsx)(i.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,t.jsx)(s(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[a]);return(0,t.jsx)(i.zrq,{items:r,...n})}},8411:function(e,a,n){"use strict";n.d(a,{NA:function(){return r},Z8:function(){return i}});var t=n(54682);let i={[t._F.ER]:"Eritrea",[t._F.DJ]:"Djibouti",[t._F.MR]:"Mauritania",[t._F.NA]:"Namibia",[t._F.GH]:"Ghana",[t._F.SS]:"South Sudan",[t._F.SC]:"Seychelles",[t._F.IO]:"British Indian Ocean Territory",[t._F.GQ]:"Equatorial Guinea",[t._F.AO]:"Angola",[t._F.CG]:"Republic of the Congo",[t._F.BW]:"Botswana",[t._F.BI]:"Burundi",[t._F.DZ]:"Algeria",[t._F.TD]:"Chad",[t._F.NG]:"Nigeria",[t._F.TZ]:"Tanzania",[t._F.EH]:"Western Sahara",[t._F.SN]:"Senegal",[t._F.LR]:"Liberia",[t._F.ZA]:"South Africa",[t._F.CV]:"Cape Verde",[t._F.GM]:"Gambia",[t._F.SD]:"Sudan",[t._F.KM]:"Comoros",[t._F.SZ]:"Eswatini",[t._F.UG]:"Uganda",[t._F.MG]:"Madagascar",[t._F.RW]:"Rwanda",[t._F.CD]:"DR Congo",[t._F.CM]:"Cameroon",[t._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[t._F.TG]:"Togo",[t._F.MU]:"Mauritius",[t._F.NE]:"Niger",[t._F.BJ]:"Benin",[t._F.EG]:"Egypt",[t._F.LS]:"Lesotho",[t._F.ET]:"Ethiopia",[t._F.MA]:"Morocco",[t._F.YT]:"Mayotte",[t._F.BF]:"Burkina Faso",[t._F.RE]:"R\xe9union",[t._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[t._F.CF]:"Central African Republic",[t._F.MZ]:"Mozambique",[t._F.MW]:"Malawi",[t._F.ML]:"Mali",[t._F.ZM]:"Zambia",[t._F.LY]:"Libya",[t._F.GW]:"Guinea-Bissau",[t._F.SO]:"Somalia",[t._F.KE]:"Kenya",[t._F.GN]:"Guinea",[t._F.ZW]:"Zimbabwe",[t._F.TN]:"Tunisia",[t._F.SL]:"Sierra Leone",[t._F.GA]:"Gabon",[t._F.CI]:"Ivory Coast",[t._F.JO]:"Jordan",[t._F.PK]:"Pakistan",[t._F.KP]:"North Korea",[t._F.MO]:"Macau",[t._F.AM]:"Armenia",[t._F.SY]:"Syria",[t._F.TJ]:"Tajikistan",[t._F.SA]:"Saudi Arabia",[t._F.KR]:"South Korea",[t._F.NP]:"Nepal",[t._F.PH]:"Philippines",[t._F.IQ]:"Iraq",[t._F.LB]:"Lebanon",[t._F.MN]:"Mongolia",[t._F.PS]:"Palestine",[t._F.YE]:"Yemen",[t._F.JP]:"Japan",[t._F.KZ]:"Kazakhstan",[t._F.LK]:"Sri Lanka",[t._F.MM]:"Myanmar",[t._F.KG]:"Kyrgyzstan",[t._F.CN]:"China",[t._F.AF]:"Afghanistan",[t._F.OM]:"Oman",[t._F.IN]:"India",[t._F.LA]:"Laos",[t._F.UZ]:"Uzbekistan",[t._F.MV]:"Maldives",[t._F.ID]:"Indonesia",[t._F.VN]:"Vietnam",[t._F.MY]:"Malaysia",[t._F.TW]:"Taiwan",[t._F.KH]:"Cambodia",[t._F.AE]:"United Arab Emirates",[t._F.HK]:"Hong Kong",[t._F.GE]:"Georgia (Country)",[t._F.BD]:"Bangladesh",[t._F.KW]:"Kuwait",[t._F.TM]:"Turkmenistan",[t._F.QA]:"Qatar",[t._F.BH]:"Bahrain",[t._F.BN]:"Brunei",[t._F.TH]:"Thailand",[t._F.BT]:"Bhutan",[t._F.SG]:"Singapore",[t._F.IL]:"Israel",[t._F.AZ]:"Azerbaijan",[t._F.TL]:"Timor-Leste",[t._F.IR]:"Iran",[t._F.TR]:"Turkey",[t._F.MK]:"North Macedonia",[t._F.IE]:"Ireland",[t._F.DK]:"Denmark",[t._F.SK]:"Slovakia",[t._F.MD]:"Moldova",[t._F.AX]:"\xc5land Islands",[t._F.PL]:"Poland",[t._F.BA]:"Bosnia and Herzegovina",[t._F.SM]:"San Marino",[t._F.CZ]:"Czechia",[t._F.EE]:"Estonia",[t._F.XK]:"Kosovo",[t._F.FO]:"Faroe Islands",[t._F.SJ]:"Svalbard and Jan Mayen",[t._F.GG]:"Guernsey",[t._F.FR]:"France",[t._F.NL]:"Netherlands",[t._F.FI]:"Finland",[t._F.PT]:"Portugal",[t._F.DE]:"Germany",[t._F.MT]:"Malta",[t._F.JE]:"Jersey",[t._F.IS]:"Iceland",[t._F.ES]:"Spain",[t._F.GI]:"Gibraltar",[t._F.NO]:"Norway",[t._F.CY]:"Cyprus",[t._F.RS]:"Serbia",[t._F.LT]:"Lithuania",[t._F.MC]:"Monaco",[t._F.LU]:"Luxembourg",[t._F.UA]:"Ukraine",[t._F.IM]:"Isle of Man",[t._F.RO]:"Romania",[t._F.BE]:"Belgium",[t._F.SE]:"Sweden",[t._F.ME]:"Montenegro",[t._F.LV]:"Latvia",[t._F.VA]:"Vatican City",[t._F.AT]:"Austria",[t._F.AL]:"Albania",[t._F.LI]:"Liechtenstein",[t._F.GR]:"Greece",[t._F.IT]:"Italy",[t._F.AD]:"Andorra",[t._F.GB]:"United Kingdom",[t._F.RU]:"Russia",[t._F.SI]:"Slovenia",[t._F.BY]:"Belarus",[t._F.CH]:"Switzerland",[t._F.HU]:"Hungary",[t._F.BG]:"Bulgaria",[t._F.HR]:"Croatia",[t._F.TC]:"Turks and Caicos Islands",[t._F.CW]:"Cura\xe7ao",[t._F.GP]:"Guadeloupe",[t._F.UM]:"United States Minor Outlying Islands",[t._F.GT]:"Guatemala",[t._F.PM]:"Saint Pierre and Miquelon",[t._F.BQ]:"Caribbean Netherlands",[t._F.GL]:"Greenland",[t._F.SX]:"Sint Maarten",[t._F.PA]:"Panama",[t._F.AW]:"Aruba",[t._F.MQ]:"Martinique",[t._F.AG]:"Antigua and Barbuda",[t._F.BM]:"Bermuda",[t._F.CU]:"Cuba",[t._F.GD]:"Grenada",[t._F.NI]:"Nicaragua",[t._F.LC]:"Saint Lucia",[t._F.KN]:"Saint Kitts and Nevis",[t._F.DO]:"Dominican Republic",[t._F.VC]:"Saint Vincent and the Grenadines",[t._F.BZ]:"Belize",[t._F.HT]:"Haiti",[t._F.JM]:"Jamaica",[t._F.BS]:"Bahamas",[t._F.MX]:"Mexico",[t._F.MF]:"Saint Martin",[t._F.SV]:"El Salvador",[t._F.BL]:"Saint Barth\xe9lemy",[t._F.AI]:"Anguilla",[t._F.MS]:"Montserrat",[t._F.VG]:"British Virgin Islands",[t._F.BB]:"Barbados",[t._F.HN]:"Honduras",[t._F.KY]:"Cayman Islands",[t._F.DM]:"Dominica",[t._F.TT]:"Trinidad and Tobago",[t._F.CR]:"Costa Rica",[t._F.SR]:"Suriname",[t._F.CX]:"Christmas Island",[t._F.WS]:"Samoa",[t._F.PF]:"French Polynesia",[t._F.AS]:"American Samoa",[t._F.NC]:"New Caledonia",[t._F.TK]:"Tokelau",[t._F.PW]:"Palau",[t._F.KI]:"Kiribati",[t._F.VU]:"Vanuatu",[t._F.PN]:"Pitcairn Islands",[t._F.CK]:"Cook Islands",[t._F.FJ]:"Fiji",[t._F.PG]:"Papua New Guinea",[t._F.MP]:"Northern Mariana Islands",[t._F.NU]:"Niue",[t._F.TV]:"Tuvalu",[t._F.NF]:"Norfolk Island",[t._F.TO]:"Tonga",[t._F.FM]:"Micronesia",[t._F.SB]:"Solomon Islands",[t._F.NR]:"Nauru",[t._F.WF]:"Wallis and Futuna",[t._F.GU]:"Guam",[t._F.AU]:"Australia",[t._F.NZ]:"New Zealand",[t._F.MH]:"Marshall Islands",[t._F.CC]:"Cocos (Keeling) Islands",[t._F.VE]:"Venezuela",[t._F.PY]:"Paraguay",[t._F.BR]:"Brazil",[t._F.CO]:"Colombia",[t._F.PE]:"Peru",[t._F.CL]:"Chile",[t._F.UY]:"Uruguay",[t._F.AR]:"Argentina",[t._F.GY]:"Guyana",[t._F.BO]:"Bolivia",[t._F.GF]:"French Guiana",[t._F.EC]:"Ecuador",[t._F.FK]:"Falkland Islands",[t._F.US_AL]:"Alabama",[t._F.US_AK]:"Alaska",[t._F.US_AZ]:"Arizona",[t._F.US_AR]:"Arkansas",[t._F.US_CA]:"California",[t._F.US_CO]:"Colorado",[t._F.US_CT]:"Connecticut",[t._F.US_DE]:"Delaware",[t._F.US_DC]:"District of Columbia (DC)",[t._F.US_FL]:"Florida",[t._F.US_GA]:"Georgia",[t._F.US_HI]:"Hawaii",[t._F.US_ID]:"Idaho",[t._F.US_IL]:"Illinois",[t._F.US_IN]:"Indiana",[t._F.US_IA]:"Iowa",[t._F.US_KS]:"Kansas",[t._F.US_KY]:"Kentucky",[t._F.US_LA]:"Louisiana",[t._F.US_ME]:"Maine",[t._F.US_MD]:"Maryland",[t._F.US_MA]:"Massachusetts",[t._F.US_MI]:"Michigan",[t._F.US_MN]:"Minnesota",[t._F.US_MS]:"Mississippi",[t._F.US_MO]:"Missouri",[t._F.US_MT]:"Montana",[t._F.US_NE]:"Nebraska",[t._F.US_NV]:"Nevada",[t._F.US_NH]:"New Hampshire",[t._F.US_NJ]:"New Jersey",[t._F.US_NM]:"New Mexico",[t._F.US_NY]:"New York",[t._F.US_NC]:"North Carolina",[t._F.US_ND]:"North Dakota",[t._F.US_OH]:"Ohio",[t._F.US_OK]:"Oklahoma",[t._F.US_OR]:"Oregon",[t._F.US_PA]:"Pennsylvania",[t._F.US_PR]:"Puerto Rico",[t._F.US_RI]:"Rhode Island",[t._F.US_SC]:"South Carolina",[t._F.US_SD]:"South Dakota",[t._F.US_TN]:"Tennessee",[t._F.US_TX]:"Texas",[t._F.US_UT]:"Utah",[t._F.US_VA]:"Virginia",[t._F.US_VI]:"United States Virgin Islands",[t._F.US_VT]:"Vermont",[t._F.US_WA]:"Washington",[t._F.US_WV]:"West Virginia",[t._F.US_WI]:"Wisconsin",[t._F.US_WY]:"Wyoming",[t._F.CA_AB]:"Alberta",[t._F.CA_BC]:"British Columbia",[t._F.CA_MB]:"Manitoba",[t._F.CA_NB]:"New Brunswick",[t._F.CA_NL]:"Newfoundland and Labrador",[t._F.CA_NS]:"Nova Scotia",[t._F.CA_ON]:"Ontario",[t._F.CA_PE]:"Prince Edward Island",[t._F.CA_QC]:"Quebec",[t._F.CA_SK]:"Saskatchewan",[t._F.CA_NT]:"Northwest Territories",[t._F.CA_NU]:"Nunavut",[t._F.CA_YT]:"Yukon",[t._F.CA]:"Canada",[t._F.US]:"United States",[t._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[t._F.CARIBBEAN]:"Caribbean",[t._F.EEA]:"European Economic Area (EEA)",[t._F.NON_EEA]:"Non European Economic Area",[t._F.GLOBAL]:"Global"},r=new Map(Object.entries(i));Object.entries(i).map(e=>({value:e[0],label:e[1]}))},14908:function(e,a,n){"use strict";var t=n(86677),i=n(27378);let r=e=>e.startsWith("#")?e.slice(1):e;a.Z=e=>{let{tabKeys:a,initialTab:n}=e,s=(0,t.useRouter)(),o=s.asPath.split("#")[1]||a[0],[l,_]=(0,i.useState)(o);return(0,i.useEffect)(()=>{n&&a.includes(n)&&_(n)},[n,a,s.isReady]),{activeTab:l,onTabChange:(0,i.useCallback)(async e=>{if(!a.includes(e)){await s.replace({pathname:s.pathname,query:s.query,hash:void 0}),_(a[0]);return}s.isReady&&(await s.replace({pathname:s.pathname,query:s.query,hash:r(e)},void 0,{shallow:!0}),_(e))},[s,a])}}},76904:function(e,a,n){"use strict";n.d(a,{dK:function(){return d},Rv:function(){return S},$P:function(){return F},zj:function(){return h},Kr:function(){return f},q1:function(){return c},QL:function(){return p}});var t=n(24246),i=n(39941),r=n(3124),s=n.n(r);let o=e=>{let{...a}=e;return(0,t.jsx)("svg",{viewBox:"0 0 8 8",focusable:"false",...a,children:(0,t.jsx)("path",{fill:"currentColor",d:"M7.23192 8H8V7.23192V1.85539V1.08731H6.46385V1.85539V5.37654L1.62976 0.544855L1.08731 0L0 1.08731L0.542454 1.62976L5.37654 6.46385H1.85539H1.08731V8H1.85539H7.23192Z"})})},l=e=>{let{...a}=e;return(0,t.jsx)("svg",{viewBox:"0 0 8 8",focusable:"false",...a,children:(0,t.jsx)("path",{fill:"currentColor",d:"M7.23192 0H8V0.768077V6.14461V6.91269H6.46385V6.14461V2.62346L1.62976 7.45515L1.08731 8L0 6.91269L0.542454 6.37024L5.37654 1.53615H1.85539H1.08731V0H1.85539H7.23192Z"})})},_=e=>{let{...a}=e;return(0,t.jsx)("svg",{viewBox:"0 0 9 10",focusable:"false",...a,children:(0,t.jsx)("path",{fill:"currentColor",d:"M0 0.5V5L4.5 9.5L9 5L4.5 0.5H0ZM2.25 2.10714C2.4205 2.10714 2.58401 2.17487 2.70457 2.29543C2.82513 2.41599 2.89286 2.5795 2.89286 2.75C2.89286 2.9205 2.82513 3.08401 2.70457 3.20457C2.58401 3.32513 2.4205 3.39286 2.25 3.39286C2.0795 3.39286 1.91599 3.32513 1.79543 3.20457C1.67487 3.08401 1.60714 2.9205 1.60714 2.75C1.60714 2.5795 1.67487 2.41599 1.79543 2.29543C1.91599 2.17487 2.0795 2.10714 2.25 2.10714Z"})})};var u=n(28278);let d=()=>(0,t.jsx)(l,{style:{color:s().FIDESUI_SUCCESS},className:"size-2","data-testid":"add-icon"}),c=()=>(0,t.jsx)(o,{style:{color:s().FIDESUI_ERROR},className:"size-2","data-testid":"remove-icon"}),F=()=>(0,t.jsx)(_,{style:{color:s().FIDESUI_WARNING},className:"size-3","data-testid":"classify-icon"}),m=e=>{let{color:a,...n}=e;return(0,t.jsx)(i.PJP.fRw,{style:{color:a},className:"size-2",...n})},S=()=>(0,t.jsx)(m,{color:s().FIDESUI_INFO,"data-testid":"change-icon"}),h=()=>(0,t.jsx)(m,{color:s().FIDESUI_SUCCESS,"data-testid":"monitored-icon"}),f=()=>(0,t.jsx)(m,{color:s().FIDESUI_ERROR,"data-testid":"muted-icon"}),p={[u.E.ADDITION]:(0,t.jsx)(d,{}),[u.E.REMOVAL]:(0,t.jsx)(c,{}),[u.E.CLASSIFICATION]:(0,t.jsx)(F,{}),[u.E.CHANGE]:(0,t.jsx)(S,{}),[u.E.MONITORED]:(0,t.jsx)(h,{}),[u.E.MUTED]:(0,t.jsx)(f,{}),[u.E.IN_PROGRESS]:(0,t.jsx)(()=>(0,t.jsx)(m,{color:s().FIDESUI_WARNING,"data-testid":"in-progress-icon"}),{}),[u.E.NONE]:null}},28278:function(e,a,n){"use strict";var t,i;n.d(a,{E:function(){return t}}),(i=t||(t={})).ADDITION="Addition",i.CHANGE="Change",i.REMOVAL="Removal",i.CLASSIFICATION="Classification",i.IN_PROGRESS="Classifying",i.MONITORED="Monitoring",i.MUTED="Unmonitored",i.NONE="--"},99948:function(e,a,n){"use strict";n.r(a),n.d(a,{default:function(){return B}});var t=n(24246),i=n(86677),r=n(35287),s=n(77830),o=n(58754),l=n(39941),_=n(27378),u=n(812),d=n(32735),c=n(25415),F=n(46628),m=n(37059),S=n(88708),h=n(9320),f=n(54682),p=n(31883),v=n(30952),g=n(8411),C=n(26070),y=n(3110),x=n(54762);let A=e=>{let{monitorId:a,system:n,allowIgnore:r,onTabChange:o}=e,[_,{isLoading:d}]=(0,m.rs)(),[c,{isLoading:f}]=(0,m.nP)(),p=(0,i.useRouter)(),v=(0,l.pmc)(),g=d||f,{id:C,name:y,system_key:x,total_updates:A}=n,M=async()=>{let e=await _({monitor_config_key:a,resolved_system_ids:[C]});if((0,u.D4)(e))v((0,F.Vo)((0,u.e$)(e.error)));else{let e="".concat(s.So,"/configure/").concat(x,"#assets");v((0,F.t5)((0,h._)(x?"".concat(A," assets from ").concat(y," have been added to the system inventory."):"".concat(y," and ").concat(A," assets have been added to the system inventory. ").concat(y," is now configured for consent."),x?()=>p.push(e):void 0)))}},I=async()=>{let e=await c({monitor_config_key:a,resolved_system_ids:[C||s.Kl]});(0,u.D4)(e)?v((0,F.Vo)((0,u.e$)(e.error))):v((0,F.t5)((0,h._)(y?"".concat(A," assets from ").concat(y," have been ignored and will not appear in future scans."):"".concat(A," uncategorized assets have been ignored and will not appear in future scans."),()=>o(S.A.IGNORED))))};return(0,t.jsxs)(l.vyj,{children:[(0,t.jsx)(l.esZ,{title:n.id?void 0:"These assets must be categorized before you can add them to the inventory.",children:(0,t.jsx)(l.wpx,{"data-testid":"add-btn",size:"small",onClick:M,disabled:!n.id||g,loading:d,children:"Add"})}),r&&(0,t.jsx)(l.wpx,{"data-testid":"ignore-btn",size:"small",onClick:I,disabled:g,loading:f,children:"Ignore"})]})};var M=n(79894),I=n.n(M);let{Link:N,Text:E}=l.AntTypography,b=e=>{let{href:a,children:n,...i}=e;return a?(0,t.jsx)(I(),{href:a,passHref:!0,legacyBehavior:!0,children:(0,t.jsx)(N,{strong:!0,ellipsis:!0,onClick:e=>e.stopPropagation(),...i,children:n})}):(0,t.jsx)(E,{strong:!0,ellipsis:!0,...i,children:n})};var U=n(76904);let T=e=>{let{system:a,rowClickUrl:n}=e,i=null==n?void 0:n(a);return(0,t.jsxs)(l.vyj,{className:"max-w-[250px] flex-nowrap",children:[!a.system_key&&(0,t.jsx)(l.esZ,{title:"New system",children:(0,t.jsx)("span",{children:U.QL.Change})}),(0,t.jsx)(b,{href:i,"data-testid":i?"system-name-link":"system-name-text",children:a.name||"Uncategorized assets"}),(0,t.jsx)(x.l,{consentStatus:a.consent_status})]})};var j=n(34929),k=n(2525),L=n(78238),w=e=>{var a,n;let{system:i}=e,{getDataUseDisplayName:r}=(0,j.Z)(),s=(null!==(n=null===(a=i.data_uses)||void 0===a?void 0:a.filter(e=>(0,L.Z)(e)))&&void 0!==n?n:[]).map(e=>({label:r(e),key:e}));return(0,t.jsx)(k.Q,{values:s})};let R=e=>{let{monitorId:a,readonly:n,allowIgnore:i,onTabChange:r,consentStatus:s,rowClickUrl:o}=e,[u,d]=(0,_.useState)(!1),[c,F]=(0,_.useState)(!1);return{columns:(0,_.useMemo)(()=>{let e=[{title:()=>(0,t.jsxs)(l.vyj,{children:[(0,t.jsx)("div",{children:"System"}),(0,t.jsx)(x.l,{consentStatus:s})]}),dataIndex:"name",key:"system_name",fixed:"left",render:(e,a)=>(0,t.jsx)(T,{system:a,rowClickUrl:o})},{title:"Assets",dataIndex:"total_updates",key:"total_updates"},{title:"Categories of consent",key:"data_use",render:(e,a)=>(0,t.jsx)(w,{system:a})},{title:"Locations",menu:{items:y.D,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?d(!0):"collapse-all"===e.key&&d(!1)}},dataIndex:"locations",key:"locations",width:250,render:e=>{var a;return(0,t.jsx)(C.Q,{values:null!==(a=null==e?void 0:e.map(e=>{var a;return{label:null!==(a=g.Z8[e])&&void 0!==a?a:e,key:e}}))&&void 0!==a?a:[],columnState:{isExpanded:u,isWrapped:!0}})}},{title:"Domains",menu:{items:y.D,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?F(!0):"collapse-all"===e.key&&F(!1)}},dataIndex:"domains",key:"domains",render:e=>(0,t.jsx)(C.v,{values:e,valueSuffix:"domains",columnState:{isExpanded:c}})}];return n||e.push({title:"Actions",key:"actions",render:(e,n)=>(0,t.jsx)(A,{system:n,monitorId:a,allowIgnore:i,onTabChange:r})}),e},[n,s,o,u,c,a,i,r])}},G=e=>{let{monitorId:a}=e,n=(0,i.useRouter)(),[r,o]=(0,_.useState)(),[g,C]=(0,_.useState)(1),[y,x]=(0,_.useState)(25),[A,{isLoading:M}]=(0,m.rs)(),[I,{isLoading:N}]=(0,m.nP)(),E=(0,l.pmc)(),[b,U]=(0,_.useState)(""),[T,j]=(0,_.useState)([]),[k,L]=(0,_.useState)(new Map),w=()=>{j([]),L(new Map)},G=e=>{var a,n,t;return null!==(t=null!==(n=null!==(a=e.id)&&void 0!==a?a:e.vendor_id)&&void 0!==n?n:e.name)&&void 0!==t?t:s.Kl},{filterTabs:B,activeTab:D,onTabChange:O,activeParams:P,actionsDisabled:K}=(0,S.Z)();(0,_.useEffect)(()=>{C(1)},[a,b]),(0,_.useEffect)(()=>{w()},[a,b,D]);let{data:V,isLoading:H,isFetching:Z}=(0,m.wi)({key:a,page:g,size:y,search:b,...P});(0,_.useEffect)(()=>{if((null==V?void 0:V.items)&&!r){var e;let a=null===(e=V.items.find(e=>{var a;return(null===(a=e.consent_status)||void 0===a?void 0:a.status)===f.pF.ALERT}))||void 0===e?void 0:e.consent_status;o(null!=a?a:void 0)}},[V,r]),(0,_.useEffect)(()=>{(null==V?void 0:V.items)&&j(V.items.filter(e=>{let a=G(e);return k.has(String(a))}).map(e=>G(e)))},[V,k]);let z=Array.from(k.values()),W=e=>{o(void 0),O(e),w()},J=(0,_.useCallback)(e=>{var n;return"".concat(s.vi,"/").concat(a,"/").concat(null!==(n=e.id)&&void 0!==n?n:s.Kl).concat(D?"#".concat(D):"")},[a,D]),{columns:Y}=R({monitorId:a,onTabChange:W,readonly:K,allowIgnore:!P.diff_status.includes(f.LL.MUTED),consentStatus:r,rowClickUrl:J}),q=async()=>{let e=z.reduce((e,a)=>e+a.total_updates,0),t=await A({monitor_config_key:a,resolved_system_ids:z.map(e=>e.id)});(0,p.D4)(t)?E((0,F.Vo)((0,u.e$)(t.error))):(E((0,F.t5)((0,h._)("".concat(e," assets have been added to the system inventory."),()=>n.push(s.So)))),w())},Q=async()=>{let e=z.reduce((e,a)=>e+a.total_updates,0),n=await I({monitor_config_key:a,resolved_system_ids:z.map(e=>{var a;return null!==(a=e.id)&&void 0!==a?a:s.Kl})});(0,p.D4)(n)?E((0,F.Vo)((0,u.e$)(n.error))):(E((0,F.t5)((0,h._)("".concat(e," assets have been ignored and will not appear in future scans."),()=>O(S.A.IGNORED)))),w())},X=z.some(e=>null===e.id);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.A5g,{items:B.map(e=>({key:e.hash,label:e.label})),activeKey:D,onChange:e=>W(e)}),(0,t.jsxs)(l.jqI,{justify:"space-between",align:"center",className:"mb-4",children:[(0,t.jsx)(v.f,{value:b,onChange:U}),(0,t.jsxs)(l.vyj,{size:"large",children:[!!T.length&&(0,t.jsx)(c.a,{count:z.length}),(0,t.jsx)(l.S0p,{menu:{items:[{key:"add",label:(0,t.jsx)(l.esZ,{title:X?"Uncategorized assets can't be added to the inventory":null,placement:"left",children:"Add"}),onClick:q,disabled:X},P.diff_status.includes(f.LL.MUTED)?null:{key:"ignore",label:"Ignore",onClick:Q}]},trigger:["click"],children:(0,t.jsx)(l.wpx,{type:"primary",icon:(0,t.jsx)(l.PJP._ME,{}),iconPosition:"end",loading:M||N,disabled:!T.length,"data-testid":"bulk-actions-menu",children:"Actions"})})]})]}),(0,t.jsx)(l.V5H,{dataSource:(null==V?void 0:V.items)||[],columns:Y,loading:H||Z,rowKey:e=>{var a,n,t;return null!==(t=null!==(n=null!==(a=e.id)&&void 0!==a?a:e.vendor_id)&&void 0!==n?n:e.name)&&void 0!==t?t:s.Kl},rowSelection:{selectedRowKeys:T,onChange:(e,a)=>{j(e);let n=new Map(k);(null==V?void 0:V.items)&&V.items.forEach(a=>{let t=G(a);e.includes(t)||n.delete(String(t))}),a.forEach(e=>{let a=G(e);n.set(String(a),e)}),L(n)}},pagination:{current:g,pageSize:y,pageSizeOptions:d.VZ,total:(null==V?void 0:V.total)||0},onChange:e=>{C(e.current),x(e.pageSize)},locale:{emptyText:(0,t.jsx)(l.oj8,{image:l.oj8.PRESENTED_IMAGE_SIMPLE,description:"All caught up!"})}})]})};var B=()=>{let e=decodeURIComponent((0,i.useRouter)().query.monitorId);return(0,t.jsxs)(r.Z,{title:"Action center - Discovered assets by system",children:[(0,t.jsx)(o.Z,{heading:"Action center",breadcrumbItems:[{title:"All activity",href:s.vi},{title:e}]}),(0,t.jsx)(G,{monitorId:e})]})}},99830:function(e){e.exports={toastLink:"ToastLink_toastLink__OLSeq"}}},function(e){e.O(0,[8765,9278,5163,1138,2888,9774,179],function(){return e(e.s=86850)}),_N_E=e.O()}]);