ethyca-fides 2.73.2b0__py2.py3-none-any.whl → 2.76.0rc2__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (453) hide show
  1. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/METADATA +2 -1
  2. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/RECORD +349 -336
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/303287c70600_migrate_resource_type_from_enum_to_.py +99 -0
  5. fides/api/alembic/migrations/versions/795f46f656c0_migrate_field_type_from_enum_to_string.py +61 -0
  6. fides/api/alembic/migrations/versions/xx_2025_10_29_1659_80d28dea3b6b_added_duplicate_group_table.py +79 -0
  7. fides/api/alembic/migrations/versions/xx_2025_11_05_0200_f1a2b3c4d5e6_create_staged_resource_error_table.py +82 -0
  8. fides/api/alembic/migrations/versions/xx_2025_11_07_1709_56fe6fad2d89_add_notice_display_order.py +47 -0
  9. fides/api/alembic/migrations/versions/xx_2025_11_10_1200_a1b2c3d4e5f6_add_test_datastore_to_connectiontype.py +53 -0
  10. fides/api/alembic/migrations/versions/xx_2025_11_11_1317_7d82c8fc4c34_store_saas_template_datasets.py +68 -0
  11. fides/api/alembic/migrations/versions/xx_2025_11_12_1430_b2c3d4e5f6a7_add_default_identity_definitions.py +81 -0
  12. fides/api/alembic/migrations/versions/xx_2025_11_25_1854_3ff6449c099e_add_index_on_providedidentity_privacy_.py +50 -0
  13. fides/api/api/v1/api.py +2 -0
  14. fides/api/api/v1/endpoints/admin.py +39 -0
  15. fides/api/api/v1/endpoints/connector_template_endpoints.py +167 -0
  16. fides/api/api/v1/endpoints/generic_overrides.py +6 -6
  17. fides/api/api/v1/endpoints/pre_approval_webhook_endpoints.py +5 -5
  18. fides/api/api/v1/endpoints/privacy_request_endpoints.py +101 -21
  19. fides/api/api/v1/endpoints/saas_config_endpoints.py +3 -44
  20. fides/api/api/v1/endpoints/storage_endpoints.py +5 -1
  21. fides/api/api/v1/endpoints/system.py +2 -2
  22. fides/api/api/v1/endpoints/user_endpoints.py +10 -4
  23. fides/api/db/base.py +1 -0
  24. fides/api/db/database.py +228 -1
  25. fides/api/db/seed.py +1 -1
  26. fides/api/email_templates/templates/external_user_welcome.html +9 -5
  27. fides/api/migrations/post_upgrade_index_creation.py +10 -0
  28. fides/api/models/connectionconfig.py +4 -1
  29. fides/api/models/detection_discovery/__init__.py +2 -0
  30. fides/api/models/detection_discovery/core.py +10 -0
  31. fides/api/models/detection_discovery/staged_resource_error.py +25 -0
  32. fides/api/models/experience_notices.py +6 -1
  33. fides/api/models/identity_definition.py +2 -1
  34. fides/api/models/location_regulation_selections.py +22 -0
  35. fides/api/models/manual_webhook.py +17 -6
  36. fides/api/models/messaging_template.py +7 -0
  37. fides/api/models/policy.py +3 -0
  38. fides/api/models/privacy_experience.py +20 -0
  39. fides/api/models/privacy_notice.py +45 -1
  40. fides/api/models/privacy_preference.py +1 -0
  41. fides/api/models/privacy_request/duplicate_group.py +84 -0
  42. fides/api/models/privacy_request/privacy_request.py +84 -9
  43. fides/api/models/privacy_request/provided_identity.py +22 -1
  44. fides/api/models/saas_template_dataset.py +63 -0
  45. fides/api/models/sql_models.py +150 -7
  46. fides/api/models/taxonomy.py +61 -1
  47. fides/api/oauth/roles.py +2 -0
  48. fides/api/schemas/connection_configuration/connection_secrets_mssql.py +5 -0
  49. fides/api/schemas/messaging/messaging.py +1 -0
  50. fides/api/schemas/oauth.py +2 -1
  51. fides/api/schemas/privacy_request.py +38 -6
  52. fides/api/schemas/saas/connector_template.py +14 -0
  53. fides/api/service/async_dsr/strategies/async_dsr_strategy_polling.py +19 -7
  54. fides/api/service/connectors/base_erasure_email_connector.py +7 -0
  55. fides/api/service/connectors/microsoft_sql_server_connector.py +6 -1
  56. fides/api/service/connectors/saas/connector_registry_service.py +45 -1
  57. fides/api/service/messaging/message_dispatch_service.py +44 -4
  58. fides/api/service/privacy_request/dsr_package/dsr_report_builder.py +3 -3
  59. fides/api/service/privacy_request/dsr_package/templates/attachments_index.html +41 -30
  60. fides/api/service/privacy_request/dsr_package/templates/clickme.html +68 -0
  61. fides/api/service/privacy_request/dsr_package/templates/dataset_index.html +30 -27
  62. fides/api/service/privacy_request/duplication_detection.py +439 -0
  63. fides/api/service/privacy_request/email_batch_service.py +2 -1
  64. fides/api/service/privacy_request/request_runner_service.py +31 -5
  65. fides/api/service/privacy_request/request_service.py +4 -2
  66. fides/api/service/saas_request/saas_request_override_factory.py +7 -2
  67. fides/api/task/conditional_dependencies/privacy_request/__init__.py +0 -0
  68. fides/api/task/conditional_dependencies/privacy_request/convenience_fields.py +155 -0
  69. fides/api/task/conditional_dependencies/privacy_request/privacy_request_data.py +140 -0
  70. fides/api/task/conditional_dependencies/privacy_request/schemas.py +212 -0
  71. fides/api/task/conditional_dependencies/util.py +111 -0
  72. fides/api/task/execute_request_tasks.py +17 -4
  73. fides/api/task/manual/manual_task_conditional_evaluation.py +32 -27
  74. fides/api/task/manual/manual_task_graph_task.py +4 -1
  75. fides/api/task/manual/manual_task_utils.py +63 -20
  76. fides/api/tasks/__init__.py +14 -0
  77. fides/api/util/cache.py +4 -0
  78. fides/api/util/connection_util.py +2 -3
  79. fides/api/util/fuzzy_search_utils.py +7 -1
  80. fides/api/util/lock.py +13 -3
  81. fides/api/util/logger.py +58 -4
  82. fides/api/util/logger_context_utils.py +3 -1
  83. fides/api/util/memory_watchdog.py +118 -0
  84. fides/api/util/saas_config_updater.py +12 -2
  85. fides/api/worker/__init__.py +4 -0
  86. fides/common/api/scope_registry.py +6 -0
  87. fides/common/api/v1/urn_registry.py +11 -2
  88. fides/config/__init__.py +8 -2
  89. fides/config/celery_settings.py +42 -0
  90. fides/service/messaging/messaging_service.py +75 -74
  91. fides/service/privacy_request/privacy_request_service.py +151 -19
  92. fides/ui-build/static/admin/404.html +1 -1
  93. fides/ui-build/static/admin/_next/static/chunks/1099-688fa865621531cc.js +1 -0
  94. fides/ui-build/static/admin/_next/static/chunks/{1115-26393b586775ea29.js → 1115-7fd171dac1eb0e51.js} +1 -1
  95. fides/ui-build/static/admin/_next/static/chunks/1276.deb10ae2643f8463.js +1 -0
  96. fides/ui-build/static/admin/_next/static/chunks/1438-8a33b3834d6e43f3.js +1 -0
  97. fides/ui-build/static/admin/_next/static/chunks/{6148-59a59d5c5925344f.js → 1533-84e250d1f26e6d7d.js} +1 -1
  98. fides/ui-build/static/admin/_next/static/chunks/1821-c1daa160f492aacf.js +1 -0
  99. fides/ui-build/static/admin/_next/static/chunks/1840-359ee056e4cf6629.js +1 -0
  100. fides/ui-build/static/admin/_next/static/chunks/{1975.afe8cad52f904fcf.js → 1975.bef017bc80e2012c.js} +1 -1
  101. fides/ui-build/static/admin/_next/static/chunks/{2040-7eed8491ca7276ed.js → 2040-70972e15960d9afe.js} +1 -1
  102. fides/ui-build/static/admin/_next/static/chunks/2121.321b0fd3932164d4.js +1 -0
  103. fides/ui-build/static/admin/_next/static/chunks/{2397-083fc511acb6105d.js → 2397-3434603a97f3f5d6.js} +1 -1
  104. fides/ui-build/static/admin/_next/static/chunks/2921-49ed0ed897832958.js +1 -0
  105. fides/ui-build/static/admin/_next/static/chunks/3150-da5406b80d25fe6d.js +1 -0
  106. fides/ui-build/static/admin/_next/static/chunks/3214-90ce0a366b0f461a.js +1 -0
  107. fides/ui-build/static/admin/_next/static/chunks/3377-02bf9780fd383d94.js +1 -0
  108. fides/ui-build/static/admin/_next/static/chunks/3615-5e2d062d684b8fa1.js +1 -0
  109. fides/ui-build/static/admin/_next/static/chunks/3655-5e1ba5dd68b5ec48.js +1 -0
  110. fides/ui-build/static/admin/_next/static/chunks/3729-31ff8ba51491bf21.js +1 -0
  111. fides/ui-build/static/admin/_next/static/chunks/3872-cff30ca0844fe2b1.js +1 -0
  112. fides/ui-build/static/admin/_next/static/chunks/3931-8bedde156fe83564.js +1 -0
  113. fides/ui-build/static/admin/_next/static/chunks/{401-7c345d019bb9bcbd.js → 401-582d9970d89deefe.js} +1 -1
  114. fides/ui-build/static/admin/_next/static/chunks/4093-7e47408c28de5375.js +1 -0
  115. fides/ui-build/static/admin/_next/static/chunks/{4259.d1507e0db19cbed7.js → 4259.05038c9b78467244.js} +1 -1
  116. fides/ui-build/static/admin/_next/static/chunks/4322-f6aeff6880726c83.js +1 -0
  117. fides/ui-build/static/admin/_next/static/chunks/4339-04a715ab07122744.js +1 -0
  118. fides/ui-build/static/admin/_next/static/chunks/4496-ccbce2459174e0d6.js +1 -0
  119. fides/ui-build/static/admin/_next/static/chunks/454-d5c2c84f1a14e4f1.js +1 -0
  120. fides/ui-build/static/admin/_next/static/chunks/4589-c1d83c6a8dab4d30.js +1 -0
  121. fides/ui-build/static/admin/_next/static/chunks/4809-a8f4a108a42f53ed.js +1 -0
  122. fides/ui-build/static/admin/_next/static/chunks/4903-19c0bc07a956dfa8.js +1 -0
  123. fides/ui-build/static/admin/_next/static/chunks/4910-d990773601f794c1.js +1 -0
  124. fides/ui-build/static/admin/_next/static/chunks/{5185-e7f8b81dd3dfbe0b.js → 5185-96423702fba70ced.js} +1 -1
  125. fides/ui-build/static/admin/_next/static/chunks/5258-4e308cca01d59367.js +1 -0
  126. fides/ui-build/static/admin/_next/static/chunks/5487-5c3501754bf027ba.js +1 -0
  127. fides/ui-build/static/admin/_next/static/chunks/549-1bdc3e6f3264c020.js +1 -0
  128. fides/ui-build/static/admin/_next/static/chunks/5505-43b9c39491b88e08.js +1 -0
  129. fides/ui-build/static/admin/_next/static/chunks/{5783-21775c232dce7af7.js → 5783-016dfcee8e49bf61.js} +1 -1
  130. fides/ui-build/static/admin/_next/static/chunks/5826-4db99ea4e5077911.js +1 -0
  131. fides/ui-build/static/admin/_next/static/chunks/590-be447cacf12419dd.js +1 -0
  132. fides/ui-build/static/admin/_next/static/chunks/6084-91badbc6569a0efb.js +1 -0
  133. fides/ui-build/static/admin/_next/static/chunks/6344-026cb323c1d49926.js +1 -0
  134. fides/ui-build/static/admin/_next/static/chunks/6362-ba0e12f2fc4cad94.js +1 -0
  135. fides/ui-build/static/admin/_next/static/chunks/{6853-de9905d28e5b19b3.js → 6853-882889659769d7b4.js} +1 -1
  136. fides/ui-build/static/admin/_next/static/chunks/6882-bb1b469d7d7f5335.js +1 -0
  137. fides/ui-build/static/admin/_next/static/chunks/6954-0dcf22a9aabe39c5.js +1 -0
  138. fides/ui-build/static/admin/_next/static/chunks/7170-46db82bb5b55e856.js +1 -0
  139. fides/ui-build/static/admin/_next/static/chunks/7218-2ace8c82e3e7eb74.js +1 -0
  140. fides/ui-build/static/admin/_next/static/chunks/{7245-c9bc628d078c2170.js → 7245-1cdafb35f289861b.js} +1 -1
  141. fides/ui-build/static/admin/_next/static/chunks/7630-7f75ab7b8df42eb3.js +1 -0
  142. fides/ui-build/static/admin/_next/static/chunks/7654-2e9a8be02e41769a.js +1 -0
  143. fides/ui-build/static/admin/_next/static/chunks/{8212-393420e5a9751791.js → 8212-348ddd2b6933db70.js} +1 -1
  144. fides/ui-build/static/admin/_next/static/chunks/9014-eeae6f581158e645.js +1 -0
  145. fides/ui-build/static/admin/_next/static/chunks/{5596-29a7c8322530b7cf.js → 9195-da717d324917b049.js} +3 -3
  146. fides/ui-build/static/admin/_next/static/chunks/9450-b7b7bb1d755ecf57.js +1 -0
  147. fides/ui-build/static/admin/_next/static/chunks/{9676.7d029a5383595b69.js → 9676.1f395eeb9cc34968.js} +1 -1
  148. fides/ui-build/static/admin/_next/static/chunks/{9826-a737a9956c1d0905.js → 9826-1078e46f3ac0b688.js} +1 -1
  149. fides/ui-build/static/admin/_next/static/chunks/9911-ece086f2230e34f0.js +1 -0
  150. fides/ui-build/static/admin/_next/static/chunks/pages/{404-eb019192ce498f32.js → 404-800be6996aaa999c.js} +1 -1
  151. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-ee588a308812715d.js → _app-de4b578c904df772.js} +70 -70
  152. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-7081e0e49f67716c.js → manual-f12020b82dd4bd1a.js} +1 -1
  153. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-a188f84239f4b2a8.js → multiple-a911b7990371704d.js} +1 -1
  154. fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-ee9df33ebd471099.js → add-systems-ad585b79953c2753.js} +1 -1
  155. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-4f9cf087fcee87e6.js → add-vendors-bb263d394ca1c8fa.js} +1 -1
  156. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-6907c368d8611c44.js +1 -0
  157. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-1b02a4991201b7e4.js → [id]-c32f381af358149b.js} +1 -1
  158. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-a5e738a234dadc7e.js → new-6efb3c069d8b47dd.js} +1 -1
  159. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-b08abefec298ccf1.js → privacy-experience-1975c529905eea9b.js} +1 -1
  160. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-8c164c4b8310214e.js → [id]-b05331178928ab52.js} +1 -1
  161. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-db789002d84c8829.js → new-516834e930bb0d0d.js} +1 -1
  162. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-985717f2565f9d9d.js +1 -0
  163. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-5cba30eba1e97e56.js → properties-2be773e08498e40c.js} +1 -1
  164. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-850afb74f4192e87.js +1 -0
  165. fides/ui-build/static/admin/_next/static/chunks/pages/{consent-614af0a2c2ba966c.js → consent-b63d1e395d879b86.js} +1 -1
  166. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-5b28f0f674ea87bd.js +1 -0
  167. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-676177e2f3c9c2a2.js +1 -0
  168. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-794906929efb8e1d.js +1 -0
  169. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-3ccbf7c0d06507b9.js +1 -0
  170. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources-81d1b50585468fb0.js +1 -0
  171. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-1ea0b24d306b1e67.js +1 -0
  172. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/datastore/[monitorId]-d4861a4a218bb65a.js +1 -0
  173. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/infrastructure/[monitorId]-66bd265044daf97d.js +1 -0
  174. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/infrastructure-c9c79fa8576a4f77.js +1 -0
  175. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]/[systemId]-60cacc3232c2eead.js +1 -0
  176. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]-437bd64a3016de36.js +1 -0
  177. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-8349248c2da970a6.js +1 -0
  178. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-6919a1d6cadaa46b.js +1 -0
  179. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-b072cf25aefc98f6.js → [resourceUrn]-1a50d421897d3da1.js} +1 -1
  180. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-fd3e8817d8e6dee4.js → detection-49509414a15e8393.js} +1 -1
  181. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-146624cf59792bf7.js → [resourceUrn]-1a1bb80b586d0c0f.js} +1 -1
  182. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-9695cc9c85592ec5.js → discovery-49de61df1e8e7fba.js} +1 -1
  183. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-c2719f5cff20c0f8.js +1 -0
  184. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-5f88280db168083e.js → [...subfieldNames]-415015aebab60436.js} +1 -1
  185. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-bfbcf19c28c794ae.js → [collectionName]-5accb09715b5122d.js} +1 -1
  186. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-aebecca1d8ec5f98.js +1 -0
  187. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-9551a82ddec9f909.js +1 -0
  188. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-72f8fe47beef0f09.js +1 -0
  189. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-3a8aa3f633528e88.js +1 -0
  190. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-87512616f35ec6da.js +1 -0
  191. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-2f1bf4eac7aa55fd.js +1 -0
  192. fides/ui-build/static/admin/_next/static/chunks/pages/{fides-js-docs-1f4335dca5c09860.js → fides-js-docs-5235760b3e508d7d.js} +1 -1
  193. fides/ui-build/static/admin/_next/static/chunks/pages/{index-1343fa525a206571.js → index-8d67cd2872cb682a.js} +1 -1
  194. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-7a631df29cd0e31a.js +1 -0
  195. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-ea3bc43cdaf273de.js +1 -0
  196. fides/ui-build/static/admin/_next/static/chunks/pages/new-privacy-requests-5d8632bba1b81cd4.js +1 -0
  197. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/{[id]-63b3be660fb12c0f.js → [id]-92e01822ecde8fb8.js} +1 -1
  198. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/{new-d3b577962dd33266.js → new-1256cf6d3f6794e0.js} +1 -1
  199. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests-0daac00911d27617.js +1 -0
  200. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/{[key]-720cde29f81db47f.js → [key]-2d976fe5e8ba0a3a.js} +1 -1
  201. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/{new-3668866076b53016.js → new-7766ba497b863740.js} +1 -1
  202. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers-f2880d2ed4734270.js +1 -0
  203. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/{[id]-8063dceb32310c85.js → [id]-669f585c3458faff.js} +1 -1
  204. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/{add-template-4931c70bee62232f.js → add-template-c79e7724e4bc3899.js} +1 -1
  205. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates-891654e8dc13965c.js +1 -0
  206. fides/ui-build/static/admin/_next/static/chunks/pages/{notifications-93af719dab3bd053.js → notifications-40c8148244c5d347.js} +1 -1
  207. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-1e86f3e28bd23ed6.js +1 -0
  208. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-9b7bd8c38f02c091.js +1 -0
  209. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-b18a53a940cf9e19.js +1 -0
  210. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-6d028d7450e77578.js +1 -0
  211. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-8399083ee2cd8cc2.js +1 -0
  212. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-0a910125cdb2b3b8.js +1 -0
  213. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-acc90b6f7fe915cb.js +1 -0
  214. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-bbc42026f2685438.js +1 -0
  215. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-fa82cffba448ccd8.js → configure-c08ca6ad21c99799.js} +1 -1
  216. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-77c2db582f8823bc.js +1 -0
  217. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-bc1c289647e52c48.js → [id]-74ccea4868408e3d.js} +1 -1
  218. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-cbfaa23d96f5ed0b.js → add-property-7d9f09bfe9d44dfc.js} +1 -1
  219. fides/ui-build/static/admin/_next/static/chunks/pages/{properties-a15a3fd0ed88f39c.js → properties-cd77bc30672bb1fa.js} +1 -1
  220. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-cc3bd9540132d5ed.js +1 -0
  221. fides/ui-build/static/admin/_next/static/chunks/pages/sandbox/privacy-notices-7ce7d720107ab4b5.js +1 -0
  222. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-19de0024418a4924.js → [purpose_id]-ae789892343c24f5.js} +1 -1
  223. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-13ee1b331ced0846.js +1 -0
  224. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/[id]-ee4e43692336a330.js +1 -0
  225. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/new-ca51d794abfcbf25.js +1 -0
  226. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-ecd1dc5db8e81409.js +1 -0
  227. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-3b87002753b23ca5.js → domain-records-df06f7e2f668c540.js} +1 -1
  228. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-aacd9d0ad47082d4.js → domains-da0c77bd510c6c51.js} +1 -1
  229. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-3cdd0b39901190ba.js → email-templates-950b0c115bf673d8.js} +1 -1
  230. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-61076eedbfd137b9.js → locations-7e36cb4756973a9d.js} +1 -1
  231. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-b07b11d6002f8c8c.js → organization-a0e5ed486d24ccf3.js} +1 -1
  232. fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-3cdebafb6870d3ad.js +1 -0
  233. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-b7c0d3b1b754e70f.js → regulations-159aad34f1021320.js} +1 -1
  234. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-dbd1a64090ad0946.js +1 -0
  235. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-59c89489fa32a4cb.js → [id]-7d042497a57a3788.js} +1 -1
  236. fides/ui-build/static/admin/_next/static/chunks/pages/systems-21f1172e73dfc9f0.js +1 -0
  237. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-e553161e6338ee48.js +1 -0
  238. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-7dce2916cc589c54.js → new-efc4af017723e57a.js} +1 -1
  239. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-5d5a68e555d18693.js → [id]-b152319d67372ee4.js} +1 -1
  240. fides/ui-build/static/admin/_next/static/chunks/pages/user-management-dba8692491f7935e.js +1 -0
  241. fides/ui-build/static/admin/_next/static/chunks/webpack-09ca52bc7beb0b43.js +1 -0
  242. fides/ui-build/static/admin/_next/static/css/3d66bb57ddcb0978.css +1 -0
  243. fides/ui-build/static/admin/_next/static/css/a1e4be9466578ef1.css +1 -0
  244. fides/ui-build/static/admin/_next/static/l2vgGUHB04Fi4oEVlVMrc/_buildManifest.js +1 -0
  245. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  246. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  247. fides/ui-build/static/admin/add-systems.html +1 -1
  248. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  249. fides/ui-build/static/admin/consent/configure.html +1 -1
  250. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  251. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  252. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  253. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  254. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  255. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  256. fides/ui-build/static/admin/consent/properties.html +1 -1
  257. fides/ui-build/static/admin/consent/reporting.html +1 -1
  258. fides/ui-build/static/admin/consent.html +1 -1
  259. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  260. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  261. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  262. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  263. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  264. fides/ui-build/static/admin/data-catalog.html +1 -1
  265. fides/ui-build/static/admin/data-discovery/action-center/datastore/[monitorId].html +1 -1
  266. fides/ui-build/static/admin/data-discovery/action-center/datastore.html +1 -1
  267. fides/ui-build/static/admin/data-discovery/action-center/infrastructure/[monitorId].html +1 -0
  268. fides/ui-build/static/admin/data-discovery/action-center/infrastructure.html +1 -0
  269. fides/ui-build/static/admin/data-discovery/action-center/website/[monitorId]/[systemId].html +1 -1
  270. fides/ui-build/static/admin/data-discovery/action-center/website/[monitorId].html +1 -1
  271. fides/ui-build/static/admin/data-discovery/action-center/website.html +1 -1
  272. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  273. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  274. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  275. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  276. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  277. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  278. fides/ui-build/static/admin/datamap.html +1 -1
  279. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  280. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  281. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  282. fides/ui-build/static/admin/dataset/new.html +1 -1
  283. fides/ui-build/static/admin/dataset.html +1 -1
  284. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  285. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  286. fides/ui-build/static/admin/datastore-connection.html +1 -1
  287. fides/ui-build/static/admin/index.html +1 -1
  288. fides/ui-build/static/admin/integrations/[id].html +1 -1
  289. fides/ui-build/static/admin/integrations.html +1 -1
  290. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  291. fides/ui-build/static/admin/lib/fides-headless.js +1 -1
  292. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  293. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  294. fides/ui-build/static/admin/lib/fides.js +2 -2
  295. fides/ui-build/static/admin/login/[provider].html +1 -1
  296. fides/ui-build/static/admin/login.html +1 -1
  297. fides/ui-build/static/admin/new-privacy-requests.html +1 -1
  298. fides/ui-build/static/admin/notifications/digests/[id].html +1 -1
  299. fides/ui-build/static/admin/notifications/digests/new.html +1 -1
  300. fides/ui-build/static/admin/notifications/digests.html +1 -1
  301. fides/ui-build/static/admin/notifications/providers/[key].html +1 -1
  302. fides/ui-build/static/admin/notifications/providers/new.html +1 -1
  303. fides/ui-build/static/admin/notifications/providers.html +1 -1
  304. fides/ui-build/static/admin/notifications/templates/[id].html +1 -1
  305. fides/ui-build/static/admin/notifications/templates/add-template.html +1 -1
  306. fides/ui-build/static/admin/notifications/templates.html +1 -1
  307. fides/ui-build/static/admin/notifications.html +1 -1
  308. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  309. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  310. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  311. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  312. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  313. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  314. fides/ui-build/static/admin/poc/forms.html +1 -1
  315. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  316. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  317. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  318. fides/ui-build/static/admin/privacy-requests.html +1 -1
  319. fides/ui-build/static/admin/properties/[id].html +1 -1
  320. fides/ui-build/static/admin/properties/add-property.html +1 -1
  321. fides/ui-build/static/admin/properties.html +1 -1
  322. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  323. fides/ui-build/static/admin/sandbox/privacy-notices.html +1 -1
  324. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  325. fides/ui-build/static/admin/settings/about.html +1 -1
  326. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  327. fides/ui-build/static/admin/settings/consent.html +1 -1
  328. fides/ui-build/static/admin/settings/custom-fields/[id].html +1 -1
  329. fides/ui-build/static/admin/settings/custom-fields/new.html +1 -1
  330. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  331. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  332. fides/ui-build/static/admin/settings/domains.html +1 -1
  333. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  334. fides/ui-build/static/admin/settings/locations.html +1 -1
  335. fides/ui-build/static/admin/settings/organization.html +1 -1
  336. fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
  337. fides/ui-build/static/admin/settings/regulations.html +1 -1
  338. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  339. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  340. fides/ui-build/static/admin/systems.html +1 -1
  341. fides/ui-build/static/admin/taxonomy.html +1 -1
  342. fides/ui-build/static/admin/user-management/new.html +1 -1
  343. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  344. fides/ui-build/static/admin/user-management.html +1 -1
  345. fides/api/service/privacy_request/dsr_package/templates/welcome.html +0 -66
  346. fides/ui-build/static/admin/_next/static/chunks/1099-31f9d973bc287df8.js +0 -1
  347. fides/ui-build/static/admin/_next/static/chunks/1316-2606e19807c08aa5.js +0 -1
  348. fides/ui-build/static/admin/_next/static/chunks/1437-8b1f6c8797c68bfd.js +0 -1
  349. fides/ui-build/static/admin/_next/static/chunks/1467-8808ec8836e033f9.js +0 -1
  350. fides/ui-build/static/admin/_next/static/chunks/155-f6302d32cba4cab6.js +0 -1
  351. fides/ui-build/static/admin/_next/static/chunks/1817-2d5cf537a2992c79.js +0 -1
  352. fides/ui-build/static/admin/_next/static/chunks/2121.1de2fa060eae34aa.js +0 -1
  353. fides/ui-build/static/admin/_next/static/chunks/2921-34a43f2f8f5e5e69.js +0 -1
  354. fides/ui-build/static/admin/_next/static/chunks/2962-342ad1b4ab402ded.js +0 -1
  355. fides/ui-build/static/admin/_next/static/chunks/3377-988ac2f3a2e8d5d4.js +0 -1
  356. fides/ui-build/static/admin/_next/static/chunks/3446-f40c352c43ac950c.js +0 -1
  357. fides/ui-build/static/admin/_next/static/chunks/346-aa3b88efb85f2e28.js +0 -1
  358. fides/ui-build/static/admin/_next/static/chunks/3696-6f90e41a53d22920.js +0 -1
  359. fides/ui-build/static/admin/_next/static/chunks/3700-f695f2f6b8251971.js +0 -1
  360. fides/ui-build/static/admin/_next/static/chunks/3772-9f1713f9d5f97a10.js +0 -1
  361. fides/ui-build/static/admin/_next/static/chunks/3873-d18e47b327445db5.js +0 -1
  362. fides/ui-build/static/admin/_next/static/chunks/3923-f0a85dc5c3684fa0.js +0 -1
  363. fides/ui-build/static/admin/_next/static/chunks/4496-4ff19366c597ec16.js +0 -1
  364. fides/ui-build/static/admin/_next/static/chunks/4817-1f3e6ea38625d8d5.js +0 -1
  365. fides/ui-build/static/admin/_next/static/chunks/5163-e682273cd76a7d07.js +0 -1
  366. fides/ui-build/static/admin/_next/static/chunks/5258-62d6bc19add60aa6.js +0 -1
  367. fides/ui-build/static/admin/_next/static/chunks/5279-bd6cccabdd6ca447.js +0 -1
  368. fides/ui-build/static/admin/_next/static/chunks/549-28537a6de666944b.js +0 -1
  369. fides/ui-build/static/admin/_next/static/chunks/5619-9b50cec521203989.js +0 -1
  370. fides/ui-build/static/admin/_next/static/chunks/5643-3459282d296a3c59.js +0 -1
  371. fides/ui-build/static/admin/_next/static/chunks/6277-3759894435cb8569.js +0 -1
  372. fides/ui-build/static/admin/_next/static/chunks/6315-e2fb5ea77179a871.js +0 -1
  373. fides/ui-build/static/admin/_next/static/chunks/6344-ca66a6e10d128179.js +0 -1
  374. fides/ui-build/static/admin/_next/static/chunks/6419-11d67f7fd4e2f247.js +0 -1
  375. fides/ui-build/static/admin/_next/static/chunks/6954-84789a4e4fb04eb9.js +0 -1
  376. fides/ui-build/static/admin/_next/static/chunks/699-8ca44b0de9fa20f0.js +0 -1
  377. fides/ui-build/static/admin/_next/static/chunks/7059-2bb7c38578549703.js +0 -1
  378. fides/ui-build/static/admin/_next/static/chunks/7202.3febe9e89640c712.js +0 -1
  379. fides/ui-build/static/admin/_next/static/chunks/7476-a02d970ea4d3f7d0.js +0 -1
  380. fides/ui-build/static/admin/_next/static/chunks/7488-cf92601852e3c509.js +0 -1
  381. fides/ui-build/static/admin/_next/static/chunks/7630-a11610c2b31ab2ca.js +0 -1
  382. fides/ui-build/static/admin/_next/static/chunks/7773-9ae233109bc64ec2.js +0 -1
  383. fides/ui-build/static/admin/_next/static/chunks/796-e36d610066135f8c.js +0 -1
  384. fides/ui-build/static/admin/_next/static/chunks/8011-75af8b480fa114e6.js +0 -1
  385. fides/ui-build/static/admin/_next/static/chunks/8373-22b4d20e8cc06b3a.js +0 -1
  386. fides/ui-build/static/admin/_next/static/chunks/8765-f622a35b40a7ec63.js +0 -1
  387. fides/ui-build/static/admin/_next/static/chunks/9037-453224ba3ee65b13.js +0 -1
  388. fides/ui-build/static/admin/_next/static/chunks/9046-d9c6498368b993d1.js +0 -1
  389. fides/ui-build/static/admin/_next/static/chunks/9187-7438242f0d380bb0.js +0 -1
  390. fides/ui-build/static/admin/_next/static/chunks/9278-08cc704317fe535e.js +0 -1
  391. fides/ui-build/static/admin/_next/static/chunks/9330-f753636a31c4ea04.js +0 -1
  392. fides/ui-build/static/admin/_next/static/chunks/9682-d1a3afa1394f8304.js +0 -1
  393. fides/ui-build/static/admin/_next/static/chunks/9729-fcf6ff4e3534e4a8.js +0 -1
  394. fides/ui-build/static/admin/_next/static/chunks/9899-d6437facac926264.js +0 -1
  395. fides/ui-build/static/admin/_next/static/chunks/9965-25621dd507e0cfd6.js +0 -1
  396. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-9af75caefc74eaca.js +0 -1
  397. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-6528eb24165aceb6.js +0 -1
  398. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-11f1683aa15e1a62.js +0 -1
  399. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-32bd7a7c990e5bf6.js +0 -1
  400. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-d60761c20382b259.js +0 -1
  401. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-07e7d38ce34e1e6c.js +0 -1
  402. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-b07a0707f8c2ec0d.js +0 -1
  403. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources-aed94957009eb3fd.js +0 -1
  404. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-127c114dd8f102ed.js +0 -1
  405. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/datastore/[monitorId]-5aa7a9fa96160de8.js +0 -1
  406. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]/[systemId]-899bf30dde8b3292.js +0 -1
  407. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]-73085f50abb775c0.js +0 -1
  408. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-823d0dd77e66585b.js +0 -1
  409. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-24a82e07a0008516.js +0 -1
  410. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-3b100c44ea9e3988.js +0 -1
  411. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-6fbe2b584a509226.js +0 -1
  412. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-3d1e48f4b95d7f6b.js +0 -1
  413. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-d3c6ecf7f29bea6e.js +0 -1
  414. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-0a4aa42be2da0255.js +0 -1
  415. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-14313e441a13192c.js +0 -1
  416. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-f139d1ce26404f30.js +0 -1
  417. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-b2d3d28b10a758e6.js +0 -1
  418. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-a733e5d7c3ce9bb8.js +0 -1
  419. fides/ui-build/static/admin/_next/static/chunks/pages/new-privacy-requests-df0c95e408c54c7e.js +0 -1
  420. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests-aed9afd988a48acf.js +0 -1
  421. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers-36a0ac36062abd02.js +0 -1
  422. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates-a14c876b49422597.js +0 -1
  423. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-9cfb469de7b4aeab.js +0 -1
  424. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-e715cc654fb6a5cd.js +0 -1
  425. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-72ae299bcb6adae6.js +0 -1
  426. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-2337f8c81a766eb0.js +0 -1
  427. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-0af454f55494f6fa.js +0 -1
  428. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-d1b90ffa996fbd89.js +0 -1
  429. fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-19724b9e0581b96d.js +0 -1
  430. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-cdd3754289a28317.js +0 -1
  431. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-cc41ae605f2b55ae.js +0 -1
  432. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-6e4c535b6d614596.js +0 -1
  433. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-632b3ee563d070f2.js +0 -1
  434. fides/ui-build/static/admin/_next/static/chunks/pages/sandbox/privacy-notices-afe921f6e2a526fb.js +0 -1
  435. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-5b6807dced8d03c5.js +0 -1
  436. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/[id]-8634aae3259def37.js +0 -1
  437. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/new-2d9dcca17965dc57.js +0 -1
  438. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-7dce52bfc1b2652c.js +0 -1
  439. fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-084a2b4431d35322.js +0 -1
  440. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-b72d36243a0a545c.js +0 -1
  441. fides/ui-build/static/admin/_next/static/chunks/pages/systems-cfaa37a0df83674b.js +0 -1
  442. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-56a5434969cbe9ba.js +0 -1
  443. fides/ui-build/static/admin/_next/static/chunks/pages/user-management-e6a211d8a0401086.js +0 -1
  444. fides/ui-build/static/admin/_next/static/chunks/webpack-c2c11809187b9f84.js +0 -1
  445. fides/ui-build/static/admin/_next/static/css/d41a048a166d50e4.css +0 -1
  446. fides/ui-build/static/admin/_next/static/css/d78390d6134d8328.css +0 -1
  447. fides/ui-build/static/admin/_next/static/wCNFtmYQhEDMaMPeBB4BM/_buildManifest.js +0 -1
  448. fides/ui-build/static/admin/poc/table-migration.html +0 -1
  449. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/WHEEL +0 -0
  450. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/entry_points.txt +0 -0
  451. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/licenses/LICENSE +0 -0
  452. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/top_level.txt +0 -0
  453. /fides/ui-build/static/admin/_next/static/{wCNFtmYQhEDMaMPeBB4BM → l2vgGUHB04Fi4oEVlVMrc}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- class Qt{eventName;listenerId;data;pingData;constructor(e,t,s,i){this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}class Pt{gppVersion;cmpStatus;cmpDisplayStatus;signalStatus;supportedAPIs;cmpId;sectionList;applicableSections;gppString;parsedSections;constructor(e){this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}let it=class{callback;parameter;success=!0;cmpApiContext;constructor(e,t,s){this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:s})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},_n=class extends it{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new Qt("listenerRegistered",e,!0,new Pt(this.cmpApiContext));this.invokeCallback(t)}},hn=class extends it{respond(){let e=new Pt(this.cmpApiContext);this.invokeCallback(e)}};class pn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],s=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,s);this.invokeCallback(i)}}class gn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class Tn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var ye;(function(n){n.ADD_EVENT_LISTENER="addEventListener",n.GET_FIELD="getField",n.GET_SECTION="getSection",n.HAS_SECTION="hasSection",n.PING="ping",n.REMOVE_EVENT_LISTENER="removeEventListener"})(ye||(ye={}));let In=class extends it{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new Qt("listenerRemoved",e,t,new Pt(this.cmpApiContext));this.invokeCallback(s)}},cs=class{static[ye.ADD_EVENT_LISTENER]=_n;static[ye.GET_FIELD]=pn;static[ye.GET_SECTION]=gn;static[ye.HAS_SECTION]=Tn;static[ye.PING]=hn;static[ye.REMOVE_EVENT_LISTENER]=In};var rt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(rt||(rt={}));var je;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(je||(je={}));var ds;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ds||(ds={}));var Me;(function(n){n.NOT_READY="not ready",n.READY="ready"})(Me||(Me={}));class On{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let s=ye.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=ye.REMOVE_EVENT_LISTENER,t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch{this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,s,i){if(typeof e!="string")t(null,!1);else{if(t&&typeof t!="function")throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,s):this.isBuiltInCommand(e)?new cs[e](this.cmpApiContext,t,s).execute():t&&t(null,!1)}}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(t=>{window.__gpp(...t)})}isCustomCommand(e){return this.customCommands&&typeof this.customCommands[e]=="function"}isBuiltInCommand(e){return cs[e]!==void 0}}let Nn=class{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let s=window.__gpp("events")||[];for(var t=0;t<s.length;t++){let i=s[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(s){console.log(s)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((s,i)=>{let r=new Qt(e,i,t,new Pt(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class Tt extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class ee{segments;encodedString=null;dirty=!1;decoded=!0;constructor(){this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.getFieldNames().includes(e))return s.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.hasField(e))return s.getFieldValue(e)}throw new Tt("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let s=0;s<this.segments.length;s++){let i=this.segments[s];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new Tt("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let h=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Oe=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class D{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new Oe("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length;i++)i===0?s[e.length-(i+1)]=1:s[e.length-(i+1)]=s[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}class At{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);encode(e){if(!/^[0-1]*$/.test(e))throw new Oe("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=D.decode(i),o=At.DICT.charAt(r);t+=o,s+=6}catch{throw new Oe("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new h("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=At.REVERSE_DICT.get(i),o=D.encode(r,6);t+=o}return t}}class F extends At{static instance=new F;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class A{static instance=new A;constructor(){}static getInstance(){return this.instance}encode(e,t){let s="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);s+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return s}decode(e,t,s){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(s.containsKey(o)){let a=s.get(o);try{let l=a.substring(e,i);a.decode(l),i+=l.length}catch(l){if(l.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new h("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class ot{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let s="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(s="1"+s,e-=r):s="0"+s}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new h("Undecodable FibonacciInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length-1;i++)i===0?s.push(1):i===1?s.push(2):s.push(s[i-1]+s[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}let at=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Oe("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new h("Undecodable Boolean '"+e+"'")}};class us{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=D.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+ot.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let l=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+ot.encode(a)+ot.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=D.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=at.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),u=ot.decode(e.substring(r,l+2))+i;i=u,r=l+2,l=e.indexOf("11",r);let E=ot.decode(e.substring(r,l+2))+i;i=E,r=l+2;for(let S=u;S<=E;S++)t.push(S)}else{let l=e.indexOf("11",r),u=ot.decode(e.substring(r,l+2))+i;i=u,t.push(u),r=l+2}}return t}}class fn extends Error{constructor(e){super(e),this.name="ValidationError"}}class ve{hardFailIfMissing;validator;value;constructor(e=!0){this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new fn("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class Ve extends h{constructor(e){super(e),this.name="SubstringError"}}class te{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new Ve("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class An extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return us.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=us.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i=e.indexOf("11",e.indexOf("11",i+1)+2)+2:i=e.indexOf("11",i+1)+2;return te.substring(e,t,i)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class c extends ve{bitStringLength;constructor(e,t,s=!0){super(s),this.bitStringLength=e,this.setValue(t)}encode(){try{return D.encode(this.value,this.bitStringLength)}catch(e){throw new Oe(e)}}decode(e){try{this.value=D.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.bitStringLength)}catch(s){throw new Ve(s)}}}class w{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var He;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(He||(He={}));const Cn=[He.ID,He.VERSION,He.SECTION_IDS];class C{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new Tt("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new Tt(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Pn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Cn}initializeFields(){let e=new w;return e.put(He.ID.toString(),new c(6,Le.ID)),e.put(He.VERSION.toString(),new c(6,Le.VERSION)),e.put(He.SECTION_IDS.toString(),new An([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Le extends ee{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Le.ID}getName(){return Le.NAME}getVersion(){return Le.VERSION}initializeSegments(){let e=[];return e.push(new Pn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var p;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.POLICY_VERSION="PolicyVersion",n.IS_SERVICE_SPECIFIC="IsServiceSpecific",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",n.PURPOSE_CONSENTS="PurposeConsents",n.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",n.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",n.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",n.VENDOR_CONSENTS="VendorConsents",n.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",n.PUBLISHER_RESTRICTIONS="PublisherRestrictions",n.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",n.PUBLISHER_CONSENTS="PublisherConsents",n.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",n.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",n.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",n.VENDORS_ALLOWED="VendorsAllowed",n.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",n.VENDORS_DISCLOSED="VendorsDisclosed"})(p||(p={}));const wn=[p.VERSION,p.CREATED,p.LAST_UPDATED,p.CMP_ID,p.CMP_VERSION,p.CONSENT_SCREEN,p.CONSENT_LANGUAGE,p.VENDOR_LIST_VERSION,p.POLICY_VERSION,p.IS_SERVICE_SPECIFIC,p.USE_NON_STANDARD_STACKS,p.SPECIAL_FEATURE_OPTINS,p.PURPOSE_CONSENTS,p.PURPOSE_LEGITIMATE_INTERESTS,p.PURPOSE_ONE_TREATMENT,p.PUBLISHER_COUNTRY_CODE,p.VENDOR_CONSENTS,p.VENDOR_LEGITIMATE_INTERESTS,p.PUBLISHER_RESTRICTIONS],Dn=[p.PUBLISHER_PURPOSES_SEGMENT_TYPE,p.PUBLISHER_CONSENTS,p.PUBLISHER_LEGITIMATE_INTERESTS,p.NUM_CUSTOM_PURPOSES,p.PUBLISHER_CUSTOM_CONSENTS,p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],mn=[p.VENDORS_ALLOWED_SEGMENT_TYPE,p.VENDORS_ALLOWED],Vn=[p.VENDORS_DISCLOSED_SEGMENT_TYPE,p.VENDORS_DISCLOSED];class nt extends At{static instance=new nt;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class lt{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=D.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+D.encode(t[r][0],16):i+="1"+D.encode(t[r][0],16)+D.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=D.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=at.decode(e.substring(i,i+1));if(i++,o===!0){let a=D.decode(e.substring(i,i+16));i+=16;let l=D.decode(e.substring(i,i+16));i+=16;for(let u=a;u<=l;u++)t.push(u)}else{let a=D.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Xt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return lt.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=lt.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return te.substring(e,t,i)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Rn{key;type;ids;constructor(e,t,s){this.key=e,this.type=t,this.ids=s}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}class Es extends ve{keyBitStringLength;typeBitStringLength;constructor(e,t,s,i=!0){super(i),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=D.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=D.encode(i.getKey(),this.keyBitStringLength),t+=D.encode(i.getType(),this.typeBitStringLength),t+=lt.encode(i.getIds())}return t}catch(e){throw new Oe(e)}}decode(e){try{let t=[],s=D.decode(te.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=D.decode(te.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=D.decode(te.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Xt([]).substring(e,i),u=lt.decode(l);i+=l.length,t.push(new Rn(o,a,u))}this.value=t}catch(t){throw new h(t)}}substring(e,t){try{let s="";s+=te.substring(e,t,t+12);let i=D.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=te.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let l=te.substring(e,r,r+this.typeBitStringLength);r+=l.length,s+=l;let u=new Xt([]).substring(e,r);r+=u.length,s+=u}return s}catch(s){throw new Ve(s)}}}class z extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+1)}catch(s){throw new Ve(s)}}}class Ss{static encode(e){return e?D.encode(Math.round(e.getTime()/100),36):D.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new h("Undecodable Datetime '"+e+"'");return new Date(D.decode(e)*100)}}class wt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Ss.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=Ss.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+36)}catch(s){throw new Ve(s)}}}class ct{static encode(e,t){if(e.length>t)throw new Oe("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=at.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(at.decode(e.substring(s,s+1)));return t}}class Ue extends ve{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new Oe(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.numElements)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class _s{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=D.encode(63,6);else if(r>=65)s+=D.encode(e.charCodeAt(i)-65,6);else throw new Oe("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new h("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=D.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class qt extends ve{stringLength;constructor(e,t,s=!0){super(s),this.stringLength=e,this.setValue(t)}encode(){try{return _s.encode(this.value,this.stringLength)}catch(e){throw new Oe(e)}}decode(e){try{this.value=_s.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.stringLength*6)}catch(s){throw new Ve(s)}}}class Ze extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=lt.encode(this.value),s=t.length,i=e;if(s<=i)return D.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return D.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new Oe(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=lt.decode(e.substring(17));else{let t=[],s=ct.decode(e.substring(17));for(let i=0;i<s.length;i++)s[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+16));return e.charAt(t+16)==="1"?te.substring(e,t,t+17)+new Xt([]).substring(e,t+17):te.substring(e,t,t+17+s)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Mn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}initializeFields(){let e=new Date,t=new w;return t.put(p.VERSION.toString(),new c(6,j.VERSION)),t.put(p.CREATED.toString(),new wt(e)),t.put(p.LAST_UPDATED.toString(),new wt(e)),t.put(p.CMP_ID.toString(),new c(12,0)),t.put(p.CMP_VERSION.toString(),new c(12,0)),t.put(p.CONSENT_SCREEN.toString(),new c(6,0)),t.put(p.CONSENT_LANGUAGE.toString(),new qt(2,"EN")),t.put(p.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(p.POLICY_VERSION.toString(),new c(6,2)),t.put(p.IS_SERVICE_SPECIFIC.toString(),new z(!1)),t.put(p.USE_NON_STANDARD_STACKS.toString(),new z(!1)),t.put(p.SPECIAL_FEATURE_OPTINS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_CONSENTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_ONE_TREATMENT.toString(),new z(!1)),t.put(p.PUBLISHER_COUNTRY_CODE.toString(),new qt(2,"AA")),t.put(p.VENDOR_CONSENTS.toString(),new Ze([])),t.put(p.VENDOR_LEGITIMATE_INTERESTS.toString(),new Ze([])),t.put(p.PUBLISHER_RESTRICTIONS.toString(),new Es(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class Dt extends ve{getLength;constructor(e,t,s=!0){super(s),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new Oe(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.getLength())}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),s=[...e];for(let i=s.length;i<t;i++)s.push(!1);s.length>t&&(s=s.slice(0,t)),super.setValue([...s])}}class vn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Dn}initializeFields(){let e=new w;e.put(p.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(p.PUBLISHER_CONSENTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(p.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(p.NUM_CUSTOM_PURPOSES.toString(),t),e.put(p.PUBLISHER_CUSTOM_CONSENTS.toString(),new Dt(()=>t.getValue(),[])),e.put(p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new Dt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class bn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mn}initializeFields(){let e=new w;return e.put(p.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(p.VENDORS_ALLOWED.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Ln extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vn}initializeFields(){let e=new w;return e.put(p.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(p.VENDORS_DISCLOSED.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class j extends ee{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return j.ID}getName(){return j.NAME}getVersion(){return j.VERSION}initializeSegments(){let e=[];return e.push(new Mn),e.push(new vn),e.push(new bn),e.push(new Ln),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[3].decode(s[i]);else if(o>="Q"&&o<="X")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(p.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode()))),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==p.CREATED&&e!==p.LAST_UPDATED){let s=new Date;super.setFieldValue(p.CREATED,s),super.setFieldValue(p.LAST_UPDATED,s)}}}var I;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(I||(I={}));const Gn=[I.VERSION,I.CREATED,I.LAST_UPDATED,I.CMP_ID,I.CMP_VERSION,I.CONSENT_SCREEN,I.CONSENT_LANGUAGE,I.VENDOR_LIST_VERSION,I.TCF_POLICY_VERSION,I.USE_NON_STANDARD_STACKS,I.SPECIAL_FEATURE_EXPRESS_CONSENT,I.PURPOSES_EXPRESS_CONSENT,I.PURPOSES_IMPLIED_CONSENT,I.VENDOR_EXPRESS_CONSENT,I.VENDOR_IMPLIED_CONSENT,I.PUB_RESTRICTIONS],yn=[I.PUB_PURPOSES_SEGMENT_TYPE,I.PUB_PURPOSES_EXPRESS_CONSENT,I.PUB_PURPOSES_IMPLIED_CONSENT,I.NUM_CUSTOM_PURPOSES,I.CUSTOM_PURPOSES_EXPRESS_CONSENT,I.CUSTOM_PURPOSES_IMPLIED_CONSENT],Un=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class Fn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}initializeFields(){let e=new Date,t=new w;return t.put(I.VERSION.toString(),new c(6,Ce.VERSION)),t.put(I.CREATED.toString(),new wt(e)),t.put(I.LAST_UPDATED.toString(),new wt(e)),t.put(I.CMP_ID.toString(),new c(12,0)),t.put(I.CMP_VERSION.toString(),new c(12,0)),t.put(I.CONSENT_SCREEN.toString(),new c(6,0)),t.put(I.CONSENT_LANGUAGE.toString(),new qt(2,"EN")),t.put(I.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(I.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(I.USE_NON_STANDARD_STACKS.toString(),new z(!1)),t.put(I.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_IMPLIED_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.VENDOR_EXPRESS_CONSENT.toString(),new Ze([])),t.put(I.VENDOR_IMPLIED_CONSENT.toString(),new Ze([])),t.put(I.PUB_RESTRICTIONS.toString(),new Es(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class xn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new w;e.put(I.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(I.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(I.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(I.NUM_CUSTOM_PURPOSES.toString(),t),e.put(I.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new Dt(()=>t.getValue(),[])),e.put(I.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new Dt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Bn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Un}initializeFields(){let e=new w;return e.put(I.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(I.DISCLOSED_VENDORS.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ce extends ee{static ID=5;static VERSION=1;static NAME="tcfcav1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ce.ID}getName(){return Ce.NAME}getVersion(){return Ce.VERSION}initializeSegments(){let e=[];return e.push(new Fn),e.push(new xn),e.push(new Bn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(I.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==I.CREATED&&e!==I.LAST_UPDATED){let s=new Date;super.setFieldValue(I.CREATED,s),super.setFieldValue(I.LAST_UPDATED,s)}}}class Jt{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class Hn{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}class $n{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var Ne;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(Ne||(Ne={}));const Kn=[Ne.VERSION,Ne.NOTICE,Ne.OPT_OUT_SALE,Ne.LSPA_COVERED];class zn extends C{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Kn}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new $n;return t.put(Ne.VERSION,new Hn(Pe.VERSION)),t.put(Ne.NOTICE,new Jt("-",e)),t.put(Ne.OPT_OUT_SALE,new Jt("-",e)),t.put(Ne.LSPA_COVERED,new Jt("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Ne.VERSION).getValue(),t+=e.get(Ne.NOTICE).getValue(),t+=e.get(Ne.OPT_OUT_SALE).getValue(),t+=e.get(Ne.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new h("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Ne.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Ne.NOTICE).setValue(e.charAt(1)),t.get(Ne.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Ne.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new h("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Pe extends ee{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pe.ID}getName(){return Pe.NAME}getVersion(){return Pe.VERSION}initializeSegments(){let e=[];return e.push(new zn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var N;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(N||(N={}));const kn=[N.VERSION,N.SHARING_NOTICE,N.SALE_OPT_OUT_NOTICE,N.SHARING_OPT_OUT_NOTICE,N.TARGETED_ADVERTISING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_LIMIT_USE_NOTICE,N.SALE_OPT_OUT,N.SHARING_OPT_OUT,N.TARGETED_ADVERTISING_OPT_OUT,N.SENSITIVE_DATA_PROCESSING,N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,N.PERSONAL_DATA_CONSENTS,N.MSPA_COVERED_TRANSACTION,N.MSPA_OPT_OUT_OPTION_MODE,N.MSPA_SERVICE_PROVIDER_MODE],Yn=[N.GPC_SEGMENT_TYPE,N.GPC];class hs{static encode(e,t,s){if(e.length>s)throw new Oe("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=D.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new h("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new h("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(D.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}class Q extends ve{elementBitStringLength;numElements;constructor(e,t,s=!0){super(s),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return hs.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Oe(e)}}decode(e){try{this.value=hs.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return kn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(N.VERSION.toString(),new c(6,J.VERSION)),i.put(N.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(N.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(N.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(N.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(N.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);s.length==66&&(s=s.substring(0,48)+"00000000"+s.substring(48,52)+"00"+s.substring(52,62)),this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNatCoreSegment '"+e+"'")}}}class Wn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yn}initializeFields(){let e=new w;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(N.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNatGpcSegment '"+e+"'")}}}class J extends ee{static ID=7;static VERSION=1;static NAME="usnat";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return J.ID}getName(){return J.NAME}getVersion(){return J.VERSION}initializeSegments(){let e=[];return e.push(new jn),e.push(new Wn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(N.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var m;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(m||(m={}));const Qn=[m.VERSION,m.SALE_OPT_OUT_NOTICE,m.SHARING_OPT_OUT_NOTICE,m.SENSITIVE_DATA_LIMIT_USE_NOTICE,m.SALE_OPT_OUT,m.SHARING_OPT_OUT,m.SENSITIVE_DATA_PROCESSING,m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,m.PERSONAL_DATA_CONSENTS,m.MSPA_COVERED_TRANSACTION,m.MSPA_OPT_OUT_OPTION_MODE,m.MSPA_SERVICE_PROVIDER_MODE],Xn=[m.GPC_SEGMENT_TYPE,m.GPC];class qn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Qn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(m.VERSION.toString(),new c(6,ne.VERSION)),i.put(m.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0]).withValidator(s)),i.put(m.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(m.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCaCoreSegment '"+e+"'")}}}class Jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Xn}initializeFields(){let e=new w;return e.put(m.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(m.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(m.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCaGpcSegment '"+e+"'")}}}class ne extends ee{static ID=8;static VERSION=1;static NAME="usca";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ne.ID}getName(){return ne.NAME}getVersion(){return ne.VERSION}initializeSegments(){let e=[];return e.push(new qn),e.push(new Jn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(m.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var q;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(q||(q={}));const Zn=[q.VERSION,q.SHARING_NOTICE,q.SALE_OPT_OUT_NOTICE,q.TARGETED_ADVERTISING_OPT_OUT_NOTICE,q.SALE_OPT_OUT,q.TARGETED_ADVERTISING_OPT_OUT,q.SENSITIVE_DATA_PROCESSING,q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,q.MSPA_COVERED_TRANSACTION,q.MSPA_OPT_OUT_OPTION_MODE,q.MSPA_SERVICE_PROVIDER_MODE];class ei extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Zn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(q.VERSION.toString(),new c(6,pe.VERSION)),i.put(q.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(q.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(q.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(q.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(q.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(q.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsVaCoreSegment '"+e+"'")}}}class pe extends ee{static ID=9;static VERSION=1;static NAME="usva";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pe.ID}getName(){return pe.NAME}getVersion(){return pe.VERSION}initializeSegments(){let e=[];return e.push(new ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var x;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const ti=[x.VERSION,x.SHARING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],si=[x.GPC_SEGMENT_TYPE,x.GPC];class ni extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ti}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(x.VERSION.toString(),new c(6,ie.VERSION)),i.put(x.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCoCoreSegment '"+e+"'")}}}class ii extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return si}initializeFields(){let e=new w;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(x.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCoGpcSegment '"+e+"'")}}}class ie extends ee{static ID=10;static VERSION=1;static NAME="usco";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ie.ID}getName(){return ie.NAME}getVersion(){return ie.VERSION}initializeSegments(){let e=[];return e.push(new ni),e.push(new ii),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var k;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(k||(k={}));const ri=[k.VERSION,k.SHARING_NOTICE,k.SALE_OPT_OUT_NOTICE,k.TARGETED_ADVERTISING_OPT_OUT_NOTICE,k.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,k.SALE_OPT_OUT,k.TARGETED_ADVERTISING_OPT_OUT,k.SENSITIVE_DATA_PROCESSING,k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,k.MSPA_COVERED_TRANSACTION,k.MSPA_OPT_OUT_OPTION_MODE,k.MSPA_SERVICE_PROVIDER_MODE];class oi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ri}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(k.VERSION.toString(),new c(6,ge.VERSION)),i.put(k.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(k.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(k.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(k.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsUtCoreSegment '"+e+"'")}}}class ge extends ee{static ID=11;static VERSION=1;static NAME="usut";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ge.ID}getName(){return ge.NAME}getVersion(){return ge.VERSION}initializeSegments(){let e=[];return e.push(new oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var B;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(B||(B={}));const ai=[B.VERSION,B.SHARING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],li=[B.GPC_SEGMENT_TYPE,B.GPC];class ci extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ai}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(B.VERSION.toString(),new c(6,re.VERSION)),i.put(B.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCtCoreSegment '"+e+"'")}}}class di extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return li}initializeFields(){let e=new w;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(B.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCtGpcSegment '"+e+"'")}}}class re extends ee{static ID=12;static VERSION=1;static NAME="usct";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return re.ID}getName(){return re.NAME}getVersion(){return re.VERSION}initializeSegments(){let e=[];return e.push(new ci),e.push(new di),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(B.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var Y;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(Y||(Y={}));const ui=[Y.VERSION,Y.PROCESSING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.ADDITIONAL_DATA_PROCESSING_CONSENT,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];class Ei extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ui}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(Y.VERSION.toString(),new c(6,Te.VERSION)),i.put(Y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(Y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(Y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(Y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(Y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsFlCoreSegment '"+e+"'")}}}class Te extends ee{static ID=13;static VERSION=1;static NAME="usfl";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Te.ID}getName(){return Te.NAME}getVersion(){return Te.VERSION}initializeSegments(){let e=[];return e.push(new Ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var V;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(V||(V={}));const Si=[V.VERSION,V.SHARING_NOTICE,V.SALE_OPT_OUT_NOTICE,V.TARGETED_ADVERTISING_OPT_OUT_NOTICE,V.SALE_OPT_OUT,V.TARGETED_ADVERTISING_OPT_OUT,V.SENSITIVE_DATA_PROCESSING,V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,V.ADDITIONAL_DATA_PROCESSING_CONSENT,V.MSPA_COVERED_TRANSACTION,V.MSPA_OPT_OUT_OPTION_MODE,V.MSPA_SERVICE_PROVIDER_MODE],_i=[V.GPC_SEGMENT_TYPE,V.GPC];class hi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(V.VERSION.toString(),new c(6,oe.VERSION)),i.put(V.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(V.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(V.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsMtCoreSegment '"+e+"'")}}}class pi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return _i}initializeFields(){let e=new w;return e.put(V.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(V.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsMtGpcSegment '"+e+"'")}}}class oe extends ee{static ID=14;static VERSION=1;static NAME="usmt";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return oe.ID}getName(){return oe.NAME}getVersion(){return oe.VERSION}initializeSegments(){let e=[];return e.push(new hi),e.push(new pi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(V.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var R;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(R||(R={}));const gi=[R.VERSION,R.PROCESSING_NOTICE,R.SALE_OPT_OUT_NOTICE,R.TARGETED_ADVERTISING_OPT_OUT_NOTICE,R.SALE_OPT_OUT,R.TARGETED_ADVERTISING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.ADDITIONAL_DATA_PROCESSING_CONSENT,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],Ti=[R.GPC_SEGMENT_TYPE,R.GPC];class Ii extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(R.VERSION.toString(),new c(6,ae.VERSION)),i.put(R.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsOrCoreSegment '"+e+"'")}}}class Oi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ti}initializeFields(){let e=new w;return e.put(R.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(R.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsOrGpcSegment '"+e+"'")}}}class ae extends ee{static ID=15;static VERSION=1;static NAME="usor";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ae.ID}getName(){return ae.NAME}getVersion(){return ae.VERSION}initializeSegments(){let e=[];return e.push(new Ii),e.push(new Oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var M;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const Ni=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.ADDITIONAL_DATA_PROCESSING_CONSENT,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],fi=[M.GPC_SEGMENT_TYPE,M.GPC];class Ai extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ni}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(M.VERSION.toString(),new c(6,le.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ci extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return fi}initializeFields(){let e=new w;return e.put(M.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(M.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTxGpcSegment '"+e+"'")}}}class le extends ee{static ID=16;static VERSION=1;static NAME="ustx";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return le.ID}getName(){return le.NAME}getVersion(){return le.VERSION}initializeSegments(){let e=[];return e.push(new Ai),e.push(new Ci),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var v;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(v||(v={}));const Pi=[v.VERSION,v.PROCESSING_NOTICE,v.SALE_OPT_OUT_NOTICE,v.TARGETED_ADVERTISING_OPT_OUT_NOTICE,v.SALE_OPT_OUT,v.TARGETED_ADVERTISING_OPT_OUT,v.SENSITIVE_DATA_PROCESSING,v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,v.ADDITIONAL_DATA_PROCESSING_CONSENT,v.MSPA_COVERED_TRANSACTION,v.MSPA_OPT_OUT_OPTION_MODE,v.MSPA_SERVICE_PROVIDER_MODE],wi=[v.GPC_SEGMENT_TYPE,v.GPC];class Di extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(v.VERSION.toString(),new c(6,ce.VERSION)),i.put(v.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(v.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(v.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsDeCoreSegment '"+e+"'")}}}class mi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wi}initializeFields(){let e=new w;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(v.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsDeGpcSegment '"+e+"'")}}}class ce extends ee{static ID=17;static VERSION=1;static NAME="usde";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ce.ID}getName(){return ce.NAME}getVersion(){return ce.VERSION}initializeSegments(){let e=[];return e.push(new Di),e.push(new mi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(v.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var b;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(b||(b={}));const Vi=[b.VERSION,b.PROCESSING_NOTICE,b.SALE_OPT_OUT_NOTICE,b.TARGETED_ADVERTISING_OPT_OUT_NOTICE,b.SENSITIVE_DATA_OPT_OUT_NOTICE,b.SALE_OPT_OUT,b.TARGETED_ADVERTISING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],Ri=[b.GPC_SEGMENT_TYPE,b.GPC];class Mi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(b.VERSION.toString(),new c(6,de.VERSION)),i.put(b.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(b.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsIaCoreSegment '"+e+"'")}}}class vi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ri}initializeFields(){let e=new w;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(b.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsIaGpcSegment '"+e+"'")}}}class de extends ee{static ID=18;static VERSION=1;static NAME="usia";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return de.ID}getName(){return de.NAME}getVersion(){return de.VERSION}initializeSegments(){let e=[];return e.push(new Mi),e.push(new vi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(b.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var L;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(L||(L={}));const bi=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],Li=[L.GPC_SEGMENT_TYPE,L.GPC];class Gi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return bi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(L.VERSION.toString(),new c(6,ue.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNeCoreSegment '"+e+"'")}}}class yi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Li}initializeFields(){let e=new w;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(L.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNeGpcSegment '"+e+"'")}}}class ue extends ee{static ID=19;static VERSION=1;static NAME="usne";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ue.ID}getName(){return ue.NAME}getVersion(){return ue.VERSION}initializeSegments(){let e=[];return e.push(new Gi),e.push(new yi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var G;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(G||(G={}));const Ui=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.ADDITIONAL_DATA_PROCESSING_CONSENT,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Fi=[G.GPC_SEGMENT_TYPE,G.GPC];class xi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ui}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(G.VERSION.toString(),new c(6,Ee.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(G.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Bi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Fi}initializeFields(){let e=new w;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(G.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNhGpcSegment '"+e+"'")}}}class Ee extends ee{static ID=20;static VERSION=1;static NAME="usnh";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ee.ID}getName(){return Ee.NAME}getVersion(){return Ee.VERSION}initializeSegments(){let e=[];return e.push(new xi),e.push(new Bi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(G.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var y;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(y||(y={}));const Hi=[y.VERSION,y.PROCESSING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],$i=[y.GPC_SEGMENT_TYPE,y.GPC];class Ki extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(y.VERSION.toString(),new c(6,Se.VERSION)),i.put(y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNjCoreSegment '"+e+"'")}}}class zi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return $i}initializeFields(){let e=new w;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(y.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNjGpcSegment '"+e+"'")}}}class Se extends ee{static ID=21;static VERSION=1;static NAME="usnj";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Se.ID}getName(){return Se.NAME}getVersion(){return Se.VERSION}initializeSegments(){let e=[];return e.push(new Ki),e.push(new zi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(y.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var U;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(U||(U={}));const ki=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.ADDITIONAL_DATA_PROCESSING_CONSENT,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],Yi=[U.GPC_SEGMENT_TYPE,U.GPC];class ji extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ki}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(U.VERSION.toString(),new c(6,_e.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTnCoreSegment '"+e+"'")}}}class Wi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yi}initializeFields(){let e=new w;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(U.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTnGpcSegment '"+e+"'")}}}class _e extends ee{static ID=22;static VERSION=1;static NAME="ustn";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _e.ID}getName(){return _e.NAME}getVersion(){return _e.VERSION}initializeSegments(){let e=[];return e.push(new ji),e.push(new Wi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(U.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class se{static SECTION_ID_NAME_MAP=new Map([[j.ID,j.NAME],[Ce.ID,Ce.NAME],[Pe.ID,Pe.NAME],[J.ID,J.NAME],[ne.ID,ne.NAME],[pe.ID,pe.NAME],[ie.ID,ie.NAME],[ge.ID,ge.NAME],[re.ID,re.NAME],[Te.ID,Te.NAME],[oe.ID,oe.NAME],[ae.ID,ae.NAME],[le.ID,le.NAME],[ce.ID,ce.NAME],[de.ID,de.NAME],[ue.ID,ue.NAME],[Ee.ID,Ee.NAME],[Se.ID,Se.NAME],[_e.ID,_e.NAME]]);static SECTION_ORDER=[j.NAME,Ce.NAME,Pe.NAME,J.NAME,ne.NAME,pe.NAME,ie.NAME,ge.NAME,re.NAME,Te.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME,de.NAME,ue.NAME,Ee.NAME,Se.NAME,_e.NAME]}class ps{sections=new Map;encodedString=null;decoded=!0;dirty=!1;constructor(e){e&&this.decode(e)}setFieldValue(e,t,s){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===j.NAME?(i=new j,this.sections.set(j.NAME,i)):e===Pe.NAME?(i=new Pe,this.sections.set(Pe.NAME,i)):e===J.NAME?(i=new J,this.sections.set(J.NAME,i)):e===ne.NAME?(i=new ne,this.sections.set(ne.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===ge.NAME?(i=new ge,this.sections.set(ge.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===Te.NAME?(i=new Te,this.sections.set(Te.NAME,i)):e===oe.NAME?(i=new oe,this.sections.set(oe.NAME,i)):e===ae.NAME?(i=new ae,this.sections.set(ae.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===_e.NAME&&(i=new _e,this.sections.set(_e.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new Tt(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(se.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(se.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).hasField(t):!1}hasFieldBySectionId(e,t){return this.hasField(se.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(se.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(se.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new Le;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<se.SECTION_ORDER.length;t++){let s=se.SECTION_ORDER[t];if(this.sections.has(s)){let i=this.sections.get(s);e.push(i.getId())}}return e}encodeModel(e){let t=[],s=[];for(let r=0;r<se.SECTION_ORDER.length;r++){let o=se.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);a.setIsDirty(!0),t.push(a.encode()),s.push(a.getId())}}let i=new Le;return i.setFieldValue("SectionIds",s),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),s=new Map;if(t[0].startsWith("D")){let r=new Le(t[0]).getFieldValue("SectionIds");if(r.length!==t.length-1)throw new h("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let o=0;o<r.length;o++){if(t[o+1].trim()==="")throw new h("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Ce.ID){let l=new Ce(t[o+1]);s.set(Ce.NAME,l)}else if(r[o]===j.ID){let l=new j(t[o+1]);s.set(j.NAME,l)}else if(r[o]===Pe.ID){let l=new Pe(t[o+1]);s.set(Pe.NAME,l)}else if(r[o]===J.ID){let l=new J(t[o+1]);s.set(J.NAME,l)}else if(r[o]===ne.ID){let l=new ne(t[o+1]);s.set(ne.NAME,l)}else if(r[o]===pe.ID){let l=new pe(t[o+1]);s.set(pe.NAME,l)}else if(r[o]===ie.ID){let l=new ie(t[o+1]);s.set(ie.NAME,l)}else if(r[o]===ge.ID){let l=new ge(t[o+1]);s.set(ge.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);s.set(re.NAME,l)}else if(r[o]===Te.ID){let l=new Te(t[o+1]);s.set(Te.NAME,l)}else if(r[o]===oe.ID){let l=new oe(t[o+1]);s.set(oe.NAME,l)}else if(r[o]===ae.ID){let l=new ae(t[o+1]);s.set(ae.NAME,l)}else if(r[o]===le.ID){let l=new le(t[o+1]);s.set(le.NAME,l)}else if(r[o]===ce.ID){let l=new ce(t[o+1]);s.set(ce.NAME,l)}else if(r[o]===de.ID){let l=new de(t[o+1]);s.set(de.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);s.set(ue.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);s.set(Ee.NAME,l)}else if(r[o]===Se.ID){let l=new Se(t[o+1]);s.set(Se.NAME,l)}else if(r[o]===_e.ID){let l=new _e(t[o+1]);s.set(_e.NAME,l)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new j(e);return t.set(j.NAME,s),new Le().setFieldValue(He.SECTION_IDS,[2]),t.set(Le.NAME,s),t}else throw new h("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(se.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let s=null;this.sections.has(e)?s=this.sections.get(e):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===j.NAME?(s=new j,this.sections.set(j.NAME,s)):e===Pe.NAME?(s=new Pe,this.sections.set(Pe.NAME,s)):e===J.NAME?(s=new J,this.sections.set(J.NAME,s)):e===ne.NAME?(s=new ne,this.sections.set(ne.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===ie.NAME?(s=new ie,this.sections.set(ie.NAME,s)):e===ge.NAME?(s=new ge,this.sections.set(ge.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===Te.NAME?(s=new Te,this.sections.set(Te.NAME,s)):e===oe.NAME?(s=new oe,this.sections.set(oe.NAME,s)):e===ae.NAME?(s=new ae,this.sections.set(ae.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===_e.NAME&&(s=new _e,this.sections.set(_e.NAME,s)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(se.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e={};for(let t=0;t<se.SECTION_ORDER.length;t++){let s=se.SECTION_ORDER[t];this.sections.has(s)&&(e[s]=this.sections.get(s).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Qi{gppVersion="1.1";supportedAPIs=[];eventQueue=new Nn(this);cmpStatus=rt.LOADING;cmpDisplayStatus=je.HIDDEN;signalStatus=Me.NOT_READY;applicableSections=[];gppModel=new ps;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=rt.LOADING,this.cmpDisplayStatus=je.HIDDEN,this.signalStatus=Me.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new ps,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class Zt{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},u=()=>{o(new Error("error"))},E=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",u),a.addEventListener("abort",E),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}let mt=class extends Error{constructor(e){super(e),this.name="GVLError"}},Xi=class Yt{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH"]);has(e){return Yt.langSet.has(e)}forEach(e){Yt.langSet.forEach(e)}get size(){return Yt.langSet.size}},gs=class jt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Xi;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=jt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new jt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new mt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new mt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new jt;if(s.baseUrl=t,e.languageFilename?s.languageFilename=e.languageFilename:s.languageFilename="purposes-[LANG].json",e.version>0){let i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");let r=t+i.replace("[VERSION]",String(e.version));s.populate(await Zt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(await Zt.fetch(r))}return s}async changeLanguage(e){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const s=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(await Zt.fetch(s))}catch(i){throw new mt("unable to load language: "+i.message)}}}else throw new mt(`unsupported language ${e}`)}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};class qi{callResponder;cmpApiContext;constructor(e,t,s){this.cmpApiContext=new Qi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new On(this.cmpApiContext,s)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(se.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(se.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(se.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(se.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(se.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(se.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(se.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return gs.fromVendorList(e)}async getGvlFromUrl(e){return gs.fromUrl(e)}}const Ji=()=>{var n,e,t,s,i,r;if((n=window.Fides)!=null&&n.options.tcfEnabled&&!((e=window.Fides)!=null&&e.options.gppEnabled)&&!((i=(s=(t=window.Fides)==null?void 0:t.experience)==null?void 0:s.privacy_notices)!=null&&i.length))return!1;if(typeof((r=window.navigator)==null?void 0:r.globalPrivacyControl)=="boolean")return window.navigator.globalPrivacyControl;const a=new URL(window.location.href).searchParams.get("globalPrivacyControl");if(a==="true")return!0;if(a==="false")return!1},es=()=>typeof window>"u"?{}:{globalPrivacyControl:Ji()},Zi="en";var er=Object.defineProperty,tr=(n,e,t)=>e in n?er(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ts=(n,e,t)=>tr(n,typeof e!="symbol"?e+"":e,t);class sr{constructor(e,t,s){ts(this,"consentPreference"),ts(this,"notice"),ts(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Ts;(n=>{(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFgdprApplies||(n.IABTCFgdprApplies={})),(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFPurposeOneTreatment||(n.IABTCFPurposeOneTreatment={})),(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFUseNonStandardTexts||(n.IABTCFUseNonStandardTexts={}))})(Ts||(Ts={}));var dt=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(dt||{}),De=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(De||{}),Vt=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(Vt||{}),ut=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(ut||{}),et=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))(et||{}),Et=(n=>(n.OVERLAY="overlay",n.BANNER_AND_MODAL="banner_and_modal",n.MODAL="modal",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.HEADLESS="headless",n))(Et||{}),Fe=(n=>(n.BUTTON="button",n.REJECT="reject",n.ACCEPT="accept",n.SCRIPT="script",n.SAVE="save",n.DISMISS="dismiss",n.GPC="gpc",n.INDIVIDUAL_NOTICE="individual_notice",n.ACKNOWLEDGE="acknowledge",n.EXTERNAL_PROVIDER="external_provider",n))(Fe||{});const nr=(n,e)=>!!Object.keys(e).includes(n.notice_key),ss=n=>!n||n===De.OPT_OUT?!1:n===De.OPT_IN?!0:n===De.ACKNOWLEDGE,Rt=(n,e)=>n?e===dt.NOTICE_ONLY?De.ACKNOWLEDGE:De.OPT_IN:De.OPT_OUT,ir=n=>typeof n=="string"?ss(n):n,rr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var or=Object.defineProperty,ar=Object.defineProperties,lr=Object.getOwnPropertyDescriptors,Is=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,Os=(n,e,t)=>e in n?or(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Mt=(n,e)=>{for(var t in e||(e={}))cr.call(e,t)&&Os(n,t,e[t]);if(Is)for(var t of Is(e))dr.call(e,t)&&Os(n,t,e[t]);return n},ur=(n,e)=>ar(n,lr(e));const St=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Ns=n=>!!(n&&n.every(e=>e.default_preference===De.OPT_IN)),Er=n=>{if(n){if(n.location&&rr.test(n.location))return n.location.replace("-","_").toLowerCase();if(n.country&&n.region)return`${n.country.toLowerCase()}_${n.region.toLowerCase()}`}},fs=n=>n.fidesConsentOverride===Fe.ACCEPT||n.fidesConsentOverride===Fe.REJECT,Sr=(n,e,t,s)=>{var i,r,o,a,l,u,E;return s?.fidesDisableBanner||!St(n)||s.fidesModalDisplay==="immediate"||((i=n.experience_config)==null?void 0:i.component)===Et.TCF_OVERLAY&&n.vendor_count===0?!1:((r=n.experience_config)==null?void 0:r.component)===Et.TCF_OVERLAY&&e?s&&fs(s)?!1:(o=n.meta)!=null&&o.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((a=n.experience_config)==null?void 0:a.component)===Et.MODAL||((l=n.experience_config)==null?void 0:l.component)===Et.HEADLESS||!((u=n?.privacy_notices)!=null&&u.length)?!1:t?s&&fs(s)?!1:e?.fides_meta.consentMethod===Fe.GPC?!0:!((E=n.privacy_notices)==null?void 0:E.every(d=>nr(d,t))):!0},_r=n=>{if(!n)return{};try{const e=atob(n),t=JSON.parse(e);return Object.fromEntries(Object.entries(t).map(([s,i])=>[s,!!i]))}catch(e){throw new Error("Failed to decode Notice Consent string:",{cause:e})}},hr=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=Vt.OMIT})=>{if(!e?.length)return n;const i=Mt({},n);return s===Vt.INCLUDE?e.forEach(r=>{i[r]=t===ut.CONSENT_MECHANISM?De.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},pr=({consent:n,flagType:e=ut.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==ut.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,ir(o)]));const i=Object.values(n).some(r=>typeof r=="boolean");if(i&&!t)throw new Error("Cannot transform boolean consent values to consent mechanisms without consent mechanisms map");return i?(Object.keys(n).forEach(r=>{const o=n[r];if(typeof o=="string")s[r]=o;else{const a=t[r];s[r]=Rt(o,a)}}),s):Mt({},n)},As=(n,e,t=[],s,i,r)=>{var o,a,l;const u=Mt({},n),E=(o=window.Fides)==null?void 0:o.options,S=(a=E?.fidesConsentNonApplicableFlagMode)!=null?a:Vt.OMIT,d=(l=E?.fidesConsentFlagType)!=null?l:ut.BOOLEAN,O={};Object.assign(O,hr({consent:{},nonApplicableNotices:e??[],flagType:d,mode:S}));const T=t.reduce(($,K)=>ur(Mt({},$),{[K.notice_key]:K.consent_mechanism}),{}),H={};return Object.entries(u).forEach(([$,K])=>{r?.includes($)&&!e?.includes($)||(H[$]=K)}),Object.assign(O,pr({consent:H,consentMechanisms:T,flagType:d})),O},gr=(n,e,t)=>new Proxy(n,{get(s,i){if(s[i.toString()]===void 0){const r=e.fidesConsentFlagType===ut.CONSENT_MECHANISM;return!t&&i.toString()==="essential"?r?dt.NOTICE_ONLY:!0:r?dt.OPT_OUT:!1}return s[i.toString()]}});var ns=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */vt.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof ns=="object"&&ns;(r.global===r||r.window===r)&&(t=r);var o=function(T){this.message=T};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(T){throw new o(T)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=/[\t\n\f\r ]/g,E=function(T){T=String(T).replace(u,"");var H=T.length;H%4==0&&(T=T.replace(/==?$/,""),H=T.length),(H%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var $=0,K,Z,W="",Re=-1;++Re<H;)Z=l.indexOf(T.charAt(Re)),K=$%4?K*64+Z:Z,$++%4&&(W+=String.fromCharCode(255&K>>(-2*$&6)));return W},S=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var H=T.length%3,$="",K=-1,Z,W,Re,Ie,pt=T.length-H;++K<pt;)Z=T.charCodeAt(K)<<16,W=T.charCodeAt(++K)<<8,Re=T.charCodeAt(++K),Ie=Z+W+Re,$+=l.charAt(Ie>>18&63)+l.charAt(Ie>>12&63)+l.charAt(Ie>>6&63)+l.charAt(Ie&63);return H==2?(Z=T.charCodeAt(K)<<8,W=T.charCodeAt(++K),Ie=Z+W,$+=l.charAt(Ie>>10)+l.charAt(Ie>>4&63)+l.charAt(Ie<<2&63)+"="):H==1&&(Ie=T.charCodeAt(K),$+=l.charAt(Ie>>2)+l.charAt(Ie<<4&63)+"=="),$},d={encode:S,decode:E,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=d;else for(var O in d)d.hasOwnProperty(O)&&(s[O]=d[O]);else t.base64=d})(ns)}(vt,vt.exports);var Cs=vt.exports;/*! js-cookie v3.0.5 | MIT */function bt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)n[s]=t[s]}return n}var Tr={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function is(n,e){function t(i,r,o){if(!(typeof document>"u")){o=bt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+n.write(r,i)+a}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var r=document.cookie?document.cookie.split("; "):[],o={},a=0;a<r.length;a++){var l=r[a].split("="),u=l.slice(1).join("=");try{var E=decodeURIComponent(l[0]);if(o[E]=n.read(u,E),i===E)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",bt({},r,{expires:-1}))},withAttributes:function(i){return is(this.converter,bt({},this.attributes,i))},withConverter:function(i){return is(bt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var Ir=is(Tr,{path:"/"});let Lt;const Or=new Uint8Array(16);function Nr(){if(!Lt&&(Lt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Lt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Lt(Or)}const Ae=[];for(let n=0;n<256;++n)Ae.push((n+256).toString(16).slice(1));function fr(n,e=0){return Ae[n[e+0]]+Ae[n[e+1]]+Ae[n[e+2]]+Ae[n[e+3]]+"-"+Ae[n[e+4]]+Ae[n[e+5]]+"-"+Ae[n[e+6]]+Ae[n[e+7]]+"-"+Ae[n[e+8]]+Ae[n[e+9]]+"-"+Ae[n[e+10]]+Ae[n[e+11]]+Ae[n[e+12]]+Ae[n[e+13]]+Ae[n[e+14]]+Ae[n[e+15]]}const Ar=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Ps={randomUUID:Ar};function ws(n,e,t){if(Ps.randomUUID&&!n)return Ps.randomUUID();n=n||{};const s=n.random||(n.rng||Nr)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,fr(s)}var rs=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(rs||{});const os=407,Gt=",",Cr=[{experienceKey:"tcf_purpose_consents",tcfModelKey:"purposeConsents",enabledIdsKey:"purposesConsent"},{experienceKey:"tcf_purpose_legitimate_interests",tcfModelKey:"purposeLegitimateInterests",enabledIdsKey:"purposesLegint"},{experienceKey:"tcf_special_features",tcfModelKey:"specialFeatureOptins",enabledIdsKey:"specialFeatures"},{experienceKey:"tcf_vendor_consents",tcfModelKey:"vendorConsents",enabledIdsKey:"vendorsConsent"},{experienceKey:"tcf_vendor_legitimate_interests",tcfModelKey:"vendorLegitimateInterests",enabledIdsKey:"vendorsLegint"}],Pr=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];Cr.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),rs.CONSENT.toString(),rs.LEGITIMATE_INTERESTS.toString();const wr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var Dr=Object.defineProperty,mr=Object.defineProperties,Vr=Object.getOwnPropertyDescriptors,Ds=Object.getOwnPropertySymbols,Rr=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable,ms=(n,e,t)=>e in n?Dr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,vr=(n,e)=>{for(var t in e||(e={}))Rr.call(e,t)&&ms(n,t,e[t]);if(Ds)for(var t of Ds(e))Mr.call(e,t)&&ms(n,t,e[t]);return n},br=(n,e)=>mr(n,Vr(e)),Lr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Vs="fides_consent",Gr=365,yt=Ir.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),yr=()=>ws();yr();const Ur=n=>yt.get(n),Fr=()=>{const n=Ur(Vs);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(Cs.decode(n))}catch{return}}},Rs=(n,e=!1)=>{if(typeof document>"u")return;const s=new Date().toISOString();n.fides_meta.updatedAt=s;let i=JSON.stringify(n);e&&(i=Cs.encode(i));const r=window.location.hostname.split(".");let o="";for(let a=1;a<=r.length;a+=1)if(o=r.slice(-a).join("."),yt.set(Vs,i,{path:"/",domain:o,expires:Gr})){const u=Fr();if(u&&u.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},xr=n=>{const e={};return Pr.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,ss(r.preference)]))}),e},Br=(n,e=!0,t=!0)=>{const{hostname:s}=window.location;n.forEach(i=>{var r;const o=e?s:i.domain;yt.remove(i.name,{path:(r=i.path)!=null?r:"/",domain:o}),t&&yt.remove(i.name,{domain:`.${s}`})})},Hr=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,ss(s)]));return Object.fromEntries(e)},$r=(n,e)=>Lr(void 0,null,function*(){var t;const s=(t=window.Fides)==null?void 0:t.experience,i=s?.non_applicable_privacy_notices||[];return br(vr({},n),{consent:Hr(e),non_applicable_notice_keys:i})}),We=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Ut=(n,e)=>{if(!e?.vendors)return;const{source:t,id:s}=We(n);if(t==="gvl"||t===void 0)return e.vendors[s]},Kr=n=>We(n).source==="gacp",zr=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(s=>s.id).filter(s=>Ut(s,n.gvl)).map(s=>+We(s).id)},kr=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(i=>Ut(i,n.gvl)).map(i=>+We(i).id)},Ms=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(Gt);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},vs=n=>{var e;const t=n.getGppString();if(!t)return window.Fides.fides_string;const s=new Array(4).fill(""),i=(((e=window.Fides.fides_string)==null?void 0:e.split(Gt))||[]).concat(s);return s.map((o,a)=>a<2?`${i[a]},`:a===2?t:a===3&&i[3]?`,${i[3]}`:o).join("")},Yr=1,Ft={us:{name:J.NAME,id:J.ID},us_ca:{name:ne.NAME,id:ne.ID},us_co:{name:ie.NAME,id:ie.ID},us_ct:{name:re.NAME,id:re.ID},us_ut:{name:ge.NAME,id:ge.ID},us_va:{name:pe.NAME,id:pe.ID},us_de:{name:ce.NAME,id:ce.ID},us_fl:{name:Te.NAME,id:Te.ID},us_ia:{name:de.NAME,id:de.ID},us_mt:{name:oe.NAME,id:oe.ID},us_ne:{name:ue.NAME,id:ue.ID},us_nh:{name:Ee.NAME,id:Ee.ID},us_nj:{name:Se.NAME,id:Se.ID},us_or:{name:ae.NAME,id:ae.ID},us_tn:{name:_e.NAME,id:_e.ID},us_tx:{name:le.NAME,id:le.ID}},jr=[J.NAME,ne.NAME,ie.NAME,re.NAME,ce.NAME,de.NAME,oe.NAME,ue.NAME,Ee.NAME,Se.NAME,ae.NAME,_e.NAME,le.NAME];var $e=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))($e||{});function _t(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function Wr(n){var e;if((e=n?.experience_config)!=null&&e.translations){const{translations:t}=n.experience_config,s=t.find(i=>i.is_default);return s?.language}}function Qr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>_t(r.language,n));if(i)return i}const s=t.translations.find(i=>_t(i.language,e));return s||t.translations[0]||null}function Xr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>_t(r.language,n));if(i)return i}const s=t.translations.find(i=>_t(i.language,e));return s||t.translations[0]||null}var qr=Object.defineProperty,Jr=Object.defineProperties,Zr=Object.getOwnPropertyDescriptors,bs=Object.getOwnPropertySymbols,eo=Object.prototype.hasOwnProperty,to=Object.prototype.propertyIsEnumerable,Ls=(n,e,t)=>e in n?qr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gs=(n,e)=>{for(var t in e||(e={}))eo.call(e,t)&&Ls(n,t,e[t]);if(bs)for(var t of bs(e))to.call(e,t)&&Ls(n,t,e[t]);return n},ys=(n,e)=>Jr(n,Zr(e)),so=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const no={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},io="Fides.js",ro=(n,e,t,s,i)=>so(void 0,null,function*(){var r;if((r=t.apiOptions)!=null&&r.savePreferencesFn){try{yield t.apiOptions.savePreferencesFn(n,s.consent,s.fides_string,i)}catch(l){return Promise.reject(l)}return Promise.resolve()}const o=ys(Gs({},no),{body:JSON.stringify(ys(Gs({},e),{source:io}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var oo=Object.defineProperty,ao=Object.defineProperties,lo=Object.getOwnPropertyDescriptors,Us=Object.getOwnPropertySymbols,co=Object.prototype.hasOwnProperty,uo=Object.prototype.propertyIsEnumerable,Fs=(n,e,t)=>e in n?oo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,It=(n,e)=>{for(var t in e||(e={}))co.call(e,t)&&Fs(n,t,e[t]);if(Us)for(var t of Us(e))uo.call(e,t)&&Fs(n,t,e[t]);return n},Eo=(n,e)=>ao(n,lo(e)),xt=(n=>(n.FIDES="fides",n.EXTERNAL="external",n))(xt||{});const xs=(n,e,t)=>{var s,i,r,o,a,l,u,E;const S=e?It({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const d=It({consentMethod:S?.fides_meta.consentMethod},t);(s=t?.trigger)!=null&&s.origin||(d.trigger=It(It({},d.trigger),{origin:"fides"}));const O=(i=performance?.mark)==null?void 0:i.call(performance,n),T=O?.startTime,H=S;H&&S?.consent&&(H.consent=As(S.consent,(o=(r=window.Fides)==null?void 0:r.experience)==null?void 0:o.non_applicable_privacy_notices,(l=(a=window.Fides)==null?void 0:a.experience)==null?void 0:l.privacy_notices,void 0,void 0,S.non_applicable_notice_keys));const $=new CustomEvent(n,{detail:Eo(It({},H),{debug:!!((E=(u=window.Fides)==null?void 0:u.options)!=null&&E.debug),extraDetails:d,timestamp:T}),bubbles:!0});window.dispatchEvent($)}};var So=Object.defineProperty,_o=(n,e,t)=>e in n?So(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ho=(n,e,t)=>_o(n,e+"",t);class po{constructor(){ho(this,"servedNoticeHistoryId",null)}getServedNoticeHistoryId(){return this.servedNoticeHistoryId||(this.servedNoticeHistoryId=ws()),this.servedNoticeHistoryId}reset(){this.servedNoticeHistoryId=null}hasLifecycleId(){return this.servedNoticeHistoryId!==null}}const go=new po;var To=Object.defineProperty,Io=Object.defineProperties,Oo=Object.getOwnPropertyDescriptors,Bs=Object.getOwnPropertySymbols,No=Object.prototype.hasOwnProperty,fo=Object.prototype.propertyIsEnumerable,Hs=(n,e,t)=>e in n?To(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ke=(n,e)=>{for(var t in e||(e={}))No.call(e,t)&&Hs(n,t,e[t]);if(Bs)for(var t of Bs(e))fo.call(e,t)&&Hs(n,t,e[t]);return n},Bt=(n,e)=>Io(n,Oo(e)),as=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Ao=[Fe.SCRIPT,Fe.GPC,Fe.EXTERNAL_PROVIDER];function Co(n,e,t,s,i,r,o,a,l){return as(this,null,function*(){const u=(r||[]).map(S=>({preference:S.consentPreference,privacy_notice_history_id:S.noticeHistoryId||""})),E=Ke({browser_identity:e.identity,preferences:u,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:t.property_id},o??[]);yield ro(s,E,n,e,t)})}const Po=n=>as(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:u,tcf:E,updateCookie:S}){var d,O,T,H,$,K,Z,W,Re;if(!S&&e&&(S=we=>$r(we,e)),!S&&!e)throw new Error("updateCookie is required");const Ie=Bt(Ke({},l?.trigger),{origin:((d=l?.trigger)==null?void 0:d.origin)||(Ao.includes(i)?xt.EXTERNAL:xt.FIDES)}),pt=yield S(a);Object.assign(a,pt),Object.assign(a.fides_meta,{consentMethod:i}),xs("FidesUpdating",a,Bt(Ke({},l),{trigger:Ie}));const Ct=As(a.consent,(T=(O=window.Fides)==null?void 0:O.experience)==null?void 0:T.non_applicable_privacy_notices,($=(H=window.Fides)==null?void 0:H.experience)==null?void 0:$.privacy_notices,void 0,void 0,a.non_applicable_notice_keys),he=!!((Z=(K=window.Fides)==null?void 0:K.experience)!=null&&Z.non_applicable_privacy_notices)||!!((Re=(W=window.Fides)==null?void 0:W.experience)!=null&&Re.privacy_notices);if(window.Fides.consent=gr(Ct,r,he),window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,Rs(Bt(Ke({},a),{consent:Ct}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield Co(r,a,s,i,t,e,E,o,u)}catch{}e&&e.filter(we=>we.consentPreference===De.OPT_OUT).forEach(we=>{var Ge,Je,gt;(Ge=we.notice)!=null&&Ge.cookies&&Br(we.notice.cookies,(Je=s.experience_config)==null?void 0:Je.cookie_deletion_based_on_host_domain,(gt=s.experience_config)==null?void 0:gt.auto_subdomain_cookie_deletion)}),xs("FidesUpdated",a,Bt(Ke({},l),{trigger:Ie}))}),$s=(n,e,t,s)=>Object.entries(t).reduce((i,[r,o])=>{if(i)return i;const a=e.find(S=>S===r);if(a&&!o&&s!==Fe.EXTERNAL_PROVIDER)return new Error(`Provided notice key '${r}' is not applicable to the current experience.`);const l=n.find(S=>S.notice_key===r);if(!a&&!l)return new Error(`'${r}' is not a valid notice key`);const E=l?.consent_mechanism===dt.NOTICE_ONLY;return E&&o!==!0&&o!==De.ACKNOWLEDGE&&s!==Fe.EXTERNAL_PROVIDER?new Error(`Invalid consent value for notice-only notice key: '${r}'. Must be \`true\` or "acknowledge"`):!E&&typeof o!="boolean"&&o!==De.OPT_IN&&o!==De.OPT_OUT?new Error(`Invalid consent value for notice key: '${r}'. Must be a boolean or "opt_in" or "opt_out"`):null},null),Ks=(n,e)=>as(void 0,null,function*(){var t;const{experience:s,cookie:i,config:r,locale:o}=n;if(!s)throw new Error("Experience must be initialized before updating consent");if(!r)throw new Error("Config is not initialized");if(!i)throw new Error("Cookie is not initialized");if(!e?.noticeConsent&&!e?.fidesString&&!e?.tcf)throw new Error("Either consent object or fidesString must be provided");if(e?.validation&&!Object.values(et).includes(e.validation))throw new Error(`Validation must be one of: ${Object.values(et).join(", ")} (default is ${et.THROW})`);const{noticeConsent:a,fidesString:l,validation:u=et.THROW,consentMethod:E=Fe.SCRIPT,eventExtraDetails:S={trigger:{origin:xt.EXTERNAL}},tcf:d,updateCookie:O}=e,{experience_config:T,privacy_notices:H,non_applicable_privacy_notices:$}=s,K=Wr(s)||Zi,Z=he=>{if(u===et.THROW)throw new Error(he);u===et.WARN&&console.warn(he)};let W=i.consent||{};if(l)try{const he=Ms(l);if(he.nc){const we=_r(he.nc);W=Ke(Ke({},i.consent),we);const Ge=$s(H||[],$||[],W,E);Ge&&Z(Ge.message)}}catch(he){const we=he instanceof Error?he.message:String(he);Z(`Invalid fidesString provided: ${we}`)}else if(a){const he=$s(H||[],$||[],a,E);he&&Z(he.message),W=Ke(Ke({},i.consent),a)}const Re=[];Object.entries(W).forEach(([he,we])=>{const Ge=H?.find(Je=>Je.notice_key===he);if(Ge){const Je=Qr(o,K,Ge),gt=Je?.privacy_notice_history_id;let Wt;if(typeof we=="boolean"?Wt=Rt(we,Ge.consent_mechanism):Wt=we,gt){const Sn=new sr(Ge,Wt,gt);Re.push(Sn)}}});let Ie;if((t=T?.translations)!=null&&t.length){const he=Xr(o,K,T);Ie=he?.privacy_experience_config_history_id}const pt=Er(r.geolocation),Ct=go.getServedNoticeHistoryId();return Po({consentPreferencesToSave:Re,privacyExperienceConfigHistoryId:Ie,experience:s,consentMethod:E,options:r.options,userLocationString:pt,cookie:i,eventExtraDetails:S,servedNoticeHistoryId:Ct,tcf:d,updateCookie:O})});class Qe extends Error{constructor(e){super(e),this.name="DecodingError"}}class ze extends Error{constructor(e){super(e),this.name="EncodingError"}}class ht extends Error{constructor(e){super(e),this.name="GVLError"}}class ke extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class ls{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new ze("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let i=0;i<e.length;i+=this.BASIS)s+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new Qe("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const i=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class Ye{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return Ye.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(Ye.langSet.has(e))return e;if(Ye.langSet.has(t))return t;const s=t+"-"+t;if(Ye.langSet.has(s))return s;for(const i of Ye.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){Ye.langSet.forEach(e)}get size(){return Ye.langSet.size}}class _{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class Ot{clone(){const e=new this.constructor;return Object.keys(this).forEach(s=>{const i=this.deepClone(this[s]);i!==void 0&&(e[s]=i)}),e}deepClone(e){const t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){const s=[];for(const i of e)s.push(this.deepClone(i));return e instanceof Array?s:new e.constructor(s)}else{const s={};for(const i in e)e.hasOwnProperty(i)&&(s[i]=this.deepClone(e[i]));return s}}}}var be;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(be||(be={}));class Be extends Ot{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),s=new Be;if(t.length!==2)throw new ke("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${Be.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===be.NOT_ALLOWED||this.restrictionType===be.REQUIRE_CONSENT||this.restrictionType===be.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class zs extends Ot{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[s];if(r)if(e===be.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case be.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case be.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(s))this.map.set(s,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(s).add(o)}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const s=new Set;this.map.forEach(i=>{i.forEach(r=>{s.add(r)})}),t=Array.from(s)}return t.sort((s,i)=>s-i)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(s===void 0||s>i.restrictionType)&&(s=i.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!s;r++)s=t.isSameAs(i[r]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,i)=>{e?s.has(e)&&t.push(Be.unHash(i)):t.push(Be.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(Be.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,i=this.map.get(s);i&&(i.delete(e),i.size==0&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,s)=>{const i=Be.unHash(s);Array.from(t).forEach(o=>{this.isOkToHave(i.restrictionType,i.purposeId,o)||t.delete(o)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}}var ks;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(ks||(ks={}));var X;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(X||(X={}));class Ys{static ID_TO_KEY=[X.CORE,X.VENDORS_DISCLOSED,X.VENDORS_ALLOWED,X.PUBLISHER_TC];static KEY_TO_ID={[X.CORE]:0,[X.VENDORS_DISCLOSED]:1,[X.VENDORS_ALLOWED]:2,[X.PUBLISHER_TC]:3}}class me extends Ot{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(s=>{let i=Number.isInteger(parseInt(s,10));return i=i&&this.isValidNumber(e[s].id),i=i&&e[s].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new ke("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[_.cmpId]=12;static[_.cmpVersion]=12;static[_.consentLanguage]=12;static[_.consentScreen]=6;static[_.created]=36;static[_.isServiceSpecific]=1;static[_.lastUpdated]=36;static[_.policyVersion]=6;static[_.publisherCountryCode]=12;static[_.publisherLegitimateInterests]=24;static[_.publisherConsents]=24;static[_.purposeConsents]=24;static[_.purposeLegitimateInterests]=24;static[_.purposeOneTreatment]=1;static[_.specialFeatureOptins]=12;static[_.useNonStandardTexts]=1;static[_.vendorListVersion]=12;static[_.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class xe{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class P{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new ze(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new Qe("invalid bit length");return parseInt(e,2)}}class js{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new Qe("invalid bit length");const s=new Date;return s.setTime(P.decode(e,t)*100),s}}class Xe{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=xe.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new Qe("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)xe.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class Ws{static encode(e,t){e=e.toUpperCase();const s=65,i=e.charCodeAt(0)-s,r=e.charCodeAt(1)-s;if(i<0||i>25||r<0||r>25)throw new ze(`invalid language code: ${e}`);if(t%2===1)throw new ze(`numBits must be even, ${t} is not valid`);t=t/2;const o=P.encode(i,t),a=P.encode(r,t);return o+a}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=P.decode(e.slice(0,r),r)+65,a=P.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new Qe("invalid bit length for language");return s}}class wo{static encode(e){let t=P.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const s=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=P.encode(i.purposeId,g.purposeId),t+=P.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,u="";for(let E=0;E<o;E++){const S=r[E];if(l===0&&(a++,l=S),E===o-1||r[E+1]>s(S,r[o-1])){const d=S!==l;u+=xe.encode(d),u+=P.encode(l,g.vendorId),d&&(u+=P.encode(S,g.vendorId)),l=0}}t+=P.encode(a,g.numEntries),t+=u})}return t}static decode(e){let t=0;const s=new zs,i=P.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=P.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=P.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new Be(o,a),u=P.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let E=0;E<u;E++){const S=xe.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const d=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,S){const O=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,O<d)throw new Qe(`Invalid RangeEntry: endVendorId ${O} is less than ${d}`);for(let T=d;T<=O;T++)s.add(T,l)}else s.add(d,l)}}return s.bitLength=t,s}}var Nt;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Nt||(Nt={}));class ft{static encode(e){const t=[];let s=[],i=P.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,u=g.vendorId*2+g.singleOrRange+g.numEntries;let E=a+g.numEntries;return e.forEach((S,d)=>{r+=xe.encode(S),o=e.maxId>u&&E<l,o&&S&&(e.has(d+1)?s.length===0&&(s.push(d),E+=g.singleOrRange,E+=g.vendorId):(s.push(d),E+=g.vendorId,t.push(s),s=[]))}),o?(i+=String(Nt.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(Nt.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=P.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=P.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===Nt.RANGE){if(s=new me,t===1){if(e.substr(i,1)==="1")throw new Qe("Unable to decode default consent=1");i++}const a=P.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const u=xe.decode(e.charAt(i));i+=g.singleOrRange;const E=P.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,u){const S=P.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let d=E;d<=S;d++)s.set(d)}else s.set(E)}}else{const a=e.substr(i,r);i+=r,s=Xe.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=P.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=xe.encode(!r),s+=P.encode(i[0],g.vendorId),r||(s+=P.encode(i[1],g.vendorId))}),s}}function Qs(){return{[_.version]:P,[_.created]:js,[_.lastUpdated]:js,[_.cmpId]:P,[_.cmpVersion]:P,[_.consentScreen]:P,[_.consentLanguage]:Ws,[_.vendorListVersion]:P,[_.policyVersion]:P,[_.isServiceSpecific]:xe,[_.useNonStandardTexts]:xe,[_.specialFeatureOptins]:Xe,[_.purposeConsents]:Xe,[_.purposeLegitimateInterests]:Xe,[_.purposeOneTreatment]:xe,[_.publisherCountryCode]:Ws,[_.vendorConsents]:ft,[_.vendorLegitimateInterests]:ft,[_.publisherRestrictions]:wo,segmentType:P,[_.vendorsDisclosed]:ft,[_.vendorsAllowed]:ft,[_.publisherConsents]:Xe,[_.publisherLegitimateInterests]:Xe,[_.numCustomPurposes]:P,[_.publisherCustomConsents]:Xe,[_.publisherCustomLegitimateInterests]:Xe}}class Do{1={[X.CORE]:[_.version,_.created,_.lastUpdated,_.cmpId,_.cmpVersion,_.consentScreen,_.consentLanguage,_.vendorListVersion,_.purposeConsents,_.vendorConsents]};2={[X.CORE]:[_.version,_.created,_.lastUpdated,_.cmpId,_.cmpVersion,_.consentScreen,_.consentLanguage,_.vendorListVersion,_.policyVersion,_.isServiceSpecific,_.useNonStandardTexts,_.specialFeatureOptins,_.purposeConsents,_.purposeLegitimateInterests,_.purposeOneTreatment,_.publisherCountryCode,_.vendorConsents,_.vendorLegitimateInterests,_.publisherRestrictions],[X.PUBLISHER_TC]:[_.publisherConsents,_.publisherLegitimateInterests,_.numCustomPurposes,_.publisherCustomConsents,_.publisherCustomLegitimateInterests],[X.VENDORS_ALLOWED]:[_.vendorsAllowed],[X.VENDORS_DISCLOSED]:[_.vendorsDisclosed]}}class mo{1=[X.CORE];2=[X.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(X.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[_.supportOOB]===!0)&&this[2].push(X.VENDORS_DISCLOSED),s&&(e[_.supportOOB]&&e[_.vendorsAllowed].size>0&&this[2].push(X.VENDORS_ALLOWED),this[2].push(X.PUBLISHER_TC))}}}class Xs{static fieldSequence=new Do;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new ze(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==X.CORE&&(i=P.encode(Ys.KEY_TO_ID[t],g.segmentType));const r=Qs();return s.forEach(o=>{const a=e[o],l=r[o];let u=g[o];u===void 0&&this.isPublisherCustom(o)&&(u=Number(e[_.numCustomPurposes]));try{i+=l.encode(a,u)}catch(E){throw new ze(`Error encoding ${t}->${o}: ${E.message}`)}}),ls.encode(i)}static decode(e,t,s){const i=ls.decode(e);let r=0;s===X.CORE&&(t.version=P.decode(i.substr(r,g[_.version]),g[_.version])),s!==X.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=Qs();return o.forEach(l=>{const u=a[l];let E=g[l];if(E===void 0&&this.isPublisherCustom(l)&&(E=Number(t[_.numCustomPurposes])),E!==0){const S=i.substr(r,E);if(u===ft?t[l]=u.decode(S,t.version):t[l]=u.decode(S,E),Number.isInteger(E))r+=E;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new Qe(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Vo{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((i,r)=>{i.forEach((o,a)=>{if(o){const l=t.vendors[a];if(!l||l.deletedDate)i.unset(a);else if(l[r].length===0)if(r==="legIntPurposes"&&l.purposes.length===0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&l.purposes.length>0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(l.flexiblePurposes.length===0)i.unset(a);else{const u=e.publisherRestrictions.getRestrictions(a);let E=!1;for(let S=0,d=u.length;S<d&&!E;S++)E=u[S].restrictionType===be.REQUIRE_CONSENT&&r==="purposes"||u[S].restrictionType===be.REQUIRE_LI&&r==="legIntPurposes";E||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const s=e.gvl;if(!s)throw new ze("Unable to encode TCModel without a GVL");if(!s.isReady)throw new ze("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const i=e.version-1;if(!this.processor[i])throw new ze(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class Ro{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},u=()=>{o(new Error("error"))},E=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",u),a.addEventListener("abort",E),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class f extends Ot{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new Ye;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new ht("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=f.baseUrl,i=t?.language;if(i)try{i=f.consentLanguages.parseLanguage(i)}catch(r){throw new ht("Error during parsing the language: "+r.message)}if(this.lang_=i||f.DEFAULT_LANGUAGE,this.cacheLang_=i||f.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new ht("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;f.CACHE.has(r)?(this.populate(f.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=f.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else f.CACHE.has(f.LATEST_CACHE_KEY)?(this.populate(f.CACHE.get(f.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+f.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&f.LANGUAGE_CACHE.size>0?(f.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(f.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(f.CACHE.delete(e),t=!0):e===void 0&&(f.CACHE=new Map,t=!0),t}cacheLanguage(){f.LANGUAGE_CACHE.has(this.cacheLang_)||f.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await Ro.fetch(e))}catch(t){throw new ht(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=f.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=f.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=f.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=f.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=f.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=f.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=f.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=f.consentLanguages.parseLanguage(e)}catch(i){throw new ht("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===f.DEFAULT_LANGUAGE.toLowerCase()&&!f.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,f.LANGUAGE_CACHE.has(s)){const i=f.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=f.baseUrl+f.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new ht("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&f.CACHE.set(f.LATEST_CACHE_KEY,this.getJson()),f.CACHE.has(this.vendorListVersion)||f.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new f(this.getJson());return this.lang_!==f.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class qs extends Ot{static consentLanguages=f.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=4;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new me;purposeConsents=new me;purposeLegitimateInterests=new me;publisherConsents=new me;publisherLegitimateInterests=new me;publisherCustomConsents=new me;publisherCustomLegitimateInterests=new me;customPurposes;vendorConsents=new me;vendorLegitimateInterests=new me;vendorsDisclosed=new me;vendorsAllowed=new me;publisherRestrictions=new zs;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){f.isInstanceOf(e)||(e=new f(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new ke("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new ke("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new ke("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new ke("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new ke("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new ke("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((s,i)=>Number(s)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new ke("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class Mo{static encode(e,t){let s="",i;return e=Vo.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new mo(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=Xs.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new qs);for(let r=0;r<i;r++){const o=s[r],l=ls.decode(o.charAt(0)).substr(0,g.segmentType),u=Ys.ID_TO_KEY[P.decode(l,g.segmentType).toString()];Xs.decode(o,t,u)}return t}}var qe;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(qe||(qe={}));var Ht;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(Ht||(Ht={}));var $t;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})($t||($t={}));var Js;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Js||(Js={}));class Kt{listenerId;callback;next;param;success=!0;constructor(e,t,s,i){Object.assign(this,{callback:e,listenerId:s,param:t,next:i});try{this.respond()}catch{this.invokeCallback(null)}}invokeCallback(e){const t=e!==null;typeof this.next=="function"?this.callback(this.next,e,t):this.callback(e,t)}}class zt extends Kt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new en(this.param,this.listenerId))}throwIfParamInvalid(){if(this.param!==void 0&&(!Array.isArray(this.param)||!this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class vo{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new zt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class fe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new vo;static cmpStatus=Ht.LOADING;static disabled=!1;static displayStatus=$t.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=Ht.LOADING,this.disabled=!1,this.displayStatus=$t.HIDDEN,this.eventQueue.clear()}}class Zs{cmpId=fe.cmpId;cmpVersion=fe.cmpVersion;gdprApplies=fe.gdprApplies;tcfPolicyVersion=fe.tcfPolicyVersion}class en extends Zs{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=fe.eventStatus,this.cmpStatus=fe.cmpStatus,this.listenerId=t,fe.gdprApplies){const s=fe.tcModel;this.tcString=fe.tcString,this.isServiceSpecific=s.isServiceSpecific,this.useNonStandardTexts=s.useNonStandardTexts,this.purposeOneTreatment=s.purposeOneTreatment,this.publisherCC=s.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(s.vendorsAllowed,e),disclosedVendors:this.createVectorField(s.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(s.purposeConsents),legitimateInterests:this.createVectorField(s.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(s.vendorConsents,e),legitimateInterests:this.createVectorField(s.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(s.specialFeatureOptins),this.publisher={consents:this.createVectorField(s.publisherConsents),legitimateInterests:this.createVectorField(s.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(s.publisherCustomConsents),legitimateInterests:this.createVectorField(s.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(s.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let i=1;i<=s;i++){const r=i.toString();e.getRestrictions(i).forEach(o=>{const a=o.purposeId.toString();t[a]||(t[a]={}),t[a][r]=o.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((s,i)=>(s[String(i)]=e.has(Number(i)),s),{}):[...e].reduce((s,i)=>(s[i[0].toString(10)]=i[1],s),{})}}class bo extends en{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,s)=>(t+=s[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(s)});for(let i=0;i<s;i++){const r=i+1;e.getRestrictions(r).forEach(o=>{const a=o.restrictionType.toString(),l=o.purposeId.toString(),u=t[l].substr(0,i),E=t[l].substr(i+1);t[l]=u+a+E})}}return t}}class Lo extends Zs{cmpLoaded=!0;cmpStatus=fe.cmpStatus;displayStatus=fe.displayStatus;apiVersion=String(fe.apiVersion);gvlVersion;constructor(){super(),fe.tcModel&&fe.tcModel.vendorListVersion&&(this.gvlVersion=+fe.tcModel.vendorListVersion)}}class Go extends Kt{respond(){this.invokeCallback(new Lo)}}class yo extends zt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new bo(this.param))}}class Uo extends Kt{respond(){const e=fe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new f(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Fo extends zt{respond(){this.listenerId=fe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class xo extends Kt{respond(){this.invokeCallback(fe.eventQueue.remove(this.param))}}class Ra{static[qe.PING]=Go;static[qe.GET_TC_DATA]=zt;static[qe.GET_IN_APP_TC_DATA]=yo;static[qe.GET_VENDOR_LIST]=Uo;static[qe.ADD_EVENT_LISTENER]=Fo;static[qe.REMOVE_EVENT_LISTENER]=xo}const Bo=n=>{var e,t;if(!((t=(e=window.Fides)==null?void 0:e.options)!=null&&t.fidesTcfGdprApplies))return null;const{fides_string:s}=n.detail;if(s){const[i]=s.split(Gt);return i.split(".")[0]}return s??""};var Ho=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const $o=1,tn=[1,3,4,5,6],Ko=2,zo=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(Kr).map(o=>We(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${Ko}~${s}~dv.${i}`},ko=n=>Ho(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const l=new qs(new f(e.gvl));yield l.gvl.readyPromise,l.cmpId=os,l.cmpVersion=$o,l.consentScreen=1,l.isServiceSpecific=!0,l.supportOOB=!1,e.tcf_publisher_country_code&&(l.publisherCountryCode=e.tcf_publisher_country_code);const u=e.minimal_tcf?kr(e):zr(e);if(l.gvl.narrowVendorsTo(u),t){t.vendorsConsent.forEach(d=>{var O,T,H;if(Ut(d,e.gvl)){const{id:$}=We(d);if(l.vendorConsents.set(+$),!((O=e.tcf_publisher_restrictions)!=null&&O.length)){const K=(T=e.gvl)==null?void 0:T.vendors[$];K&&!((H=K?.purposes)!=null&&H.length)&&K.flexiblePurposes.forEach(Z=>{const W=new Be;W.purposeId=Z,W.restrictionType=be.REQUIRE_CONSENT,l.publisherRestrictions.add(+$,W)})}}}),t.vendorsLegint.forEach(d=>{var O,T;if(e.minimal_tcf)(O=e.tcf_vendor_legitimate_interest_ids)==null||O.forEach(H=>{const{id:$}=We(H);l.vendorLegitimateInterests.set(+$)});else if(Ut(d,e.gvl)){const H=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(Z=>Z.id===d)[0],$=H?.purpose_legitimate_interests;let K=!1;if($&&($.map(W=>W.id).filter(W=>tn.includes(W)).length&&(K=!0),!K)){const{id:W}=We(d);l.vendorLegitimateInterests.set(+W)}}}),Object.values((i=(s=e.gvl)==null?void 0:s.vendors)!=null?i:{}).forEach(d=>{var O,T;(O=d.specialPurposes)!=null&&O.length&&!((T=d.legIntPurposes)!=null&&T.length)&&l.vendorLegitimateInterests.set(d.id)}),t.purposesConsent.forEach(d=>{l.purposeConsents.set(+d)}),t.purposesLegint.forEach(d=>{const O=+d;tn.includes(O)||l.purposeLegitimateInterests.set(O)}),t.specialFeatures.forEach(d=>{l.specialFeatureOptins.set(+d)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(d=>{d.vendors.forEach(O=>{const T=new Be;T.purposeId=d.purpose_id,T.restrictionType=d.restriction_type,l.publisherRestrictions.add(O,T)})}),a=Mo.encode(l,{segments:[X.CORE]});const E=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(d=>d.id),S=zo({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:E??[]});a=`${a}${Gt}${S}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var Yo=Object.defineProperty,jo=Object.defineProperties,Wo=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,Qo=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable,nn=(n,e,t)=>e in n?Yo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qo=(n,e)=>{for(var t in e||(e={}))Qo.call(e,t)&&nn(n,t,e[t]);if(sn)for(var t of sn(e))Xo.call(e,t)&&nn(n,t,e[t]);return n},Jo=(n,e)=>jo(n,Wo(e)),Zo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const tt=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=Rt(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],st=n=>n?.length?n.map(e=>{const t=Rt(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],ea=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consents)!=null&&a.map(l=>l.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interests)!=null&&a.map(l=>l.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:tt({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:tt({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:tt({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:tt({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:tt({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:tt({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:tt({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},ta=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consent_ids)!=null&&a.includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interest_ids)!=null&&a.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:st(e.purposesConsent),purpose_legitimate_interests_preferences:st(e.purposesLegint),special_feature_preferences:st(e.specialFeatures),vendor_consent_preferences:st(s),vendor_legitimate_interests_preferences:st(r),system_consent_preferences:st(t),system_legitimate_interests_preferences:st(i)}},sa=(n,e,t,s,i,r)=>Zo(void 0,null,function*(){var o;const a=yield ko({tcStringPreferences:t,experience:s});return Jo(qo({},n),{fides_string:a,tcf_consent:xr(e),tcf_version_hash:(o=s.meta)==null?void 0:o.version_hash})}),kt="us",na=n=>n?.toLowerCase().startsWith("us"),ia=n=>typeof n?.name!="string"?!1:jr.includes(n.name),ra=({experienceRegion:n,usApproach:e})=>na(n)&&e===$e.NATIONAL?kt:n,oa=({gppApi:n,sectionName:e,gppSettings:t})=>{if(!t)return;[{gppSettingField:t.mspa_covered_transactions,cmpApiField:N.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:N.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:N.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:i,cmpApiField:r})=>{const o=r===N.MSPA_COVERED_TRANSACTION;let a=2;!t.mspa_covered_transactions&&!o?a=0:i&&(a=1),n.setFieldValue(e,r,a)})},rn=n=>{const{region:e,gpp_settings:t,privacy_notices:s}=n;let i=ra({experienceRegion:e,usApproach:t?.us_approach}),r=Ft[i];return!r&&t?.us_approach===$e.ALL&&(i=kt,r=Ft[i]),r&&t?.us_approach===$e.ALL&&(s?.some(a=>{var l;return(l=a.gpp_field_mapping)==null?void 0:l.find(u=>u.region===e)})||(i=kt,r=Ft[i])),!r||i===kt&&t?.us_approach===$e.STATE?{}:{gppRegion:i,gppSection:r}},aa=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s,noticeConsent:i})=>{i&&s.forEach(r=>{var o;const{notice_key:a,gpp_field_mapping:l}=r,u=i[a],E=(o=l?.find(S=>S.region===e))==null?void 0:o.mechanism;E&&E.forEach(S=>{let d=S.not_available;u===!1?d=S.opt_out:u&&(d=S.not_opt_out);let O=+d;d.length>1&&(O=d.split("").map(T=>+T)),n.setFieldValue(t.name,S.field,O)})})},la=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s})=>{s.forEach(i=>{var r;const{gpp_field_mapping:o}=i,a=(r=o?.find(l=>l.region===e))==null?void 0:r.notice;a&&a.forEach(l=>{n.setFieldValue(t.name,l,1)})})},ca=({gppApi:n,gppSection:e,context:t})=>{var s;if(ia(e)){const i=(s=t?.globalPrivacyControl)!=null?s:!1;n.setFieldValue(e.name,N.GPC,i),n.setFieldValue(e.name,N.GPC_SEGMENT_INCLUDED,!0)}},da=[1,3,4,5,6],ua=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[]}=e,{gppRegion:i,gppSection:r}=rn(e);return!i||!r||s.forEach(o=>{var a;const{notice_key:l,gpp_field_mapping:u}=o,E=(a=u?.find(S=>S.region===i))==null?void 0:a.mechanism;if(E){const S=E.some(d=>{const O=n.getFieldValue(r.name,d.field),T=Array.isArray(O)?O.join(""):String(O);return T===d.opt_out?!0:(T===d.not_opt_out,!1)});S!==void 0&&(t[l]=!S)}}),t},Ea=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=wr,a=n.getSection(j.NAME);if(!a)return o;const l=a.PurposeConsents.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),u=a.PurposeLegitimateInterests.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),E=a.VendorConsents.map(d=>`gvl.${d}`),S=a.VendorLegitimateInterests.map(d=>`gvl.${d}`);return o.purposesConsent=l,o.purposesLegint=u.filter(d=>!da.includes(parseInt(d,10))),o.vendorsConsent=E,o.vendorsLegint=S,o.specialFeatures=a.SpecialFeatureOptins.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(d=>d.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(d=>d.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(d=>d.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(d=>d.toString()))||[]),o.customPurposesConsent=[],o},Sa=n=>!n||typeof n!="string"?!1:/^DB[A-Za-z0-9~.]+$/.test(n),_a=({fidesString:n,cmpApi:e})=>{const{gpp:t}=Ms(n);if(!n||!t||!e||!Sa(t))return;const{locale:s}=window.Fides,i=window.Fides.experience;if(!i||!i.experience_config||!i.privacy_notices)return;const r=i.experience_config.component===Et.TCF_OVERLAY;if(!i.experience_config.translations.find(E=>_t(E.language,s)))return;e.setGppString(t),e.setSignalStatus(Me.READY);const a=i.privacy_notices.map(E=>({notice:E,bestTranslation:E.translations.find(S=>_t(S.language,s))||null}));let l,u;if(r){const E=Ea({cmpApi:e,experience:i});u=i.minimal_tcf?ta({experience:i,enabledIds:E}):ea({experience:i,enabledIds:E}),l=d=>sa(d,u,E,i);const S={};a.forEach(d=>{d.notice.consent_mechanism!==dt.NOTICE_ONLY?S[d.notice.notice_key]=E.purposesConsent.includes(d.notice.id):S[d.notice.notice_key]=!0}),Ks(window.Fides,{noticeConsent:S,tcf:u,updateCookie:l})}else{const E=ua({cmpApi:e,experience:i});Ks(window.Fides,{noticeConsent:E})}},on="__gppLocator",an=n=>{if(!!!window.frames[n])if(window.document.body){const t=window.document.createElement("iframe");t.style.cssText="display:none",t.name=n,window.document.body.appendChild(t)}else setTimeout(()=>an(n),5)},ha=n=>{let e=window,t;for(;e;){try{if(e.frames[n]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},pa=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,ga=()=>{const n=[],e=[];let t;const s=(o,a,l,u)=>{if(o==="queue")return n;if(o==="events")return e;const E={gppVersion:"1.1",cmpStatus:rt.STUB,cmpDisplayStatus:je.HIDDEN,signalStatus:Me.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(o==="ping")a(E,!0);else if(o==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:a,parameter:l}),a({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:E},!0)}else if(o==="removeEventListener"){let S=!1;for(let d=0;d<e.length;d++)if(e[d].id===l){e.splice(d,1),S=!0;break}a({eventName:"listenerRemoved",listenerId:l,data:S,pingData:E},!0)}else o==="hasSection"?a(!1,!0):o==="getSection"||o==="getField"?a(null,!0):n.push([].slice.apply([o,a,l,u]));return null},i=o=>{const a=typeof o.data=="string";let l={};if(a)try{l=JSON.parse(o.data)}catch{l={}}else l=o.data;if(!pa(l))return null;if(l.__gppCall&&window.__gpp){const E=l.__gppCall;window.__gpp(E.command,(S,d)=>{const O={__gppReturn:{returnValue:S,success:d,callId:E.callId}};o&&o.source&&o.source.postMessage&&o.source.postMessage(a?JSON.stringify(O):O,"*")},"parameter"in E?E.parameter:void 0,"version"in E?E.version:"1.1")}return null};ha(on)||(an(on),window.__gpp=s,window.addEventListener("message",i,!1))},ln=(n,{cmpApi:e,experience:t,context:s,cookie:i})=>{const{gppRegion:r,gppSection:o}=rn(t);if(!r||!o)return[];const a=new Set;a.add(o),n({gppApi:e,gppRegion:r,gppSection:o,privacyNotices:t.privacy_notices||[],noticeConsent:i?.consent});const{gpp_settings:l}=t;return oa({gppApi:e,sectionName:o.name,gppSettings:l}),ca({gppApi:e,gppSection:o,context:s}),Array.from(a)},cn=({cmpApi:n,experience:e,context:t})=>ln(la,{cmpApi:n,experience:e,context:t}),dn=({cmpApi:n,cookie:e,experience:t,context:s})=>ln(aa,{cmpApi:n,cookie:e,experience:t,context:s}),un=(n,e,t)=>n?e?!0:!!(t&&Object.entries(n).some(([s,i])=>s in t.map(r=>r.notice_key)&&i!==void 0)):!1,En=(n,e)=>{if(!St(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!t?.enable_tcfeu_string)return!1;const s=Bo(n);return s?(e.setFieldValueBySectionId(j.ID,"CmpId",os),e.setSectionStringById(j.ID,s),!0):!1},Ta=()=>{const n=[];if(St(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${j.ID}:${j.NAME}`),(e.us_approach===$e.NATIONAL||e.us_approach===$e.ALL)&&n.push(`${J.ID}:${J.NAME}`),(e.us_approach===$e.STATE||e.us_approach===$e.ALL)&&Object.values(Ft).forEach(t=>{t.id!==J.ID&&n.push(`${t.id}:${t.name}`)}))}return n},Ia=()=>{ga();const n=new qi(os,Yr);n.setCmpStatus(rt.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=Ta();if(n.setSupportedAPIs(o),!St(s))return;const{fidesString:a}=r;if(a&&_a({fidesString:a,cmpApi:n}),!a&&(!Sr(s,e.detail,i,r)||!r.tcfEnabled&&Ns(s.privacy_notices)&&!un(i,e.detail.fides_string,s.privacy_notices))){const l=es(),u=En(e,n);u&&n.setApplicableSections([j.ID]);const E=cn({cmpApi:n,experience:s,context:l}),S=dn({cmpApi:n,cookie:e.detail,experience:s,context:l});S.length&&n.setApplicableSections(S.map(O=>O.id)),!u&&!E.length&&!S.length&&n.setApplicableSections([-1]),n.setSignalStatus(Me.READY);const d=vs(n);window.Fides.fides_string=d}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",l=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(St(t)){!i.tcfEnabled&&Ns(t.privacy_notices)&&!un(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(Me.READY):n.setSignalStatus(Me.NOT_READY),n.setCmpDisplayStatus(je.VISIBLE);const r=cn({cmpApi:n,experience:t,context:es()});r.length&&(n.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{n.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(n.setCmpDisplayStatus(je.HIDDEN),n.setSignalStatus(Me.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(je.HIDDEN),En(e,n)&&(n.setApplicableSections([j.ID]),n.fireSectionChange("tcfeuv2")),St(window.Fides.experience)){const s=dn({cmpApi:n,cookie:e.detail,experience:window.Fides.experience,context:es()});s.length&&(n.setApplicableSections(s.map(r=>r.id)),s.forEach(r=>{n.fireSectionChange(r.name)}));const i=vs(n);window.Fides.cookie&&(window.Fides.fides_string=i,window.Fides.cookie.fides_string=i,Rs(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(Me.READY)})};window.addEventListener("FidesInitializing",n=>{var e,t;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&typeof window<"u"&&!((t=window.Fides)!=null&&t.initialized)&&Ia()});
1
+ class kt{eventName;listenerId;data;pingData;constructor(e,t,s,i){this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}class It{gppVersion;cmpStatus;cmpDisplayStatus;signalStatus;supportedAPIs;cmpId;sectionList;applicableSections;gppString;parsedSections;constructor(e){this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}let st=class{callback;parameter;success=!0;cmpApiContext;constructor(e,t,s){this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:s})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},$s=class extends st{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new kt("listenerRegistered",e,!0,new It(this.cmpApiContext));this.invokeCallback(t)}},js=class extends st{respond(){let e=new It(this.cmpApiContext);this.invokeCallback(e)}};class Qs extends st{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],s=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,s);this.invokeCallback(i)}}class Xs extends st{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class qs extends st{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var Le;(function(n){n.ADD_EVENT_LISTENER="addEventListener",n.GET_FIELD="getField",n.GET_SECTION="getSection",n.HAS_SECTION="hasSection",n.PING="ping",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Le||(Le={}));let Js=class extends st{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new kt("listenerRemoved",e,t,new It(this.cmpApiContext));this.invokeCallback(s)}},ss=class{static[Le.ADD_EVENT_LISTENER]=$s;static[Le.GET_FIELD]=Qs;static[Le.GET_SECTION]=Xs;static[Le.HAS_SECTION]=qs;static[Le.PING]=js;static[Le.REMOVE_EVENT_LISTENER]=Js};var nt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(nt||(nt={}));var ze;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(ze||(ze={}));var ns;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ns||(ns={}));var me;(function(n){n.NOT_READY="not ready",n.READY="ready"})(me||(me={}));class Zs{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let s=Le.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=Le.REMOVE_EVENT_LISTENER,t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch{this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,s,i){if(typeof e!="string")t(null,!1);else{if(t&&typeof t!="function")throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,s):this.isBuiltInCommand(e)?new ss[e](this.cmpApiContext,t,s).execute():t&&t(null,!1)}}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(t=>{window.__gpp(...t)})}isCustomCommand(e){return this.customCommands&&typeof this.customCommands[e]=="function"}isBuiltInCommand(e){return ss[e]!==void 0}}let en=class{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let s=window.__gpp("events")||[];for(var t=0;t<s.length;t++){let i=s[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(s){console.log(s)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((s,i)=>{let r=new kt(e,i,t,new It(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class _t extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class Q{segments;encodedString=null;dirty=!1;decoded=!0;constructor(){this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.getFieldNames().includes(e))return s.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.hasField(e))return s.getFieldValue(e)}throw new _t("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let s=0;s<this.segments.length;s++){let i=this.segments[s];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new _t("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let h=class extends Error{constructor(e){super(e),this.name="DecodingError"}},_e=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class P{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new _e("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length;i++)i===0?s[e.length-(i+1)]=1:s[e.length-(i+1)]=s[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}class Tt{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);encode(e){if(!/^[0-1]*$/.test(e))throw new _e("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=P.decode(i),o=Tt.DICT.charAt(r);t+=o,s+=6}catch{throw new _e("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new h("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=Tt.REVERSE_DICT.get(i),o=P.encode(r,6);t+=o}return t}}class U extends Tt{static instance=new U;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class f{static instance=new f;constructor(){}static getInstance(){return this.instance}encode(e,t){let s="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);s+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return s}decode(e,t,s){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(s.containsKey(o)){let a=s.get(o);try{let l=a.substring(e,i);a.decode(l),i+=l.length}catch(l){if(l.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new h("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class it{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let s="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(s="1"+s,e-=r):s="0"+s}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new h("Undecodable FibonacciInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length-1;i++)i===0?s.push(1):i===1?s.push(2):s.push(s[i-1]+s[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}let rt=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new _e("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new h("Undecodable Boolean '"+e+"'")}};class is{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=P.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+it.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let l=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+it.encode(a)+it.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=P.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=rt.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),E=it.decode(e.substring(r,l+2))+i;i=E,r=l+2,l=e.indexOf("11",r);let d=it.decode(e.substring(r,l+2))+i;i=d,r=l+2;for(let S=E;S<=d;S++)t.push(S)}else{let l=e.indexOf("11",r),E=it.decode(e.substring(r,l+2))+i;i=E,t.push(E),r=l+2}}return t}}class tn extends Error{constructor(e){super(e),this.name="ValidationError"}}class Ve{hardFailIfMissing;validator;value;constructor(e=!0){this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new tn("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class Pe extends h{constructor(e){super(e),this.name="SubstringError"}}class X{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new Pe("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class sn extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return is.encode(this.value)}catch(e){throw new _e(e)}}decode(e){try{this.value=is.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=P.decode(X.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i=e.indexOf("11",e.indexOf("11",i+1)+2)+2:i=e.indexOf("11",i+1)+2;return X.substring(e,t,i)}catch(s){throw new Pe(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class c extends Ve{bitStringLength;constructor(e,t,s=!0){super(s),this.bitStringLength=e,this.setValue(t)}encode(){try{return P.encode(this.value,this.bitStringLength)}catch(e){throw new _e(e)}}decode(e){try{this.value=P.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+this.bitStringLength)}catch(s){throw new Pe(s)}}}class w{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var Fe;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(Fe||(Fe={}));const nn=[Fe.ID,Fe.VERSION,Fe.SECTION_IDS];class A{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new _t("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new _t(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class rn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return nn}initializeFields(){let e=new w;return e.put(Fe.ID.toString(),new c(6,Me.ID)),e.put(Fe.VERSION.toString(),new c(6,Me.VERSION)),e.put(Fe.SECTION_IDS.toString(),new sn([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Me extends Q{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Me.ID}getName(){return Me.NAME}getVersion(){return Me.VERSION}initializeSegments(){let e=[];return e.push(new rn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var p;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.POLICY_VERSION="PolicyVersion",n.IS_SERVICE_SPECIFIC="IsServiceSpecific",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",n.PURPOSE_CONSENTS="PurposeConsents",n.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",n.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",n.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",n.VENDOR_CONSENTS="VendorConsents",n.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",n.PUBLISHER_RESTRICTIONS="PublisherRestrictions",n.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",n.PUBLISHER_CONSENTS="PublisherConsents",n.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",n.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",n.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",n.VENDORS_ALLOWED="VendorsAllowed",n.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",n.VENDORS_DISCLOSED="VendorsDisclosed"})(p||(p={}));const on=[p.VERSION,p.CREATED,p.LAST_UPDATED,p.CMP_ID,p.CMP_VERSION,p.CONSENT_SCREEN,p.CONSENT_LANGUAGE,p.VENDOR_LIST_VERSION,p.POLICY_VERSION,p.IS_SERVICE_SPECIFIC,p.USE_NON_STANDARD_STACKS,p.SPECIAL_FEATURE_OPTINS,p.PURPOSE_CONSENTS,p.PURPOSE_LEGITIMATE_INTERESTS,p.PURPOSE_ONE_TREATMENT,p.PUBLISHER_COUNTRY_CODE,p.VENDOR_CONSENTS,p.VENDOR_LEGITIMATE_INTERESTS,p.PUBLISHER_RESTRICTIONS],an=[p.PUBLISHER_PURPOSES_SEGMENT_TYPE,p.PUBLISHER_CONSENTS,p.PUBLISHER_LEGITIMATE_INTERESTS,p.NUM_CUSTOM_PURPOSES,p.PUBLISHER_CUSTOM_CONSENTS,p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],ln=[p.VENDORS_ALLOWED_SEGMENT_TYPE,p.VENDORS_ALLOWED],cn=[p.VENDORS_DISCLOSED_SEGMENT_TYPE,p.VENDORS_DISCLOSED];class tt extends Tt{static instance=new tt;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class ot{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=P.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+P.encode(t[r][0],16):i+="1"+P.encode(t[r][0],16)+P.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=P.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=rt.decode(e.substring(i,i+1));if(i++,o===!0){let a=P.decode(e.substring(i,i+16));i+=16;let l=P.decode(e.substring(i,i+16));i+=16;for(let E=a;E<=l;E++)t.push(E)}else{let a=P.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Kt extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ot.encode(this.value)}catch(e){throw new _e(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=P.decode(X.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return X.substring(e,t,i)}catch(s){throw new Pe(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class dn{key;type;ids;constructor(e,t,s){this.key=e,this.type=t,this.ids=s}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}class rs extends Ve{keyBitStringLength;typeBitStringLength;constructor(e,t,s,i=!0){super(i),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=P.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=P.encode(i.getKey(),this.keyBitStringLength),t+=P.encode(i.getType(),this.typeBitStringLength),t+=ot.encode(i.getIds())}return t}catch(e){throw new _e(e)}}decode(e){try{let t=[],s=P.decode(X.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=P.decode(X.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=P.decode(X.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Kt([]).substring(e,i),E=ot.decode(l);i+=l.length,t.push(new dn(o,a,E))}this.value=t}catch(t){throw new h(t)}}substring(e,t){try{let s="";s+=X.substring(e,t,t+12);let i=P.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=X.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let l=X.substring(e,r,r+this.typeBitStringLength);r+=l.length,s+=l;let E=new Kt([]).substring(e,r);r+=E.length,s+=E}return s}catch(s){throw new Pe(s)}}}class H extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return rt.encode(this.value)}catch(e){throw new _e(e)}}decode(e){try{this.value=rt.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+1)}catch(s){throw new Pe(s)}}}class os{static encode(e){return e?P.encode(Math.round(e.getTime()/100),36):P.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new h("Undecodable Datetime '"+e+"'");return new Date(P.decode(e)*100)}}class Nt extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return os.encode(this.value)}catch(e){throw new _e(e)}}decode(e){try{this.value=os.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+36)}catch(s){throw new Pe(s)}}}class at{static encode(e,t){if(e.length>t)throw new _e("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=rt.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(rt.decode(e.substring(s,s+1)));return t}}class Ge extends Ve{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return at.encode(this.value,this.numElements)}catch(e){throw new _e(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+this.numElements)}catch(s){throw new Pe(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class as{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=P.encode(63,6);else if(r>=65)s+=P.encode(e.charCodeAt(i)-65,6);else throw new _e("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new h("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=P.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class zt extends Ve{stringLength;constructor(e,t,s=!0){super(s),this.stringLength=e,this.setValue(t)}encode(){try{return as.encode(this.value,this.stringLength)}catch(e){throw new _e(e)}}decode(e){try{this.value=as.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+this.stringLength*6)}catch(s){throw new Pe(s)}}}class qe extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=ot.encode(this.value),s=t.length,i=e;if(s<=i)return P.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return P.encode(e,16)+"0"+at.encode(r,i)}}catch(e){throw new _e(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=ot.decode(e.substring(17));else{let t=[],s=at.decode(e.substring(17));for(let i=0;i<s.length;i++)s[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new h(t)}}substring(e,t){try{let s=P.decode(X.substring(e,t,t+16));return e.charAt(t+16)==="1"?X.substring(e,t,t+17)+new Kt([]).substring(e,t+17):X.substring(e,t,t+17+s)}catch(s){throw new Pe(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class En extends A{base64UrlEncoder=tt.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return on}initializeFields(){let e=new Date,t=new w;return t.put(p.VERSION.toString(),new c(6,Y.VERSION)),t.put(p.CREATED.toString(),new Nt(e)),t.put(p.LAST_UPDATED.toString(),new Nt(e)),t.put(p.CMP_ID.toString(),new c(12,0)),t.put(p.CMP_VERSION.toString(),new c(12,0)),t.put(p.CONSENT_SCREEN.toString(),new c(6,0)),t.put(p.CONSENT_LANGUAGE.toString(),new zt(2,"EN")),t.put(p.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(p.POLICY_VERSION.toString(),new c(6,2)),t.put(p.IS_SERVICE_SPECIFIC.toString(),new H(!1)),t.put(p.USE_NON_STANDARD_STACKS.toString(),new H(!1)),t.put(p.SPECIAL_FEATURE_OPTINS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_CONSENTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_ONE_TREATMENT.toString(),new H(!1)),t.put(p.PUBLISHER_COUNTRY_CODE.toString(),new zt(2,"AA")),t.put(p.VENDOR_CONSENTS.toString(),new qe([])),t.put(p.VENDOR_LEGITIMATE_INTERESTS.toString(),new qe([])),t.put(p.PUBLISHER_RESTRICTIONS.toString(),new rs(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class Ot extends Ve{getLength;constructor(e,t,s=!0){super(s),this.getLength=e,this.setValue(t)}encode(){try{return at.encode(this.value,this.getLength())}catch(e){throw new _e(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+this.getLength())}catch(s){throw new Pe(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),s=[...e];for(let i=s.length;i<t;i++)s.push(!1);s.length>t&&(s=s.slice(0,t)),super.setValue([...s])}}class un extends A{base64UrlEncoder=tt.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return an}initializeFields(){let e=new w;e.put(p.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(p.PUBLISHER_CONSENTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(p.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(p.NUM_CUSTOM_PURPOSES.toString(),t),e.put(p.PUBLISHER_CUSTOM_CONSENTS.toString(),new Ot(()=>t.getValue(),[])),e.put(p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new Ot(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class Sn extends A{base64UrlEncoder=tt.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ln}initializeFields(){let e=new w;return e.put(p.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(p.VENDORS_ALLOWED.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class _n extends A{base64UrlEncoder=tt.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return cn}initializeFields(){let e=new w;return e.put(p.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(p.VENDORS_DISCLOSED.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class Y extends Q{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Y.ID}getName(){return Y.NAME}getVersion(){return Y.VERSION}initializeSegments(){let e=[];return e.push(new En),e.push(new un),e.push(new Sn),e.push(new _n),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[3].decode(s[i]);else if(o>="Q"&&o<="X")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(p.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode()))),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==p.CREATED&&e!==p.LAST_UPDATED){let s=new Date;super.setFieldValue(p.CREATED,s),super.setFieldValue(p.LAST_UPDATED,s)}}}var T;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(T||(T={}));const hn=[T.VERSION,T.CREATED,T.LAST_UPDATED,T.CMP_ID,T.CMP_VERSION,T.CONSENT_SCREEN,T.CONSENT_LANGUAGE,T.VENDOR_LIST_VERSION,T.TCF_POLICY_VERSION,T.USE_NON_STANDARD_STACKS,T.SPECIAL_FEATURE_EXPRESS_CONSENT,T.PURPOSES_EXPRESS_CONSENT,T.PURPOSES_IMPLIED_CONSENT,T.VENDOR_EXPRESS_CONSENT,T.VENDOR_IMPLIED_CONSENT,T.PUB_RESTRICTIONS],pn=[T.PUB_PURPOSES_SEGMENT_TYPE,T.PUB_PURPOSES_EXPRESS_CONSENT,T.PUB_PURPOSES_IMPLIED_CONSENT,T.NUM_CUSTOM_PURPOSES,T.CUSTOM_PURPOSES_EXPRESS_CONSENT,T.CUSTOM_PURPOSES_IMPLIED_CONSENT],gn=[T.DISCLOSED_VENDORS_SEGMENT_TYPE,T.DISCLOSED_VENDORS];class Tn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return hn}initializeFields(){let e=new Date,t=new w;return t.put(T.VERSION.toString(),new c(6,Te.VERSION)),t.put(T.CREATED.toString(),new Nt(e)),t.put(T.LAST_UPDATED.toString(),new Nt(e)),t.put(T.CMP_ID.toString(),new c(12,0)),t.put(T.CMP_VERSION.toString(),new c(12,0)),t.put(T.CONSENT_SCREEN.toString(),new c(6,0)),t.put(T.CONSENT_LANGUAGE.toString(),new zt(2,"EN")),t.put(T.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(T.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(T.USE_NON_STANDARD_STACKS.toString(),new H(!1)),t.put(T.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(T.PURPOSES_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(T.PURPOSES_IMPLIED_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(T.VENDOR_EXPRESS_CONSENT.toString(),new qe([])),t.put(T.VENDOR_IMPLIED_CONSENT.toString(),new qe([])),t.put(T.PUB_RESTRICTIONS.toString(),new rs(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class In extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return pn}initializeFields(){let e=new w;e.put(T.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(T.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(T.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(T.NUM_CUSTOM_PURPOSES.toString(),t),e.put(T.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new Ot(()=>t.getValue(),[])),e.put(T.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new Ot(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Nn extends A{base64UrlEncoder=tt.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gn}initializeFields(){let e=new w;return e.put(T.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(T.DISCLOSED_VENDORS.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Te extends Q{static ID=5;static VERSION=1;static NAME="tcfcav1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Te.ID}getName(){return Te.NAME}getVersion(){return Te.VERSION}initializeSegments(){let e=[];return e.push(new Tn),e.push(new In),e.push(new Nn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(T.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==T.CREATED&&e!==T.LAST_UPDATED){let s=new Date;super.setFieldValue(T.CREATED,s),super.setFieldValue(T.LAST_UPDATED,s)}}}class Yt{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class On{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}class fn{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var he;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(he||(he={}));const An=[he.VERSION,he.NOTICE,he.OPT_OUT_SALE,he.LSPA_COVERED];class Cn extends A{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return An}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new fn;return t.put(he.VERSION,new On(Ie.VERSION)),t.put(he.NOTICE,new Yt("-",e)),t.put(he.OPT_OUT_SALE,new Yt("-",e)),t.put(he.LSPA_COVERED,new Yt("-",e)),t}encodeSegment(e){let t="";return t+=e.get(he.VERSION).getValue(),t+=e.get(he.NOTICE).getValue(),t+=e.get(he.OPT_OUT_SALE).getValue(),t+=e.get(he.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new h("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(he.VERSION).setValue(parseInt(e.substring(0,1))),t.get(he.NOTICE).setValue(e.charAt(1)),t.get(he.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(he.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new h("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Ie extends Q{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ie.ID}getName(){return Ie.NAME}getVersion(){return Ie.VERSION}initializeSegments(){let e=[];return e.push(new Cn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var I;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(I||(I={}));const wn=[I.VERSION,I.SHARING_NOTICE,I.SALE_OPT_OUT_NOTICE,I.SHARING_OPT_OUT_NOTICE,I.TARGETED_ADVERTISING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_LIMIT_USE_NOTICE,I.SALE_OPT_OUT,I.SHARING_OPT_OUT,I.TARGETED_ADVERTISING_OPT_OUT,I.SENSITIVE_DATA_PROCESSING,I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,I.PERSONAL_DATA_CONSENTS,I.MSPA_COVERED_TRANSACTION,I.MSPA_OPT_OUT_OPTION_MODE,I.MSPA_SERVICE_PROVIDER_MODE],Pn=[I.GPC_SEGMENT_TYPE,I.GPC];class ls{static encode(e,t,s){if(e.length>s)throw new _e("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=P.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new h("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new h("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(P.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}class W extends Ve{elementBitStringLength;numElements;constructor(e,t,s=!0){super(s),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return ls.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new _e(e)}}decode(e){try{this.value=ls.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new Pe(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class Dn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(I.VERSION.toString(),new c(6,j.VERSION)),i.put(I.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(I.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(I.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(I.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(I.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);s.length==66&&(s=s.substring(0,48)+"00000000"+s.substring(48,52)+"00"+s.substring(52,62)),this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNatCoreSegment '"+e+"'")}}}class mn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pn}initializeFields(){let e=new w;return e.put(I.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(I.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(I.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNatGpcSegment '"+e+"'")}}}class j extends Q{static ID=7;static VERSION=1;static NAME="usnat";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return j.ID}getName(){return j.NAME}getVersion(){return j.VERSION}initializeSegments(){let e=[];return e.push(new Dn),e.push(new mn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(I.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var D;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(D||(D={}));const Vn=[D.VERSION,D.SALE_OPT_OUT_NOTICE,D.SHARING_OPT_OUT_NOTICE,D.SENSITIVE_DATA_LIMIT_USE_NOTICE,D.SALE_OPT_OUT,D.SHARING_OPT_OUT,D.SENSITIVE_DATA_PROCESSING,D.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,D.PERSONAL_DATA_CONSENTS,D.MSPA_COVERED_TRANSACTION,D.MSPA_OPT_OUT_OPTION_MODE,D.MSPA_SERVICE_PROVIDER_MODE],Rn=[D.GPC_SEGMENT_TYPE,D.GPC];class Mn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(D.VERSION.toString(),new c(6,J.VERSION)),i.put(D.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(D.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(D.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(D.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(D.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(D.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(D.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0]).withValidator(s)),i.put(D.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(D.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(D.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(D.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCaCoreSegment '"+e+"'")}}}class bn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Rn}initializeFields(){let e=new w;return e.put(D.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(D.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(D.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCaGpcSegment '"+e+"'")}}}class J extends Q{static ID=8;static VERSION=1;static NAME="usca";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return J.ID}getName(){return J.NAME}getVersion(){return J.VERSION}initializeSegments(){let e=[];return e.push(new Mn),e.push(new bn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(D.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(D.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(D.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var $;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})($||($={}));const Ln=[$.VERSION,$.SHARING_NOTICE,$.SALE_OPT_OUT_NOTICE,$.TARGETED_ADVERTISING_OPT_OUT_NOTICE,$.SALE_OPT_OUT,$.TARGETED_ADVERTISING_OPT_OUT,$.SENSITIVE_DATA_PROCESSING,$.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,$.MSPA_COVERED_TRANSACTION,$.MSPA_OPT_OUT_OPTION_MODE,$.MSPA_SERVICE_PROVIDER_MODE];class Gn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ln}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put($.VERSION.toString(),new c(6,Ee.VERSION)),i.put($.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put($.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsVaCoreSegment '"+e+"'")}}}class Ee extends Q{static ID=9;static VERSION=1;static NAME="usva";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ee.ID}getName(){return Ee.NAME}getVersion(){return Ee.VERSION}initializeSegments(){let e=[];return e.push(new Gn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var F;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(F||(F={}));const vn=[F.VERSION,F.SHARING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],yn=[F.GPC_SEGMENT_TYPE,F.GPC];class Un extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return vn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(F.VERSION.toString(),new c(6,Z.VERSION)),i.put(F.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCoCoreSegment '"+e+"'")}}}class Fn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new w;return e.put(F.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(F.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCoGpcSegment '"+e+"'")}}}class Z extends Q{static ID=10;static VERSION=1;static NAME="usco";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Z.ID}getName(){return Z.NAME}getVersion(){return Z.VERSION}initializeSegments(){let e=[];return e.push(new Un),e.push(new Fn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(F.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var K;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(K||(K={}));const xn=[K.VERSION,K.SHARING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_OPT_OUT_NOTICE,K.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,K.SALE_OPT_OUT,K.TARGETED_ADVERTISING_OPT_OUT,K.SENSITIVE_DATA_PROCESSING,K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,K.MSPA_COVERED_TRANSACTION,K.MSPA_OPT_OUT_OPTION_MODE,K.MSPA_SERVICE_PROVIDER_MODE];class Bn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return xn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(K.VERSION.toString(),new c(6,ue.VERSION)),i.put(K.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(K.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(K.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(K.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsUtCoreSegment '"+e+"'")}}}class ue extends Q{static ID=11;static VERSION=1;static NAME="usut";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ue.ID}getName(){return ue.NAME}getVersion(){return ue.VERSION}initializeSegments(){let e=[];return e.push(new Bn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var x;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const Hn=[x.VERSION,x.SHARING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],kn=[x.GPC_SEGMENT_TYPE,x.GPC];class Kn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(x.VERSION.toString(),new c(6,ee.VERSION)),i.put(x.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCtCoreSegment '"+e+"'")}}}class zn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return kn}initializeFields(){let e=new w;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(x.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCtGpcSegment '"+e+"'")}}}class ee extends Q{static ID=12;static VERSION=1;static NAME="usct";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ee.ID}getName(){return ee.NAME}getVersion(){return ee.VERSION}initializeSegments(){let e=[];return e.push(new Kn),e.push(new zn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var z;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(z||(z={}));const Yn=[z.VERSION,z.PROCESSING_NOTICE,z.SALE_OPT_OUT_NOTICE,z.TARGETED_ADVERTISING_OPT_OUT_NOTICE,z.SALE_OPT_OUT,z.TARGETED_ADVERTISING_OPT_OUT,z.SENSITIVE_DATA_PROCESSING,z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,z.ADDITIONAL_DATA_PROCESSING_CONSENT,z.MSPA_COVERED_TRANSACTION,z.MSPA_OPT_OUT_OPTION_MODE,z.MSPA_SERVICE_PROVIDER_MODE];class Wn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(z.VERSION.toString(),new c(6,Se.VERSION)),i.put(z.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(z.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(z.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(z.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsFlCoreSegment '"+e+"'")}}}class Se extends Q{static ID=13;static VERSION=1;static NAME="usfl";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Se.ID}getName(){return Se.NAME}getVersion(){return Se.VERSION}initializeSegments(){let e=[];return e.push(new Wn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var m;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(m||(m={}));const $n=[m.VERSION,m.SHARING_NOTICE,m.SALE_OPT_OUT_NOTICE,m.TARGETED_ADVERTISING_OPT_OUT_NOTICE,m.SALE_OPT_OUT,m.TARGETED_ADVERTISING_OPT_OUT,m.SENSITIVE_DATA_PROCESSING,m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,m.ADDITIONAL_DATA_PROCESSING_CONSENT,m.MSPA_COVERED_TRANSACTION,m.MSPA_OPT_OUT_OPTION_MODE,m.MSPA_SERVICE_PROVIDER_MODE],jn=[m.GPC_SEGMENT_TYPE,m.GPC];class Qn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return $n}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(m.VERSION.toString(),new c(6,te.VERSION)),i.put(m.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(m.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(m.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsMtCoreSegment '"+e+"'")}}}class Xn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return jn}initializeFields(){let e=new w;return e.put(m.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(m.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(m.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsMtGpcSegment '"+e+"'")}}}class te extends Q{static ID=14;static VERSION=1;static NAME="usmt";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return te.ID}getName(){return te.NAME}getVersion(){return te.VERSION}initializeSegments(){let e=[];return e.push(new Qn),e.push(new Xn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(m.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var V;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(V||(V={}));const qn=[V.VERSION,V.PROCESSING_NOTICE,V.SALE_OPT_OUT_NOTICE,V.TARGETED_ADVERTISING_OPT_OUT_NOTICE,V.SALE_OPT_OUT,V.TARGETED_ADVERTISING_OPT_OUT,V.SENSITIVE_DATA_PROCESSING,V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,V.ADDITIONAL_DATA_PROCESSING_CONSENT,V.MSPA_COVERED_TRANSACTION,V.MSPA_OPT_OUT_OPTION_MODE,V.MSPA_SERVICE_PROVIDER_MODE],Jn=[V.GPC_SEGMENT_TYPE,V.GPC];class Zn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return qn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(V.VERSION.toString(),new c(6,se.VERSION)),i.put(V.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(V.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(V.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsOrCoreSegment '"+e+"'")}}}class ei extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Jn}initializeFields(){let e=new w;return e.put(V.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(V.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsOrGpcSegment '"+e+"'")}}}class se extends Q{static ID=15;static VERSION=1;static NAME="usor";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return se.ID}getName(){return se.NAME}getVersion(){return se.VERSION}initializeSegments(){let e=[];return e.push(new Zn),e.push(new ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(V.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var R;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(R||(R={}));const ti=[R.VERSION,R.PROCESSING_NOTICE,R.SALE_OPT_OUT_NOTICE,R.TARGETED_ADVERTISING_OPT_OUT_NOTICE,R.SALE_OPT_OUT,R.TARGETED_ADVERTISING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.ADDITIONAL_DATA_PROCESSING_CONSENT,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],si=[R.GPC_SEGMENT_TYPE,R.GPC];class ni extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ti}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(R.VERSION.toString(),new c(6,ne.VERSION)),i.put(R.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTxCoreSegment '"+e+"'")}}}class ii extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return si}initializeFields(){let e=new w;return e.put(R.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(R.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTxGpcSegment '"+e+"'")}}}class ne extends Q{static ID=16;static VERSION=1;static NAME="ustx";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ne.ID}getName(){return ne.NAME}getVersion(){return ne.VERSION}initializeSegments(){let e=[];return e.push(new ni),e.push(new ii),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var M;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const ri=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.ADDITIONAL_DATA_PROCESSING_CONSENT,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],oi=[M.GPC_SEGMENT_TYPE,M.GPC];class ai extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ri}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(M.VERSION.toString(),new c(6,ie.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsDeCoreSegment '"+e+"'")}}}class li extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return oi}initializeFields(){let e=new w;return e.put(M.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(M.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsDeGpcSegment '"+e+"'")}}}class ie extends Q{static ID=17;static VERSION=1;static NAME="usde";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ie.ID}getName(){return ie.NAME}getVersion(){return ie.VERSION}initializeSegments(){let e=[];return e.push(new ai),e.push(new li),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var b;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(b||(b={}));const ci=[b.VERSION,b.PROCESSING_NOTICE,b.SALE_OPT_OUT_NOTICE,b.TARGETED_ADVERTISING_OPT_OUT_NOTICE,b.SENSITIVE_DATA_OPT_OUT_NOTICE,b.SALE_OPT_OUT,b.TARGETED_ADVERTISING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],di=[b.GPC_SEGMENT_TYPE,b.GPC];class Ei extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ci}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(b.VERSION.toString(),new c(6,re.VERSION)),i.put(b.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(b.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsIaCoreSegment '"+e+"'")}}}class ui extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return di}initializeFields(){let e=new w;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(b.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsIaGpcSegment '"+e+"'")}}}class re extends Q{static ID=18;static VERSION=1;static NAME="usia";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return re.ID}getName(){return re.NAME}getVersion(){return re.VERSION}initializeSegments(){let e=[];return e.push(new Ei),e.push(new ui),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(b.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var L;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(L||(L={}));const Si=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],_i=[L.GPC_SEGMENT_TYPE,L.GPC];class hi extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(L.VERSION.toString(),new c(6,oe.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNeCoreSegment '"+e+"'")}}}class pi extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return _i}initializeFields(){let e=new w;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(L.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNeGpcSegment '"+e+"'")}}}class oe extends Q{static ID=19;static VERSION=1;static NAME="usne";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return oe.ID}getName(){return oe.NAME}getVersion(){return oe.VERSION}initializeSegments(){let e=[];return e.push(new hi),e.push(new pi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var G;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(G||(G={}));const gi=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.ADDITIONAL_DATA_PROCESSING_CONSENT,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Ti=[G.GPC_SEGMENT_TYPE,G.GPC];class Ii extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(G.VERSION.toString(),new c(6,ae.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(G.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Ni extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ti}initializeFields(){let e=new w;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(G.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNhGpcSegment '"+e+"'")}}}class ae extends Q{static ID=20;static VERSION=1;static NAME="usnh";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ae.ID}getName(){return ae.NAME}getVersion(){return ae.VERSION}initializeSegments(){let e=[];return e.push(new Ii),e.push(new Ni),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(G.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var v;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(v||(v={}));const Oi=[v.VERSION,v.PROCESSING_NOTICE,v.SALE_OPT_OUT_NOTICE,v.TARGETED_ADVERTISING_OPT_OUT_NOTICE,v.SALE_OPT_OUT,v.TARGETED_ADVERTISING_OPT_OUT,v.SENSITIVE_DATA_PROCESSING,v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,v.ADDITIONAL_DATA_PROCESSING_CONSENT,v.MSPA_COVERED_TRANSACTION,v.MSPA_OPT_OUT_OPTION_MODE,v.MSPA_SERVICE_PROVIDER_MODE],fi=[v.GPC_SEGMENT_TYPE,v.GPC];class Ai extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Oi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(v.VERSION.toString(),new c(6,le.VERSION)),i.put(v.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put(v.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(v.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNjCoreSegment '"+e+"'")}}}class Ci extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return fi}initializeFields(){let e=new w;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(v.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNjGpcSegment '"+e+"'")}}}class le extends Q{static ID=21;static VERSION=1;static NAME="usnj";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return le.ID}getName(){return le.NAME}getVersion(){return le.VERSION}initializeSegments(){let e=[];return e.push(new Ai),e.push(new Ci),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(v.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var y;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(y||(y={}));const wi=[y.VERSION,y.PROCESSING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],Pi=[y.GPC_SEGMENT_TYPE,y.GPC];class Di extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(y.VERSION.toString(),new c(6,ce.VERSION)),i.put(y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTnCoreSegment '"+e+"'")}}}class mi extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}initializeFields(){let e=new w;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(y.GPC.toString(),new H(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTnGpcSegment '"+e+"'")}}}class ce extends Q{static ID=22;static VERSION=1;static NAME="ustn";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ce.ID}getName(){return ce.NAME}getVersion(){return ce.VERSION}initializeSegments(){let e=[];return e.push(new Di),e.push(new mi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(y.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class q{static SECTION_ID_NAME_MAP=new Map([[Y.ID,Y.NAME],[Te.ID,Te.NAME],[Ie.ID,Ie.NAME],[j.ID,j.NAME],[J.ID,J.NAME],[Ee.ID,Ee.NAME],[Z.ID,Z.NAME],[ue.ID,ue.NAME],[ee.ID,ee.NAME],[Se.ID,Se.NAME],[te.ID,te.NAME],[se.ID,se.NAME],[ne.ID,ne.NAME],[ie.ID,ie.NAME],[re.ID,re.NAME],[oe.ID,oe.NAME],[ae.ID,ae.NAME],[le.ID,le.NAME],[ce.ID,ce.NAME]]);static SECTION_ORDER=[Y.NAME,Te.NAME,Ie.NAME,j.NAME,J.NAME,Ee.NAME,Z.NAME,ue.NAME,ee.NAME,Se.NAME,te.NAME,se.NAME,ne.NAME,ie.NAME,re.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME]}class cs{sections=new Map;encodedString=null;decoded=!0;dirty=!1;constructor(e){e&&this.decode(e)}setFieldValue(e,t,s){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===Te.NAME?(i=new Te,this.sections.set(Te.NAME,i)):e===Y.NAME?(i=new Y,this.sections.set(Y.NAME,i)):e===Ie.NAME?(i=new Ie,this.sections.set(Ie.NAME,i)):e===j.NAME?(i=new j,this.sections.set(j.NAME,i)):e===J.NAME?(i=new J,this.sections.set(J.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===Z.NAME?(i=new Z,this.sections.set(Z.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===ee.NAME?(i=new ee,this.sections.set(ee.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===te.NAME?(i=new te,this.sections.set(te.NAME,i)):e===se.NAME?(i=new se,this.sections.set(se.NAME,i)):e===ne.NAME?(i=new ne,this.sections.set(ne.NAME,i)):e===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===oe.NAME?(i=new oe,this.sections.set(oe.NAME,i)):e===ae.NAME?(i=new ae,this.sections.set(ae.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===ce.NAME&&(i=new ce,this.sections.set(ce.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new _t(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(q.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(q.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).hasField(t):!1}hasFieldBySectionId(e,t){return this.hasField(q.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(q.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(q.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new Me;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<q.SECTION_ORDER.length;t++){let s=q.SECTION_ORDER[t];if(this.sections.has(s)){let i=this.sections.get(s);e.push(i.getId())}}return e}encodeModel(e){let t=[],s=[];for(let r=0;r<q.SECTION_ORDER.length;r++){let o=q.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);a.setIsDirty(!0),t.push(a.encode()),s.push(a.getId())}}let i=new Me;return i.setFieldValue("SectionIds",s),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),s=new Map;if(t[0].startsWith("D")){let r=new Me(t[0]).getFieldValue("SectionIds");if(r.length!==t.length-1)throw new h("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let o=0;o<r.length;o++){if(t[o+1].trim()==="")throw new h("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Te.ID){let l=new Te(t[o+1]);s.set(Te.NAME,l)}else if(r[o]===Y.ID){let l=new Y(t[o+1]);s.set(Y.NAME,l)}else if(r[o]===Ie.ID){let l=new Ie(t[o+1]);s.set(Ie.NAME,l)}else if(r[o]===j.ID){let l=new j(t[o+1]);s.set(j.NAME,l)}else if(r[o]===J.ID){let l=new J(t[o+1]);s.set(J.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);s.set(Ee.NAME,l)}else if(r[o]===Z.ID){let l=new Z(t[o+1]);s.set(Z.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);s.set(ue.NAME,l)}else if(r[o]===ee.ID){let l=new ee(t[o+1]);s.set(ee.NAME,l)}else if(r[o]===Se.ID){let l=new Se(t[o+1]);s.set(Se.NAME,l)}else if(r[o]===te.ID){let l=new te(t[o+1]);s.set(te.NAME,l)}else if(r[o]===se.ID){let l=new se(t[o+1]);s.set(se.NAME,l)}else if(r[o]===ne.ID){let l=new ne(t[o+1]);s.set(ne.NAME,l)}else if(r[o]===ie.ID){let l=new ie(t[o+1]);s.set(ie.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);s.set(re.NAME,l)}else if(r[o]===oe.ID){let l=new oe(t[o+1]);s.set(oe.NAME,l)}else if(r[o]===ae.ID){let l=new ae(t[o+1]);s.set(ae.NAME,l)}else if(r[o]===le.ID){let l=new le(t[o+1]);s.set(le.NAME,l)}else if(r[o]===ce.ID){let l=new ce(t[o+1]);s.set(ce.NAME,l)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new Y(e);return t.set(Y.NAME,s),new Me().setFieldValue(Fe.SECTION_IDS,[2]),t.set(Me.NAME,s),t}else throw new h("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(q.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let s=null;this.sections.has(e)?s=this.sections.get(e):e===Te.NAME?(s=new Te,this.sections.set(Te.NAME,s)):e===Y.NAME?(s=new Y,this.sections.set(Y.NAME,s)):e===Ie.NAME?(s=new Ie,this.sections.set(Ie.NAME,s)):e===j.NAME?(s=new j,this.sections.set(j.NAME,s)):e===J.NAME?(s=new J,this.sections.set(J.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===Z.NAME?(s=new Z,this.sections.set(Z.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===ee.NAME?(s=new ee,this.sections.set(ee.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===te.NAME?(s=new te,this.sections.set(te.NAME,s)):e===se.NAME?(s=new se,this.sections.set(se.NAME,s)):e===ne.NAME?(s=new ne,this.sections.set(ne.NAME,s)):e===ie.NAME?(s=new ie,this.sections.set(ie.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===oe.NAME?(s=new oe,this.sections.set(oe.NAME,s)):e===ae.NAME?(s=new ae,this.sections.set(ae.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===ce.NAME&&(s=new ce,this.sections.set(ce.NAME,s)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(q.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e={};for(let t=0;t<q.SECTION_ORDER.length;t++){let s=q.SECTION_ORDER[t];this.sections.has(s)&&(e[s]=this.sections.get(s).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Vi{gppVersion="1.1";supportedAPIs=[];eventQueue=new en(this);cmpStatus=nt.LOADING;cmpDisplayStatus=ze.HIDDEN;signalStatus=me.NOT_READY;applicableSections=[];gppModel=new cs;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=nt.LOADING,this.cmpDisplayStatus=ze.HIDDEN,this.signalStatus=me.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new cs,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class Wt{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let _=a.response;if(typeof _=="string")try{_=JSON.parse(_)}catch{}r(_)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},E=()=>{o(new Error("error"))},d=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",d),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}let ft=class extends Error{constructor(e){super(e),this.name="GVLError"}},Ri=class Ft{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH"]);has(e){return Ft.langSet.has(e)}forEach(e){Ft.langSet.forEach(e)}get size(){return Ft.langSet.size}},ds=class xt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Ri;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=xt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new xt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new ft("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new ft("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new xt;if(s.baseUrl=t,e.languageFilename?s.languageFilename=e.languageFilename:s.languageFilename="purposes-[LANG].json",e.version>0){let i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");let r=t+i.replace("[VERSION]",String(e.version));s.populate(await Wt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(await Wt.fetch(r))}return s}async changeLanguage(e){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const s=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(await Wt.fetch(s))}catch(i){throw new ft("unable to load language: "+i.message)}}}else throw new ft(`unsupported language ${e}`)}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};class Mi{callResponder;cmpApiContext;constructor(e,t,s){this.cmpApiContext=new Vi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new Zs(this.cmpApiContext,s)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(q.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(q.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(q.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(q.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(q.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(q.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(q.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return ds.fromVendorList(e)}async getGvlFromUrl(e){return ds.fromUrl(e)}}const bi=()=>{if(window.Fides?.options.tcfEnabled&&!window.Fides?.options.gppEnabled&&!window.Fides?.experience?.privacy_notices?.length)return!1;if(window.navigator?.globalPrivacyControl===!0)return window.navigator.globalPrivacyControl;const e=new URL(window.location.href).searchParams.get("globalPrivacyControl");return e==="true"?!0:e==="false"?!1:window.navigator?.globalPrivacyControl},$t=()=>typeof window>"u"?{}:{globalPrivacyControl:bi()},Li="en";class Gi{constructor(e,t,s){this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Es;(n=>{(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFgdprApplies||(n.IABTCFgdprApplies={})),(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFPurposeOneTreatment||(n.IABTCFPurposeOneTreatment={})),(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFUseNonStandardTexts||(n.IABTCFUseNonStandardTexts={}))})(Es||(Es={}));var lt=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(lt||{}),Ce=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(Ce||{}),At=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(At||{}),ct=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(ct||{}),Je=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))(Je||{}),dt=(n=>(n.OVERLAY="overlay",n.BANNER_AND_MODAL="banner_and_modal",n.MODAL="modal",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.HEADLESS="headless",n))(dt||{}),ve=(n=>(n.BUTTON="button",n.REJECT="reject",n.ACCEPT="accept",n.SCRIPT="script",n.SAVE="save",n.DISMISS="dismiss",n.GPC="gpc",n.INDIVIDUAL_NOTICE="individual_notice",n.ACKNOWLEDGE="acknowledge",n.EXTERNAL_PROVIDER="external_provider",n))(ve||{});const vi=(n,e)=>!!Object.keys(e).includes(n.notice_key),jt=n=>!n||n===Ce.OPT_OUT?!1:n===Ce.OPT_IN?!0:n===Ce.ACKNOWLEDGE,Ct=(n,e)=>n?e===lt.NOTICE_ONLY?Ce.ACKNOWLEDGE:Ce.OPT_IN:Ce.OPT_OUT,yi=n=>typeof n=="string"?jt(n):n,Ui=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i,Et=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,us=n=>!!(n&&n.every(e=>e.default_preference===Ce.OPT_IN)),Fi=n=>{if(n){if(n.location&&Ui.test(n.location))return n.location.replace("-","_").toLowerCase();if(n.country&&n.region)return`${n.country.toLowerCase()}_${n.region.toLowerCase()}`}},Ss=n=>n.fidesConsentOverride===ve.ACCEPT||n.fidesConsentOverride===ve.REJECT,xi=(n,e,t,s)=>s?.fidesDisableBanner||!Et(n)||s.fidesModalDisplay==="immediate"||n.experience_config?.component===dt.TCF_OVERLAY&&n.vendor_count===0?!1:n.experience_config?.component===dt.TCF_OVERLAY&&e?s&&Ss(s)?!1:n.meta?.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:n.experience_config?.component===dt.MODAL||n.experience_config?.component===dt.HEADLESS||!n?.privacy_notices?.length?!1:t?s&&Ss(s)?!1:e?.fides_meta.consentMethod===ve.GPC?!0:!n.privacy_notices?.every(r=>vi(r,t)):!0,Bi=n=>{if(!n)return{};try{const e=atob(n),t=JSON.parse(e);return Object.fromEntries(Object.entries(t).map(([s,i])=>[s,!!i]))}catch(e){throw new Error("Failed to decode Notice Consent string:",{cause:e})}},Hi=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=At.OMIT})=>{if(!e?.length)return n;const i={...n};return s===At.INCLUDE?e.forEach(r=>{i[r]=t===ct.CONSENT_MECHANISM?Ce.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},ki=({consent:n,flagType:e=ct.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==ct.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,yi(o)]));const i=Object.values(n).some(r=>typeof r=="boolean");if(i&&!t)throw new Error("Cannot transform boolean consent values to consent mechanisms without consent mechanisms map");return i?(Object.keys(n).forEach(r=>{const o=n[r];if(typeof o=="string")s[r]=o;else{const a=t[r];s[r]=Ct(o,a)}}),s):{...n}},_s=(n,e,t=[],s,i,r)=>{const o={...n},a=window.Fides?.options,l=a?.fidesConsentNonApplicableFlagMode??At.OMIT,E=a?.fidesConsentFlagType??ct.BOOLEAN,d={};Object.assign(d,Hi({consent:{},nonApplicableNotices:e??[],flagType:E,mode:l}));const S=t.reduce((B,O)=>({...B,[O.notice_key]:O.consent_mechanism}),{}),_={};return Object.entries(o).forEach(([B,O])=>{r?.includes(B)&&!e?.includes(B)||(_[B]=O)}),Object.assign(d,ki({consent:_,consentMechanisms:S,flagType:E})),d},Ki=(n,e,t)=>new Proxy(n,{get(s,i){if(s[i.toString()]===void 0){const r=e.fidesConsentFlagType===ct.CONSENT_MECHANISM;return!t&&i.toString()==="essential"?r?lt.NOTICE_ONLY:!0:r?lt.OPT_OUT:!1}return s[i.toString()]}});var Qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},wt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */wt.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof Qt=="object"&&Qt;(r.global===r||r.window===r)&&(t=r);var o=function(O){this.message=O};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(O){throw new o(O)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=/[\t\n\f\r ]/g,d=function(O){O=String(O).replace(E,"");var de=O.length;de%4==0&&(O=O.replace(/==?$/,""),de=O.length),(de%4==1||/[^+a-zA-Z0-9/]/.test(O))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var De=0,Ne,Ae,be="",Ke=-1;++Ke<de;)Ae=l.indexOf(O.charAt(Ke)),Ne=De%4?Ne*64+Ae:Ae,De++%4&&(be+=String.fromCharCode(255&Ne>>(-2*De&6)));return be},S=function(O){O=String(O),/[^\0-\xFF]/.test(O)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var de=O.length%3,De="",Ne=-1,Ae,be,Ke,fe,Bt=O.length-de;++Ne<Bt;)Ae=O.charCodeAt(Ne)<<16,be=O.charCodeAt(++Ne)<<8,Ke=O.charCodeAt(++Ne),fe=Ae+be+Ke,De+=l.charAt(fe>>18&63)+l.charAt(fe>>12&63)+l.charAt(fe>>6&63)+l.charAt(fe&63);return de==2?(Ae=O.charCodeAt(Ne)<<8,be=O.charCodeAt(++Ne),fe=Ae+be,De+=l.charAt(fe>>10)+l.charAt(fe>>4&63)+l.charAt(fe<<2&63)+"="):de==1&&(fe=O.charCodeAt(Ne),De+=l.charAt(fe>>2)+l.charAt(fe<<4&63)+"=="),De},_={encode:S,decode:d,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=_;else for(var B in _)_.hasOwnProperty(B)&&(s[B]=_[B]);else t.base64=_})(Qt)}(wt,wt.exports);var hs=wt.exports;/*! js-cookie v3.0.5 | MIT */function Pt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)n[s]=t[s]}return n}var zi={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Xt(n,e){function t(i,r,o){if(!(typeof document>"u")){o=Pt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+n.write(r,i)+a}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var r=document.cookie?document.cookie.split("; "):[],o={},a=0;a<r.length;a++){var l=r[a].split("="),E=l.slice(1).join("=");try{var d=decodeURIComponent(l[0]);if(o[d]=n.read(E,d),i===d)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",Pt({},r,{expires:-1}))},withAttributes:function(i){return Xt(this.converter,Pt({},this.attributes,i))},withConverter:function(i){return Xt(Pt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var Yi=Xt(zi,{path:"/"});let Dt;const Wi=new Uint8Array(16);function $i(){if(!Dt&&(Dt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dt(Wi)}const ge=[];for(let n=0;n<256;++n)ge.push((n+256).toString(16).slice(1));function ji(n,e=0){return ge[n[e+0]]+ge[n[e+1]]+ge[n[e+2]]+ge[n[e+3]]+"-"+ge[n[e+4]]+ge[n[e+5]]+"-"+ge[n[e+6]]+ge[n[e+7]]+"-"+ge[n[e+8]]+ge[n[e+9]]+"-"+ge[n[e+10]]+ge[n[e+11]]+ge[n[e+12]]+ge[n[e+13]]+ge[n[e+14]]+ge[n[e+15]]}const Qi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var ps={randomUUID:Qi};function gs(n,e,t){if(ps.randomUUID&&!n)return ps.randomUUID();n=n||{};const s=n.random||(n.rng||$i)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,ji(s)}var qt=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(qt||{});const Jt=407,mt=",",Xi=[{experienceKey:"tcf_purpose_consents",tcfModelKey:"purposeConsents",enabledIdsKey:"purposesConsent"},{experienceKey:"tcf_purpose_legitimate_interests",tcfModelKey:"purposeLegitimateInterests",enabledIdsKey:"purposesLegint"},{experienceKey:"tcf_special_features",tcfModelKey:"specialFeatureOptins",enabledIdsKey:"specialFeatures"},{experienceKey:"tcf_vendor_consents",tcfModelKey:"vendorConsents",enabledIdsKey:"vendorsConsent"},{experienceKey:"tcf_vendor_legitimate_interests",tcfModelKey:"vendorLegitimateInterests",enabledIdsKey:"vendorsLegint"}],qi=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];Xi.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),qt.CONSENT.toString(),qt.LEGITIMATE_INTERESTS.toString();const Ji={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]},Ts="fides_consent",Zi=365,Is=n=>{const e=(n??"").trim();return e.length>0?`${Ts}_${e}`:Ts},Vt=Yi.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),er=()=>gs();er();const tr=n=>Vt.get(n),sr=n=>{const e=tr(Is(n));if(e)try{return JSON.parse(e)}catch{try{return JSON.parse(hs.decode(e))}catch{return}}},Ns=(n,{base64Cookie:e=!1,fidesCookieSuffix:t}={})=>{if(typeof document>"u")return;const i=new Date().toISOString();n.fides_meta.updatedAt=i;let r=JSON.stringify(n);e&&(r=hs.encode(r));const o=window.location.hostname.split(".");let a="";for(let l=1;l<=o.length;l+=1)if(a=o.slice(-l).join("."),Vt.set(Is(t),r,{path:"/",domain:a,expires:Zi})){const d=sr(t);if(d&&d.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},nr=n=>{const e={};return qi.forEach(({cookieKey:t})=>{const s=n[t]??[];e[t]=Object.fromEntries(s.map(i=>[i.id,jt(i.preference)]))}),e},ir=(n,e=!0,t=!0)=>{const{hostname:s}=window.location;n.forEach(i=>{const r=e?s:i.domain;Vt.remove(i.name,{path:i.path??"/",domain:r}),t&&Vt.remove(i.name,{domain:`.${s}`})})},rr=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,jt(s)]));return Object.fromEntries(e)},or=async(n,e)=>{const s=window.Fides?.experience?.non_applicable_privacy_notices||[];return{...n,consent:rr(e),non_applicable_notice_keys:s}},Ye=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Rt=(n,e)=>{if(!e?.vendors)return;const{source:t,id:s}=Ye(n);if(t==="gvl"||t===void 0)return e.vendors[s]},ar=n=>Ye(n).source==="gacp",lr=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(s=>s.id).filter(s=>Rt(s,n.gvl)).map(s=>+Ye(s).id)},cr=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(i=>Rt(i,n.gvl)).map(i=>+Ye(i).id)},Os=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(mt);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},fs=n=>{const e=n.getGppString();if(!e)return window.Fides.fides_string;const t=new Array(4).fill(""),s=(window.Fides.fides_string?.split(mt)||[]).concat(t);return t.map((r,o)=>o<2?`${s[o]},`:o===2?e:o===3&&s[3]?`,${s[3]}`:r).join("")},dr=1,Mt={us:{name:j.NAME,id:j.ID},us_ca:{name:J.NAME,id:J.ID},us_co:{name:Z.NAME,id:Z.ID},us_ct:{name:ee.NAME,id:ee.ID},us_ut:{name:ue.NAME,id:ue.ID},us_va:{name:Ee.NAME,id:Ee.ID},us_de:{name:ie.NAME,id:ie.ID},us_fl:{name:Se.NAME,id:Se.ID},us_ia:{name:re.NAME,id:re.ID},us_mt:{name:te.NAME,id:te.ID},us_ne:{name:oe.NAME,id:oe.ID},us_nh:{name:ae.NAME,id:ae.ID},us_nj:{name:le.NAME,id:le.ID},us_or:{name:se.NAME,id:se.ID},us_tn:{name:ce.NAME,id:ce.ID},us_tx:{name:ne.NAME,id:ne.ID}},Er=[j.NAME,J.NAME,Z.NAME,ee.NAME,ie.NAME,re.NAME,te.NAME,oe.NAME,ae.NAME,le.NAME,se.NAME,ce.NAME,ne.NAME];var xe=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(xe||{});function ut(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function ur(n){if(n?.experience_config?.translations){const{translations:e}=n.experience_config;return e.find(s=>s.is_default)?.language}}function Sr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>ut(r.language,n));if(i)return i}const s=t.translations.find(i=>ut(i.language,e));return s||t.translations[0]||null}function _r(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>ut(r.language,n));if(i)return i}const s=t.translations.find(i=>ut(i.language,e));return s||t.translations[0]||null}const hr={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},pr="Fides.js",gr=async(n,e,t,s,i)=>{if(t.apiOptions?.savePreferencesFn){try{await t.apiOptions.savePreferencesFn(n,s.consent,s.fides_string,i)}catch(a){return Promise.reject(a)}return Promise.resolve()}const r={...hr,body:JSON.stringify({...e,source:pr})};return(await fetch(`${t.fidesApiUrl}/privacy-preferences`,r)).ok,Promise.resolve()};var bt=(n=>(n.FIDES="fides",n.EXTERNAL="external",n))(bt||{});const As=(n,e,t)=>{const s=e?{...e}:void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const i={consentMethod:s?.fides_meta.consentMethod,...t};t?.trigger?.origin||(i.trigger={...i.trigger,origin:"fides"});const o=performance?.mark?.(n)?.startTime,a=s;a&&s?.consent&&(a.consent=_s(s.consent,window.Fides?.experience?.non_applicable_privacy_notices,window.Fides?.experience?.privacy_notices,void 0,void 0,s.non_applicable_notice_keys));const l=new CustomEvent(n,{detail:{...a,debug:!!window.Fides?.options?.debug,extraDetails:i,timestamp:o},bubbles:!0});window.dispatchEvent(l)}};class Tr{constructor(){this.servedNoticeHistoryId=null}getServedNoticeHistoryId(){return this.servedNoticeHistoryId||(this.servedNoticeHistoryId=gs()),this.servedNoticeHistoryId}reset(){this.servedNoticeHistoryId=null}hasLifecycleId(){return this.servedNoticeHistoryId!==null}}const Ir=new Tr,Nr=[ve.SCRIPT,ve.GPC,ve.EXTERNAL_PROVIDER];async function Or(n,e,t,s,i,r,o,a,l){const E=(r||[]).map(S=>({preference:S.consentPreference,privacy_notice_history_id:S.noticeHistoryId||""})),d={browser_identity:e.identity,preferences:E,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:t.property_id,...o??[]};await gr(s,d,n,e,t)}const fr=async({consentPreferencesToSave:n,privacyExperienceConfigHistoryId:e,experience:t,consentMethod:s,options:i,userLocationString:r,cookie:o,eventExtraDetails:a,servedNoticeHistoryId:l,tcf:E,updateCookie:d})=>{if(!d&&n&&(d=de=>or(de,n)),!d&&!n)throw new Error("updateCookie is required");const S={...a?.trigger,origin:a?.trigger?.origin||(Nr.includes(s)?bt.EXTERNAL:bt.FIDES)},_=await d(o);Object.assign(o,_),Object.assign(o.fides_meta,{consentMethod:s}),As("FidesUpdating",o,{...a,trigger:S});const B=_s(o.consent,window.Fides?.experience?.non_applicable_privacy_notices,window.Fides?.experience?.privacy_notices,void 0,void 0,o.non_applicable_notice_keys),O=!!window.Fides?.experience?.non_applicable_privacy_notices||!!window.Fides?.experience?.privacy_notices;if(window.Fides.consent=Ki(B,i,O),window.Fides.fides_string=o.fides_string,window.Fides.tcf_consent=o.tcf_consent,Ns({...o,consent:B},i),window.Fides.saved_consent=o.consent,!i.fidesDisableSaveApi)try{await Or(i,o,t,s,e,n,E,r,l)}catch{}n&&n.filter(de=>de.consentPreference===Ce.OPT_OUT).forEach(de=>{de.notice?.cookies&&ir(de.notice.cookies,t.experience_config?.cookie_deletion_based_on_host_domain,t.experience_config?.auto_subdomain_cookie_deletion)}),As("FidesUpdated",o,{...a,trigger:S})},Cs=(n,e,t,s)=>Object.entries(t).reduce((i,[r,o])=>{if(i)return i;const a=e.find(S=>S===r);if(a&&!o&&s!==ve.EXTERNAL_PROVIDER)return new Error(`Provided notice key '${r}' is not applicable to the current experience.`);const l=n.find(S=>S.notice_key===r);if(!a&&!l)return new Error(`'${r}' is not a valid notice key`);const d=l?.consent_mechanism===lt.NOTICE_ONLY;return d&&o!==!0&&o!==Ce.ACKNOWLEDGE&&s!==ve.EXTERNAL_PROVIDER?new Error(`Invalid consent value for notice-only notice key: '${r}'. Must be \`true\` or "acknowledge"`):!d&&typeof o!="boolean"&&o!==Ce.OPT_IN&&o!==Ce.OPT_OUT?new Error(`Invalid consent value for notice key: '${r}'. Must be a boolean or "opt_in" or "opt_out"`):null},null),ws=async(n,e)=>{const{experience:t,cookie:s,config:i,locale:r}=n;if(!t)throw new Error("Experience must be initialized before updating consent");if(!i)throw new Error("Config is not initialized");if(!s)throw new Error("Cookie is not initialized");if(!e?.noticeConsent&&!e?.fidesString&&!e?.tcf)throw new Error("Either consent object or fidesString must be provided");if(e?.validation&&!Object.values(Je).includes(e.validation))throw new Error(`Validation must be one of: ${Object.values(Je).join(", ")} (default is ${Je.THROW})`);const{noticeConsent:o,fidesString:a,validation:l=Je.THROW,consentMethod:E=ve.SCRIPT,eventExtraDetails:d={trigger:{origin:bt.EXTERNAL}},tcf:S,updateCookie:_}=e,{experience_config:B,privacy_notices:O,non_applicable_privacy_notices:de}=t,De=ur(t)||Li,Ne=Oe=>{if(l===Je.THROW)throw new Error(Oe);l===Je.WARN&&console.warn(Oe)};let Ae=s.consent||{};if(a)try{const Oe=Os(a);if(Oe.nc){const Qe=Bi(Oe.nc);Ae={...s.consent,...Qe};const Xe=Cs(O||[],de||[],Ae,E);Xe&&Ne(Xe.message)}}catch(Oe){const Qe=Oe instanceof Error?Oe.message:String(Oe);Ne(`Invalid fidesString provided: ${Qe}`)}else if(o){const Oe=Cs(O||[],de||[],o,E);Oe&&Ne(Oe.message),Ae={...s.consent,...o}}const be=[];Object.entries(Ae).forEach(([Oe,Qe])=>{const Xe=O?.find(es=>es.notice_key===Oe);if(Xe){const ts=Sr(r,De,Xe)?.privacy_notice_history_id;let Ht;if(typeof Qe=="boolean"?Ht=Ct(Qe,Xe.consent_mechanism):Ht=Qe,ts){const Ws=new Gi(Xe,Ht,ts);be.push(Ws)}}});let Ke;B?.translations?.length&&(Ke=_r(r,De,B)?.privacy_experience_config_history_id);const fe=Fi(i.geolocation),Bt=Ir.getServedNoticeHistoryId();return fr({consentPreferencesToSave:be,privacyExperienceConfigHistoryId:Ke,experience:t,consentMethod:E,options:i.options,userLocationString:fe,cookie:s,eventExtraDetails:d,servedNoticeHistoryId:Bt,tcf:S,updateCookie:_})};class We extends Error{constructor(e){super(e),this.name="DecodingError"}}class Be extends Error{constructor(e){super(e),this.name="EncodingError"}}class St extends Error{constructor(e){super(e),this.name="GVLError"}}class He extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class Zt{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new Be("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let i=0;i<e.length;i+=this.BASIS)s+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new We("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const i=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class ke{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IS","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return ke.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(ke.langSet.has(e))return e;if(ke.langSet.has(t))return t;const s=t+"-"+t;if(ke.langSet.has(s))return s;for(const i of ke.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){ke.langSet.forEach(e)}get size(){return ke.langSet.size}}class u{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class ht{clone(){const e=new this.constructor;return Object.keys(this).forEach(s=>{const i=this.deepClone(this[s]);i!==void 0&&(e[s]=i)}),e}deepClone(e){const t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){const s=[];for(const i of e)s.push(this.deepClone(i));return e instanceof Array?s:new e.constructor(s)}else{const s={};for(const i in e)e.hasOwnProperty(i)&&(s[i]=this.deepClone(e[i]));return s}}}}var Re;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(Re||(Re={}));class Ue extends ht{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),s=new Ue;if(t.length!==2)throw new He("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${Ue.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===Re.NOT_ALLOWED||this.restrictionType===Re.REQUIRE_CONSENT||this.restrictionType===Re.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class Ps extends ht{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[s];if(r)if(e===Re.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case Re.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case Re.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(s))this.map.set(s,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(s).add(o)}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const s=new Set;this.map.forEach(i=>{i.forEach(r=>{s.add(r)})}),t=Array.from(s)}return t.sort((s,i)=>s-i)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(s===void 0||s>i.restrictionType)&&(s=i.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!s;r++)s=t.isSameAs(i[r]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,i)=>{e?s.has(e)&&t.push(Ue.unHash(i)):t.push(Ue.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(Ue.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,i=this.map.get(s);i&&(i.delete(e),i.size==0&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,s)=>{const i=Ue.unHash(s);Array.from(t).forEach(o=>{this.isOkToHave(i.restrictionType,i.purposeId,o)||t.delete(o)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}}var Ds;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(Ds||(Ds={}));var k;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(k||(k={}));class ms{static ID_TO_KEY=[k.CORE,k.VENDORS_DISCLOSED,k.VENDORS_ALLOWED,k.PUBLISHER_TC];static KEY_TO_ID={[k.CORE]:0,[k.VENDORS_DISCLOSED]:1,[k.VENDORS_ALLOWED]:2,[k.PUBLISHER_TC]:3}}class we extends ht{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(s=>{let i=Number.isInteger(parseInt(s,10));return i=i&&this.isValidNumber(e[s].id),i=i&&e[s].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new He("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set,this.maxId_=0}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[u.cmpId]=12;static[u.cmpVersion]=12;static[u.consentLanguage]=12;static[u.consentScreen]=6;static[u.created]=36;static[u.isServiceSpecific]=1;static[u.lastUpdated]=36;static[u.policyVersion]=6;static[u.publisherCountryCode]=12;static[u.publisherLegitimateInterests]=24;static[u.publisherConsents]=24;static[u.purposeConsents]=24;static[u.purposeLegitimateInterests]=24;static[u.purposeOneTreatment]=1;static[u.specialFeatureOptins]=12;static[u.useNonStandardTexts]=1;static[u.vendorListVersion]=12;static[u.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class ye{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class C{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new Be(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new We("invalid bit length");return parseInt(e,2)}}class Vs{static encode(e,t){return C.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new We("invalid bit length");const s=new Date;return s.setTime(C.decode(e,t)*100),s}}class $e{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=ye.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new We("bitfield encoding length mismatch");const s=new we;for(let i=1;i<=t;i++)ye.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class Rs{static encode(e,t){e=e.toUpperCase();const s=65,i=e.charCodeAt(0)-s,r=e.charCodeAt(1)-s;if(i<0||i>25||r<0||r>25)throw new Be(`invalid language code: ${e}`);if(t%2===1)throw new Be(`numBits must be even, ${t} is not valid`);t=t/2;const o=C.encode(i,t),a=C.encode(r,t);return o+a}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=C.decode(e.slice(0,r),r)+65,a=C.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new We("invalid bit length for language");return s}}class Ar{static encode(e){let t=C.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const s=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=C.encode(i.purposeId,g.purposeId),t+=C.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,E="";for(let d=0;d<o;d++){const S=r[d];if(l===0&&(a++,l=S),d===o-1||r[d+1]>s(S,r[o-1])){const _=S!==l;E+=ye.encode(_),E+=C.encode(l,g.vendorId),_&&(E+=C.encode(S,g.vendorId)),l=0}}t+=C.encode(a,g.numEntries),t+=E})}return t}static decode(e){let t=0;const s=new Ps,i=C.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=C.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=C.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new Ue(o,a),E=C.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let d=0;d<E;d++){const S=ye.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const _=C.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,S){const B=C.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,B<_)throw new We(`Invalid RangeEntry: endVendorId ${B} is less than ${_}`);for(let O=_;O<=B;O++)s.add(O,l)}else s.add(_,l)}}return s.bitLength=t,s}}var pt;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(pt||(pt={}));class gt{static encode(e){const t=[];let s=[],i=C.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,E=g.vendorId*2+g.singleOrRange+g.numEntries;let d=a+g.numEntries;return e.forEach((S,_)=>{r+=ye.encode(S),o=e.maxId>E&&d<l,o&&S&&(e.has(_+1)?s.length===0&&(s.push(_),d+=g.singleOrRange,d+=g.vendorId):(s.push(_),d+=g.vendorId,t.push(s),s=[]))}),o?(i+=String(pt.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(pt.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=C.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=C.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===pt.RANGE){if(s=new we,t===1){if(e.substr(i,1)==="1")throw new We("Unable to decode default consent=1");i++}const a=C.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const E=ye.decode(e.charAt(i));i+=g.singleOrRange;const d=C.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,E){const S=C.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let _=d;_<=S;_++)s.set(_)}else s.set(d)}}else{const a=e.substr(i,r);i+=r,s=$e.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=C.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=ye.encode(!r),s+=C.encode(i[0],g.vendorId),r||(s+=C.encode(i[1],g.vendorId))}),s}}function Ms(){return{[u.version]:C,[u.created]:Vs,[u.lastUpdated]:Vs,[u.cmpId]:C,[u.cmpVersion]:C,[u.consentScreen]:C,[u.consentLanguage]:Rs,[u.vendorListVersion]:C,[u.policyVersion]:C,[u.isServiceSpecific]:ye,[u.useNonStandardTexts]:ye,[u.specialFeatureOptins]:$e,[u.purposeConsents]:$e,[u.purposeLegitimateInterests]:$e,[u.purposeOneTreatment]:ye,[u.publisherCountryCode]:Rs,[u.vendorConsents]:gt,[u.vendorLegitimateInterests]:gt,[u.publisherRestrictions]:Ar,segmentType:C,[u.vendorsDisclosed]:gt,[u.vendorsAllowed]:gt,[u.publisherConsents]:$e,[u.publisherLegitimateInterests]:$e,[u.numCustomPurposes]:C,[u.publisherCustomConsents]:$e,[u.publisherCustomLegitimateInterests]:$e}}class Cr{1={[k.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.purposeConsents,u.vendorConsents]};2={[k.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.policyVersion,u.isServiceSpecific,u.useNonStandardTexts,u.specialFeatureOptins,u.purposeConsents,u.purposeLegitimateInterests,u.purposeOneTreatment,u.publisherCountryCode,u.vendorConsents,u.vendorLegitimateInterests,u.publisherRestrictions],[k.VENDORS_DISCLOSED]:[u.vendorsDisclosed],[k.PUBLISHER_TC]:[u.publisherConsents,u.publisherLegitimateInterests,u.numCustomPurposes,u.publisherCustomConsents,u.publisherCustomLegitimateInterests],[k.VENDORS_ALLOWED]:[u.vendorsAllowed]}}class wr{1=[k.CORE];2=[k.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(k.VENDORS_DISCLOSED),this[2].push(k.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[u.supportOOB]===!0)&&this[2].push(k.VENDORS_DISCLOSED),s&&(e[u.supportOOB]&&e[u.vendorsAllowed].size>0&&this[2].push(k.VENDORS_ALLOWED),this[2].push(k.PUBLISHER_TC))}}}class bs{static fieldSequence=new Cr;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new Be(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==k.CORE&&(i=C.encode(ms.KEY_TO_ID[t],g.segmentType));const r=Ms();return s.forEach(o=>{const a=e[o],l=r[o];let E=g[o];E===void 0&&this.isPublisherCustom(o)&&(E=Number(e[u.numCustomPurposes]));try{i+=l.encode(a,E)}catch(d){throw new Be(`Error encoding ${t}->${o}: ${d.message}`)}}),Zt.encode(i)}static decode(e,t,s){const i=Zt.decode(e);let r=0;s===k.CORE&&(t.version=C.decode(i.substr(r,g[u.version]),g[u.version])),s!==k.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=Ms();return o.forEach(l=>{const E=a[l];let d=g[l];if(d===void 0&&this.isPublisherCustom(l)&&(d=Number(t[u.numCustomPurposes])),d!==0){const S=i.substr(r,d);if(E===gt?t[l]=E.decode(S,t.version):t[l]=E.decode(S,d),Number.isInteger(d))r+=d;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new We(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Pr{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((i,r)=>{i.forEach((o,a)=>{if(o){const l=t.vendors[a];if(!l||l.deletedDate)i.unset(a);else if(l[r].length===0)if(r==="legIntPurposes"&&l.purposes.length===0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&l.purposes.length>0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(l.flexiblePurposes.length===0)i.unset(a);else{const E=e.publisherRestrictions.getRestrictions(a);let d=!1;for(let S=0,_=E.length;S<_&&!d;S++)d=E[S].restrictionType===Re.REQUIRE_CONSENT&&r==="purposes"||E[S].restrictionType===Re.REQUIRE_LI&&r==="legIntPurposes";d||i.unset(a)}else i.unset(a)}})}),e}];static process(e,t){const s=e.gvl;if(!s)throw new Be("Unable to encode TCModel without a GVL");if(!s.isReady)throw new Be("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const i=e.version-1;if(!this.processor[i])throw new Be(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class Dr{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let _=a.response;if(typeof _=="string")try{_=JSON.parse(_)}catch{}r(_)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},E=()=>{o(new Error("error"))},d=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",d),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class N extends ht{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new ke;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new St("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=N.baseUrl,i=t?.language;if(i)try{i=N.consentLanguages.parseLanguage(i)}catch(r){throw new St("Error during parsing the language: "+r.message)}if(this.lang_=i||N.DEFAULT_LANGUAGE,this.cacheLang_=i||N.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new St("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;N.CACHE.has(r)?(this.populate(N.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=N.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else N.CACHE.has(N.LATEST_CACHE_KEY)?(this.populate(N.CACHE.get(N.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+N.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&N.LANGUAGE_CACHE.size>0?(N.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(N.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(N.CACHE.delete(e),t=!0):e===void 0&&(N.CACHE=new Map,t=!0),t}cacheLanguage(){N.LANGUAGE_CACHE.has(this.cacheLang_)||N.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await Dr.fetch(e))}catch(t){throw new St(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=N.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=N.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=N.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=N.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=N.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=N.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=N.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=N.consentLanguages.parseLanguage(e)}catch(i){throw new St("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===N.DEFAULT_LANGUAGE.toLowerCase()&&!N.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,N.LANGUAGE_CACHE.has(s)){const i=N.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=N.baseUrl+N.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new St("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&N.CACHE.set(N.LATEST_CACHE_KEY,this.getJson()),N.CACHE.has(this.vendorListVersion)||N.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new N(this.getJson());return this.lang_!==N.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class Ls extends ht{static consentLanguages=N.consentLanguages;isServiceSpecific_=!0;supportOOB_=!1;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=5;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new we;purposeConsents=new we;purposeLegitimateInterests=new we;publisherConsents=new we;publisherLegitimateInterests=new we;publisherCustomConsents=new we;publisherCustomLegitimateInterests=new we;customPurposes;vendorConsents=new we;vendorLegitimateInterests=new we;vendorsDisclosed=new we;vendorsAllowed=new we;publisherRestrictions=new Ps;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){N.isInstanceOf(e)||(e=new N(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new He("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new He("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new He("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new He("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new He("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new He("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((s,i)=>Number(s)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new He("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class mr{static encode(e,t){let s="",i;return e=Pr.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new wr(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=bs.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new Ls);for(let r=0;r<i;r++){const o=s[r],l=Zt.decode(o.charAt(0)).substr(0,g.segmentType),E=ms.ID_TO_KEY[C.decode(l,g.segmentType).toString()];bs.decode(o,t,E)}return t}}var je;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(je||(je={}));var Lt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(Lt||(Lt={}));var Gt;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Gt||(Gt={}));var Gs;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Gs||(Gs={}));class vt{listenerId;callback;next;param;success=!0;constructor(e,t,s,i){Object.assign(this,{callback:e,listenerId:s,param:t,next:i});try{this.respond()}catch{this.invokeCallback(null)}}invokeCallback(e){const t=e!==null;typeof this.next=="function"?this.callback(this.next,e,t):this.callback(e,t)}}class yt extends vt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new ys(this.param,this.listenerId))}throwIfParamInvalid(){if(this.param!==void 0&&(!Array.isArray(this.param)||!this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class Vr{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new yt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class pe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new Vr;static cmpStatus=Lt.LOADING;static disabled=!1;static displayStatus=Gt.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=Lt.LOADING,this.disabled=!1,this.displayStatus=Gt.HIDDEN,this.eventQueue.clear()}}class vs{cmpId=pe.cmpId;cmpVersion=pe.cmpVersion;gdprApplies=pe.gdprApplies;tcfPolicyVersion=pe.tcfPolicyVersion}class ys extends vs{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=pe.eventStatus,this.cmpStatus=pe.cmpStatus,this.listenerId=t,pe.gdprApplies){const s=pe.tcModel;this.tcString=pe.tcString,this.isServiceSpecific=s.isServiceSpecific,this.useNonStandardTexts=s.useNonStandardTexts,this.purposeOneTreatment=s.purposeOneTreatment,this.publisherCC=s.publisherCountryCode,this.isServiceSpecific===!1&&(this.outOfBand={allowedVendors:this.createVectorField(s.vendorsAllowed,e),disclosedVendors:this.createVectorField(s.vendorsDisclosed,e)}),this.purpose={consents:this.createVectorField(s.purposeConsents),legitimateInterests:this.createVectorField(s.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(s.vendorConsents,e),legitimateInterests:this.createVectorField(s.vendorLegitimateInterests,e),disclosedVendors:this.createVectorField(s.vendorsDisclosed,e)},this.specialFeatureOptins=this.createVectorField(s.specialFeatureOptins),this.publisher={consents:this.createVectorField(s.publisherConsents),legitimateInterests:this.createVectorField(s.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(s.publisherCustomConsents),legitimateInterests:this.createVectorField(s.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(s.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let i=1;i<=s;i++){const r=i.toString();e.getRestrictions(i).forEach(o=>{const a=o.purposeId.toString();t[a]||(t[a]={}),t[a][r]=o.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((s,i)=>(s[String(i)]=e.has(Number(i)),s),{}):[...e].reduce((s,i)=>(s[i[0].toString(10)]=i[1],s),{})}}class Rr extends ys{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,s)=>(t+=s[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(s)});for(let i=0;i<s;i++){const r=i+1;e.getRestrictions(r).forEach(o=>{const a=o.restrictionType.toString(),l=o.purposeId.toString(),E=t[l].substr(0,i),d=t[l].substr(i+1);t[l]=E+a+d})}}return t}}class Mr extends vs{cmpLoaded=!0;cmpStatus=pe.cmpStatus;displayStatus=pe.displayStatus;apiVersion=String(pe.apiVersion);gvlVersion;constructor(){super(),pe.tcModel&&pe.tcModel.vendorListVersion&&(this.gvlVersion=+pe.tcModel.vendorListVersion)}}class br extends vt{respond(){this.invokeCallback(new Mr)}}class Lr extends yt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Rr(this.param))}}class Gr extends vt{respond(){const e=pe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new N(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class vr extends yt{respond(){this.listenerId=pe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class yr extends vt{respond(){this.invokeCallback(pe.eventQueue.remove(this.param))}}class Io{static[je.PING]=br;static[je.GET_TC_DATA]=yt;static[je.GET_IN_APP_TC_DATA]=Lr;static[je.GET_VENDOR_LIST]=Gr;static[je.ADD_EVENT_LISTENER]=vr;static[je.REMOVE_EVENT_LISTENER]=yr}const Ur=n=>{if(window.Fides?.options?.fidesTcfGdprApplies===!1)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(mt);return t.split(".")[0]}return e??""},Fr=1,Us=[1,3,4,5,6],xr=2,Br=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(ar).map(o=>Ye(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${xr}~${s}~dv.${i}`},Hr=async({experience:n,tcStringPreferences:e})=>{let t="";try{const s=new Ls(new N(n.gvl));await s.gvl.readyPromise,s.cmpId=Jt,s.cmpVersion=Fr,s.consentScreen=1,s.isServiceSpecific=!0,s.supportOOB=!1,n.tcf_publisher_country_code&&(s.publisherCountryCode=n.tcf_publisher_country_code);const i=n.minimal_tcf?cr(n):lr(n);if(s.gvl.narrowVendorsTo(i),i.forEach(r=>{s.vendorsDisclosed.set(r)}),e){e.vendorsConsent.forEach(a=>{if(Rt(a,n.gvl)){const{id:l}=Ye(a);if(s.vendorConsents.set(+l),!n.tcf_publisher_restrictions?.length){const E=n.gvl?.vendors[l];E&&!E?.purposes?.length&&E.flexiblePurposes.forEach(d=>{const S=new Ue;S.purposeId=d,S.restrictionType=Re.REQUIRE_CONSENT,s.publisherRestrictions.add(+l,S)})}}}),e.vendorsLegint.forEach(a=>{if(n.minimal_tcf)n.tcf_vendor_legitimate_interest_ids?.forEach(l=>{const{id:E}=Ye(l);s.vendorLegitimateInterests.set(+E)});else if(Rt(a,n.gvl)){const E=n.tcf_vendor_legitimate_interests?.filter(S=>S.id===a)[0]?.purpose_legitimate_interests;let d=!1;if(E&&(E.map(_=>_.id).filter(_=>Us.includes(_)).length&&(d=!0),!d)){const{id:_}=Ye(a);s.vendorLegitimateInterests.set(+_)}}}),Object.values(n.gvl?.vendors??{}).forEach(a=>{a.specialPurposes?.length&&!a.legIntPurposes?.length&&s.vendorLegitimateInterests.set(a.id)}),e.purposesConsent.forEach(a=>{s.purposeConsents.set(+a)}),e.purposesLegint.forEach(a=>{const l=+a;Us.includes(l)||s.purposeLegitimateInterests.set(l)}),e.specialFeatures.forEach(a=>{s.specialFeatureOptins.set(+a)}),n.tcf_publisher_restrictions&&n.tcf_publisher_restrictions.length>0&&n.tcf_publisher_restrictions.forEach(a=>{if(a.restriction_type===3){console.warn("Skipping TCF publisher restriction with type 3 (undefined/not used)",a);return}a.vendors.forEach(l=>{const E=new Ue;E.purposeId=a.purpose_id,E.restrictionType=a.restriction_type,s.publisherRestrictions.add(l,E)})}),t=mr.encode(s,{segments:[k.CORE,k.VENDORS_DISCLOSED]});const r=n.minimal_tcf?n.tcf_vendor_consent_ids:n.tcf_vendor_consents?.map(a=>a.id),o=Br({userConsentedVendorIds:e?.vendorsConsent??[],disclosedVendorIds:r??[]});t=`${t}${mt}${o}`}}catch(s){return console.error("Unable to instantiate GVL: ",s),Promise.resolve("")}return Promise.resolve(t)},Ze=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=Ct(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],et=n=>n?.length?n.map(e=>{const t=Ct(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],kr=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{n.tcf_system_consents?.map(a=>a.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{n.tcf_system_legitimate_interests?.map(a=>a.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:Ze({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:Ze({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:Ze({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:Ze({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:Ze({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:Ze({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:Ze({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},Kr=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{n.tcf_system_consent_ids?.includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{n.tcf_system_legitimate_interest_ids?.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:et(e.purposesConsent),purpose_legitimate_interests_preferences:et(e.purposesLegint),special_feature_preferences:et(e.specialFeatures),vendor_consent_preferences:et(s),vendor_legitimate_interests_preferences:et(r),system_consent_preferences:et(t),system_legitimate_interests_preferences:et(i)}},zr=async(n,e,t,s,i,r)=>{const o=await Hr({tcStringPreferences:t,experience:s});return{...n,fides_string:o,tcf_consent:nr(e),tcf_version_hash:s.meta?.version_hash}},Ut="us",Yr=n=>n?.toLowerCase().startsWith("us"),Wr=n=>typeof n?.name!="string"?!1:Er.includes(n.name),$r=({experienceRegion:n,usApproach:e})=>Yr(n)&&e===xe.NATIONAL?Ut:n,jr=({gppApi:n,sectionName:e,gppSettings:t})=>{if(!t)return;[{gppSettingField:t.mspa_covered_transactions,cmpApiField:I.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:I.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:I.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:i,cmpApiField:r})=>{const o=r===I.MSPA_COVERED_TRANSACTION;let a=2;!t.mspa_covered_transactions&&!o?a=0:i&&(a=1),n.setFieldValue(e,r,a)})},Fs=n=>{const{region:e,gpp_settings:t,privacy_notices:s}=n;let i=$r({experienceRegion:e,usApproach:t?.us_approach}),r=Mt[i];return!r&&t?.us_approach===xe.ALL&&(i=Ut,r=Mt[i]),r&&t?.us_approach===xe.ALL&&(s?.some(a=>a.gpp_field_mapping?.find(l=>l.region===e))||(i=Ut,r=Mt[i])),!r||i===Ut&&t?.us_approach===xe.STATE?{}:{gppRegion:i,gppSection:r}},Qr=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s,noticeConsent:i})=>{i&&s.forEach(r=>{const{notice_key:o,gpp_field_mapping:a}=r,l=i[o],E=a?.find(d=>d.region===e)?.mechanism;E&&E.forEach(d=>{let S=d.not_available;l===!1?S=d.opt_out:l&&(S=d.not_opt_out);let _=+S;S.length>1&&(_=S.split("").map(B=>+B)),n.setFieldValue(t.name,d.field,_)})})},Xr=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s})=>{s.forEach(i=>{const{gpp_field_mapping:r}=i,o=r?.find(a=>a.region===e)?.notice;o&&o.forEach(a=>{n.setFieldValue(t.name,a,1)})})},qr=({gppApi:n,gppSection:e,context:t})=>{if(Wr(e)){const s=t?.globalPrivacyControl??!1;n.setFieldValue(e.name,I.GPC,s),n.setFieldValue(e.name,I.GPC_SEGMENT_INCLUDED,!0)}},Jr=[1,3,4,5,6],Zr=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[]}=e,{gppRegion:i,gppSection:r}=Fs(e);return!i||!r||s.forEach(o=>{const{notice_key:a,gpp_field_mapping:l}=o,E=l?.find(d=>d.region===i)?.mechanism;if(E){const d=E.some(S=>{const _=n.getFieldValue(r.name,S.field),B=Array.isArray(_)?_.join(""):String(_);return B===S.opt_out?!0:(B===S.not_opt_out,!1)});d!==void 0&&(t[a]=!d)}}),t},eo=({cmpApi:n,experience:e})=>{const t=Ji,s=n.getSection(Y.NAME);if(!s)return t;const i=s.PurposeConsents.map((l,E)=>l?(E+1).toString():null).filter(l=>l!==null),r=s.PurposeLegitimateInterests.map((l,E)=>l?(E+1).toString():null).filter(l=>l!==null),o=s.VendorConsents.map(l=>`gvl.${l}`),a=s.VendorLegitimateInterests.map(l=>`gvl.${l}`);return t.purposesConsent=i,t.purposesLegint=r.filter(l=>!Jr.includes(parseInt(l,10))),t.vendorsConsent=o,t.vendorsLegint=a,t.specialFeatures=s.SpecialFeatureOptins.map((l,E)=>l?(E+1).toString():null).filter(l=>l!==null),"tcf_special_purposes"in e?(t.specialPurposes=e.tcf_special_purposes?.map(l=>l.id.toString())||[],t.features=e.tcf_features?.map(l=>l.id.toString())||[]):"tcf_special_purpose_ids"in e&&(t.specialPurposes=e.tcf_special_purpose_ids?.map(l=>l.toString())||[],t.features=e.tcf_feature_ids?.map(l=>l.toString())||[]),t.customPurposesConsent=[],t},to=n=>!n||typeof n!="string"?!1:/^DB[A-Za-z0-9~.]+$/.test(n),so=({fidesString:n,cmpApi:e})=>{const{gpp:t}=Os(n);if(!n||!t||!e||!to(t))return;const{locale:s}=window.Fides,i=window.Fides.experience;if(!i||!i.experience_config||!i.privacy_notices)return;const r=i.experience_config.component===dt.TCF_OVERLAY;if(!i.experience_config.translations.find(d=>ut(d.language,s)))return;e.setGppString(t),e.setSignalStatus(me.READY);const a=i.privacy_notices.map(d=>({notice:d,bestTranslation:d.translations.find(S=>ut(S.language,s))||null}));let l,E;if(r){const d=eo({cmpApi:e,experience:i});E=i.minimal_tcf?Kr({experience:i,enabledIds:d}):kr({experience:i,enabledIds:d}),l=_=>zr(_,E,d,i);const S={};a.forEach(_=>{_.notice.consent_mechanism!==lt.NOTICE_ONLY?S[_.notice.notice_key]=d.purposesConsent.includes(_.notice.id):S[_.notice.notice_key]=!0}),ws(window.Fides,{noticeConsent:S,tcf:E,updateCookie:l})}else{const d=Zr({cmpApi:e,experience:i});ws(window.Fides,{noticeConsent:d})}},xs="__gppLocator",Bs=n=>{if(!!!window.frames[n])if(window.document.body){const t=window.document.createElement("iframe");t.style.cssText="display:none",t.name=n,window.document.body.appendChild(t)}else setTimeout(()=>Bs(n),5)},no=n=>{let e=window,t;for(;e;){try{if(e.frames[n]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},io=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,ro=()=>{const n=[],e=[];let t;const s=(o,a,l,E)=>{if(o==="queue")return n;if(o==="events")return e;const d={gppVersion:"1.1",cmpStatus:nt.STUB,cmpDisplayStatus:ze.HIDDEN,signalStatus:me.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(o==="ping")a(d,!0);else if(o==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:a,parameter:l}),a({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:d},!0)}else if(o==="removeEventListener"){let S=!1;for(let _=0;_<e.length;_++)if(e[_].id===l){e.splice(_,1),S=!0;break}a({eventName:"listenerRemoved",listenerId:l,data:S,pingData:d},!0)}else o==="hasSection"?a(!1,!0):o==="getSection"||o==="getField"?a(null,!0):n.push([].slice.apply([o,a,l,E]));return null},i=o=>{const a=typeof o.data=="string";let l={};if(a)try{l=JSON.parse(o.data)}catch{l={}}else l=o.data;if(!io(l))return null;if(l.__gppCall&&window.__gpp){const d=l.__gppCall;window.__gpp(d.command,(S,_)=>{const B={__gppReturn:{returnValue:S,success:_,callId:d.callId}};o&&o.source&&o.source.postMessage&&o.source.postMessage(a?JSON.stringify(B):B,"*")},"parameter"in d?d.parameter:void 0,"version"in d?d.version:"1.1")}return null};no(xs)||(Bs(xs),window.__gpp=s,window.addEventListener("message",i,!1))},Hs=(n,{cmpApi:e,experience:t,context:s,cookie:i})=>{const{gppRegion:r,gppSection:o}=Fs(t);if(!r||!o)return[];const a=new Set;a.add(o),n({gppApi:e,gppRegion:r,gppSection:o,privacyNotices:t.privacy_notices||[],noticeConsent:i?.consent});const{gpp_settings:l}=t;return jr({gppApi:e,sectionName:o.name,gppSettings:l}),qr({gppApi:e,gppSection:o,context:s}),Array.from(a)},ks=({cmpApi:n,experience:e,context:t})=>Hs(Xr,{cmpApi:n,experience:e,context:t}),Ks=({cmpApi:n,cookie:e,experience:t,context:s})=>Hs(Qr,{cmpApi:n,cookie:e,experience:t,context:s}),zs=(n,e,t)=>n?e?!0:!!(t&&Object.entries(n).some(([s,i])=>s in t.map(r=>r.notice_key)&&i!==void 0)):!1,Ys=(n,e)=>{if(!Et(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!t?.enable_tcfeu_string)return!1;const s=Ur(n);return s?(e.setFieldValueBySectionId(Y.ID,"CmpId",Jt),e.setSectionStringById(Y.ID,s),!0):!1},oo=()=>{const n=[];if(Et(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${Y.ID}:${Y.NAME}`),(e.us_approach===xe.NATIONAL||e.us_approach===xe.ALL)&&n.push(`${j.ID}:${j.NAME}`),(e.us_approach===xe.STATE||e.us_approach===xe.ALL)&&Object.values(Mt).forEach(t=>{t.id!==j.ID&&n.push(`${t.id}:${t.name}`)}))}return n},ao=()=>{ro();const n=new Mi(Jt,dr);n.setCmpStatus(nt.LOADED),window.addEventListener("FidesReady",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides,r=oo();if(n.setSupportedAPIs(r),!Et(t))return;const{fidesString:o}=i;if(o&&so({fidesString:o,cmpApi:n}),!o&&(!xi(t,e.detail,s,i)||!i.tcfEnabled&&us(t.privacy_notices)&&!zs(s,e.detail.fides_string,t.privacy_notices))){const a=$t(),l=Ys(e,n);l&&n.setApplicableSections([Y.ID]);const E=ks({cmpApi:n,experience:t,context:a}),d=Ks({cmpApi:n,cookie:e.detail,experience:t,context:a});d.length&&n.setApplicableSections(d.map(_=>_.id)),!l&&!E.length&&!d.length&&n.setApplicableSections([-1]),n.setSignalStatus(me.READY);const S=fs(n);window.Fides.fides_string=S}window.Fides.options.debug&&typeof window?.__gpp=="function"&&window?.__gpp?.("ping",a=>{})}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(Et(t)){!i.tcfEnabled&&us(t.privacy_notices)&&!zs(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(me.READY):n.setSignalStatus(me.NOT_READY),n.setCmpDisplayStatus(ze.VISIBLE);const r=ks({cmpApi:n,experience:t,context:$t()});r.length&&(n.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{n.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(n.setCmpDisplayStatus(ze.HIDDEN),n.setSignalStatus(me.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(ze.HIDDEN),Ys(e,n)&&(n.setApplicableSections([Y.ID]),n.fireSectionChange("tcfeuv2")),Et(window.Fides.experience)){const s=Ks({cmpApi:n,cookie:e.detail,experience:window.Fides.experience,context:$t()});s.length&&(n.setApplicableSections(s.map(r=>r.id)),s.forEach(r=>{n.fireSectionChange(r.name)}));const i=fs(n);window.Fides.cookie&&(window.Fides.fides_string=i,window.Fides.cookie.fides_string=i,Ns(window.Fides.cookie,window.Fides.options))}n.setSignalStatus(me.READY)})};window.addEventListener("FidesInitializing",n=>{n.detail.extraDetails?.gppEnabled&&typeof window<"u"&&!window.Fides?.initialized&&ao()});