ethyca-fides 2.65.3b3__py2.py3-none-any.whl → 2.66.0rc1__py2.py3-none-any.whl

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

Potentially problematic release.


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

Files changed (203) hide show
  1. {ethyca_fides-2.65.3b3.dist-info → ethyca_fides-2.66.0rc1.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.65.3b3.dist-info → ethyca_fides-2.66.0rc1.dist-info}/RECORD +198 -198
  3. fides/_version.py +3 -3
  4. fides/ui-build/static/admin/404.html +1 -1
  5. fides/ui-build/static/admin/_next/static/chunks/3450-0ba194991d0cca88.js +1 -0
  6. fides/ui-build/static/admin/_next/static/chunks/{3923-536e8bbbea5b7328.js → 3923-6cc911dafccc5f63.js} +1 -1
  7. fides/ui-build/static/admin/_next/static/chunks/{4230-d91fc4db148387bc.js → 4230-60100f7ef3ddcde1.js} +1 -1
  8. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-ad79168425b75dc6.js → _app-8b3c5d3146ed7692.js} +9 -9
  9. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-32600543eb7b584f.js +1 -0
  10. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-cbe4c8f9096b6543.js +1 -0
  11. fides/ui-build/static/admin/_next/static/css/2cadb5f62dcd7c2b.css +1 -0
  12. fides/ui-build/static/admin/_next/static/css/{399d4757862a3982.css → 94965f224bc991e9.css} +1 -1
  13. fides/ui-build/static/admin/_next/static/t-DtndYMbhjqqd1SOdd0Y/_buildManifest.js +1 -0
  14. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  15. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  16. fides/ui-build/static/admin/add-systems.html +1 -1
  17. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  18. fides/ui-build/static/admin/consent/configure.html +1 -1
  19. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  20. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  21. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  22. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  23. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  24. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  25. fides/ui-build/static/admin/consent/properties.html +1 -1
  26. fides/ui-build/static/admin/consent/reporting.html +1 -1
  27. fides/ui-build/static/admin/consent.html +1 -1
  28. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  29. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  30. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  31. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  32. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  33. fides/ui-build/static/admin/data-catalog.html +1 -1
  34. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  35. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  36. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  37. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  38. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  39. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  40. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  41. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  42. fides/ui-build/static/admin/datamap.html +1 -1
  43. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  44. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  45. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  46. fides/ui-build/static/admin/dataset/new.html +1 -1
  47. fides/ui-build/static/admin/dataset.html +1 -1
  48. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  49. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  50. fides/ui-build/static/admin/datastore-connection.html +1 -1
  51. fides/ui-build/static/admin/index.html +1 -1
  52. fides/ui-build/static/admin/integrations/[id].html +1 -1
  53. fides/ui-build/static/admin/integrations.html +1 -1
  54. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  55. fides/ui-build/static/admin/lib/fides-headless.js +1 -1
  56. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  57. fides/ui-build/static/admin/lib/fides-tcf.js +3 -3
  58. fides/ui-build/static/admin/lib/fides.js +3 -3
  59. fides/ui-build/static/admin/login/[provider].html +1 -1
  60. fides/ui-build/static/admin/login.html +1 -1
  61. fides/ui-build/static/admin/messaging/[id].html +1 -1
  62. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  63. fides/ui-build/static/admin/messaging.html +1 -1
  64. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  65. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  66. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  67. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  68. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  69. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  70. fides/ui-build/static/admin/poc/forms.html +1 -1
  71. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  72. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  73. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  74. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  75. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  76. fides/ui-build/static/admin/privacy-requests.html +1 -1
  77. fides/ui-build/static/admin/properties/[id].html +1 -1
  78. fides/ui-build/static/admin/properties/add-property.html +1 -1
  79. fides/ui-build/static/admin/properties.html +1 -1
  80. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  81. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  82. fides/ui-build/static/admin/settings/about.html +1 -1
  83. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  84. fides/ui-build/static/admin/settings/consent.html +1 -1
  85. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  86. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  87. fides/ui-build/static/admin/settings/domains.html +1 -1
  88. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  89. fides/ui-build/static/admin/settings/locations.html +1 -1
  90. fides/ui-build/static/admin/settings/organization.html +1 -1
  91. fides/ui-build/static/admin/settings/regulations.html +1 -1
  92. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  93. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  94. fides/ui-build/static/admin/systems.html +1 -1
  95. fides/ui-build/static/admin/taxonomy.html +1 -1
  96. fides/ui-build/static/admin/user-management/new.html +1 -1
  97. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  98. fides/ui-build/static/admin/user-management.html +1 -1
  99. fides/ui-build/static/admin/_next/static/UZLS8hRH8R50kojeaBV1Y/_buildManifest.js +0 -1
  100. fides/ui-build/static/admin/_next/static/chunks/3450-b7af9fec12e66f7f.js +0 -1
  101. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-29643fbd5745ac0e.js +0 -1
  102. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-1b9c48484ea70264.js +0 -1
  103. fides/ui-build/static/admin/_next/static/css/4383759407e86f7a.css +0 -1
  104. {ethyca_fides-2.65.3b3.dist-info → ethyca_fides-2.66.0rc1.dist-info}/WHEEL +0 -0
  105. {ethyca_fides-2.65.3b3.dist-info → ethyca_fides-2.66.0rc1.dist-info}/entry_points.txt +0 -0
  106. {ethyca_fides-2.65.3b3.dist-info → ethyca_fides-2.66.0rc1.dist-info}/licenses/LICENSE +0 -0
  107. {ethyca_fides-2.65.3b3.dist-info → ethyca_fides-2.66.0rc1.dist-info}/top_level.txt +0 -0
  108. /fides/ui-build/static/admin/_next/static/chunks/{1817-34bd629bf34328ec.js → 1817-e601e737e3cc7a0e.js} +0 -0
  109. /fides/ui-build/static/admin/_next/static/chunks/{203-9e86242bde459a43.js → 203-5a663f465ba26bb4.js} +0 -0
  110. /fides/ui-build/static/admin/_next/static/chunks/{2921-93228aa02364bb48.js → 2921-455e6357b74d2f76.js} +0 -0
  111. /fides/ui-build/static/admin/_next/static/chunks/{3855-b914c1a3124f44ea.js → 3855-e172870d3e21b0dd.js} +0 -0
  112. /fides/ui-build/static/admin/_next/static/chunks/{3872-140c8bf8bdb5d511.js → 3872-46cebf7ec1b31a2b.js} +0 -0
  113. /fides/ui-build/static/admin/_next/static/chunks/{401-002f393dae03f8f4.js → 401-1b529d5800aa1f3a.js} +0 -0
  114. /fides/ui-build/static/admin/_next/static/chunks/{409-6b1b506d59a0399a.js → 409-a257e14acebcd73b.js} +0 -0
  115. /fides/ui-build/static/admin/_next/static/chunks/{4121-91ab0fdde5204f41.js → 4121-2bc09fc4ddbfe5cb.js} +0 -0
  116. /fides/ui-build/static/admin/_next/static/chunks/{431-2a9adafa2689a0f4.js → 431-34f0b91c26f8d9ab.js} +0 -0
  117. /fides/ui-build/static/admin/_next/static/chunks/{4608-52674906c7d6a22e.js → 4608-bbb7bf511a05c3c2.js} +0 -0
  118. /fides/ui-build/static/admin/_next/static/chunks/{5309-90d555ba13edaf08.js → 5309-d73339f062763fed.js} +0 -0
  119. /fides/ui-build/static/admin/_next/static/chunks/{5574-1fad13b944f0c4fc.js → 5574-b13021775a15bfd2.js} +0 -0
  120. /fides/ui-build/static/admin/_next/static/chunks/{6084-1ae40620e79e0cf9.js → 6084-7178ff6ea6822475.js} +0 -0
  121. /fides/ui-build/static/admin/_next/static/chunks/{6662-5fa8a1b20b0d3e3c.js → 6662-507be5d46e5b719b.js} +0 -0
  122. /fides/ui-build/static/admin/_next/static/chunks/{6780-4db9fe1ee8860870.js → 6780-5bd185892f6af46e.js} +0 -0
  123. /fides/ui-build/static/admin/_next/static/chunks/{6853-02be83ef65e8853b.js → 6853-2ad3e08fe6f9f5f2.js} +0 -0
  124. /fides/ui-build/static/admin/_next/static/chunks/{6882-6f755ee046c9d70a.js → 6882-6af16fef26c21e06.js} +0 -0
  125. /fides/ui-build/static/admin/_next/static/chunks/{6954-b242eebbe7c52e5a.js → 6954-bb875d9ac89f6030.js} +0 -0
  126. /fides/ui-build/static/admin/_next/static/chunks/{7476-c4ccb87fb8dbe2c0.js → 7476-281ee9a8286556f3.js} +0 -0
  127. /fides/ui-build/static/admin/_next/static/chunks/{7630-731324d74b20b80e.js → 7630-9aac73191ed5ed13.js} +0 -0
  128. /fides/ui-build/static/admin/_next/static/chunks/{787-a1674f4d14753677.js → 787-fb41002f797eb2df.js} +0 -0
  129. /fides/ui-build/static/admin/_next/static/chunks/{79-056947276803332e.js → 79-7e87aff851423d4a.js} +0 -0
  130. /fides/ui-build/static/admin/_next/static/chunks/{796-e33122908c5e28ce.js → 796-329a5f823ec258a5.js} +0 -0
  131. /fides/ui-build/static/admin/_next/static/chunks/{9046-f5b180534b2637c3.js → 9046-ce9567c9074563e2.js} +0 -0
  132. /fides/ui-build/static/admin/_next/static/chunks/{9226-ce9c651c6ed829dd.js → 9226-746771d47dff6266.js} +0 -0
  133. /fides/ui-build/static/admin/_next/static/chunks/{9826-065b7cd0784d6912.js → 9826-111aaee8bd8dbd09.js} +0 -0
  134. /fides/ui-build/static/admin/_next/static/chunks/{9951-e572cda021343eb1.js → 9951-9b753ad7c3f51bdf.js} +0 -0
  135. /fides/ui-build/static/admin/_next/static/chunks/pages/{404-beb4bf835acb4386.js → 404-aece2c920ea14514.js} +0 -0
  136. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-9c25673536d3f2cc.js → manual-98777246bec9dc2a.js} +0 -0
  137. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-943479665698c6d2.js → multiple-dc75dc6e37e52f05.js} +0 -0
  138. /fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-f068a00278624bc9.js → add-systems-a71c0aff4e0e6535.js} +0 -0
  139. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-1bde4adc6d2a6dfa.js → add-vendors-24d226b5a8de5c74.js} +0 -0
  140. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-e72c1feeb24bdb73.js → configure-6a8ef51138ac926a.js} +0 -0
  141. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-cc858383bb1bbd36.js → [id]-1edf582ba3cd3bbb.js} +0 -0
  142. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-799d2a4a9dd68eea.js → privacy-experience-685771e5f7196d87.js} +0 -0
  143. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-bfca5064b33116b9.js → [id]-6ccedc70dc447089.js} +0 -0
  144. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-e4a9393b7572e591.js → new-944bca1cc57985b5.js} +0 -0
  145. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-55d0f8505a7f8692.js → privacy-notices-84f4bd14ce8673bc.js} +0 -0
  146. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-a05600d9e3e8735e.js → properties-6f86ab63a08a6528.js} +0 -0
  147. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-1103b69bcd90ed6c.js → reporting-afdbd4665657cfa1.js} +0 -0
  148. /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-bd0fbeabe84d3c8f.js → consent-73d3cbf68f7c3a31.js} +0 -0
  149. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-00bbbfb19c15c48d.js → [projectUrn]-6ba9e160dae64695.js} +0 -0
  150. /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-be252cac70aa63dd.js → projects-32eac8bbd217615a.js} +0 -0
  151. /fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-6d6584fd49026ec2.js → data-catalog-6f630d42ac9fb6b4.js} +0 -0
  152. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-caf0c55830fc91b3.js → [systemId]-2265ecb899d45fbc.js} +0 -0
  153. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-5c0b1f15873c90fa.js → [monitorId]-8ab33a1e0272df1f.js} +0 -0
  154. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-a81165ca06b7c404.js → action-center-9ddb52ebb7ac4c71.js} +0 -0
  155. /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-bf3627895c102ae0.js → activity-9aa744d56cdacb0d.js} +0 -0
  156. /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-639ac9cf51750635.js → datamap-7674b97d655c193b.js} +0 -0
  157. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-d69aff79e77c5464.js → [...subfieldNames]-c0d2bfd465df20e0.js} +0 -0
  158. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-9df954c65a9fe023.js → [collectionName]-28280a8a39a6e37c.js} +0 -0
  159. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-0e90202b2db3797c.js → [datasetId]-006b695e5af5ef24.js} +0 -0
  160. /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-17caa948d13ac81c.js → new-82fb246d87e58ebd.js} +0 -0
  161. /fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-06d5b6944e2de262.js → dataset-20165c31ab1bc7cf.js} +0 -0
  162. /fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-a980e69a921a0dfb.js → [id]-b4a6bcc87d126840.js} +0 -0
  163. /fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-d7160806386bc7e0.js → new-f95d7b0bbfc58f5a.js} +0 -0
  164. /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-36eeca2fe22be33a.js → datastore-connection-c391c6fad56eec48.js} +0 -0
  165. /fides/ui-build/static/admin/_next/static/chunks/pages/{index-7430cfb2a1bf1442.js → index-1919aab9e5834b51.js} +0 -0
  166. /fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-e039acfdefb0986e.js → [id]-eacabe4a80cb8813.js} +0 -0
  167. /fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-ea492832424a9619.js → integrations-e2d5d7e2a5265e68.js} +0 -0
  168. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-78606d74f82f5edc.js → [id]-53fecfb9dd6a1e0c.js} +0 -0
  169. /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-9dff500113f0710f.js → add-template-76b01cec5fde10a9.js} +0 -0
  170. /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-c17efc84c54e4fdb.js → messaging-5094ffea13f32ed9.js} +0 -0
  171. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-74348d35e92a2a3c.js → ant-components-5c08e8447c45ce44.js} +0 -0
  172. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-ac613f99cd57d7b3.js → AntForm-06ad5f34585480aa.js} +0 -0
  173. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-44605674baae28e2.js → FormikAntFormItem-6f071c2bc9446cb0.js} +0 -0
  174. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-86761304f1da7172.js → FormikControlled-efcc38c58991ac9e.js} +0 -0
  175. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-fadf4e866aa8ea22.js → FormikField-430ba5c979abfb7c.js} +0 -0
  176. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-be9bc54243141257.js → forms-5c561880bf131afb.js} +0 -0
  177. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-69a9e346e32fde53.js → table-migration-69ad86b7a8a9a115.js} +0 -0
  178. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-3062ca1a95ede1a3.js → messaging-10ce53ea356f8bad.js} +0 -0
  179. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-a67feed389719f52.js → storage-5501bbb129fee9c4.js} +0 -0
  180. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-6935d3c1655ecbbe.js → configure-d888a69a3bbe040e.js} +0 -0
  181. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-3a7b2edeb6f6c7a2.js → [id]-d3d8e3d7583ec635.js} +0 -0
  182. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-971657cbd5e5490f.js → add-property-1af10ed303815d46.js} +0 -0
  183. /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-be3668cbd03e086e.js → properties-cebc0dc186be499a.js} +0 -0
  184. /fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-218f88a99e7f0c04.js → datamap-e130c0197362e8f3.js} +0 -0
  185. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-fb0c7974234d93ee.js → alpha-5e1322de868d615e.js} +0 -0
  186. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-a91bf9cf821bcdcb.js → about-241f95e372b65d0f.js} +0 -0
  187. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-738e9c5dd7a4d8f5.js → [purpose_id]-fc201657f4a782c7.js} +0 -0
  188. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-d0c5a07b57b6adae.js → consent-c2d39cba8396ef3a.js} +0 -0
  189. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-7945aad419e1ba8b.js → custom-fields-d992103cc55901ae.js} +0 -0
  190. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-9455a95901d7d223.js → domain-records-41242f805599feda.js} +0 -0
  191. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-57fd9412882c4ab2.js → domains-2e885f74c92f669c.js} +0 -0
  192. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-63a5da14576722a4.js → email-templates-ff112655ad5f41e5.js} +0 -0
  193. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-694ae08fdc73b92b.js → locations-023e1895552817de.js} +0 -0
  194. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-26db0a2e4ffe2892.js → organization-ac403c0886b20e20.js} +0 -0
  195. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-c304e080c391f254.js → regulations-86062a18e081a52a.js} +0 -0
  196. /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-ec7efe4e1f09ecb7.js → test-datasets-7a3396ac819c7904.js} +0 -0
  197. /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-25589319be47ee83.js → [id]-8314a819837f5b2a.js} +0 -0
  198. /fides/ui-build/static/admin/_next/static/chunks/pages/{systems-8045ae1289ef8ebc.js → systems-21f423a7c417aa9d.js} +0 -0
  199. /fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-0d17e0de9adb27f8.js → taxonomy-6387fcc8cce872eb.js} +0 -0
  200. /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-fe32284ce419e921.js → [id]-ff5738706da07801.js} +0 -0
  201. /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-9c8200fc2f8b9346.js → user-management-173ac3a1ed2b05a6.js} +0 -0
  202. /fides/ui-build/static/admin/_next/static/chunks/{webpack-c97e8d65bd9739ff.js → webpack-ff0cd6bff75588da.js} +0 -0
  203. /fides/ui-build/static/admin/_next/static/{UZLS8hRH8R50kojeaBV1Y → t-DtndYMbhjqqd1SOdd0Y}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- class zt{eventName;listenerId;data;pingData;constructor(e,t,n,i){this.eventName=e,this.listenerId=t,this.data=n,this.pingData=i}}class Nt{gppVersion;cmpStatus;cmpDisplayStatus;signalStatus;supportedAPIs;cmpId;sectionList;applicableSections;gppString;parsedSections;constructor(e){this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}let it=class{callback;parameter;success=!0;cmpApiContext;constructor(e,t,n){this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:n})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},pn=class extends it{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new zt("listenerRegistered",e,!0,new Nt(this.cmpApiContext));this.invokeCallback(t)}},_n=class extends it{respond(){let e=new Nt(this.cmpApiContext);this.invokeCallback(e)}};class hn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],n=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,n);this.invokeCallback(i)}}class gn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class Tn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var Le;(function(s){s.ADD_EVENT_LISTENER="addEventListener",s.GET_FIELD="getField",s.GET_SECTION="getSection",s.HAS_SECTION="hasSection",s.PING="ping",s.REMOVE_EVENT_LISTENER="removeEventListener"})(Le||(Le={}));let In=class extends it{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),n=new zt("listenerRemoved",e,t,new Nt(this.cmpApiContext));this.invokeCallback(n)}},as=class{static[Le.ADD_EVENT_LISTENER]=pn;static[Le.GET_FIELD]=hn;static[Le.GET_SECTION]=gn;static[Le.HAS_SECTION]=Tn;static[Le.PING]=_n;static[Le.REMOVE_EVENT_LISTENER]=In};var rt;(function(s){s.STUB="stub",s.LOADING="loading",s.LOADED="loaded",s.ERROR="error"})(rt||(rt={}));var je;(function(s){s.VISIBLE="visible",s.HIDDEN="hidden",s.DISABLED="disabled"})(je||(je={}));var ls;(function(s){s.GPP_LOADED="gpploaded",s.CMP_UI_SHOWN="cmpuishown",s.USER_ACTION_COMPLETE="useractioncomplete"})(ls||(ls={}));var Ve;(function(s){s.NOT_READY="not ready",s.READY="ready"})(Ve||(Ve={}));class On{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let n=Le.ADD_EVENT_LISTENER;if(t?.[n])throw new Error(`Built-In Custom Commmand for ${n} not allowed`);if(n=Le.REMOVE_EVENT_LISTENER,t?.[n])throw new Error(`Built-In Custom Commmand for ${n} 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,n,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,n):this.isBuiltInCommand(e)?new as[e](this.cmpApiContext,t,n).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 as[e]!==void 0}}let Nn=class{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let n=window.__gpp("events")||[];for(var t=0;t<n.length;t++){let i=n[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(n){console.log(n)}}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((n,i)=>{let r=new zt(e,i,t,new Nt(this.cmpApiContext));n.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class St 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 n=this.segments[t];if(n.getFieldNames().includes(e))return n.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 n=this.segments[t];if(n.hasField(e))return n.getFieldValue(e)}throw new St("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let n=0;n<this.segments.length;n++){let i=this.segments[n];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new St("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let n=this.segments[t].toObj();for(const[i,r]of Object.entries(n))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 _=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Ie=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class D{static encode(e,t){let n=[];if(e>=1)for(n.push(1);e>=n[0]*2;)n.unshift(n[0]*2);let i="";for(let r=0;r<n.length;r++){let o=n[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new Ie("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 _("Undecodable FixedInteger '"+e+"'");let t=0,n=[];for(let i=0;i<e.length;i++)i===0?n[e.length-(i+1)]=1:n[e.length-(i+1)]=n[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=n[i]);return t}}class It{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 Ie("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",n=0;for(;n<=e.length-6;){let i=e.substring(n,n+6);try{let r=D.decode(i),o=It.DICT.charAt(r);t+=o,n+=6}catch{throw new Ie("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new _("Undecodable Base64URL string '"+e+"'");let t="";for(let n=0;n<e.length;n++){let i=e.charAt(n),r=It.REVERSE_DICT.get(i),o=D.encode(r,6);t+=o}return t}}class x extends It{static instance=new x;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class f{static instance=new f;constructor(){}static getInstance(){return this.instance}encode(e,t){let n="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);n+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return n}decode(e,t,n){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(n.containsKey(o)){let a=n.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 _("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class ot{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let n="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(n="1"+n,e-=r):n="0"+n}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new _("Undecodable FibonacciInteger '"+e+"'");let t=0,n=[];for(let i=0;i<e.length-1;i++)i===0?n.push(1):i===1?n.push(2):n.push(n[i-1]+n[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=n[i]);return t}}let at=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Ie("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new _("Undecodable Boolean '"+e+"'")}};class cs{static encode(e){e=e.sort((o,a)=>o-a);let t=[],n=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=D.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-n;n=t[o][0],r+="0"+ot.encode(a)}else{let a=t[o][0]-n;n=t[o][0];let l=t[o][t[o].length-1]-n;n=t[o][t[o].length-1],r+="1"+ot.encode(a)+ot.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new _("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],n=D.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<n;o++){let a=at.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),d=ot.decode(e.substring(r,l+2))+i;i=d,r=l+2,l=e.indexOf("11",r);let u=ot.decode(e.substring(r,l+2))+i;i=u,r=l+2;for(let p=d;p<=u;p++)t.push(p)}else{let l=e.indexOf("11",r),d=ot.decode(e.substring(r,l+2))+i;i=d,t.push(d),r=l+2}}return t}}class An extends Error{constructor(e){super(e),this.name="ValidationError"}}class Me{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 An("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class Re extends _{constructor(e){super(e),this.name="SubstringError"}}class ee{static substring(e,t,n){if(n>e.length||t<0||t>n)throw new Re("Invalid substring indexes "+t+":"+n+" for string of length "+e.length);return e.substring(t,n)}}class fn extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return cs.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=cs.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{let n=D.decode(ee.substring(e,t,t+12)),i=t+12;for(let r=0;r<n;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(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class c extends Me{bitStringLength;constructor(e,t,n=!0){super(n),this.bitStringLength=e,this.setValue(t)}encode(){try{return D.encode(this.value,this.bitStringLength)}catch(e){throw new Ie(e)}}decode(e){try{this.value=D.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.bitStringLength)}catch(n){throw new Re(n)}}}class w{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,n)=>{this.fields.set(n,t)})}}var Fe;(function(s){s.ID="Id",s.VERSION="Version",s.SECTION_IDS="SectionIds"})(Fe||(Fe={}));const Cn=[Fe.ID,Fe.VERSION,Fe.SECTION_IDS];class C{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new St("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 St(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let n=0;n<t.length;n++){let i=t[n],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Pn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Cn}initializeFields(){let e=new w;return e.put(Fe.ID.toString(),new c(6,ve.ID)),e.put(Fe.VERSION.toString(),new c(6,ve.VERSION)),e.put(Fe.SECTION_IDS.toString(),new fn([])),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class ve extends Z{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ve.ID}getName(){return ve.NAME}getVersion(){return ve.VERSION}initializeSegments(){let e=[];return e.push(new Pn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var h;(function(s){s.VERSION="Version",s.CREATED="Created",s.LAST_UPDATED="LastUpdated",s.CMP_ID="CmpId",s.CMP_VERSION="CmpVersion",s.CONSENT_SCREEN="ConsentScreen",s.CONSENT_LANGUAGE="ConsentLanguage",s.VENDOR_LIST_VERSION="VendorListVersion",s.POLICY_VERSION="PolicyVersion",s.IS_SERVICE_SPECIFIC="IsServiceSpecific",s.USE_NON_STANDARD_STACKS="UseNonStandardStacks",s.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",s.PURPOSE_CONSENTS="PurposeConsents",s.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",s.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",s.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",s.VENDOR_CONSENTS="VendorConsents",s.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",s.PUBLISHER_RESTRICTIONS="PublisherRestrictions",s.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",s.PUBLISHER_CONSENTS="PublisherConsents",s.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",s.NUM_CUSTOM_PURPOSES="NumCustomPurposes",s.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",s.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",s.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",s.VENDORS_ALLOWED="VendorsAllowed",s.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",s.VENDORS_DISCLOSED="VendorsDisclosed"})(h||(h={}));const wn=[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],Dn=[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],mn=[h.VENDORS_ALLOWED_SEGMENT_TYPE,h.VENDORS_ALLOWED],Rn=[h.VENDORS_DISCLOSED_SEGMENT_TYPE,h.VENDORS_DISCLOSED];class st extends It{static instance=new st;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class lt{static encode(e){e.sort((r,o)=>r-o);let t=[],n=0;for(;n<e.length;){let r=n;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(n,r+1)),n=r+1}let i=D.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+D.encode(t[r][0],16):i+="1"+D.encode(t[r][0],16)+D.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new _("Undecodable FixedIntegerRange '"+e+"'");let t=[],n=D.decode(e.substring(0,12)),i=12;for(let r=0;r<n;r++){let o=at.decode(e.substring(i,i+1));if(i++,o===!0){let a=D.decode(e.substring(i,i+16));i+=16;let l=D.decode(e.substring(i,i+16));i+=16;for(let d=a;d<=l;d++)t.push(d)}else{let a=D.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Wt extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return lt.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=lt.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{let n=D.decode(ee.substring(e,t,t+12)),i=t+12;for(let r=0;r<n;r++)e.charAt(i)==="1"?i+=33:i+=17;return ee.substring(e,t,i)}catch(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class Vn{key;type;ids;constructor(e,t,n){this.key=e,this.type=t,this.ids=n}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 ds extends Me{keyBitStringLength;typeBitStringLength;constructor(e,t,n,i=!0){super(i),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(n)}encode(){try{let e=this.value,t="";t+=D.encode(e.length,12);for(let n=0;n<e.length;n++){let i=e[n];t+=D.encode(i.getKey(),this.keyBitStringLength),t+=D.encode(i.getType(),this.typeBitStringLength),t+=lt.encode(i.getIds())}return t}catch(e){throw new Ie(e)}}decode(e){try{let t=[],n=D.decode(ee.substring(e,0,12)),i=12;for(let r=0;r<n;r++){let o=D.decode(ee.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=D.decode(ee.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Wt([]).substring(e,i),d=lt.decode(l);i+=l.length,t.push(new Vn(o,a,d))}this.value=t}catch(t){throw new _(t)}}substring(e,t){try{let n="";n+=ee.substring(e,t,t+12);let i=D.decode(n.toString()),r=t+n.length;for(let o=0;o<i;o++){let a=ee.substring(e,r,r+this.keyBitStringLength);r+=a.length,n+=a;let l=ee.substring(e,r,r+this.typeBitStringLength);r+=l.length,n+=l;let d=new Wt([]).substring(e,r);r+=d.length,n+=d}return n}catch(n){throw new Re(n)}}}class k extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+1)}catch(n){throw new Re(n)}}}class Es{static encode(e){return e?D.encode(Math.round(e.getTime()/100),36):D.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new _("Undecodable Datetime '"+e+"'");return new Date(D.decode(e)*100)}}class At extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Es.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=Es.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+36)}catch(n){throw new Re(n)}}}class ct{static encode(e,t){if(e.length>t)throw new Ie("Too many values '"+e.length+"'");let n="";for(let i=0;i<e.length;i++)n+=at.encode(e[i]);for(;n.length<t;)n+="0";return n}static decode(e){if(!/^[0-1]*$/.test(e))throw new _("Undecodable FixedBitfield '"+e+"'");let t=[];for(let n=0;n<e.length;n++)t.push(at.decode(e.substring(n,n+1)));return t}}class Ge extends Me{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new Ie(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.numElements)}catch(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let n=t.length;n<this.numElements;n++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class us{static encode(e,t){for(;e.length<t;)e+=" ";let n="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)n+=D.encode(63,6);else if(r>=65)n+=D.encode(e.charCodeAt(i)-65,6);else throw new Ie("Unencodable FixedString '"+e+"'")}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new _("Undecodable FixedString '"+e+"'");let t="";for(let n=0;n<e.length;n+=6){let i=D.decode(e.substring(n,n+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class Qt extends Me{stringLength;constructor(e,t,n=!0){super(n),this.stringLength=e,this.setValue(t)}encode(){try{return us.encode(this.value,this.stringLength)}catch(e){throw new Ie(e)}}decode(e){try{this.value=us.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.stringLength*6)}catch(n){throw new Re(n)}}}class Xe extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=lt.encode(this.value),n=t.length,i=e;if(n<=i)return D.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return D.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new Ie(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=lt.decode(e.substring(17));else{let t=[],n=ct.decode(e.substring(17));for(let i=0;i<n.length;i++)n[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new _(t)}}substring(e,t){try{let n=D.decode(ee.substring(e,t,t+16));return e.charAt(t+16)==="1"?ee.substring(e,t,t+17)+new Wt([]).substring(e,t+17):ee.substring(e,t,t+17+n)}catch(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class Mn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}initializeFields(){let e=new Date,t=new w;return t.put(h.VERSION.toString(),new c(6,j.VERSION)),t.put(h.CREATED.toString(),new At(e)),t.put(h.LAST_UPDATED.toString(),new At(e)),t.put(h.CMP_ID.toString(),new c(12,0)),t.put(h.CMP_VERSION.toString(),new c(12,0)),t.put(h.CONSENT_SCREEN.toString(),new c(6,0)),t.put(h.CONSENT_LANGUAGE.toString(),new Qt(2,"EN")),t.put(h.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(h.POLICY_VERSION.toString(),new c(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 Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_CONSENTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_ONE_TREATMENT.toString(),new k(!1)),t.put(h.PUBLISHER_COUNTRY_CODE.toString(),new Qt(2,"AA")),t.put(h.VENDOR_CONSENTS.toString(),new Xe([])),t.put(h.VENDOR_LEGITIMATE_INTERESTS.toString(),new Xe([])),t.put(h.PUBLISHER_RESTRICTIONS.toString(),new ds(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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class ft extends Me{getLength;constructor(e,t,n=!0){super(n),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new Ie(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.getLength())}catch(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),n=[...e];for(let i=n.length;i<t;i++)n.push(!1);n.length>t&&(n=n.slice(0,t)),super.setValue([...n])}}class bn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Dn}initializeFields(){let e=new w;e.put(h.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(h.PUBLISHER_CONSENTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(h.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(h.NUM_CUSTOM_PURPOSES.toString(),t),e.put(h.PUBLISHER_CUSTOM_CONSENTS.toString(),new ft(()=>t.getValue(),[])),e.put(h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new ft(()=>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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class vn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mn}initializeFields(){let e=new w;return e.put(h.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(h.VENDORS_ALLOWED.toString(),new Xe([])),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Ln extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Rn}initializeFields(){let e=new w;return e.put(h.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(h.VENDORS_DISCLOSED.toString(),new Xe([])),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class j extends Z{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return j.ID}getName(){return j.NAME}getVersion(){return j.VERSION}initializeSegments(){let e=[];return e.push(new Mn),e.push(new bn),e.push(new vn),e.push(new Ln),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<n.length;i++){let r=n[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(n[i]);else if(o>="I"&&o<="P")t[3].decode(n[i]);else if(o>="Q"&&o<="X")t[2].decode(n[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(n[i]);else throw new _("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 n=new Date;super.setFieldValue(h.CREATED,n),super.setFieldValue(h.LAST_UPDATED,n)}}}var I;(function(s){s.VERSION="Version",s.CREATED="Created",s.LAST_UPDATED="LastUpdated",s.CMP_ID="CmpId",s.CMP_VERSION="CmpVersion",s.CONSENT_SCREEN="ConsentScreen",s.CONSENT_LANGUAGE="ConsentLanguage",s.VENDOR_LIST_VERSION="VendorListVersion",s.TCF_POLICY_VERSION="TcfPolicyVersion",s.USE_NON_STANDARD_STACKS="UseNonStandardStacks",s.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",s.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",s.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",s.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",s.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",s.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",s.PUB_RESTRICTIONS="PubRestrictions",s.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",s.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",s.NUM_CUSTOM_PURPOSES="NumCustomPurposes",s.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",s.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",s.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",s.DISCLOSED_VENDORS="DisclosedVendors"})(I||(I={}));const Gn=[I.VERSION,I.CREATED,I.LAST_UPDATED,I.CMP_ID,I.CMP_VERSION,I.CONSENT_SCREEN,I.CONSENT_LANGUAGE,I.VENDOR_LIST_VERSION,I.TCF_POLICY_VERSION,I.USE_NON_STANDARD_STACKS,I.SPECIAL_FEATURE_EXPRESS_CONSENT,I.PURPOSES_EXPRESS_CONSENT,I.PURPOSES_IMPLIED_CONSENT,I.VENDOR_EXPRESS_CONSENT,I.VENDOR_IMPLIED_CONSENT,I.PUB_RESTRICTIONS],yn=[I.PUB_PURPOSES_SEGMENT_TYPE,I.PUB_PURPOSES_EXPRESS_CONSENT,I.PUB_PURPOSES_IMPLIED_CONSENT,I.NUM_CUSTOM_PURPOSES,I.CUSTOM_PURPOSES_EXPRESS_CONSENT,I.CUSTOM_PURPOSES_IMPLIED_CONSENT],Un=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class xn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}initializeFields(){let e=new Date,t=new w;return t.put(I.VERSION.toString(),new c(6,Ce.VERSION)),t.put(I.CREATED.toString(),new At(e)),t.put(I.LAST_UPDATED.toString(),new At(e)),t.put(I.CMP_ID.toString(),new c(12,0)),t.put(I.CMP_VERSION.toString(),new c(12,0)),t.put(I.CONSENT_SCREEN.toString(),new c(6,0)),t.put(I.CONSENT_LANGUAGE.toString(),new Qt(2,"EN")),t.put(I.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(I.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(I.USE_NON_STANDARD_STACKS.toString(),new k(!1)),t.put(I.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_IMPLIED_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.VENDOR_EXPRESS_CONSENT.toString(),new Xe([])),t.put(I.VENDOR_IMPLIED_CONSENT.toString(),new Xe([])),t.put(I.PUB_RESTRICTIONS.toString(),new ds(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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class Fn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new w;e.put(I.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(I.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(I.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(I.NUM_CUSTOM_PURPOSES.toString(),t),e.put(I.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new ft(()=>t.getValue(),[])),e.put(I.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new ft(()=>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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Bn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Un}initializeFields(){let e=new w;return e.put(I.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(I.DISCLOSED_VENDORS.toString(),new Xe([])),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ce extends Z{static ID=5;static VERSION=1;static NAME="tcfcav1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ce.ID}getName(){return Ce.NAME}getVersion(){return Ce.VERSION}initializeSegments(){let e=[];return e.push(new xn),e.push(new Fn),e.push(new Bn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<n.length;i++){let r=n[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(n[i]);else if(o>="I"&&o<="P")t[2].decode(n[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(n[i]);else throw new _("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 n=new Date;super.setFieldValue(I.CREATED,n),super.setFieldValue(I.LAST_UPDATED,n)}}}class Jt{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(n){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class Hn{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(n){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}class kn{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,n)=>{this.fields.set(n,t)})}}var Oe;(function(s){s.VERSION="Version",s.NOTICE="Notice",s.OPT_OUT_SALE="OptOutSale",s.LSPA_COVERED="LspaCovered"})(Oe||(Oe={}));const Kn=[Oe.VERSION,Oe.NOTICE,Oe.OPT_OUT_SALE,Oe.LSPA_COVERED];class $n extends C{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Kn}initializeFields(){const e=new class{test(n){return n==="-"||n==="Y"||n==="N"}};let t=new kn;return t.put(Oe.VERSION,new Hn(Pe.VERSION)),t.put(Oe.NOTICE,new Jt("-",e)),t.put(Oe.OPT_OUT_SALE,new Jt("-",e)),t.put(Oe.LSPA_COVERED,new Jt("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Oe.VERSION).getValue(),t+=e.get(Oe.NOTICE).getValue(),t+=e.get(Oe.OPT_OUT_SALE).getValue(),t+=e.get(Oe.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new _("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Oe.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Oe.NOTICE).setValue(e.charAt(1)),t.get(Oe.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Oe.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new _("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Pe extends Z{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pe.ID}getName(){return Pe.NAME}getVersion(){return Pe.VERSION}initializeSegments(){let e=[];return e.push(new $n),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var N;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",s.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",s.SALE_OPT_OUT="SaleOptOut",s.SHARING_OPT_OUT="SharingOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.PERSONAL_DATA_CONSENTS="PersonalDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(N||(N={}));const jn=[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 Ss{static encode(e,t,n){if(e.length>n)throw new Ie("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=D.encode(e[r],t);for(;i.length<t*n;)i+="0";return i}static decode(e,t,n){if(!/^[0-1]*$/.test(e))throw new _("Undecodable FixedInteger '"+e+"'");if(e.length>t*n)throw new _("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new _("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*n;)e+="0";e.length>t*n&&(e=e.substring(0,t*n));let i=[];for(let r=0;r<e.length;r+=t)i.push(D.decode(e.substring(r,r+t)));for(;i.length<n;)i.push(0);return i}}class W extends Me{elementBitStringLength;numElements;constructor(e,t,n=!0){super(n),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return Ss.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Ie(e)}}decode(e){try{this.value=Ss.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let n=t.length;n<this.numElements;n++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class zn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.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}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(N.VERSION.toString(),new c(6,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 W(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);n.length==66&&(n=n.substring(0,48)+"00000000"+n.substring(48,52)+"00"+n.substring(52,62)),this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNatCoreSegment '"+e+"'")}}}class Wn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yn}initializeFields(){let e=new w;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new k(!0)),e.put(N.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 zn),e.push(new Wn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(N.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var m;(function(s){s.VERSION="Version",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",s.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",s.SALE_OPT_OUT="SaleOptOut",s.SHARING_OPT_OUT="SharingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.PERSONAL_DATA_CONSENTS="PersonalDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(m||(m={}));const Qn=[m.VERSION,m.SALE_OPT_OUT_NOTICE,m.SHARING_OPT_OUT_NOTICE,m.SENSITIVE_DATA_LIMIT_USE_NOTICE,m.SALE_OPT_OUT,m.SHARING_OPT_OUT,m.SENSITIVE_DATA_PROCESSING,m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,m.PERSONAL_DATA_CONSENTS,m.MSPA_COVERED_TRANSACTION,m.MSPA_OPT_OUT_OPTION_MODE,m.MSPA_SERVICE_PROVIDER_MODE],Jn=[m.GPC_SEGMENT_TYPE,m.GPC];class qn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Qn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(m.VERSION.toString(),new c(6,ne.VERSION)),i.put(m.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0]).withValidator(n)),i.put(m.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(m.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCaCoreSegment '"+e+"'")}}}class Xn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Jn}initializeFields(){let e=new w;return e.put(m.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(m.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 qn),e.push(new Xn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(m.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var q;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(q||(q={}));const Zn=[q.VERSION,q.SHARING_NOTICE,q.SALE_OPT_OUT_NOTICE,q.TARGETED_ADVERTISING_OPT_OUT_NOTICE,q.SALE_OPT_OUT,q.TARGETED_ADVERTISING_OPT_OUT,q.SENSITIVE_DATA_PROCESSING,q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,q.MSPA_COVERED_TRANSACTION,q.MSPA_OPT_OUT_OPTION_MODE,q.MSPA_SERVICE_PROVIDER_MODE];class ei extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Zn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(q.VERSION.toString(),new c(6,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 W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var F;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(F||(F={}));const ti=[F.VERSION,F.SHARING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],si=[F.GPC_SEGMENT_TYPE,F.GPC];class ni extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ti}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(F.VERSION.toString(),new c(6,re.VERSION)),i.put(F.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0]).withValidator(n)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCoCoreSegment '"+e+"'")}}}class ii extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return si}initializeFields(){let e=new w;return e.put(F.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 ni),e.push(new ii),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(F.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var K;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(K||(K={}));const ri=[K.VERSION,K.SHARING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_OPT_OUT_NOTICE,K.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,K.SALE_OPT_OUT,K.TARGETED_ADVERTISING_OPT_OUT,K.SENSITIVE_DATA_PROCESSING,K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,K.MSPA_COVERED_TRANSACTION,K.MSPA_OPT_OUT_OPTION_MODE,K.MSPA_SERVICE_PROVIDER_MODE];class oi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ri}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(K.VERSION.toString(),new c(6,oe.VERSION)),i.put(K.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var B;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(B||(B={}));const ai=[B.VERSION,B.SHARING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],li=[B.GPC_SEGMENT_TYPE,B.GPC];class ci extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.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}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(B.VERSION.toString(),new c(6,ae.VERSION)),i.put(B.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCtCoreSegment '"+e+"'")}}}class di extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return li}initializeFields(){let e=new w;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 ci),e.push(new di),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 $;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})($||($={}));const Ei=[$.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];class ui extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.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}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put($.VERSION.toString(),new c(6,le.VERSION)),i.put($.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),i.put($.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put($.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 ui),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var R;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(R||(R={}));const Si=[R.VERSION,R.SHARING_NOTICE,R.SALE_OPT_OUT_NOTICE,R.TARGETED_ADVERTISING_OPT_OUT_NOTICE,R.SALE_OPT_OUT,R.TARGETED_ADVERTISING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.ADDITIONAL_DATA_PROCESSING_CONSENT,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],pi=[R.GPC_SEGMENT_TYPE,R.GPC];class _i extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(R.VERSION.toString(),new c(6,ce.VERSION)),i.put(R.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),i.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsMtCoreSegment '"+e+"'")}}}class hi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return pi}initializeFields(){let e=new w;return e.put(R.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 _i),e.push(new hi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var V;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(V||(V={}));const gi=[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],Ti=[V.GPC_SEGMENT_TYPE,V.GPC];class Ii extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(V.VERSION.toString(),new c(6,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 W(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsOrCoreSegment '"+e+"'")}}}class Oi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ti}initializeFields(){let e=new w;return e.put(V.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new k(!0)),e.put(V.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Ii),e.push(new Oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 M;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(M||(M={}));const Ni=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.ADDITIONAL_DATA_PROCESSING_CONSENT,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],Ai=[M.GPC_SEGMENT_TYPE,M.GPC];class fi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.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}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(M.VERSION.toString(),new c(6,Ee.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ci extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ai}initializeFields(){let e=new w;return e.put(M.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 fi),e.push(new Ci),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var b;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(b||(b={}));const Pi=[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],wi=[b.GPC_SEGMENT_TYPE,b.GPC];class Di extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(b.VERSION.toString(),new c(6,ue.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 W(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsDeCoreSegment '"+e+"'")}}}class mi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wi}initializeFields(){let e=new w;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Di),e.push(new mi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 v;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(v||(v={}));const Ri=[v.VERSION,v.PROCESSING_NOTICE,v.SALE_OPT_OUT_NOTICE,v.TARGETED_ADVERTISING_OPT_OUT_NOTICE,v.SENSITIVE_DATA_OPT_OUT_NOTICE,v.SALE_OPT_OUT,v.TARGETED_ADVERTISING_OPT_OUT,v.SENSITIVE_DATA_PROCESSING,v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,v.MSPA_COVERED_TRANSACTION,v.MSPA_OPT_OUT_OPTION_MODE,v.MSPA_SERVICE_PROVIDER_MODE],Vi=[v.GPC_SEGMENT_TYPE,v.GPC];class Mi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ri}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(v.VERSION.toString(),new c(6,Se.VERSION)),i.put(v.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsIaCoreSegment '"+e+"'")}}}class bi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}initializeFields(){let e=new w;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new k(!0)),e.put(v.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Mi),e.push(new bi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 L;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(L||(L={}));const vi=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],Li=[L.GPC_SEGMENT_TYPE,L.GPC];class Gi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return vi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(L.VERSION.toString(),new c(6,pe.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNeCoreSegment '"+e+"'")}}}class yi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Li}initializeFields(){let e=new w;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Gi),e.push(new yi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var G;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(G||(G={}));const Ui=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.ADDITIONAL_DATA_PROCESSING_CONSENT,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],xi=[G.GPC_SEGMENT_TYPE,G.GPC];class Fi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ui}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(G.VERSION.toString(),new c(6,_e.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Bi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return xi}initializeFields(){let e=new w;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Fi),e.push(new Bi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(y||(y={}));const Hi=[y.VERSION,y.PROCESSING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],ki=[y.GPC_SEGMENT_TYPE,y.GPC];class Ki extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(y.VERSION.toString(),new c(6,he.VERSION)),i.put(y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNjCoreSegment '"+e+"'")}}}class $i extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ki}initializeFields(){let e=new w;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Ki),e.push(new $i),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(U||(U={}));const ji=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.ADDITIONAL_DATA_PROCESSING_CONSENT,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],Yi=[U.GPC_SEGMENT_TYPE,U.GPC];class zi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ji}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(U.VERSION.toString(),new c(6,ge.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTnCoreSegment '"+e+"'")}}}class Wi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yi}initializeFields(){let e=new w;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 zi),e.push(new Wi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(U.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class te{static SECTION_ID_NAME_MAP=new Map([[j.ID,j.NAME],[Ce.ID,Ce.NAME],[Pe.ID,Pe.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=[j.NAME,Ce.NAME,Pe.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 ps{sections=new Map;encodedString=null;decoded=!0;dirty=!1;constructor(e){e&&this.decode(e)}setFieldValue(e,t,n){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===j.NAME?(i=new j,this.sections.set(j.NAME,i)):e===Pe.NAME?(i=new Pe,this.sections.set(Pe.NAME,i)):e===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,n),this.dirty=!0,i.setIsDirty(!0);else throw new St(e+"."+t+" not found")}setFieldValueBySectionId(e,t,n){this.setFieldValue(te.SECTION_ID_NAME_MAP.get(e),t,n)}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 ve;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 n=te.SECTION_ORDER[t];if(this.sections.has(n)){let i=this.sections.get(n);e.push(i.getId())}}return e}encodeModel(e){let t=[],n=[];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()),n.push(a.getId())}}let i=new ve;return i.setFieldValue("SectionIds",n),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),n=new Map;if(t[0].startsWith("D")){let r=new ve(t[0]).getFieldValue("SectionIds");if(r.length!==t.length-1)throw new _("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 _("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Ce.ID){let l=new Ce(t[o+1]);n.set(Ce.NAME,l)}else if(r[o]===j.ID){let l=new j(t[o+1]);n.set(j.NAME,l)}else if(r[o]===Pe.ID){let l=new Pe(t[o+1]);n.set(Pe.NAME,l)}else if(r[o]===X.ID){let l=new X(t[o+1]);n.set(X.NAME,l)}else if(r[o]===ne.ID){let l=new ne(t[o+1]);n.set(ne.NAME,l)}else if(r[o]===ie.ID){let l=new ie(t[o+1]);n.set(ie.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);n.set(re.NAME,l)}else if(r[o]===oe.ID){let l=new oe(t[o+1]);n.set(oe.NAME,l)}else if(r[o]===ae.ID){let l=new ae(t[o+1]);n.set(ae.NAME,l)}else if(r[o]===le.ID){let l=new le(t[o+1]);n.set(le.NAME,l)}else if(r[o]===ce.ID){let l=new ce(t[o+1]);n.set(ce.NAME,l)}else if(r[o]===de.ID){let l=new de(t[o+1]);n.set(de.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);n.set(Ee.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);n.set(ue.NAME,l)}else if(r[o]===Se.ID){let l=new Se(t[o+1]);n.set(Se.NAME,l)}else if(r[o]===pe.ID){let l=new pe(t[o+1]);n.set(pe.NAME,l)}else if(r[o]===_e.ID){let l=new _e(t[o+1]);n.set(_e.NAME,l)}else if(r[o]===he.ID){let l=new he(t[o+1]);n.set(he.NAME,l)}else if(r[o]===ge.ID){let l=new ge(t[o+1]);n.set(ge.NAME,l)}}}return n}else if(e.startsWith("C")){let t=new Map,n=new j(e);return t.set(j.NAME,n),new ve().setFieldValue(Fe.SECTION_IDS,[2]),t.set(ve.NAME,n),t}else throw new _("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 n=null;this.sections.has(e)?n=this.sections.get(e):e===Ce.NAME?(n=new Ce,this.sections.set(Ce.NAME,n)):e===j.NAME?(n=new j,this.sections.set(j.NAME,n)):e===Pe.NAME?(n=new Pe,this.sections.set(Pe.NAME,n)):e===X.NAME?(n=new X,this.sections.set(X.NAME,n)):e===ne.NAME?(n=new ne,this.sections.set(ne.NAME,n)):e===ie.NAME?(n=new ie,this.sections.set(ie.NAME,n)):e===re.NAME?(n=new re,this.sections.set(re.NAME,n)):e===oe.NAME?(n=new oe,this.sections.set(oe.NAME,n)):e===ae.NAME?(n=new ae,this.sections.set(ae.NAME,n)):e===le.NAME?(n=new le,this.sections.set(le.NAME,n)):e===ce.NAME?(n=new ce,this.sections.set(ce.NAME,n)):e===de.NAME?(n=new de,this.sections.set(de.NAME,n)):e===Ee.NAME?(n=new Ee,this.sections.set(Ee.NAME,n)):e===ue.NAME?(n=new ue,this.sections.set(ue.NAME,n)):e===Se.NAME?(n=new Se,this.sections.set(Se.NAME,n)):e===pe.NAME?(n=new pe,this.sections.set(pe.NAME,n)):e===_e.NAME?(n=new _e,this.sections.set(_e.NAME,n)):e===he.NAME?(n=new he,this.sections.set(he.NAME,n)):e===ge.NAME&&(n=new ge,this.sections.set(ge.NAME,n)),n&&(n.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 n=te.SECTION_ORDER[t];this.sections.has(n)&&(e[n]=this.sections.get(n).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Qi{gppVersion="1.1";supportedAPIs=[];eventQueue=new Nn(this);cmpStatus=rt.LOADING;cmpDisplayStatus=je.HIDDEN;signalStatus=Ve.NOT_READY;applicableSections=[];gppModel=new ps;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=rt.LOADING,this.cmpDisplayStatus=je.HIDDEN,this.signalStatus=Ve.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new ps,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class qt{static absCall(e,t,n,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"))},p=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=n,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=p,a.send(t)})}static post(e,t,n=!1,i=0){return this.absCall(e,JSON.stringify(t),n,i)}static fetch(e,t=!1,n=0){return this.absCall(e,null,t,n)}}let Ct=class extends Error{constructor(e){super(e),this.name="GVLError"}},Ji=class $t{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 $t.langSet.has(e)}forEach(e){$t.langSet.forEach(e)}get size(){return $t.langSet.size}},_s=class jt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Ji;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=jt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new jt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new Ct("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Ct("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 n=new jt;if(n.baseUrl=t,e.languageFilename?n.languageFilename=e.languageFilename:n.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));n.populate(await qt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;n.populate(await qt.fetch(r))}return n}async changeLanguage(e){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const n=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(await qt.fetch(n))}catch(i){throw new Ct("unable to load language: "+i.message)}}}else throw new Ct(`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,n)=>{const i=this.vendors[String(n)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(n)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(n)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(n)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(n)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(n)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(n)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(n)}),t[n]=i),t},{})}getFilteredVendors(e,t,n,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&n?o=this["by"+r+"VendorMap"][String(t)][n]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};class qi{callResponder;cmpApiContext;constructor(e,t,n){this.cmpApiContext=new Qi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new On(this.cmpApiContext,n)}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,n){this.cmpApiContext.gppModel.setFieldValue(e,t,n)}setFieldValueBySectionId(e,t,n){this.setFieldValue(te.SECTION_ID_NAME_MAP.get(e),t,n)}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 _s.fromVendorList(e)}async getGvlFromUrl(e){return _s.fromUrl(e)}}const Xi="en";var Zi=Object.defineProperty,er=(s,e,t)=>e in s?Zi(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Xt=(s,e,t)=>er(s,typeof e!="symbol"?e+"":e,t);class tr{constructor(e,t,n){Xt(this,"consentPreference"),Xt(this,"notice"),Xt(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=n}}var hs;(s=>{(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(s.IABTCFgdprApplies||(s.IABTCFgdprApplies={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(s.IABTCFPurposeOneTreatment||(s.IABTCFPurposeOneTreatment={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(s.IABTCFUseNonStandardTexts||(s.IABTCFUseNonStandardTexts={}))})(hs||(hs={}));var sr=(s=>(s.GPP_US_NATIONAL="gpp_us_national",s.GPP_US_STATE="gpp_us_state",s))(sr||{}),nr=(s=>(s.FRONTEND="frontend",s.SYSTEM_WIDE="system_wide",s.NOT_APPLICABLE="not_applicable",s))(nr||{}),Pt=(s=>(s.OPT_IN="opt_in",s.OPT_OUT="opt_out",s.NOTICE_ONLY="notice_only",s))(Pt||{}),De=(s=>(s.OPT_IN="opt_in",s.OPT_OUT="opt_out",s.ACKNOWLEDGE="acknowledge",s.NOT_APPLICABLE="not_applicable",s.TCF="tcf",s))(De||{}),wt=(s=>(s.OMIT="omit",s.INCLUDE="include",s))(wt||{}),pt=(s=>(s.BOOLEAN="boolean",s.CONSENT_MECHANISM="consent_mechanism",s))(pt||{}),Ze=(s=>(s.THROW="throw",s.WARN="warn",s.IGNORE="ignore",s))(Ze||{}),_t=(s=>(s.OVERLAY="overlay",s.BANNER_AND_MODAL="banner_and_modal",s.MODAL="modal",s.PRIVACY_CENTER="privacy_center",s.TCF_OVERLAY="tcf_overlay",s.HEADLESS="headless",s))(_t||{}),ir=(s=>(s.ALWAYS_ENABLED="always_enabled",s.ENABLED_WHERE_REQUIRED="enabled_where_required",s.ALWAYS_DISABLED="always_disabled",s))(ir||{}),rr=(s=>(s.OPTIONS="options",s.EXPERIENCE_TRANSLATION="language",s))(rr||{}),or=(s=>(s.PRIMARY="primary",s.SECONDARY="secondary",s.TERTIARY="tertiary",s))(or||{}),ar=(s=>(s.ACKNOWLEDGE="acknowledge",s.OPT_IN_OPT_OUT="opt_in_opt_out",s.OPT_IN_ONLY="opt_in_only",s))(ar||{}),lr=(s=>(s.REJECT_ALL="reject_all",s.REJECT_CONSENT_ONLY="reject_consent_only",s))(lr||{}),ye=(s=>(s.BUTTON="button",s.REJECT="reject",s.ACCEPT="accept",s.SCRIPT="script",s.SAVE="save",s.DISMISS="dismiss",s.GPC="gpc",s.INDIVIDUAL_NOTICE="individual_notice",s.ACKNOWLEDGE="acknowledge",s.OT_MIGRATION="ot_migration",s))(ye||{}),cr=(s=>(s.privacy_center="privacy_center",s.overlay="overlay",s.api="api",s))(cr||{}),dr=(s=>(s.NONE="none",s.APPLIED="applied",s.OVERRIDDEN="overridden",s))(dr||{}),Er=(s=>(s.OVERLAY="overlay",s.MODAL="modal",s.BANNER="banner",s.PRIVACY_CENTER="privacy_center",s.TCF_OVERLAY="tcf_overlay",s.TCF_BANNER="tcf_banner",s))(Er||{});const ur=(s,e)=>!!Object.keys(e).includes(s.notice_key),Zt=s=>!s||s===De.OPT_OUT?!1:s===De.OPT_IN?!0:s===De.ACKNOWLEDGE,Dt=(s,e)=>s?e===Pt.NOTICE_ONLY?De.ACKNOWLEDGE:De.OPT_IN:De.OPT_OUT,Sr=s=>typeof s=="string"?Zt(s):s,pr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var _r=Object.defineProperty,hr=Object.defineProperties,gr=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Ir=Object.prototype.propertyIsEnumerable,Ts=(s,e,t)=>e in s?_r(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,mt=(s,e)=>{for(var t in e||(e={}))Tr.call(e,t)&&Ts(s,t,e[t]);if(gs)for(var t of gs(e))Ir.call(e,t)&&Ts(s,t,e[t]);return s},Or=(s,e)=>hr(s,gr(e));const dt=s=>!s||typeof s!="object"?!1:Object.keys(s).length===0||"id"in s,Is=s=>!!(s&&s.every(e=>e.default_preference===De.OPT_IN)),Nr=s=>{if(s){if(s.location&&pr.test(s.location))return s.location.replace("-","_").toLowerCase();if(s.country&&s.region)return`${s.country.toLowerCase()}_${s.region.toLowerCase()}`}},Os=s=>s.fidesConsentOverride===ye.ACCEPT||s.fidesConsentOverride===ye.REJECT,Ar=(s,e,t,n)=>{var i,r,o,a,l,d;return n!=null&&n.fidesDisableBanner||!dt(s)?!1:((i=s.experience_config)==null?void 0:i.component)===_t.TCF_OVERLAY&&e?n&&Os(n)?!1:(r=s.meta)!=null&&r.version_hash?s.meta.version_hash!==e.tcf_version_hash:!0:((o=s.experience_config)==null?void 0:o.component)===_t.MODAL||((a=s.experience_config)==null?void 0:a.component)===_t.HEADLESS||!((l=s?.privacy_notices)!=null&&l.length)?!1:t?n&&Os(n)?!1:e?.fides_meta.consentMethod===ye.GPC?!0:!((d=s.privacy_notices)!=null&&d.every(u=>ur(u,t))):!0},fr=s=>{if(!s)return{};try{const e=atob(s),t=JSON.parse(e);return Object.fromEntries(Object.entries(t).map(([n,i])=>[n,!!i]))}catch(e){throw new Error("Failed to decode Notice Consent string:",{cause:e})}},Cr=({consent:s,nonApplicableNotices:e,flagType:t,mode:n=wt.OMIT})=>{if(!(e!=null&&e.length))return s;const i=mt({},s);return n===wt.INCLUDE?e.forEach(r=>{i[r]=t===pt.CONSENT_MECHANISM?De.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},Pr=({consent:s,flagType:e=pt.BOOLEAN,consentMechanisms:t})=>{const n={};if(e!==pt.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(s).map(([r,o])=>[r,Sr(o)]));const i=Object.values(s).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(s).forEach(r=>{const o=s[r];if(typeof o=="string")n[r]=o;else{const a=t[r];n[r]=Dt(o,a)}}),n):mt({},s)},Ns=(s,e,t=[],n,i)=>{var r,o,a;const l=mt({},s),d=(r=window.Fides)==null?void 0:r.options,u=(o=d?.fidesConsentNonApplicableFlagMode)!=null?o:wt.OMIT,p=(a=d?.fidesConsentFlagType)!=null?a:pt.BOOLEAN,E={};Object.assign(E,Cr({consent:{},nonApplicableNotices:e??[],flagType:p,mode:u}));const O=t.reduce((T,H)=>Or(mt({},T),{[H.notice_key]:H.consent_mechanism}),{});return Object.assign(E,Pr({consent:l,consentMechanisms:O,flagType:p})),E};var es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Rt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */Rt.exports,function(s,e){(function(t){var n=e,i=s&&s.exports==n&&s,r=typeof es=="object"&&es;(r.global===r||r.window===r)&&(t=r);var o=function(T){this.message=T};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(T){throw new o(T)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,u=function(T){T=String(T).replace(d,"");var H=T.length;H%4==0&&(T=T.replace(/==?$/,""),H=T.length),(H%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var Y=0,z,J,se="",we=-1;++we<H;)J=l.indexOf(T.charAt(we)),z=Y%4?z*64+J:J,Y++%4&&(se+=String.fromCharCode(255&z>>(-2*Y&6)));return se},p=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var H=T.length%3,Y="",z=-1,J,se,we,Te,nt=T.length-H;++z<nt;)J=T.charCodeAt(z)<<16,se=T.charCodeAt(++z)<<8,we=T.charCodeAt(++z),Te=J+se+we,Y+=l.charAt(Te>>18&63)+l.charAt(Te>>12&63)+l.charAt(Te>>6&63)+l.charAt(Te&63);return H==2?(J=T.charCodeAt(z)<<8,se=T.charCodeAt(++z),Te=J+se,Y+=l.charAt(Te>>10)+l.charAt(Te>>4&63)+l.charAt(Te<<2&63)+"="):H==1&&(Te=T.charCodeAt(z),Y+=l.charAt(Te>>2)+l.charAt(Te<<4&63)+"=="),Y},E={encode:p,decode:u,version:"1.0.0"};if(n&&!n.nodeType)if(i)i.exports=E;else for(var O in E)E.hasOwnProperty(O)&&(n[O]=E[O]);else t.base64=E})(es)}(Rt,Rt.exports);var As=Rt.exports;/*! js-cookie v3.0.5 | MIT */function Vt(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)s[n]=t[n]}return s}var wr={read:function(s){return s[0]==='"'&&(s=s.slice(1,-1)),s.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(s){return encodeURIComponent(s).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ts(s,e){function t(i,r,o){if(!(typeof document>"u")){o=Vt({},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+"="+s.write(r,i)+a}}function n(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]=s.read(d,u),i===u)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:n,remove:function(i,r){t(i,"",Vt({},r,{expires:-1}))},withAttributes:function(i){return ts(this.converter,Vt({},this.attributes,i))},withConverter:function(i){return ts(Vt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(s)}})}var Dr=ts(wr,{path:"/"});let Mt;const mr=new Uint8Array(16);function Rr(){if(!Mt&&(Mt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mt(mr)}const fe=[];for(let s=0;s<256;++s)fe.push((s+256).toString(16).slice(1));function Vr(s,e=0){return fe[s[e+0]]+fe[s[e+1]]+fe[s[e+2]]+fe[s[e+3]]+"-"+fe[s[e+4]]+fe[s[e+5]]+"-"+fe[s[e+6]]+fe[s[e+7]]+"-"+fe[s[e+8]]+fe[s[e+9]]+"-"+fe[s[e+10]]+fe[s[e+11]]+fe[s[e+12]]+fe[s[e+13]]+fe[s[e+14]]+fe[s[e+15]]}const Mr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var fs={randomUUID:Mr};function Cs(s,e,t){if(fs.randomUUID&&!s)return fs.randomUUID();s=s||{};const n=s.random||(s.rng||Rr)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Vr(n)}var br=(s=>(s.CONSENT="Consent",s.CONTRACT="Contract",s.LEGAL_OBLIGATIONS="Legal obligations",s.VITAL_INTERESTS="Vital interests",s.PUBLIC_INTEREST="Public interest",s.LEGITIMATE_INTERESTS="Legitimate interests",s))(br||{}),ss=(s=>(s.CONSENT="Consent",s.LEGITIMATE_INTERESTS="Legitimate interests",s))(ss||{});const ns=407,bt=",",vr=[{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"}],Lr=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];vr.filter(({experienceKey:s})=>s!=="tcf_features"&&s!=="tcf_special_purposes").map(s=>s.experienceKey),ss.CONSENT.toString(),ss.LEGITIMATE_INTERESTS.toString();const Gr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var yr=Object.defineProperty,Ur=Object.defineProperties,xr=Object.getOwnPropertyDescriptors,Ps=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,Br=Object.prototype.propertyIsEnumerable,ws=(s,e,t)=>e in s?yr(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Hr=(s,e)=>{for(var t in e||(e={}))Fr.call(e,t)&&ws(s,t,e[t]);if(Ps)for(var t of Ps(e))Br.call(e,t)&&ws(s,t,e[t]);return s},kr=(s,e)=>Ur(s,xr(e)),Kr=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Ds="fides_consent",$r=365,vt=Dr.withConverter({read(s){return decodeURIComponent(s)},write(s){return encodeURIComponent(s)}}),jr=()=>Cs();jr();const Yr=s=>vt.get(s),zr=()=>{const s=Yr(Ds);if(s)try{return JSON.parse(s)}catch{try{return JSON.parse(As.decode(s))}catch{return}}},ms=(s,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();s.fides_meta.updatedAt=t;let n=JSON.stringify(s);e&&(n=As.encode(n));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),vt.set(Ds,n,{path:"/",domain:r,expires:$r})){const a=zr();if(a&&a.fides_meta.updatedAt===s.fides_meta.updatedAt)break}},Wr=s=>{const e={};return Lr.forEach(({cookieKey:t})=>{var n;const i=(n=s[t])!=null?n:[];e[t]=Object.fromEntries(i.map(r=>[r.id,Zt(r.preference)]))}),e},Qr=(s,e=!0)=>{s.forEach(t=>{var n;if(vt.remove(t.name,{path:(n=t.path)!=null?n:"/",domain:t.domain}),e){const{hostname:i}=window.location;vt.remove(t.name,{domain:`.${i}`})}})},Jr=s=>{const e=new Map(s.map(({notice:t,consentPreference:n})=>[t.notice_key,Zt(n)]));return Object.fromEntries(e)},qr=(s,e)=>Kr(void 0,null,function*(){return kr(Hr({},s),{consent:Jr(e)})});var Xr=(s=>(s.GVL="gvl",s.AC="gacp",s))(Xr||{});const Ye=s=>{const e=s.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Lt=(s,e)=>{if(!(e!=null&&e.vendors))return;const{source:t,id:n}=Ye(s);if(t==="gvl"||t===void 0)return e.vendors[n]},Zr=s=>Ye(s).source==="gacp",eo=s=>{const{tcf_vendor_relationships:e=[]}=s;return e.map(t=>t.id).filter(t=>Lt(t,s.gvl)).map(t=>+Ye(t).id)},to=s=>{const e=[...s.tcf_vendor_consent_ids||[],...s.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>Lt(t,s.gvl)).map(t=>+Ye(t).id)},Rs=s=>{if(!s)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",n="",i=""]=s.split(bt);return e?{tc:e,ac:t,gpp:n,nc:i}:{tc:"",ac:"",gpp:n,nc:i}},Vs=s=>{var e;const t=s.getGppString();if(!t)return window.Fides.fides_string;const n=new Array(4).fill(""),i=(((e=window.Fides.fides_string)==null?void 0:e.split(bt))||[]).concat(n);return n.map((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},so=1,Gt={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}};var Be=(s=>(s.NATIONAL="national",s.STATE="state",s.ALL="all",s))(Be||{});function Et(s,e){return s.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function no(s){var e;if((e=s?.experience_config)!=null&&e.translations){const{translations:t}=s.experience_config,n=t.find(i=>i.is_default);return n?.language}}function io(s,e,t){if(!t||!t.translations)return null;if(s){const i=t.translations.find(r=>Et(r.language,s));if(i)return i}return t.translations.find(i=>Et(i.language,e))||t.translations[0]||null}function ro(s,e,t){if(!t||!t.translations)return null;if(s){const i=t.translations.find(r=>Et(r.language,s));if(i)return i}return t.translations.find(i=>Et(i.language,e))||t.translations[0]||null}var oo=Object.defineProperty,ao=Object.defineProperties,lo=Object.getOwnPropertyDescriptors,Ms=Object.getOwnPropertySymbols,co=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,bs=(s,e,t)=>e in s?oo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,vs=(s,e)=>{for(var t in e||(e={}))co.call(e,t)&&bs(s,t,e[t]);if(Ms)for(var t of Ms(e))Eo.call(e,t)&&bs(s,t,e[t]);return s},Ls=(s,e)=>ao(s,lo(e)),uo=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())}),So=(s=>(s.PRIVACY_EXPERIENCE="/privacy-experience",s.PRIVACY_PREFERENCES="/privacy-preferences",s.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",s.NOTICES_SERVED="/notices-served",s))(So||{});const po={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},_o="Fides.js",ho=(s,e,t,n,i)=>uo(void 0,null,function*(){var r;if((r=t.apiOptions)!=null&&r.savePreferencesFn){try{yield t.apiOptions.savePreferencesFn(s,n.consent,n.fides_string,i)}catch(l){return Promise.reject(l)}return Promise.resolve()}const o=Ls(vs({},po),{body:JSON.stringify(Ls(vs({},e),{source:_o}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var go=Object.defineProperty,To=Object.defineProperties,Io=Object.getOwnPropertyDescriptors,Gs=Object.getOwnPropertySymbols,Oo=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,ys=(s,e,t)=>e in s?go(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,yt=(s,e)=>{for(var t in e||(e={}))Oo.call(e,t)&&ys(s,t,e[t]);if(Gs)for(var t of Gs(e))No.call(e,t)&&ys(s,t,e[t]);return s},Us=(s,e)=>To(s,Io(e)),Ut=(s=>(s.FIDES="fides",s.EXTERNAL="external",s))(Ut||{}),Ao=(s=>(s.TOGGLE="toggle",s.BUTTON="button",s.LINK="link",s))(Ao||{});const xs=(s,e,t)=>{var n,i,r,o,a,l,d,u;const p=e?yt({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const E=yt({consentMethod:p?.fides_meta.consentMethod},t);(n=t?.trigger)!=null&&n.origin||(E.trigger=Us(yt({},E.trigger),{origin:"fides"}));const O=(i=performance?.mark)==null?void 0:i.call(performance,s),T=O?.startTime,H=p;H&&p!=null&&p.consent&&(H.consent=Ns(p.consent,(o=(r=window.Fides)==null?void 0:r.experience)==null?void 0:o.non_applicable_privacy_notices,(l=(a=window.Fides)==null?void 0:a.experience)==null?void 0:l.privacy_notices));const Y=new CustomEvent(s,{detail:Us(yt({},H),{debug:!!((u=(d=window.Fides)==null?void 0:d.options)!=null&&u.debug),extraDetails:E,timestamp:T}),bubbles:!0});window.dispatchEvent(Y)}};var fo=Object.defineProperty,Co=(s,e,t)=>e in s?fo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Po=(s,e,t)=>Co(s,e+"",t);class wo{constructor(){Po(this,"servedNoticeHistoryId",null)}getServedNoticeHistoryId(){return this.servedNoticeHistoryId||(this.servedNoticeHistoryId=Cs()),this.servedNoticeHistoryId}reset(){this.servedNoticeHistoryId=null}hasLifecycleId(){return this.servedNoticeHistoryId!==null}}const Do=new wo;var mo=Object.defineProperty,Ro=Object.defineProperties,Vo=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,Mo=Object.prototype.hasOwnProperty,bo=Object.prototype.propertyIsEnumerable,Bs=(s,e,t)=>e in s?mo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,He=(s,e)=>{for(var t in e||(e={}))Mo.call(e,t)&&Bs(s,t,e[t]);if(Fs)for(var t of Fs(e))bo.call(e,t)&&Bs(s,t,e[t]);return s},xt=(s,e)=>Ro(s,Vo(e)),is=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const vo=[ye.SCRIPT,ye.GPC,ye.OT_MIGRATION];function Lo(s,e,t,n,i,r,o,a,l){return is(this,null,function*(){const d=(r||[]).map(p=>({preference:p.consentPreference,privacy_notice_history_id:p.noticeHistoryId||""})),u=He({browser_identity:e.identity,preferences:d,privacy_experience_config_history_id:i,user_geography:a,method:n,served_notice_history_id:l,property_id:t.property_id},o??[]);yield ho(n,u,s,e,t)})}const Go=s=>is(void 0,[s],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:n,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:d,tcf:u,updateCookie:p}){var E,O,T,H,Y;if(!p&&e&&(p=we=>qr(we,e)),!p&&!e)throw new Error("updateCookie is required");const z=xt(He({},l?.trigger),{origin:((E=l?.trigger)==null?void 0:E.origin)||(vo.includes(i)?Ut.EXTERNAL:Ut.FIDES)}),J=yield p(a);Object.assign(a,J),Object.assign(a.fides_meta,{consentMethod:i}),xs("FidesUpdating",a,xt(He({},l),{trigger:z}));const se=Ns(a.consent,(T=(O=window.Fides)==null?void 0:O.experience)==null?void 0:T.non_applicable_privacy_notices,(Y=(H=window.Fides)==null?void 0:H.experience)==null?void 0:Y.privacy_notices);if(window.Fides.consent=se,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,ms(xt(He({},a),{consent:se}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield Lo(r,a,n,i,t,e,u,o,d)}catch{}e&&e.filter(we=>we.consentPreference===De.OPT_OUT).forEach(we=>{var Te,nt;(Te=we.notice)!=null&&Te.cookies&&Qr(we.notice.cookies,(nt=n.experience_config)==null?void 0:nt.auto_subdomain_cookie_deletion)}),xs("FidesUpdated",a,xt(He({},l),{trigger:z}))}),Hs=(s,e,t,n)=>Object.entries(t).reduce((i,[r,o])=>{if(i)return i;const a=e.find(u=>u===r);if(a&&!o&&n!==ye.OT_MIGRATION)return new Error(`Provided notice key '${r}' is not applicable to the current experience.`);const l=s.find(u=>u.notice_key===r);if(!a&&!l)return new Error(`'${r}' is not a valid notice key`);const d=l?.consent_mechanism===Pt.NOTICE_ONLY;return d&&o!==!0&&o!==De.ACKNOWLEDGE&&n!==ye.OT_MIGRATION?new Error(`Invalid consent value for notice-only notice key: '${r}'. Must be \`true\` or "acknowledge"`):!d&&typeof o!="boolean"&&o!==De.OPT_IN&&o!==De.OPT_OUT?new Error(`Invalid consent value for notice key: '${r}'. Must be a boolean or "opt_in" or "opt_out"`):null},null),ks=(s,e)=>is(void 0,null,function*(){var t;const{experience:n,cookie:i,config:r,locale:o}=s;if(!n)throw new Error("Experience must be initialized before updating consent");if(!r)throw new Error("Config is not initialized");if(!i)throw new Error("Cookie is not initialized");if(!(e!=null&&e.noticeConsent)&&!(e!=null&&e.fidesString)&&!(e!=null&&e.tcf))throw new Error("Either consent object or fidesString must be provided");if(e!=null&&e.validation&&!Object.values(Ze).includes(e.validation))throw new Error(`Validation must be one of: ${Object.values(Ze).join(", ")} (default is ${Ze.THROW})`);const{noticeConsent:a,fidesString:l,validation:d=Ze.THROW,consentMethod:u=ye.SCRIPT,eventExtraDetails:p={trigger:{origin:Ut.EXTERNAL}},tcf:E,updateCookie:O}=e,{experience_config:T,privacy_notices:H,non_applicable_privacy_notices:Y}=n,z=no(n)||Xi,J=Ae=>{if(d===Ze.THROW)throw new Error(Ae);d===Ze.WARN&&console.warn(Ae)};let se=i.consent||{};if(l)try{const Ae=Rs(l);if(Ae.nc){const Je=fr(Ae.nc);se=He(He({},i.consent),Je);const qe=Hs(H||[],Y||[],se,u);qe&&J(qe.message)}}catch(Ae){const Je=Ae instanceof Error?Ae.message:String(Ae);J(`Invalid fidesString provided: ${Je}`)}else if(a){const Ae=Hs(H||[],Y||[],a,u);Ae&&J(Ae.message),se=He(He({},i.consent),a)}const we=[];Object.entries(se).forEach(([Ae,Je])=>{const qe=H?.find(Ot=>Ot.notice_key===Ae);if(qe){const Ot=io(o,z,qe),os=Ot?.privacy_notice_history_id;let Yt;if(typeof Je=="boolean"?Yt=Dt(Je,qe.consent_mechanism):Yt=Je,os){const Sn=new tr(qe,Yt,os);we.push(Sn)}}});let Te;if((t=T?.translations)!=null&&t.length){const Ae=ro(o,z,T);Te=Ae?.privacy_experience_config_history_id}const nt=Nr(r.geolocation),un=Do.getServedNoticeHistoryId();return Go({consentPreferencesToSave:we,privacyExperienceConfigHistoryId:Te,experience:n,consentMethod:u,options:r.options,userLocationString:nt,cookie:i,eventExtraDetails:p,servedNoticeHistoryId:un,tcf:E,updateCookie:O})});class ze extends Error{constructor(e){super(e),this.name="DecodingError"}}class ke extends Error{constructor(e){super(e),this.name="EncodingError"}}class ut extends Error{constructor(e){super(e),this.name="GVLError"}}class Ke extends Error{constructor(e,t,n=""){super(`invalid value ${t} passed for ${e} ${n}`),this.name="TCModelError"}}class rs{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 ke("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let n="";for(let i=0;i<e.length;i+=this.BASIS)n+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return n}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new ze("Invalidly encoded Base64URL string");let t="";for(let n=0;n<e.length;n++){const i=this.REVERSE_DICT.get(e[n]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class $e{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 $e.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if($e.langSet.has(e))return e;if($e.langSet.has(t))return t;const n=t+"-"+t;if($e.langSet.has(n))return n;for(const i of $e.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){$e.langSet.forEach(e)}get size(){return $e.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 ht{clone(){const e=new this.constructor;return Object.keys(this).forEach(n=>{const i=this.deepClone(this[n]);i!==void 0&&(e[n]=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 n=[];for(const i of e)n.push(this.deepClone(i));return e instanceof Array?n:new e.constructor(n)}else{const n={};for(const i in e)e.hasOwnProperty(i)&&(n[i]=this.deepClone(e[i]));return n}}}}var be;(function(s){s[s.NOT_ALLOWED=0]="NOT_ALLOWED",s[s.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",s[s.REQUIRE_LI=2]="REQUIRE_LI"})(be||(be={}));class xe extends ht{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),n=new xe;if(t.length!==2)throw new Ke("hash",e);return n.purposeId=parseInt(t[0],10),n.restrictionType=parseInt(t[1],10),n}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${xe.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===be.NOT_ALLOWED||this.restrictionType===be.REQUIRE_CONSENT||this.restrictionType===be.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class Ks extends ht{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,n){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[n];if(r)if(e===be.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case be.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case be.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const n=t.hash;this.has(n)||(this.map.set(n,new Set),this.bitLength=0),this.map.get(n).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),n=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(n))this.map.set(n,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(n).add(o)}getVendors(e){let t=[];if(e){const n=e.hash;this.has(n)&&(t=Array.from(this.map.get(n)))}else{const n=new Set;this.map.forEach(i=>{i.forEach(r=>{n.add(r)})}),t=Array.from(n)}return t.sort((n,i)=>n-i)}getRestrictionType(e,t){let n;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(n===void 0||n>i.restrictionType)&&(n=i.restrictionType)}),n}vendorHasRestriction(e,t){let n=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!n;r++)n=t.isSameAs(i[r]);return n}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((n,i)=>{e?n.has(e)&&t.push(xe.unHash(i)):t.push(xe.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,n)=>{e.add(xe.unHash(n).purposeId)}),Array.from(e)}remove(e,t){const n=t.hash,i=this.map.get(n);i&&(i.delete(e),i.size==0&&(this.map.delete(n),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,n)=>{const i=xe.unHash(n);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 $s;(function(s){s.COOKIE="cookie",s.WEB="web",s.APP="app"})($s||($s={}));var Q;(function(s){s.CORE="core",s.VENDORS_DISCLOSED="vendorsDisclosed",s.VENDORS_ALLOWED="vendorsAllowed",s.PUBLISHER_TC="publisherTC"})(Q||(Q={}));class js{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 ht{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(n=>{let i=Number.isInteger(parseInt(n,10));return i=i&&this.isValidNumber(e[n].id),i=i&&e[n].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new Ke("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[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 Ue{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class P{static encode(e,t){let n;if(typeof e=="string"&&(e=parseInt(e,10)),n=e.toString(2),n.length>t||e<0)throw new ke(`${e} too large to encode into ${t}`);return n.length<t&&(n="0".repeat(t-n.length)+n),n}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");return parseInt(e,2)}}class Ys{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");const n=new Date;return n.setTime(P.decode(e,t)*100),n}}class We{static encode(e,t){let n="";for(let i=1;i<=t;i++)n+=Ue.encode(e.has(i));return n}static decode(e,t){if(e.length!==t)throw new ze("bitfield encoding length mismatch");const n=new me;for(let i=1;i<=t;i++)Ue.decode(e[i-1])&&n.set(i);return n.bitLength=e.length,n}}class zs{static encode(e,t){e=e.toUpperCase();const n=65,i=e.charCodeAt(0)-n,r=e.charCodeAt(1)-n;if(i<0||i>25||r<0||r>25)throw new ke(`invalid language code: ${e}`);if(t%2===1)throw new ke(`numBits must be even, ${t} is not valid`);t=t/2;const o=P.encode(i,t),a=P.encode(r,t);return o+a}static decode(e,t){let n;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=P.decode(e.slice(0,r),r)+65,a=P.decode(e.slice(r),r)+65;n=String.fromCharCode(o)+String.fromCharCode(a)}else throw new ze("invalid bit length for language");return n}}class yo{static encode(e){let t=P.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const n=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=P.encode(i.purposeId,g.purposeId),t+=P.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,d="";for(let u=0;u<o;u++){const p=r[u];if(l===0&&(a++,l=p),u===o-1||r[u+1]>n(p,r[o-1])){const E=p!==l;d+=Ue.encode(E),d+=P.encode(l,g.vendorId),E&&(d+=P.encode(p,g.vendorId)),l=0}}t+=P.encode(a,g.numEntries),t+=d})}return t}static decode(e){let t=0;const n=new Ks,i=P.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=P.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=P.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new xe(o,a),d=P.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let u=0;u<d;u++){const p=Ue.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const E=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,p){const O=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,O<E)throw new ze(`Invalid RangeEntry: endVendorId ${O} is less than ${E}`);for(let T=E;T<=O;T++)n.add(T,l)}else n.add(E,l)}}return n.bitLength=t,n}}var gt;(function(s){s[s.FIELD=0]="FIELD",s[s.RANGE=1]="RANGE"})(gt||(gt={}));class Tt{static encode(e){const t=[];let n=[],i=P.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,d=g.vendorId*2+g.singleOrRange+g.numEntries;let u=a+g.numEntries;return e.forEach((p,E)=>{r+=Ue.encode(p),o=e.maxId>d&&u<l,o&&p&&(e.has(E+1)?n.length===0&&(n.push(E),u+=g.singleOrRange,u+=g.vendorId):(n.push(E),u+=g.vendorId,t.push(n),n=[]))}),o?(i+=String(gt.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(gt.FIELD),i+=r),i}static decode(e,t){let n,i=0;const r=P.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=P.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===gt.RANGE){if(n=new me,t===1){if(e.substr(i,1)==="1")throw new ze("Unable to decode default consent=1");i++}const a=P.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const d=Ue.decode(e.charAt(i));i+=g.singleOrRange;const u=P.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,d){const p=P.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let E=u;E<=p;E++)n.set(E)}else n.set(u)}}else{const a=e.substr(i,r);i+=r,n=We.decode(a,r)}return n.bitLength=i,n}static buildRangeEncoding(e){const t=e.length;let n=P.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;n+=Ue.encode(!r),n+=P.encode(i[0],g.vendorId),r||(n+=P.encode(i[1],g.vendorId))}),n}}function Ws(){return{[S.version]:P,[S.created]:Ys,[S.lastUpdated]:Ys,[S.cmpId]:P,[S.cmpVersion]:P,[S.consentScreen]:P,[S.consentLanguage]:zs,[S.vendorListVersion]:P,[S.policyVersion]:P,[S.isServiceSpecific]:Ue,[S.useNonStandardTexts]:Ue,[S.specialFeatureOptins]:We,[S.purposeConsents]:We,[S.purposeLegitimateInterests]:We,[S.purposeOneTreatment]:Ue,[S.publisherCountryCode]:zs,[S.vendorConsents]:Tt,[S.vendorLegitimateInterests]:Tt,[S.publisherRestrictions]:yo,segmentType:P,[S.vendorsDisclosed]:Tt,[S.vendorsAllowed]:Tt,[S.publisherConsents]:We,[S.publisherLegitimateInterests]:We,[S.numCustomPurposes]:P,[S.publisherCustomConsents]:We,[S.publisherCustomLegitimateInterests]:We}}class Uo{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 xo{1=[Q.CORE];2=[Q.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(Q.PUBLISHER_TC);else{const n=!!(t&&t.isForVendors);(!n||e[S.supportOOB]===!0)&&this[2].push(Q.VENDORS_DISCLOSED),n&&(e[S.supportOOB]&&e[S.vendorsAllowed].size>0&&this[2].push(Q.VENDORS_ALLOWED),this[2].push(Q.PUBLISHER_TC))}}}class Qs{static fieldSequence=new Uo;static encode(e,t){let n;try{n=this.fieldSequence[String(e.version)][t]}catch{throw new ke(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==Q.CORE&&(i=P.encode(js.KEY_TO_ID[t],g.segmentType));const r=Ws();return n.forEach(o=>{const a=e[o],l=r[o];let d=g[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[S.numCustomPurposes]));try{i+=l.encode(a,d)}catch(u){throw new ke(`Error encoding ${t}->${o}: ${u.message}`)}}),rs.encode(i)}static decode(e,t,n){const i=rs.decode(e);let r=0;n===Q.CORE&&(t.version=P.decode(i.substr(r,g[S.version]),g[S.version])),n!==Q.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][n],a=Ws();return o.forEach(l=>{const d=a[l];let u=g[l];if(u===void 0&&this.isPublisherCustom(l)&&(u=Number(t[S.numCustomPurposes])),u!==0){const p=i.substr(r,u);if(d===Tt?t[l]=d.decode(p,t.version):t[l]=d.decode(p,u),Number.isInteger(u))r+=u;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new ze(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Fo{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const n=new Map;return n.set("legIntPurposes",e.vendorLegitimateInterests),n.set("purposes",e.vendorConsents),n.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 p=0,E=d.length;p<E&&!u;p++)u=d[p].restrictionType===be.REQUIRE_CONSENT&&r==="purposes"||d[p].restrictionType===be.REQUIRE_LI&&r==="legIntPurposes";u||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const n=e.gvl;if(!n)throw new ke("Unable to encode TCModel without a GVL");if(!n.isReady)throw new ke("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=n.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 ke(`Invalid version: ${e.version}`);return this.processor[i](e,n)}}class Bo{static absCall(e,t,n,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"))},p=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=n,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=p,a.send(t)})}static post(e,t,n=!1,i=0){return this.absCall(e,JSON.stringify(t),n,i)}static fetch(e,t=!1,n=0){return this.absCall(e,null,t,n)}}class A extends ht{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new $e;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new ut("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 n=A.baseUrl,i=t?.language;if(i)try{i=A.consentLanguages.parseLanguage(i)}catch(r){throw new ut("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(!n)throw new ut("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()):(n+=A.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(n))}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(n+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 Bo.fetch(e))}catch(t){throw new ut(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 ut("Error during parsing the language: "+i.message)}const n=e.toUpperCase();if(!(t.toLowerCase()===A.DEFAULT_LANGUAGE.toLowerCase()&&!A.LANGUAGE_CACHE.has(n))&&t!==this.lang_)if(this.lang_=t,A.LANGUAGE_CACHE.has(n)){const i=A.LANGUAGE_CACHE.get(n);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_=n,this.cacheLanguage()}catch(r){throw new ut("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,n)=>{const i=this.vendors_[String(n)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(n)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(n)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(n)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(n)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(n)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(n)}),t[n]=i),t},{})}getFilteredVendors(e,t,n,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&n?o=this["by"+r+"VendorMap"][String(t)][n]: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 Js extends ht{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 Ks;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((n,i)=>Number(n)-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 Ho{static encode(e,t){let n="",i;return e=Fo.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new xo(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),n+=Qs.encode(e,r)+a}),n}static decode(e,t){const n=e.split("."),i=n.length;t||(t=new Js);for(let r=0;r<i;r++){const o=n[r],l=rs.decode(o.charAt(0)).substr(0,g.segmentType),d=js.ID_TO_KEY[P.decode(l,g.segmentType).toString()];Qs.decode(o,t,d)}return t}}var Qe;(function(s){s.PING="ping",s.GET_TC_DATA="getTCData",s.GET_IN_APP_TC_DATA="getInAppTCData",s.GET_VENDOR_LIST="getVendorList",s.ADD_EVENT_LISTENER="addEventListener",s.REMOVE_EVENT_LISTENER="removeEventListener"})(Qe||(Qe={}));var Ft;(function(s){s.STUB="stub",s.LOADING="loading",s.LOADED="loaded",s.ERROR="error"})(Ft||(Ft={}));var Bt;(function(s){s.VISIBLE="visible",s.HIDDEN="hidden",s.DISABLED="disabled"})(Bt||(Bt={}));var qs;(function(s){s.TC_LOADED="tcloaded",s.CMP_UI_SHOWN="cmpuishown",s.USER_ACTION_COMPLETE="useractioncomplete"})(qs||(qs={}));class Ht{listenerId;callback;next;param;success=!0;constructor(e,t,n,i){Object.assign(this,{callback:e,listenerId:n,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 kt extends Ht{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Zs(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 ko{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 kt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class Ne{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new ko;static cmpStatus=Ft.LOADING;static disabled=!1;static displayStatus=Bt.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=Ft.LOADING,this.disabled=!1,this.displayStatus=Bt.HIDDEN,this.eventQueue.clear()}}class Xs{cmpId=Ne.cmpId;cmpVersion=Ne.cmpVersion;gdprApplies=Ne.gdprApplies;tcfPolicyVersion=Ne.tcfPolicyVersion}class Zs extends Xs{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=Ne.eventStatus,this.cmpStatus=Ne.cmpStatus,this.listenerId=t,Ne.gdprApplies){const n=Ne.tcModel;this.tcString=Ne.tcString,this.isServiceSpecific=n.isServiceSpecific,this.useNonStandardTexts=n.useNonStandardTexts,this.purposeOneTreatment=n.purposeOneTreatment,this.publisherCC=n.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(n.vendorsAllowed,e),disclosedVendors:this.createVectorField(n.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(n.purposeConsents),legitimateInterests:this.createVectorField(n.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(n.vendorConsents,e),legitimateInterests:this.createVectorField(n.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(n.specialFeatureOptins),this.publisher={consents:this.createVectorField(n.publisherConsents),legitimateInterests:this.createVectorField(n.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(n.publisherCustomConsents),legitimateInterests:this.createVectorField(n.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(n.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const n=e.getMaxVendorId();for(let i=1;i<=n;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((n,i)=>(n[String(i)]=e.has(Number(i)),n),{}):[...e].reduce((n,i)=>(n[i[0].toString(10)]=i[1],n),{})}}class Ko extends Zs{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,n)=>(t+=n[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const n=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(n)});for(let i=0;i<n;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 $o extends Xs{cmpLoaded=!0;cmpStatus=Ne.cmpStatus;displayStatus=Ne.displayStatus;apiVersion=String(Ne.apiVersion);gvlVersion;constructor(){super(),Ne.tcModel&&Ne.tcModel.vendorListVersion&&(this.gvlVersion=+Ne.tcModel.vendorListVersion)}}class jo extends Ht{respond(){this.invokeCallback(new $o)}}class Yo extends kt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Ko(this.param))}}class zo extends Ht{respond(){const e=Ne.tcModel,t=e.vendorListVersion;let n;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?n=e.gvl:n=new A(this.param),n.readyPromise.then(()=>{this.invokeCallback(n.getJson())})}}class Wo extends kt{respond(){this.listenerId=Ne.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class Qo extends Ht{respond(){this.invokeCallback(Ne.eventQueue.remove(this.param))}}class Ua{static[Qe.PING]=jo;static[Qe.GET_TC_DATA]=kt;static[Qe.GET_IN_APP_TC_DATA]=Yo;static[Qe.GET_VENDOR_LIST]=zo;static[Qe.ADD_EVENT_LISTENER]=Wo;static[Qe.REMOVE_EVENT_LISTENER]=Qo}const Jo=s=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=s.detail;if(e){const[t]=e.split(bt);return t.split(".")[0]}return e??""};var qo=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Xo=1,en=[1,3,4,5,6],Zo=2,ea=({userConsentedVendorIds:s,disclosedVendorIds:e})=>{const t=r=>r.filter(Zr).map(o=>Ye(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),n=t(s),i=t(e.filter(r=>!s.includes(r)));return`${Zo}~${n}~dv.${i}`},ta=s=>qo(void 0,[s],function*({experience:e,tcStringPreferences:t}){var n,i,r,o;let a="";try{const l=new Js(new A(e.gvl));yield l.gvl.readyPromise,l.cmpId=ns,l.cmpVersion=Xo,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?to(e):eo(e);if(l.gvl.narrowVendorsTo(d),t){t.vendorsConsent.forEach(E=>{var O,T,H;if(Lt(E,e.gvl)){const{id:Y}=Ye(E);if(l.vendorConsents.set(+Y),!((O=e.tcf_publisher_restrictions)!=null&&O.length)){const z=(T=e.gvl)==null?void 0:T.vendors[Y];z&&!((H=z?.purposes)!=null&&H.length)&&z.flexiblePurposes.forEach(J=>{const se=new xe;se.purposeId=J,se.restrictionType=be.REQUIRE_CONSENT,l.publisherRestrictions.add(+Y,se)})}}}),t.vendorsLegint.forEach(E=>{var O,T;if(e.minimal_tcf)(O=e.tcf_vendor_legitimate_interest_ids)==null||O.forEach(H=>{const{id:Y}=Ye(H);l.vendorLegitimateInterests.set(+Y)});else if(Lt(E,e.gvl)){const H=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(J=>J.id===E)[0],Y=H?.purpose_legitimate_interests;let z=!1;if(Y&&(Y.map(J=>J.id).filter(J=>en.includes(J)).length&&(z=!0),!z)){const{id:J}=Ye(E);l.vendorLegitimateInterests.set(+J)}}}),Object.values((i=(n=e.gvl)==null?void 0:n.vendors)!=null?i:{}).forEach(E=>{var O,T;(O=E.specialPurposes)!=null&&O.length&&!((T=E.legIntPurposes)!=null&&T.length)&&l.vendorLegitimateInterests.set(E.id)}),t.purposesConsent.forEach(E=>{l.purposeConsents.set(+E)}),t.purposesLegint.forEach(E=>{const O=+E;en.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 T=new xe;T.purposeId=E.purpose_id,T.restrictionType=E.restriction_type,l.publisherRestrictions.add(O,T)})}),a=Ho.encode(l,{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),p=ea({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:u??[]});a=`${a}${bt}${p}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var sa=Object.defineProperty,na=Object.defineProperties,ia=Object.getOwnPropertyDescriptors,tn=Object.getOwnPropertySymbols,ra=Object.prototype.hasOwnProperty,oa=Object.prototype.propertyIsEnumerable,sn=(s,e,t)=>e in s?sa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,aa=(s,e)=>{for(var t in e||(e={}))ra.call(e,t)&&sn(s,t,e[t]);if(tn)for(var t of tn(e))oa.call(e,t)&&sn(s,t,e[t]);return s},la=(s,e)=>na(s,ia(e)),ca=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const et=({modelList:s,enabledIds:e})=>s?s.map(t=>{const n=Dt(e.includes(`${t.id}`));return{id:t.id,preference:n}}):[],tt=s=>s!=null&&s.length?s.map(e=>{const t=Dt(!0);let n=e;return Number.isNaN(parseInt(e,10))||(n=parseInt(e,10)),{id:n,preference:t}}):[],da=({experience:s,enabledIds:e})=>{const t=[],n=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=s.tcf_system_consents)!=null&&a.map(l=>l.id).includes(o)?t.push(o):n.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=s.tcf_system_legitimate_interests)!=null&&a.map(l=>l.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:et({modelList:s.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:et({modelList:s.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:et({modelList:s.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:et({modelList:s.tcf_vendor_consents,enabledIds:n}),vendor_legitimate_interests_preferences:et({modelList:s.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:et({modelList:s.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:et({modelList:s.tcf_system_legitimate_interests,enabledIds:i})}},Ea=({experience:s,enabledIds:e})=>{const t=[],n=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=s.tcf_system_consent_ids)!=null&&a.includes(o)?t.push(o):n.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=s.tcf_system_legitimate_interest_ids)!=null&&a.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:tt(e.purposesConsent),purpose_legitimate_interests_preferences:tt(e.purposesLegint),special_feature_preferences:tt(e.specialFeatures),vendor_consent_preferences:tt(n),vendor_legitimate_interests_preferences:tt(r),system_consent_preferences:tt(t),system_legitimate_interests_preferences:tt(i)}},ua=(s,e,t,n,i,r)=>ca(void 0,null,function*(){var o;const a=yield ta({tcStringPreferences:t,experience:n});return la(aa({},s),{fides_string:a,tcf_consent:Wr(e),tcf_version_hash:(o=n.meta)==null?void 0:o.version_hash})}),Kt="us",Sa=s=>s?.toLowerCase().startsWith("us"),pa=({experienceRegion:s,usApproach:e})=>Sa(s)&&e===Be.NATIONAL?Kt:s,_a=({gppApi:s,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:n,cmpApiField:i})=>{const r=i===N.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:n&&(o=1),s.setFieldValue(e,i,o)})},nn=s=>{const{region:e,gpp_settings:t,privacy_notices:n}=s;let i=pa({experienceRegion:e,usApproach:t?.us_approach}),r=Gt[i];return!r&&t?.us_approach===Be.ALL&&(i=Kt,r=Gt[i]),r&&t?.us_approach===Be.ALL&&(n!=null&&n.some(o=>{var a;return(a=o.gpp_field_mapping)==null?void 0:a.find(l=>l.region===e)})||(i=Kt,r=Gt[i])),!r||i===Kt&&t?.us_approach===Be.STATE?{}:{gppRegion:i,gppSection:r}},ha=({gppApi:s,gppRegion:e,gppSection:t,privacyNotices:n,noticeConsent:i})=>{i&&n.forEach(r=>{var o;const{notice_key:a,gpp_field_mapping:l}=r,d=i[a],u=(o=l?.find(p=>p.region===e))==null?void 0:o.mechanism;u&&u.forEach(p=>{let E=p.not_available;d===!1?E=p.opt_out:d&&(E=p.not_opt_out);let O=+E;E.length>1&&(O=E.split("").map(T=>+T)),s.setFieldValue(t.name,p.field,O)})})},ga=({gppApi:s,gppRegion:e,gppSection:t,privacyNotices:n})=>{n.forEach(i=>{var r;const{gpp_field_mapping:o}=i,a=(r=o?.find(l=>l.region===e))==null?void 0:r.notice;a&&a.forEach(l=>{s.setFieldValue(t.name,l,1)})})},Ta=[1,3,4,5,6],Ia=({cmpApi:s,experience:e})=>{const t={},{privacy_notices:n=[]}=e,{gppRegion:i,gppSection:r}=nn(e);return!i||!r||n.forEach(o=>{var a;const{notice_key:l,gpp_field_mapping:d}=o,u=(a=d?.find(p=>p.region===i))==null?void 0:a.mechanism;if(u){const p=u.some(E=>{const O=s.getFieldValue(r.name,E.field),T=Array.isArray(O)?O.join(""):String(O);return T===E.opt_out?!0:(E.not_opt_out,!1)});p!==void 0&&(t[l]=!p)}}),t},Oa=({cmpApi:s,experience:e})=>{var t,n,i,r;const o=Gr,a=s.getSection(j.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}`),p=a.VendorLegitimateInterests.map(E=>`gvl.${E}`);return o.purposesConsent=l,o.purposesLegint=d.filter(E=>!Ta.includes(parseInt(E,10))),o.vendorsConsent=u,o.vendorsLegint=p,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=((n=e.tcf_features)==null?void 0:n.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},Na=({fidesString:s,cmpApi:e})=>{const{gpp:t}=Rs(s);if(!s||!t||!e)return;const{locale:n}=window.Fides,i=window.Fides.experience;if(!i||!i.experience_config||!i.privacy_notices)return;const r=i.experience_config.component===_t.TCF_OVERLAY;if(!i.experience_config.translations.find(d=>Et(d.language,n)))return;e.setGppString(t),e.setSignalStatus(Ve.READY);const o=i.privacy_notices.map(d=>({notice:d,bestTranslation:d.translations.find(u=>Et(u.language,n))||null}));let a,l;if(r){const d=Oa({cmpApi:e,experience:i});l=i.minimal_tcf?Ea({experience:i,enabledIds:d}):da({experience:i,enabledIds:d}),a=p=>ua(p,l,d,i);const u={};o.forEach(p=>{p.notice.consent_mechanism!==Pt.NOTICE_ONLY?u[p.notice.notice_key]=d.purposesConsent.includes(p.notice.id):u[p.notice.notice_key]=!0}),ks(window.Fides,{noticeConsent:u,tcf:l,updateCookie:a})}else{const d=Ia({cmpApi:e,experience:i});ks(window.Fides,{noticeConsent:d})}},rn="__gppLocator",on=s=>{if(!window.frames[s])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=s,window.document.body.appendChild(e)}else setTimeout(()=>on(s),5)},Aa=s=>{let e=window,t;for(;e;){try{if(e.frames[s]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},fa=s=>typeof s=="object"&&s!=null&&"__gppCall"in s,Ca=()=>{const s=[],e=[];let t;const n=(r,o,a,l)=>{if(r==="queue")return s;if(r==="events")return e;const d={gppVersion:"1.1",cmpStatus:rt.STUB,cmpDisplayStatus:je.HIDDEN,signalStatus:Ve.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 p=0;p<e.length;p++)if(e[p].id===a){e.splice(p,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):s.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(!fa(a))return null;if(a.__gppCall&&window.__gpp){const l=a.__gppCall;window.__gpp(l.command,(d,u)=>{const p={__gppReturn:{returnValue:d,success:u,callId:l.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(p):p,"*")},"parameter"in l?l.parameter:void 0,"version"in l?l.version:"1.1")}return null};Aa(rn)||(on(rn),window.__gpp=n,window.addEventListener("message",i,!1))},an=(s,{cmpApi:e,experience:t,cookie:n})=>{const{gppRegion:i,gppSection:r}=nn(t);if(!i||!r)return[];const o=new Set;o.add(r),s({gppApi:e,gppRegion:i,gppSection:r,privacyNotices:t.privacy_notices||[],noticeConsent:n?.consent});const{gpp_settings:a}=t;return _a({gppApi:e,sectionName:r.name,gppSettings:a}),Array.from(o)},ln=({cmpApi:s,experience:e})=>an(ga,{cmpApi:s,experience:e}),cn=({cmpApi:s,cookie:e,experience:t})=>an(ha,{cmpApi:s,cookie:e,experience:t}),dn=(s,e,t)=>s?e?!0:!!(t&&Object.entries(s).some(([n,i])=>n in t.map(r=>r.notice_key)&&i!==void 0)):!1,En=(s,e)=>{if(!dt(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 n=Jo(s);return n?(e.setFieldValueBySectionId(j.ID,"CmpId",ns),e.setSectionStringById(j.ID,n),!0):!1},Pa=()=>{const s=[];if(dt(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&s.push(`${j.ID}:${j.NAME}`),(e.us_approach===Be.NATIONAL||e.us_approach===Be.ALL)&&s.push(`${X.ID}:${X.NAME}`),(e.us_approach===Be.STATE||e.us_approach===Be.ALL)&&Object.values(Gt).forEach(t=>{t.id!==X.ID&&s.push(`${t.id}:${t.name}`)}))}return s},wa=()=>{Ca();const s=new qi(ns,so);s.setCmpStatus(rt.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:n,saved_consent:i,options:r}=window.Fides,o=Pa();if(s.setSupportedAPIs(o),!dt(n))return;const{fidesString:a}=r;if(a&&Na({fidesString:a,cmpApi:s}),!a&&(!Ar(n,e.detail,i,r)||!r.tcfEnabled&&Is(n.privacy_notices)&&!dn(i,e.detail.fides_string,n.privacy_notices))){const l=En(e,s);l&&s.setApplicableSections([j.ID]);const d=ln({cmpApi:s,experience:n}),u=cn({cmpApi:s,cookie:e.detail,experience:n});u.length&&s.setApplicableSections(u.map(E=>E.id)),!l&&!d.length&&!u.length&&s.setApplicableSections([-1]),s.setSignalStatus(Ve.READY);const p=Vs(s);window.Fides.fides_string=p}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:n,options:i}=window.Fides;if(dt(t)){!i.tcfEnabled&&Is(t.privacy_notices)&&!dn(n,e.detail.fides_string,t.privacy_notices)?s.setSignalStatus(Ve.READY):s.setSignalStatus(Ve.NOT_READY),s.setCmpDisplayStatus(je.VISIBLE);const r=ln({cmpApi:s,experience:t});r.length&&(s.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{s.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(s.setCmpDisplayStatus(je.HIDDEN),s.setSignalStatus(Ve.READY))}),window.addEventListener("FidesUpdated",e=>{if(s.setCmpDisplayStatus(je.HIDDEN),En(e,s)&&(s.setApplicableSections([j.ID]),s.fireSectionChange("tcfeuv2")),dt(window.Fides.experience)){const t=cn({cmpApi:s,cookie:e.detail,experience:window.Fides.experience});t.length&&(s.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{s.fireSectionChange(i.name)}));const n=Vs(s);window.Fides.cookie&&(window.Fides.fides_string=n,window.Fides.cookie.fides_string=n,ms(window.Fides.cookie,window.Fides.options.base64Cookie))}s.setSignalStatus(Ve.READY)})};window.addEventListener("FidesInitializing",s=>{var e;(e=s.detail.extraDetails)!=null&&e.gppEnabled&&wa()});
1
+ class zt{eventName;listenerId;data;pingData;constructor(e,t,n,i){this.eventName=e,this.listenerId=t,this.data=n,this.pingData=i}}class Nt{gppVersion;cmpStatus;cmpDisplayStatus;signalStatus;supportedAPIs;cmpId;sectionList;applicableSections;gppString;parsedSections;constructor(e){this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}let it=class{callback;parameter;success=!0;cmpApiContext;constructor(e,t,n){this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:n})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},pn=class extends it{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new zt("listenerRegistered",e,!0,new Nt(this.cmpApiContext));this.invokeCallback(t)}},_n=class extends it{respond(){let e=new Nt(this.cmpApiContext);this.invokeCallback(e)}};class hn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],n=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,n);this.invokeCallback(i)}}class gn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class Tn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var Le;(function(s){s.ADD_EVENT_LISTENER="addEventListener",s.GET_FIELD="getField",s.GET_SECTION="getSection",s.HAS_SECTION="hasSection",s.PING="ping",s.REMOVE_EVENT_LISTENER="removeEventListener"})(Le||(Le={}));let In=class extends it{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),n=new zt("listenerRemoved",e,t,new Nt(this.cmpApiContext));this.invokeCallback(n)}},as=class{static[Le.ADD_EVENT_LISTENER]=pn;static[Le.GET_FIELD]=hn;static[Le.GET_SECTION]=gn;static[Le.HAS_SECTION]=Tn;static[Le.PING]=_n;static[Le.REMOVE_EVENT_LISTENER]=In};var rt;(function(s){s.STUB="stub",s.LOADING="loading",s.LOADED="loaded",s.ERROR="error"})(rt||(rt={}));var je;(function(s){s.VISIBLE="visible",s.HIDDEN="hidden",s.DISABLED="disabled"})(je||(je={}));var ls;(function(s){s.GPP_LOADED="gpploaded",s.CMP_UI_SHOWN="cmpuishown",s.USER_ACTION_COMPLETE="useractioncomplete"})(ls||(ls={}));var Ve;(function(s){s.NOT_READY="not ready",s.READY="ready"})(Ve||(Ve={}));class On{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let n=Le.ADD_EVENT_LISTENER;if(t?.[n])throw new Error(`Built-In Custom Commmand for ${n} not allowed`);if(n=Le.REMOVE_EVENT_LISTENER,t?.[n])throw new Error(`Built-In Custom Commmand for ${n} 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,n,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,n):this.isBuiltInCommand(e)?new as[e](this.cmpApiContext,t,n).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 as[e]!==void 0}}let Nn=class{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let n=window.__gpp("events")||[];for(var t=0;t<n.length;t++){let i=n[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(n){console.log(n)}}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((n,i)=>{let r=new zt(e,i,t,new Nt(this.cmpApiContext));n.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class St 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 n=this.segments[t];if(n.getFieldNames().includes(e))return n.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 n=this.segments[t];if(n.hasField(e))return n.getFieldValue(e)}throw new St("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let n=0;n<this.segments.length;n++){let i=this.segments[n];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new St("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let n=this.segments[t].toObj();for(const[i,r]of Object.entries(n))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 _=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Ie=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class D{static encode(e,t){let n=[];if(e>=1)for(n.push(1);e>=n[0]*2;)n.unshift(n[0]*2);let i="";for(let r=0;r<n.length;r++){let o=n[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new Ie("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 _("Undecodable FixedInteger '"+e+"'");let t=0,n=[];for(let i=0;i<e.length;i++)i===0?n[e.length-(i+1)]=1:n[e.length-(i+1)]=n[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=n[i]);return t}}class It{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 Ie("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",n=0;for(;n<=e.length-6;){let i=e.substring(n,n+6);try{let r=D.decode(i),o=It.DICT.charAt(r);t+=o,n+=6}catch{throw new Ie("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new _("Undecodable Base64URL string '"+e+"'");let t="";for(let n=0;n<e.length;n++){let i=e.charAt(n),r=It.REVERSE_DICT.get(i),o=D.encode(r,6);t+=o}return t}}class x extends It{static instance=new x;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class f{static instance=new f;constructor(){}static getInstance(){return this.instance}encode(e,t){let n="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);n+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return n}decode(e,t,n){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(n.containsKey(o)){let a=n.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 _("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class ot{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let n="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(n="1"+n,e-=r):n="0"+n}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new _("Undecodable FibonacciInteger '"+e+"'");let t=0,n=[];for(let i=0;i<e.length-1;i++)i===0?n.push(1):i===1?n.push(2):n.push(n[i-1]+n[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=n[i]);return t}}let at=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Ie("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new _("Undecodable Boolean '"+e+"'")}};class cs{static encode(e){e=e.sort((o,a)=>o-a);let t=[],n=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=D.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-n;n=t[o][0],r+="0"+ot.encode(a)}else{let a=t[o][0]-n;n=t[o][0];let l=t[o][t[o].length-1]-n;n=t[o][t[o].length-1],r+="1"+ot.encode(a)+ot.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new _("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],n=D.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<n;o++){let a=at.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),d=ot.decode(e.substring(r,l+2))+i;i=d,r=l+2,l=e.indexOf("11",r);let u=ot.decode(e.substring(r,l+2))+i;i=u,r=l+2;for(let p=d;p<=u;p++)t.push(p)}else{let l=e.indexOf("11",r),d=ot.decode(e.substring(r,l+2))+i;i=d,t.push(d),r=l+2}}return t}}class An extends Error{constructor(e){super(e),this.name="ValidationError"}}class Me{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 An("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class Re extends _{constructor(e){super(e),this.name="SubstringError"}}class ee{static substring(e,t,n){if(n>e.length||t<0||t>n)throw new Re("Invalid substring indexes "+t+":"+n+" for string of length "+e.length);return e.substring(t,n)}}class fn extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return cs.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=cs.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{let n=D.decode(ee.substring(e,t,t+12)),i=t+12;for(let r=0;r<n;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(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class c extends Me{bitStringLength;constructor(e,t,n=!0){super(n),this.bitStringLength=e,this.setValue(t)}encode(){try{return D.encode(this.value,this.bitStringLength)}catch(e){throw new Ie(e)}}decode(e){try{this.value=D.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.bitStringLength)}catch(n){throw new Re(n)}}}class w{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,n)=>{this.fields.set(n,t)})}}var Fe;(function(s){s.ID="Id",s.VERSION="Version",s.SECTION_IDS="SectionIds"})(Fe||(Fe={}));const Cn=[Fe.ID,Fe.VERSION,Fe.SECTION_IDS];class C{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new St("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 St(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let n=0;n<t.length;n++){let i=t[n],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Pn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Cn}initializeFields(){let e=new w;return e.put(Fe.ID.toString(),new c(6,ve.ID)),e.put(Fe.VERSION.toString(),new c(6,ve.VERSION)),e.put(Fe.SECTION_IDS.toString(),new fn([])),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class ve extends Z{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ve.ID}getName(){return ve.NAME}getVersion(){return ve.VERSION}initializeSegments(){let e=[];return e.push(new Pn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var h;(function(s){s.VERSION="Version",s.CREATED="Created",s.LAST_UPDATED="LastUpdated",s.CMP_ID="CmpId",s.CMP_VERSION="CmpVersion",s.CONSENT_SCREEN="ConsentScreen",s.CONSENT_LANGUAGE="ConsentLanguage",s.VENDOR_LIST_VERSION="VendorListVersion",s.POLICY_VERSION="PolicyVersion",s.IS_SERVICE_SPECIFIC="IsServiceSpecific",s.USE_NON_STANDARD_STACKS="UseNonStandardStacks",s.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",s.PURPOSE_CONSENTS="PurposeConsents",s.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",s.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",s.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",s.VENDOR_CONSENTS="VendorConsents",s.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",s.PUBLISHER_RESTRICTIONS="PublisherRestrictions",s.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",s.PUBLISHER_CONSENTS="PublisherConsents",s.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",s.NUM_CUSTOM_PURPOSES="NumCustomPurposes",s.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",s.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",s.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",s.VENDORS_ALLOWED="VendorsAllowed",s.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",s.VENDORS_DISCLOSED="VendorsDisclosed"})(h||(h={}));const wn=[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],Dn=[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],mn=[h.VENDORS_ALLOWED_SEGMENT_TYPE,h.VENDORS_ALLOWED],Rn=[h.VENDORS_DISCLOSED_SEGMENT_TYPE,h.VENDORS_DISCLOSED];class st extends It{static instance=new st;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class lt{static encode(e){e.sort((r,o)=>r-o);let t=[],n=0;for(;n<e.length;){let r=n;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(n,r+1)),n=r+1}let i=D.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+D.encode(t[r][0],16):i+="1"+D.encode(t[r][0],16)+D.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new _("Undecodable FixedIntegerRange '"+e+"'");let t=[],n=D.decode(e.substring(0,12)),i=12;for(let r=0;r<n;r++){let o=at.decode(e.substring(i,i+1));if(i++,o===!0){let a=D.decode(e.substring(i,i+16));i+=16;let l=D.decode(e.substring(i,i+16));i+=16;for(let d=a;d<=l;d++)t.push(d)}else{let a=D.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Wt extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return lt.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=lt.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{let n=D.decode(ee.substring(e,t,t+12)),i=t+12;for(let r=0;r<n;r++)e.charAt(i)==="1"?i+=33:i+=17;return ee.substring(e,t,i)}catch(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class Vn{key;type;ids;constructor(e,t,n){this.key=e,this.type=t,this.ids=n}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 ds extends Me{keyBitStringLength;typeBitStringLength;constructor(e,t,n,i=!0){super(i),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(n)}encode(){try{let e=this.value,t="";t+=D.encode(e.length,12);for(let n=0;n<e.length;n++){let i=e[n];t+=D.encode(i.getKey(),this.keyBitStringLength),t+=D.encode(i.getType(),this.typeBitStringLength),t+=lt.encode(i.getIds())}return t}catch(e){throw new Ie(e)}}decode(e){try{let t=[],n=D.decode(ee.substring(e,0,12)),i=12;for(let r=0;r<n;r++){let o=D.decode(ee.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=D.decode(ee.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Wt([]).substring(e,i),d=lt.decode(l);i+=l.length,t.push(new Vn(o,a,d))}this.value=t}catch(t){throw new _(t)}}substring(e,t){try{let n="";n+=ee.substring(e,t,t+12);let i=D.decode(n.toString()),r=t+n.length;for(let o=0;o<i;o++){let a=ee.substring(e,r,r+this.keyBitStringLength);r+=a.length,n+=a;let l=ee.substring(e,r,r+this.typeBitStringLength);r+=l.length,n+=l;let d=new Wt([]).substring(e,r);r+=d.length,n+=d}return n}catch(n){throw new Re(n)}}}class k extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+1)}catch(n){throw new Re(n)}}}class Es{static encode(e){return e?D.encode(Math.round(e.getTime()/100),36):D.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new _("Undecodable Datetime '"+e+"'");return new Date(D.decode(e)*100)}}class At extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Es.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=Es.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+36)}catch(n){throw new Re(n)}}}class ct{static encode(e,t){if(e.length>t)throw new Ie("Too many values '"+e.length+"'");let n="";for(let i=0;i<e.length;i++)n+=at.encode(e[i]);for(;n.length<t;)n+="0";return n}static decode(e){if(!/^[0-1]*$/.test(e))throw new _("Undecodable FixedBitfield '"+e+"'");let t=[];for(let n=0;n<e.length;n++)t.push(at.decode(e.substring(n,n+1)));return t}}class Ge extends Me{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new Ie(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.numElements)}catch(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let n=t.length;n<this.numElements;n++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class us{static encode(e,t){for(;e.length<t;)e+=" ";let n="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)n+=D.encode(63,6);else if(r>=65)n+=D.encode(e.charCodeAt(i)-65,6);else throw new Ie("Unencodable FixedString '"+e+"'")}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new _("Undecodable FixedString '"+e+"'");let t="";for(let n=0;n<e.length;n+=6){let i=D.decode(e.substring(n,n+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class Qt extends Me{stringLength;constructor(e,t,n=!0){super(n),this.stringLength=e,this.setValue(t)}encode(){try{return us.encode(this.value,this.stringLength)}catch(e){throw new Ie(e)}}decode(e){try{this.value=us.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.stringLength*6)}catch(n){throw new Re(n)}}}class Xe extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=lt.encode(this.value),n=t.length,i=e;if(n<=i)return D.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return D.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new Ie(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=lt.decode(e.substring(17));else{let t=[],n=ct.decode(e.substring(17));for(let i=0;i<n.length;i++)n[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new _(t)}}substring(e,t){try{let n=D.decode(ee.substring(e,t,t+16));return e.charAt(t+16)==="1"?ee.substring(e,t,t+17)+new Wt([]).substring(e,t+17):ee.substring(e,t,t+17+n)}catch(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class Mn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}initializeFields(){let e=new Date,t=new w;return t.put(h.VERSION.toString(),new c(6,j.VERSION)),t.put(h.CREATED.toString(),new At(e)),t.put(h.LAST_UPDATED.toString(),new At(e)),t.put(h.CMP_ID.toString(),new c(12,0)),t.put(h.CMP_VERSION.toString(),new c(12,0)),t.put(h.CONSENT_SCREEN.toString(),new c(6,0)),t.put(h.CONSENT_LANGUAGE.toString(),new Qt(2,"EN")),t.put(h.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(h.POLICY_VERSION.toString(),new c(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 Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_CONSENTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_ONE_TREATMENT.toString(),new k(!1)),t.put(h.PUBLISHER_COUNTRY_CODE.toString(),new Qt(2,"AA")),t.put(h.VENDOR_CONSENTS.toString(),new Xe([])),t.put(h.VENDOR_LEGITIMATE_INTERESTS.toString(),new Xe([])),t.put(h.PUBLISHER_RESTRICTIONS.toString(),new ds(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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class ft extends Me{getLength;constructor(e,t,n=!0){super(n),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new Ie(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.getLength())}catch(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),n=[...e];for(let i=n.length;i<t;i++)n.push(!1);n.length>t&&(n=n.slice(0,t)),super.setValue([...n])}}class bn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Dn}initializeFields(){let e=new w;e.put(h.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(h.PUBLISHER_CONSENTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(h.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(h.NUM_CUSTOM_PURPOSES.toString(),t),e.put(h.PUBLISHER_CUSTOM_CONSENTS.toString(),new ft(()=>t.getValue(),[])),e.put(h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new ft(()=>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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class vn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mn}initializeFields(){let e=new w;return e.put(h.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(h.VENDORS_ALLOWED.toString(),new Xe([])),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Ln extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Rn}initializeFields(){let e=new w;return e.put(h.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(h.VENDORS_DISCLOSED.toString(),new Xe([])),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class j extends Z{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return j.ID}getName(){return j.NAME}getVersion(){return j.VERSION}initializeSegments(){let e=[];return e.push(new Mn),e.push(new bn),e.push(new vn),e.push(new Ln),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<n.length;i++){let r=n[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(n[i]);else if(o>="I"&&o<="P")t[3].decode(n[i]);else if(o>="Q"&&o<="X")t[2].decode(n[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(n[i]);else throw new _("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 n=new Date;super.setFieldValue(h.CREATED,n),super.setFieldValue(h.LAST_UPDATED,n)}}}var I;(function(s){s.VERSION="Version",s.CREATED="Created",s.LAST_UPDATED="LastUpdated",s.CMP_ID="CmpId",s.CMP_VERSION="CmpVersion",s.CONSENT_SCREEN="ConsentScreen",s.CONSENT_LANGUAGE="ConsentLanguage",s.VENDOR_LIST_VERSION="VendorListVersion",s.TCF_POLICY_VERSION="TcfPolicyVersion",s.USE_NON_STANDARD_STACKS="UseNonStandardStacks",s.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",s.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",s.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",s.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",s.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",s.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",s.PUB_RESTRICTIONS="PubRestrictions",s.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",s.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",s.NUM_CUSTOM_PURPOSES="NumCustomPurposes",s.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",s.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",s.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",s.DISCLOSED_VENDORS="DisclosedVendors"})(I||(I={}));const Gn=[I.VERSION,I.CREATED,I.LAST_UPDATED,I.CMP_ID,I.CMP_VERSION,I.CONSENT_SCREEN,I.CONSENT_LANGUAGE,I.VENDOR_LIST_VERSION,I.TCF_POLICY_VERSION,I.USE_NON_STANDARD_STACKS,I.SPECIAL_FEATURE_EXPRESS_CONSENT,I.PURPOSES_EXPRESS_CONSENT,I.PURPOSES_IMPLIED_CONSENT,I.VENDOR_EXPRESS_CONSENT,I.VENDOR_IMPLIED_CONSENT,I.PUB_RESTRICTIONS],yn=[I.PUB_PURPOSES_SEGMENT_TYPE,I.PUB_PURPOSES_EXPRESS_CONSENT,I.PUB_PURPOSES_IMPLIED_CONSENT,I.NUM_CUSTOM_PURPOSES,I.CUSTOM_PURPOSES_EXPRESS_CONSENT,I.CUSTOM_PURPOSES_IMPLIED_CONSENT],Un=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class xn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}initializeFields(){let e=new Date,t=new w;return t.put(I.VERSION.toString(),new c(6,Ce.VERSION)),t.put(I.CREATED.toString(),new At(e)),t.put(I.LAST_UPDATED.toString(),new At(e)),t.put(I.CMP_ID.toString(),new c(12,0)),t.put(I.CMP_VERSION.toString(),new c(12,0)),t.put(I.CONSENT_SCREEN.toString(),new c(6,0)),t.put(I.CONSENT_LANGUAGE.toString(),new Qt(2,"EN")),t.put(I.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(I.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(I.USE_NON_STANDARD_STACKS.toString(),new k(!1)),t.put(I.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_IMPLIED_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.VENDOR_EXPRESS_CONSENT.toString(),new Xe([])),t.put(I.VENDOR_IMPLIED_CONSENT.toString(),new Xe([])),t.put(I.PUB_RESTRICTIONS.toString(),new ds(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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class Fn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new w;e.put(I.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(I.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(I.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(I.NUM_CUSTOM_PURPOSES.toString(),t),e.put(I.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new ft(()=>t.getValue(),[])),e.put(I.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new ft(()=>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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Bn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Un}initializeFields(){let e=new w;return e.put(I.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(I.DISCLOSED_VENDORS.toString(),new Xe([])),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ce extends Z{static ID=5;static VERSION=1;static NAME="tcfcav1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ce.ID}getName(){return Ce.NAME}getVersion(){return Ce.VERSION}initializeSegments(){let e=[];return e.push(new xn),e.push(new Fn),e.push(new Bn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<n.length;i++){let r=n[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(n[i]);else if(o>="I"&&o<="P")t[2].decode(n[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(n[i]);else throw new _("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 n=new Date;super.setFieldValue(I.CREATED,n),super.setFieldValue(I.LAST_UPDATED,n)}}}class Jt{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(n){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class Hn{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(n){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}class kn{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,n)=>{this.fields.set(n,t)})}}var Oe;(function(s){s.VERSION="Version",s.NOTICE="Notice",s.OPT_OUT_SALE="OptOutSale",s.LSPA_COVERED="LspaCovered"})(Oe||(Oe={}));const Kn=[Oe.VERSION,Oe.NOTICE,Oe.OPT_OUT_SALE,Oe.LSPA_COVERED];class $n extends C{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Kn}initializeFields(){const e=new class{test(n){return n==="-"||n==="Y"||n==="N"}};let t=new kn;return t.put(Oe.VERSION,new Hn(Pe.VERSION)),t.put(Oe.NOTICE,new Jt("-",e)),t.put(Oe.OPT_OUT_SALE,new Jt("-",e)),t.put(Oe.LSPA_COVERED,new Jt("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Oe.VERSION).getValue(),t+=e.get(Oe.NOTICE).getValue(),t+=e.get(Oe.OPT_OUT_SALE).getValue(),t+=e.get(Oe.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new _("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Oe.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Oe.NOTICE).setValue(e.charAt(1)),t.get(Oe.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Oe.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new _("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Pe extends Z{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pe.ID}getName(){return Pe.NAME}getVersion(){return Pe.VERSION}initializeSegments(){let e=[];return e.push(new $n),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var N;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",s.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",s.SALE_OPT_OUT="SaleOptOut",s.SHARING_OPT_OUT="SharingOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.PERSONAL_DATA_CONSENTS="PersonalDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(N||(N={}));const jn=[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 Ss{static encode(e,t,n){if(e.length>n)throw new Ie("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=D.encode(e[r],t);for(;i.length<t*n;)i+="0";return i}static decode(e,t,n){if(!/^[0-1]*$/.test(e))throw new _("Undecodable FixedInteger '"+e+"'");if(e.length>t*n)throw new _("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new _("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*n;)e+="0";e.length>t*n&&(e=e.substring(0,t*n));let i=[];for(let r=0;r<e.length;r+=t)i.push(D.decode(e.substring(r,r+t)));for(;i.length<n;)i.push(0);return i}}class W extends Me{elementBitStringLength;numElements;constructor(e,t,n=!0){super(n),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return Ss.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Ie(e)}}decode(e){try{this.value=Ss.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(n){throw new Re(n)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let n=t.length;n<this.numElements;n++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class zn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.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}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(N.VERSION.toString(),new c(6,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 W(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);n.length==66&&(n=n.substring(0,48)+"00000000"+n.substring(48,52)+"00"+n.substring(52,62)),this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNatCoreSegment '"+e+"'")}}}class Wn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yn}initializeFields(){let e=new w;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new k(!0)),e.put(N.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 zn),e.push(new Wn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(N.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var m;(function(s){s.VERSION="Version",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",s.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",s.SALE_OPT_OUT="SaleOptOut",s.SHARING_OPT_OUT="SharingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.PERSONAL_DATA_CONSENTS="PersonalDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(m||(m={}));const Qn=[m.VERSION,m.SALE_OPT_OUT_NOTICE,m.SHARING_OPT_OUT_NOTICE,m.SENSITIVE_DATA_LIMIT_USE_NOTICE,m.SALE_OPT_OUT,m.SHARING_OPT_OUT,m.SENSITIVE_DATA_PROCESSING,m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,m.PERSONAL_DATA_CONSENTS,m.MSPA_COVERED_TRANSACTION,m.MSPA_OPT_OUT_OPTION_MODE,m.MSPA_SERVICE_PROVIDER_MODE],Jn=[m.GPC_SEGMENT_TYPE,m.GPC];class qn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Qn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(m.VERSION.toString(),new c(6,ne.VERSION)),i.put(m.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0]).withValidator(n)),i.put(m.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(m.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCaCoreSegment '"+e+"'")}}}class Xn extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Jn}initializeFields(){let e=new w;return e.put(m.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(m.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 qn),e.push(new Xn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(m.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var q;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(q||(q={}));const Zn=[q.VERSION,q.SHARING_NOTICE,q.SALE_OPT_OUT_NOTICE,q.TARGETED_ADVERTISING_OPT_OUT_NOTICE,q.SALE_OPT_OUT,q.TARGETED_ADVERTISING_OPT_OUT,q.SENSITIVE_DATA_PROCESSING,q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,q.MSPA_COVERED_TRANSACTION,q.MSPA_OPT_OUT_OPTION_MODE,q.MSPA_SERVICE_PROVIDER_MODE];class ei extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Zn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(q.VERSION.toString(),new c(6,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 W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var F;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(F||(F={}));const ti=[F.VERSION,F.SHARING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],si=[F.GPC_SEGMENT_TYPE,F.GPC];class ni extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ti}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(F.VERSION.toString(),new c(6,re.VERSION)),i.put(F.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0]).withValidator(n)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCoCoreSegment '"+e+"'")}}}class ii extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return si}initializeFields(){let e=new w;return e.put(F.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 ni),e.push(new ii),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(F.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var K;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(K||(K={}));const ri=[K.VERSION,K.SHARING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_OPT_OUT_NOTICE,K.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,K.SALE_OPT_OUT,K.TARGETED_ADVERTISING_OPT_OUT,K.SENSITIVE_DATA_PROCESSING,K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,K.MSPA_COVERED_TRANSACTION,K.MSPA_OPT_OUT_OPTION_MODE,K.MSPA_SERVICE_PROVIDER_MODE];class oi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ri}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(K.VERSION.toString(),new c(6,oe.VERSION)),i.put(K.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var B;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(B||(B={}));const ai=[B.VERSION,B.SHARING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],li=[B.GPC_SEGMENT_TYPE,B.GPC];class ci extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.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}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(B.VERSION.toString(),new c(6,ae.VERSION)),i.put(B.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCtCoreSegment '"+e+"'")}}}class di extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return li}initializeFields(){let e=new w;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 ci),e.push(new di),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 $;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})($||($={}));const Ei=[$.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];class ui extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.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}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put($.VERSION.toString(),new c(6,le.VERSION)),i.put($.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),i.put($.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put($.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 ui),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var R;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(R||(R={}));const Si=[R.VERSION,R.SHARING_NOTICE,R.SALE_OPT_OUT_NOTICE,R.TARGETED_ADVERTISING_OPT_OUT_NOTICE,R.SALE_OPT_OUT,R.TARGETED_ADVERTISING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.ADDITIONAL_DATA_PROCESSING_CONSENT,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],pi=[R.GPC_SEGMENT_TYPE,R.GPC];class _i extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(R.VERSION.toString(),new c(6,ce.VERSION)),i.put(R.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),i.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsMtCoreSegment '"+e+"'")}}}class hi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return pi}initializeFields(){let e=new w;return e.put(R.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 _i),e.push(new hi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var V;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(V||(V={}));const gi=[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],Ti=[V.GPC_SEGMENT_TYPE,V.GPC];class Ii extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(V.VERSION.toString(),new c(6,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 W(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsOrCoreSegment '"+e+"'")}}}class Oi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ti}initializeFields(){let e=new w;return e.put(V.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new k(!0)),e.put(V.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Ii),e.push(new Oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 M;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(M||(M={}));const Ni=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.ADDITIONAL_DATA_PROCESSING_CONSENT,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],Ai=[M.GPC_SEGMENT_TYPE,M.GPC];class fi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.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}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(M.VERSION.toString(),new c(6,Ee.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ci extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ai}initializeFields(){let e=new w;return e.put(M.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 fi),e.push(new Ci),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var b;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(b||(b={}));const Pi=[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],wi=[b.GPC_SEGMENT_TYPE,b.GPC];class Di extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(b.VERSION.toString(),new c(6,ue.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 W(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsDeCoreSegment '"+e+"'")}}}class mi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wi}initializeFields(){let e=new w;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Di),e.push(new mi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 v;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(v||(v={}));const Ri=[v.VERSION,v.PROCESSING_NOTICE,v.SALE_OPT_OUT_NOTICE,v.TARGETED_ADVERTISING_OPT_OUT_NOTICE,v.SENSITIVE_DATA_OPT_OUT_NOTICE,v.SALE_OPT_OUT,v.TARGETED_ADVERTISING_OPT_OUT,v.SENSITIVE_DATA_PROCESSING,v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,v.MSPA_COVERED_TRANSACTION,v.MSPA_OPT_OUT_OPTION_MODE,v.MSPA_SERVICE_PROVIDER_MODE],Vi=[v.GPC_SEGMENT_TYPE,v.GPC];class Mi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ri}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(v.VERSION.toString(),new c(6,Se.VERSION)),i.put(v.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsIaCoreSegment '"+e+"'")}}}class bi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}initializeFields(){let e=new w;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new k(!0)),e.put(v.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Mi),e.push(new bi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 L;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(L||(L={}));const vi=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],Li=[L.GPC_SEGMENT_TYPE,L.GPC];class Gi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return vi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(L.VERSION.toString(),new c(6,pe.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNeCoreSegment '"+e+"'")}}}class yi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Li}initializeFields(){let e=new w;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Gi),e.push(new yi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var G;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(G||(G={}));const Ui=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.ADDITIONAL_DATA_PROCESSING_CONSENT,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],xi=[G.GPC_SEGMENT_TYPE,G.GPC];class Fi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ui}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(G.VERSION.toString(),new c(6,_e.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Bi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return xi}initializeFields(){let e=new w;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Fi),e.push(new Bi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(y||(y={}));const Hi=[y.VERSION,y.PROCESSING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],ki=[y.GPC_SEGMENT_TYPE,y.GPC];class Ki extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(y.VERSION.toString(),new c(6,he.VERSION)),i.put(y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNjCoreSegment '"+e+"'")}}}class $i extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ki}initializeFields(){let e=new w;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 Ki),e.push(new $i),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(U||(U={}));const ji=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.ADDITIONAL_DATA_PROCESSING_CONSENT,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],Yi=[U.GPC_SEGMENT_TYPE,U.GPC];class zi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ji}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(U.VERSION.toString(),new c(6,ge.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTnCoreSegment '"+e+"'")}}}class Wi extends C{base64UrlEncoder=x.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yi}initializeFields(){let e=new w;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new 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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("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 zi),e.push(new Wi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(U.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class te{static SECTION_ID_NAME_MAP=new Map([[j.ID,j.NAME],[Ce.ID,Ce.NAME],[Pe.ID,Pe.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=[j.NAME,Ce.NAME,Pe.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 ps{sections=new Map;encodedString=null;decoded=!0;dirty=!1;constructor(e){e&&this.decode(e)}setFieldValue(e,t,n){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===j.NAME?(i=new j,this.sections.set(j.NAME,i)):e===Pe.NAME?(i=new Pe,this.sections.set(Pe.NAME,i)):e===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,n),this.dirty=!0,i.setIsDirty(!0);else throw new St(e+"."+t+" not found")}setFieldValueBySectionId(e,t,n){this.setFieldValue(te.SECTION_ID_NAME_MAP.get(e),t,n)}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 ve;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 n=te.SECTION_ORDER[t];if(this.sections.has(n)){let i=this.sections.get(n);e.push(i.getId())}}return e}encodeModel(e){let t=[],n=[];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()),n.push(a.getId())}}let i=new ve;return i.setFieldValue("SectionIds",n),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),n=new Map;if(t[0].startsWith("D")){let r=new ve(t[0]).getFieldValue("SectionIds");if(r.length!==t.length-1)throw new _("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 _("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Ce.ID){let l=new Ce(t[o+1]);n.set(Ce.NAME,l)}else if(r[o]===j.ID){let l=new j(t[o+1]);n.set(j.NAME,l)}else if(r[o]===Pe.ID){let l=new Pe(t[o+1]);n.set(Pe.NAME,l)}else if(r[o]===X.ID){let l=new X(t[o+1]);n.set(X.NAME,l)}else if(r[o]===ne.ID){let l=new ne(t[o+1]);n.set(ne.NAME,l)}else if(r[o]===ie.ID){let l=new ie(t[o+1]);n.set(ie.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);n.set(re.NAME,l)}else if(r[o]===oe.ID){let l=new oe(t[o+1]);n.set(oe.NAME,l)}else if(r[o]===ae.ID){let l=new ae(t[o+1]);n.set(ae.NAME,l)}else if(r[o]===le.ID){let l=new le(t[o+1]);n.set(le.NAME,l)}else if(r[o]===ce.ID){let l=new ce(t[o+1]);n.set(ce.NAME,l)}else if(r[o]===de.ID){let l=new de(t[o+1]);n.set(de.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);n.set(Ee.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);n.set(ue.NAME,l)}else if(r[o]===Se.ID){let l=new Se(t[o+1]);n.set(Se.NAME,l)}else if(r[o]===pe.ID){let l=new pe(t[o+1]);n.set(pe.NAME,l)}else if(r[o]===_e.ID){let l=new _e(t[o+1]);n.set(_e.NAME,l)}else if(r[o]===he.ID){let l=new he(t[o+1]);n.set(he.NAME,l)}else if(r[o]===ge.ID){let l=new ge(t[o+1]);n.set(ge.NAME,l)}}}return n}else if(e.startsWith("C")){let t=new Map,n=new j(e);return t.set(j.NAME,n),new ve().setFieldValue(Fe.SECTION_IDS,[2]),t.set(ve.NAME,n),t}else throw new _("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 n=null;this.sections.has(e)?n=this.sections.get(e):e===Ce.NAME?(n=new Ce,this.sections.set(Ce.NAME,n)):e===j.NAME?(n=new j,this.sections.set(j.NAME,n)):e===Pe.NAME?(n=new Pe,this.sections.set(Pe.NAME,n)):e===X.NAME?(n=new X,this.sections.set(X.NAME,n)):e===ne.NAME?(n=new ne,this.sections.set(ne.NAME,n)):e===ie.NAME?(n=new ie,this.sections.set(ie.NAME,n)):e===re.NAME?(n=new re,this.sections.set(re.NAME,n)):e===oe.NAME?(n=new oe,this.sections.set(oe.NAME,n)):e===ae.NAME?(n=new ae,this.sections.set(ae.NAME,n)):e===le.NAME?(n=new le,this.sections.set(le.NAME,n)):e===ce.NAME?(n=new ce,this.sections.set(ce.NAME,n)):e===de.NAME?(n=new de,this.sections.set(de.NAME,n)):e===Ee.NAME?(n=new Ee,this.sections.set(Ee.NAME,n)):e===ue.NAME?(n=new ue,this.sections.set(ue.NAME,n)):e===Se.NAME?(n=new Se,this.sections.set(Se.NAME,n)):e===pe.NAME?(n=new pe,this.sections.set(pe.NAME,n)):e===_e.NAME?(n=new _e,this.sections.set(_e.NAME,n)):e===he.NAME?(n=new he,this.sections.set(he.NAME,n)):e===ge.NAME&&(n=new ge,this.sections.set(ge.NAME,n)),n&&(n.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 n=te.SECTION_ORDER[t];this.sections.has(n)&&(e[n]=this.sections.get(n).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Qi{gppVersion="1.1";supportedAPIs=[];eventQueue=new Nn(this);cmpStatus=rt.LOADING;cmpDisplayStatus=je.HIDDEN;signalStatus=Ve.NOT_READY;applicableSections=[];gppModel=new ps;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=rt.LOADING,this.cmpDisplayStatus=je.HIDDEN,this.signalStatus=Ve.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new ps,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class qt{static absCall(e,t,n,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"))},p=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=n,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=p,a.send(t)})}static post(e,t,n=!1,i=0){return this.absCall(e,JSON.stringify(t),n,i)}static fetch(e,t=!1,n=0){return this.absCall(e,null,t,n)}}let Ct=class extends Error{constructor(e){super(e),this.name="GVLError"}},Ji=class $t{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 $t.langSet.has(e)}forEach(e){$t.langSet.forEach(e)}get size(){return $t.langSet.size}},_s=class jt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Ji;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=jt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new jt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new Ct("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Ct("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 n=new jt;if(n.baseUrl=t,e.languageFilename?n.languageFilename=e.languageFilename:n.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));n.populate(await qt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;n.populate(await qt.fetch(r))}return n}async changeLanguage(e){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const n=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(await qt.fetch(n))}catch(i){throw new Ct("unable to load language: "+i.message)}}}else throw new Ct(`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,n)=>{const i=this.vendors[String(n)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(n)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(n)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(n)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(n)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(n)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(n)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(n)}),t[n]=i),t},{})}getFilteredVendors(e,t,n,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&n?o=this["by"+r+"VendorMap"][String(t)][n]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};class qi{callResponder;cmpApiContext;constructor(e,t,n){this.cmpApiContext=new Qi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new On(this.cmpApiContext,n)}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,n){this.cmpApiContext.gppModel.setFieldValue(e,t,n)}setFieldValueBySectionId(e,t,n){this.setFieldValue(te.SECTION_ID_NAME_MAP.get(e),t,n)}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 _s.fromVendorList(e)}async getGvlFromUrl(e){return _s.fromUrl(e)}}const Xi="en";var Zi=Object.defineProperty,er=(s,e,t)=>e in s?Zi(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Xt=(s,e,t)=>er(s,typeof e!="symbol"?e+"":e,t);class tr{constructor(e,t,n){Xt(this,"consentPreference"),Xt(this,"notice"),Xt(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=n}}var hs;(s=>{(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(s.IABTCFgdprApplies||(s.IABTCFgdprApplies={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(s.IABTCFPurposeOneTreatment||(s.IABTCFPurposeOneTreatment={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(s.IABTCFUseNonStandardTexts||(s.IABTCFUseNonStandardTexts={}))})(hs||(hs={}));var sr=(s=>(s.GPP_US_NATIONAL="gpp_us_national",s.GPP_US_STATE="gpp_us_state",s))(sr||{}),nr=(s=>(s.FRONTEND="frontend",s.SYSTEM_WIDE="system_wide",s.NOT_APPLICABLE="not_applicable",s))(nr||{}),Pt=(s=>(s.OPT_IN="opt_in",s.OPT_OUT="opt_out",s.NOTICE_ONLY="notice_only",s))(Pt||{}),De=(s=>(s.OPT_IN="opt_in",s.OPT_OUT="opt_out",s.ACKNOWLEDGE="acknowledge",s.NOT_APPLICABLE="not_applicable",s.TCF="tcf",s))(De||{}),wt=(s=>(s.OMIT="omit",s.INCLUDE="include",s))(wt||{}),pt=(s=>(s.BOOLEAN="boolean",s.CONSENT_MECHANISM="consent_mechanism",s))(pt||{}),Ze=(s=>(s.THROW="throw",s.WARN="warn",s.IGNORE="ignore",s))(Ze||{}),_t=(s=>(s.OVERLAY="overlay",s.BANNER_AND_MODAL="banner_and_modal",s.MODAL="modal",s.PRIVACY_CENTER="privacy_center",s.TCF_OVERLAY="tcf_overlay",s.HEADLESS="headless",s))(_t||{}),ir=(s=>(s.ALWAYS_ENABLED="always_enabled",s.ENABLED_WHERE_REQUIRED="enabled_where_required",s.ALWAYS_DISABLED="always_disabled",s))(ir||{}),rr=(s=>(s.PURPOSES="/tcf/purposes",s.FEATURES="/tcf/features",s.VENDORS="/tcf/vendors",s))(rr||{}),or=(s=>(s.OPTIONS="options",s.EXPERIENCE_TRANSLATION="language",s))(or||{}),ar=(s=>(s.PRIMARY="primary",s.SECONDARY="secondary",s.TERTIARY="tertiary",s))(ar||{}),lr=(s=>(s.ACKNOWLEDGE="acknowledge",s.OPT_IN_OPT_OUT="opt_in_opt_out",s.OPT_IN_ONLY="opt_in_only",s))(lr||{}),cr=(s=>(s.REJECT_ALL="reject_all",s.REJECT_CONSENT_ONLY="reject_consent_only",s))(cr||{}),ye=(s=>(s.BUTTON="button",s.REJECT="reject",s.ACCEPT="accept",s.SCRIPT="script",s.SAVE="save",s.DISMISS="dismiss",s.GPC="gpc",s.INDIVIDUAL_NOTICE="individual_notice",s.ACKNOWLEDGE="acknowledge",s.OT_MIGRATION="ot_migration",s))(ye||{}),dr=(s=>(s.privacy_center="privacy_center",s.overlay="overlay",s.api="api",s))(dr||{}),Er=(s=>(s.NONE="none",s.APPLIED="applied",s.OVERRIDDEN="overridden",s))(Er||{}),ur=(s=>(s.OVERLAY="overlay",s.MODAL="modal",s.BANNER="banner",s.PRIVACY_CENTER="privacy_center",s.TCF_OVERLAY="tcf_overlay",s.TCF_BANNER="tcf_banner",s))(ur||{});const Sr=(s,e)=>!!Object.keys(e).includes(s.notice_key),Zt=s=>!s||s===De.OPT_OUT?!1:s===De.OPT_IN?!0:s===De.ACKNOWLEDGE,Dt=(s,e)=>s?e===Pt.NOTICE_ONLY?De.ACKNOWLEDGE:De.OPT_IN:De.OPT_OUT,pr=s=>typeof s=="string"?Zt(s):s,_r=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var hr=Object.defineProperty,gr=Object.defineProperties,Tr=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertySymbols,Ir=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,Ts=(s,e,t)=>e in s?hr(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,mt=(s,e)=>{for(var t in e||(e={}))Ir.call(e,t)&&Ts(s,t,e[t]);if(gs)for(var t of gs(e))Or.call(e,t)&&Ts(s,t,e[t]);return s},Nr=(s,e)=>gr(s,Tr(e));const dt=s=>!s||typeof s!="object"?!1:Object.keys(s).length===0||"id"in s,Is=s=>!!(s&&s.every(e=>e.default_preference===De.OPT_IN)),Ar=s=>{if(s){if(s.location&&_r.test(s.location))return s.location.replace("-","_").toLowerCase();if(s.country&&s.region)return`${s.country.toLowerCase()}_${s.region.toLowerCase()}`}},Os=s=>s.fidesConsentOverride===ye.ACCEPT||s.fidesConsentOverride===ye.REJECT,fr=(s,e,t,n)=>{var i,r,o,a,l,d;return n!=null&&n.fidesDisableBanner||!dt(s)?!1:((i=s.experience_config)==null?void 0:i.component)===_t.TCF_OVERLAY&&e?n&&Os(n)?!1:(r=s.meta)!=null&&r.version_hash?s.meta.version_hash!==e.tcf_version_hash:!0:((o=s.experience_config)==null?void 0:o.component)===_t.MODAL||((a=s.experience_config)==null?void 0:a.component)===_t.HEADLESS||!((l=s?.privacy_notices)!=null&&l.length)?!1:t?n&&Os(n)?!1:e?.fides_meta.consentMethod===ye.GPC?!0:!((d=s.privacy_notices)!=null&&d.every(u=>Sr(u,t))):!0},Cr=s=>{if(!s)return{};try{const e=atob(s),t=JSON.parse(e);return Object.fromEntries(Object.entries(t).map(([n,i])=>[n,!!i]))}catch(e){throw new Error("Failed to decode Notice Consent string:",{cause:e})}},Pr=({consent:s,nonApplicableNotices:e,flagType:t,mode:n=wt.OMIT})=>{if(!(e!=null&&e.length))return s;const i=mt({},s);return n===wt.INCLUDE?e.forEach(r=>{i[r]=t===pt.CONSENT_MECHANISM?De.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},wr=({consent:s,flagType:e=pt.BOOLEAN,consentMechanisms:t})=>{const n={};if(e!==pt.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(s).map(([r,o])=>[r,pr(o)]));const i=Object.values(s).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(s).forEach(r=>{const o=s[r];if(typeof o=="string")n[r]=o;else{const a=t[r];n[r]=Dt(o,a)}}),n):mt({},s)},Ns=(s,e,t=[],n,i)=>{var r,o,a;const l=mt({},s),d=(r=window.Fides)==null?void 0:r.options,u=(o=d?.fidesConsentNonApplicableFlagMode)!=null?o:wt.OMIT,p=(a=d?.fidesConsentFlagType)!=null?a:pt.BOOLEAN,E={};Object.assign(E,Pr({consent:{},nonApplicableNotices:e??[],flagType:p,mode:u}));const O=t.reduce((T,H)=>Nr(mt({},T),{[H.notice_key]:H.consent_mechanism}),{});return Object.assign(E,wr({consent:l,consentMechanisms:O,flagType:p})),E};var es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Rt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */Rt.exports,function(s,e){(function(t){var n=e,i=s&&s.exports==n&&s,r=typeof es=="object"&&es;(r.global===r||r.window===r)&&(t=r);var o=function(T){this.message=T};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(T){throw new o(T)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,u=function(T){T=String(T).replace(d,"");var H=T.length;H%4==0&&(T=T.replace(/==?$/,""),H=T.length),(H%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var Y=0,z,J,se="",we=-1;++we<H;)J=l.indexOf(T.charAt(we)),z=Y%4?z*64+J:J,Y++%4&&(se+=String.fromCharCode(255&z>>(-2*Y&6)));return se},p=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var H=T.length%3,Y="",z=-1,J,se,we,Te,nt=T.length-H;++z<nt;)J=T.charCodeAt(z)<<16,se=T.charCodeAt(++z)<<8,we=T.charCodeAt(++z),Te=J+se+we,Y+=l.charAt(Te>>18&63)+l.charAt(Te>>12&63)+l.charAt(Te>>6&63)+l.charAt(Te&63);return H==2?(J=T.charCodeAt(z)<<8,se=T.charCodeAt(++z),Te=J+se,Y+=l.charAt(Te>>10)+l.charAt(Te>>4&63)+l.charAt(Te<<2&63)+"="):H==1&&(Te=T.charCodeAt(z),Y+=l.charAt(Te>>2)+l.charAt(Te<<4&63)+"=="),Y},E={encode:p,decode:u,version:"1.0.0"};if(n&&!n.nodeType)if(i)i.exports=E;else for(var O in E)E.hasOwnProperty(O)&&(n[O]=E[O]);else t.base64=E})(es)}(Rt,Rt.exports);var As=Rt.exports;/*! js-cookie v3.0.5 | MIT */function Vt(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)s[n]=t[n]}return s}var Dr={read:function(s){return s[0]==='"'&&(s=s.slice(1,-1)),s.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(s){return encodeURIComponent(s).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ts(s,e){function t(i,r,o){if(!(typeof document>"u")){o=Vt({},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+"="+s.write(r,i)+a}}function n(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]=s.read(d,u),i===u)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:n,remove:function(i,r){t(i,"",Vt({},r,{expires:-1}))},withAttributes:function(i){return ts(this.converter,Vt({},this.attributes,i))},withConverter:function(i){return ts(Vt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(s)}})}var mr=ts(Dr,{path:"/"});let Mt;const Rr=new Uint8Array(16);function Vr(){if(!Mt&&(Mt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mt(Rr)}const fe=[];for(let s=0;s<256;++s)fe.push((s+256).toString(16).slice(1));function Mr(s,e=0){return fe[s[e+0]]+fe[s[e+1]]+fe[s[e+2]]+fe[s[e+3]]+"-"+fe[s[e+4]]+fe[s[e+5]]+"-"+fe[s[e+6]]+fe[s[e+7]]+"-"+fe[s[e+8]]+fe[s[e+9]]+"-"+fe[s[e+10]]+fe[s[e+11]]+fe[s[e+12]]+fe[s[e+13]]+fe[s[e+14]]+fe[s[e+15]]}const br=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var fs={randomUUID:br};function Cs(s,e,t){if(fs.randomUUID&&!s)return fs.randomUUID();s=s||{};const n=s.random||(s.rng||Vr)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Mr(n)}var vr=(s=>(s.CONSENT="Consent",s.CONTRACT="Contract",s.LEGAL_OBLIGATIONS="Legal obligations",s.VITAL_INTERESTS="Vital interests",s.PUBLIC_INTEREST="Public interest",s.LEGITIMATE_INTERESTS="Legitimate interests",s))(vr||{}),ss=(s=>(s.CONSENT="Consent",s.LEGITIMATE_INTERESTS="Legitimate interests",s))(ss||{});const ns=407,bt=",",Lr=[{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"}],Gr=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];Lr.filter(({experienceKey:s})=>s!=="tcf_features"&&s!=="tcf_special_purposes").map(s=>s.experienceKey),ss.CONSENT.toString(),ss.LEGITIMATE_INTERESTS.toString();const yr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var Ur=Object.defineProperty,xr=Object.defineProperties,Fr=Object.getOwnPropertyDescriptors,Ps=Object.getOwnPropertySymbols,Br=Object.prototype.hasOwnProperty,Hr=Object.prototype.propertyIsEnumerable,ws=(s,e,t)=>e in s?Ur(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,kr=(s,e)=>{for(var t in e||(e={}))Br.call(e,t)&&ws(s,t,e[t]);if(Ps)for(var t of Ps(e))Hr.call(e,t)&&ws(s,t,e[t]);return s},Kr=(s,e)=>xr(s,Fr(e)),$r=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Ds="fides_consent",jr=365,vt=mr.withConverter({read(s){return decodeURIComponent(s)},write(s){return encodeURIComponent(s)}}),Yr=()=>Cs();Yr();const zr=s=>vt.get(s),Wr=()=>{const s=zr(Ds);if(s)try{return JSON.parse(s)}catch{try{return JSON.parse(As.decode(s))}catch{return}}},ms=(s,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();s.fides_meta.updatedAt=t;let n=JSON.stringify(s);e&&(n=As.encode(n));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),vt.set(Ds,n,{path:"/",domain:r,expires:jr})){const a=Wr();if(a&&a.fides_meta.updatedAt===s.fides_meta.updatedAt)break}},Qr=s=>{const e={};return Gr.forEach(({cookieKey:t})=>{var n;const i=(n=s[t])!=null?n:[];e[t]=Object.fromEntries(i.map(r=>[r.id,Zt(r.preference)]))}),e},Jr=(s,e=!0)=>{s.forEach(t=>{var n;if(vt.remove(t.name,{path:(n=t.path)!=null?n:"/",domain:t.domain}),e){const{hostname:i}=window.location;vt.remove(t.name,{domain:`.${i}`})}})},qr=s=>{const e=new Map(s.map(({notice:t,consentPreference:n})=>[t.notice_key,Zt(n)]));return Object.fromEntries(e)},Xr=(s,e)=>$r(void 0,null,function*(){return Kr(kr({},s),{consent:qr(e)})});var Zr=(s=>(s.GVL="gvl",s.AC="gacp",s))(Zr||{});const Ye=s=>{const e=s.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Lt=(s,e)=>{if(!(e!=null&&e.vendors))return;const{source:t,id:n}=Ye(s);if(t==="gvl"||t===void 0)return e.vendors[n]},eo=s=>Ye(s).source==="gacp",to=s=>{const{tcf_vendor_relationships:e=[]}=s;return e.map(t=>t.id).filter(t=>Lt(t,s.gvl)).map(t=>+Ye(t).id)},so=s=>{const e=[...s.tcf_vendor_consent_ids||[],...s.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>Lt(t,s.gvl)).map(t=>+Ye(t).id)},Rs=s=>{if(!s)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",n="",i=""]=s.split(bt);return e?{tc:e,ac:t,gpp:n,nc:i}:{tc:"",ac:"",gpp:n,nc:i}},Vs=s=>{var e;const t=s.getGppString();if(!t)return window.Fides.fides_string;const n=new Array(4).fill(""),i=(((e=window.Fides.fides_string)==null?void 0:e.split(bt))||[]).concat(n);return n.map((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},no=1,Gt={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}};var Be=(s=>(s.NATIONAL="national",s.STATE="state",s.ALL="all",s))(Be||{});function Et(s,e){return s.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function io(s){var e;if((e=s?.experience_config)!=null&&e.translations){const{translations:t}=s.experience_config,n=t.find(i=>i.is_default);return n?.language}}function ro(s,e,t){if(!t||!t.translations)return null;if(s){const i=t.translations.find(r=>Et(r.language,s));if(i)return i}return t.translations.find(i=>Et(i.language,e))||t.translations[0]||null}function oo(s,e,t){if(!t||!t.translations)return null;if(s){const i=t.translations.find(r=>Et(r.language,s));if(i)return i}return t.translations.find(i=>Et(i.language,e))||t.translations[0]||null}var ao=Object.defineProperty,lo=Object.defineProperties,co=Object.getOwnPropertyDescriptors,Ms=Object.getOwnPropertySymbols,Eo=Object.prototype.hasOwnProperty,uo=Object.prototype.propertyIsEnumerable,bs=(s,e,t)=>e in s?ao(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,vs=(s,e)=>{for(var t in e||(e={}))Eo.call(e,t)&&bs(s,t,e[t]);if(Ms)for(var t of Ms(e))uo.call(e,t)&&bs(s,t,e[t]);return s},Ls=(s,e)=>lo(s,co(e)),So=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())}),po=(s=>(s.PRIVACY_EXPERIENCE="/privacy-experience",s.PRIVACY_PREFERENCES="/privacy-preferences",s.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",s.NOTICES_SERVED="/notices-served",s))(po||{});const _o={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},ho="Fides.js",go=(s,e,t,n,i)=>So(void 0,null,function*(){var r;if((r=t.apiOptions)!=null&&r.savePreferencesFn){try{yield t.apiOptions.savePreferencesFn(s,n.consent,n.fides_string,i)}catch(l){return Promise.reject(l)}return Promise.resolve()}const o=Ls(vs({},_o),{body:JSON.stringify(Ls(vs({},e),{source:ho}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var To=Object.defineProperty,Io=Object.defineProperties,Oo=Object.getOwnPropertyDescriptors,Gs=Object.getOwnPropertySymbols,No=Object.prototype.hasOwnProperty,Ao=Object.prototype.propertyIsEnumerable,ys=(s,e,t)=>e in s?To(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,yt=(s,e)=>{for(var t in e||(e={}))No.call(e,t)&&ys(s,t,e[t]);if(Gs)for(var t of Gs(e))Ao.call(e,t)&&ys(s,t,e[t]);return s},Us=(s,e)=>Io(s,Oo(e)),Ut=(s=>(s.FIDES="fides",s.EXTERNAL="external",s))(Ut||{}),fo=(s=>(s.TOGGLE="toggle",s.BUTTON="button",s.LINK="link",s))(fo||{});const xs=(s,e,t)=>{var n,i,r,o,a,l,d,u;const p=e?yt({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const E=yt({consentMethod:p?.fides_meta.consentMethod},t);(n=t?.trigger)!=null&&n.origin||(E.trigger=Us(yt({},E.trigger),{origin:"fides"}));const O=(i=performance?.mark)==null?void 0:i.call(performance,s),T=O?.startTime,H=p;H&&p!=null&&p.consent&&(H.consent=Ns(p.consent,(o=(r=window.Fides)==null?void 0:r.experience)==null?void 0:o.non_applicable_privacy_notices,(l=(a=window.Fides)==null?void 0:a.experience)==null?void 0:l.privacy_notices));const Y=new CustomEvent(s,{detail:Us(yt({},H),{debug:!!((u=(d=window.Fides)==null?void 0:d.options)!=null&&u.debug),extraDetails:E,timestamp:T}),bubbles:!0});window.dispatchEvent(Y)}};var Co=Object.defineProperty,Po=(s,e,t)=>e in s?Co(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,wo=(s,e,t)=>Po(s,e+"",t);class Do{constructor(){wo(this,"servedNoticeHistoryId",null)}getServedNoticeHistoryId(){return this.servedNoticeHistoryId||(this.servedNoticeHistoryId=Cs()),this.servedNoticeHistoryId}reset(){this.servedNoticeHistoryId=null}hasLifecycleId(){return this.servedNoticeHistoryId!==null}}const mo=new Do;var Ro=Object.defineProperty,Vo=Object.defineProperties,Mo=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,bo=Object.prototype.hasOwnProperty,vo=Object.prototype.propertyIsEnumerable,Bs=(s,e,t)=>e in s?Ro(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,He=(s,e)=>{for(var t in e||(e={}))bo.call(e,t)&&Bs(s,t,e[t]);if(Fs)for(var t of Fs(e))vo.call(e,t)&&Bs(s,t,e[t]);return s},xt=(s,e)=>Vo(s,Mo(e)),is=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Lo=[ye.SCRIPT,ye.GPC,ye.OT_MIGRATION];function Go(s,e,t,n,i,r,o,a,l){return is(this,null,function*(){const d=(r||[]).map(p=>({preference:p.consentPreference,privacy_notice_history_id:p.noticeHistoryId||""})),u=He({browser_identity:e.identity,preferences:d,privacy_experience_config_history_id:i,user_geography:a,method:n,served_notice_history_id:l,property_id:t.property_id},o??[]);yield go(n,u,s,e,t)})}const yo=s=>is(void 0,[s],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:n,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:d,tcf:u,updateCookie:p}){var E,O,T,H,Y;if(!p&&e&&(p=we=>Xr(we,e)),!p&&!e)throw new Error("updateCookie is required");const z=xt(He({},l?.trigger),{origin:((E=l?.trigger)==null?void 0:E.origin)||(Lo.includes(i)?Ut.EXTERNAL:Ut.FIDES)}),J=yield p(a);Object.assign(a,J),Object.assign(a.fides_meta,{consentMethod:i}),xs("FidesUpdating",a,xt(He({},l),{trigger:z}));const se=Ns(a.consent,(T=(O=window.Fides)==null?void 0:O.experience)==null?void 0:T.non_applicable_privacy_notices,(Y=(H=window.Fides)==null?void 0:H.experience)==null?void 0:Y.privacy_notices);if(window.Fides.consent=se,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,ms(xt(He({},a),{consent:se}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield Go(r,a,n,i,t,e,u,o,d)}catch{}e&&e.filter(we=>we.consentPreference===De.OPT_OUT).forEach(we=>{var Te,nt;(Te=we.notice)!=null&&Te.cookies&&Jr(we.notice.cookies,(nt=n.experience_config)==null?void 0:nt.auto_subdomain_cookie_deletion)}),xs("FidesUpdated",a,xt(He({},l),{trigger:z}))}),Hs=(s,e,t,n)=>Object.entries(t).reduce((i,[r,o])=>{if(i)return i;const a=e.find(u=>u===r);if(a&&!o&&n!==ye.OT_MIGRATION)return new Error(`Provided notice key '${r}' is not applicable to the current experience.`);const l=s.find(u=>u.notice_key===r);if(!a&&!l)return new Error(`'${r}' is not a valid notice key`);const d=l?.consent_mechanism===Pt.NOTICE_ONLY;return d&&o!==!0&&o!==De.ACKNOWLEDGE&&n!==ye.OT_MIGRATION?new Error(`Invalid consent value for notice-only notice key: '${r}'. Must be \`true\` or "acknowledge"`):!d&&typeof o!="boolean"&&o!==De.OPT_IN&&o!==De.OPT_OUT?new Error(`Invalid consent value for notice key: '${r}'. Must be a boolean or "opt_in" or "opt_out"`):null},null),ks=(s,e)=>is(void 0,null,function*(){var t;const{experience:n,cookie:i,config:r,locale:o}=s;if(!n)throw new Error("Experience must be initialized before updating consent");if(!r)throw new Error("Config is not initialized");if(!i)throw new Error("Cookie is not initialized");if(!(e!=null&&e.noticeConsent)&&!(e!=null&&e.fidesString)&&!(e!=null&&e.tcf))throw new Error("Either consent object or fidesString must be provided");if(e!=null&&e.validation&&!Object.values(Ze).includes(e.validation))throw new Error(`Validation must be one of: ${Object.values(Ze).join(", ")} (default is ${Ze.THROW})`);const{noticeConsent:a,fidesString:l,validation:d=Ze.THROW,consentMethod:u=ye.SCRIPT,eventExtraDetails:p={trigger:{origin:Ut.EXTERNAL}},tcf:E,updateCookie:O}=e,{experience_config:T,privacy_notices:H,non_applicable_privacy_notices:Y}=n,z=io(n)||Xi,J=Ae=>{if(d===Ze.THROW)throw new Error(Ae);d===Ze.WARN&&console.warn(Ae)};let se=i.consent||{};if(l)try{const Ae=Rs(l);if(Ae.nc){const Je=Cr(Ae.nc);se=He(He({},i.consent),Je);const qe=Hs(H||[],Y||[],se,u);qe&&J(qe.message)}}catch(Ae){const Je=Ae instanceof Error?Ae.message:String(Ae);J(`Invalid fidesString provided: ${Je}`)}else if(a){const Ae=Hs(H||[],Y||[],a,u);Ae&&J(Ae.message),se=He(He({},i.consent),a)}const we=[];Object.entries(se).forEach(([Ae,Je])=>{const qe=H?.find(Ot=>Ot.notice_key===Ae);if(qe){const Ot=ro(o,z,qe),os=Ot?.privacy_notice_history_id;let Yt;if(typeof Je=="boolean"?Yt=Dt(Je,qe.consent_mechanism):Yt=Je,os){const Sn=new tr(qe,Yt,os);we.push(Sn)}}});let Te;if((t=T?.translations)!=null&&t.length){const Ae=oo(o,z,T);Te=Ae?.privacy_experience_config_history_id}const nt=Ar(r.geolocation),un=mo.getServedNoticeHistoryId();return yo({consentPreferencesToSave:we,privacyExperienceConfigHistoryId:Te,experience:n,consentMethod:u,options:r.options,userLocationString:nt,cookie:i,eventExtraDetails:p,servedNoticeHistoryId:un,tcf:E,updateCookie:O})});class ze extends Error{constructor(e){super(e),this.name="DecodingError"}}class ke extends Error{constructor(e){super(e),this.name="EncodingError"}}class ut extends Error{constructor(e){super(e),this.name="GVLError"}}class Ke extends Error{constructor(e,t,n=""){super(`invalid value ${t} passed for ${e} ${n}`),this.name="TCModelError"}}class rs{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 ke("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let n="";for(let i=0;i<e.length;i+=this.BASIS)n+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return n}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new ze("Invalidly encoded Base64URL string");let t="";for(let n=0;n<e.length;n++){const i=this.REVERSE_DICT.get(e[n]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class $e{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 $e.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if($e.langSet.has(e))return e;if($e.langSet.has(t))return t;const n=t+"-"+t;if($e.langSet.has(n))return n;for(const i of $e.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){$e.langSet.forEach(e)}get size(){return $e.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 ht{clone(){const e=new this.constructor;return Object.keys(this).forEach(n=>{const i=this.deepClone(this[n]);i!==void 0&&(e[n]=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 n=[];for(const i of e)n.push(this.deepClone(i));return e instanceof Array?n:new e.constructor(n)}else{const n={};for(const i in e)e.hasOwnProperty(i)&&(n[i]=this.deepClone(e[i]));return n}}}}var be;(function(s){s[s.NOT_ALLOWED=0]="NOT_ALLOWED",s[s.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",s[s.REQUIRE_LI=2]="REQUIRE_LI"})(be||(be={}));class xe extends ht{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),n=new xe;if(t.length!==2)throw new Ke("hash",e);return n.purposeId=parseInt(t[0],10),n.restrictionType=parseInt(t[1],10),n}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${xe.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===be.NOT_ALLOWED||this.restrictionType===be.REQUIRE_CONSENT||this.restrictionType===be.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class Ks extends ht{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,n){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[n];if(r)if(e===be.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case be.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case be.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const n=t.hash;this.has(n)||(this.map.set(n,new Set),this.bitLength=0),this.map.get(n).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),n=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(n))this.map.set(n,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(n).add(o)}getVendors(e){let t=[];if(e){const n=e.hash;this.has(n)&&(t=Array.from(this.map.get(n)))}else{const n=new Set;this.map.forEach(i=>{i.forEach(r=>{n.add(r)})}),t=Array.from(n)}return t.sort((n,i)=>n-i)}getRestrictionType(e,t){let n;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(n===void 0||n>i.restrictionType)&&(n=i.restrictionType)}),n}vendorHasRestriction(e,t){let n=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!n;r++)n=t.isSameAs(i[r]);return n}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((n,i)=>{e?n.has(e)&&t.push(xe.unHash(i)):t.push(xe.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,n)=>{e.add(xe.unHash(n).purposeId)}),Array.from(e)}remove(e,t){const n=t.hash,i=this.map.get(n);i&&(i.delete(e),i.size==0&&(this.map.delete(n),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,n)=>{const i=xe.unHash(n);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 $s;(function(s){s.COOKIE="cookie",s.WEB="web",s.APP="app"})($s||($s={}));var Q;(function(s){s.CORE="core",s.VENDORS_DISCLOSED="vendorsDisclosed",s.VENDORS_ALLOWED="vendorsAllowed",s.PUBLISHER_TC="publisherTC"})(Q||(Q={}));class js{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 ht{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(n=>{let i=Number.isInteger(parseInt(n,10));return i=i&&this.isValidNumber(e[n].id),i=i&&e[n].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new Ke("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[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 Ue{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class P{static encode(e,t){let n;if(typeof e=="string"&&(e=parseInt(e,10)),n=e.toString(2),n.length>t||e<0)throw new ke(`${e} too large to encode into ${t}`);return n.length<t&&(n="0".repeat(t-n.length)+n),n}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");return parseInt(e,2)}}class Ys{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");const n=new Date;return n.setTime(P.decode(e,t)*100),n}}class We{static encode(e,t){let n="";for(let i=1;i<=t;i++)n+=Ue.encode(e.has(i));return n}static decode(e,t){if(e.length!==t)throw new ze("bitfield encoding length mismatch");const n=new me;for(let i=1;i<=t;i++)Ue.decode(e[i-1])&&n.set(i);return n.bitLength=e.length,n}}class zs{static encode(e,t){e=e.toUpperCase();const n=65,i=e.charCodeAt(0)-n,r=e.charCodeAt(1)-n;if(i<0||i>25||r<0||r>25)throw new ke(`invalid language code: ${e}`);if(t%2===1)throw new ke(`numBits must be even, ${t} is not valid`);t=t/2;const o=P.encode(i,t),a=P.encode(r,t);return o+a}static decode(e,t){let n;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=P.decode(e.slice(0,r),r)+65,a=P.decode(e.slice(r),r)+65;n=String.fromCharCode(o)+String.fromCharCode(a)}else throw new ze("invalid bit length for language");return n}}class Uo{static encode(e){let t=P.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const n=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=P.encode(i.purposeId,g.purposeId),t+=P.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,d="";for(let u=0;u<o;u++){const p=r[u];if(l===0&&(a++,l=p),u===o-1||r[u+1]>n(p,r[o-1])){const E=p!==l;d+=Ue.encode(E),d+=P.encode(l,g.vendorId),E&&(d+=P.encode(p,g.vendorId)),l=0}}t+=P.encode(a,g.numEntries),t+=d})}return t}static decode(e){let t=0;const n=new Ks,i=P.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=P.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=P.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new xe(o,a),d=P.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let u=0;u<d;u++){const p=Ue.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const E=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,p){const O=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,O<E)throw new ze(`Invalid RangeEntry: endVendorId ${O} is less than ${E}`);for(let T=E;T<=O;T++)n.add(T,l)}else n.add(E,l)}}return n.bitLength=t,n}}var gt;(function(s){s[s.FIELD=0]="FIELD",s[s.RANGE=1]="RANGE"})(gt||(gt={}));class Tt{static encode(e){const t=[];let n=[],i=P.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,d=g.vendorId*2+g.singleOrRange+g.numEntries;let u=a+g.numEntries;return e.forEach((p,E)=>{r+=Ue.encode(p),o=e.maxId>d&&u<l,o&&p&&(e.has(E+1)?n.length===0&&(n.push(E),u+=g.singleOrRange,u+=g.vendorId):(n.push(E),u+=g.vendorId,t.push(n),n=[]))}),o?(i+=String(gt.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(gt.FIELD),i+=r),i}static decode(e,t){let n,i=0;const r=P.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=P.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===gt.RANGE){if(n=new me,t===1){if(e.substr(i,1)==="1")throw new ze("Unable to decode default consent=1");i++}const a=P.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const d=Ue.decode(e.charAt(i));i+=g.singleOrRange;const u=P.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,d){const p=P.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let E=u;E<=p;E++)n.set(E)}else n.set(u)}}else{const a=e.substr(i,r);i+=r,n=We.decode(a,r)}return n.bitLength=i,n}static buildRangeEncoding(e){const t=e.length;let n=P.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;n+=Ue.encode(!r),n+=P.encode(i[0],g.vendorId),r||(n+=P.encode(i[1],g.vendorId))}),n}}function Ws(){return{[S.version]:P,[S.created]:Ys,[S.lastUpdated]:Ys,[S.cmpId]:P,[S.cmpVersion]:P,[S.consentScreen]:P,[S.consentLanguage]:zs,[S.vendorListVersion]:P,[S.policyVersion]:P,[S.isServiceSpecific]:Ue,[S.useNonStandardTexts]:Ue,[S.specialFeatureOptins]:We,[S.purposeConsents]:We,[S.purposeLegitimateInterests]:We,[S.purposeOneTreatment]:Ue,[S.publisherCountryCode]:zs,[S.vendorConsents]:Tt,[S.vendorLegitimateInterests]:Tt,[S.publisherRestrictions]:Uo,segmentType:P,[S.vendorsDisclosed]:Tt,[S.vendorsAllowed]:Tt,[S.publisherConsents]:We,[S.publisherLegitimateInterests]:We,[S.numCustomPurposes]:P,[S.publisherCustomConsents]:We,[S.publisherCustomLegitimateInterests]:We}}class xo{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 Fo{1=[Q.CORE];2=[Q.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(Q.PUBLISHER_TC);else{const n=!!(t&&t.isForVendors);(!n||e[S.supportOOB]===!0)&&this[2].push(Q.VENDORS_DISCLOSED),n&&(e[S.supportOOB]&&e[S.vendorsAllowed].size>0&&this[2].push(Q.VENDORS_ALLOWED),this[2].push(Q.PUBLISHER_TC))}}}class Qs{static fieldSequence=new xo;static encode(e,t){let n;try{n=this.fieldSequence[String(e.version)][t]}catch{throw new ke(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==Q.CORE&&(i=P.encode(js.KEY_TO_ID[t],g.segmentType));const r=Ws();return n.forEach(o=>{const a=e[o],l=r[o];let d=g[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[S.numCustomPurposes]));try{i+=l.encode(a,d)}catch(u){throw new ke(`Error encoding ${t}->${o}: ${u.message}`)}}),rs.encode(i)}static decode(e,t,n){const i=rs.decode(e);let r=0;n===Q.CORE&&(t.version=P.decode(i.substr(r,g[S.version]),g[S.version])),n!==Q.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][n],a=Ws();return o.forEach(l=>{const d=a[l];let u=g[l];if(u===void 0&&this.isPublisherCustom(l)&&(u=Number(t[S.numCustomPurposes])),u!==0){const p=i.substr(r,u);if(d===Tt?t[l]=d.decode(p,t.version):t[l]=d.decode(p,u),Number.isInteger(u))r+=u;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new ze(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Bo{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const n=new Map;return n.set("legIntPurposes",e.vendorLegitimateInterests),n.set("purposes",e.vendorConsents),n.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 p=0,E=d.length;p<E&&!u;p++)u=d[p].restrictionType===be.REQUIRE_CONSENT&&r==="purposes"||d[p].restrictionType===be.REQUIRE_LI&&r==="legIntPurposes";u||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const n=e.gvl;if(!n)throw new ke("Unable to encode TCModel without a GVL");if(!n.isReady)throw new ke("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=n.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 ke(`Invalid version: ${e.version}`);return this.processor[i](e,n)}}class Ho{static absCall(e,t,n,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"))},p=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=n,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=p,a.send(t)})}static post(e,t,n=!1,i=0){return this.absCall(e,JSON.stringify(t),n,i)}static fetch(e,t=!1,n=0){return this.absCall(e,null,t,n)}}class A extends ht{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new $e;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new ut("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 n=A.baseUrl,i=t?.language;if(i)try{i=A.consentLanguages.parseLanguage(i)}catch(r){throw new ut("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(!n)throw new ut("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()):(n+=A.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(n))}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(n+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 Ho.fetch(e))}catch(t){throw new ut(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 ut("Error during parsing the language: "+i.message)}const n=e.toUpperCase();if(!(t.toLowerCase()===A.DEFAULT_LANGUAGE.toLowerCase()&&!A.LANGUAGE_CACHE.has(n))&&t!==this.lang_)if(this.lang_=t,A.LANGUAGE_CACHE.has(n)){const i=A.LANGUAGE_CACHE.get(n);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_=n,this.cacheLanguage()}catch(r){throw new ut("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,n)=>{const i=this.vendors_[String(n)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(n)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(n)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(n)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(n)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(n)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(n)}),t[n]=i),t},{})}getFilteredVendors(e,t,n,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&n?o=this["by"+r+"VendorMap"][String(t)][n]: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 Js extends ht{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 Ks;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((n,i)=>Number(n)-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 ko{static encode(e,t){let n="",i;return e=Bo.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new Fo(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),n+=Qs.encode(e,r)+a}),n}static decode(e,t){const n=e.split("."),i=n.length;t||(t=new Js);for(let r=0;r<i;r++){const o=n[r],l=rs.decode(o.charAt(0)).substr(0,g.segmentType),d=js.ID_TO_KEY[P.decode(l,g.segmentType).toString()];Qs.decode(o,t,d)}return t}}var Qe;(function(s){s.PING="ping",s.GET_TC_DATA="getTCData",s.GET_IN_APP_TC_DATA="getInAppTCData",s.GET_VENDOR_LIST="getVendorList",s.ADD_EVENT_LISTENER="addEventListener",s.REMOVE_EVENT_LISTENER="removeEventListener"})(Qe||(Qe={}));var Ft;(function(s){s.STUB="stub",s.LOADING="loading",s.LOADED="loaded",s.ERROR="error"})(Ft||(Ft={}));var Bt;(function(s){s.VISIBLE="visible",s.HIDDEN="hidden",s.DISABLED="disabled"})(Bt||(Bt={}));var qs;(function(s){s.TC_LOADED="tcloaded",s.CMP_UI_SHOWN="cmpuishown",s.USER_ACTION_COMPLETE="useractioncomplete"})(qs||(qs={}));class Ht{listenerId;callback;next;param;success=!0;constructor(e,t,n,i){Object.assign(this,{callback:e,listenerId:n,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 kt extends Ht{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Zs(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 Ko{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 kt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class Ne{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new Ko;static cmpStatus=Ft.LOADING;static disabled=!1;static displayStatus=Bt.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=Ft.LOADING,this.disabled=!1,this.displayStatus=Bt.HIDDEN,this.eventQueue.clear()}}class Xs{cmpId=Ne.cmpId;cmpVersion=Ne.cmpVersion;gdprApplies=Ne.gdprApplies;tcfPolicyVersion=Ne.tcfPolicyVersion}class Zs extends Xs{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=Ne.eventStatus,this.cmpStatus=Ne.cmpStatus,this.listenerId=t,Ne.gdprApplies){const n=Ne.tcModel;this.tcString=Ne.tcString,this.isServiceSpecific=n.isServiceSpecific,this.useNonStandardTexts=n.useNonStandardTexts,this.purposeOneTreatment=n.purposeOneTreatment,this.publisherCC=n.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(n.vendorsAllowed,e),disclosedVendors:this.createVectorField(n.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(n.purposeConsents),legitimateInterests:this.createVectorField(n.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(n.vendorConsents,e),legitimateInterests:this.createVectorField(n.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(n.specialFeatureOptins),this.publisher={consents:this.createVectorField(n.publisherConsents),legitimateInterests:this.createVectorField(n.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(n.publisherCustomConsents),legitimateInterests:this.createVectorField(n.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(n.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const n=e.getMaxVendorId();for(let i=1;i<=n;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((n,i)=>(n[String(i)]=e.has(Number(i)),n),{}):[...e].reduce((n,i)=>(n[i[0].toString(10)]=i[1],n),{})}}class $o extends Zs{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,n)=>(t+=n[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const n=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(n)});for(let i=0;i<n;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 jo extends Xs{cmpLoaded=!0;cmpStatus=Ne.cmpStatus;displayStatus=Ne.displayStatus;apiVersion=String(Ne.apiVersion);gvlVersion;constructor(){super(),Ne.tcModel&&Ne.tcModel.vendorListVersion&&(this.gvlVersion=+Ne.tcModel.vendorListVersion)}}class Yo extends Ht{respond(){this.invokeCallback(new jo)}}class zo extends kt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new $o(this.param))}}class Wo extends Ht{respond(){const e=Ne.tcModel,t=e.vendorListVersion;let n;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?n=e.gvl:n=new A(this.param),n.readyPromise.then(()=>{this.invokeCallback(n.getJson())})}}class Qo extends kt{respond(){this.listenerId=Ne.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class Jo extends Ht{respond(){this.invokeCallback(Ne.eventQueue.remove(this.param))}}class xa{static[Qe.PING]=Yo;static[Qe.GET_TC_DATA]=kt;static[Qe.GET_IN_APP_TC_DATA]=zo;static[Qe.GET_VENDOR_LIST]=Wo;static[Qe.ADD_EVENT_LISTENER]=Qo;static[Qe.REMOVE_EVENT_LISTENER]=Jo}const qo=s=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=s.detail;if(e){const[t]=e.split(bt);return t.split(".")[0]}return e??""};var Xo=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Zo=1,en=[1,3,4,5,6],ea=2,ta=({userConsentedVendorIds:s,disclosedVendorIds:e})=>{const t=r=>r.filter(eo).map(o=>Ye(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),n=t(s),i=t(e.filter(r=>!s.includes(r)));return`${ea}~${n}~dv.${i}`},sa=s=>Xo(void 0,[s],function*({experience:e,tcStringPreferences:t}){var n,i,r,o;let a="";try{const l=new Js(new A(e.gvl));yield l.gvl.readyPromise,l.cmpId=ns,l.cmpVersion=Zo,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?so(e):to(e);if(l.gvl.narrowVendorsTo(d),t){t.vendorsConsent.forEach(E=>{var O,T,H;if(Lt(E,e.gvl)){const{id:Y}=Ye(E);if(l.vendorConsents.set(+Y),!((O=e.tcf_publisher_restrictions)!=null&&O.length)){const z=(T=e.gvl)==null?void 0:T.vendors[Y];z&&!((H=z?.purposes)!=null&&H.length)&&z.flexiblePurposes.forEach(J=>{const se=new xe;se.purposeId=J,se.restrictionType=be.REQUIRE_CONSENT,l.publisherRestrictions.add(+Y,se)})}}}),t.vendorsLegint.forEach(E=>{var O,T;if(e.minimal_tcf)(O=e.tcf_vendor_legitimate_interest_ids)==null||O.forEach(H=>{const{id:Y}=Ye(H);l.vendorLegitimateInterests.set(+Y)});else if(Lt(E,e.gvl)){const H=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(J=>J.id===E)[0],Y=H?.purpose_legitimate_interests;let z=!1;if(Y&&(Y.map(J=>J.id).filter(J=>en.includes(J)).length&&(z=!0),!z)){const{id:J}=Ye(E);l.vendorLegitimateInterests.set(+J)}}}),Object.values((i=(n=e.gvl)==null?void 0:n.vendors)!=null?i:{}).forEach(E=>{var O,T;(O=E.specialPurposes)!=null&&O.length&&!((T=E.legIntPurposes)!=null&&T.length)&&l.vendorLegitimateInterests.set(E.id)}),t.purposesConsent.forEach(E=>{l.purposeConsents.set(+E)}),t.purposesLegint.forEach(E=>{const O=+E;en.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 T=new xe;T.purposeId=E.purpose_id,T.restrictionType=E.restriction_type,l.publisherRestrictions.add(O,T)})}),a=ko.encode(l,{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),p=ta({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:u??[]});a=`${a}${bt}${p}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var na=Object.defineProperty,ia=Object.defineProperties,ra=Object.getOwnPropertyDescriptors,tn=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,aa=Object.prototype.propertyIsEnumerable,sn=(s,e,t)=>e in s?na(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,la=(s,e)=>{for(var t in e||(e={}))oa.call(e,t)&&sn(s,t,e[t]);if(tn)for(var t of tn(e))aa.call(e,t)&&sn(s,t,e[t]);return s},ca=(s,e)=>ia(s,ra(e)),da=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const et=({modelList:s,enabledIds:e})=>s?s.map(t=>{const n=Dt(e.includes(`${t.id}`));return{id:t.id,preference:n}}):[],tt=s=>s!=null&&s.length?s.map(e=>{const t=Dt(!0);let n=e;return Number.isNaN(parseInt(e,10))||(n=parseInt(e,10)),{id:n,preference:t}}):[],Ea=({experience:s,enabledIds:e})=>{const t=[],n=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=s.tcf_system_consents)!=null&&a.map(l=>l.id).includes(o)?t.push(o):n.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=s.tcf_system_legitimate_interests)!=null&&a.map(l=>l.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:et({modelList:s.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:et({modelList:s.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:et({modelList:s.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:et({modelList:s.tcf_vendor_consents,enabledIds:n}),vendor_legitimate_interests_preferences:et({modelList:s.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:et({modelList:s.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:et({modelList:s.tcf_system_legitimate_interests,enabledIds:i})}},ua=({experience:s,enabledIds:e})=>{const t=[],n=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=s.tcf_system_consent_ids)!=null&&a.includes(o)?t.push(o):n.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=s.tcf_system_legitimate_interest_ids)!=null&&a.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:tt(e.purposesConsent),purpose_legitimate_interests_preferences:tt(e.purposesLegint),special_feature_preferences:tt(e.specialFeatures),vendor_consent_preferences:tt(n),vendor_legitimate_interests_preferences:tt(r),system_consent_preferences:tt(t),system_legitimate_interests_preferences:tt(i)}},Sa=(s,e,t,n,i,r)=>da(void 0,null,function*(){var o;const a=yield sa({tcStringPreferences:t,experience:n});return ca(la({},s),{fides_string:a,tcf_consent:Qr(e),tcf_version_hash:(o=n.meta)==null?void 0:o.version_hash})}),Kt="us",pa=s=>s?.toLowerCase().startsWith("us"),_a=({experienceRegion:s,usApproach:e})=>pa(s)&&e===Be.NATIONAL?Kt:s,ha=({gppApi:s,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:n,cmpApiField:i})=>{const r=i===N.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:n&&(o=1),s.setFieldValue(e,i,o)})},nn=s=>{const{region:e,gpp_settings:t,privacy_notices:n}=s;let i=_a({experienceRegion:e,usApproach:t?.us_approach}),r=Gt[i];return!r&&t?.us_approach===Be.ALL&&(i=Kt,r=Gt[i]),r&&t?.us_approach===Be.ALL&&(n!=null&&n.some(o=>{var a;return(a=o.gpp_field_mapping)==null?void 0:a.find(l=>l.region===e)})||(i=Kt,r=Gt[i])),!r||i===Kt&&t?.us_approach===Be.STATE?{}:{gppRegion:i,gppSection:r}},ga=({gppApi:s,gppRegion:e,gppSection:t,privacyNotices:n,noticeConsent:i})=>{i&&n.forEach(r=>{var o;const{notice_key:a,gpp_field_mapping:l}=r,d=i[a],u=(o=l?.find(p=>p.region===e))==null?void 0:o.mechanism;u&&u.forEach(p=>{let E=p.not_available;d===!1?E=p.opt_out:d&&(E=p.not_opt_out);let O=+E;E.length>1&&(O=E.split("").map(T=>+T)),s.setFieldValue(t.name,p.field,O)})})},Ta=({gppApi:s,gppRegion:e,gppSection:t,privacyNotices:n})=>{n.forEach(i=>{var r;const{gpp_field_mapping:o}=i,a=(r=o?.find(l=>l.region===e))==null?void 0:r.notice;a&&a.forEach(l=>{s.setFieldValue(t.name,l,1)})})},Ia=[1,3,4,5,6],Oa=({cmpApi:s,experience:e})=>{const t={},{privacy_notices:n=[]}=e,{gppRegion:i,gppSection:r}=nn(e);return!i||!r||n.forEach(o=>{var a;const{notice_key:l,gpp_field_mapping:d}=o,u=(a=d?.find(p=>p.region===i))==null?void 0:a.mechanism;if(u){const p=u.some(E=>{const O=s.getFieldValue(r.name,E.field),T=Array.isArray(O)?O.join(""):String(O);return T===E.opt_out?!0:(E.not_opt_out,!1)});p!==void 0&&(t[l]=!p)}}),t},Na=({cmpApi:s,experience:e})=>{var t,n,i,r;const o=yr,a=s.getSection(j.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}`),p=a.VendorLegitimateInterests.map(E=>`gvl.${E}`);return o.purposesConsent=l,o.purposesLegint=d.filter(E=>!Ia.includes(parseInt(E,10))),o.vendorsConsent=u,o.vendorsLegint=p,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=((n=e.tcf_features)==null?void 0:n.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},Aa=({fidesString:s,cmpApi:e})=>{const{gpp:t}=Rs(s);if(!s||!t||!e)return;const{locale:n}=window.Fides,i=window.Fides.experience;if(!i||!i.experience_config||!i.privacy_notices)return;const r=i.experience_config.component===_t.TCF_OVERLAY;if(!i.experience_config.translations.find(d=>Et(d.language,n)))return;e.setGppString(t),e.setSignalStatus(Ve.READY);const o=i.privacy_notices.map(d=>({notice:d,bestTranslation:d.translations.find(u=>Et(u.language,n))||null}));let a,l;if(r){const d=Na({cmpApi:e,experience:i});l=i.minimal_tcf?ua({experience:i,enabledIds:d}):Ea({experience:i,enabledIds:d}),a=p=>Sa(p,l,d,i);const u={};o.forEach(p=>{p.notice.consent_mechanism!==Pt.NOTICE_ONLY?u[p.notice.notice_key]=d.purposesConsent.includes(p.notice.id):u[p.notice.notice_key]=!0}),ks(window.Fides,{noticeConsent:u,tcf:l,updateCookie:a})}else{const d=Oa({cmpApi:e,experience:i});ks(window.Fides,{noticeConsent:d})}},rn="__gppLocator",on=s=>{if(!window.frames[s])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=s,window.document.body.appendChild(e)}else setTimeout(()=>on(s),5)},fa=s=>{let e=window,t;for(;e;){try{if(e.frames[s]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},Ca=s=>typeof s=="object"&&s!=null&&"__gppCall"in s,Pa=()=>{const s=[],e=[];let t;const n=(r,o,a,l)=>{if(r==="queue")return s;if(r==="events")return e;const d={gppVersion:"1.1",cmpStatus:rt.STUB,cmpDisplayStatus:je.HIDDEN,signalStatus:Ve.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 p=0;p<e.length;p++)if(e[p].id===a){e.splice(p,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):s.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(!Ca(a))return null;if(a.__gppCall&&window.__gpp){const l=a.__gppCall;window.__gpp(l.command,(d,u)=>{const p={__gppReturn:{returnValue:d,success:u,callId:l.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(p):p,"*")},"parameter"in l?l.parameter:void 0,"version"in l?l.version:"1.1")}return null};fa(rn)||(on(rn),window.__gpp=n,window.addEventListener("message",i,!1))},an=(s,{cmpApi:e,experience:t,cookie:n})=>{const{gppRegion:i,gppSection:r}=nn(t);if(!i||!r)return[];const o=new Set;o.add(r),s({gppApi:e,gppRegion:i,gppSection:r,privacyNotices:t.privacy_notices||[],noticeConsent:n?.consent});const{gpp_settings:a}=t;return ha({gppApi:e,sectionName:r.name,gppSettings:a}),Array.from(o)},ln=({cmpApi:s,experience:e})=>an(Ta,{cmpApi:s,experience:e}),cn=({cmpApi:s,cookie:e,experience:t})=>an(ga,{cmpApi:s,cookie:e,experience:t}),dn=(s,e,t)=>s?e?!0:!!(t&&Object.entries(s).some(([n,i])=>n in t.map(r=>r.notice_key)&&i!==void 0)):!1,En=(s,e)=>{if(!dt(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 n=qo(s);return n?(e.setFieldValueBySectionId(j.ID,"CmpId",ns),e.setSectionStringById(j.ID,n),!0):!1},wa=()=>{const s=[];if(dt(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&s.push(`${j.ID}:${j.NAME}`),(e.us_approach===Be.NATIONAL||e.us_approach===Be.ALL)&&s.push(`${X.ID}:${X.NAME}`),(e.us_approach===Be.STATE||e.us_approach===Be.ALL)&&Object.values(Gt).forEach(t=>{t.id!==X.ID&&s.push(`${t.id}:${t.name}`)}))}return s},Da=()=>{Pa();const s=new qi(ns,no);s.setCmpStatus(rt.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:n,saved_consent:i,options:r}=window.Fides,o=wa();if(s.setSupportedAPIs(o),!dt(n))return;const{fidesString:a}=r;if(a&&Aa({fidesString:a,cmpApi:s}),!a&&(!fr(n,e.detail,i,r)||!r.tcfEnabled&&Is(n.privacy_notices)&&!dn(i,e.detail.fides_string,n.privacy_notices))){const l=En(e,s);l&&s.setApplicableSections([j.ID]);const d=ln({cmpApi:s,experience:n}),u=cn({cmpApi:s,cookie:e.detail,experience:n});u.length&&s.setApplicableSections(u.map(E=>E.id)),!l&&!d.length&&!u.length&&s.setApplicableSections([-1]),s.setSignalStatus(Ve.READY);const p=Vs(s);window.Fides.fides_string=p}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:n,options:i}=window.Fides;if(dt(t)){!i.tcfEnabled&&Is(t.privacy_notices)&&!dn(n,e.detail.fides_string,t.privacy_notices)?s.setSignalStatus(Ve.READY):s.setSignalStatus(Ve.NOT_READY),s.setCmpDisplayStatus(je.VISIBLE);const r=ln({cmpApi:s,experience:t});r.length&&(s.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{s.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(s.setCmpDisplayStatus(je.HIDDEN),s.setSignalStatus(Ve.READY))}),window.addEventListener("FidesUpdated",e=>{if(s.setCmpDisplayStatus(je.HIDDEN),En(e,s)&&(s.setApplicableSections([j.ID]),s.fireSectionChange("tcfeuv2")),dt(window.Fides.experience)){const t=cn({cmpApi:s,cookie:e.detail,experience:window.Fides.experience});t.length&&(s.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{s.fireSectionChange(i.name)}));const n=Vs(s);window.Fides.cookie&&(window.Fides.fides_string=n,window.Fides.cookie.fides_string=n,ms(window.Fides.cookie,window.Fides.options.base64Cookie))}s.setSignalStatus(Ve.READY)})};window.addEventListener("FidesInitializing",s=>{var e;(e=s.detail.extraDetails)!=null&&e.gppEnabled&&Da()});