ethyca-fides 2.63.1b4__py2.py3-none-any.whl → 2.63.3b0__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 (319) hide show
  1. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.3b0.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.3b0.dist-info}/RECORD +211 -210
  3. fides/_version.py +3 -3
  4. fides/api/api/v1/endpoints/connection_endpoints.py +16 -3
  5. fides/api/api/v1/endpoints/oauth_endpoints.py +8 -2
  6. fides/api/models/detection_discovery/monitor_task.py +1 -0
  7. fides/api/schemas/connection_configuration/connection_config.py +19 -4
  8. fides/api/service/connectors/query_configs/saas_query_config.py +15 -0
  9. fides/api/util/saas_util.py +1 -0
  10. fides/ui-build/static/admin/404.html +1 -1
  11. fides/ui-build/static/admin/_next/static/0S8UTwc7FKVdi3Eb4LgFK/_buildManifest.js +1 -0
  12. fides/ui-build/static/admin/_next/static/chunks/1099-f2199d5b88dd98b4.js +1 -0
  13. fides/ui-build/static/admin/_next/static/chunks/1100-d617215143d70d3d.js +1 -0
  14. fides/ui-build/static/admin/_next/static/chunks/155-8ad794121fef6281.js +1 -0
  15. fides/ui-build/static/admin/_next/static/chunks/1817-ddfdd6ed9529bba6.js +1 -0
  16. fides/ui-build/static/admin/_next/static/chunks/1904-e33cb75edb93d3d3.js +1 -0
  17. fides/ui-build/static/admin/_next/static/chunks/2310-efaa2a52fc487db4.js +1 -0
  18. fides/ui-build/static/admin/_next/static/chunks/2921-19664dd93e2bf1ea.js +1 -0
  19. fides/ui-build/static/admin/_next/static/chunks/3119-9be74ade1504a7e7.js +1 -0
  20. fides/ui-build/static/admin/_next/static/chunks/3505-f6d55694ca5c9816.js +1 -0
  21. fides/ui-build/static/admin/_next/static/chunks/3513-656df06b45fedba3.js +1 -0
  22. fides/ui-build/static/admin/_next/static/chunks/3872-09df90521f7db611.js +1 -0
  23. fides/ui-build/static/admin/_next/static/chunks/3923-3d80020d02819c33.js +1 -0
  24. fides/ui-build/static/admin/_next/static/chunks/401-710009c2a7408818.js +1 -0
  25. fides/ui-build/static/admin/_next/static/chunks/4060-4e196835f56cc326.js +1 -0
  26. fides/ui-build/static/admin/_next/static/chunks/4121-80ac9bcd08f9cd7a.js +1 -0
  27. fides/ui-build/static/admin/_next/static/chunks/4132-76ca1bcf79bf1d77.js +1 -0
  28. fides/ui-build/static/admin/_next/static/chunks/4481-be144b50994f5135.js +1 -0
  29. fides/ui-build/static/admin/_next/static/chunks/5258-8a1f7feddee7a960.js +1 -0
  30. fides/ui-build/static/admin/_next/static/chunks/5404-a8a82985736363f4.js +1 -0
  31. fides/ui-build/static/admin/_next/static/chunks/5487-483a111405f678e0.js +1 -0
  32. fides/ui-build/static/admin/_next/static/chunks/5683-7144f557d701406c.js +1 -0
  33. fides/ui-build/static/admin/_next/static/chunks/6202-86a62d94744e2c18.js +1 -0
  34. fides/ui-build/static/admin/_next/static/chunks/6277-0b1e3d23e97f5e19.js +1 -0
  35. fides/ui-build/static/admin/_next/static/chunks/6853-d9c6c55d8562bc9b.js +1 -0
  36. fides/ui-build/static/admin/_next/static/chunks/69-a4d64cabe750b286.js +1 -0
  37. fides/ui-build/static/admin/_next/static/chunks/6954-8ed05ffdbf2ec086.js +1 -0
  38. fides/ui-build/static/admin/_next/static/chunks/7553-77c9715868d6ad13.js +1 -0
  39. fides/ui-build/static/admin/_next/static/chunks/79-6c977013b6bedc23.js +1 -0
  40. fides/ui-build/static/admin/_next/static/chunks/796-1d77aa88b776ee4e.js +1 -0
  41. fides/ui-build/static/admin/_next/static/chunks/7980-3da0fe6938b0b758.js +1 -0
  42. fides/ui-build/static/admin/_next/static/chunks/8032-4b8bda7166eff954.js +1 -0
  43. fides/ui-build/static/admin/_next/static/chunks/8433-88fd946149dd1f27.js +1 -0
  44. fides/ui-build/static/admin/_next/static/chunks/8499-a65187ae77b7307b.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/{905-8ab919e7b274ed50.js → 905-5fe5124abfb5c542.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/9327-eb3b84680abcc660.js +1 -0
  47. fides/ui-build/static/admin/_next/static/chunks/{9392.81edc11e3a175275.js → 9392.25024e070026343d.js} +1 -1
  48. fides/ui-build/static/admin/_next/static/chunks/9494-04a0483ed0ddad7c.js +1 -0
  49. fides/ui-build/static/admin/_next/static/chunks/9676.e60a53f1f5890847.js +1 -0
  50. fides/ui-build/static/admin/_next/static/chunks/9767-a3ed98edff04e6ed.js +1 -0
  51. fides/ui-build/static/admin/_next/static/chunks/pages/404-c50dccc133b332a9.js +1 -0
  52. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-33bc23b79bffe07c.js → _app-0e0fdbcc0ec1c76b.js} +10 -10
  53. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-3065022f370ec055.js +1 -0
  54. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-357ef3b269c576bb.js +1 -0
  55. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-e8ae218a9d124ba7.js +1 -0
  56. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/add-vendors-488507bb244cce9d.js +1 -0
  57. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-6f0b46ac2b112bfe.js +1 -0
  58. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-5024b4ab40ba024c.js +1 -0
  59. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-2b62e5facfc51808.js +1 -0
  60. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/[id]-71791459da78e35d.js +1 -0
  61. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/new-26a7d52615b1ebb8.js +1 -0
  62. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-25836dd5142f37e8.js +1 -0
  63. fides/ui-build/static/admin/_next/static/chunks/pages/consent/properties-3a9021850242c78f.js +1 -0
  64. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-9a5d3cc5cbb4ef27.js +1 -0
  65. fides/ui-build/static/admin/_next/static/chunks/pages/consent-9e21184279f8e126.js +1 -0
  66. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-64cea013d41e348a.js +1 -0
  67. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-b02050eb3b7113d4.js +1 -0
  68. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-ff211c7a968bda47.js +1 -0
  69. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-7f7435f28861ee78.js +1 -0
  70. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-ec4b981fd9cff542.js +1 -0
  71. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-18c144223277bc2e.js +1 -0
  72. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-e18f14b8d598e942.js +1 -0
  73. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-9af01b6cf4cbe8af.js +1 -0
  74. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-1987ef0d3c687aaa.js +1 -0
  75. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-979828f48148b37c.js +1 -0
  76. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-e85c3537d3aade4a.js +1 -0
  77. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-6d44abbe7d454435.js +1 -0
  78. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-42f276660c107e1c.js +1 -0
  79. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-18ff06fc09c22c33.js +1 -0
  80. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-979eff6888e42b6b.js +1 -0
  81. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-343a3830b2d4cf22.js +1 -0
  82. fides/ui-build/static/admin/_next/static/chunks/pages/index-737b0c430bf2f7a0.js +1 -0
  83. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-63361d914d70d647.js +1 -0
  84. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-fd73f276dad7a06c.js +1 -0
  85. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-91e865a65a88d1a4.js +1 -0
  86. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-529c7e09b073edd2.js +1 -0
  87. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-6226faba9595da71.js +1 -0
  88. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-0f7d4390e01f4ffb.js +1 -0
  89. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-a4e470f75a5553f8.js +1 -0
  90. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-d814c1c56b4b04d8.js +1 -0
  91. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-0f68f2be09df2c76.js +1 -0
  92. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-6b63d5c992466891.js +1 -0
  93. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-88eb9b98e8e4b426.js +1 -0
  94. fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-a3da91fd04eec8f5.js +1 -0
  95. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-b2ea863afce1d7f0.js +1 -0
  96. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-0831dfaa65ce0d50.js +1 -0
  97. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-709676f00a491bca.js +1 -0
  98. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-0eac9951504b46a7.js +1 -0
  99. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-88e20023c30113df.js +1 -0
  100. fides/ui-build/static/admin/_next/static/chunks/pages/properties/[id]-3acc3107e9a21260.js +1 -0
  101. fides/ui-build/static/admin/_next/static/chunks/pages/properties/add-property-2bf13ee02d8d5ab9.js +1 -0
  102. fides/ui-build/static/admin/_next/static/chunks/pages/properties-822eac07220f55f8.js +1 -0
  103. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-f85f92726a61a668.js +1 -0
  104. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-88999260f855b448.js +1 -0
  105. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-928b0b69e05fd430.js +1 -0
  106. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-e090903a572cba68.js +1 -0
  107. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-f0c8e4eced9f5cc5.js +1 -0
  108. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-f7a271ee53cb4e51.js +1 -0
  109. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-611980eee1ce9c8a.js +1 -0
  110. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-382cb6df12684bf8.js +1 -0
  111. fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-5d664f2a0f11b626.js +1 -0
  112. fides/ui-build/static/admin/_next/static/chunks/pages/settings/locations-ba569d22e1e3f6df.js +1 -0
  113. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-dd903f6e03c4ee4e.js +1 -0
  114. fides/ui-build/static/admin/_next/static/chunks/pages/settings/regulations-fae8ecf7878bad2d.js +1 -0
  115. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-493dc9b4595c9fb4.js +1 -0
  116. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-2b540203a2d7b59d.js +1 -0
  117. fides/ui-build/static/admin/_next/static/chunks/pages/systems-a278608ba0ddc66c.js +1 -0
  118. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-6d790458dd21dde7.js +1 -0
  119. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-eb30c9230a9ce9cc.js +1 -0
  120. fides/ui-build/static/admin/_next/static/chunks/pages/user-management-381146aa81e3ffea.js +1 -0
  121. fides/ui-build/static/admin/_next/static/chunks/{webpack-8457bad7859c44f0.js → webpack-abfd03ce7f1e55ac.js} +1 -1
  122. fides/ui-build/static/admin/_next/static/css/c3377f99bf988d68.css +1 -0
  123. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  124. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  125. fides/ui-build/static/admin/add-systems.html +1 -1
  126. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  127. fides/ui-build/static/admin/consent/configure.html +1 -1
  128. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  129. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  130. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  131. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  132. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  133. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  134. fides/ui-build/static/admin/consent/properties.html +1 -1
  135. fides/ui-build/static/admin/consent/reporting.html +1 -1
  136. fides/ui-build/static/admin/consent.html +1 -1
  137. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  138. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  139. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  140. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  141. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  142. fides/ui-build/static/admin/data-catalog.html +1 -1
  143. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  144. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  145. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  146. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  147. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  148. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  149. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  150. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  151. fides/ui-build/static/admin/datamap.html +1 -1
  152. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  153. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  154. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  155. fides/ui-build/static/admin/dataset/new.html +1 -1
  156. fides/ui-build/static/admin/dataset.html +1 -1
  157. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  158. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  159. fides/ui-build/static/admin/datastore-connection.html +1 -1
  160. fides/ui-build/static/admin/images/connector-logos/salesforce.svg +41 -0
  161. fides/ui-build/static/admin/index.html +1 -1
  162. fides/ui-build/static/admin/integrations/[id].html +1 -1
  163. fides/ui-build/static/admin/integrations.html +1 -1
  164. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  165. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  166. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  167. fides/ui-build/static/admin/login/[provider].html +1 -1
  168. fides/ui-build/static/admin/login.html +1 -1
  169. fides/ui-build/static/admin/messaging/[id].html +1 -1
  170. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  171. fides/ui-build/static/admin/messaging.html +1 -1
  172. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  173. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  174. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  175. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  176. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  177. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  178. fides/ui-build/static/admin/poc/forms.html +1 -1
  179. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  180. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  181. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  182. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  183. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  184. fides/ui-build/static/admin/privacy-requests.html +1 -1
  185. fides/ui-build/static/admin/properties/[id].html +1 -1
  186. fides/ui-build/static/admin/properties/add-property.html +1 -1
  187. fides/ui-build/static/admin/properties.html +1 -1
  188. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  189. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  190. fides/ui-build/static/admin/settings/about.html +1 -1
  191. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  192. fides/ui-build/static/admin/settings/consent.html +1 -1
  193. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  194. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  195. fides/ui-build/static/admin/settings/domains.html +1 -1
  196. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  197. fides/ui-build/static/admin/settings/locations.html +1 -1
  198. fides/ui-build/static/admin/settings/organization.html +1 -1
  199. fides/ui-build/static/admin/settings/regulations.html +1 -1
  200. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  201. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  202. fides/ui-build/static/admin/systems.html +1 -1
  203. fides/ui-build/static/admin/taxonomy.html +1 -1
  204. fides/ui-build/static/admin/user-management/new.html +1 -1
  205. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  206. fides/ui-build/static/admin/user-management.html +1 -1
  207. fides/ui-build/static/admin/_next/static/X2nvWLg2_-vsCTkhSWpzw/_buildManifest.js +0 -1
  208. fides/ui-build/static/admin/_next/static/chunks/1099-667e84655846e78c.js +0 -1
  209. fides/ui-build/static/admin/_next/static/chunks/1100-0b01f500b1eaf60d.js +0 -1
  210. fides/ui-build/static/admin/_next/static/chunks/1817-951f58ddd5d46081.js +0 -1
  211. fides/ui-build/static/admin/_next/static/chunks/1904-361e37a5811ed7fc.js +0 -1
  212. fides/ui-build/static/admin/_next/static/chunks/2310-744354001d01f366.js +0 -1
  213. fides/ui-build/static/admin/_next/static/chunks/2921-49af55ad7c631c93.js +0 -1
  214. fides/ui-build/static/admin/_next/static/chunks/3119-e36ae5071c8f27a5.js +0 -1
  215. fides/ui-build/static/admin/_next/static/chunks/3505-113f9c95d34b7aae.js +0 -1
  216. fides/ui-build/static/admin/_next/static/chunks/3513-5c2d412a84a78971.js +0 -1
  217. fides/ui-build/static/admin/_next/static/chunks/3872-45cc725e241211f0.js +0 -1
  218. fides/ui-build/static/admin/_next/static/chunks/3923-b4f701ada3ef0ee0.js +0 -1
  219. fides/ui-build/static/admin/_next/static/chunks/401-7e800aed05537126.js +0 -1
  220. fides/ui-build/static/admin/_next/static/chunks/4060-90a52a9afc655bfc.js +0 -1
  221. fides/ui-build/static/admin/_next/static/chunks/4121-66b0e00d5e7ae817.js +0 -1
  222. fides/ui-build/static/admin/_next/static/chunks/4132-9b1731bfec6ee537.js +0 -1
  223. fides/ui-build/static/admin/_next/static/chunks/4481-7f6710c928bb0cb0.js +0 -1
  224. fides/ui-build/static/admin/_next/static/chunks/5258-2079138c8cc34f6c.js +0 -1
  225. fides/ui-build/static/admin/_next/static/chunks/5404-2694509cf5fa96da.js +0 -1
  226. fides/ui-build/static/admin/_next/static/chunks/5487-2cbd8d2169eb2a65.js +0 -1
  227. fides/ui-build/static/admin/_next/static/chunks/5683-37137111b3e769fb.js +0 -1
  228. fides/ui-build/static/admin/_next/static/chunks/6202-081545c7822d09af.js +0 -1
  229. fides/ui-build/static/admin/_next/static/chunks/6277-459e054b2702c60e.js +0 -1
  230. fides/ui-build/static/admin/_next/static/chunks/6853-688df0b88fe65fd5.js +0 -1
  231. fides/ui-build/static/admin/_next/static/chunks/69-00cba94689b9e740.js +0 -1
  232. fides/ui-build/static/admin/_next/static/chunks/6954-4e313b4599b8763d.js +0 -1
  233. fides/ui-build/static/admin/_next/static/chunks/7553-08bc3d9f66695111.js +0 -1
  234. fides/ui-build/static/admin/_next/static/chunks/79-fc548561beed136f.js +0 -1
  235. fides/ui-build/static/admin/_next/static/chunks/796-d6586308ed44334b.js +0 -1
  236. fides/ui-build/static/admin/_next/static/chunks/7980-736f9fd1e749ddd2.js +0 -1
  237. fides/ui-build/static/admin/_next/static/chunks/8032-74d94f7bd5b81c89.js +0 -1
  238. fides/ui-build/static/admin/_next/static/chunks/8433-51870336908fb253.js +0 -1
  239. fides/ui-build/static/admin/_next/static/chunks/8499-1fd392d0be9e8ee4.js +0 -1
  240. fides/ui-build/static/admin/_next/static/chunks/9033-fdd87182c15b91e2.js +0 -1
  241. fides/ui-build/static/admin/_next/static/chunks/9327-6a53461c9764b16f.js +0 -1
  242. fides/ui-build/static/admin/_next/static/chunks/9494-1ffb888b95289891.js +0 -1
  243. fides/ui-build/static/admin/_next/static/chunks/9676.61cf5f6d6a083175.js +0 -1
  244. fides/ui-build/static/admin/_next/static/chunks/9767-afd674014a1d1152.js +0 -1
  245. fides/ui-build/static/admin/_next/static/chunks/pages/404-ec04f826f3dd79ea.js +0 -1
  246. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-1bec086d567aacff.js +0 -1
  247. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-f68bf100e4e60e88.js +0 -1
  248. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-effde5cfe49de55f.js +0 -1
  249. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/add-vendors-ec95ed8cb0712828.js +0 -1
  250. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-4cc195e15e0c3cc8.js +0 -1
  251. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-be8972c79fb39705.js +0 -1
  252. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-ccf96207de3b74ea.js +0 -1
  253. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/[id]-b9823cc008372cee.js +0 -1
  254. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/new-373f5772ab41bc93.js +0 -1
  255. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-b9beeee1bde5ca79.js +0 -1
  256. fides/ui-build/static/admin/_next/static/chunks/pages/consent/properties-6ab3a5baafebd199.js +0 -1
  257. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-8562790ae07f17c9.js +0 -1
  258. fides/ui-build/static/admin/_next/static/chunks/pages/consent-42d4d2d6e0253671.js +0 -1
  259. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-9d1df6d890671b0c.js +0 -1
  260. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-7eb08af333baaa8e.js +0 -1
  261. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-bb57eed84f59a932.js +0 -1
  262. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-47eb34aef3e31ac6.js +0 -1
  263. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-76cefefc53e84c7f.js +0 -1
  264. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-9d8e84a8b4bf568d.js +0 -1
  265. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-c3eaadd88a2e6caa.js +0 -1
  266. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-db45aa864e9dda8a.js +0 -1
  267. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-d5cfdebc74654337.js +0 -1
  268. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-618b89228f83435e.js +0 -1
  269. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-12fc86f15a4c764e.js +0 -1
  270. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-c23d18a9b56c2e3c.js +0 -1
  271. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-e3b2d8e3980ab093.js +0 -1
  272. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-6e27257eccf65f01.js +0 -1
  273. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-bbac1f624424282d.js +0 -1
  274. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-84eb56f5a07bdf4f.js +0 -1
  275. fides/ui-build/static/admin/_next/static/chunks/pages/index-773182b5e35d0045.js +0 -1
  276. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-eb28c927da5bd653.js +0 -1
  277. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-781808bca01f8048.js +0 -1
  278. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-b51bee8680d66b20.js +0 -1
  279. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-1de479533f733fbd.js +0 -1
  280. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-7dc295b3ed3d2224.js +0 -1
  281. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-f64dac3392f5ded7.js +0 -1
  282. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-eb020bfac4bee532.js +0 -1
  283. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-0bd62e28b539e114.js +0 -1
  284. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-936877004113c2a6.js +0 -1
  285. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-6416f01524482af9.js +0 -1
  286. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-3f4e1313d1f2969b.js +0 -1
  287. fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-1db7a54437db7db0.js +0 -1
  288. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-64236fd0141414fd.js +0 -1
  289. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-c583a61302f02add.js +0 -1
  290. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-20d20a8d1736f7c4.js +0 -1
  291. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-b6c876dceb16ad1b.js +0 -1
  292. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-0e557d79e1e43c2b.js +0 -1
  293. fides/ui-build/static/admin/_next/static/chunks/pages/properties/[id]-54bcc875592d1fb9.js +0 -1
  294. fides/ui-build/static/admin/_next/static/chunks/pages/properties/add-property-644dc669b508a79a.js +0 -1
  295. fides/ui-build/static/admin/_next/static/chunks/pages/properties-9a88220d03e7e02f.js +0 -1
  296. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-70dc1081df37ea69.js +0 -1
  297. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-3c71b4dbcb6fd6c9.js +0 -1
  298. fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-7cb16e0000dd16c9.js +0 -1
  299. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-a18d8f12ee8dcf5d.js +0 -1
  300. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-dc220e116ad5c09e.js +0 -1
  301. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-55ddc5f25b86f28e.js +0 -1
  302. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-5ca7decded228bc8.js +0 -1
  303. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-a6fafa1be2834c40.js +0 -1
  304. fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-e633750d2b45ddd6.js +0 -1
  305. fides/ui-build/static/admin/_next/static/chunks/pages/settings/locations-3948686cbd372969.js +0 -1
  306. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-04ece499c22d23f4.js +0 -1
  307. fides/ui-build/static/admin/_next/static/chunks/pages/settings/regulations-7752305084280cca.js +0 -1
  308. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-9e5f9066be6f218d.js +0 -1
  309. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-86de9e6d72098e45.js +0 -1
  310. fides/ui-build/static/admin/_next/static/chunks/pages/systems-cac52e6c3abf6a15.js +0 -1
  311. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-60d5930b6855679b.js +0 -1
  312. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-b0f4c34752d32c73.js +0 -1
  313. fides/ui-build/static/admin/_next/static/chunks/pages/user-management-7dee83dd6d9292aa.js +0 -1
  314. fides/ui-build/static/admin/_next/static/css/1fdf5c593349dbc6.css +0 -1
  315. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.3b0.dist-info}/WHEEL +0 -0
  316. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.3b0.dist-info}/entry_points.txt +0 -0
  317. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.3b0.dist-info}/licenses/LICENSE +0 -0
  318. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.3b0.dist-info}/top_level.txt +0 -0
  319. /fides/ui-build/static/admin/_next/static/{X2nvWLg2_-vsCTkhSWpzw → 0S8UTwc7FKVdi3Eb4LgFK}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- var wr=Object.defineProperty,Dr=(n,e,t)=>e in n?wr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nt=(n,e,t)=>Dr(n,typeof e!="symbol"?e+"":e,t);class vn{constructor(e,t,s,i){Nt(this,"eventName"),Nt(this,"listenerId"),Nt(this,"data"),Nt(this,"pingData"),this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}var br=Object.defineProperty,vr=(n,e,t)=>e in n?br(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Me=(n,e,t)=>vr(n,typeof e!="symbol"?e+"":e,t);class It{constructor(e){Me(this,"gppVersion"),Me(this,"cmpStatus"),Me(this,"cmpDisplayStatus"),Me(this,"signalStatus"),Me(this,"supportedAPIs"),Me(this,"cmpId"),Me(this,"sectionList"),Me(this,"applicableSections"),Me(this,"gppString"),Me(this,"parsedSections"),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()}}var Vr=Object.defineProperty,Rr=(n,e,t)=>e in n?Vr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,At=(n,e,t)=>Rr(n,typeof e!="symbol"?e+"":e,t);let nt=class{constructor(e,t,s){At(this,"callback"),At(this,"parameter"),At(this,"success",!0),At(this,"cmpApiContext"),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)}},yr=class extends nt{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new vn("listenerRegistered",e,!0,new It(this.cmpApiContext));this.invokeCallback(t)}},Mr=class extends nt{respond(){let e=new It(this.cmpApiContext);this.invokeCallback(e)}};class Ur extends nt{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 Lr extends nt{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 Gr extends nt{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 Ue;(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"})(Ue||(Ue={}));let Fr=class extends nt{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new vn("listenerRemoved",e,t,new It(this.cmpApiContext));this.invokeCallback(s)}};var $r=Object.defineProperty,xr=(n,e,t)=>e in n?$r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,st=(n,e,t)=>xr(n,typeof e!="symbol"?e+"":e,t),Os,Ns,Is,As,Cs,fs;fs=Ue.ADD_EVENT_LISTENER,Cs=Ue.GET_FIELD,As=Ue.GET_SECTION,Is=Ue.HAS_SECTION,Ns=Ue.PING,Os=Ue.REMOVE_EVENT_LISTENER;let Ke=class{};st(Ke,fs,yr),st(Ke,Cs,Ur),st(Ke,As,Lr),st(Ke,Is,Gr),st(Ke,Ns,Mr),st(Ke,Os,Fr);var it;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(it||(it={}));var Ye;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Ye||(Ye={}));var ms;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ms||(ms={}));var be;(function(n){n.NOT_READY="not ready",n.READY="ready"})(be||(be={}));var jr=Object.defineProperty,Hr=(n,e,t)=>e in n?jr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vn=(n,e,t)=>Hr(n,typeof e!="symbol"?e+"":e,t);class kr{constructor(e,t){if(Vn(this,"callQueue"),Vn(this,"customCommands"),Vn(this,"cmpApiContext"),this.cmpApiContext=e,t){let s=Ue.ADD_EVENT_LISTENER;if(t!=null&&t[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=Ue.REMOVE_EVENT_LISTENER,t!=null&&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 Ke[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 Ke[e]!==void 0}}var Br=Object.defineProperty,Kr=(n,e,t)=>e in n?Br(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rn=(n,e,t)=>Kr(n,typeof e!="symbol"?e+"":e,t);let Yr=class{constructor(e){Rn(this,"eventQueue",new Map),Rn(this,"queueNumber",1e3),Rn(this,"cmpApiContext"),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 vn(e,i,t,new It(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}},Et=class extends Error{constructor(e){super(e),this.name="InvalidFieldError"}};var zr=Object.defineProperty,Wr=(n,e,t)=>e in n?zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ct=(n,e,t)=>Wr(n,typeof e!="symbol"?e+"":e,t);class ee{constructor(){Ct(this,"segments"),Ct(this,"encodedString",null),Ct(this,"dirty",!1),Ct(this,"decoded",!0),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 Et("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 Et("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 p=class extends Error{constructor(e){super(e),this.name="DecodingError"}},se=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class V{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 se("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 p("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}}var Qr=Object.defineProperty,Jr=(n,e,t)=>e in n?Qr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ps=(n,e,t)=>Jr(n,typeof e!="symbol"?e+"":e,t);const yn=class Ts{encode(e){if(!/^[0-1]*$/.test(e))throw new se("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=V.decode(i),o=Ts.DICT.charAt(r);t+=o,s+=6}catch{throw new se("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new p("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=Ts.REVERSE_DICT.get(i),o=V.encode(r,6);t+=o}return t}};Ps(yn,"DICT","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Ps(yn,"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]]));let ws=yn;var qr=Object.defineProperty,Xr=(n,e,t)=>e in n?qr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zr=(n,e,t)=>Xr(n,typeof e!="symbol"?e+"":e,t);const Mn=class extends ws{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}};Zr(Mn,"instance",new Mn);let H=Mn;var eo=Object.defineProperty,to=(n,e,t)=>e in n?eo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,no=(n,e,t)=>to(n,typeof e!="symbol"?e+"":e,t);const Un=class{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 c=a.substring(e,i);a.decode(c),i+=c.length}catch(c){if(c.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new p("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}};no(Un,"instance",new Un);let b=Un;class rt{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 p("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 ot=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new se("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new p("Undecodable Boolean '"+e+"'")}};class Ds{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=V.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"+rt.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let c=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+rt.encode(a)+rt.encode(c)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=ot.decode(e.substring(r,r+1));if(r++,a===!0){let c=e.indexOf("11",r),d=rt.decode(e.substring(r,c+2))+i;i=d,r=c+2,c=e.indexOf("11",r);let u=rt.decode(e.substring(r,c+2))+i;i=u,r=c+2;for(let _=d;_<=u;_++)t.push(_)}else{let c=e.indexOf("11",r),d=rt.decode(e.substring(r,c+2))+i;i=d,t.push(d),r=c+2}}return t}}let so=class extends Error{constructor(e){super(e),this.name="ValidationError"}};var io=Object.defineProperty,ro=(n,e,t)=>e in n?io(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ln=(n,e,t)=>ro(n,typeof e!="symbol"?e+"":e,t);class ve{constructor(e=!0){Ln(this,"hardFailIfMissing"),Ln(this,"validator"),Ln(this,"value"),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 so("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}let we=class extends p{constructor(e){super(e),this.name="SubstringError"}};class te{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new we("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class oo extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Ds.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=Ds.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=V.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 we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var ao=Object.defineProperty,co=(n,e,t)=>e in n?ao(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,lo=(n,e,t)=>co(n,typeof e!="symbol"?e+"":e,t);class l extends ve{constructor(e,t,s=!0){super(s),lo(this,"bitStringLength"),this.bitStringLength=e,this.setValue(t)}encode(){try{return V.encode(this.value,this.bitStringLength)}catch(e){throw new se(e)}}decode(e){try{this.value=V.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.bitStringLength)}catch(s){throw new we(s)}}}var Eo=Object.defineProperty,uo=(n,e,t)=>e in n?Eo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,So=(n,e,t)=>uo(n,typeof e!="symbol"?e+"":e,t);class v{constructor(){So(this,"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 xe;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(xe||(xe={}));const po=[xe.ID,xe.VERSION,xe.SECTION_IDS];var ho=Object.defineProperty,_o=(n,e,t)=>e in n?ho(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ft=(n,e,t)=>_o(n,typeof e!="symbol"?e+"":e,t);class w{constructor(){ft(this,"fields"),ft(this,"encodedString",null),ft(this,"dirty",!1),ft(this,"decoded",!0),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 Et("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 Et(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}}var go=Object.defineProperty,To=(n,e,t)=>e in n?go(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bs=(n,e,t)=>To(n,typeof e!="symbol"?e+"":e,t);class Oo extends w{constructor(e){super(),bs(this,"base64UrlEncoder",H.getInstance()),bs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return po}initializeFields(){let e=new v;return e.put(xe.ID.toString(),new l(6,Je.ID)),e.put(xe.VERSION.toString(),new l(6,Je.VERSION)),e.put(xe.SECTION_IDS.toString(),new oo([])),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 p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var No=Object.defineProperty,Io=(n,e,t)=>e in n?No(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gn=(n,e,t)=>Io(n,typeof e!="symbol"?e+"":e,t);const mt=class cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return cn.ID}getName(){return cn.NAME}getVersion(){return cn.VERSION}initializeSegments(){let e=[];return e.push(new Oo),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(".")}};Gn(mt,"ID",3),Gn(mt,"VERSION",1),Gn(mt,"NAME","header");let Je=mt;var h;(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"})(h||(h={}));const Ao=[h.VERSION,h.CREATED,h.LAST_UPDATED,h.CMP_ID,h.CMP_VERSION,h.CONSENT_SCREEN,h.CONSENT_LANGUAGE,h.VENDOR_LIST_VERSION,h.POLICY_VERSION,h.IS_SERVICE_SPECIFIC,h.USE_NON_STANDARD_STACKS,h.SPECIAL_FEATURE_OPTINS,h.PURPOSE_CONSENTS,h.PURPOSE_LEGITIMATE_INTERESTS,h.PURPOSE_ONE_TREATMENT,h.PUBLISHER_COUNTRY_CODE,h.VENDOR_CONSENTS,h.VENDOR_LEGITIMATE_INTERESTS,h.PUBLISHER_RESTRICTIONS],Co=[h.PUBLISHER_PURPOSES_SEGMENT_TYPE,h.PUBLISHER_CONSENTS,h.PUBLISHER_LEGITIMATE_INTERESTS,h.NUM_CUSTOM_PURPOSES,h.PUBLISHER_CUSTOM_CONSENTS,h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],fo=[h.VENDORS_ALLOWED_SEGMENT_TYPE,h.VENDORS_ALLOWED],mo=[h.VENDORS_DISCLOSED_SEGMENT_TYPE,h.VENDORS_DISCLOSED];var Po=Object.defineProperty,wo=(n,e,t)=>e in n?Po(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Do=(n,e,t)=>wo(n,typeof e!="symbol"?e+"":e,t);const Fn=class extends ws{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}};Do(Fn,"instance",new Fn);let ut=Fn;class at{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=V.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+V.encode(t[r][0],16):i+="1"+V.encode(t[r][0],16)+V.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=ot.decode(e.substring(i,i+1));if(i++,o===!0){let a=V.decode(e.substring(i,i+16));i+=16;let c=V.decode(e.substring(i,i+16));i+=16;for(let d=a;d<=c;d++)t.push(d)}else{let a=V.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class $n extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=V.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 we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var bo=Object.defineProperty,vo=(n,e,t)=>e in n?bo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xn=(n,e,t)=>vo(n,typeof e!="symbol"?e+"":e,t);class Vo{constructor(e,t,s){xn(this,"key"),xn(this,"type"),xn(this,"ids"),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}}var Ro=Object.defineProperty,yo=(n,e,t)=>e in n?Ro(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,vs=(n,e,t)=>yo(n,typeof e!="symbol"?e+"":e,t);class Vs extends ve{constructor(e,t,s,i=!0){super(i),vs(this,"keyBitStringLength"),vs(this,"typeBitStringLength"),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=V.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=V.encode(i.getKey(),this.keyBitStringLength),t+=V.encode(i.getType(),this.typeBitStringLength),t+=at.encode(i.getIds())}return t}catch(e){throw new se(e)}}decode(e){try{let t=[],s=V.decode(te.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=V.decode(te.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=V.decode(te.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let c=new $n([]).substring(e,i),d=at.decode(c);i+=c.length,t.push(new Vo(o,a,d))}this.value=t}catch(t){throw new p(t)}}substring(e,t){try{let s="";s+=te.substring(e,t,t+12);let i=V.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 c=te.substring(e,r,r+this.typeBitStringLength);r+=c.length,s+=c;let d=new $n([]).substring(e,r);r+=d.length,s+=d}return s}catch(s){throw new we(s)}}}class K extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ot.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+1)}catch(s){throw new we(s)}}}class Rs{static encode(e){return e?V.encode(Math.round(e.getTime()/100),36):V.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new p("Undecodable Datetime '"+e+"'");return new Date(V.decode(e)*100)}}class Pt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Rs.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=Rs.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+36)}catch(s){throw new we(s)}}}class ct{static encode(e,t){if(e.length>t)throw new se("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=ot.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(ot.decode(e.substring(s,s+1)));return t}}var Mo=Object.defineProperty,Uo=(n,e,t)=>e in n?Mo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Lo=(n,e,t)=>Uo(n,typeof e!="symbol"?e+"":e,t);class Le extends ve{constructor(e,t=!0){super(t),Lo(this,"numElements"),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new se(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.numElements)}catch(s){throw new we(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 ys{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+=V.encode(63,6);else if(r>=65)s+=V.encode(e.charCodeAt(i)-65,6);else throw new se("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new p("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=V.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}var Go=Object.defineProperty,Fo=(n,e,t)=>e in n?Go(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$o=(n,e,t)=>Fo(n,typeof e!="symbol"?e+"":e,t);class jn extends ve{constructor(e,t,s=!0){super(s),$o(this,"stringLength"),this.stringLength=e,this.setValue(t)}encode(){try{return ys.encode(this.value,this.stringLength)}catch(e){throw new se(e)}}decode(e){try{this.value=ys.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.stringLength*6)}catch(s){throw new we(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=at.encode(this.value),s=t.length,i=e;if(s<=i)return V.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 V.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new se(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=at.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 p(t)}}substring(e,t){try{let s=V.decode(te.substring(e,t,t+16));return e.charAt(t+16)==="1"?te.substring(e,t,t+17)+new $n([]).substring(e,t+17):te.substring(e,t,t+17+s)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var xo=Object.defineProperty,jo=(n,e,t)=>e in n?xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ms=(n,e,t)=>jo(n,typeof e!="symbol"?e+"":e,t);class Ho extends w{constructor(e){super(),Ms(this,"base64UrlEncoder",ut.getInstance()),Ms(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ao}initializeFields(){let e=new Date,t=new v;return t.put(h.VERSION.toString(),new l(6,X.VERSION)),t.put(h.CREATED.toString(),new Pt(e)),t.put(h.LAST_UPDATED.toString(),new Pt(e)),t.put(h.CMP_ID.toString(),new l(12,0)),t.put(h.CMP_VERSION.toString(),new l(12,0)),t.put(h.CONSENT_SCREEN.toString(),new l(6,0)),t.put(h.CONSENT_LANGUAGE.toString(),new jn(2,"EN")),t.put(h.VENDOR_LIST_VERSION.toString(),new l(12,0)),t.put(h.POLICY_VERSION.toString(),new l(6,2)),t.put(h.IS_SERVICE_SPECIFIC.toString(),new K(!1)),t.put(h.USE_NON_STANDARD_STACKS.toString(),new K(!1)),t.put(h.SPECIAL_FEATURE_OPTINS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_CONSENTS.toString(),new Le([!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(h.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Le([!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(h.PURPOSE_ONE_TREATMENT.toString(),new K(!1)),t.put(h.PUBLISHER_COUNTRY_CODE.toString(),new jn(2,"AA")),t.put(h.VENDOR_CONSENTS.toString(),new qe([])),t.put(h.VENDOR_LEGITIMATE_INTERESTS.toString(),new qe([])),t.put(h.PUBLISHER_RESTRICTIONS.toString(),new Vs(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 p("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}var ko=Object.defineProperty,Bo=(n,e,t)=>e in n?ko(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ko=(n,e,t)=>Bo(n,typeof e!="symbol"?e+"":e,t);class wt extends ve{constructor(e,t,s=!0){super(s),Ko(this,"getLength"),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new se(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.getLength())}catch(s){throw new we(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])}}var Yo=Object.defineProperty,zo=(n,e,t)=>e in n?Yo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Us=(n,e,t)=>zo(n,typeof e!="symbol"?e+"":e,t);class Wo extends w{constructor(e){super(),Us(this,"base64UrlEncoder",ut.getInstance()),Us(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Co}initializeFields(){let e=new v;e.put(h.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(h.PUBLISHER_CONSENTS.toString(),new Le([!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(h.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Le([!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 l(6,0);return e.put(h.NUM_CUSTOM_PURPOSES.toString(),t),e.put(h.PUBLISHER_CUSTOM_CONSENTS.toString(),new wt(()=>t.getValue(),[])),e.put(h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new wt(()=>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 p("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}var Qo=Object.defineProperty,Jo=(n,e,t)=>e in n?Qo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ls=(n,e,t)=>Jo(n,typeof e!="symbol"?e+"":e,t);class qo extends w{constructor(e){super(),Ls(this,"base64UrlEncoder",ut.getInstance()),Ls(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return fo}initializeFields(){let e=new v;return e.put(h.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new l(3,2)),e.put(h.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 p("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}var Xo=Object.defineProperty,Zo=(n,e,t)=>e in n?Xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gs=(n,e,t)=>Zo(n,typeof e!="symbol"?e+"":e,t);class ea extends w{constructor(e){super(),Gs(this,"base64UrlEncoder",ut.getInstance()),Gs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return mo}initializeFields(){let e=new v;return e.put(h.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new l(3,1)),e.put(h.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 p("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}var ta=Object.defineProperty,na=(n,e,t)=>e in n?ta(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hn=(n,e,t)=>na(n,typeof e!="symbol"?e+"":e,t);const Dt=class ln extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ln.ID}getName(){return ln.NAME}getVersion(){return ln.VERSION}initializeSegments(){let e=[];return e.push(new Ho),e.push(new Wo),e.push(new qo),e.push(new ea),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 p("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(h.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!==h.CREATED&&e!==h.LAST_UPDATED){let s=new Date;super.setFieldValue(h.CREATED,s),super.setFieldValue(h.LAST_UPDATED,s)}}};Hn(Dt,"ID",2),Hn(Dt,"VERSION",2),Hn(Dt,"NAME","tcfeuv2");let X=Dt;var O;(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"})(O||(O={}));const sa=[O.VERSION,O.CREATED,O.LAST_UPDATED,O.CMP_ID,O.CMP_VERSION,O.CONSENT_SCREEN,O.CONSENT_LANGUAGE,O.VENDOR_LIST_VERSION,O.TCF_POLICY_VERSION,O.USE_NON_STANDARD_STACKS,O.SPECIAL_FEATURE_EXPRESS_CONSENT,O.PURPOSES_EXPRESS_CONSENT,O.PURPOSES_IMPLIED_CONSENT,O.VENDOR_EXPRESS_CONSENT,O.VENDOR_IMPLIED_CONSENT,O.PUB_RESTRICTIONS],ia=[O.PUB_PURPOSES_SEGMENT_TYPE,O.PUB_PURPOSES_EXPRESS_CONSENT,O.PUB_PURPOSES_IMPLIED_CONSENT,O.NUM_CUSTOM_PURPOSES,O.CUSTOM_PURPOSES_EXPRESS_CONSENT,O.CUSTOM_PURPOSES_IMPLIED_CONSENT],ra=[O.DISCLOSED_VENDORS_SEGMENT_TYPE,O.DISCLOSED_VENDORS];var oa=Object.defineProperty,aa=(n,e,t)=>e in n?oa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fs=(n,e,t)=>aa(n,typeof e!="symbol"?e+"":e,t);class ca extends w{constructor(e){super(),Fs(this,"base64UrlEncoder",H.getInstance()),Fs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return sa}initializeFields(){let e=new Date,t=new v;return t.put(O.VERSION.toString(),new l(6,Ae.VERSION)),t.put(O.CREATED.toString(),new Pt(e)),t.put(O.LAST_UPDATED.toString(),new Pt(e)),t.put(O.CMP_ID.toString(),new l(12,0)),t.put(O.CMP_VERSION.toString(),new l(12,0)),t.put(O.CONSENT_SCREEN.toString(),new l(6,0)),t.put(O.CONSENT_LANGUAGE.toString(),new jn(2,"EN")),t.put(O.VENDOR_LIST_VERSION.toString(),new l(12,0)),t.put(O.TCF_POLICY_VERSION.toString(),new l(6,2)),t.put(O.USE_NON_STANDARD_STACKS.toString(),new K(!1)),t.put(O.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.PURPOSES_EXPRESS_CONSENT.toString(),new Le([!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(O.PURPOSES_IMPLIED_CONSENT.toString(),new Le([!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(O.VENDOR_EXPRESS_CONSENT.toString(),new qe([])),t.put(O.VENDOR_IMPLIED_CONSENT.toString(),new qe([])),t.put(O.PUB_RESTRICTIONS.toString(),new Vs(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 p("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}var la=Object.defineProperty,da=(n,e,t)=>e in n?la(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$s=(n,e,t)=>da(n,typeof e!="symbol"?e+"":e,t);class Ea extends w{constructor(e){super(),$s(this,"base64UrlEncoder",H.getInstance()),$s(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ia}initializeFields(){let e=new v;e.put(O.PUB_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(O.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Le([!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(O.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Le([!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 l(6,0);return e.put(O.NUM_CUSTOM_PURPOSES.toString(),t),e.put(O.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new wt(()=>t.getValue(),[])),e.put(O.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new wt(()=>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 p("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}var ua=Object.defineProperty,Sa=(n,e,t)=>e in n?ua(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xs=(n,e,t)=>Sa(n,typeof e!="symbol"?e+"":e,t);class pa extends w{constructor(e){super(),xs(this,"base64UrlEncoder",ut.getInstance()),xs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ra}initializeFields(){let e=new v;return e.put(O.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new l(3,1)),e.put(O.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 p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var ha=Object.defineProperty,_a=(n,e,t)=>e in n?ha(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,kn=(n,e,t)=>_a(n,typeof e!="symbol"?e+"":e,t);const bt=class dn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return dn.ID}getName(){return dn.NAME}getVersion(){return dn.VERSION}initializeSegments(){let e=[];return e.push(new ca),e.push(new Ea),e.push(new pa),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 p("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(O.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==O.CREATED&&e!==O.LAST_UPDATED){let s=new Date;super.setFieldValue(O.CREATED,s),super.setFieldValue(O.LAST_UPDATED,s)}}};kn(bt,"ID",5),kn(bt,"VERSION",1),kn(bt,"NAME","tcfcav1");let Ae=bt;var ga=Object.defineProperty,Ta=(n,e,t)=>e in n?ga(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,js=(n,e,t)=>Ta(n,typeof e!="symbol"?e+"":e,t);class Bn{constructor(e,t){js(this,"validator"),js(this,"value",null),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}}var Oa=Object.defineProperty,Na=(n,e,t)=>e in n?Oa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hs=(n,e,t)=>Na(n,typeof e!="symbol"?e+"":e,t);class Ia{constructor(e,t){Hs(this,"validator"),Hs(this,"value",null),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}}var Aa=Object.defineProperty,Ca=(n,e,t)=>e in n?Aa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,fa=(n,e,t)=>Ca(n,typeof e!="symbol"?e+"":e,t);class ma{constructor(){fa(this,"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 ie;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(ie||(ie={}));const Pa=[ie.VERSION,ie.NOTICE,ie.OPT_OUT_SALE,ie.LSPA_COVERED];class wa extends w{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pa}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new ma;return t.put(ie.VERSION,new Ia(Ce.VERSION)),t.put(ie.NOTICE,new Bn("-",e)),t.put(ie.OPT_OUT_SALE,new Bn("-",e)),t.put(ie.LSPA_COVERED,new Bn("-",e)),t}encodeSegment(e){let t="";return t+=e.get(ie.VERSION).getValue(),t+=e.get(ie.NOTICE).getValue(),t+=e.get(ie.OPT_OUT_SALE).getValue(),t+=e.get(ie.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new p("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(ie.VERSION).setValue(parseInt(e.substring(0,1))),t.get(ie.NOTICE).setValue(e.charAt(1)),t.get(ie.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(ie.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new p("Unable to decode UspV1CoreSegment '"+e+"'")}}}var Da=Object.defineProperty,ba=(n,e,t)=>e in n?Da(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kn=(n,e,t)=>ba(n,typeof e!="symbol"?e+"":e,t);const vt=class En extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return En.ID}getName(){return En.NAME}getVersion(){return En.VERSION}initializeSegments(){let e=[];return e.push(new wa),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(".")}};Kn(vt,"ID",6),Kn(vt,"VERSION",1),Kn(vt,"NAME","uspv1");let Ce=vt;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 va=[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],Va=[I.GPC_SEGMENT_TYPE,I.GPC];class ks{static encode(e,t,s){if(e.length>s)throw new se("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=V.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 p("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new p("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new p("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(V.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}var Ra=Object.defineProperty,ya=(n,e,t)=>e in n?Ra(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Bs=(n,e,t)=>ya(n,typeof e!="symbol"?e+"":e,t);class W extends ve{constructor(e,t,s=!0){super(s),Bs(this,"elementBitStringLength"),Bs(this,"numElements"),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return ks.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new se(e)}}decode(e){try{this.value=ks.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new we(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)}}var Ma=Object.defineProperty,Ua=(n,e,t)=>e in n?Ma(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ks=(n,e,t)=>Ua(n,typeof e!="symbol"?e+"":e,t);class La extends w{constructor(e){super(),Ks(this,"base64UrlEncoder",H.getInstance()),Ks(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return va}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 v;return i.put(I.VERSION.toString(),new l(6,re.VERSION)),i.put(I.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(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 l(2,0).withValidator(e)),i.put(I.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(I.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(I.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNatCoreSegment '"+e+"'")}}}var Ga=Object.defineProperty,Fa=(n,e,t)=>e in n?Ga(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ys=(n,e,t)=>Fa(n,typeof e!="symbol"?e+"":e,t);class $a extends w{constructor(e){super(),Ys(this,"base64UrlEncoder",H.getInstance()),Ys(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Va}initializeFields(){let e=new v;return e.put(I.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(I.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(I.GPC.toString(),new K(!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 p("Unable to decode UsNatGpcSegment '"+e+"'")}}}var xa=Object.defineProperty,ja=(n,e,t)=>e in n?xa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yn=(n,e,t)=>ja(n,typeof e!="symbol"?e+"":e,t);const Vt=class un extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return un.ID}getName(){return un.NAME}getVersion(){return un.VERSION}initializeSegments(){let e=[];return e.push(new La),e.push(new $a),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(".")}};Yn(Vt,"ID",7),Yn(Vt,"VERSION",1),Yn(Vt,"NAME","usnat");let re=Vt;var R;(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"})(R||(R={}));const Ha=[R.VERSION,R.SALE_OPT_OUT_NOTICE,R.SHARING_OPT_OUT_NOTICE,R.SENSITIVE_DATA_LIMIT_USE_NOTICE,R.SALE_OPT_OUT,R.SHARING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.PERSONAL_DATA_CONSENTS,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],ka=[R.GPC_SEGMENT_TYPE,R.GPC];var Ba=Object.defineProperty,Ka=(n,e,t)=>e in n?Ba(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zs=(n,e,t)=>Ka(n,typeof e!="symbol"?e+"":e,t);class Ya extends w{constructor(e){super(),zs(this,"base64UrlEncoder",H.getInstance()),zs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ha}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 v;return i.put(R.VERSION.toString(),new l(6,ce.VERSION)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(R.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0]).withValidator(s)),i.put(R.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsCaCoreSegment '"+e+"'")}}}var za=Object.defineProperty,Wa=(n,e,t)=>e in n?za(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ws=(n,e,t)=>Wa(n,typeof e!="symbol"?e+"":e,t);class Qa extends w{constructor(e){super(),Ws(this,"base64UrlEncoder",H.getInstance()),Ws(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ka}initializeFields(){let e=new v;return e.put(R.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(R.GPC.toString(),new K(!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 p("Unable to decode UsCaGpcSegment '"+e+"'")}}}var Ja=Object.defineProperty,qa=(n,e,t)=>e in n?Ja(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zn=(n,e,t)=>qa(n,typeof e!="symbol"?e+"":e,t);const Rt=class Sn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Sn.ID}getName(){return Sn.NAME}getVersion(){return Sn.VERSION}initializeSegments(){let e=[];return e.push(new Ya),e.push(new Qa),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(".")}};zn(Rt,"ID",8),zn(Rt,"VERSION",1),zn(Rt,"NAME","usca");let ce=Rt;var J;(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"})(J||(J={}));const Xa=[J.VERSION,J.SHARING_NOTICE,J.SALE_OPT_OUT_NOTICE,J.TARGETED_ADVERTISING_OPT_OUT_NOTICE,J.SALE_OPT_OUT,J.TARGETED_ADVERTISING_OPT_OUT,J.SENSITIVE_DATA_PROCESSING,J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,J.MSPA_COVERED_TRANSACTION,J.MSPA_OPT_OUT_OPTION_MODE,J.MSPA_SERVICE_PROVIDER_MODE];var Za=Object.defineProperty,ec=(n,e,t)=>e in n?Za(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qs=(n,e,t)=>ec(n,typeof e!="symbol"?e+"":e,t);class tc extends w{constructor(e){super(),Qs(this,"base64UrlEncoder",H.getInstance()),Qs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Xa}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 v;return i.put(J.VERSION.toString(),new l(6,le.VERSION)),i.put(J.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(J.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(J.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(J.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(J.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsVaCoreSegment '"+e+"'")}}}var nc=Object.defineProperty,sc=(n,e,t)=>e in n?nc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wn=(n,e,t)=>sc(n,typeof e!="symbol"?e+"":e,t);const yt=class pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pn.ID}getName(){return pn.NAME}getVersion(){return pn.VERSION}initializeSegments(){let e=[];return e.push(new tc),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(".")}};Wn(yt,"ID",9),Wn(yt,"VERSION",1),Wn(yt,"NAME","usva");let le=yt;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.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"})(k||(k={}));const ic=[k.VERSION,k.SHARING_NOTICE,k.SALE_OPT_OUT_NOTICE,k.TARGETED_ADVERTISING_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],rc=[k.GPC_SEGMENT_TYPE,k.GPC];var oc=Object.defineProperty,ac=(n,e,t)=>e in n?oc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Js=(n,e,t)=>ac(n,typeof e!="symbol"?e+"":e,t);class cc extends w{constructor(e){super(),Js(this,"base64UrlEncoder",H.getInstance()),Js(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ic}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 v;return i.put(k.VERSION.toString(),new l(6,de.VERSION)),i.put(k.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(k.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(k.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(k.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsCoCoreSegment '"+e+"'")}}}var lc=Object.defineProperty,dc=(n,e,t)=>e in n?lc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qs=(n,e,t)=>dc(n,typeof e!="symbol"?e+"":e,t);class Ec extends w{constructor(e){super(),qs(this,"base64UrlEncoder",H.getInstance()),qs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return rc}initializeFields(){let e=new v;return e.put(k.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(k.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(k.GPC.toString(),new K(!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 p("Unable to decode UsCoGpcSegment '"+e+"'")}}}var uc=Object.defineProperty,Sc=(n,e,t)=>e in n?uc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qn=(n,e,t)=>Sc(n,typeof e!="symbol"?e+"":e,t);const Mt=class hn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return hn.ID}getName(){return hn.NAME}getVersion(){return hn.VERSION}initializeSegments(){let e=[];return e.push(new cc),e.push(new Ec),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(k.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(k.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(k.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Qn(Mt,"ID",10),Qn(Mt,"VERSION",1),Qn(Mt,"NAME","usco");let de=Mt;var Y;(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"})(Y||(Y={}));const pc=[Y.VERSION,Y.SHARING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];var hc=Object.defineProperty,_c=(n,e,t)=>e in n?hc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xs=(n,e,t)=>_c(n,typeof e!="symbol"?e+"":e,t);class gc extends w{constructor(e){super(),Xs(this,"base64UrlEncoder",H.getInstance()),Xs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return pc}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 v;return i.put(Y.VERSION.toString(),new l(6,Ee.VERSION)),i.put(Y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(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 l(2,0).withValidator(e)),i.put(Y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(Y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(Y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsUtCoreSegment '"+e+"'")}}}var Tc=Object.defineProperty,Oc=(n,e,t)=>e in n?Tc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jn=(n,e,t)=>Oc(n,typeof e!="symbol"?e+"":e,t);const Ut=class _n extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _n.ID}getName(){return _n.NAME}getVersion(){return _n.VERSION}initializeSegments(){let e=[];return e.push(new gc),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(".")}};Jn(Ut,"ID",11),Jn(Ut,"VERSION",1),Jn(Ut,"NAME","usut");let Ee=Ut;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 Nc=[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],Ic=[B.GPC_SEGMENT_TYPE,B.GPC];var Ac=Object.defineProperty,Cc=(n,e,t)=>e in n?Ac(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zs=(n,e,t)=>Cc(n,typeof e!="symbol"?e+"":e,t);class fc extends w{constructor(e){super(),Zs(this,"base64UrlEncoder",H.getInstance()),Zs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Nc}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 v;return i.put(B.VERSION.toString(),new l(6,ue.VERSION)),i.put(B.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(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 W(2,[0,0,0]).withValidator(s)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsCtCoreSegment '"+e+"'")}}}var mc=Object.defineProperty,Pc=(n,e,t)=>e in n?mc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ei=(n,e,t)=>Pc(n,typeof e!="symbol"?e+"":e,t);class wc extends w{constructor(e){super(),ei(this,"base64UrlEncoder",H.getInstance()),ei(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ic}initializeFields(){let e=new v;return e.put(B.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(B.GPC.toString(),new K(!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 p("Unable to decode UsCtGpcSegment '"+e+"'")}}}var Dc=Object.defineProperty,bc=(n,e,t)=>e in n?Dc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qn=(n,e,t)=>bc(n,typeof e!="symbol"?e+"":e,t);const Lt=class gn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return gn.ID}getName(){return gn.NAME}getVersion(){return gn.VERSION}initializeSegments(){let e=[];return e.push(new fc),e.push(new wc),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(".")}};qn(Lt,"ID",12),qn(Lt,"VERSION",1),qn(Lt,"NAME","usct");let ue=Lt;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 vc=[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];var Vc=Object.defineProperty,Rc=(n,e,t)=>e in n?Vc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ti=(n,e,t)=>Rc(n,typeof e!="symbol"?e+"":e,t);class yc extends w{constructor(e){super(),ti(this,"base64UrlEncoder",H.getInstance()),ti(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return vc}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 v;return i.put(z.VERSION.toString(),new l(6,Se.VERSION)),i.put(z.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(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 l(2,0).withValidator(e)),i.put(z.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(z.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsFlCoreSegment '"+e+"'")}}}var Mc=Object.defineProperty,Uc=(n,e,t)=>e in n?Mc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xn=(n,e,t)=>Uc(n,typeof e!="symbol"?e+"":e,t);const Gt=class Tn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Tn.ID}getName(){return Tn.NAME}getVersion(){return Tn.VERSION}initializeSegments(){let e=[];return e.push(new yc),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(".")}};Xn(Gt,"ID",13),Xn(Gt,"VERSION",1),Xn(Gt,"NAME","usfl");let Se=Gt;var y;(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"})(y||(y={}));const Lc=[y.VERSION,y.SHARING_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],Gc=[y.GPC_SEGMENT_TYPE,y.GPC];var Fc=Object.defineProperty,$c=(n,e,t)=>e in n?Fc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ni=(n,e,t)=>$c(n,typeof e!="symbol"?e+"":e,t);class xc extends w{constructor(e){super(),ni(this,"base64UrlEncoder",H.getInstance()),ni(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Lc}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 v;return i.put(y.VERSION.toString(),new l(6,pe.VERSION)),i.put(y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(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 W(2,[0,0,0]).withValidator(s)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsMtCoreSegment '"+e+"'")}}}var jc=Object.defineProperty,Hc=(n,e,t)=>e in n?jc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,si=(n,e,t)=>Hc(n,typeof e!="symbol"?e+"":e,t);class kc extends w{constructor(e){super(),si(this,"base64UrlEncoder",H.getInstance()),si(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Gc}initializeFields(){let e=new v;return e.put(y.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(y.GPC.toString(),new K(!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 p("Unable to decode UsMtGpcSegment '"+e+"'")}}}var Bc=Object.defineProperty,Kc=(n,e,t)=>e in n?Bc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zn=(n,e,t)=>Kc(n,typeof e!="symbol"?e+"":e,t);const Ft=class On extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return On.ID}getName(){return On.NAME}getVersion(){return On.VERSION}initializeSegments(){let e=[];return e.push(new xc),e.push(new kc),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(".")}};Zn(Ft,"ID",14),Zn(Ft,"VERSION",1),Zn(Ft,"NAME","usmt");let pe=Ft;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 Yc=[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],zc=[M.GPC_SEGMENT_TYPE,M.GPC];var Wc=Object.defineProperty,Qc=(n,e,t)=>e in n?Wc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ii=(n,e,t)=>Qc(n,typeof e!="symbol"?e+"":e,t);class Jc extends w{constructor(e){super(),ii(this,"base64UrlEncoder",H.getInstance()),ii(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Yc}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 v;return i.put(M.VERSION.toString(),new l(6,fe.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,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]).withValidator(s)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsOrCoreSegment '"+e+"'")}}}var qc=Object.defineProperty,Xc=(n,e,t)=>e in n?qc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ri=(n,e,t)=>Xc(n,typeof e!="symbol"?e+"":e,t);class Zc extends w{constructor(e){super(),ri(this,"base64UrlEncoder",H.getInstance()),ri(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return zc}initializeFields(){let e=new v;return e.put(M.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(M.GPC.toString(),new K(!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 p("Unable to decode UsOrGpcSegment '"+e+"'")}}}var el=Object.defineProperty,tl=(n,e,t)=>e in n?el(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,es=(n,e,t)=>tl(n,typeof e!="symbol"?e+"":e,t);const $t=class Nn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Nn.ID}getName(){return Nn.NAME}getVersion(){return Nn.VERSION}initializeSegments(){let e=[];return e.push(new Jc),e.push(new Zc),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(".")}};es($t,"ID",15),es($t,"VERSION",1),es($t,"NAME","usor");let fe=$t;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 nl=[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],sl=[U.GPC_SEGMENT_TYPE,U.GPC];var il=Object.defineProperty,rl=(n,e,t)=>e in n?il(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,oi=(n,e,t)=>rl(n,typeof e!="symbol"?e+"":e,t);class ol extends w{constructor(e){super(),oi(this,"base64UrlEncoder",H.getInstance()),oi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return nl}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 v;return i.put(U.VERSION.toString(),new l(6,he.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsTxCoreSegment '"+e+"'")}}}var al=Object.defineProperty,cl=(n,e,t)=>e in n?al(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ai=(n,e,t)=>cl(n,typeof e!="symbol"?e+"":e,t);class ll extends w{constructor(e){super(),ai(this,"base64UrlEncoder",H.getInstance()),ai(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return sl}initializeFields(){let e=new v;return e.put(U.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(U.GPC.toString(),new K(!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 p("Unable to decode UsTxGpcSegment '"+e+"'")}}}var dl=Object.defineProperty,El=(n,e,t)=>e in n?dl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ts=(n,e,t)=>El(n,typeof e!="symbol"?e+"":e,t);const xt=class In extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return In.ID}getName(){return In.NAME}getVersion(){return In.VERSION}initializeSegments(){let e=[];return e.push(new ol),e.push(new ll),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(".")}};ts(xt,"ID",16),ts(xt,"VERSION",1),ts(xt,"NAME","ustx");let he=xt;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 ul=[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],Sl=[L.GPC_SEGMENT_TYPE,L.GPC];var pl=Object.defineProperty,hl=(n,e,t)=>e in n?pl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ci=(n,e,t)=>hl(n,typeof e!="symbol"?e+"":e,t);class _l extends w{constructor(e){super(),ci(this,"base64UrlEncoder",H.getInstance()),ci(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ul}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 v;return i.put(L.VERSION.toString(),new l(6,_e.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsDeCoreSegment '"+e+"'")}}}var gl=Object.defineProperty,Tl=(n,e,t)=>e in n?gl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,li=(n,e,t)=>Tl(n,typeof e!="symbol"?e+"":e,t);class Ol extends w{constructor(e){super(),li(this,"base64UrlEncoder",H.getInstance()),li(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Sl}initializeFields(){let e=new v;return e.put(L.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(L.GPC.toString(),new K(!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 p("Unable to decode UsDeGpcSegment '"+e+"'")}}}var Nl=Object.defineProperty,Il=(n,e,t)=>e in n?Nl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ns=(n,e,t)=>Il(n,typeof e!="symbol"?e+"":e,t);const jt=class An extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return An.ID}getName(){return An.NAME}getVersion(){return An.VERSION}initializeSegments(){let e=[];return e.push(new _l),e.push(new Ol),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(".")}};ns(jt,"ID",17),ns(jt,"VERSION",1),ns(jt,"NAME","usde");let _e=jt;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.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"})(G||(G={}));const Al=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SENSITIVE_DATA_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Cl=[G.GPC_SEGMENT_TYPE,G.GPC];var fl=Object.defineProperty,ml=(n,e,t)=>e in n?fl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,di=(n,e,t)=>ml(n,typeof e!="symbol"?e+"":e,t);class Pl extends w{constructor(e){super(),di(this,"base64UrlEncoder",H.getInstance()),di(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Al}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 v;return i.put(G.VERSION.toString(),new l(6,ge.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(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 l(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsIaCoreSegment '"+e+"'")}}}var wl=Object.defineProperty,Dl=(n,e,t)=>e in n?wl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ei=(n,e,t)=>Dl(n,typeof e!="symbol"?e+"":e,t);class bl extends w{constructor(e){super(),Ei(this,"base64UrlEncoder",H.getInstance()),Ei(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Cl}initializeFields(){let e=new v;return e.put(G.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(G.GPC.toString(),new K(!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 p("Unable to decode UsIaGpcSegment '"+e+"'")}}}var vl=Object.defineProperty,Vl=(n,e,t)=>e in n?vl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ss=(n,e,t)=>Vl(n,typeof e!="symbol"?e+"":e,t);const Ht=class Cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Cn.ID}getName(){return Cn.NAME}getVersion(){return Cn.VERSION}initializeSegments(){let e=[];return e.push(new Pl),e.push(new bl),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(".")}};ss(Ht,"ID",18),ss(Ht,"VERSION",1),ss(Ht,"NAME","usia");let ge=Ht;var F;(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"})(F||(F={}));const Rl=[F.VERSION,F.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],yl=[F.GPC_SEGMENT_TYPE,F.GPC];var Ml=Object.defineProperty,Ul=(n,e,t)=>e in n?Ml(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ui=(n,e,t)=>Ul(n,typeof e!="symbol"?e+"":e,t);class Ll extends w{constructor(e){super(),ui(this,"base64UrlEncoder",H.getInstance()),ui(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Rl}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 v;return i.put(F.VERSION.toString(),new l(6,Te.VERSION)),i.put(F.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(F.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNeCoreSegment '"+e+"'")}}}var Gl=Object.defineProperty,Fl=(n,e,t)=>e in n?Gl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Si=(n,e,t)=>Fl(n,typeof e!="symbol"?e+"":e,t);class $l extends w{constructor(e){super(),Si(this,"base64UrlEncoder",H.getInstance()),Si(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return yl}initializeFields(){let e=new v;return e.put(F.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(F.GPC.toString(),new K(!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 p("Unable to decode UsNeGpcSegment '"+e+"'")}}}var xl=Object.defineProperty,jl=(n,e,t)=>e in n?xl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,is=(n,e,t)=>jl(n,typeof e!="symbol"?e+"":e,t);const kt=class fn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return fn.ID}getName(){return fn.NAME}getVersion(){return fn.VERSION}initializeSegments(){let e=[];return e.push(new Ll),e.push(new $l),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(".")}};is(kt,"ID",19),is(kt,"VERSION",1),is(kt,"NAME","usne");let Te=kt;var $;(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"})($||($={}));const Hl=[$.VERSION,$.PROCESSING_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,$.ADDITIONAL_DATA_PROCESSING_CONSENT,$.MSPA_COVERED_TRANSACTION,$.MSPA_OPT_OUT_OPTION_MODE,$.MSPA_SERVICE_PROVIDER_MODE],kl=[$.GPC_SEGMENT_TYPE,$.GPC];var Bl=Object.defineProperty,Kl=(n,e,t)=>e in n?Bl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,pi=(n,e,t)=>Kl(n,typeof e!="symbol"?e+"":e,t);class Yl extends w{constructor(e){super(),pi(this,"base64UrlEncoder",H.getInstance()),pi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Hl}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 v;return i.put($.VERSION.toString(),new l(6,Oe.VERSION)),i.put($.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(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 W(2,[0,0,0]).withValidator(s)),i.put($.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put($.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNhCoreSegment '"+e+"'")}}}var zl=Object.defineProperty,Wl=(n,e,t)=>e in n?zl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hi=(n,e,t)=>Wl(n,typeof e!="symbol"?e+"":e,t);class Ql extends w{constructor(e){super(),hi(this,"base64UrlEncoder",H.getInstance()),hi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return kl}initializeFields(){let e=new v;return e.put($.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put($.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put($.GPC.toString(),new K(!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 p("Unable to decode UsNhGpcSegment '"+e+"'")}}}var Jl=Object.defineProperty,ql=(n,e,t)=>e in n?Jl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,rs=(n,e,t)=>ql(n,typeof e!="symbol"?e+"":e,t);const Bt=class mn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return mn.ID}getName(){return mn.NAME}getVersion(){return mn.VERSION}initializeSegments(){let e=[];return e.push(new Yl),e.push(new Ql),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($.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue($.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($.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};rs(Bt,"ID",20),rs(Bt,"VERSION",1),rs(Bt,"NAME","usnh");let Oe=Bt;var x;(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"})(x||(x={}));const Xl=[x.VERSION,x.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],Zl=[x.GPC_SEGMENT_TYPE,x.GPC];var ed=Object.defineProperty,td=(n,e,t)=>e in n?ed(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_i=(n,e,t)=>td(n,typeof e!="symbol"?e+"":e,t);class nd extends w{constructor(e){super(),_i(this,"base64UrlEncoder",H.getInstance()),_i(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Xl}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 v;return i.put(x.VERSION.toString(),new l(6,Ne.VERSION)),i.put(x.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,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,0,0]).withValidator(s)),i.put(x.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNjCoreSegment '"+e+"'")}}}var sd=Object.defineProperty,id=(n,e,t)=>e in n?sd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,gi=(n,e,t)=>id(n,typeof e!="symbol"?e+"":e,t);class rd extends w{constructor(e){super(),gi(this,"base64UrlEncoder",H.getInstance()),gi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Zl}initializeFields(){let e=new v;return e.put(x.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(x.GPC.toString(),new K(!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 p("Unable to decode UsNjGpcSegment '"+e+"'")}}}var od=Object.defineProperty,ad=(n,e,t)=>e in n?od(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,os=(n,e,t)=>ad(n,typeof e!="symbol"?e+"":e,t);const Kt=class Pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pn.ID}getName(){return Pn.NAME}getVersion(){return Pn.VERSION}initializeSegments(){let e=[];return e.push(new nd),e.push(new rd),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(".")}};os(Kt,"ID",21),os(Kt,"VERSION",1),os(Kt,"NAME","usnj");let Ne=Kt;var j;(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"})(j||(j={}));const cd=[j.VERSION,j.PROCESSING_NOTICE,j.SALE_OPT_OUT_NOTICE,j.TARGETED_ADVERTISING_OPT_OUT_NOTICE,j.SALE_OPT_OUT,j.TARGETED_ADVERTISING_OPT_OUT,j.SENSITIVE_DATA_PROCESSING,j.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,j.ADDITIONAL_DATA_PROCESSING_CONSENT,j.MSPA_COVERED_TRANSACTION,j.MSPA_OPT_OUT_OPTION_MODE,j.MSPA_SERVICE_PROVIDER_MODE],ld=[j.GPC_SEGMENT_TYPE,j.GPC];var dd=Object.defineProperty,Ed=(n,e,t)=>e in n?dd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ti=(n,e,t)=>Ed(n,typeof e!="symbol"?e+"":e,t);class ud extends w{constructor(e){super(),Ti(this,"base64UrlEncoder",H.getInstance()),Ti(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return cd}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 v;return i.put(j.VERSION.toString(),new l(6,Ie.VERSION)),i.put(j.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(j.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(j.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(j.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(j.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(j.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(j.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(j.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsTnCoreSegment '"+e+"'")}}}var Sd=Object.defineProperty,pd=(n,e,t)=>e in n?Sd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Oi=(n,e,t)=>pd(n,typeof e!="symbol"?e+"":e,t);class hd extends w{constructor(e){super(),Oi(this,"base64UrlEncoder",H.getInstance()),Oi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ld}initializeFields(){let e=new v;return e.put(j.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(j.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(j.GPC.toString(),new K(!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 p("Unable to decode UsTnGpcSegment '"+e+"'")}}}var _d=Object.defineProperty,gd=(n,e,t)=>e in n?_d(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,as=(n,e,t)=>gd(n,typeof e!="symbol"?e+"":e,t);const Yt=class wn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return wn.ID}getName(){return wn.NAME}getVersion(){return wn.VERSION}initializeSegments(){let e=[];return e.push(new ud),e.push(new hd),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(j.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(j.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(j.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};as(Yt,"ID",22),as(Yt,"VERSION",1),as(Yt,"NAME","ustn");let Ie=Yt;var Td=Object.defineProperty,Od=(n,e,t)=>e in n?Td(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ni=(n,e,t)=>Od(n,typeof e!="symbol"?e+"":e,t);class Z{}Ni(Z,"SECTION_ID_NAME_MAP",new Map([[X.ID,X.NAME],[Ae.ID,Ae.NAME],[Ce.ID,Ce.NAME],[re.ID,re.NAME],[ce.ID,ce.NAME],[le.ID,le.NAME],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[pe.ID,pe.NAME],[fe.ID,fe.NAME],[he.ID,he.NAME],[_e.ID,_e.NAME],[ge.ID,ge.NAME],[Te.ID,Te.NAME],[Oe.ID,Oe.NAME],[Ne.ID,Ne.NAME],[Ie.ID,Ie.NAME]])),Ni(Z,"SECTION_ORDER",[X.NAME,Ae.NAME,Ce.NAME,re.NAME,ce.NAME,le.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,pe.NAME,fe.NAME,he.NAME,_e.NAME,ge.NAME,Te.NAME,Oe.NAME,Ne.NAME,Ie.NAME]);var Nd=Object.defineProperty,Id=(n,e,t)=>e in n?Nd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zt=(n,e,t)=>Id(n,typeof e!="symbol"?e+"":e,t);class Ii{constructor(e){zt(this,"sections",new Map),zt(this,"encodedString",null),zt(this,"decoded",!0),zt(this,"dirty",!1),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===Ae.NAME?(i=new Ae,this.sections.set(Ae.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===fe.NAME?(i=new fe,this.sections.set(fe.NAME,i)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===_e.NAME?(i=new _e,this.sections.set(_e.NAME,i)):e===ge.NAME?(i=new ge,this.sections.set(ge.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===Ne.NAME?(i=new Ne,this.sections.set(Ne.NAME,i)):e===Ie.NAME&&(i=new Ie,this.sections.set(Ie.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new Et(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(Z.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(Z.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(Z.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(Z.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(Z.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 Je;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<Z.SECTION_ORDER.length;t++){let s=Z.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<Z.SECTION_ORDER.length;r++){let o=Z.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);t.push(a.encode()),s.push(a.getId())}}let i=new Je;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 i=new Je(t[0]).getFieldValue("SectionIds");if(i.length!==t.length-1)throw new p("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let r=0;r<i.length;r++){if(t[r+1].trim()==="")throw new p("Unable to decode '"+e+"'. Section "+(r+1)+" is blank.");if(i[r]===Ae.ID){let o=new Ae(t[r+1]);s.set(Ae.NAME,o)}else if(i[r]===X.ID){let o=new X(t[r+1]);s.set(X.NAME,o)}else if(i[r]===Ce.ID){let o=new Ce(t[r+1]);s.set(Ce.NAME,o)}else if(i[r]===re.ID){let o=new re(t[r+1]);s.set(re.NAME,o)}else if(i[r]===ce.ID){let o=new ce(t[r+1]);s.set(ce.NAME,o)}else if(i[r]===le.ID){let o=new le(t[r+1]);s.set(le.NAME,o)}else if(i[r]===de.ID){let o=new de(t[r+1]);s.set(de.NAME,o)}else if(i[r]===Ee.ID){let o=new Ee(t[r+1]);s.set(Ee.NAME,o)}else if(i[r]===ue.ID){let o=new ue(t[r+1]);s.set(ue.NAME,o)}else if(i[r]===Se.ID){let o=new Se(t[r+1]);s.set(Se.NAME,o)}else if(i[r]===pe.ID){let o=new pe(t[r+1]);s.set(pe.NAME,o)}else if(i[r]===fe.ID){let o=new fe(t[r+1]);s.set(fe.NAME,o)}else if(i[r]===he.ID){let o=new he(t[r+1]);s.set(he.NAME,o)}else if(i[r]===_e.ID){let o=new _e(t[r+1]);s.set(_e.NAME,o)}else if(i[r]===ge.ID){let o=new ge(t[r+1]);s.set(ge.NAME,o)}else if(i[r]===Te.ID){let o=new Te(t[r+1]);s.set(Te.NAME,o)}else if(i[r]===Oe.ID){let o=new Oe(t[r+1]);s.set(Oe.NAME,o)}else if(i[r]===Ne.ID){let o=new Ne(t[r+1]);s.set(Ne.NAME,o)}else if(i[r]===Ie.ID){let o=new Ie(t[r+1]);s.set(Ie.NAME,o)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new X(e);return t.set(X.NAME,s),new Je().setFieldValue(xe.SECTION_IDS,[2]),t.set(Je.NAME,s),t}else throw new p("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(Z.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===Ae.NAME?(s=new Ae,this.sections.set(Ae.NAME,s)):e===X.NAME?(s=new X,this.sections.set(X.NAME,s)):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===fe.NAME?(s=new fe,this.sections.set(fe.NAME,s)):e===he.NAME?(s=new he,this.sections.set(he.NAME,s)):e===_e.NAME?(s=new _e,this.sections.set(_e.NAME,s)):e===ge.NAME?(s=new ge,this.sections.set(ge.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===Ne.NAME?(s=new Ne,this.sections.set(Ne.NAME,s)):e===Ie.NAME&&(s=new Ie,this.sections.set(Ie.NAME,s)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(Z.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<Z.SECTION_ORDER.length;t++){let s=Z.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}}var Ad=Object.defineProperty,Cd=(n,e,t)=>e in n?Ad(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ve=(n,e,t)=>Cd(n,typeof e!="symbol"?e+"":e,t);class fd{constructor(){Ve(this,"gppVersion","1.1"),Ve(this,"supportedAPIs",[]),Ve(this,"eventQueue",new Yr(this)),Ve(this,"cmpStatus",it.LOADING),Ve(this,"cmpDisplayStatus",Ye.HIDDEN),Ve(this,"signalStatus",be.NOT_READY),Ve(this,"applicableSections",[]),Ve(this,"gppModel",new Ii),Ve(this,"cmpId"),Ve(this,"cmpVersion"),Ve(this,"eventStatus")}reset(){this.eventQueue.clear(),this.cmpStatus=it.LOADING,this.cmpDisplayStatus=Ye.HIDDEN,this.signalStatus=be.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new Ii,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class cs{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},_=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=_,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 Wt=class extends Error{constructor(e){super(e),this.name="GVLError"}};var md=Object.defineProperty,Pd=(n,e,t)=>e in n?md(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,wd=(n,e,t)=>Pd(n,typeof e!="symbol"?e+"":e,t);const Ai=class Dn{has(e){return Dn.langSet.has(e)}forEach(e){Dn.langSet.forEach(e)}get size(){return Dn.langSet.size}};wd(Ai,"langSet",new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]));let Dd=Ai;var bd=Object.defineProperty,vd=(n,e,t)=>e in n?bd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q=(n,e,t)=>vd(n,typeof e!="symbol"?e+"":e,t),Ci=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const fi=class bn{constructor(){q(this,"vendors"),q(this,"consentLanguages",new Dd),q(this,"gvlSpecificationVersion"),q(this,"vendorListVersion"),q(this,"tcfPolicyVersion"),q(this,"lastUpdated"),q(this,"purposes"),q(this,"specialPurposes"),q(this,"features"),q(this,"specialFeatures"),q(this,"stacks"),q(this,"dataCategories"),q(this,"language",bn.DEFAULT_LANGUAGE),q(this,"vendorIds"),q(this,"ready",!1),q(this,"fullVendorList"),q(this,"byPurposeVendorMap"),q(this,"bySpecialPurposeVendorMap"),q(this,"byFeatureVendorMap"),q(this,"bySpecialFeatureVendorMap"),q(this,"baseUrl"),q(this,"languageFilename","purposes-[LANG].json")}static fromVendorList(e){let t=new bn;return t.populate(e),t}static fromUrl(e){return Ci(this,null,function*(){let t=e.baseUrl;if(!t||t.length===0)throw new Wt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Wt("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 bn;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(yield cs.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(yield cs.fetch(r))}return s})}changeLanguage(e){return Ci(this,null,function*(){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(yield cs.fetch(s))}catch(i){throw new Wt("unable to load language: "+i.message)}}}else throw new Wt(`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(c=>{a[String(c)]=this.vendors[String(c)]}),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"}};q(fi,"DEFAULT_LANGUAGE","EN");let mi=fi;var Vd=Object.defineProperty,Rd=(n,e,t)=>e in n?Vd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Pi=(n,e,t)=>Rd(n,typeof e!="symbol"?e+"":e,t),yd=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});class Md{constructor(e,t,s){Pi(this,"callResponder"),Pi(this,"cmpApiContext"),this.cmpApiContext=new fd,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new kr(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(Z.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(Z.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(Z.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(Z.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(Z.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return mi.fromVendorList(e)}getGvlFromUrl(e){return yd(this,null,function*(){return mi.fromUrl(e)})}}var Ud=Object.defineProperty,Ld=(n,e,t)=>e in n?Ud(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ls=(n,e,t)=>Ld(n,typeof e!="symbol"?e+"":e,t);class wi{constructor(e,t,s){ls(this,"consentPreference"),ls(this,"notice"),ls(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Di;(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={}))})(Di||(Di={}));var Gd=(n=>(n.GPP_US_NATIONAL="gpp_us_national",n.GPP_US_STATE="gpp_us_state",n))(Gd||{}),Fd=(n=>(n.FRONTEND="frontend",n.SYSTEM_WIDE="system_wide",n.NOT_APPLICABLE="not_applicable",n))(Fd||{}),bi=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(bi||{}),Ge=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(Ge||{}),Qt=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(Qt||{}),St=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(St||{}),$d=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))($d||{}),pt=(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))(pt||{}),xd=(n=>(n.ALWAYS_ENABLED="always_enabled",n.ENABLED_WHERE_REQUIRED="enabled_where_required",n.ALWAYS_DISABLED="always_disabled",n))(xd||{}),jd=(n=>(n.OPTIONS="options",n.EXPERIENCE_TRANSLATION="language",n))(jd||{}),Hd=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n))(Hd||{}),kd=(n=>(n.ACKNOWLEDGE="acknowledge",n.OPT_IN_OPT_OUT="opt_in_opt_out",n.OPT_IN_ONLY="opt_in_only",n))(kd||{}),Bd=(n=>(n.REJECT_ALL="reject_all",n.REJECT_CONSENT_ONLY="reject_consent_only",n))(Bd||{}),ht=(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.OT_MIGRATION="ot_migration",n))(ht||{}),Kd=(n=>(n.privacy_center="privacy_center",n.overlay="overlay",n.api="api",n))(Kd||{}),Yd=(n=>(n.NONE="none",n.APPLIED="applied",n.OVERRIDDEN="overridden",n))(Yd||{}),zd=(n=>(n.OVERLAY="overlay",n.MODAL="modal",n.BANNER="banner",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.TCF_BANNER="tcf_banner",n))(zd||{});const Wd=(n,e)=>!!Object.keys(e).includes(n.notice_key),ds=n=>!n||n===Ge.OPT_OUT?!1:n===Ge.OPT_IN?!0:n===Ge.ACKNOWLEDGE,_t=(n,e)=>n?e===bi.NOTICE_ONLY?Ge.ACKNOWLEDGE:Ge.OPT_IN:Ge.OPT_OUT,Qd=n=>typeof n=="string"?ds(n):n,Jd=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var qd=Object.defineProperty,Xd=Object.defineProperties,Zd=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,eE=Object.prototype.hasOwnProperty,tE=Object.prototype.propertyIsEnumerable,Vi=(n,e,t)=>e in n?qd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jt=(n,e)=>{for(var t in e||(e={}))eE.call(e,t)&&Vi(n,t,e[t]);if(vi)for(var t of vi(e))tE.call(e,t)&&Vi(n,t,e[t]);return n},nE=(n,e)=>Xd(n,Zd(e));const lt=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Ri=n=>!!(n&&n.every(e=>e.default_preference===Ge.OPT_IN)),sE=n=>n?n.location&&Jd.test(n.location)?n.location.replace("-","_").toLowerCase():n.country&&n.region?`${n.country.toLowerCase()}_${n.region.toLowerCase()}`:null:null,yi=n=>n.fidesConsentOverride===ht.ACCEPT||n.fidesConsentOverride===ht.REJECT,iE=(n,e,t,s)=>{var i,r,o,a,c,d;return s!=null&&s.fidesDisableBanner||!lt(n)?!1:((i=n.experience_config)==null?void 0:i.component)===pt.TCF_OVERLAY&&e?s&&yi(s)?!1:(r=n.meta)!=null&&r.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((o=n.experience_config)==null?void 0:o.component)===pt.MODAL||((a=n.experience_config)==null?void 0:a.component)===pt.HEADLESS||!((c=n?.privacy_notices)!=null&&c.length)?!1:t?s&&yi(s)?!1:e?.fides_meta.consentMethod===ht.GPC?!0:!((d=n.privacy_notices)!=null&&d.every(u=>Wd(u,t))):!0},rE=(n,e)=>n.map(t=>{var s;const i=_t(e.includes(t.notice.notice_key),t.notice.consent_mechanism);return new wi(t.notice,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)}),oE=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=Qt.OMIT})=>{if(!(e!=null&&e.length))return n;const i=Jt({},n);return s===Qt.INCLUDE?e.forEach(r=>{i[r]=t===St.CONSENT_MECHANISM?Ge.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},aE=({consent:n,flagType:e=St.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==St.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,Qd(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]=_t(o,a)}}),s):Jt({},n)},Mi=(n,e,t=[],s,i)=>{var r,o,a;const c=Jt({},n),d=(r=window.Fides)==null?void 0:r.options,u=(o=i??d?.fidesConsentNonApplicableFlagMode)!=null?o:Qt.OMIT,_=(a=s??d?.fidesConsentFlagType)!=null?a:St.BOOLEAN,E={};Object.assign(E,oE({consent:{},nonApplicableNotices:e??[],flagType:_,mode:u}));const N=t.reduce((g,f)=>nE(Jt({},g),{[f.notice_key]:f.consent_mechanism}),{});return Object.assign(E,aE({consent:c,consentMechanisms:N,flagType:_})),E};var Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */qt.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof Es=="object"&&Es;(r.global===r||r.window===r)&&(t=r);var o=function(g){this.message=g};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(g){throw new o(g)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,u=function(g){g=String(g).replace(d,"");var f=g.length;f%4==0&&(g=g.replace(/==?$/,""),f=g.length),(f%4==1||/[^+a-zA-Z0-9/]/.test(g))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var C=0,m,P,ne="",ye=-1;++ye<f;)P=c.indexOf(g.charAt(ye)),m=C%4?m*64+P:P,C++%4&&(ne+=String.fromCharCode(255&m>>(-2*C&6)));return ne},_=function(g){g=String(g),/[^\0-\xFF]/.test(g)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var f=g.length%3,C="",m=-1,P,ne,ye,Pe,Pr=g.length-f;++m<Pr;)P=g.charCodeAt(m)<<16,ne=g.charCodeAt(++m)<<8,ye=g.charCodeAt(++m),Pe=P+ne+ye,C+=c.charAt(Pe>>18&63)+c.charAt(Pe>>12&63)+c.charAt(Pe>>6&63)+c.charAt(Pe&63);return f==2?(P=g.charCodeAt(m)<<8,ne=g.charCodeAt(++m),Pe=P+ne,C+=c.charAt(Pe>>10)+c.charAt(Pe>>4&63)+c.charAt(Pe<<2&63)+"="):f==1&&(Pe=g.charCodeAt(m),C+=c.charAt(Pe>>2)+c.charAt(Pe<<4&63)+"=="),C},E={encode:_,decode:u,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=E;else for(var N in E)E.hasOwnProperty(N)&&(s[N]=E[N]);else t.base64=E})(Es)}(qt,qt.exports);var Ui=qt.exports;/*! js-cookie v3.0.5 | MIT */function Xt(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 cE={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 us(n,e){function t(i,r,o){if(!(typeof document>"u")){o=Xt({},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 c in o)o[c]&&(a+="; "+c,o[c]!==!0&&(a+="="+o[c].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 c=r[a].split("="),d=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(o[u]=n.read(d,u),i===u)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",Xt({},r,{expires:-1}))},withAttributes:function(i){return us(this.converter,Xt({},this.attributes,i))},withConverter:function(i){return us(Xt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var lE=us(cE,{path:"/"});let Zt;const dE=new Uint8Array(16);function EE(){if(!Zt&&(Zt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zt(dE)}const ae=[];for(let n=0;n<256;++n)ae.push((n+256).toString(16).slice(1));function uE(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 SE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Li={randomUUID:SE};function pE(n,e,t){if(Li.randomUUID&&!e&&!n)return Li.randomUUID();n=n||{};const s=n.random||(n.rng||EE)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=s[i];return e}return uE(s)}var hE=(n=>(n.CONSENT="Consent",n.CONTRACT="Contract",n.LEGAL_OBLIGATIONS="Legal obligations",n.VITAL_INTERESTS="Vital interests",n.PUBLIC_INTEREST="Public interest",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(hE||{}),Ss=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(Ss||{});const ps=407,en=",",_E=[{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"}],gE=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];_E.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),Ss.CONSENT.toString(),Ss.LEGITIMATE_INTERESTS.toString();const TE={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var OE=Object.defineProperty,NE=Object.defineProperties,IE=Object.getOwnPropertyDescriptors,Gi=Object.getOwnPropertySymbols,AE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,Fi=(n,e,t)=>e in n?OE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,fE=(n,e)=>{for(var t in e||(e={}))AE.call(e,t)&&Fi(n,t,e[t]);if(Gi)for(var t of Gi(e))CE.call(e,t)&&Fi(n,t,e[t]);return n},mE=(n,e)=>NE(n,IE(e)),PE=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const $i="fides_consent",wE=365,tn=lE.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),DE=()=>pE();DE();const bE=n=>tn.get(n),vE=()=>{const n=bE($i);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(Ui.decode(n))}catch{return}}},xi=(n,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();n.fides_meta.updatedAt=t;let s=JSON.stringify(n);e&&(s=Ui.encode(s));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),tn.set($i,s,{path:"/",domain:r,expires:wE})){const a=vE();if(a&&a.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},VE=n=>{const e={};return gE.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,ds(r.preference)]))}),e},RE=(n,e=!0)=>{n.forEach(t=>{var s;if(tn.remove(t.name,{path:(s=t.path)!=null?s:"/",domain:t.domain}),e){const{hostname:i}=window.location;tn.remove(t.name,{domain:`.${i}`})}})},ji=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,ds(s)]));return Object.fromEntries(e)},yE=(n,e)=>PE(void 0,null,function*(){return mE(fE({},n),{consent:ji(e)})});var ME=(n=>(n.GVL="gvl",n.AC="gacp",n))(ME||{});const je=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},nn=(n,e)=>{if(!(e!=null&&e.vendors))return;const{source:t,id:s}=je(n);if(t==="gvl"||t===void 0)return e.vendors[s]},UE=n=>je(n).source==="gacp",LE=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(t=>t.id).filter(t=>nn(t,n.gvl)).map(t=>+je(t).id)},GE=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>nn(t,n.gvl)).map(t=>+je(t).id)},FE=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(en);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},Hi=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(en))||[]).concat(s);return s.map((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},$E=1,Xe={us:{name:re.NAME,id:re.ID},us_ca:{name:ce.NAME,id:ce.ID},us_co:{name:de.NAME,id:de.ID},us_ct:{name:ue.NAME,id:ue.ID},us_ut:{name:Ee.NAME,id:Ee.ID},us_va:{name:le.NAME,id:le.ID},us_de:{name:_e.NAME,id:_e.ID},us_fl:{name:Se.NAME,id:Se.ID},us_ia:{name:ge.NAME,id:ge.ID},us_mt:{name:pe.NAME,id:pe.ID},us_ne:{name:Te.NAME,id:Te.ID},us_nh:{name:Oe.NAME,id:Oe.ID},us_nj:{name:Ne.NAME,id:Ne.ID},us_tn:{name:Ie.NAME,id:Ie.ID},us_tx:{name:he.NAME,id:he.ID}};function ki(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}var xE=Object.defineProperty,jE=Object.defineProperties,HE=Object.getOwnPropertyDescriptors,Bi=Object.getOwnPropertySymbols,kE=Object.prototype.hasOwnProperty,BE=Object.prototype.propertyIsEnumerable,Ki=(n,e,t)=>e in n?xE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yi=(n,e)=>{for(var t in e||(e={}))kE.call(e,t)&&Ki(n,t,e[t]);if(Bi)for(var t of Bi(e))BE.call(e,t)&&Ki(n,t,e[t]);return n},zi=(n,e)=>jE(n,HE(e)),KE=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())}),YE=(n=>(n.PRIVACY_EXPERIENCE="/privacy-experience",n.PRIVACY_PREFERENCES="/privacy-preferences",n.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",n.NOTICES_SERVED="/notices-served",n))(YE||{});const zE={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},WE="Fides.js",QE=(n,e,t,s,i)=>KE(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(c){return Promise.reject(c)}return Promise.resolve()}const o=zi(Yi({},zE),{body:JSON.stringify(zi(Yi({},e),{source:WE}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var JE=Object.defineProperty,qE=Object.defineProperties,XE=Object.getOwnPropertyDescriptors,Wi=Object.getOwnPropertySymbols,ZE=Object.prototype.hasOwnProperty,eu=Object.prototype.propertyIsEnumerable,Qi=(n,e,t)=>e in n?JE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hs=(n,e)=>{for(var t in e||(e={}))ZE.call(e,t)&&Qi(n,t,e[t]);if(Wi)for(var t of Wi(e))eu.call(e,t)&&Qi(n,t,e[t]);return n},tu=(n,e)=>qE(n,XE(e));const Ji=(n,e,t)=>{var s,i,r,o,a,c,d;const u=e?hs({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const _=hs({consentMethod:u?.fides_meta.consentMethod},t),E=(s=performance?.mark)==null?void 0:s.call(performance,n),N=E?.startTime,g=u;g&&u!=null&&u.consent&&(g.consent=Mi(u.consent,(r=(i=window.Fides)==null?void 0:i.experience)==null?void 0:r.non_applicable_privacy_notices,(a=(o=window.Fides)==null?void 0:o.experience)==null?void 0:a.privacy_notices));const f=new CustomEvent(n,{detail:tu(hs({},g),{debug:!!((d=(c=window.Fides)==null?void 0:c.options)!=null&&d.debug),extraDetails:_,timestamp:N}),bubbles:!0});window.dispatchEvent(f)}};var nu=Object.defineProperty,su=Object.defineProperties,iu=Object.getOwnPropertyDescriptors,qi=Object.getOwnPropertySymbols,ru=Object.prototype.hasOwnProperty,ou=Object.prototype.propertyIsEnumerable,Xi=(n,e,t)=>e in n?nu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zi=(n,e)=>{for(var t in e||(e={}))ru.call(e,t)&&Xi(n,t,e[t]);if(qi)for(var t of qi(e))ou.call(e,t)&&Xi(n,t,e[t]);return n},au=(n,e)=>su(n,iu(e)),er=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});function cu(n,e,t,s,i,r,o,a,c,d){return er(this,null,function*(){const u=(r||[]).map(E=>({preference:E.consentPreference,privacy_notice_history_id:E.noticeHistoryId||""})),_=Zi({browser_identity:e.identity,preferences:u,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:c,property_id:d},o??[]);yield QE(s,_,n,e,t)})}const lu=n=>er(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,servedNoticeHistoryId:c,tcf:d,updateCookie:u,propertyId:_}){var E,N,g,f;if(!u&&e&&(u=P=>yE(P,e)),!u&&!e)throw new Error("updateCookie is required");const C=yield u(a);Object.assign(a,C),Object.assign(a.fides_meta,{consentMethod:i}),Ji("FidesUpdating",a);const m=Mi(a.consent,(N=(E=window.Fides)==null?void 0:E.experience)==null?void 0:N.non_applicable_privacy_notices,(f=(g=window.Fides)==null?void 0:g.experience)==null?void 0:f.privacy_notices);if(window.Fides.consent=m,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,xi(au(Zi({},a),{consent:m}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield cu(r,a,s,i,t,e,d,o,c,_)}catch{}e&&e.filter(P=>P.consentPreference===Ge.OPT_OUT).forEach(P=>{var ne,ye;(ne=P.notice)!=null&&ne.cookies&&RE(P.notice.cookies,(ye=s.experience_config)==null?void 0:ye.auto_subdomain_cookie_deletion)}),Ji("FidesUpdated",a)});class ze extends Error{constructor(e){super(e),this.name="DecodingError"}}class He extends Error{constructor(e){super(e),this.name="EncodingError"}}class dt 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 _s{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 He("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 ze("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 Be{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 Be.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(Be.langSet.has(e))return e;if(Be.langSet.has(t))return t;const s=t+"-"+t;if(Be.langSet.has(s))return s;for(const i of Be.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){Be.langSet.forEach(e)}get size(){return Be.langSet.size}}class S{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 gt{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 $e extends gt{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 $e;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}${$e.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 tr extends gt{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($e.unHash(i)):t.push($e.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add($e.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=$e.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 nr;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(nr||(nr={}));var Q;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(Q||(Q={}));class sr{static ID_TO_KEY=[Q.CORE,Q.VENDORS_DISCLOSED,Q.VENDORS_ALLOWED,Q.PUBLISHER_TC];static KEY_TO_ID={[Q.CORE]:0,[Q.VENDORS_DISCLOSED]:1,[Q.VENDORS_ALLOWED]:2,[Q.PUBLISHER_TC]:3}}class me extends gt{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 T{static[S.cmpId]=12;static[S.cmpVersion]=12;static[S.consentLanguage]=12;static[S.consentScreen]=6;static[S.created]=36;static[S.isServiceSpecific]=1;static[S.lastUpdated]=36;static[S.policyVersion]=6;static[S.publisherCountryCode]=12;static[S.publisherLegitimateInterests]=24;static[S.publisherConsents]=24;static[S.purposeConsents]=24;static[S.purposeLegitimateInterests]=24;static[S.purposeOneTreatment]=1;static[S.specialFeatureOptins]=12;static[S.useNonStandardTexts]=1;static[S.vendorListVersion]=12;static[S.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 Fe{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class D{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 He(`${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 ze("invalid bit length");return parseInt(e,2)}}class ir{static encode(e,t){return D.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");const s=new Date;return s.setTime(D.decode(e,t)*100),s}}class We{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=Fe.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new ze("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)Fe.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class rr{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 He(`invalid language code: ${e}`);if(t%2===1)throw new He(`numBits must be even, ${t} is not valid`);t=t/2;const o=D.encode(i,t),a=D.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=D.decode(e.slice(0,r),r)+65,a=D.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new ze("invalid bit length for language");return s}}class du{static encode(e){let t=D.encode(e.numRestrictions,T.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+=D.encode(i.purposeId,T.purposeId),t+=D.encode(i.restrictionType,T.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,c=0,d="";for(let u=0;u<o;u++){const _=r[u];if(c===0&&(a++,c=_),u===o-1||r[u+1]>s(_,r[o-1])){const E=_!==c;d+=Fe.encode(E),d+=D.encode(c,T.vendorId),E&&(d+=D.encode(_,T.vendorId)),c=0}}t+=D.encode(a,T.numEntries),t+=d})}return t}static decode(e){let t=0;const s=new tr,i=D.decode(e.substr(t,T.numRestrictions),T.numRestrictions);t+=T.numRestrictions;for(let r=0;r<i;r++){const o=D.decode(e.substr(t,T.purposeId),T.purposeId);t+=T.purposeId;const a=D.decode(e.substr(t,T.restrictionType),T.restrictionType);t+=T.restrictionType;const c=new $e(o,a),d=D.decode(e.substr(t,T.numEntries),T.numEntries);t+=T.numEntries;for(let u=0;u<d;u++){const _=Fe.decode(e.substr(t,T.anyBoolean));t+=T.anyBoolean;const E=D.decode(e.substr(t,T.vendorId),T.vendorId);if(t+=T.vendorId,_){const N=D.decode(e.substr(t,T.vendorId),T.vendorId);if(t+=T.vendorId,N<E)throw new ze(`Invalid RangeEntry: endVendorId ${N} is less than ${E}`);for(let g=E;g<=N;g++)s.add(g,c)}else s.add(E,c)}}return s.bitLength=t,s}}var Tt;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Tt||(Tt={}));class Ot{static encode(e){const t=[];let s=[],i=D.encode(e.maxId,T.maxId),r="",o;const a=T.maxId+T.encodingType,c=a+e.maxId,d=T.vendorId*2+T.singleOrRange+T.numEntries;let u=a+T.numEntries;return e.forEach((_,E)=>{r+=Fe.encode(_),o=e.maxId>d&&u<c,o&&_&&(e.has(E+1)?s.length===0&&(s.push(E),u+=T.singleOrRange,u+=T.vendorId):(s.push(E),u+=T.vendorId,t.push(s),s=[]))}),o?(i+=String(Tt.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(Tt.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=D.decode(e.substr(i,T.maxId),T.maxId);i+=T.maxId;const o=D.decode(e.charAt(i),T.encodingType);if(i+=T.encodingType,o===Tt.RANGE){if(s=new me,t===1){if(e.substr(i,1)==="1")throw new ze("Unable to decode default consent=1");i++}const a=D.decode(e.substr(i,T.numEntries),T.numEntries);i+=T.numEntries;for(let c=0;c<a;c++){const d=Fe.decode(e.charAt(i));i+=T.singleOrRange;const u=D.decode(e.substr(i,T.vendorId),T.vendorId);if(i+=T.vendorId,d){const _=D.decode(e.substr(i,T.vendorId),T.vendorId);i+=T.vendorId;for(let E=u;E<=_;E++)s.set(E)}else s.set(u)}}else{const a=e.substr(i,r);i+=r,s=We.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=D.encode(t,T.numEntries);return e.forEach(i=>{const r=i.length===1;s+=Fe.encode(!r),s+=D.encode(i[0],T.vendorId),r||(s+=D.encode(i[1],T.vendorId))}),s}}function or(){return{[S.version]:D,[S.created]:ir,[S.lastUpdated]:ir,[S.cmpId]:D,[S.cmpVersion]:D,[S.consentScreen]:D,[S.consentLanguage]:rr,[S.vendorListVersion]:D,[S.policyVersion]:D,[S.isServiceSpecific]:Fe,[S.useNonStandardTexts]:Fe,[S.specialFeatureOptins]:We,[S.purposeConsents]:We,[S.purposeLegitimateInterests]:We,[S.purposeOneTreatment]:Fe,[S.publisherCountryCode]:rr,[S.vendorConsents]:Ot,[S.vendorLegitimateInterests]:Ot,[S.publisherRestrictions]:du,segmentType:D,[S.vendorsDisclosed]:Ot,[S.vendorsAllowed]:Ot,[S.publisherConsents]:We,[S.publisherLegitimateInterests]:We,[S.numCustomPurposes]:D,[S.publisherCustomConsents]:We,[S.publisherCustomLegitimateInterests]:We}}class Eu{1={[Q.CORE]:[S.version,S.created,S.lastUpdated,S.cmpId,S.cmpVersion,S.consentScreen,S.consentLanguage,S.vendorListVersion,S.purposeConsents,S.vendorConsents]};2={[Q.CORE]:[S.version,S.created,S.lastUpdated,S.cmpId,S.cmpVersion,S.consentScreen,S.consentLanguage,S.vendorListVersion,S.policyVersion,S.isServiceSpecific,S.useNonStandardTexts,S.specialFeatureOptins,S.purposeConsents,S.purposeLegitimateInterests,S.purposeOneTreatment,S.publisherCountryCode,S.vendorConsents,S.vendorLegitimateInterests,S.publisherRestrictions],[Q.PUBLISHER_TC]:[S.publisherConsents,S.publisherLegitimateInterests,S.numCustomPurposes,S.publisherCustomConsents,S.publisherCustomLegitimateInterests],[Q.VENDORS_ALLOWED]:[S.vendorsAllowed],[Q.VENDORS_DISCLOSED]:[S.vendorsDisclosed]}}class uu{1=[Q.CORE];2=[Q.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(Q.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[S.supportOOB]===!0)&&this[2].push(Q.VENDORS_DISCLOSED),s&&(e[S.supportOOB]&&e[S.vendorsAllowed].size>0&&this[2].push(Q.VENDORS_ALLOWED),this[2].push(Q.PUBLISHER_TC))}}}class ar{static fieldSequence=new Eu;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new He(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==Q.CORE&&(i=D.encode(sr.KEY_TO_ID[t],T.segmentType));const r=or();return s.forEach(o=>{const a=e[o],c=r[o];let d=T[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[S.numCustomPurposes]));try{i+=c.encode(a,d)}catch(u){throw new He(`Error encoding ${t}->${o}: ${u.message}`)}}),_s.encode(i)}static decode(e,t,s){const i=_s.decode(e);let r=0;s===Q.CORE&&(t.version=D.decode(i.substr(r,T[S.version]),T[S.version])),s!==Q.CORE&&(r+=T.segmentType);const o=this.fieldSequence[String(t.version)][s],a=or();return o.forEach(c=>{const d=a[c];let u=T[c];if(u===void 0&&this.isPublisherCustom(c)&&(u=Number(t[S.numCustomPurposes])),u!==0){const _=i.substr(r,u);if(d===Ot?t[c]=d.decode(_,t.version):t[c]=d.decode(_,u),Number.isInteger(u))r+=u;else if(Number.isInteger(t[c].bitLength))r+=t[c].bitLength;else throw new ze(c)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Su{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 c=t.vendors[a];if(!c||c.deletedDate)i.unset(a);else if(c[r].length===0)if(r==="legIntPurposes"&&c.purposes.length===0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&c.purposes.length>0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(c.flexiblePurposes.length===0)i.unset(a);else{const d=e.publisherRestrictions.getRestrictions(a);let u=!1;for(let _=0,E=d.length;_<E&&!u;_++)u=d[_].restrictionType===Re.REQUIRE_CONSENT&&r==="purposes"||d[_].restrictionType===Re.REQUIRE_LI&&r==="legIntPurposes";u||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 He("Unable to encode TCModel without a GVL");if(!s.isReady)throw new He("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 He(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class pu{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},_=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=_,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 A extends gt{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new Be;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new dt("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=A.baseUrl,i=t?.language;if(i)try{i=A.consentLanguages.parseLanguage(i)}catch(r){throw new dt("Error during parsing the language: "+r.message)}if(this.lang_=i||A.DEFAULT_LANGUAGE,this.cacheLang_=i||A.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new dt("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;A.CACHE.has(r)?(this.populate(A.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=A.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else A.CACHE.has(A.LATEST_CACHE_KEY)?(this.populate(A.CACHE.get(A.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+A.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&A.LANGUAGE_CACHE.size>0?(A.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(A.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(A.CACHE.delete(e),t=!0):e===void 0&&(A.CACHE=new Map,t=!0),t}cacheLanguage(){A.LANGUAGE_CACHE.has(this.cacheLang_)||A.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 pu.fetch(e))}catch(t){throw new dt(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]=A.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=A.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=A.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=A.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=A.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=A.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]=A.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=A.consentLanguages.parseLanguage(e)}catch(i){throw new dt("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===A.DEFAULT_LANGUAGE.toLowerCase()&&!A.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,A.LANGUAGE_CACHE.has(s)){const i=A.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=A.baseUrl+A.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new dt("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&&A.CACHE.set(A.LATEST_CACHE_KEY,this.getJson()),A.CACHE.has(this.vendorListVersion)||A.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(c=>{a[String(c)]=this.vendors[String(c)]}),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 A(this.getJson());return this.lang_!==A.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class cr extends gt{static consentLanguages=A.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 tr;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){A.isInstanceOf(e)||(e=new A(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 hu{static encode(e,t){let s="",i;return e=Su.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new uu(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=ar.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new cr);for(let r=0;r<i;r++){const o=s[r],c=_s.decode(o.charAt(0)).substr(0,T.segmentType),d=sr.ID_TO_KEY[D.decode(c,T.segmentType).toString()];ar.decode(o,t,d)}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 sn;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(sn||(sn={}));var rn;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(rn||(rn={}));var lr;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(lr||(lr={}));class on{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 an extends on{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Er(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 _u{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 an(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class oe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new _u;static cmpStatus=sn.LOADING;static disabled=!1;static displayStatus=rn.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=sn.LOADING,this.disabled=!1,this.displayStatus=rn.HIDDEN,this.eventQueue.clear()}}class dr{cmpId=oe.cmpId;cmpVersion=oe.cmpVersion;gdprApplies=oe.gdprApplies;tcfPolicyVersion=oe.tcfPolicyVersion}class Er extends dr{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=oe.eventStatus,this.cmpStatus=oe.cmpStatus,this.listenerId=t,oe.gdprApplies){const s=oe.tcModel;this.tcString=oe.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 gu extends Er{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(),c=o.purposeId.toString(),d=t[c].substr(0,i),u=t[c].substr(i+1);t[c]=d+a+u})}}return t}}class Tu extends dr{cmpLoaded=!0;cmpStatus=oe.cmpStatus;displayStatus=oe.displayStatus;apiVersion=String(oe.apiVersion);gvlVersion;constructor(){super(),oe.tcModel&&oe.tcModel.vendorListVersion&&(this.gvlVersion=+oe.tcModel.vendorListVersion)}}class Ou extends on{respond(){this.invokeCallback(new Tu)}}class Nu extends an{respond(){this.throwIfParamInvalid(),this.invokeCallback(new gu(this.param))}}class Iu extends on{respond(){const e=oe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new A(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Au extends an{respond(){this.listenerId=oe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class Cu extends on{respond(){this.invokeCallback(oe.eventQueue.remove(this.param))}}class OS{static[Qe.PING]=Ou;static[Qe.GET_TC_DATA]=an;static[Qe.GET_IN_APP_TC_DATA]=Nu;static[Qe.GET_VENDOR_LIST]=Iu;static[Qe.ADD_EVENT_LISTENER]=Au;static[Qe.REMOVE_EVENT_LISTENER]=Cu}const fu=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(en);return t.split(".")[0]}return e??""};var mu=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const Pu=1,ur=[1,3,4,5,6],wu=2,Du=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(UE).map(o=>je(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${wu}~${s}~dv.${i}`},bu=n=>mu(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const c=new cr(new A(e.gvl));yield c.gvl.readyPromise,c.cmpId=ps,c.cmpVersion=Pu,c.consentScreen=1,c.isServiceSpecific=!0,c.supportOOB=!1,e.tcf_publisher_country_code&&(c.publisherCountryCode=e.tcf_publisher_country_code);const d=e.minimal_tcf?GE(e):LE(e);if(c.gvl.narrowVendorsTo(d),t){t.vendorsConsent.forEach(E=>{var N,g,f;if(nn(E,e.gvl)){const{id:C}=je(E);if(c.vendorConsents.set(+C),!((N=e.tcf_publisher_restrictions)!=null&&N.length)){const m=(g=e.gvl)==null?void 0:g.vendors[C];m&&!((f=m?.purposes)!=null&&f.length)&&m.flexiblePurposes.forEach(P=>{const ne=new $e;ne.purposeId=P,ne.restrictionType=Re.REQUIRE_CONSENT,c.publisherRestrictions.add(+C,ne)})}}}),t.vendorsLegint.forEach(E=>{var N,g;if(e.minimal_tcf)(N=e.tcf_vendor_legitimate_interest_ids)==null||N.forEach(f=>{const{id:C}=je(f);c.vendorLegitimateInterests.set(+C)});else if(nn(E,e.gvl)){const f=(g=e.tcf_vendor_legitimate_interests)==null?void 0:g.filter(P=>P.id===E)[0],C=f?.purpose_legitimate_interests;let m=!1;if(C&&(C.map(P=>P.id).filter(P=>ur.includes(P)).length&&(m=!0),!m)){const{id:P}=je(E);c.vendorLegitimateInterests.set(+P)}}}),(s=e.gvl)!=null&&s.vendors&&((i=e.tcf_vendor_relationships)==null||i.forEach(E=>{var N,g;const{id:f}=je(E.id),C=(N=e.gvl)==null?void 0:N.vendors[f];C&&(g=C.specialPurposes)!=null&&g.length&&(!C.legIntPurposes||C.legIntPurposes.length===0)&&c.vendorLegitimateInterests.set(+f)})),t.purposesConsent.forEach(E=>{c.purposeConsents.set(+E)}),t.purposesLegint.forEach(E=>{const N=+E;ur.includes(N)||c.purposeLegitimateInterests.set(N)}),t.specialFeatures.forEach(E=>{c.specialFeatureOptins.set(+E)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(E=>{E.vendors.forEach(N=>{const g=new $e;g.purposeId=E.purpose_id,g.restrictionType=E.restriction_type,c.publisherRestrictions.add(N,g)})}),a=hu.encode(c,{segments:[Q.CORE]});const u=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(E=>E.id),_=Du({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:u??[]});a=`${a}${en}${_}`}}catch(c){return console.error("Unable to instantiate GVL: ",c),Promise.resolve("")}return Promise.resolve(a)});var vu=Object.defineProperty,Vu=Object.defineProperties,Ru=Object.getOwnPropertyDescriptors,Sr=Object.getOwnPropertySymbols,yu=Object.prototype.hasOwnProperty,Mu=Object.prototype.propertyIsEnumerable,pr=(n,e,t)=>e in n?vu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Uu=(n,e)=>{for(var t in e||(e={}))yu.call(e,t)&&pr(n,t,e[t]);if(Sr)for(var t of Sr(e))Mu.call(e,t)&&pr(n,t,e[t]);return n},Lu=(n,e)=>Vu(n,Ru(e)),Gu=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const Ze=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=_t(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],et=n=>n!=null&&n.length?n.map(e=>{const t=_t(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],Fu=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consents)!=null&&a.map(c=>c.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interests)!=null&&a.map(c=>c.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})}},$u=({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: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)}},xu=(n,e,t,s,i)=>Gu(void 0,null,function*(){var r;const o=yield bu({tcStringPreferences:t,experience:s}),a=Lu(Uu({},n),{fides_string:o,tcf_consent:VE(e),tcf_version_hash:(r=s.meta)==null?void 0:r.version_hash});return i&&(a.consent=ji(i)),a}),ju=(n,e)=>!n||!e?[]:n.map(t=>{var s;const i=_t(e.includes(t.id),t.consent_mechanism);return new wi(t,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)});var De=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(De||{});const tt="us",hr=({cmpApi:n,sectionName:e,gppSettings:t})=>{t&&[{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:s,cmpApiField:i})=>{const r=i===I.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:s&&(o=1),n.setFieldValue(e,i,o)})},Hu=n=>n?.toLowerCase().startsWith("us"),gs=({experienceRegion:n,usApproach:e})=>Hu(n)&&e===De.NATIONAL?tt:n,_r=({cmpApi:n,experience:e})=>{const t=new Set,{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=gs({experienceRegion:i,usApproach:o}),c=Xe[a];return!c&&o===De.ALL&&(a=tt,c=Xe[a]),!c||a===tt&&o===De.STATE?[]:(t.add(c),s.forEach(d=>{var u;const{gpp_field_mapping:_}=d,E=(u=_?.find(N=>N.region===a))==null?void 0:u.notice;E&&E.forEach(N=>{n.setFieldValue(c.name,N,1)})}),hr({cmpApi:n,sectionName:c.name,gppSettings:r}),Array.from(t))},gr=({cmpApi:n,cookie:e,experience:t})=>{const s=new Set,{privacy_notices:i=[],region:r,gpp_settings:o}=t,a=o?.us_approach;let c=gs({experienceRegion:r,usApproach:a}),d=Xe[c];if(!d&&a===De.ALL&&(c=tt,d=Xe[c]),!d||c===tt&&a===De.STATE)return[];s.add(d);const{consent:u}=e;return Object.keys(u).forEach(_=>{var E;const N=i?.find(f=>f.notice_key===_),g=u[_];if(N){const{gpp_field_mapping:f}=N,C=(E=f?.find(m=>m.region===c))==null?void 0:E.mechanism;C&&C.forEach(m=>{let P=m.not_available;g===!1?P=m.opt_out:g&&(P=m.not_opt_out);let ne=+P;P.length>1&&(ne=P.split("").map(ye=>+ye)),n.setFieldValue(d.name,m.field,ne)})}}),hr({cmpApi:n,sectionName:d.name,gppSettings:o}),Array.from(s)};var ku=Object.defineProperty,Bu=Object.defineProperties,Ku=Object.getOwnPropertyDescriptors,Tr=Object.getOwnPropertySymbols,Yu=Object.prototype.hasOwnProperty,zu=Object.prototype.propertyIsEnumerable,Or=(n,e,t)=>e in n?ku(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nr=(n,e)=>{for(var t in e||(e={}))Yu.call(e,t)&&Or(n,t,e[t]);if(Tr)for(var t of Tr(e))zu.call(e,t)&&Or(n,t,e[t]);return n},Ir=(n,e)=>Bu(n,Ku(e));const Wu=[1,3,4,5,6],Qu=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=gs({experienceRegion:i,usApproach:o}),c=Xe[a];return!c&&o===De.ALL&&(a=tt,c=Xe[a]),!c||a===tt&&o===De.STATE||s.forEach(d=>{var u;const{notice_key:_,gpp_field_mapping:E}=d,N=(u=E?.find(g=>g.region===a))==null?void 0:u.mechanism;if(N){const g=N.some(f=>{const C=n.getFieldValue(c.name,f.field),m=Array.isArray(C)?C.join(""):String(C);return m===f.opt_out?!0:(f.not_opt_out,!1)});g!==void 0&&(t[_]=!g)}}),t},Ju=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=TE,a=n.getSection(X.NAME);if(!a)return o;const c=a.PurposeConsents.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),d=a.PurposeLegitimateInterests.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),u=a.VendorConsents.map(E=>`gvl.${E}`),_=a.VendorLegitimateInterests.map(E=>`gvl.${E}`);return o.purposesConsent=c,o.purposesLegint=d.filter(E=>!Wu.includes(parseInt(E,10))),o.vendorsConsent=u,o.vendorsLegint=_,o.specialFeatures=a.SpecialFeatureOptins.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(E=>E.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(E=>E.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(E=>E.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(E=>E.toString()))||[]),o.customPurposesConsent=[],o},qu=({fidesString:n,cmpApi:e})=>{const{gpp:t}=FE(n);if(!n||!t||!e)return;const{options:s,cookie:i,geolocation:r,locale:o,config:a}=window.Fides,c=window.Fides.experience;if(!c||!c.experience_config||!c.privacy_notices)return;const d=c.experience_config.component===pt.TCF_OVERLAY,u=sE(r),_=c.experience_config.translations.find(C=>ki(C.language,o));if(!_)return;e.setGppString(t),e.setSignalStatus(be.READY);const E=c.privacy_notices.map(C=>({notice:C,bestTranslation:C.translations.find(m=>ki(m.language,o))||null}));let N,g,f;if(d){const C=Ju({cmpApi:e,experience:c});f=ju(E.map(({notice:m,bestTranslation:P})=>Ir(Nr({},m),{bestTranslation:P})),C.customPurposesConsent),g=c.minimal_tcf?$u({experience:c,enabledIds:C}):Fu({experience:c,enabledIds:C}),N=m=>xu(m,g,C,c)}else{const C=Qu({cmpApi:e,experience:c}),m=Object.entries(C).filter(([P,ne])=>ne).map(([P])=>P);f=rE(E,m),N=P=>Promise.resolve(Ir(Nr({},P),{consent:C}))}lu({consentPreferencesToSave:f,privacyExperienceConfigHistoryId:_.privacy_experience_config_history_id,experience:c,consentMethod:ht.SCRIPT,options:s,userLocationString:u||void 0,cookie:i,propertyId:a?.propertyId,tcf:g,updateCookie:N})},Ar="__gppLocator",Cr=n=>{if(!window.frames[n])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=n,window.document.body.appendChild(e)}else setTimeout(()=>Cr(n),5)},Xu=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},Zu=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,eS=()=>{const n=[],e=[];let t;const s=(r,o,a,c)=>{if(r==="queue")return n;if(r==="events")return e;const d={gppVersion:"1.1",cmpStatus:it.STUB,cmpDisplayStatus:Ye.HIDDEN,signalStatus:be.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(d,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const u=t;e.push({id:u,callback:o,parameter:a}),o({eventName:"listenerRegistered",listenerId:u,data:!0,pingData:d},!0)}else if(r==="removeEventListener"){let u=!1;for(let _=0;_<e.length;_++)if(e[_].id===a){e.splice(_,1),u=!0;break}o({eventName:"listenerRemoved",listenerId:a,data:u,pingData:d},!0)}else r==="hasSection"?o(!1,!0):r==="getSection"||r==="getField"?o(null,!0):n.push([].slice.apply([r,o,a,c]));return null},i=r=>{const o=typeof r.data=="string";let a={};if(o)try{a=JSON.parse(r.data)}catch{a={}}else a=r.data;if(!Zu(a))return null;if(a.__gppCall&&window.__gpp){const c=a.__gppCall;window.__gpp(c.command,(d,u)=>{const _={__gppReturn:{returnValue:d,success:u,callId:c.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(_):_,"*")},"parameter"in c?c.parameter:void 0,"version"in c?c.version:"1.1")}return null};Xu(Ar)||(Cr(Ar),window.__gpp=s,window.addEventListener("message",i,!1))},fr=(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,mr=(n,e)=>{if(!lt(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!(t!=null&&t.enable_tcfeu_string))return!1;const s=fu(n);return s?(e.setFieldValueBySectionId(X.ID,"CmpId",ps),e.setSectionStringById(X.ID,s),!0):!1},tS=()=>{const n=[];if(lt(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${X.ID}:${X.NAME}`),(e.us_approach===De.NATIONAL||e.us_approach===De.ALL)&&n.push(`${re.ID}:${re.NAME}`),(e.us_approach===De.STATE||e.us_approach===De.ALL)&&Object.values(Xe).forEach(t=>{t.id!==re.ID&&n.push(`${t.id}:${t.name}`)}))}return n},nS=()=>{eS();const n=new Md(ps,$E);n.setCmpStatus(it.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=tS();if(n.setSupportedAPIs(o),!lt(s))return;const{fidesString:a}=r;if(a&&qu({fidesString:a,cmpApi:n}),!a&&(!iE(s,e.detail,i,r)||!r.tcfEnabled&&Ri(s.privacy_notices)&&!fr(i,e.detail.fides_string,s.privacy_notices))){const c=mr(e,n);c&&n.setApplicableSections([X.ID]);const d=_r({cmpApi:n,experience:s}),u=gr({cmpApi:n,cookie:e.detail,experience:s});u.length&&n.setApplicableSections(u.map(E=>E.id)),!c&&!d.length&&!u.length&&n.setApplicableSections([-1]),n.setSignalStatus(be.READY);const _=Hi(n);window.Fides.fides_string=_}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",c=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(lt(t)){!i.tcfEnabled&&Ri(t.privacy_notices)&&!fr(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(be.READY):n.setSignalStatus(be.NOT_READY),n.setCmpDisplayStatus(Ye.VISIBLE);const r=_r({cmpApi:n,experience: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(Ye.HIDDEN),n.setSignalStatus(be.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(Ye.HIDDEN),mr(e,n)&&(n.setApplicableSections([X.ID]),n.fireSectionChange("tcfeuv2")),lt(window.Fides.experience)){const t=gr({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});t.length&&(n.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{n.fireSectionChange(i.name)}));const s=Hi(n);window.Fides.cookie&&(window.Fides.fides_string=s,window.Fides.cookie.fides_string=s,xi(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(be.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&nS()});
1
+ class vt{eventName;listenerId;data;pingData;constructor(e,t,s,i){this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}class ht{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 Ze=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)}},nn=class extends Ze{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new vt("listenerRegistered",e,!0,new ht(this.cmpApiContext));this.invokeCallback(t)}},rn=class extends Ze{respond(){let e=new ht(this.cmpApiContext);this.invokeCallback(e)}};class on extends Ze{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 an extends Ze{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 ln extends Ze{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 cn=class extends Ze{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new vt("listenerRemoved",e,t,new ht(this.cmpApiContext));this.invokeCallback(s)}},Wt=class{static[Le.ADD_EVENT_LISTENER]=nn;static[Le.GET_FIELD]=on;static[Le.GET_SECTION]=an;static[Le.HAS_SECTION]=ln;static[Le.PING]=rn;static[Le.REMOVE_EVENT_LISTENER]=cn};var et;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(et||(et={}));var ke;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(ke||(ke={}));var Qt;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Qt||(Qt={}));var me;(function(n){n.NOT_READY="not ready",n.READY="ready"})(me||(me={}));class dn{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 Wt[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 Wt[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 vt(e,i,t,new ht(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class at extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class Z{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 at("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 at("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 p=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Te=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class M{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 Te("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 p("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 _t{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 Te("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=M.decode(i),o=_t.DICT.charAt(r);t+=o,s+=6}catch{throw new Te("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new p("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=_t.REVERSE_DICT.get(i),o=M.encode(r,6);t+=o}return t}}class k extends _t{static instance=new k;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 w{static instance=new w;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 p("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class tt{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 p("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 st=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Te("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new p("Undecodable Boolean '"+e+"'")}};class Jt{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=M.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"+tt.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"+tt.encode(a)+tt.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=M.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=st.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),d=tt.decode(e.substring(r,l+2))+i;i=d,r=l+2,l=e.indexOf("11",r);let u=tt.decode(e.substring(r,l+2))+i;i=u,r=l+2;for(let h=d;h<=u;h++)t.push(h)}else{let l=e.indexOf("11",r),d=tt.decode(e.substring(r,l+2))+i;i=d,t.push(d),r=l+2}}return t}}class un 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 un("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class we extends p{constructor(e){super(e),this.name="SubstringError"}}class ee{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new we("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 Jt.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=Jt.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=M.decode(ee.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 ee.substring(e,t,i)}catch(s){throw new we(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 M.encode(this.value,this.bitStringLength)}catch(e){throw new Te(e)}}decode(e){try{this.value=M.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return ee.substring(e,t,t+this.bitStringLength)}catch(s){throw new we(s)}}}class R{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 xe;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(xe||(xe={}));const pn=[xe.ID,xe.VERSION,xe.SECTION_IDS];class D{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 at("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 at(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 _n extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return pn}initializeFields(){let e=new R;return e.put(xe.ID.toString(),new c(6,Me.ID)),e.put(xe.VERSION.toString(),new c(6,Me.VERSION)),e.put(xe.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 p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Me extends Z{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 _n),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 _;(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"})(_||(_={}));const hn=[_.VERSION,_.CREATED,_.LAST_UPDATED,_.CMP_ID,_.CMP_VERSION,_.CONSENT_SCREEN,_.CONSENT_LANGUAGE,_.VENDOR_LIST_VERSION,_.POLICY_VERSION,_.IS_SERVICE_SPECIFIC,_.USE_NON_STANDARD_STACKS,_.SPECIAL_FEATURE_OPTINS,_.PURPOSE_CONSENTS,_.PURPOSE_LEGITIMATE_INTERESTS,_.PURPOSE_ONE_TREATMENT,_.PUBLISHER_COUNTRY_CODE,_.VENDOR_CONSENTS,_.VENDOR_LEGITIMATE_INTERESTS,_.PUBLISHER_RESTRICTIONS],gn=[_.PUBLISHER_PURPOSES_SEGMENT_TYPE,_.PUBLISHER_CONSENTS,_.PUBLISHER_LEGITIMATE_INTERESTS,_.NUM_CUSTOM_PURPOSES,_.PUBLISHER_CUSTOM_CONSENTS,_.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],Tn=[_.VENDORS_ALLOWED_SEGMENT_TYPE,_.VENDORS_ALLOWED],In=[_.VENDORS_DISCLOSED_SEGMENT_TYPE,_.VENDORS_DISCLOSED];class Xe extends _t{static instance=new Xe;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class nt{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=M.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+M.encode(t[r][0],16):i+="1"+M.encode(t[r][0],16)+M.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=M.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=st.decode(e.substring(i,i+1));if(i++,o===!0){let a=M.decode(e.substring(i,i+16));i+=16;let l=M.decode(e.substring(i,i+16));i+=16;for(let d=a;d<=l;d++)t.push(d)}else{let a=M.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Gt extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return nt.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=nt.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=M.decode(ee.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return ee.substring(e,t,i)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class On{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 qt 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+=M.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=M.encode(i.getKey(),this.keyBitStringLength),t+=M.encode(i.getType(),this.typeBitStringLength),t+=nt.encode(i.getIds())}return t}catch(e){throw new Te(e)}}decode(e){try{let t=[],s=M.decode(ee.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=M.decode(ee.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=M.decode(ee.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Gt([]).substring(e,i),d=nt.decode(l);i+=l.length,t.push(new On(o,a,d))}this.value=t}catch(t){throw new p(t)}}substring(e,t){try{let s="";s+=ee.substring(e,t,t+12);let i=M.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=ee.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let l=ee.substring(e,r,r+this.typeBitStringLength);r+=l.length,s+=l;let d=new Gt([]).substring(e,r);r+=d.length,s+=d}return s}catch(s){throw new we(s)}}}class j extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return st.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=st.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return ee.substring(e,t,t+1)}catch(s){throw new we(s)}}}class Xt{static encode(e){return e?M.encode(Math.round(e.getTime()/100),36):M.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new p("Undecodable Datetime '"+e+"'");return new Date(M.decode(e)*100)}}class gt extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Xt.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=Xt.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return ee.substring(e,t,t+36)}catch(s){throw new we(s)}}}class it{static encode(e,t){if(e.length>t)throw new Te("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=st.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(st.decode(e.substring(s,s+1)));return t}}class ve extends Ve{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return it.encode(this.value,this.numElements)}catch(e){throw new Te(e)}}decode(e){try{this.value=it.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return ee.substring(e,t,t+this.numElements)}catch(s){throw new we(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 Zt{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+=M.encode(63,6);else if(r>=65)s+=M.encode(e.charCodeAt(i)-65,6);else throw new Te("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new p("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=M.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class yt extends Ve{stringLength;constructor(e,t,s=!0){super(s),this.stringLength=e,this.setValue(t)}encode(){try{return Zt.encode(this.value,this.stringLength)}catch(e){throw new Te(e)}}decode(e){try{this.value=Zt.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return ee.substring(e,t,t+this.stringLength*6)}catch(s){throw new we(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=nt.encode(this.value),s=t.length,i=e;if(s<=i)return M.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 M.encode(e,16)+"0"+it.encode(r,i)}}catch(e){throw new Te(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=nt.decode(e.substring(17));else{let t=[],s=it.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 p(t)}}substring(e,t){try{let s=M.decode(ee.substring(e,t,t+16));return e.charAt(t+16)==="1"?ee.substring(e,t,t+17)+new Gt([]).substring(e,t+17):ee.substring(e,t,t+17+s)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Nn extends D{base64UrlEncoder=Xe.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return hn}initializeFields(){let e=new Date,t=new R;return t.put(_.VERSION.toString(),new c(6,W.VERSION)),t.put(_.CREATED.toString(),new gt(e)),t.put(_.LAST_UPDATED.toString(),new gt(e)),t.put(_.CMP_ID.toString(),new c(12,0)),t.put(_.CMP_VERSION.toString(),new c(12,0)),t.put(_.CONSENT_SCREEN.toString(),new c(6,0)),t.put(_.CONSENT_LANGUAGE.toString(),new yt(2,"EN")),t.put(_.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(_.POLICY_VERSION.toString(),new c(6,2)),t.put(_.IS_SERVICE_SPECIFIC.toString(),new j(!1)),t.put(_.USE_NON_STANDARD_STACKS.toString(),new j(!1)),t.put(_.SPECIAL_FEATURE_OPTINS.toString(),new ve([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(_.PURPOSE_CONSENTS.toString(),new ve([!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(_.PURPOSE_LEGITIMATE_INTERESTS.toString(),new ve([!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(_.PURPOSE_ONE_TREATMENT.toString(),new j(!1)),t.put(_.PUBLISHER_COUNTRY_CODE.toString(),new yt(2,"AA")),t.put(_.VENDOR_CONSENTS.toString(),new ze([])),t.put(_.VENDOR_LEGITIMATE_INTERESTS.toString(),new ze([])),t.put(_.PUBLISHER_RESTRICTIONS.toString(),new qt(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 p("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class Tt extends Ve{getLength;constructor(e,t,s=!0){super(s),this.getLength=e,this.setValue(t)}encode(){try{return it.encode(this.value,this.getLength())}catch(e){throw new Te(e)}}decode(e){try{this.value=it.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return ee.substring(e,t,t+this.getLength())}catch(s){throw new we(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 An extends D{base64UrlEncoder=Xe.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gn}initializeFields(){let e=new R;e.put(_.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(_.PUBLISHER_CONSENTS.toString(),new ve([!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(_.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new ve([!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(_.NUM_CUSTOM_PURPOSES.toString(),t),e.put(_.PUBLISHER_CUSTOM_CONSENTS.toString(),new Tt(()=>t.getValue(),[])),e.put(_.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new Tt(()=>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 p("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class fn extends D{base64UrlEncoder=Xe.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Tn}initializeFields(){let e=new R;return e.put(_.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(_.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 p("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Cn extends D{base64UrlEncoder=Xe.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return In}initializeFields(){let e=new R;return e.put(_.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(_.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 p("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class W extends Z{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return W.ID}getName(){return W.NAME}getVersion(){return W.VERSION}initializeSegments(){let e=[];return e.push(new Nn),e.push(new An),e.push(new fn),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<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 p("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(_.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!==_.CREATED&&e!==_.LAST_UPDATED){let s=new Date;super.setFieldValue(_.CREATED,s),super.setFieldValue(_.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 Pn=[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],wn=[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],Dn=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class mn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pn}initializeFields(){let e=new Date,t=new R;return t.put(I.VERSION.toString(),new c(6,Ae.VERSION)),t.put(I.CREATED.toString(),new gt(e)),t.put(I.LAST_UPDATED.toString(),new gt(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 yt(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 j(!1)),t.put(I.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new ve([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_EXPRESS_CONSENT.toString(),new ve([!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 ve([!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 qt(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 p("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class Vn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}initializeFields(){let e=new R;e.put(I.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(I.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new ve([!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 ve([!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 Tt(()=>t.getValue(),[])),e.put(I.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new Tt(()=>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 p("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Rn extends D{base64UrlEncoder=Xe.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Dn}initializeFields(){let e=new R;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 p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ae extends Z{static ID=5;static VERSION=1;static NAME="tcfcav1";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 mn),e.push(new Vn),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<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 p("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 Ut{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 Mn{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 bn{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 Ie;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(Ie||(Ie={}));const Ln=[Ie.VERSION,Ie.NOTICE,Ie.OPT_OUT_SALE,Ie.LSPA_COVERED];class vn extends D{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ln}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new bn;return t.put(Ie.VERSION,new Mn(fe.VERSION)),t.put(Ie.NOTICE,new Ut("-",e)),t.put(Ie.OPT_OUT_SALE,new Ut("-",e)),t.put(Ie.LSPA_COVERED,new Ut("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Ie.VERSION).getValue(),t+=e.get(Ie.NOTICE).getValue(),t+=e.get(Ie.OPT_OUT_SALE).getValue(),t+=e.get(Ie.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new p("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Ie.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Ie.NOTICE).setValue(e.charAt(1)),t.get(Ie.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Ie.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new p("Unable to decode UspV1CoreSegment '"+e+"'")}}}class fe extends Z{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return fe.ID}getName(){return fe.NAME}getVersion(){return fe.VERSION}initializeSegments(){let e=[];return e.push(new vn),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 Gn=[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 es{static encode(e,t,s){if(e.length>s)throw new Te("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=M.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 p("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new p("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new p("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(M.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 es.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Te(e)}}decode(e){try{this.value=es.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new p(t)}}substring(e,t){try{return ee.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new we(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 Un extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}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 R;return i.put(N.VERSION.toString(),new c(6,X.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 p("Unable to decode UsNatCoreSegment '"+e+"'")}}}class xn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new R;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(N.GPC.toString(),new j(!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 p("Unable to decode UsNatGpcSegment '"+e+"'")}}}class X extends Z{static ID=7;static VERSION=1;static NAME="usnat";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return X.ID}getName(){return X.NAME}getVersion(){return X.VERSION}initializeSegments(){let e=[];return e.push(new Un),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(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 b;(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"})(b||(b={}));const Fn=[b.VERSION,b.SALE_OPT_OUT_NOTICE,b.SHARING_OPT_OUT_NOTICE,b.SENSITIVE_DATA_LIMIT_USE_NOTICE,b.SALE_OPT_OUT,b.SHARING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.PERSONAL_DATA_CONSENTS,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],Bn=[b.GPC_SEGMENT_TYPE,b.GPC];class Hn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Fn}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 R;return i.put(b.VERSION.toString(),new c(6,ne.VERSION)),i.put(b.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SHARING_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,0]).withValidator(s)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0]).withValidator(s)),i.put(b.PERSONAL_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 p("Unable to decode UsCaCoreSegment '"+e+"'")}}}class kn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Bn}initializeFields(){let e=new R;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(b.GPC.toString(),new j(!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 p("Unable to decode UsCaGpcSegment '"+e+"'")}}}class ne extends Z{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 Hn),e.push(new kn),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 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 Kn=[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 $n extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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 R;return i.put(q.VERSION.toString(),new c(6,ie.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 p("Unable to decode UsVaCoreSegment '"+e+"'")}}}class ie extends Z{static ID=9;static VERSION=1;static NAME="usva";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 $n),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 K;(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"})(K||(K={}));const jn=[K.VERSION,K.SHARING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_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],Yn=[K.GPC_SEGMENT_TYPE,K.GPC];class zn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return jn}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 R;return i.put(K.VERSION.toString(),new c(6,re.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.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]).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 p("Unable to decode UsCoCoreSegment '"+e+"'")}}}class Wn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yn}initializeFields(){let e=new R;return e.put(K.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(K.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(K.GPC.toString(),new j(!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 p("Unable to decode UsCoGpcSegment '"+e+"'")}}}class re extends Z{static ID=10;static VERSION=1;static NAME="usco";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 zn),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(K.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(K.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(K.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var Y;(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"})(Y||(Y={}));const Qn=[Y.VERSION,Y.SHARING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];class Jn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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 R;return i.put(Y.VERSION.toString(),new c(6,oe.VERSION)),i.put(Y.SHARING_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.SENSITIVE_DATA_PROCESSING_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 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 p("Unable to decode UsUtCoreSegment '"+e+"'")}}}class oe extends Z{static ID=11;static VERSION=1;static NAME="usut";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 Jn),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 $;(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"})($||($={}));const qn=[$.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],Xn=[$.GPC_SEGMENT_TYPE,$.GPC];class Zn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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 R;return i.put($.VERSION.toString(),new c(6,ae.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 Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),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 p("Unable to decode UsCtCoreSegment '"+e+"'")}}}class ei extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Xn}initializeFields(){let e=new R;return e.put($.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put($.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put($.GPC.toString(),new j(!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 p("Unable to decode UsCtGpcSegment '"+e+"'")}}}class ae extends Z{static ID=12;static VERSION=1;static NAME="usct";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 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($.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue($.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($.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 ti=[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 si extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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 R;return i.put(z.VERSION.toString(),new c(6,le.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 Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(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 p("Unable to decode UsFlCoreSegment '"+e+"'")}}}class le extends Z{static ID=13;static VERSION=1;static NAME="usfl";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 si),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 L;(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"})(L||(L={}));const ni=[L.VERSION,L.SHARING_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],ii=[L.GPC_SEGMENT_TYPE,L.GPC];class ri extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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 R;return i.put(L.VERSION.toString(),new c(6,ce.VERSION)),i.put(L.SHARING_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 Q(2,[0,0,0]).withValidator(s)),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 p("Unable to decode UsMtCoreSegment '"+e+"'")}}}class oi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ii}initializeFields(){let e=new R;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(L.GPC.toString(),new j(!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 p("Unable to decode UsMtGpcSegment '"+e+"'")}}}class ce extends Z{static ID=14;static VERSION=1;static NAME="usmt";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 ri),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(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 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 ai=[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],li=[v.GPC_SEGMENT_TYPE,v.GPC];class ci extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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 R;return i.put(v.VERSION.toString(),new c(6,de.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,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 p("Unable to decode UsOrCoreSegment '"+e+"'")}}}class di extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return li}initializeFields(){let e=new R;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(v.GPC.toString(),new j(!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 p("Unable to decode UsOrGpcSegment '"+e+"'")}}}class de extends Z{static ID=15;static VERSION=1;static NAME="usor";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 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(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 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 Ei=[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],ui=[G.GPC_SEGMENT_TYPE,G.GPC];class Si extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ei}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 R;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 c(2,0).withValidator(e)),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 p("Unable to decode UsTxCoreSegment '"+e+"'")}}}class pi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ui}initializeFields(){let e=new R;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(G.GPC.toString(),new j(!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 p("Unable to decode UsTxGpcSegment '"+e+"'")}}}class Ee extends Z{static ID=16;static VERSION=1;static NAME="ustx";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 Si),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(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 _i=[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],hi=[y.GPC_SEGMENT_TYPE,y.GPC];class gi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return _i}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 R;return i.put(y.VERSION.toString(),new c(6,ue.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]).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 p("Unable to decode UsDeCoreSegment '"+e+"'")}}}class Ti extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return hi}initializeFields(){let e=new R;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(y.GPC.toString(),new j(!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 p("Unable to decode UsDeGpcSegment '"+e+"'")}}}class ue extends Z{static ID=17;static VERSION=1;static NAME="usde";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 Ti),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.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"})(U||(U={}));const Ii=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SENSITIVE_DATA_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],Oi=[U.GPC_SEGMENT_TYPE,U.GPC];class Ni extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ii}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 R;return i.put(U.VERSION.toString(),new c(6,Se.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.SENSITIVE_DATA_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.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 p("Unable to decode UsIaCoreSegment '"+e+"'")}}}class Ai extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Oi}initializeFields(){let e=new R;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(U.GPC.toString(),new j(!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 p("Unable to decode UsIaGpcSegment '"+e+"'")}}}class Se extends Z{static ID=18;static VERSION=1;static NAME="usia";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 Ni),e.push(new Ai),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(".")}}var x;(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"})(x||(x={}));const fi=[x.VERSION,x.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],Ci=[x.GPC_SEGMENT_TYPE,x.GPC];class Pi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return fi}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 R;return i.put(x.VERSION.toString(),new c(6,pe.VERSION)),i.put(x.PROCESSING_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,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(x.ADDITIONAL_DATA_PROCESSING_CONSENT.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 p("Unable to decode UsNeCoreSegment '"+e+"'")}}}class wi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ci}initializeFields(){let e=new R;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(x.GPC.toString(),new j(!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 p("Unable to decode UsNeGpcSegment '"+e+"'")}}}class pe extends Z{static ID=19;static VERSION=1;static NAME="usne";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 Pi),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(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 F;(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"})(F||(F={}));const Di=[F.VERSION,F.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],mi=[F.GPC_SEGMENT_TYPE,F.GPC];class Vi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Di}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 R;return i.put(F.VERSION.toString(),new c(6,_e.VERSION)),i.put(F.PROCESSING_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 Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(F.ADDITIONAL_DATA_PROCESSING_CONSENT.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 p("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Ri extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mi}initializeFields(){let e=new R;return e.put(F.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(F.GPC.toString(),new j(!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 p("Unable to decode UsNhGpcSegment '"+e+"'")}}}class _e extends Z{static ID=20;static VERSION=1;static NAME="usnh";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 Vi),e.push(new Ri),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 B;(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"})(B||(B={}));const Mi=[B.VERSION,B.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],bi=[B.GPC_SEGMENT_TYPE,B.GPC];class Li extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Mi}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 R;return i.put(B.VERSION.toString(),new c(6,he.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.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,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(B.ADDITIONAL_DATA_PROCESSING_CONSENT.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 p("Unable to decode UsNjCoreSegment '"+e+"'")}}}class vi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return bi}initializeFields(){let e=new R;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(B.GPC.toString(),new j(!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 p("Unable to decode UsNjGpcSegment '"+e+"'")}}}class he extends Z{static ID=21;static VERSION=1;static NAME="usnj";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return he.ID}getName(){return he.NAME}getVersion(){return he.VERSION}initializeSegments(){let e=[];return e.push(new Li),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 H;(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"})(H||(H={}));const Gi=[H.VERSION,H.PROCESSING_NOTICE,H.SALE_OPT_OUT_NOTICE,H.TARGETED_ADVERTISING_OPT_OUT_NOTICE,H.SALE_OPT_OUT,H.TARGETED_ADVERTISING_OPT_OUT,H.SENSITIVE_DATA_PROCESSING,H.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,H.ADDITIONAL_DATA_PROCESSING_CONSENT,H.MSPA_COVERED_TRANSACTION,H.MSPA_OPT_OUT_OPTION_MODE,H.MSPA_SERVICE_PROVIDER_MODE],yi=[H.GPC_SEGMENT_TYPE,H.GPC];class Ui extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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 R;return i.put(H.VERSION.toString(),new c(6,ge.VERSION)),i.put(H.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(H.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(H.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(H.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(H.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(H.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(H.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(H.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(H.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(H.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(H.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 p("Unable to decode UsTnCoreSegment '"+e+"'")}}}class xi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yi}initializeFields(){let e=new R;return e.put(H.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(H.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(H.GPC.toString(),new j(!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 p("Unable to decode UsTnGpcSegment '"+e+"'")}}}class ge extends Z{static ID=22;static VERSION=1;static NAME="ustn";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 Ui),e.push(new xi),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(H.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(H.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(H.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class te{static SECTION_ID_NAME_MAP=new Map([[W.ID,W.NAME],[Ae.ID,Ae.NAME],[fe.ID,fe.NAME],[X.ID,X.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],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[pe.ID,pe.NAME],[_e.ID,_e.NAME],[he.ID,he.NAME],[ge.ID,ge.NAME]]);static SECTION_ORDER=[W.NAME,Ae.NAME,fe.NAME,X.NAME,ne.NAME,ie.NAME,re.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,pe.NAME,_e.NAME,he.NAME,ge.NAME]}class ts{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===Ae.NAME?(i=new Ae,this.sections.set(Ae.NAME,i)):e===W.NAME?(i=new W,this.sections.set(W.NAME,i)):e===fe.NAME?(i=new fe,this.sections.set(fe.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.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)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===_e.NAME?(i=new _e,this.sections.set(_e.NAME,i)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===ge.NAME&&(i=new ge,this.sections.set(ge.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new at(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(te.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(te.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(te.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(te.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(te.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<te.SECTION_ORDER.length;t++){let s=te.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<te.SECTION_ORDER.length;r++){let o=te.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 p("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 p("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Ae.ID){let l=new Ae(t[o+1]);s.set(Ae.NAME,l)}else if(r[o]===W.ID){let l=new W(t[o+1]);s.set(W.NAME,l)}else if(r[o]===fe.ID){let l=new fe(t[o+1]);s.set(fe.NAME,l)}else if(r[o]===X.ID){let l=new X(t[o+1]);s.set(X.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)}else if(r[o]===de.ID){let l=new de(t[o+1]);s.set(de.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);s.set(Ee.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);s.set(ue.NAME,l)}else if(r[o]===Se.ID){let l=new Se(t[o+1]);s.set(Se.NAME,l)}else if(r[o]===pe.ID){let l=new pe(t[o+1]);s.set(pe.NAME,l)}else if(r[o]===_e.ID){let l=new _e(t[o+1]);s.set(_e.NAME,l)}else if(r[o]===he.ID){let l=new he(t[o+1]);s.set(he.NAME,l)}else if(r[o]===ge.ID){let l=new ge(t[o+1]);s.set(ge.NAME,l)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new W(e);return t.set(W.NAME,s),new Me().setFieldValue(xe.SECTION_IDS,[2]),t.set(Me.NAME,s),t}else throw new p("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(te.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===Ae.NAME?(s=new Ae,this.sections.set(Ae.NAME,s)):e===W.NAME?(s=new W,this.sections.set(W.NAME,s)):e===fe.NAME?(s=new fe,this.sections.set(fe.NAME,s)):e===X.NAME?(s=new X,this.sections.set(X.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)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===_e.NAME?(s=new _e,this.sections.set(_e.NAME,s)):e===he.NAME?(s=new he,this.sections.set(he.NAME,s)):e===ge.NAME&&(s=new ge,this.sections.set(ge.NAME,s)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(te.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<te.SECTION_ORDER.length;t++){let s=te.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 Fi{gppVersion="1.1";supportedAPIs=[];eventQueue=new En(this);cmpStatus=et.LOADING;cmpDisplayStatus=ke.HIDDEN;signalStatus=me.NOT_READY;applicableSections=[];gppModel=new ts;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=et.LOADING,this.cmpDisplayStatus=ke.HIDDEN,this.signalStatus=me.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new ts,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class xt{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 E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},h=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",d),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=h,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 It=class extends Error{constructor(e){super(e),this.name="GVLError"}},Bi=class bt{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 bt.langSet.has(e)}forEach(e){bt.langSet.forEach(e)}get size(){return bt.langSet.size}},ss=class Lt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Bi;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=Lt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new Lt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new It("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new It("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 Lt;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 xt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(await xt.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 xt.fetch(s))}catch(i){throw new It("unable to load language: "+i.message)}}}else throw new It(`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 Hi{callResponder;cmpApiContext;constructor(e,t,s){this.cmpApiContext=new Fi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new dn(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(te.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(te.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(te.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(te.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(te.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(te.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(te.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return ss.fromVendorList(e)}async getGvlFromUrl(e){return ss.fromUrl(e)}}var ki=Object.defineProperty,Ki=(n,e,t)=>e in n?ki(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ft=(n,e,t)=>Ki(n,typeof e!="symbol"?e+"":e,t);class ns{constructor(e,t,s){Ft(this,"consentPreference"),Ft(this,"notice"),Ft(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var is;(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={}))})(is||(is={}));var $i=(n=>(n.GPP_US_NATIONAL="gpp_us_national",n.GPP_US_STATE="gpp_us_state",n))($i||{}),ji=(n=>(n.FRONTEND="frontend",n.SYSTEM_WIDE="system_wide",n.NOT_APPLICABLE="not_applicable",n))(ji||{}),rs=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(rs||{}),Ge=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(Ge||{}),Ot=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(Ot||{}),lt=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(lt||{}),Yi=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))(Yi||{}),ct=(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))(ct||{}),zi=(n=>(n.ALWAYS_ENABLED="always_enabled",n.ENABLED_WHERE_REQUIRED="enabled_where_required",n.ALWAYS_DISABLED="always_disabled",n))(zi||{}),Wi=(n=>(n.OPTIONS="options",n.EXPERIENCE_TRANSLATION="language",n))(Wi||{}),Qi=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n))(Qi||{}),Ji=(n=>(n.ACKNOWLEDGE="acknowledge",n.OPT_IN_OPT_OUT="opt_in_opt_out",n.OPT_IN_ONLY="opt_in_only",n))(Ji||{}),qi=(n=>(n.REJECT_ALL="reject_all",n.REJECT_CONSENT_ONLY="reject_consent_only",n))(qi||{}),dt=(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.OT_MIGRATION="ot_migration",n))(dt||{}),Xi=(n=>(n.privacy_center="privacy_center",n.overlay="overlay",n.api="api",n))(Xi||{}),Zi=(n=>(n.NONE="none",n.APPLIED="applied",n.OVERRIDDEN="overridden",n))(Zi||{}),er=(n=>(n.OVERLAY="overlay",n.MODAL="modal",n.BANNER="banner",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.TCF_BANNER="tcf_banner",n))(er||{});const tr=(n,e)=>!!Object.keys(e).includes(n.notice_key),Bt=n=>!n||n===Ge.OPT_OUT?!1:n===Ge.OPT_IN?!0:n===Ge.ACKNOWLEDGE,Et=(n,e)=>n?e===rs.NOTICE_ONLY?Ge.ACKNOWLEDGE:Ge.OPT_IN:Ge.OPT_OUT,sr=n=>typeof n=="string"?Bt(n):n,nr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var ir=Object.defineProperty,rr=Object.defineProperties,or=Object.getOwnPropertyDescriptors,os=Object.getOwnPropertySymbols,ar=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,as=(n,e,t)=>e in n?ir(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nt=(n,e)=>{for(var t in e||(e={}))ar.call(e,t)&&as(n,t,e[t]);if(os)for(var t of os(e))lr.call(e,t)&&as(n,t,e[t]);return n},cr=(n,e)=>rr(n,or(e));const rt=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,ls=n=>!!(n&&n.every(e=>e.default_preference===Ge.OPT_IN)),dr=n=>n?n.location&&nr.test(n.location)?n.location.replace("-","_").toLowerCase():n.country&&n.region?`${n.country.toLowerCase()}_${n.region.toLowerCase()}`:null:null,cs=n=>n.fidesConsentOverride===dt.ACCEPT||n.fidesConsentOverride===dt.REJECT,Er=(n,e,t,s)=>{var i,r,o,a,l,d;return s!=null&&s.fidesDisableBanner||!rt(n)?!1:((i=n.experience_config)==null?void 0:i.component)===ct.TCF_OVERLAY&&e?s&&cs(s)?!1:(r=n.meta)!=null&&r.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((o=n.experience_config)==null?void 0:o.component)===ct.MODAL||((a=n.experience_config)==null?void 0:a.component)===ct.HEADLESS||!((l=n?.privacy_notices)!=null&&l.length)?!1:t?s&&cs(s)?!1:e?.fides_meta.consentMethod===dt.GPC?!0:!((d=n.privacy_notices)!=null&&d.every(u=>tr(u,t))):!0},ur=(n,e)=>n.map(t=>{var s;const i=Et(e.includes(t.notice.notice_key),t.notice.consent_mechanism);return new ns(t.notice,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)}),Sr=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=Ot.OMIT})=>{if(!(e!=null&&e.length))return n;const i=Nt({},n);return s===Ot.INCLUDE?e.forEach(r=>{i[r]=t===lt.CONSENT_MECHANISM?Ge.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},pr=({consent:n,flagType:e=lt.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==lt.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,sr(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]=Et(o,a)}}),s):Nt({},n)},ds=(n,e,t=[],s,i)=>{var r,o,a;const l=Nt({},n),d=(r=window.Fides)==null?void 0:r.options,u=(o=i??d?.fidesConsentNonApplicableFlagMode)!=null?o:Ot.OMIT,h=(a=s??d?.fidesConsentFlagType)!=null?a:lt.BOOLEAN,E={};Object.assign(E,Sr({consent:{},nonApplicableNotices:e??[],flagType:h,mode:u}));const O=t.reduce((g,V)=>cr(Nt({},g),{[V.notice_key]:V.consent_mechanism}),{});return Object.assign(E,pr({consent:l,consentMechanisms:O,flagType:h})),E};var Ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},At={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */At.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof Ht=="object"&&Ht;(r.global===r||r.window===r)&&(t=r);var o=function(g){this.message=g};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(g){throw new o(g)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,u=function(g){g=String(g).replace(d,"");var V=g.length;V%4==0&&(g=g.replace(/==?$/,""),V=g.length),(V%4==1||/[^+a-zA-Z0-9/]/.test(g))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var C=0,f,P,se="",be=-1;++be<V;)P=l.indexOf(g.charAt(be)),f=C%4?f*64+P:P,C++%4&&(se+=String.fromCharCode(255&f>>(-2*C&6)));return se},h=function(g){g=String(g),/[^\0-\xFF]/.test(g)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var V=g.length%3,C="",f=-1,P,se,be,Pe,sn=g.length-V;++f<sn;)P=g.charCodeAt(f)<<16,se=g.charCodeAt(++f)<<8,be=g.charCodeAt(++f),Pe=P+se+be,C+=l.charAt(Pe>>18&63)+l.charAt(Pe>>12&63)+l.charAt(Pe>>6&63)+l.charAt(Pe&63);return V==2?(P=g.charCodeAt(f)<<8,se=g.charCodeAt(++f),Pe=P+se,C+=l.charAt(Pe>>10)+l.charAt(Pe>>4&63)+l.charAt(Pe<<2&63)+"="):V==1&&(Pe=g.charCodeAt(f),C+=l.charAt(Pe>>2)+l.charAt(Pe<<4&63)+"=="),C},E={encode:h,decode:u,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=E;else for(var O in E)E.hasOwnProperty(O)&&(s[O]=E[O]);else t.base64=E})(Ht)}(At,At.exports);var Es=At.exports;/*! js-cookie v3.0.5 | MIT */function ft(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 _r={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 kt(n,e){function t(i,r,o){if(!(typeof document>"u")){o=ft({},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("="),d=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(o[u]=n.read(d,u),i===u)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",ft({},r,{expires:-1}))},withAttributes:function(i){return kt(this.converter,ft({},this.attributes,i))},withConverter:function(i){return kt(ft({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var hr=kt(_r,{path:"/"});let Ct;const gr=new Uint8Array(16);function Tr(){if(!Ct&&(Ct=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ct))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ct(gr)}const Ne=[];for(let n=0;n<256;++n)Ne.push((n+256).toString(16).slice(1));function Ir(n,e=0){return Ne[n[e+0]]+Ne[n[e+1]]+Ne[n[e+2]]+Ne[n[e+3]]+"-"+Ne[n[e+4]]+Ne[n[e+5]]+"-"+Ne[n[e+6]]+Ne[n[e+7]]+"-"+Ne[n[e+8]]+Ne[n[e+9]]+"-"+Ne[n[e+10]]+Ne[n[e+11]]+Ne[n[e+12]]+Ne[n[e+13]]+Ne[n[e+14]]+Ne[n[e+15]]}const Or=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var us={randomUUID:Or};function Nr(n,e,t){if(us.randomUUID&&!e&&!n)return us.randomUUID();n=n||{};const s=n.random||(n.rng||Tr)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=s[i];return e}return Ir(s)}var Ar=(n=>(n.CONSENT="Consent",n.CONTRACT="Contract",n.LEGAL_OBLIGATIONS="Legal obligations",n.VITAL_INTERESTS="Vital interests",n.PUBLIC_INTEREST="Public interest",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(Ar||{}),Kt=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(Kt||{});const $t=407,Pt=",",fr=[{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"}],Cr=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];fr.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),Kt.CONSENT.toString(),Kt.LEGITIMATE_INTERESTS.toString();const Pr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var wr=Object.defineProperty,Dr=Object.defineProperties,mr=Object.getOwnPropertyDescriptors,Ss=Object.getOwnPropertySymbols,Vr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,ps=(n,e,t)=>e in n?wr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Mr=(n,e)=>{for(var t in e||(e={}))Vr.call(e,t)&&ps(n,t,e[t]);if(Ss)for(var t of Ss(e))Rr.call(e,t)&&ps(n,t,e[t]);return n},br=(n,e)=>Dr(n,mr(e)),Lr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const _s="fides_consent",vr=365,wt=hr.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),Gr=()=>Nr();Gr();const yr=n=>wt.get(n),Ur=()=>{const n=yr(_s);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(Es.decode(n))}catch{return}}},hs=(n,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();n.fides_meta.updatedAt=t;let s=JSON.stringify(n);e&&(s=Es.encode(s));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),wt.set(_s,s,{path:"/",domain:r,expires:vr})){const a=Ur();if(a&&a.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},xr=n=>{const e={};return Cr.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,Bt(r.preference)]))}),e},Fr=(n,e=!0)=>{n.forEach(t=>{var s;if(wt.remove(t.name,{path:(s=t.path)!=null?s:"/",domain:t.domain}),e){const{hostname:i}=window.location;wt.remove(t.name,{domain:`.${i}`})}})},gs=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,Bt(s)]));return Object.fromEntries(e)},Br=(n,e)=>Lr(void 0,null,function*(){return br(Mr({},n),{consent:gs(e)})});var Hr=(n=>(n.GVL="gvl",n.AC="gacp",n))(Hr||{});const Ke=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Dt=(n,e)=>{if(!(e!=null&&e.vendors))return;const{source:t,id:s}=Ke(n);if(t==="gvl"||t===void 0)return e.vendors[s]},kr=n=>Ke(n).source==="gacp",Kr=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(t=>t.id).filter(t=>Dt(t,n.gvl)).map(t=>+Ke(t).id)},$r=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>Dt(t,n.gvl)).map(t=>+Ke(t).id)},jr=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(Pt);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},Ts=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(Pt))||[]).concat(s);return s.map((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},Yr=1,We={us:{name:X.NAME,id:X.ID},us_ca:{name:ne.NAME,id:ne.ID},us_co:{name:re.NAME,id:re.ID},us_ct:{name:ae.NAME,id:ae.ID},us_ut:{name:oe.NAME,id:oe.ID},us_va:{name:ie.NAME,id:ie.ID},us_de:{name:ue.NAME,id:ue.ID},us_fl:{name:le.NAME,id:le.ID},us_ia:{name:Se.NAME,id:Se.ID},us_mt:{name:ce.NAME,id:ce.ID},us_ne:{name:pe.NAME,id:pe.ID},us_nh:{name:_e.NAME,id:_e.ID},us_nj:{name:he.NAME,id:he.ID},us_or:{name:de.NAME,id:de.ID},us_tn:{name:ge.NAME,id:ge.ID},us_tx:{name:Ee.NAME,id:Ee.ID}};function Is(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}var zr=Object.defineProperty,Wr=Object.defineProperties,Qr=Object.getOwnPropertyDescriptors,Os=Object.getOwnPropertySymbols,Jr=Object.prototype.hasOwnProperty,qr=Object.prototype.propertyIsEnumerable,Ns=(n,e,t)=>e in n?zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,As=(n,e)=>{for(var t in e||(e={}))Jr.call(e,t)&&Ns(n,t,e[t]);if(Os)for(var t of Os(e))qr.call(e,t)&&Ns(n,t,e[t]);return n},fs=(n,e)=>Wr(n,Qr(e)),Xr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())}),Zr=(n=>(n.PRIVACY_EXPERIENCE="/privacy-experience",n.PRIVACY_PREFERENCES="/privacy-preferences",n.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",n.NOTICES_SERVED="/notices-served",n))(Zr||{});const eo={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},to="Fides.js",so=(n,e,t,s,i)=>Xr(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=fs(As({},eo),{body:JSON.stringify(fs(As({},e),{source:to}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var no=Object.defineProperty,io=Object.defineProperties,ro=Object.getOwnPropertyDescriptors,Cs=Object.getOwnPropertySymbols,oo=Object.prototype.hasOwnProperty,ao=Object.prototype.propertyIsEnumerable,Ps=(n,e,t)=>e in n?no(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,jt=(n,e)=>{for(var t in e||(e={}))oo.call(e,t)&&Ps(n,t,e[t]);if(Cs)for(var t of Cs(e))ao.call(e,t)&&Ps(n,t,e[t]);return n},lo=(n,e)=>io(n,ro(e));const ws=(n,e,t)=>{var s,i,r,o,a,l,d;const u=e?jt({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const h=jt({consentMethod:u?.fides_meta.consentMethod},t),E=(s=performance?.mark)==null?void 0:s.call(performance,n),O=E?.startTime,g=u;g&&u!=null&&u.consent&&(g.consent=ds(u.consent,(r=(i=window.Fides)==null?void 0:i.experience)==null?void 0:r.non_applicable_privacy_notices,(a=(o=window.Fides)==null?void 0:o.experience)==null?void 0:a.privacy_notices));const V=new CustomEvent(n,{detail:lo(jt({},g),{debug:!!((d=(l=window.Fides)==null?void 0:l.options)!=null&&d.debug),extraDetails:h,timestamp:O}),bubbles:!0});window.dispatchEvent(V)}};var co=Object.defineProperty,Eo=Object.defineProperties,uo=Object.getOwnPropertyDescriptors,Ds=Object.getOwnPropertySymbols,So=Object.prototype.hasOwnProperty,po=Object.prototype.propertyIsEnumerable,ms=(n,e,t)=>e in n?co(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vs=(n,e)=>{for(var t in e||(e={}))So.call(e,t)&&ms(n,t,e[t]);if(Ds)for(var t of Ds(e))po.call(e,t)&&ms(n,t,e[t]);return n},_o=(n,e)=>Eo(n,uo(e)),Rs=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});function ho(n,e,t,s,i,r,o,a,l,d){return Rs(this,null,function*(){const u=(r||[]).map(E=>({preference:E.consentPreference,privacy_notice_history_id:E.noticeHistoryId||""})),h=Vs({browser_identity:e.identity,preferences:u,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:d},o??[]);yield so(s,h,n,e,t)})}const go=n=>Rs(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,servedNoticeHistoryId:l,tcf:d,updateCookie:u,propertyId:h}){var E,O,g,V;if(!u&&e&&(u=P=>Br(P,e)),!u&&!e)throw new Error("updateCookie is required");const C=yield u(a);Object.assign(a,C),Object.assign(a.fides_meta,{consentMethod:i}),ws("FidesUpdating",a);const f=ds(a.consent,(O=(E=window.Fides)==null?void 0:E.experience)==null?void 0:O.non_applicable_privacy_notices,(V=(g=window.Fides)==null?void 0:g.experience)==null?void 0:V.privacy_notices);if(window.Fides.consent=f,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,hs(_o(Vs({},a),{consent:f}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield ho(r,a,s,i,t,e,d,o,l,h)}catch{}e&&e.filter(P=>P.consentPreference===Ge.OPT_OUT).forEach(P=>{var se,be;(se=P.notice)!=null&&se.cookies&&Fr(P.notice.cookies,(be=s.experience_config)==null?void 0:be.auto_subdomain_cookie_deletion)}),ws("FidesUpdated",a)});class $e extends Error{constructor(e){super(e),this.name="DecodingError"}}class Fe extends Error{constructor(e){super(e),this.name="EncodingError"}}class ot extends Error{constructor(e){super(e),this.name="GVLError"}}class Be extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class Yt{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 Fe("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 $e("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 He{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 He.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(He.langSet.has(e))return e;if(He.langSet.has(t))return t;const s=t+"-"+t;if(He.langSet.has(s))return s;for(const i of He.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){He.langSet.forEach(e)}get size(){return He.langSet.size}}class S{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 ut{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 ut{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 Be("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 Ms extends ut{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 bs;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(bs||(bs={}));var J;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(J||(J={}));class Ls{static ID_TO_KEY=[J.CORE,J.VENDORS_DISCLOSED,J.VENDORS_ALLOWED,J.PUBLISHER_TC];static KEY_TO_ID={[J.CORE]:0,[J.VENDORS_DISCLOSED]:1,[J.VENDORS_ALLOWED]:2,[J.PUBLISHER_TC]:3}}class Ce extends ut{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 Be("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 T{static[S.cmpId]=12;static[S.cmpVersion]=12;static[S.consentLanguage]=12;static[S.consentScreen]=6;static[S.created]=36;static[S.isServiceSpecific]=1;static[S.lastUpdated]=36;static[S.policyVersion]=6;static[S.publisherCountryCode]=12;static[S.publisherLegitimateInterests]=24;static[S.publisherConsents]=24;static[S.purposeConsents]=24;static[S.purposeLegitimateInterests]=24;static[S.purposeOneTreatment]=1;static[S.specialFeatureOptins]=12;static[S.useNonStandardTexts]=1;static[S.vendorListVersion]=12;static[S.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 m{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 Fe(`${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 $e("invalid bit length");return parseInt(e,2)}}class vs{static encode(e,t){return m.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new $e("invalid bit length");const s=new Date;return s.setTime(m.decode(e,t)*100),s}}class je{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 $e("bitfield encoding length mismatch");const s=new Ce;for(let i=1;i<=t;i++)ye.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class Gs{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 Fe(`invalid language code: ${e}`);if(t%2===1)throw new Fe(`numBits must be even, ${t} is not valid`);t=t/2;const o=m.encode(i,t),a=m.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=m.decode(e.slice(0,r),r)+65,a=m.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new $e("invalid bit length for language");return s}}class To{static encode(e){let t=m.encode(e.numRestrictions,T.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+=m.encode(i.purposeId,T.purposeId),t+=m.encode(i.restrictionType,T.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,d="";for(let u=0;u<o;u++){const h=r[u];if(l===0&&(a++,l=h),u===o-1||r[u+1]>s(h,r[o-1])){const E=h!==l;d+=ye.encode(E),d+=m.encode(l,T.vendorId),E&&(d+=m.encode(h,T.vendorId)),l=0}}t+=m.encode(a,T.numEntries),t+=d})}return t}static decode(e){let t=0;const s=new Ms,i=m.decode(e.substr(t,T.numRestrictions),T.numRestrictions);t+=T.numRestrictions;for(let r=0;r<i;r++){const o=m.decode(e.substr(t,T.purposeId),T.purposeId);t+=T.purposeId;const a=m.decode(e.substr(t,T.restrictionType),T.restrictionType);t+=T.restrictionType;const l=new Ue(o,a),d=m.decode(e.substr(t,T.numEntries),T.numEntries);t+=T.numEntries;for(let u=0;u<d;u++){const h=ye.decode(e.substr(t,T.anyBoolean));t+=T.anyBoolean;const E=m.decode(e.substr(t,T.vendorId),T.vendorId);if(t+=T.vendorId,h){const O=m.decode(e.substr(t,T.vendorId),T.vendorId);if(t+=T.vendorId,O<E)throw new $e(`Invalid RangeEntry: endVendorId ${O} is less than ${E}`);for(let g=E;g<=O;g++)s.add(g,l)}else s.add(E,l)}}return s.bitLength=t,s}}var St;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(St||(St={}));class pt{static encode(e){const t=[];let s=[],i=m.encode(e.maxId,T.maxId),r="",o;const a=T.maxId+T.encodingType,l=a+e.maxId,d=T.vendorId*2+T.singleOrRange+T.numEntries;let u=a+T.numEntries;return e.forEach((h,E)=>{r+=ye.encode(h),o=e.maxId>d&&u<l,o&&h&&(e.has(E+1)?s.length===0&&(s.push(E),u+=T.singleOrRange,u+=T.vendorId):(s.push(E),u+=T.vendorId,t.push(s),s=[]))}),o?(i+=String(St.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(St.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=m.decode(e.substr(i,T.maxId),T.maxId);i+=T.maxId;const o=m.decode(e.charAt(i),T.encodingType);if(i+=T.encodingType,o===St.RANGE){if(s=new Ce,t===1){if(e.substr(i,1)==="1")throw new $e("Unable to decode default consent=1");i++}const a=m.decode(e.substr(i,T.numEntries),T.numEntries);i+=T.numEntries;for(let l=0;l<a;l++){const d=ye.decode(e.charAt(i));i+=T.singleOrRange;const u=m.decode(e.substr(i,T.vendorId),T.vendorId);if(i+=T.vendorId,d){const h=m.decode(e.substr(i,T.vendorId),T.vendorId);i+=T.vendorId;for(let E=u;E<=h;E++)s.set(E)}else s.set(u)}}else{const a=e.substr(i,r);i+=r,s=je.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=m.encode(t,T.numEntries);return e.forEach(i=>{const r=i.length===1;s+=ye.encode(!r),s+=m.encode(i[0],T.vendorId),r||(s+=m.encode(i[1],T.vendorId))}),s}}function ys(){return{[S.version]:m,[S.created]:vs,[S.lastUpdated]:vs,[S.cmpId]:m,[S.cmpVersion]:m,[S.consentScreen]:m,[S.consentLanguage]:Gs,[S.vendorListVersion]:m,[S.policyVersion]:m,[S.isServiceSpecific]:ye,[S.useNonStandardTexts]:ye,[S.specialFeatureOptins]:je,[S.purposeConsents]:je,[S.purposeLegitimateInterests]:je,[S.purposeOneTreatment]:ye,[S.publisherCountryCode]:Gs,[S.vendorConsents]:pt,[S.vendorLegitimateInterests]:pt,[S.publisherRestrictions]:To,segmentType:m,[S.vendorsDisclosed]:pt,[S.vendorsAllowed]:pt,[S.publisherConsents]:je,[S.publisherLegitimateInterests]:je,[S.numCustomPurposes]:m,[S.publisherCustomConsents]:je,[S.publisherCustomLegitimateInterests]:je}}class Io{1={[J.CORE]:[S.version,S.created,S.lastUpdated,S.cmpId,S.cmpVersion,S.consentScreen,S.consentLanguage,S.vendorListVersion,S.purposeConsents,S.vendorConsents]};2={[J.CORE]:[S.version,S.created,S.lastUpdated,S.cmpId,S.cmpVersion,S.consentScreen,S.consentLanguage,S.vendorListVersion,S.policyVersion,S.isServiceSpecific,S.useNonStandardTexts,S.specialFeatureOptins,S.purposeConsents,S.purposeLegitimateInterests,S.purposeOneTreatment,S.publisherCountryCode,S.vendorConsents,S.vendorLegitimateInterests,S.publisherRestrictions],[J.PUBLISHER_TC]:[S.publisherConsents,S.publisherLegitimateInterests,S.numCustomPurposes,S.publisherCustomConsents,S.publisherCustomLegitimateInterests],[J.VENDORS_ALLOWED]:[S.vendorsAllowed],[J.VENDORS_DISCLOSED]:[S.vendorsDisclosed]}}class Oo{1=[J.CORE];2=[J.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(J.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[S.supportOOB]===!0)&&this[2].push(J.VENDORS_DISCLOSED),s&&(e[S.supportOOB]&&e[S.vendorsAllowed].size>0&&this[2].push(J.VENDORS_ALLOWED),this[2].push(J.PUBLISHER_TC))}}}class Us{static fieldSequence=new Io;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new Fe(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==J.CORE&&(i=m.encode(Ls.KEY_TO_ID[t],T.segmentType));const r=ys();return s.forEach(o=>{const a=e[o],l=r[o];let d=T[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[S.numCustomPurposes]));try{i+=l.encode(a,d)}catch(u){throw new Fe(`Error encoding ${t}->${o}: ${u.message}`)}}),Yt.encode(i)}static decode(e,t,s){const i=Yt.decode(e);let r=0;s===J.CORE&&(t.version=m.decode(i.substr(r,T[S.version]),T[S.version])),s!==J.CORE&&(r+=T.segmentType);const o=this.fieldSequence[String(t.version)][s],a=ys();return o.forEach(l=>{const d=a[l];let u=T[l];if(u===void 0&&this.isPublisherCustom(l)&&(u=Number(t[S.numCustomPurposes])),u!==0){const h=i.substr(r,u);if(d===pt?t[l]=d.decode(h,t.version):t[l]=d.decode(h,u),Number.isInteger(u))r+=u;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new $e(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class No{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 d=e.publisherRestrictions.getRestrictions(a);let u=!1;for(let h=0,E=d.length;h<E&&!u;h++)u=d[h].restrictionType===Re.REQUIRE_CONSENT&&r==="purposes"||d[h].restrictionType===Re.REQUIRE_LI&&r==="legIntPurposes";u||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 Fe("Unable to encode TCModel without a GVL");if(!s.isReady)throw new Fe("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 Fe(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class Ao{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 E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},h=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",d),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=h,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 A extends ut{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new He;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new ot("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=A.baseUrl,i=t?.language;if(i)try{i=A.consentLanguages.parseLanguage(i)}catch(r){throw new ot("Error during parsing the language: "+r.message)}if(this.lang_=i||A.DEFAULT_LANGUAGE,this.cacheLang_=i||A.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new ot("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;A.CACHE.has(r)?(this.populate(A.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=A.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else A.CACHE.has(A.LATEST_CACHE_KEY)?(this.populate(A.CACHE.get(A.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+A.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&A.LANGUAGE_CACHE.size>0?(A.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(A.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(A.CACHE.delete(e),t=!0):e===void 0&&(A.CACHE=new Map,t=!0),t}cacheLanguage(){A.LANGUAGE_CACHE.has(this.cacheLang_)||A.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 Ao.fetch(e))}catch(t){throw new ot(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]=A.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=A.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=A.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=A.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=A.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=A.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]=A.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=A.consentLanguages.parseLanguage(e)}catch(i){throw new ot("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===A.DEFAULT_LANGUAGE.toLowerCase()&&!A.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,A.LANGUAGE_CACHE.has(s)){const i=A.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=A.baseUrl+A.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new ot("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&&A.CACHE.set(A.LATEST_CACHE_KEY,this.getJson()),A.CACHE.has(this.vendorListVersion)||A.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 A(this.getJson());return this.lang_!==A.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class xs extends ut{static consentLanguages=A.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 Ce;purposeConsents=new Ce;purposeLegitimateInterests=new Ce;publisherConsents=new Ce;publisherLegitimateInterests=new Ce;publisherCustomConsents=new Ce;publisherCustomLegitimateInterests=new Ce;customPurposes;vendorConsents=new Ce;vendorLegitimateInterests=new Ce;vendorsDisclosed=new Ce;vendorsAllowed=new Ce;publisherRestrictions=new Ms;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){A.isInstanceOf(e)||(e=new A(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 Be("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 Be("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 Be("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 Be("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new Be("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 Be("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 Be("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 fo{static encode(e,t){let s="",i;return e=No.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new Oo(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=Us.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new xs);for(let r=0;r<i;r++){const o=s[r],l=Yt.decode(o.charAt(0)).substr(0,T.segmentType),d=Ls.ID_TO_KEY[m.decode(l,T.segmentType).toString()];Us.decode(o,t,d)}return t}}var Ye;(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"})(Ye||(Ye={}));var mt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(mt||(mt={}));var Vt;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Vt||(Vt={}));var Fs;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Fs||(Fs={}));class Rt{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 Mt extends Rt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Hs(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 Co{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 Mt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class Oe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new Co;static cmpStatus=mt.LOADING;static disabled=!1;static displayStatus=Vt.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=mt.LOADING,this.disabled=!1,this.displayStatus=Vt.HIDDEN,this.eventQueue.clear()}}class Bs{cmpId=Oe.cmpId;cmpVersion=Oe.cmpVersion;gdprApplies=Oe.gdprApplies;tcfPolicyVersion=Oe.tcfPolicyVersion}class Hs extends Bs{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=Oe.eventStatus,this.cmpStatus=Oe.cmpStatus,this.listenerId=t,Oe.gdprApplies){const s=Oe.tcModel;this.tcString=Oe.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 Po extends Hs{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(),d=t[l].substr(0,i),u=t[l].substr(i+1);t[l]=d+a+u})}}return t}}class wo extends Bs{cmpLoaded=!0;cmpStatus=Oe.cmpStatus;displayStatus=Oe.displayStatus;apiVersion=String(Oe.apiVersion);gvlVersion;constructor(){super(),Oe.tcModel&&Oe.tcModel.vendorListVersion&&(this.gvlVersion=+Oe.tcModel.vendorListVersion)}}class Do extends Rt{respond(){this.invokeCallback(new wo)}}class mo extends Mt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Po(this.param))}}class Vo extends Rt{respond(){const e=Oe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new A(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Ro extends Mt{respond(){this.listenerId=Oe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class Mo extends Rt{respond(){this.invokeCallback(Oe.eventQueue.remove(this.param))}}class Na{static[Ye.PING]=Do;static[Ye.GET_TC_DATA]=Mt;static[Ye.GET_IN_APP_TC_DATA]=mo;static[Ye.GET_VENDOR_LIST]=Vo;static[Ye.ADD_EVENT_LISTENER]=Ro;static[Ye.REMOVE_EVENT_LISTENER]=Mo}const bo=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(Pt);return t.split(".")[0]}return e??""};var Lo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const vo=1,ks=[1,3,4,5,6],Go=2,yo=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(kr).map(o=>Ke(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${Go}~${s}~dv.${i}`},Uo=n=>Lo(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const l=new xs(new A(e.gvl));yield l.gvl.readyPromise,l.cmpId=$t,l.cmpVersion=vo,l.consentScreen=1,l.isServiceSpecific=!0,l.supportOOB=!1,e.tcf_publisher_country_code&&(l.publisherCountryCode=e.tcf_publisher_country_code);const d=e.minimal_tcf?$r(e):Kr(e);if(l.gvl.narrowVendorsTo(d),t){t.vendorsConsent.forEach(E=>{var O,g,V;if(Dt(E,e.gvl)){const{id:C}=Ke(E);if(l.vendorConsents.set(+C),!((O=e.tcf_publisher_restrictions)!=null&&O.length)){const f=(g=e.gvl)==null?void 0:g.vendors[C];f&&!((V=f?.purposes)!=null&&V.length)&&f.flexiblePurposes.forEach(P=>{const se=new Ue;se.purposeId=P,se.restrictionType=Re.REQUIRE_CONSENT,l.publisherRestrictions.add(+C,se)})}}}),t.vendorsLegint.forEach(E=>{var O,g;if(e.minimal_tcf)(O=e.tcf_vendor_legitimate_interest_ids)==null||O.forEach(V=>{const{id:C}=Ke(V);l.vendorLegitimateInterests.set(+C)});else if(Dt(E,e.gvl)){const V=(g=e.tcf_vendor_legitimate_interests)==null?void 0:g.filter(P=>P.id===E)[0],C=V?.purpose_legitimate_interests;let f=!1;if(C&&(C.map(P=>P.id).filter(P=>ks.includes(P)).length&&(f=!0),!f)){const{id:P}=Ke(E);l.vendorLegitimateInterests.set(+P)}}}),Object.values((i=(s=e.gvl)==null?void 0:s.vendors)!=null?i:{}).forEach(E=>{var O,g;(O=E.specialPurposes)!=null&&O.length&&!((g=E.legIntPurposes)!=null&&g.length)&&l.vendorLegitimateInterests.set(E.id)}),t.purposesConsent.forEach(E=>{l.purposeConsents.set(+E)}),t.purposesLegint.forEach(E=>{const O=+E;ks.includes(O)||l.purposeLegitimateInterests.set(O)}),t.specialFeatures.forEach(E=>{l.specialFeatureOptins.set(+E)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(E=>{E.vendors.forEach(O=>{const g=new Ue;g.purposeId=E.purpose_id,g.restrictionType=E.restriction_type,l.publisherRestrictions.add(O,g)})}),a=fo.encode(l,{segments:[J.CORE]});const u=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(E=>E.id),h=yo({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:u??[]});a=`${a}${Pt}${h}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var xo=Object.defineProperty,Fo=Object.defineProperties,Bo=Object.getOwnPropertyDescriptors,Ks=Object.getOwnPropertySymbols,Ho=Object.prototype.hasOwnProperty,ko=Object.prototype.propertyIsEnumerable,$s=(n,e,t)=>e in n?xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ko=(n,e)=>{for(var t in e||(e={}))Ho.call(e,t)&&$s(n,t,e[t]);if(Ks)for(var t of Ks(e))ko.call(e,t)&&$s(n,t,e[t]);return n},$o=(n,e)=>Fo(n,Bo(e)),jo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Qe=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=Et(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],Je=n=>n!=null&&n.length?n.map(e=>{const t=Et(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],Yo=({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:Qe({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:Qe({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:Qe({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:Qe({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:Qe({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:Qe({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:Qe({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},zo=({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:Je(e.purposesConsent),purpose_legitimate_interests_preferences:Je(e.purposesLegint),special_feature_preferences:Je(e.specialFeatures),vendor_consent_preferences:Je(s),vendor_legitimate_interests_preferences:Je(r),system_consent_preferences:Je(t),system_legitimate_interests_preferences:Je(i)}},Wo=(n,e,t,s,i)=>jo(void 0,null,function*(){var r;const o=yield Uo({tcStringPreferences:t,experience:s}),a=$o(Ko({},n),{fides_string:o,tcf_consent:xr(e),tcf_version_hash:(r=s.meta)==null?void 0:r.version_hash});return i&&(a.consent=gs(i)),a}),Qo=(n,e)=>!n||!e?[]:n.map(t=>{var s;const i=Et(e.includes(t.id),t.consent_mechanism);return new ns(t,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)});var De=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(De||{});const qe="us",js=({cmpApi:n,sectionName:e,gppSettings:t})=>{t&&[{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:s,cmpApiField:i})=>{const r=i===N.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:s&&(o=1),n.setFieldValue(e,i,o)})},Jo=n=>n?.toLowerCase().startsWith("us"),zt=({experienceRegion:n,usApproach:e})=>Jo(n)&&e===De.NATIONAL?qe:n,Ys=({cmpApi:n,experience:e})=>{const t=new Set,{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=zt({experienceRegion:i,usApproach:o}),l=We[a];return!l&&o===De.ALL&&(a=qe,l=We[a]),!l||a===qe&&o===De.STATE?[]:(t.add(l),s.forEach(d=>{var u;const{gpp_field_mapping:h}=d,E=(u=h?.find(O=>O.region===a))==null?void 0:u.notice;E&&E.forEach(O=>{n.setFieldValue(l.name,O,1)})}),js({cmpApi:n,sectionName:l.name,gppSettings:r}),Array.from(t))},zs=({cmpApi:n,cookie:e,experience:t})=>{const s=new Set,{privacy_notices:i=[],region:r,gpp_settings:o}=t,a=o?.us_approach;let l=zt({experienceRegion:r,usApproach:a}),d=We[l];if(!d&&a===De.ALL&&(l=qe,d=We[l]),!d||l===qe&&a===De.STATE)return[];s.add(d);const{consent:u}=e;return Object.keys(u).forEach(h=>{var E;const O=i?.find(V=>V.notice_key===h),g=u[h];if(O){const{gpp_field_mapping:V}=O,C=(E=V?.find(f=>f.region===l))==null?void 0:E.mechanism;C&&C.forEach(f=>{let P=f.not_available;g===!1?P=f.opt_out:g&&(P=f.not_opt_out);let se=+P;P.length>1&&(se=P.split("").map(be=>+be)),n.setFieldValue(d.name,f.field,se)})}}),js({cmpApi:n,sectionName:d.name,gppSettings:o}),Array.from(s)};var qo=Object.defineProperty,Xo=Object.defineProperties,Zo=Object.getOwnPropertyDescriptors,Ws=Object.getOwnPropertySymbols,ea=Object.prototype.hasOwnProperty,ta=Object.prototype.propertyIsEnumerable,Qs=(n,e,t)=>e in n?qo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Js=(n,e)=>{for(var t in e||(e={}))ea.call(e,t)&&Qs(n,t,e[t]);if(Ws)for(var t of Ws(e))ta.call(e,t)&&Qs(n,t,e[t]);return n},qs=(n,e)=>Xo(n,Zo(e));const sa=[1,3,4,5,6],na=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=zt({experienceRegion:i,usApproach:o}),l=We[a];return!l&&o===De.ALL&&(a=qe,l=We[a]),!l||a===qe&&o===De.STATE||s.forEach(d=>{var u;const{notice_key:h,gpp_field_mapping:E}=d,O=(u=E?.find(g=>g.region===a))==null?void 0:u.mechanism;if(O){const g=O.some(V=>{const C=n.getFieldValue(l.name,V.field),f=Array.isArray(C)?C.join(""):String(C);return f===V.opt_out?!0:(V.not_opt_out,!1)});g!==void 0&&(t[h]=!g)}}),t},ia=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=Pr,a=n.getSection(W.NAME);if(!a)return o;const l=a.PurposeConsents.map((E,O)=>E?(O+1).toString():null).filter(E=>E!==null),d=a.PurposeLegitimateInterests.map((E,O)=>E?(O+1).toString():null).filter(E=>E!==null),u=a.VendorConsents.map(E=>`gvl.${E}`),h=a.VendorLegitimateInterests.map(E=>`gvl.${E}`);return o.purposesConsent=l,o.purposesLegint=d.filter(E=>!sa.includes(parseInt(E,10))),o.vendorsConsent=u,o.vendorsLegint=h,o.specialFeatures=a.SpecialFeatureOptins.map((E,O)=>E?(O+1).toString():null).filter(E=>E!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(E=>E.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(E=>E.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(E=>E.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(E=>E.toString()))||[]),o.customPurposesConsent=[],o},ra=({fidesString:n,cmpApi:e})=>{const{gpp:t}=jr(n);if(!n||!t||!e)return;const{options:s,cookie:i,geolocation:r,locale:o,config:a}=window.Fides,l=window.Fides.experience;if(!l||!l.experience_config||!l.privacy_notices)return;const d=l.experience_config.component===ct.TCF_OVERLAY,u=dr(r),h=l.experience_config.translations.find(C=>Is(C.language,o));if(!h)return;e.setGppString(t),e.setSignalStatus(me.READY);const E=l.privacy_notices.map(C=>({notice:C,bestTranslation:C.translations.find(f=>Is(f.language,o))||null}));let O,g,V;if(d){const C=ia({cmpApi:e,experience:l});V=Qo(E.map(({notice:f,bestTranslation:P})=>qs(Js({},f),{bestTranslation:P})),C.customPurposesConsent),g=l.minimal_tcf?zo({experience:l,enabledIds:C}):Yo({experience:l,enabledIds:C}),O=f=>Wo(f,g,C,l)}else{const C=na({cmpApi:e,experience:l}),f=Object.entries(C).filter(([P,se])=>se).map(([P])=>P);V=ur(E,f),O=P=>Promise.resolve(qs(Js({},P),{consent:C}))}go({consentPreferencesToSave:V,privacyExperienceConfigHistoryId:h.privacy_experience_config_history_id,experience:l,consentMethod:dt.SCRIPT,options:s,userLocationString:u||void 0,cookie:i,propertyId:a?.propertyId,tcf:g,updateCookie:O})},Xs="__gppLocator",Zs=n=>{if(!window.frames[n])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=n,window.document.body.appendChild(e)}else setTimeout(()=>Zs(n),5)},oa=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},aa=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,la=()=>{const n=[],e=[];let t;const s=(r,o,a,l)=>{if(r==="queue")return n;if(r==="events")return e;const d={gppVersion:"1.1",cmpStatus:et.STUB,cmpDisplayStatus:ke.HIDDEN,signalStatus:me.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(d,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const u=t;e.push({id:u,callback:o,parameter:a}),o({eventName:"listenerRegistered",listenerId:u,data:!0,pingData:d},!0)}else if(r==="removeEventListener"){let u=!1;for(let h=0;h<e.length;h++)if(e[h].id===a){e.splice(h,1),u=!0;break}o({eventName:"listenerRemoved",listenerId:a,data:u,pingData:d},!0)}else r==="hasSection"?o(!1,!0):r==="getSection"||r==="getField"?o(null,!0):n.push([].slice.apply([r,o,a,l]));return null},i=r=>{const o=typeof r.data=="string";let a={};if(o)try{a=JSON.parse(r.data)}catch{a={}}else a=r.data;if(!aa(a))return null;if(a.__gppCall&&window.__gpp){const l=a.__gppCall;window.__gpp(l.command,(d,u)=>{const h={__gppReturn:{returnValue:d,success:u,callId:l.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(h):h,"*")},"parameter"in l?l.parameter:void 0,"version"in l?l.version:"1.1")}return null};oa(Xs)||(Zs(Xs),window.__gpp=s,window.addEventListener("message",i,!1))},en=(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,tn=(n,e)=>{if(!rt(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!(t!=null&&t.enable_tcfeu_string))return!1;const s=bo(n);return s?(e.setFieldValueBySectionId(W.ID,"CmpId",$t),e.setSectionStringById(W.ID,s),!0):!1},ca=()=>{const n=[];if(rt(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${W.ID}:${W.NAME}`),(e.us_approach===De.NATIONAL||e.us_approach===De.ALL)&&n.push(`${X.ID}:${X.NAME}`),(e.us_approach===De.STATE||e.us_approach===De.ALL)&&Object.values(We).forEach(t=>{t.id!==X.ID&&n.push(`${t.id}:${t.name}`)}))}return n},da=()=>{la();const n=new Hi($t,Yr);n.setCmpStatus(et.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=ca();if(n.setSupportedAPIs(o),!rt(s))return;const{fidesString:a}=r;if(a&&ra({fidesString:a,cmpApi:n}),!a&&(!Er(s,e.detail,i,r)||!r.tcfEnabled&&ls(s.privacy_notices)&&!en(i,e.detail.fides_string,s.privacy_notices))){const l=tn(e,n);l&&n.setApplicableSections([W.ID]);const d=Ys({cmpApi:n,experience:s}),u=zs({cmpApi:n,cookie:e.detail,experience:s});u.length&&n.setApplicableSections(u.map(E=>E.id)),!l&&!d.length&&!u.length&&n.setApplicableSections([-1]),n.setSignalStatus(me.READY);const h=Ts(n);window.Fides.fides_string=h}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(rt(t)){!i.tcfEnabled&&ls(t.privacy_notices)&&!en(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(me.READY):n.setSignalStatus(me.NOT_READY),n.setCmpDisplayStatus(ke.VISIBLE);const r=Ys({cmpApi:n,experience: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(ke.HIDDEN),n.setSignalStatus(me.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(ke.HIDDEN),tn(e,n)&&(n.setApplicableSections([W.ID]),n.fireSectionChange("tcfeuv2")),rt(window.Fides.experience)){const t=zs({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});t.length&&(n.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{n.fireSectionChange(i.name)}));const s=Ts(n);window.Fides.cookie&&(window.Fides.fides_string=s,window.Fides.cookie.fides_string=s,hs(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(me.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&da()});