ethyca-fides 2.63.3rc0__py2.py3-none-any.whl → 2.64.1b0__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.
- {ethyca_fides-2.63.3rc0.dist-info → ethyca_fides-2.64.1b0.dist-info}/METADATA +2 -2
- {ethyca_fides-2.63.3rc0.dist-info → ethyca_fides-2.64.1b0.dist-info}/RECORD +249 -242
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/ba414a58ba90_create_manual_task_config_tables.py +121 -0
- fides/api/api/v1/endpoints/connection_endpoints.py +16 -3
- fides/api/api/v1/endpoints/oauth_endpoints.py +8 -2
- fides/api/db/base.py +4 -0
- fides/api/models/attachment.py +37 -23
- fides/api/models/manual_tasks/__init__.py +6 -0
- fides/api/models/manual_tasks/manual_task.py +11 -1
- fides/api/models/manual_tasks/manual_task_config.py +136 -0
- fides/api/models/manual_tasks/manual_task_log.py +13 -9
- fides/api/schemas/connection_configuration/connection_config.py +19 -4
- fides/api/schemas/manual_tasks/manual_task_config.py +311 -0
- fides/api/schemas/manual_tasks/manual_task_schemas.py +1 -1
- fides/api/schemas/manual_tasks/manual_task_status.py +1 -1
- fides/api/schemas/privacy_request.py +2 -0
- fides/api/service/connectors/query_configs/saas_query_config.py +15 -0
- fides/api/service/privacy_request/attachment_handling.py +132 -0
- fides/api/service/privacy_request/dsr_package/dsr_report_builder.py +264 -46
- fides/api/service/privacy_request/dsr_package/templates/attachments_index.html +33 -0
- fides/api/service/privacy_request/dsr_package/templates/collection_index.html +34 -9
- fides/api/service/privacy_request/dsr_package/templates/main.css +45 -2
- fides/api/service/privacy_request/dsr_package/templates/welcome.html +12 -8
- fides/api/service/privacy_request/request_runner_service.py +258 -139
- fides/api/service/storage/gcs.py +15 -3
- fides/api/service/storage/s3.py +28 -14
- fides/api/service/storage/util.py +45 -7
- fides/api/tasks/csv_utils.py +170 -0
- fides/api/tasks/encryption_utils.py +42 -0
- fides/api/tasks/storage.py +85 -91
- fides/api/util/cache.py +6 -3
- fides/api/util/saas_util.py +1 -0
- fides/config/redis_settings.py +105 -44
- fides/service/manual_tasks/manual_task_config_service.py +370 -0
- fides/service/manual_tasks/manual_task_service.py +231 -87
- fides/service/manual_tasks/utils.py +185 -0
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1040-630c7f4284dc6f70.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1100-d43cb04522a6505c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1316-6cc72a45ebf7ff81.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1817-b4688ba5042ec687.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2430-b480401d44c55416.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2599-6c4d22e75028d8b6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2921-aabf41bf3d7573f9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3450-bdaeb35442d810b4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3505-a79256cd851dfab4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3513-8677ee280eaef0da.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3855-0dec3e7d9e886550.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3872-ffa16c2df7ef0ab6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3923-5d580fbb1dd6ae01.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/401-fceaae662cfca5a5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4060-71cd041e5a57ca5a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/409-037cfc3f096150f0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4121-78a76e980acbd539.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4230-1cdb7ea1be370ed3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/431-f72599f01b98f07d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4481-f597a7cf03f8c9e1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5309-4511df9708d5a63c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5574-3cd33b3a6c937899.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6277-3fb4c7fc790a6d20.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6662-cb11881dcaabe5e2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6853-a4097260e402980e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6882-3cc73d407a088d7d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/69-6889d6674c95e7b5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6954-13a25cef3a8fdd76.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/699-8ca44b0de9fa20f0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7553-a95939c32d54b5b7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/79-5670e31eb65d0a53.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/796-9a6b13c838e25538.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/8433-adb1fcb29d82f1b7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9046-fdf53cc7e926a8c1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{905-8ab919e7b274ed50.js → 905-742074a074be1055.js} +2 -2
- fides/ui-build/static/admin/_next/static/chunks/9226-ba6587e46ec7659a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9392.81edc11e3a175275.js → 9392.25024e070026343d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9676.e60a53f1f5890847.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9767-e49b065d03ce4e80.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9951-f9ab5cac7e2c05ab.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/404-ac2f0844e5c4b4cd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-f70bffa5a7903c46.js → _app-8ec6e466f3373ac0.js} +10 -10
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-0a5f2310ce6b1059.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-00cb904825aad7e3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-587e21d14e0a5196.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/add-vendors-fa7305b88c1afd20.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-f140ec9d8e8a0f7a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-0edb7c92518e7d21.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-d8d926f0735a2546.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/[id]-5c949f2e3cef2398.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/new-130155cfb4a0bcc7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-1135ad8924d32c36.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/properties-776855e370414beb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-21c23f75ff1135d9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent-4d5ea70a77df1bb8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-18e3faf7963962e4.js → [resourceUrn]-c623d6f1a61c8ea9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-030ee304cbe5e530.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-cfac259a30641e68.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-7320524a47104798.js → [resourceUrn]-57bd5cdf784f059f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-7b5aec33da578745.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-c948f93c833d4358.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-333f53caab751428.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-27205f8457a1ecb0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-20a1043f6a06198f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-4c526db0c30c488a.js → [resourceUrn]-06edce289876dea1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-6f27dbb7c8edc69d.js → detection-faf326a6200637d0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-562d2b8ae90dd1f0.js → [resourceUrn]-64acf269256ee74f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-fe7f51502eda57c9.js → discovery-8c3e4be6d36da66d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datamap-fb50de22f83edd4a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-41ab27c4195cfa93.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-6e2caba24b3e78c2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-904d43e31157aa55.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-d4e31a1c4a58800e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-8f7d16bc5e9229c8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-4a33dd0371dbaebc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-e88509346b2d2851.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-8f9b8890018e1ea5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{fides-js-docs-80b241bf6cddb72e.js → fides-js-docs-5d8fd1af75f19e2f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/index-1adb6bcb71701ac2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-fdc2964fa7d1d8fd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-adc286ff254e7f41.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-9b4d1d61c7c97509.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-f8fd4795e260887c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-aa744ae8b61e5ff2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-3407158757fb3627.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-47e947c02ae90fd0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-24f9a44512ce8827.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-e567a69f8c37fb9a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-35a33f9c7def2220.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-780e18dde8e38099.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-7a17dffa515e5560.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-91dd0039cc2b70bc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-b01cbbaac34dadbc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-a15410de7f1d0f84.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-1a1aa83a3f88844c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-c4e1b69fb5bab61a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/[id]-19737d4f21aadbee.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/add-property-9ccb295110feee20.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties-3a1037a2e036212a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-4cdbbb8cd1d8698e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-965cc21889b25e44.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-0e1c381d488a7ada.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-d0e350d2a2667883.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-7796fbf458f8f159.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-6f866bc799a5f67f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-0b44b2b224077dcd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-5d00e1155bd11178.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-d2cdbe770683e9df.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/locations-811dadb489f23d7d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-24108f615ff5e1e7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/regulations-54f142bc3e4c95ba.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-fef247a87baeb080.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-6eb886e7b7e6785b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-7b71274334c559a4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-18534d2a79a3850b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-75d41fde668b9025.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-dd43755b687c09a7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/webpack-0a61b5bd21a41fe6.js +1 -0
- fides/ui-build/static/admin/_next/static/css/c693338e3bc8dcc6.css +1 -0
- fides/ui-build/static/admin/_next/static/nRQ3pmK_d3F5PJE39rP2h/_buildManifest.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/images/connector-logos/salesforce.svg +41 -0
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-preview.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
- fides/ui-build/static/admin/lib/fides.js +2 -2
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/poc/table-migration.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about/alpha.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/api/service/privacy_request/dsr_package/templates/item.html +0 -37
- fides/ui-build/static/admin/_next/static/chunks/1099-667e84655846e78c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1100-0b01f500b1eaf60d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1817-951f58ddd5d46081.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1904-964f8eb328dc2715.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2310-744354001d01f366.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2921-49af55ad7c631c93.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3119-e36ae5071c8f27a5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3505-113f9c95d34b7aae.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3513-5c2d412a84a78971.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3872-45cc725e241211f0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3923-b4f701ada3ef0ee0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/401-7e800aed05537126.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4060-90a52a9afc655bfc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4121-66b0e00d5e7ae817.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4132-9b1731bfec6ee537.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4481-7f6710c928bb0cb0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5258-2079138c8cc34f6c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5404-2694509cf5fa96da.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5487-2cbd8d2169eb2a65.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5683-37137111b3e769fb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6202-081545c7822d09af.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6277-459e054b2702c60e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/641-7e4eef3222cbda70.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6853-688df0b88fe65fd5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/69-00cba94689b9e740.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6954-4e313b4599b8763d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7553-08bc3d9f66695111.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/79-fc548561beed136f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/796-d6586308ed44334b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7980-736f9fd1e749ddd2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8032-74d94f7bd5b81c89.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8433-51870336908fb253.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8499-1fd392d0be9e8ee4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8702-d1c8296f9f6afc10.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9033-fdd87182c15b91e2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9187-851756440f79cd75.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9327-6a53461c9764b16f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9494-1ffb888b95289891.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9676.61cf5f6d6a083175.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-afd674014a1d1152.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/404-ec04f826f3dd79ea.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-1bec086d567aacff.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-f68bf100e4e60e88.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-effde5cfe49de55f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/add-vendors-ec95ed8cb0712828.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-4cc195e15e0c3cc8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-be8972c79fb39705.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-ccf96207de3b74ea.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/[id]-b9823cc008372cee.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/new-373f5772ab41bc93.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-b9beeee1bde5ca79.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/properties-6ab3a5baafebd199.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-8562790ae07f17c9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent-42d4d2d6e0253671.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-9d1df6d890671b0c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-7eb08af333baaa8e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-bb57eed84f59a932.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-47eb34aef3e31ac6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-76cefefc53e84c7f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-9d8e84a8b4bf568d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-f208fef5e72dafd6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datamap-db45aa864e9dda8a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-d5cfdebc74654337.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-618b89228f83435e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-12fc86f15a4c764e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-c23d18a9b56c2e3c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-e3b2d8e3980ab093.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-6e27257eccf65f01.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-bbac1f624424282d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-84eb56f5a07bdf4f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/index-773182b5e35d0045.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-eb28c927da5bd653.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-781808bca01f8048.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-b51bee8680d66b20.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-1de479533f733fbd.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-7dc295b3ed3d2224.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-f64dac3392f5ded7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-eb020bfac4bee532.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-0bd62e28b539e114.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-936877004113c2a6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-6416f01524482af9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-3f4e1313d1f2969b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-1db7a54437db7db0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-64236fd0141414fd.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-8cab04871908cfeb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-150d40428245ee0c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-b6c876dceb16ad1b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-20cdb2c8a03deae1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/[id]-54bcc875592d1fb9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/add-property-644dc669b508a79a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties-9a88220d03e7e02f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-70dc1081df37ea69.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-3c71b4dbcb6fd6c9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-7cb16e0000dd16c9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-a18d8f12ee8dcf5d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-dc220e116ad5c09e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-55ddc5f25b86f28e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-5ca7decded228bc8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-a6fafa1be2834c40.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-e633750d2b45ddd6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/locations-3948686cbd372969.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-04ece499c22d23f4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/regulations-7752305084280cca.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-9e5f9066be6f218d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-86de9e6d72098e45.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-cac52e6c3abf6a15.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-60d5930b6855679b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-b0f4c34752d32c73.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-7dee83dd6d9292aa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/webpack-8457bad7859c44f0.js +0 -1
- fides/ui-build/static/admin/_next/static/css/1fdf5c593349dbc6.css +0 -1
- fides/ui-build/static/admin/_next/static/f_8LkSZkhtDM14f8gbC0b/_buildManifest.js +0 -1
- {ethyca_fides-2.63.3rc0.dist-info → ethyca_fides-2.64.1b0.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.63.3rc0.dist-info → ethyca_fides-2.64.1b0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.63.3rc0.dist-info → ethyca_fides-2.64.1b0.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.63.3rc0.dist-info → ethyca_fides-2.64.1b0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{f_8LkSZkhtDM14f8gbC0b → nRQ3pmK_d3F5PJE39rP2h}/_ssgManifest.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
var wr=Object.defineProperty,Dr=(n,e,t)=>e in n?wr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nt=(n,e,t)=>Dr(n,typeof e!="symbol"?e+"":e,t);class vn{constructor(e,t,s,i){Nt(this,"eventName"),Nt(this,"listenerId"),Nt(this,"data"),Nt(this,"pingData"),this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}var br=Object.defineProperty,vr=(n,e,t)=>e in n?br(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Me=(n,e,t)=>vr(n,typeof e!="symbol"?e+"":e,t);class It{constructor(e){Me(this,"gppVersion"),Me(this,"cmpStatus"),Me(this,"cmpDisplayStatus"),Me(this,"signalStatus"),Me(this,"supportedAPIs"),Me(this,"cmpId"),Me(this,"sectionList"),Me(this,"applicableSections"),Me(this,"gppString"),Me(this,"parsedSections"),this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}var Vr=Object.defineProperty,Rr=(n,e,t)=>e in n?Vr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,At=(n,e,t)=>Rr(n,typeof e!="symbol"?e+"":e,t);let nt=class{constructor(e,t,s){At(this,"callback"),At(this,"parameter"),At(this,"success",!0),At(this,"cmpApiContext"),this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:s})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},yr=class extends nt{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new vn("listenerRegistered",e,!0,new It(this.cmpApiContext));this.invokeCallback(t)}},Mr=class extends nt{respond(){let e=new It(this.cmpApiContext);this.invokeCallback(e)}};class Ur extends nt{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],s=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,s);this.invokeCallback(i)}}class Lr extends nt{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class Gr extends nt{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var Ue;(function(n){n.ADD_EVENT_LISTENER="addEventListener",n.GET_FIELD="getField",n.GET_SECTION="getSection",n.HAS_SECTION="hasSection",n.PING="ping",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Ue||(Ue={}));let Fr=class extends nt{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new vn("listenerRemoved",e,t,new It(this.cmpApiContext));this.invokeCallback(s)}};var $r=Object.defineProperty,xr=(n,e,t)=>e in n?$r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,st=(n,e,t)=>xr(n,typeof e!="symbol"?e+"":e,t),Os,Ns,Is,As,Cs,fs;fs=Ue.ADD_EVENT_LISTENER,Cs=Ue.GET_FIELD,As=Ue.GET_SECTION,Is=Ue.HAS_SECTION,Ns=Ue.PING,Os=Ue.REMOVE_EVENT_LISTENER;let Ke=class{};st(Ke,fs,yr),st(Ke,Cs,Ur),st(Ke,As,Lr),st(Ke,Is,Gr),st(Ke,Ns,Mr),st(Ke,Os,Fr);var it;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(it||(it={}));var Ye;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Ye||(Ye={}));var ms;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ms||(ms={}));var be;(function(n){n.NOT_READY="not ready",n.READY="ready"})(be||(be={}));var jr=Object.defineProperty,Hr=(n,e,t)=>e in n?jr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vn=(n,e,t)=>Hr(n,typeof e!="symbol"?e+"":e,t);class kr{constructor(e,t){if(Vn(this,"callQueue"),Vn(this,"customCommands"),Vn(this,"cmpApiContext"),this.cmpApiContext=e,t){let s=Ue.ADD_EVENT_LISTENER;if(t!=null&&t[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=Ue.REMOVE_EVENT_LISTENER,t!=null&&t[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch{this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,s,i){if(typeof e!="string")t(null,!1);else{if(t&&typeof t!="function")throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,s):this.isBuiltInCommand(e)?new Ke[e](this.cmpApiContext,t,s).execute():t&&t(null,!1)}}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(t=>{window.__gpp(...t)})}isCustomCommand(e){return this.customCommands&&typeof this.customCommands[e]=="function"}isBuiltInCommand(e){return Ke[e]!==void 0}}var Br=Object.defineProperty,Kr=(n,e,t)=>e in n?Br(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rn=(n,e,t)=>Kr(n,typeof e!="symbol"?e+"":e,t);let Yr=class{constructor(e){Rn(this,"eventQueue",new Map),Rn(this,"queueNumber",1e3),Rn(this,"cmpApiContext"),this.cmpApiContext=e;try{let s=window.__gpp("events")||[];for(var t=0;t<s.length;t++){let i=s[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(s){console.log(s)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((s,i)=>{let r=new vn(e,i,t,new It(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}},Et=class extends Error{constructor(e){super(e),this.name="InvalidFieldError"}};var zr=Object.defineProperty,Wr=(n,e,t)=>e in n?zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ct=(n,e,t)=>Wr(n,typeof e!="symbol"?e+"":e,t);class ee{constructor(){Ct(this,"segments"),Ct(this,"encodedString",null),Ct(this,"dirty",!1),Ct(this,"decoded",!0),this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.getFieldNames().includes(e))return s.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.hasField(e))return s.getFieldValue(e)}throw new Et("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let s=0;s<this.segments.length;s++){let i=this.segments[s];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new Et("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let p=class extends Error{constructor(e){super(e),this.name="DecodingError"}},se=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class V{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new se("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length;i++)i===0?s[e.length-(i+1)]=1:s[e.length-(i+1)]=s[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}var Qr=Object.defineProperty,Jr=(n,e,t)=>e in n?Qr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ps=(n,e,t)=>Jr(n,typeof e!="symbol"?e+"":e,t);const yn=class Ts{encode(e){if(!/^[0-1]*$/.test(e))throw new se("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=V.decode(i),o=Ts.DICT.charAt(r);t+=o,s+=6}catch{throw new se("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new p("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=Ts.REVERSE_DICT.get(i),o=V.encode(r,6);t+=o}return t}};Ps(yn,"DICT","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Ps(yn,"REVERSE_DICT",new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]));let ws=yn;var qr=Object.defineProperty,Xr=(n,e,t)=>e in n?qr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zr=(n,e,t)=>Xr(n,typeof e!="symbol"?e+"":e,t);const Mn=class extends ws{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}};Zr(Mn,"instance",new Mn);let H=Mn;var eo=Object.defineProperty,to=(n,e,t)=>e in n?eo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,no=(n,e,t)=>to(n,typeof e!="symbol"?e+"":e,t);const Un=class{constructor(){}static getInstance(){return this.instance}encode(e,t){let s="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);s+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return s}decode(e,t,s){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(s.containsKey(o)){let a=s.get(o);try{let c=a.substring(e,i);a.decode(c),i+=c.length}catch(c){if(c.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new p("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}};no(Un,"instance",new Un);let b=Un;class rt{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let s="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(s="1"+s,e-=r):s="0"+s}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new p("Undecodable FibonacciInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length-1;i++)i===0?s.push(1):i===1?s.push(2):s.push(s[i-1]+s[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}let ot=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new se("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new p("Undecodable Boolean '"+e+"'")}};class Ds{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=V.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+rt.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let c=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+rt.encode(a)+rt.encode(c)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=ot.decode(e.substring(r,r+1));if(r++,a===!0){let c=e.indexOf("11",r),d=rt.decode(e.substring(r,c+2))+i;i=d,r=c+2,c=e.indexOf("11",r);let u=rt.decode(e.substring(r,c+2))+i;i=u,r=c+2;for(let _=d;_<=u;_++)t.push(_)}else{let c=e.indexOf("11",r),d=rt.decode(e.substring(r,c+2))+i;i=d,t.push(d),r=c+2}}return t}}let so=class extends Error{constructor(e){super(e),this.name="ValidationError"}};var io=Object.defineProperty,ro=(n,e,t)=>e in n?io(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ln=(n,e,t)=>ro(n,typeof e!="symbol"?e+"":e,t);class ve{constructor(e=!0){Ln(this,"hardFailIfMissing"),Ln(this,"validator"),Ln(this,"value"),this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new so("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}let we=class extends p{constructor(e){super(e),this.name="SubstringError"}};class te{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new we("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class oo extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Ds.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=Ds.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=V.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i=e.indexOf("11",e.indexOf("11",i+1)+2)+2:i=e.indexOf("11",i+1)+2;return te.substring(e,t,i)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var ao=Object.defineProperty,co=(n,e,t)=>e in n?ao(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,lo=(n,e,t)=>co(n,typeof e!="symbol"?e+"":e,t);class l extends ve{constructor(e,t,s=!0){super(s),lo(this,"bitStringLength"),this.bitStringLength=e,this.setValue(t)}encode(){try{return V.encode(this.value,this.bitStringLength)}catch(e){throw new se(e)}}decode(e){try{this.value=V.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.bitStringLength)}catch(s){throw new we(s)}}}var Eo=Object.defineProperty,uo=(n,e,t)=>e in n?Eo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,So=(n,e,t)=>uo(n,typeof e!="symbol"?e+"":e,t);class v{constructor(){So(this,"fields",new Map)}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var xe;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(xe||(xe={}));const po=[xe.ID,xe.VERSION,xe.SECTION_IDS];var ho=Object.defineProperty,_o=(n,e,t)=>e in n?ho(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ft=(n,e,t)=>_o(n,typeof e!="symbol"?e+"":e,t);class w{constructor(){ft(this,"fields"),ft(this,"encodedString",null),ft(this,"dirty",!1),ft(this,"decoded",!0),this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new Et("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new Et(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}var go=Object.defineProperty,To=(n,e,t)=>e in n?go(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bs=(n,e,t)=>To(n,typeof e!="symbol"?e+"":e,t);class Oo extends w{constructor(e){super(),bs(this,"base64UrlEncoder",H.getInstance()),bs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return po}initializeFields(){let e=new v;return e.put(xe.ID.toString(),new l(6,Je.ID)),e.put(xe.VERSION.toString(),new l(6,Je.VERSION)),e.put(xe.SECTION_IDS.toString(),new oo([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var No=Object.defineProperty,Io=(n,e,t)=>e in n?No(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gn=(n,e,t)=>Io(n,typeof e!="symbol"?e+"":e,t);const mt=class cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return cn.ID}getName(){return cn.NAME}getVersion(){return cn.VERSION}initializeSegments(){let e=[];return e.push(new Oo),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Gn(mt,"ID",3),Gn(mt,"VERSION",1),Gn(mt,"NAME","header");let Je=mt;var h;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.POLICY_VERSION="PolicyVersion",n.IS_SERVICE_SPECIFIC="IsServiceSpecific",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",n.PURPOSE_CONSENTS="PurposeConsents",n.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",n.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",n.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",n.VENDOR_CONSENTS="VendorConsents",n.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",n.PUBLISHER_RESTRICTIONS="PublisherRestrictions",n.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",n.PUBLISHER_CONSENTS="PublisherConsents",n.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",n.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",n.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",n.VENDORS_ALLOWED="VendorsAllowed",n.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",n.VENDORS_DISCLOSED="VendorsDisclosed"})(h||(h={}));const Ao=[h.VERSION,h.CREATED,h.LAST_UPDATED,h.CMP_ID,h.CMP_VERSION,h.CONSENT_SCREEN,h.CONSENT_LANGUAGE,h.VENDOR_LIST_VERSION,h.POLICY_VERSION,h.IS_SERVICE_SPECIFIC,h.USE_NON_STANDARD_STACKS,h.SPECIAL_FEATURE_OPTINS,h.PURPOSE_CONSENTS,h.PURPOSE_LEGITIMATE_INTERESTS,h.PURPOSE_ONE_TREATMENT,h.PUBLISHER_COUNTRY_CODE,h.VENDOR_CONSENTS,h.VENDOR_LEGITIMATE_INTERESTS,h.PUBLISHER_RESTRICTIONS],Co=[h.PUBLISHER_PURPOSES_SEGMENT_TYPE,h.PUBLISHER_CONSENTS,h.PUBLISHER_LEGITIMATE_INTERESTS,h.NUM_CUSTOM_PURPOSES,h.PUBLISHER_CUSTOM_CONSENTS,h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],fo=[h.VENDORS_ALLOWED_SEGMENT_TYPE,h.VENDORS_ALLOWED],mo=[h.VENDORS_DISCLOSED_SEGMENT_TYPE,h.VENDORS_DISCLOSED];var Po=Object.defineProperty,wo=(n,e,t)=>e in n?Po(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Do=(n,e,t)=>wo(n,typeof e!="symbol"?e+"":e,t);const Fn=class extends ws{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}};Do(Fn,"instance",new Fn);let ut=Fn;class at{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=V.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+V.encode(t[r][0],16):i+="1"+V.encode(t[r][0],16)+V.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=ot.decode(e.substring(i,i+1));if(i++,o===!0){let a=V.decode(e.substring(i,i+16));i+=16;let c=V.decode(e.substring(i,i+16));i+=16;for(let d=a;d<=c;d++)t.push(d)}else{let a=V.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class $n extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=V.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return te.substring(e,t,i)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var bo=Object.defineProperty,vo=(n,e,t)=>e in n?bo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xn=(n,e,t)=>vo(n,typeof e!="symbol"?e+"":e,t);class Vo{constructor(e,t,s){xn(this,"key"),xn(this,"type"),xn(this,"ids"),this.key=e,this.type=t,this.ids=s}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}var Ro=Object.defineProperty,yo=(n,e,t)=>e in n?Ro(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,vs=(n,e,t)=>yo(n,typeof e!="symbol"?e+"":e,t);class Vs extends ve{constructor(e,t,s,i=!0){super(i),vs(this,"keyBitStringLength"),vs(this,"typeBitStringLength"),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=V.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=V.encode(i.getKey(),this.keyBitStringLength),t+=V.encode(i.getType(),this.typeBitStringLength),t+=at.encode(i.getIds())}return t}catch(e){throw new se(e)}}decode(e){try{let t=[],s=V.decode(te.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=V.decode(te.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=V.decode(te.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let c=new $n([]).substring(e,i),d=at.decode(c);i+=c.length,t.push(new Vo(o,a,d))}this.value=t}catch(t){throw new p(t)}}substring(e,t){try{let s="";s+=te.substring(e,t,t+12);let i=V.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=te.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let c=te.substring(e,r,r+this.typeBitStringLength);r+=c.length,s+=c;let d=new $n([]).substring(e,r);r+=d.length,s+=d}return s}catch(s){throw new we(s)}}}class K extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ot.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+1)}catch(s){throw new we(s)}}}class Rs{static encode(e){return e?V.encode(Math.round(e.getTime()/100),36):V.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new p("Undecodable Datetime '"+e+"'");return new Date(V.decode(e)*100)}}class Pt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Rs.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=Rs.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+36)}catch(s){throw new we(s)}}}class ct{static encode(e,t){if(e.length>t)throw new se("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=ot.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(ot.decode(e.substring(s,s+1)));return t}}var Mo=Object.defineProperty,Uo=(n,e,t)=>e in n?Mo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Lo=(n,e,t)=>Uo(n,typeof e!="symbol"?e+"":e,t);class Le extends ve{constructor(e,t=!0){super(t),Lo(this,"numElements"),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new se(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.numElements)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class ys{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=V.encode(63,6);else if(r>=65)s+=V.encode(e.charCodeAt(i)-65,6);else throw new se("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new p("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=V.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}var Go=Object.defineProperty,Fo=(n,e,t)=>e in n?Go(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$o=(n,e,t)=>Fo(n,typeof e!="symbol"?e+"":e,t);class jn extends ve{constructor(e,t,s=!0){super(s),$o(this,"stringLength"),this.stringLength=e,this.setValue(t)}encode(){try{return ys.encode(this.value,this.stringLength)}catch(e){throw new se(e)}}decode(e){try{this.value=ys.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.stringLength*6)}catch(s){throw new we(s)}}}class qe extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=at.encode(this.value),s=t.length,i=e;if(s<=i)return V.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return V.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new se(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=at.decode(e.substring(17));else{let t=[],s=ct.decode(e.substring(17));for(let i=0;i<s.length;i++)s[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new p(t)}}substring(e,t){try{let s=V.decode(te.substring(e,t,t+16));return e.charAt(t+16)==="1"?te.substring(e,t,t+17)+new $n([]).substring(e,t+17):te.substring(e,t,t+17+s)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var xo=Object.defineProperty,jo=(n,e,t)=>e in n?xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ms=(n,e,t)=>jo(n,typeof e!="symbol"?e+"":e,t);class Ho extends w{constructor(e){super(),Ms(this,"base64UrlEncoder",ut.getInstance()),Ms(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ao}initializeFields(){let e=new Date,t=new v;return t.put(h.VERSION.toString(),new l(6,X.VERSION)),t.put(h.CREATED.toString(),new Pt(e)),t.put(h.LAST_UPDATED.toString(),new Pt(e)),t.put(h.CMP_ID.toString(),new l(12,0)),t.put(h.CMP_VERSION.toString(),new l(12,0)),t.put(h.CONSENT_SCREEN.toString(),new l(6,0)),t.put(h.CONSENT_LANGUAGE.toString(),new jn(2,"EN")),t.put(h.VENDOR_LIST_VERSION.toString(),new l(12,0)),t.put(h.POLICY_VERSION.toString(),new l(6,2)),t.put(h.IS_SERVICE_SPECIFIC.toString(),new K(!1)),t.put(h.USE_NON_STANDARD_STACKS.toString(),new K(!1)),t.put(h.SPECIAL_FEATURE_OPTINS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_CONSENTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_ONE_TREATMENT.toString(),new K(!1)),t.put(h.PUBLISHER_COUNTRY_CODE.toString(),new jn(2,"AA")),t.put(h.VENDOR_CONSENTS.toString(),new qe([])),t.put(h.VENDOR_LEGITIMATE_INTERESTS.toString(),new qe([])),t.put(h.PUBLISHER_RESTRICTIONS.toString(),new Vs(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}var ko=Object.defineProperty,Bo=(n,e,t)=>e in n?ko(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ko=(n,e,t)=>Bo(n,typeof e!="symbol"?e+"":e,t);class wt extends ve{constructor(e,t,s=!0){super(s),Ko(this,"getLength"),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new se(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.getLength())}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),s=[...e];for(let i=s.length;i<t;i++)s.push(!1);s.length>t&&(s=s.slice(0,t)),super.setValue([...s])}}var Yo=Object.defineProperty,zo=(n,e,t)=>e in n?Yo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Us=(n,e,t)=>zo(n,typeof e!="symbol"?e+"":e,t);class Wo extends w{constructor(e){super(),Us(this,"base64UrlEncoder",ut.getInstance()),Us(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Co}initializeFields(){let e=new v;e.put(h.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(h.PUBLISHER_CONSENTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(h.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new l(6,0);return e.put(h.NUM_CUSTOM_PURPOSES.toString(),t),e.put(h.PUBLISHER_CUSTOM_CONSENTS.toString(),new wt(()=>t.getValue(),[])),e.put(h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new wt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}var Qo=Object.defineProperty,Jo=(n,e,t)=>e in n?Qo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ls=(n,e,t)=>Jo(n,typeof e!="symbol"?e+"":e,t);class qo extends w{constructor(e){super(),Ls(this,"base64UrlEncoder",ut.getInstance()),Ls(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return fo}initializeFields(){let e=new v;return e.put(h.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new l(3,2)),e.put(h.VENDORS_ALLOWED.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}var Xo=Object.defineProperty,Zo=(n,e,t)=>e in n?Xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gs=(n,e,t)=>Zo(n,typeof e!="symbol"?e+"":e,t);class ea extends w{constructor(e){super(),Gs(this,"base64UrlEncoder",ut.getInstance()),Gs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return mo}initializeFields(){let e=new v;return e.put(h.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new l(3,1)),e.put(h.VENDORS_DISCLOSED.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}var ta=Object.defineProperty,na=(n,e,t)=>e in n?ta(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hn=(n,e,t)=>na(n,typeof e!="symbol"?e+"":e,t);const Dt=class ln extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ln.ID}getName(){return ln.NAME}getVersion(){return ln.VERSION}initializeSegments(){let e=[];return e.push(new Ho),e.push(new Wo),e.push(new qo),e.push(new ea),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[3].decode(s[i]);else if(o>="Q"&&o<="X")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new p("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(h.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode()))),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==h.CREATED&&e!==h.LAST_UPDATED){let s=new Date;super.setFieldValue(h.CREATED,s),super.setFieldValue(h.LAST_UPDATED,s)}}};Hn(Dt,"ID",2),Hn(Dt,"VERSION",2),Hn(Dt,"NAME","tcfeuv2");let X=Dt;var O;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(O||(O={}));const sa=[O.VERSION,O.CREATED,O.LAST_UPDATED,O.CMP_ID,O.CMP_VERSION,O.CONSENT_SCREEN,O.CONSENT_LANGUAGE,O.VENDOR_LIST_VERSION,O.TCF_POLICY_VERSION,O.USE_NON_STANDARD_STACKS,O.SPECIAL_FEATURE_EXPRESS_CONSENT,O.PURPOSES_EXPRESS_CONSENT,O.PURPOSES_IMPLIED_CONSENT,O.VENDOR_EXPRESS_CONSENT,O.VENDOR_IMPLIED_CONSENT,O.PUB_RESTRICTIONS],ia=[O.PUB_PURPOSES_SEGMENT_TYPE,O.PUB_PURPOSES_EXPRESS_CONSENT,O.PUB_PURPOSES_IMPLIED_CONSENT,O.NUM_CUSTOM_PURPOSES,O.CUSTOM_PURPOSES_EXPRESS_CONSENT,O.CUSTOM_PURPOSES_IMPLIED_CONSENT],ra=[O.DISCLOSED_VENDORS_SEGMENT_TYPE,O.DISCLOSED_VENDORS];var oa=Object.defineProperty,aa=(n,e,t)=>e in n?oa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fs=(n,e,t)=>aa(n,typeof e!="symbol"?e+"":e,t);class ca extends w{constructor(e){super(),Fs(this,"base64UrlEncoder",H.getInstance()),Fs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return sa}initializeFields(){let e=new Date,t=new v;return t.put(O.VERSION.toString(),new l(6,Ae.VERSION)),t.put(O.CREATED.toString(),new Pt(e)),t.put(O.LAST_UPDATED.toString(),new Pt(e)),t.put(O.CMP_ID.toString(),new l(12,0)),t.put(O.CMP_VERSION.toString(),new l(12,0)),t.put(O.CONSENT_SCREEN.toString(),new l(6,0)),t.put(O.CONSENT_LANGUAGE.toString(),new jn(2,"EN")),t.put(O.VENDOR_LIST_VERSION.toString(),new l(12,0)),t.put(O.TCF_POLICY_VERSION.toString(),new l(6,2)),t.put(O.USE_NON_STANDARD_STACKS.toString(),new K(!1)),t.put(O.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.PURPOSES_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.PURPOSES_IMPLIED_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.VENDOR_EXPRESS_CONSENT.toString(),new qe([])),t.put(O.VENDOR_IMPLIED_CONSENT.toString(),new qe([])),t.put(O.PUB_RESTRICTIONS.toString(),new Vs(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}var la=Object.defineProperty,da=(n,e,t)=>e in n?la(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$s=(n,e,t)=>da(n,typeof e!="symbol"?e+"":e,t);class Ea extends w{constructor(e){super(),$s(this,"base64UrlEncoder",H.getInstance()),$s(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ia}initializeFields(){let e=new v;e.put(O.PUB_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(O.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(O.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new l(6,0);return e.put(O.NUM_CUSTOM_PURPOSES.toString(),t),e.put(O.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new wt(()=>t.getValue(),[])),e.put(O.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new wt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}var ua=Object.defineProperty,Sa=(n,e,t)=>e in n?ua(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xs=(n,e,t)=>Sa(n,typeof e!="symbol"?e+"":e,t);class pa extends w{constructor(e){super(),xs(this,"base64UrlEncoder",ut.getInstance()),xs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ra}initializeFields(){let e=new v;return e.put(O.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new l(3,1)),e.put(O.DISCLOSED_VENDORS.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var ha=Object.defineProperty,_a=(n,e,t)=>e in n?ha(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,kn=(n,e,t)=>_a(n,typeof e!="symbol"?e+"":e,t);const bt=class dn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return dn.ID}getName(){return dn.NAME}getVersion(){return dn.VERSION}initializeSegments(){let e=[];return e.push(new ca),e.push(new Ea),e.push(new pa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new p("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(O.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==O.CREATED&&e!==O.LAST_UPDATED){let s=new Date;super.setFieldValue(O.CREATED,s),super.setFieldValue(O.LAST_UPDATED,s)}}};kn(bt,"ID",5),kn(bt,"VERSION",1),kn(bt,"NAME","tcfcav1");let Ae=bt;var ga=Object.defineProperty,Ta=(n,e,t)=>e in n?ga(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,js=(n,e,t)=>Ta(n,typeof e!="symbol"?e+"":e,t);class Bn{constructor(e,t){js(this,"validator"),js(this,"value",null),t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}var Oa=Object.defineProperty,Na=(n,e,t)=>e in n?Oa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hs=(n,e,t)=>Na(n,typeof e!="symbol"?e+"":e,t);class Ia{constructor(e,t){Hs(this,"validator"),Hs(this,"value",null),t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}var Aa=Object.defineProperty,Ca=(n,e,t)=>e in n?Aa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,fa=(n,e,t)=>Ca(n,typeof e!="symbol"?e+"":e,t);class ma{constructor(){fa(this,"fields",new Map)}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var ie;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(ie||(ie={}));const Pa=[ie.VERSION,ie.NOTICE,ie.OPT_OUT_SALE,ie.LSPA_COVERED];class wa extends w{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pa}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new ma;return t.put(ie.VERSION,new Ia(Ce.VERSION)),t.put(ie.NOTICE,new Bn("-",e)),t.put(ie.OPT_OUT_SALE,new Bn("-",e)),t.put(ie.LSPA_COVERED,new Bn("-",e)),t}encodeSegment(e){let t="";return t+=e.get(ie.VERSION).getValue(),t+=e.get(ie.NOTICE).getValue(),t+=e.get(ie.OPT_OUT_SALE).getValue(),t+=e.get(ie.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new p("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(ie.VERSION).setValue(parseInt(e.substring(0,1))),t.get(ie.NOTICE).setValue(e.charAt(1)),t.get(ie.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(ie.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new p("Unable to decode UspV1CoreSegment '"+e+"'")}}}var Da=Object.defineProperty,ba=(n,e,t)=>e in n?Da(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kn=(n,e,t)=>ba(n,typeof e!="symbol"?e+"":e,t);const vt=class En extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return En.ID}getName(){return En.NAME}getVersion(){return En.VERSION}initializeSegments(){let e=[];return e.push(new wa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Kn(vt,"ID",6),Kn(vt,"VERSION",1),Kn(vt,"NAME","uspv1");let Ce=vt;var I;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(I||(I={}));const va=[I.VERSION,I.SHARING_NOTICE,I.SALE_OPT_OUT_NOTICE,I.SHARING_OPT_OUT_NOTICE,I.TARGETED_ADVERTISING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_LIMIT_USE_NOTICE,I.SALE_OPT_OUT,I.SHARING_OPT_OUT,I.TARGETED_ADVERTISING_OPT_OUT,I.SENSITIVE_DATA_PROCESSING,I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,I.PERSONAL_DATA_CONSENTS,I.MSPA_COVERED_TRANSACTION,I.MSPA_OPT_OUT_OPTION_MODE,I.MSPA_SERVICE_PROVIDER_MODE],Va=[I.GPC_SEGMENT_TYPE,I.GPC];class ks{static encode(e,t,s){if(e.length>s)throw new se("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=V.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new p("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new p("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(V.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}var Ra=Object.defineProperty,ya=(n,e,t)=>e in n?Ra(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Bs=(n,e,t)=>ya(n,typeof e!="symbol"?e+"":e,t);class W extends ve{constructor(e,t,s=!0){super(s),Bs(this,"elementBitStringLength"),Bs(this,"numElements"),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return ks.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new se(e)}}decode(e){try{this.value=ks.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}var Ma=Object.defineProperty,Ua=(n,e,t)=>e in n?Ma(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ks=(n,e,t)=>Ua(n,typeof e!="symbol"?e+"":e,t);class La extends w{constructor(e){super(),Ks(this,"base64UrlEncoder",H.getInstance()),Ks(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return va}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(I.VERSION.toString(),new l(6,re.VERSION)),i.put(I.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(I.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(I.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(I.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(I.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNatCoreSegment '"+e+"'")}}}var Ga=Object.defineProperty,Fa=(n,e,t)=>e in n?Ga(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ys=(n,e,t)=>Fa(n,typeof e!="symbol"?e+"":e,t);class $a extends w{constructor(e){super(),Ys(this,"base64UrlEncoder",H.getInstance()),Ys(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Va}initializeFields(){let e=new v;return e.put(I.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(I.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(I.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNatGpcSegment '"+e+"'")}}}var xa=Object.defineProperty,ja=(n,e,t)=>e in n?xa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yn=(n,e,t)=>ja(n,typeof e!="symbol"?e+"":e,t);const Vt=class un extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return un.ID}getName(){return un.NAME}getVersion(){return un.VERSION}initializeSegments(){let e=[];return e.push(new La),e.push(new $a),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(I.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Yn(Vt,"ID",7),Yn(Vt,"VERSION",1),Yn(Vt,"NAME","usnat");let re=Vt;var R;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(R||(R={}));const Ha=[R.VERSION,R.SALE_OPT_OUT_NOTICE,R.SHARING_OPT_OUT_NOTICE,R.SENSITIVE_DATA_LIMIT_USE_NOTICE,R.SALE_OPT_OUT,R.SHARING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.PERSONAL_DATA_CONSENTS,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],ka=[R.GPC_SEGMENT_TYPE,R.GPC];var Ba=Object.defineProperty,Ka=(n,e,t)=>e in n?Ba(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zs=(n,e,t)=>Ka(n,typeof e!="symbol"?e+"":e,t);class Ya extends w{constructor(e){super(),zs(this,"base64UrlEncoder",H.getInstance()),zs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ha}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(R.VERSION.toString(),new l(6,ce.VERSION)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(R.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0]).withValidator(s)),i.put(R.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCaCoreSegment '"+e+"'")}}}var za=Object.defineProperty,Wa=(n,e,t)=>e in n?za(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ws=(n,e,t)=>Wa(n,typeof e!="symbol"?e+"":e,t);class Qa extends w{constructor(e){super(),Ws(this,"base64UrlEncoder",H.getInstance()),Ws(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ka}initializeFields(){let e=new v;return e.put(R.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(R.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCaGpcSegment '"+e+"'")}}}var Ja=Object.defineProperty,qa=(n,e,t)=>e in n?Ja(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zn=(n,e,t)=>qa(n,typeof e!="symbol"?e+"":e,t);const Rt=class Sn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Sn.ID}getName(){return Sn.NAME}getVersion(){return Sn.VERSION}initializeSegments(){let e=[];return e.push(new Ya),e.push(new Qa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};zn(Rt,"ID",8),zn(Rt,"VERSION",1),zn(Rt,"NAME","usca");let ce=Rt;var J;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(J||(J={}));const Xa=[J.VERSION,J.SHARING_NOTICE,J.SALE_OPT_OUT_NOTICE,J.TARGETED_ADVERTISING_OPT_OUT_NOTICE,J.SALE_OPT_OUT,J.TARGETED_ADVERTISING_OPT_OUT,J.SENSITIVE_DATA_PROCESSING,J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,J.MSPA_COVERED_TRANSACTION,J.MSPA_OPT_OUT_OPTION_MODE,J.MSPA_SERVICE_PROVIDER_MODE];var Za=Object.defineProperty,ec=(n,e,t)=>e in n?Za(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qs=(n,e,t)=>ec(n,typeof e!="symbol"?e+"":e,t);class tc extends w{constructor(e){super(),Qs(this,"base64UrlEncoder",H.getInstance()),Qs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Xa}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(J.VERSION.toString(),new l(6,le.VERSION)),i.put(J.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(J.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(J.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(J.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(J.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsVaCoreSegment '"+e+"'")}}}var nc=Object.defineProperty,sc=(n,e,t)=>e in n?nc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wn=(n,e,t)=>sc(n,typeof e!="symbol"?e+"":e,t);const yt=class pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pn.ID}getName(){return pn.NAME}getVersion(){return pn.VERSION}initializeSegments(){let e=[];return e.push(new tc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Wn(yt,"ID",9),Wn(yt,"VERSION",1),Wn(yt,"NAME","usva");let le=yt;var k;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(k||(k={}));const ic=[k.VERSION,k.SHARING_NOTICE,k.SALE_OPT_OUT_NOTICE,k.TARGETED_ADVERTISING_OPT_OUT_NOTICE,k.SALE_OPT_OUT,k.TARGETED_ADVERTISING_OPT_OUT,k.SENSITIVE_DATA_PROCESSING,k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,k.MSPA_COVERED_TRANSACTION,k.MSPA_OPT_OUT_OPTION_MODE,k.MSPA_SERVICE_PROVIDER_MODE],rc=[k.GPC_SEGMENT_TYPE,k.GPC];var oc=Object.defineProperty,ac=(n,e,t)=>e in n?oc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Js=(n,e,t)=>ac(n,typeof e!="symbol"?e+"":e,t);class cc extends w{constructor(e){super(),Js(this,"base64UrlEncoder",H.getInstance()),Js(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ic}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(k.VERSION.toString(),new l(6,de.VERSION)),i.put(k.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(k.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(k.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(k.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCoCoreSegment '"+e+"'")}}}var lc=Object.defineProperty,dc=(n,e,t)=>e in n?lc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qs=(n,e,t)=>dc(n,typeof e!="symbol"?e+"":e,t);class Ec extends w{constructor(e){super(),qs(this,"base64UrlEncoder",H.getInstance()),qs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return rc}initializeFields(){let e=new v;return e.put(k.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(k.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(k.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCoGpcSegment '"+e+"'")}}}var uc=Object.defineProperty,Sc=(n,e,t)=>e in n?uc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qn=(n,e,t)=>Sc(n,typeof e!="symbol"?e+"":e,t);const Mt=class hn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return hn.ID}getName(){return hn.NAME}getVersion(){return hn.VERSION}initializeSegments(){let e=[];return e.push(new cc),e.push(new Ec),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(k.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(k.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(k.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Qn(Mt,"ID",10),Qn(Mt,"VERSION",1),Qn(Mt,"NAME","usco");let de=Mt;var Y;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(Y||(Y={}));const pc=[Y.VERSION,Y.SHARING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];var hc=Object.defineProperty,_c=(n,e,t)=>e in n?hc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xs=(n,e,t)=>_c(n,typeof e!="symbol"?e+"":e,t);class gc extends w{constructor(e){super(),Xs(this,"base64UrlEncoder",H.getInstance()),Xs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return pc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(Y.VERSION.toString(),new l(6,Ee.VERSION)),i.put(Y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(Y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(Y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(Y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsUtCoreSegment '"+e+"'")}}}var Tc=Object.defineProperty,Oc=(n,e,t)=>e in n?Tc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jn=(n,e,t)=>Oc(n,typeof e!="symbol"?e+"":e,t);const Ut=class _n extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _n.ID}getName(){return _n.NAME}getVersion(){return _n.VERSION}initializeSegments(){let e=[];return e.push(new gc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Jn(Ut,"ID",11),Jn(Ut,"VERSION",1),Jn(Ut,"NAME","usut");let Ee=Ut;var B;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(B||(B={}));const Nc=[B.VERSION,B.SHARING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],Ic=[B.GPC_SEGMENT_TYPE,B.GPC];var Ac=Object.defineProperty,Cc=(n,e,t)=>e in n?Ac(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zs=(n,e,t)=>Cc(n,typeof e!="symbol"?e+"":e,t);class fc extends w{constructor(e){super(),Zs(this,"base64UrlEncoder",H.getInstance()),Zs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Nc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(B.VERSION.toString(),new l(6,ue.VERSION)),i.put(B.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCtCoreSegment '"+e+"'")}}}var mc=Object.defineProperty,Pc=(n,e,t)=>e in n?mc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ei=(n,e,t)=>Pc(n,typeof e!="symbol"?e+"":e,t);class wc extends w{constructor(e){super(),ei(this,"base64UrlEncoder",H.getInstance()),ei(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ic}initializeFields(){let e=new v;return e.put(B.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(B.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCtGpcSegment '"+e+"'")}}}var Dc=Object.defineProperty,bc=(n,e,t)=>e in n?Dc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qn=(n,e,t)=>bc(n,typeof e!="symbol"?e+"":e,t);const Lt=class gn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return gn.ID}getName(){return gn.NAME}getVersion(){return gn.VERSION}initializeSegments(){let e=[];return e.push(new fc),e.push(new wc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(B.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};qn(Lt,"ID",12),qn(Lt,"VERSION",1),qn(Lt,"NAME","usct");let ue=Lt;var z;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(z||(z={}));const vc=[z.VERSION,z.PROCESSING_NOTICE,z.SALE_OPT_OUT_NOTICE,z.TARGETED_ADVERTISING_OPT_OUT_NOTICE,z.SALE_OPT_OUT,z.TARGETED_ADVERTISING_OPT_OUT,z.SENSITIVE_DATA_PROCESSING,z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,z.ADDITIONAL_DATA_PROCESSING_CONSENT,z.MSPA_COVERED_TRANSACTION,z.MSPA_OPT_OUT_OPTION_MODE,z.MSPA_SERVICE_PROVIDER_MODE];var Vc=Object.defineProperty,Rc=(n,e,t)=>e in n?Vc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ti=(n,e,t)=>Rc(n,typeof e!="symbol"?e+"":e,t);class yc extends w{constructor(e){super(),ti(this,"base64UrlEncoder",H.getInstance()),ti(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return vc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(z.VERSION.toString(),new l(6,Se.VERSION)),i.put(z.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(z.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(z.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(z.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsFlCoreSegment '"+e+"'")}}}var Mc=Object.defineProperty,Uc=(n,e,t)=>e in n?Mc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xn=(n,e,t)=>Uc(n,typeof e!="symbol"?e+"":e,t);const Gt=class Tn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Tn.ID}getName(){return Tn.NAME}getVersion(){return Tn.VERSION}initializeSegments(){let e=[];return e.push(new yc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Xn(Gt,"ID",13),Xn(Gt,"VERSION",1),Xn(Gt,"NAME","usfl");let Se=Gt;var y;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(y||(y={}));const Lc=[y.VERSION,y.SHARING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],Gc=[y.GPC_SEGMENT_TYPE,y.GPC];var Fc=Object.defineProperty,$c=(n,e,t)=>e in n?Fc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ni=(n,e,t)=>$c(n,typeof e!="symbol"?e+"":e,t);class xc extends w{constructor(e){super(),ni(this,"base64UrlEncoder",H.getInstance()),ni(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Lc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(y.VERSION.toString(),new l(6,pe.VERSION)),i.put(y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsMtCoreSegment '"+e+"'")}}}var jc=Object.defineProperty,Hc=(n,e,t)=>e in n?jc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,si=(n,e,t)=>Hc(n,typeof e!="symbol"?e+"":e,t);class kc extends w{constructor(e){super(),si(this,"base64UrlEncoder",H.getInstance()),si(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Gc}initializeFields(){let e=new v;return e.put(y.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(y.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsMtGpcSegment '"+e+"'")}}}var Bc=Object.defineProperty,Kc=(n,e,t)=>e in n?Bc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zn=(n,e,t)=>Kc(n,typeof e!="symbol"?e+"":e,t);const Ft=class On extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return On.ID}getName(){return On.NAME}getVersion(){return On.VERSION}initializeSegments(){let e=[];return e.push(new xc),e.push(new kc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(y.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Zn(Ft,"ID",14),Zn(Ft,"VERSION",1),Zn(Ft,"NAME","usmt");let pe=Ft;var M;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const Yc=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.ADDITIONAL_DATA_PROCESSING_CONSENT,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],zc=[M.GPC_SEGMENT_TYPE,M.GPC];var Wc=Object.defineProperty,Qc=(n,e,t)=>e in n?Wc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ii=(n,e,t)=>Qc(n,typeof e!="symbol"?e+"":e,t);class Jc extends w{constructor(e){super(),ii(this,"base64UrlEncoder",H.getInstance()),ii(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Yc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(M.VERSION.toString(),new l(6,fe.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsOrCoreSegment '"+e+"'")}}}var qc=Object.defineProperty,Xc=(n,e,t)=>e in n?qc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ri=(n,e,t)=>Xc(n,typeof e!="symbol"?e+"":e,t);class Zc extends w{constructor(e){super(),ri(this,"base64UrlEncoder",H.getInstance()),ri(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return zc}initializeFields(){let e=new v;return e.put(M.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(M.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsOrGpcSegment '"+e+"'")}}}var el=Object.defineProperty,tl=(n,e,t)=>e in n?el(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,es=(n,e,t)=>tl(n,typeof e!="symbol"?e+"":e,t);const $t=class Nn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Nn.ID}getName(){return Nn.NAME}getVersion(){return Nn.VERSION}initializeSegments(){let e=[];return e.push(new Jc),e.push(new Zc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};es($t,"ID",15),es($t,"VERSION",1),es($t,"NAME","usor");let fe=$t;var U;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(U||(U={}));const nl=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.ADDITIONAL_DATA_PROCESSING_CONSENT,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],sl=[U.GPC_SEGMENT_TYPE,U.GPC];var il=Object.defineProperty,rl=(n,e,t)=>e in n?il(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,oi=(n,e,t)=>rl(n,typeof e!="symbol"?e+"":e,t);class ol extends w{constructor(e){super(),oi(this,"base64UrlEncoder",H.getInstance()),oi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return nl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(U.VERSION.toString(),new l(6,he.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTxCoreSegment '"+e+"'")}}}var al=Object.defineProperty,cl=(n,e,t)=>e in n?al(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ai=(n,e,t)=>cl(n,typeof e!="symbol"?e+"":e,t);class ll extends w{constructor(e){super(),ai(this,"base64UrlEncoder",H.getInstance()),ai(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return sl}initializeFields(){let e=new v;return e.put(U.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(U.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTxGpcSegment '"+e+"'")}}}var dl=Object.defineProperty,El=(n,e,t)=>e in n?dl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ts=(n,e,t)=>El(n,typeof e!="symbol"?e+"":e,t);const xt=class In extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return In.ID}getName(){return In.NAME}getVersion(){return In.VERSION}initializeSegments(){let e=[];return e.push(new ol),e.push(new ll),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(U.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};ts(xt,"ID",16),ts(xt,"VERSION",1),ts(xt,"NAME","ustx");let he=xt;var L;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(L||(L={}));const ul=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],Sl=[L.GPC_SEGMENT_TYPE,L.GPC];var pl=Object.defineProperty,hl=(n,e,t)=>e in n?pl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ci=(n,e,t)=>hl(n,typeof e!="symbol"?e+"":e,t);class _l extends w{constructor(e){super(),ci(this,"base64UrlEncoder",H.getInstance()),ci(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ul}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(L.VERSION.toString(),new l(6,_e.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsDeCoreSegment '"+e+"'")}}}var gl=Object.defineProperty,Tl=(n,e,t)=>e in n?gl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,li=(n,e,t)=>Tl(n,typeof e!="symbol"?e+"":e,t);class Ol extends w{constructor(e){super(),li(this,"base64UrlEncoder",H.getInstance()),li(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Sl}initializeFields(){let e=new v;return e.put(L.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(L.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsDeGpcSegment '"+e+"'")}}}var Nl=Object.defineProperty,Il=(n,e,t)=>e in n?Nl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ns=(n,e,t)=>Il(n,typeof e!="symbol"?e+"":e,t);const jt=class An extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return An.ID}getName(){return An.NAME}getVersion(){return An.VERSION}initializeSegments(){let e=[];return e.push(new _l),e.push(new Ol),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};ns(jt,"ID",17),ns(jt,"VERSION",1),ns(jt,"NAME","usde");let _e=jt;var G;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(G||(G={}));const Al=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SENSITIVE_DATA_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Cl=[G.GPC_SEGMENT_TYPE,G.GPC];var fl=Object.defineProperty,ml=(n,e,t)=>e in n?fl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,di=(n,e,t)=>ml(n,typeof e!="symbol"?e+"":e,t);class Pl extends w{constructor(e){super(),di(this,"base64UrlEncoder",H.getInstance()),di(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Al}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(G.VERSION.toString(),new l(6,ge.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsIaCoreSegment '"+e+"'")}}}var wl=Object.defineProperty,Dl=(n,e,t)=>e in n?wl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ei=(n,e,t)=>Dl(n,typeof e!="symbol"?e+"":e,t);class bl extends w{constructor(e){super(),Ei(this,"base64UrlEncoder",H.getInstance()),Ei(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Cl}initializeFields(){let e=new v;return e.put(G.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(G.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsIaGpcSegment '"+e+"'")}}}var vl=Object.defineProperty,Vl=(n,e,t)=>e in n?vl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ss=(n,e,t)=>Vl(n,typeof e!="symbol"?e+"":e,t);const Ht=class Cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Cn.ID}getName(){return Cn.NAME}getVersion(){return Cn.VERSION}initializeSegments(){let e=[];return e.push(new Pl),e.push(new bl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(G.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};ss(Ht,"ID",18),ss(Ht,"VERSION",1),ss(Ht,"NAME","usia");let ge=Ht;var F;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(F||(F={}));const Rl=[F.VERSION,F.PROCESSING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.ADDITIONAL_DATA_PROCESSING_CONSENT,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],yl=[F.GPC_SEGMENT_TYPE,F.GPC];var Ml=Object.defineProperty,Ul=(n,e,t)=>e in n?Ml(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ui=(n,e,t)=>Ul(n,typeof e!="symbol"?e+"":e,t);class Ll extends w{constructor(e){super(),ui(this,"base64UrlEncoder",H.getInstance()),ui(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Rl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(F.VERSION.toString(),new l(6,Te.VERSION)),i.put(F.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(F.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNeCoreSegment '"+e+"'")}}}var Gl=Object.defineProperty,Fl=(n,e,t)=>e in n?Gl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Si=(n,e,t)=>Fl(n,typeof e!="symbol"?e+"":e,t);class $l extends w{constructor(e){super(),Si(this,"base64UrlEncoder",H.getInstance()),Si(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return yl}initializeFields(){let e=new v;return e.put(F.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(F.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNeGpcSegment '"+e+"'")}}}var xl=Object.defineProperty,jl=(n,e,t)=>e in n?xl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,is=(n,e,t)=>jl(n,typeof e!="symbol"?e+"":e,t);const kt=class fn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return fn.ID}getName(){return fn.NAME}getVersion(){return fn.VERSION}initializeSegments(){let e=[];return e.push(new Ll),e.push(new $l),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(F.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};is(kt,"ID",19),is(kt,"VERSION",1),is(kt,"NAME","usne");let Te=kt;var $;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})($||($={}));const Hl=[$.VERSION,$.PROCESSING_NOTICE,$.SALE_OPT_OUT_NOTICE,$.TARGETED_ADVERTISING_OPT_OUT_NOTICE,$.SALE_OPT_OUT,$.TARGETED_ADVERTISING_OPT_OUT,$.SENSITIVE_DATA_PROCESSING,$.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,$.ADDITIONAL_DATA_PROCESSING_CONSENT,$.MSPA_COVERED_TRANSACTION,$.MSPA_OPT_OUT_OPTION_MODE,$.MSPA_SERVICE_PROVIDER_MODE],kl=[$.GPC_SEGMENT_TYPE,$.GPC];var Bl=Object.defineProperty,Kl=(n,e,t)=>e in n?Bl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,pi=(n,e,t)=>Kl(n,typeof e!="symbol"?e+"":e,t);class Yl extends w{constructor(e){super(),pi(this,"base64UrlEncoder",H.getInstance()),pi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Hl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put($.VERSION.toString(),new l(6,Oe.VERSION)),i.put($.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put($.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put($.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNhCoreSegment '"+e+"'")}}}var zl=Object.defineProperty,Wl=(n,e,t)=>e in n?zl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hi=(n,e,t)=>Wl(n,typeof e!="symbol"?e+"":e,t);class Ql extends w{constructor(e){super(),hi(this,"base64UrlEncoder",H.getInstance()),hi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return kl}initializeFields(){let e=new v;return e.put($.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put($.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put($.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNhGpcSegment '"+e+"'")}}}var Jl=Object.defineProperty,ql=(n,e,t)=>e in n?Jl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,rs=(n,e,t)=>ql(n,typeof e!="symbol"?e+"":e,t);const Bt=class mn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return mn.ID}getName(){return mn.NAME}getVersion(){return mn.VERSION}initializeSegments(){let e=[];return e.push(new Yl),e.push(new Ql),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue($.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue($.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue($.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};rs(Bt,"ID",20),rs(Bt,"VERSION",1),rs(Bt,"NAME","usnh");let Oe=Bt;var x;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const Xl=[x.VERSION,x.PROCESSING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.ADDITIONAL_DATA_PROCESSING_CONSENT,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],Zl=[x.GPC_SEGMENT_TYPE,x.GPC];var ed=Object.defineProperty,td=(n,e,t)=>e in n?ed(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_i=(n,e,t)=>td(n,typeof e!="symbol"?e+"":e,t);class nd extends w{constructor(e){super(),_i(this,"base64UrlEncoder",H.getInstance()),_i(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Xl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(x.VERSION.toString(),new l(6,Ne.VERSION)),i.put(x.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put(x.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNjCoreSegment '"+e+"'")}}}var sd=Object.defineProperty,id=(n,e,t)=>e in n?sd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,gi=(n,e,t)=>id(n,typeof e!="symbol"?e+"":e,t);class rd extends w{constructor(e){super(),gi(this,"base64UrlEncoder",H.getInstance()),gi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Zl}initializeFields(){let e=new v;return e.put(x.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(x.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNjGpcSegment '"+e+"'")}}}var od=Object.defineProperty,ad=(n,e,t)=>e in n?od(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,os=(n,e,t)=>ad(n,typeof e!="symbol"?e+"":e,t);const Kt=class Pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pn.ID}getName(){return Pn.NAME}getVersion(){return Pn.VERSION}initializeSegments(){let e=[];return e.push(new nd),e.push(new rd),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};os(Kt,"ID",21),os(Kt,"VERSION",1),os(Kt,"NAME","usnj");let Ne=Kt;var j;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(j||(j={}));const cd=[j.VERSION,j.PROCESSING_NOTICE,j.SALE_OPT_OUT_NOTICE,j.TARGETED_ADVERTISING_OPT_OUT_NOTICE,j.SALE_OPT_OUT,j.TARGETED_ADVERTISING_OPT_OUT,j.SENSITIVE_DATA_PROCESSING,j.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,j.ADDITIONAL_DATA_PROCESSING_CONSENT,j.MSPA_COVERED_TRANSACTION,j.MSPA_OPT_OUT_OPTION_MODE,j.MSPA_SERVICE_PROVIDER_MODE],ld=[j.GPC_SEGMENT_TYPE,j.GPC];var dd=Object.defineProperty,Ed=(n,e,t)=>e in n?dd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ti=(n,e,t)=>Ed(n,typeof e!="symbol"?e+"":e,t);class ud extends w{constructor(e){super(),Ti(this,"base64UrlEncoder",H.getInstance()),Ti(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return cd}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(j.VERSION.toString(),new l(6,Ie.VERSION)),i.put(j.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(j.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(j.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(j.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(j.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(j.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(j.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(j.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTnCoreSegment '"+e+"'")}}}var Sd=Object.defineProperty,pd=(n,e,t)=>e in n?Sd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Oi=(n,e,t)=>pd(n,typeof e!="symbol"?e+"":e,t);class hd extends w{constructor(e){super(),Oi(this,"base64UrlEncoder",H.getInstance()),Oi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ld}initializeFields(){let e=new v;return e.put(j.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(j.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(j.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTnGpcSegment '"+e+"'")}}}var _d=Object.defineProperty,gd=(n,e,t)=>e in n?_d(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,as=(n,e,t)=>gd(n,typeof e!="symbol"?e+"":e,t);const Yt=class wn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return wn.ID}getName(){return wn.NAME}getVersion(){return wn.VERSION}initializeSegments(){let e=[];return e.push(new ud),e.push(new hd),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(j.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(j.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(j.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};as(Yt,"ID",22),as(Yt,"VERSION",1),as(Yt,"NAME","ustn");let Ie=Yt;var Td=Object.defineProperty,Od=(n,e,t)=>e in n?Td(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ni=(n,e,t)=>Od(n,typeof e!="symbol"?e+"":e,t);class Z{}Ni(Z,"SECTION_ID_NAME_MAP",new Map([[X.ID,X.NAME],[Ae.ID,Ae.NAME],[Ce.ID,Ce.NAME],[re.ID,re.NAME],[ce.ID,ce.NAME],[le.ID,le.NAME],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[pe.ID,pe.NAME],[fe.ID,fe.NAME],[he.ID,he.NAME],[_e.ID,_e.NAME],[ge.ID,ge.NAME],[Te.ID,Te.NAME],[Oe.ID,Oe.NAME],[Ne.ID,Ne.NAME],[Ie.ID,Ie.NAME]])),Ni(Z,"SECTION_ORDER",[X.NAME,Ae.NAME,Ce.NAME,re.NAME,ce.NAME,le.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,pe.NAME,fe.NAME,he.NAME,_e.NAME,ge.NAME,Te.NAME,Oe.NAME,Ne.NAME,Ie.NAME]);var Nd=Object.defineProperty,Id=(n,e,t)=>e in n?Nd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zt=(n,e,t)=>Id(n,typeof e!="symbol"?e+"":e,t);class Ii{constructor(e){zt(this,"sections",new Map),zt(this,"encodedString",null),zt(this,"decoded",!0),zt(this,"dirty",!1),e&&this.decode(e)}setFieldValue(e,t,s){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===Ae.NAME?(i=new Ae,this.sections.set(Ae.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===fe.NAME?(i=new fe,this.sections.set(fe.NAME,i)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===_e.NAME?(i=new _e,this.sections.set(_e.NAME,i)):e===ge.NAME?(i=new ge,this.sections.set(ge.NAME,i)):e===Te.NAME?(i=new Te,this.sections.set(Te.NAME,i)):e===Oe.NAME?(i=new Oe,this.sections.set(Oe.NAME,i)):e===Ne.NAME?(i=new Ne,this.sections.set(Ne.NAME,i)):e===Ie.NAME&&(i=new Ie,this.sections.set(Ie.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new Et(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).hasField(t):!1}hasFieldBySectionId(e,t){return this.hasField(Z.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(Z.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(Z.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new Je;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<Z.SECTION_ORDER.length;t++){let s=Z.SECTION_ORDER[t];if(this.sections.has(s)){let i=this.sections.get(s);e.push(i.getId())}}return e}encodeModel(e){let t=[],s=[];for(let r=0;r<Z.SECTION_ORDER.length;r++){let o=Z.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);t.push(a.encode()),s.push(a.getId())}}let i=new Je;return i.setFieldValue("SectionIds",s),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),s=new Map;if(t[0].startsWith("D")){let i=new Je(t[0]).getFieldValue("SectionIds");if(i.length!==t.length-1)throw new p("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let r=0;r<i.length;r++){if(t[r+1].trim()==="")throw new p("Unable to decode '"+e+"'. Section "+(r+1)+" is blank.");if(i[r]===Ae.ID){let o=new Ae(t[r+1]);s.set(Ae.NAME,o)}else if(i[r]===X.ID){let o=new X(t[r+1]);s.set(X.NAME,o)}else if(i[r]===Ce.ID){let o=new Ce(t[r+1]);s.set(Ce.NAME,o)}else if(i[r]===re.ID){let o=new re(t[r+1]);s.set(re.NAME,o)}else if(i[r]===ce.ID){let o=new ce(t[r+1]);s.set(ce.NAME,o)}else if(i[r]===le.ID){let o=new le(t[r+1]);s.set(le.NAME,o)}else if(i[r]===de.ID){let o=new de(t[r+1]);s.set(de.NAME,o)}else if(i[r]===Ee.ID){let o=new Ee(t[r+1]);s.set(Ee.NAME,o)}else if(i[r]===ue.ID){let o=new ue(t[r+1]);s.set(ue.NAME,o)}else if(i[r]===Se.ID){let o=new Se(t[r+1]);s.set(Se.NAME,o)}else if(i[r]===pe.ID){let o=new pe(t[r+1]);s.set(pe.NAME,o)}else if(i[r]===fe.ID){let o=new fe(t[r+1]);s.set(fe.NAME,o)}else if(i[r]===he.ID){let o=new he(t[r+1]);s.set(he.NAME,o)}else if(i[r]===_e.ID){let o=new _e(t[r+1]);s.set(_e.NAME,o)}else if(i[r]===ge.ID){let o=new ge(t[r+1]);s.set(ge.NAME,o)}else if(i[r]===Te.ID){let o=new Te(t[r+1]);s.set(Te.NAME,o)}else if(i[r]===Oe.ID){let o=new Oe(t[r+1]);s.set(Oe.NAME,o)}else if(i[r]===Ne.ID){let o=new Ne(t[r+1]);s.set(Ne.NAME,o)}else if(i[r]===Ie.ID){let o=new Ie(t[r+1]);s.set(Ie.NAME,o)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new X(e);return t.set(X.NAME,s),new Je().setFieldValue(xe.SECTION_IDS,[2]),t.set(Je.NAME,s),t}else throw new p("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(Z.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let s=null;this.sections.has(e)?s=this.sections.get(e):e===Ae.NAME?(s=new Ae,this.sections.set(Ae.NAME,s)):e===X.NAME?(s=new X,this.sections.set(X.NAME,s)):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===fe.NAME?(s=new fe,this.sections.set(fe.NAME,s)):e===he.NAME?(s=new he,this.sections.set(he.NAME,s)):e===_e.NAME?(s=new _e,this.sections.set(_e.NAME,s)):e===ge.NAME?(s=new ge,this.sections.set(ge.NAME,s)):e===Te.NAME?(s=new Te,this.sections.set(Te.NAME,s)):e===Oe.NAME?(s=new Oe,this.sections.set(Oe.NAME,s)):e===Ne.NAME?(s=new Ne,this.sections.set(Ne.NAME,s)):e===Ie.NAME&&(s=new Ie,this.sections.set(Ie.NAME,s)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(Z.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e={};for(let t=0;t<Z.SECTION_ORDER.length;t++){let s=Z.SECTION_ORDER[t];this.sections.has(s)&&(e[s]=this.sections.get(s).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}var Ad=Object.defineProperty,Cd=(n,e,t)=>e in n?Ad(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ve=(n,e,t)=>Cd(n,typeof e!="symbol"?e+"":e,t);class fd{constructor(){Ve(this,"gppVersion","1.1"),Ve(this,"supportedAPIs",[]),Ve(this,"eventQueue",new Yr(this)),Ve(this,"cmpStatus",it.LOADING),Ve(this,"cmpDisplayStatus",Ye.HIDDEN),Ve(this,"signalStatus",be.NOT_READY),Ve(this,"applicableSections",[]),Ve(this,"gppModel",new Ii),Ve(this,"cmpId"),Ve(this,"cmpVersion"),Ve(this,"eventStatus")}reset(){this.eventQueue.clear(),this.cmpStatus=it.LOADING,this.cmpDisplayStatus=Ye.HIDDEN,this.signalStatus=be.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new Ii,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class cs{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},_=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=_,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class Wt extends Error{constructor(e){super(e),this.name="GVLError"}}var md=Object.defineProperty,Pd=(n,e,t)=>e in n?md(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,wd=(n,e,t)=>Pd(n,typeof e!="symbol"?e+"":e,t);const Ai=class Dn{has(e){return Dn.langSet.has(e)}forEach(e){Dn.langSet.forEach(e)}get size(){return Dn.langSet.size}};wd(Ai,"langSet",new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]));let Dd=Ai;var bd=Object.defineProperty,vd=(n,e,t)=>e in n?bd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q=(n,e,t)=>vd(n,typeof e!="symbol"?e+"":e,t),Ci=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const fi=class bn{constructor(){q(this,"vendors"),q(this,"consentLanguages",new Dd),q(this,"gvlSpecificationVersion"),q(this,"vendorListVersion"),q(this,"tcfPolicyVersion"),q(this,"lastUpdated"),q(this,"purposes"),q(this,"specialPurposes"),q(this,"features"),q(this,"specialFeatures"),q(this,"stacks"),q(this,"dataCategories"),q(this,"language",bn.DEFAULT_LANGUAGE),q(this,"vendorIds"),q(this,"ready",!1),q(this,"fullVendorList"),q(this,"byPurposeVendorMap"),q(this,"bySpecialPurposeVendorMap"),q(this,"byFeatureVendorMap"),q(this,"bySpecialFeatureVendorMap"),q(this,"baseUrl"),q(this,"languageFilename","purposes-[LANG].json")}static fromVendorList(e){let t=new bn;return t.populate(e),t}static fromUrl(e){return Ci(this,null,function*(){let t=e.baseUrl;if(!t||t.length===0)throw new Wt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Wt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new bn;if(s.baseUrl=t,e.languageFilename?s.languageFilename=e.languageFilename:s.languageFilename="purposes-[LANG].json",e.version>0){let i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");let r=t+i.replace("[VERSION]",String(e.version));s.populate(yield cs.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(yield cs.fetch(r))}return s})}changeLanguage(e){return Ci(this,null,function*(){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const s=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(yield cs.fetch(s))}catch(i){throw new Wt("unable to load language: "+i.message)}}}else throw new Wt(`unsupported language ${e}`)})}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(c=>{a[String(c)]=this.vendors[String(c)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};q(fi,"DEFAULT_LANGUAGE","EN");let mi=fi;var Vd=Object.defineProperty,Rd=(n,e,t)=>e in n?Vd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Pi=(n,e,t)=>Rd(n,typeof e!="symbol"?e+"":e,t),yd=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});class Md{constructor(e,t,s){Pi(this,"callResponder"),Pi(this,"cmpApiContext"),this.cmpApiContext=new fd,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new kr(this.cmpApiContext,s)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(Z.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(Z.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(Z.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(Z.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(Z.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return mi.fromVendorList(e)}getGvlFromUrl(e){return yd(this,null,function*(){return mi.fromUrl(e)})}}var Ud=Object.defineProperty,Ld=(n,e,t)=>e in n?Ud(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ls=(n,e,t)=>Ld(n,typeof e!="symbol"?e+"":e,t);class wi{constructor(e,t,s){ls(this,"consentPreference"),ls(this,"notice"),ls(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Di;(n=>{(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFgdprApplies||(n.IABTCFgdprApplies={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFPurposeOneTreatment||(n.IABTCFPurposeOneTreatment={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFUseNonStandardTexts||(n.IABTCFUseNonStandardTexts={}))})(Di||(Di={}));var Gd=(n=>(n.GPP_US_NATIONAL="gpp_us_national",n.GPP_US_STATE="gpp_us_state",n))(Gd||{}),Fd=(n=>(n.FRONTEND="frontend",n.SYSTEM_WIDE="system_wide",n.NOT_APPLICABLE="not_applicable",n))(Fd||{}),bi=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(bi||{}),Ge=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(Ge||{}),Qt=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(Qt||{}),St=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(St||{}),$d=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))($d||{}),pt=(n=>(n.OVERLAY="overlay",n.BANNER_AND_MODAL="banner_and_modal",n.MODAL="modal",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.HEADLESS="headless",n))(pt||{}),xd=(n=>(n.ALWAYS_ENABLED="always_enabled",n.ENABLED_WHERE_REQUIRED="enabled_where_required",n.ALWAYS_DISABLED="always_disabled",n))(xd||{}),jd=(n=>(n.OPTIONS="options",n.EXPERIENCE_TRANSLATION="language",n))(jd||{}),Hd=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n))(Hd||{}),kd=(n=>(n.ACKNOWLEDGE="acknowledge",n.OPT_IN_OPT_OUT="opt_in_opt_out",n.OPT_IN_ONLY="opt_in_only",n))(kd||{}),Bd=(n=>(n.REJECT_ALL="reject_all",n.REJECT_CONSENT_ONLY="reject_consent_only",n))(Bd||{}),ht=(n=>(n.BUTTON="button",n.REJECT="reject",n.ACCEPT="accept",n.SCRIPT="script",n.SAVE="save",n.DISMISS="dismiss",n.GPC="gpc",n.INDIVIDUAL_NOTICE="individual_notice",n.ACKNOWLEDGE="acknowledge",n.OT_MIGRATION="ot_migration",n))(ht||{}),Kd=(n=>(n.privacy_center="privacy_center",n.overlay="overlay",n.api="api",n))(Kd||{}),Yd=(n=>(n.NONE="none",n.APPLIED="applied",n.OVERRIDDEN="overridden",n))(Yd||{}),zd=(n=>(n.OVERLAY="overlay",n.MODAL="modal",n.BANNER="banner",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.TCF_BANNER="tcf_banner",n))(zd||{});const Wd=(n,e)=>!!Object.keys(e).includes(n.notice_key),ds=n=>!n||n===Ge.OPT_OUT?!1:n===Ge.OPT_IN?!0:n===Ge.ACKNOWLEDGE,_t=(n,e)=>n?e===bi.NOTICE_ONLY?Ge.ACKNOWLEDGE:Ge.OPT_IN:Ge.OPT_OUT,Qd=n=>typeof n=="string"?ds(n):n,Jd=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var qd=Object.defineProperty,Xd=Object.defineProperties,Zd=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,eE=Object.prototype.hasOwnProperty,tE=Object.prototype.propertyIsEnumerable,Vi=(n,e,t)=>e in n?qd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jt=(n,e)=>{for(var t in e||(e={}))eE.call(e,t)&&Vi(n,t,e[t]);if(vi)for(var t of vi(e))tE.call(e,t)&&Vi(n,t,e[t]);return n},nE=(n,e)=>Xd(n,Zd(e));const lt=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Ri=n=>!!(n&&n.every(e=>e.default_preference===Ge.OPT_IN)),sE=n=>n?n.location&&Jd.test(n.location)?n.location.replace("-","_").toLowerCase():n.country&&n.region?`${n.country.toLowerCase()}_${n.region.toLowerCase()}`:null:null,yi=n=>n.fidesConsentOverride===ht.ACCEPT||n.fidesConsentOverride===ht.REJECT,iE=(n,e,t,s)=>{var i,r,o,a,c,d;return s!=null&&s.fidesDisableBanner||!lt(n)?!1:((i=n.experience_config)==null?void 0:i.component)===pt.TCF_OVERLAY&&e?s&&yi(s)?!1:(r=n.meta)!=null&&r.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((o=n.experience_config)==null?void 0:o.component)===pt.MODAL||((a=n.experience_config)==null?void 0:a.component)===pt.HEADLESS||!((c=n?.privacy_notices)!=null&&c.length)?!1:t?s&&yi(s)?!1:e?.fides_meta.consentMethod===ht.GPC?!0:!((d=n.privacy_notices)!=null&&d.every(u=>Wd(u,t))):!0},rE=(n,e)=>n.map(t=>{var s;const i=_t(e.includes(t.notice.notice_key),t.notice.consent_mechanism);return new wi(t.notice,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)}),oE=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=Qt.OMIT})=>{if(!(e!=null&&e.length))return n;const i=Jt({},n);return s===Qt.INCLUDE?e.forEach(r=>{i[r]=t===St.CONSENT_MECHANISM?Ge.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},aE=({consent:n,flagType:e=St.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==St.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,Qd(o)]));const i=Object.values(n).some(r=>typeof r=="boolean");if(i&&!t)throw new Error("Cannot transform boolean consent values to consent mechanisms without consent mechanisms map");return i?(Object.keys(n).forEach(r=>{const o=n[r];if(typeof o=="string")s[r]=o;else{const a=t[r];s[r]=_t(o,a)}}),s):Jt({},n)},Mi=(n,e,t=[],s,i)=>{var r,o,a;const c=Jt({},n),d=(r=window.Fides)==null?void 0:r.options,u=(o=i??d?.fidesConsentNonApplicableFlagMode)!=null?o:Qt.OMIT,_=(a=s??d?.fidesConsentFlagType)!=null?a:St.BOOLEAN,E={};Object.assign(E,oE({consent:{},nonApplicableNotices:e??[],flagType:_,mode:u}));const N=t.reduce((g,f)=>nE(Jt({},g),{[f.notice_key]:f.consent_mechanism}),{});return Object.assign(E,aE({consent:c,consentMechanisms:N,flagType:_})),E};var Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */qt.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof Es=="object"&&Es;(r.global===r||r.window===r)&&(t=r);var o=function(g){this.message=g};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(g){throw new o(g)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,u=function(g){g=String(g).replace(d,"");var f=g.length;f%4==0&&(g=g.replace(/==?$/,""),f=g.length),(f%4==1||/[^+a-zA-Z0-9/]/.test(g))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var C=0,m,P,ne="",ye=-1;++ye<f;)P=c.indexOf(g.charAt(ye)),m=C%4?m*64+P:P,C++%4&&(ne+=String.fromCharCode(255&m>>(-2*C&6)));return ne},_=function(g){g=String(g),/[^\0-\xFF]/.test(g)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var f=g.length%3,C="",m=-1,P,ne,ye,Pe,Pr=g.length-f;++m<Pr;)P=g.charCodeAt(m)<<16,ne=g.charCodeAt(++m)<<8,ye=g.charCodeAt(++m),Pe=P+ne+ye,C+=c.charAt(Pe>>18&63)+c.charAt(Pe>>12&63)+c.charAt(Pe>>6&63)+c.charAt(Pe&63);return f==2?(P=g.charCodeAt(m)<<8,ne=g.charCodeAt(++m),Pe=P+ne,C+=c.charAt(Pe>>10)+c.charAt(Pe>>4&63)+c.charAt(Pe<<2&63)+"="):f==1&&(Pe=g.charCodeAt(m),C+=c.charAt(Pe>>2)+c.charAt(Pe<<4&63)+"=="),C},E={encode:_,decode:u,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=E;else for(var N in E)E.hasOwnProperty(N)&&(s[N]=E[N]);else t.base64=E})(Es)}(qt,qt.exports);var Ui=qt.exports;/*! js-cookie v3.0.5 | MIT */function Xt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)n[s]=t[s]}return n}var cE={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function us(n,e){function t(i,r,o){if(!(typeof document>"u")){o=Xt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in o)o[c]&&(a+="; "+c,o[c]!==!0&&(a+="="+o[c].split(";")[0]));return document.cookie=i+"="+n.write(r,i)+a}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var r=document.cookie?document.cookie.split("; "):[],o={},a=0;a<r.length;a++){var c=r[a].split("="),d=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(o[u]=n.read(d,u),i===u)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",Xt({},r,{expires:-1}))},withAttributes:function(i){return us(this.converter,Xt({},this.attributes,i))},withConverter:function(i){return us(Xt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var lE=us(cE,{path:"/"});let Zt;const dE=new Uint8Array(16);function EE(){if(!Zt&&(Zt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zt(dE)}const ae=[];for(let n=0;n<256;++n)ae.push((n+256).toString(16).slice(1));function uE(n,e=0){return ae[n[e+0]]+ae[n[e+1]]+ae[n[e+2]]+ae[n[e+3]]+"-"+ae[n[e+4]]+ae[n[e+5]]+"-"+ae[n[e+6]]+ae[n[e+7]]+"-"+ae[n[e+8]]+ae[n[e+9]]+"-"+ae[n[e+10]]+ae[n[e+11]]+ae[n[e+12]]+ae[n[e+13]]+ae[n[e+14]]+ae[n[e+15]]}const SE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Li={randomUUID:SE};function pE(n,e,t){if(Li.randomUUID&&!e&&!n)return Li.randomUUID();n=n||{};const s=n.random||(n.rng||EE)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=s[i];return e}return uE(s)}var hE=(n=>(n.CONSENT="Consent",n.CONTRACT="Contract",n.LEGAL_OBLIGATIONS="Legal obligations",n.VITAL_INTERESTS="Vital interests",n.PUBLIC_INTEREST="Public interest",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(hE||{}),Ss=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(Ss||{});const ps=407,en=",",_E=[{experienceKey:"tcf_purpose_consents",tcfModelKey:"purposeConsents",enabledIdsKey:"purposesConsent"},{experienceKey:"tcf_purpose_legitimate_interests",tcfModelKey:"purposeLegitimateInterests",enabledIdsKey:"purposesLegint"},{experienceKey:"tcf_special_features",tcfModelKey:"specialFeatureOptins",enabledIdsKey:"specialFeatures"},{experienceKey:"tcf_vendor_consents",tcfModelKey:"vendorConsents",enabledIdsKey:"vendorsConsent"},{experienceKey:"tcf_vendor_legitimate_interests",tcfModelKey:"vendorLegitimateInterests",enabledIdsKey:"vendorsLegint"}],gE=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];_E.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),Ss.CONSENT.toString(),Ss.LEGITIMATE_INTERESTS.toString();const TE={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var OE=Object.defineProperty,NE=Object.defineProperties,IE=Object.getOwnPropertyDescriptors,Gi=Object.getOwnPropertySymbols,AE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,Fi=(n,e,t)=>e in n?OE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,fE=(n,e)=>{for(var t in e||(e={}))AE.call(e,t)&&Fi(n,t,e[t]);if(Gi)for(var t of Gi(e))CE.call(e,t)&&Fi(n,t,e[t]);return n},mE=(n,e)=>NE(n,IE(e)),PE=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const $i="fides_consent",wE=365,tn=lE.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),DE=()=>pE();DE();const bE=n=>tn.get(n),vE=()=>{const n=bE($i);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(Ui.decode(n))}catch{return}}},xi=(n,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();n.fides_meta.updatedAt=t;let s=JSON.stringify(n);e&&(s=Ui.encode(s));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),tn.set($i,s,{path:"/",domain:r,expires:wE})){const a=vE();if(a&&a.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},VE=n=>{const e={};return gE.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,ds(r.preference)]))}),e},RE=(n,e=!0)=>{n.forEach(t=>{var s;if(tn.remove(t.name,{path:(s=t.path)!=null?s:"/",domain:t.domain}),e){const{hostname:i}=window.location;tn.remove(t.name,{domain:`.${i}`})}})},ji=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,ds(s)]));return Object.fromEntries(e)},yE=(n,e)=>PE(void 0,null,function*(){return mE(fE({},n),{consent:ji(e)})});var ME=(n=>(n.GVL="gvl",n.AC="gacp",n))(ME||{});const je=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},nn=(n,e)=>{if(!(e!=null&&e.vendors))return;const{source:t,id:s}=je(n);if(t==="gvl"||t===void 0)return e.vendors[s]},UE=n=>je(n).source==="gacp",LE=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(t=>t.id).filter(t=>nn(t,n.gvl)).map(t=>+je(t).id)},GE=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>nn(t,n.gvl)).map(t=>+je(t).id)},FE=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(en);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},Hi=n=>{var e;const t=n.getGppString();if(!t)return window.Fides.fides_string;const s=new Array(4).fill(""),i=(((e=window.Fides.fides_string)==null?void 0:e.split(en))||[]).concat(s);return s.map((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},$E=1,Xe={us:{name:re.NAME,id:re.ID},us_ca:{name:ce.NAME,id:ce.ID},us_co:{name:de.NAME,id:de.ID},us_ct:{name:ue.NAME,id:ue.ID},us_ut:{name:Ee.NAME,id:Ee.ID},us_va:{name:le.NAME,id:le.ID},us_de:{name:_e.NAME,id:_e.ID},us_fl:{name:Se.NAME,id:Se.ID},us_ia:{name:ge.NAME,id:ge.ID},us_mt:{name:pe.NAME,id:pe.ID},us_ne:{name:Te.NAME,id:Te.ID},us_nh:{name:Oe.NAME,id:Oe.ID},us_nj:{name:Ne.NAME,id:Ne.ID},us_tn:{name:Ie.NAME,id:Ie.ID},us_tx:{name:he.NAME,id:he.ID}};function ki(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}var xE=Object.defineProperty,jE=Object.defineProperties,HE=Object.getOwnPropertyDescriptors,Bi=Object.getOwnPropertySymbols,kE=Object.prototype.hasOwnProperty,BE=Object.prototype.propertyIsEnumerable,Ki=(n,e,t)=>e in n?xE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yi=(n,e)=>{for(var t in e||(e={}))kE.call(e,t)&&Ki(n,t,e[t]);if(Bi)for(var t of Bi(e))BE.call(e,t)&&Ki(n,t,e[t]);return n},zi=(n,e)=>jE(n,HE(e)),KE=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())}),YE=(n=>(n.PRIVACY_EXPERIENCE="/privacy-experience",n.PRIVACY_PREFERENCES="/privacy-preferences",n.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",n.NOTICES_SERVED="/notices-served",n))(YE||{});const zE={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},WE="Fides.js",QE=(n,e,t,s,i)=>KE(void 0,null,function*(){var r;if((r=t.apiOptions)!=null&&r.savePreferencesFn){try{yield t.apiOptions.savePreferencesFn(n,s.consent,s.fides_string,i)}catch(c){return Promise.reject(c)}return Promise.resolve()}const o=zi(Yi({},zE),{body:JSON.stringify(zi(Yi({},e),{source:WE}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var JE=Object.defineProperty,qE=Object.defineProperties,XE=Object.getOwnPropertyDescriptors,Wi=Object.getOwnPropertySymbols,ZE=Object.prototype.hasOwnProperty,eu=Object.prototype.propertyIsEnumerable,Qi=(n,e,t)=>e in n?JE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hs=(n,e)=>{for(var t in e||(e={}))ZE.call(e,t)&&Qi(n,t,e[t]);if(Wi)for(var t of Wi(e))eu.call(e,t)&&Qi(n,t,e[t]);return n},tu=(n,e)=>qE(n,XE(e));const Ji=(n,e,t)=>{var s,i,r,o,a,c,d;const u=e?hs({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const _=hs({consentMethod:u?.fides_meta.consentMethod},t),E=(s=performance?.mark)==null?void 0:s.call(performance,n),N=E?.startTime,g=u;g&&u!=null&&u.consent&&(g.consent=Mi(u.consent,(r=(i=window.Fides)==null?void 0:i.experience)==null?void 0:r.non_applicable_privacy_notices,(a=(o=window.Fides)==null?void 0:o.experience)==null?void 0:a.privacy_notices));const f=new CustomEvent(n,{detail:tu(hs({},g),{debug:!!((d=(c=window.Fides)==null?void 0:c.options)!=null&&d.debug),extraDetails:_,timestamp:N}),bubbles:!0});window.dispatchEvent(f)}};var nu=Object.defineProperty,su=Object.defineProperties,iu=Object.getOwnPropertyDescriptors,qi=Object.getOwnPropertySymbols,ru=Object.prototype.hasOwnProperty,ou=Object.prototype.propertyIsEnumerable,Xi=(n,e,t)=>e in n?nu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zi=(n,e)=>{for(var t in e||(e={}))ru.call(e,t)&&Xi(n,t,e[t]);if(qi)for(var t of qi(e))ou.call(e,t)&&Xi(n,t,e[t]);return n},au=(n,e)=>su(n,iu(e)),er=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});function cu(n,e,t,s,i,r,o,a,c,d){return er(this,null,function*(){const u=(r||[]).map(E=>({preference:E.consentPreference,privacy_notice_history_id:E.noticeHistoryId||""})),_=Zi({browser_identity:e.identity,preferences:u,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:c,property_id:d},o??[]);yield QE(s,_,n,e,t)})}const lu=n=>er(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,servedNoticeHistoryId:c,tcf:d,updateCookie:u,propertyId:_}){var E,N,g,f;if(!u&&e&&(u=P=>yE(P,e)),!u&&!e)throw new Error("updateCookie is required");const C=yield u(a);Object.assign(a,C),Object.assign(a.fides_meta,{consentMethod:i}),Ji("FidesUpdating",a);const m=Mi(a.consent,(N=(E=window.Fides)==null?void 0:E.experience)==null?void 0:N.non_applicable_privacy_notices,(f=(g=window.Fides)==null?void 0:g.experience)==null?void 0:f.privacy_notices);if(window.Fides.consent=m,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,xi(au(Zi({},a),{consent:m}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield cu(r,a,s,i,t,e,d,o,c,_)}catch{}e&&e.filter(P=>P.consentPreference===Ge.OPT_OUT).forEach(P=>{var ne,ye;(ne=P.notice)!=null&&ne.cookies&&RE(P.notice.cookies,(ye=s.experience_config)==null?void 0:ye.auto_subdomain_cookie_deletion)}),Ji("FidesUpdated",a)});class ze extends Error{constructor(e){super(e),this.name="DecodingError"}}class He extends Error{constructor(e){super(e),this.name="EncodingError"}}class dt extends Error{constructor(e){super(e),this.name="GVLError"}}class ke extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class _s{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new He("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let i=0;i<e.length;i+=this.BASIS)s+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new ze("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const i=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class Be{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return Be.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(Be.langSet.has(e))return e;if(Be.langSet.has(t))return t;const s=t+"-"+t;if(Be.langSet.has(s))return s;for(const i of Be.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){Be.langSet.forEach(e)}get size(){return Be.langSet.size}}class S{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class gt{clone(){const e=new this.constructor;return Object.keys(this).forEach(s=>{const i=this.deepClone(this[s]);i!==void 0&&(e[s]=i)}),e}deepClone(e){const t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){const s=[];for(const i of e)s.push(this.deepClone(i));return e instanceof Array?s:new e.constructor(s)}else{const s={};for(const i in e)e.hasOwnProperty(i)&&(s[i]=this.deepClone(e[i]));return s}}}}var Re;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(Re||(Re={}));class $e extends gt{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),s=new $e;if(t.length!==2)throw new ke("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${$e.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===Re.NOT_ALLOWED||this.restrictionType===Re.REQUIRE_CONSENT||this.restrictionType===Re.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class tr extends gt{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[s];if(r)if(e===Re.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case Re.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case Re.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(s))this.map.set(s,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(s).add(o)}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const s=new Set;this.map.forEach(i=>{i.forEach(r=>{s.add(r)})}),t=Array.from(s)}return t.sort((s,i)=>s-i)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(s===void 0||s>i.restrictionType)&&(s=i.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!s;r++)s=t.isSameAs(i[r]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,i)=>{e?s.has(e)&&t.push($e.unHash(i)):t.push($e.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add($e.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,i=this.map.get(s);i&&(i.delete(e),i.size==0&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,s)=>{const i=$e.unHash(s);Array.from(t).forEach(o=>{this.isOkToHave(i.restrictionType,i.purposeId,o)||t.delete(o)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}}var nr;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(nr||(nr={}));var Q;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(Q||(Q={}));class sr{static ID_TO_KEY=[Q.CORE,Q.VENDORS_DISCLOSED,Q.VENDORS_ALLOWED,Q.PUBLISHER_TC];static KEY_TO_ID={[Q.CORE]:0,[Q.VENDORS_DISCLOSED]:1,[Q.VENDORS_ALLOWED]:2,[Q.PUBLISHER_TC]:3}}class me extends gt{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(s=>{let i=Number.isInteger(parseInt(s,10));return i=i&&this.isValidNumber(e[s].id),i=i&&e[s].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new ke("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class T{static[S.cmpId]=12;static[S.cmpVersion]=12;static[S.consentLanguage]=12;static[S.consentScreen]=6;static[S.created]=36;static[S.isServiceSpecific]=1;static[S.lastUpdated]=36;static[S.policyVersion]=6;static[S.publisherCountryCode]=12;static[S.publisherLegitimateInterests]=24;static[S.publisherConsents]=24;static[S.purposeConsents]=24;static[S.purposeLegitimateInterests]=24;static[S.purposeOneTreatment]=1;static[S.specialFeatureOptins]=12;static[S.useNonStandardTexts]=1;static[S.vendorListVersion]=12;static[S.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class Fe{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class D{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new He(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");return parseInt(e,2)}}class ir{static encode(e,t){return D.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");const s=new Date;return s.setTime(D.decode(e,t)*100),s}}class We{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=Fe.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new ze("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)Fe.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class rr{static encode(e,t){e=e.toUpperCase();const s=65,i=e.charCodeAt(0)-s,r=e.charCodeAt(1)-s;if(i<0||i>25||r<0||r>25)throw new He(`invalid language code: ${e}`);if(t%2===1)throw new He(`numBits must be even, ${t} is not valid`);t=t/2;const o=D.encode(i,t),a=D.encode(r,t);return o+a}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=D.decode(e.slice(0,r),r)+65,a=D.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new ze("invalid bit length for language");return s}}class du{static encode(e){let t=D.encode(e.numRestrictions,T.numRestrictions);if(!e.isEmpty()){const s=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=D.encode(i.purposeId,T.purposeId),t+=D.encode(i.restrictionType,T.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,c=0,d="";for(let u=0;u<o;u++){const _=r[u];if(c===0&&(a++,c=_),u===o-1||r[u+1]>s(_,r[o-1])){const E=_!==c;d+=Fe.encode(E),d+=D.encode(c,T.vendorId),E&&(d+=D.encode(_,T.vendorId)),c=0}}t+=D.encode(a,T.numEntries),t+=d})}return t}static decode(e){let t=0;const s=new tr,i=D.decode(e.substr(t,T.numRestrictions),T.numRestrictions);t+=T.numRestrictions;for(let r=0;r<i;r++){const o=D.decode(e.substr(t,T.purposeId),T.purposeId);t+=T.purposeId;const a=D.decode(e.substr(t,T.restrictionType),T.restrictionType);t+=T.restrictionType;const c=new $e(o,a),d=D.decode(e.substr(t,T.numEntries),T.numEntries);t+=T.numEntries;for(let u=0;u<d;u++){const _=Fe.decode(e.substr(t,T.anyBoolean));t+=T.anyBoolean;const E=D.decode(e.substr(t,T.vendorId),T.vendorId);if(t+=T.vendorId,_){const N=D.decode(e.substr(t,T.vendorId),T.vendorId);if(t+=T.vendorId,N<E)throw new ze(`Invalid RangeEntry: endVendorId ${N} is less than ${E}`);for(let g=E;g<=N;g++)s.add(g,c)}else s.add(E,c)}}return s.bitLength=t,s}}var Tt;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Tt||(Tt={}));class Ot{static encode(e){const t=[];let s=[],i=D.encode(e.maxId,T.maxId),r="",o;const a=T.maxId+T.encodingType,c=a+e.maxId,d=T.vendorId*2+T.singleOrRange+T.numEntries;let u=a+T.numEntries;return e.forEach((_,E)=>{r+=Fe.encode(_),o=e.maxId>d&&u<c,o&&_&&(e.has(E+1)?s.length===0&&(s.push(E),u+=T.singleOrRange,u+=T.vendorId):(s.push(E),u+=T.vendorId,t.push(s),s=[]))}),o?(i+=String(Tt.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(Tt.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=D.decode(e.substr(i,T.maxId),T.maxId);i+=T.maxId;const o=D.decode(e.charAt(i),T.encodingType);if(i+=T.encodingType,o===Tt.RANGE){if(s=new me,t===1){if(e.substr(i,1)==="1")throw new ze("Unable to decode default consent=1");i++}const a=D.decode(e.substr(i,T.numEntries),T.numEntries);i+=T.numEntries;for(let c=0;c<a;c++){const d=Fe.decode(e.charAt(i));i+=T.singleOrRange;const u=D.decode(e.substr(i,T.vendorId),T.vendorId);if(i+=T.vendorId,d){const _=D.decode(e.substr(i,T.vendorId),T.vendorId);i+=T.vendorId;for(let E=u;E<=_;E++)s.set(E)}else s.set(u)}}else{const a=e.substr(i,r);i+=r,s=We.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=D.encode(t,T.numEntries);return e.forEach(i=>{const r=i.length===1;s+=Fe.encode(!r),s+=D.encode(i[0],T.vendorId),r||(s+=D.encode(i[1],T.vendorId))}),s}}function or(){return{[S.version]:D,[S.created]:ir,[S.lastUpdated]:ir,[S.cmpId]:D,[S.cmpVersion]:D,[S.consentScreen]:D,[S.consentLanguage]:rr,[S.vendorListVersion]:D,[S.policyVersion]:D,[S.isServiceSpecific]:Fe,[S.useNonStandardTexts]:Fe,[S.specialFeatureOptins]:We,[S.purposeConsents]:We,[S.purposeLegitimateInterests]:We,[S.purposeOneTreatment]:Fe,[S.publisherCountryCode]:rr,[S.vendorConsents]:Ot,[S.vendorLegitimateInterests]:Ot,[S.publisherRestrictions]:du,segmentType:D,[S.vendorsDisclosed]:Ot,[S.vendorsAllowed]:Ot,[S.publisherConsents]:We,[S.publisherLegitimateInterests]:We,[S.numCustomPurposes]:D,[S.publisherCustomConsents]:We,[S.publisherCustomLegitimateInterests]:We}}class Eu{1={[Q.CORE]:[S.version,S.created,S.lastUpdated,S.cmpId,S.cmpVersion,S.consentScreen,S.consentLanguage,S.vendorListVersion,S.purposeConsents,S.vendorConsents]};2={[Q.CORE]:[S.version,S.created,S.lastUpdated,S.cmpId,S.cmpVersion,S.consentScreen,S.consentLanguage,S.vendorListVersion,S.policyVersion,S.isServiceSpecific,S.useNonStandardTexts,S.specialFeatureOptins,S.purposeConsents,S.purposeLegitimateInterests,S.purposeOneTreatment,S.publisherCountryCode,S.vendorConsents,S.vendorLegitimateInterests,S.publisherRestrictions],[Q.PUBLISHER_TC]:[S.publisherConsents,S.publisherLegitimateInterests,S.numCustomPurposes,S.publisherCustomConsents,S.publisherCustomLegitimateInterests],[Q.VENDORS_ALLOWED]:[S.vendorsAllowed],[Q.VENDORS_DISCLOSED]:[S.vendorsDisclosed]}}class uu{1=[Q.CORE];2=[Q.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(Q.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[S.supportOOB]===!0)&&this[2].push(Q.VENDORS_DISCLOSED),s&&(e[S.supportOOB]&&e[S.vendorsAllowed].size>0&&this[2].push(Q.VENDORS_ALLOWED),this[2].push(Q.PUBLISHER_TC))}}}class ar{static fieldSequence=new Eu;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new He(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==Q.CORE&&(i=D.encode(sr.KEY_TO_ID[t],T.segmentType));const r=or();return s.forEach(o=>{const a=e[o],c=r[o];let d=T[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[S.numCustomPurposes]));try{i+=c.encode(a,d)}catch(u){throw new He(`Error encoding ${t}->${o}: ${u.message}`)}}),_s.encode(i)}static decode(e,t,s){const i=_s.decode(e);let r=0;s===Q.CORE&&(t.version=D.decode(i.substr(r,T[S.version]),T[S.version])),s!==Q.CORE&&(r+=T.segmentType);const o=this.fieldSequence[String(t.version)][s],a=or();return o.forEach(c=>{const d=a[c];let u=T[c];if(u===void 0&&this.isPublisherCustom(c)&&(u=Number(t[S.numCustomPurposes])),u!==0){const _=i.substr(r,u);if(d===Ot?t[c]=d.decode(_,t.version):t[c]=d.decode(_,u),Number.isInteger(u))r+=u;else if(Number.isInteger(t[c].bitLength))r+=t[c].bitLength;else throw new ze(c)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Su{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((i,r)=>{i.forEach((o,a)=>{if(o){const c=t.vendors[a];if(!c||c.deletedDate)i.unset(a);else if(c[r].length===0)if(r==="legIntPurposes"&&c.purposes.length===0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&c.purposes.length>0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(c.flexiblePurposes.length===0)i.unset(a);else{const d=e.publisherRestrictions.getRestrictions(a);let u=!1;for(let _=0,E=d.length;_<E&&!u;_++)u=d[_].restrictionType===Re.REQUIRE_CONSENT&&r==="purposes"||d[_].restrictionType===Re.REQUIRE_LI&&r==="legIntPurposes";u||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const s=e.gvl;if(!s)throw new He("Unable to encode TCModel without a GVL");if(!s.isReady)throw new He("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const i=e.version-1;if(!this.processor[i])throw new He(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class pu{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},_=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=_,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class A extends gt{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new Be;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new dt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=A.baseUrl,i=t?.language;if(i)try{i=A.consentLanguages.parseLanguage(i)}catch(r){throw new dt("Error during parsing the language: "+r.message)}if(this.lang_=i||A.DEFAULT_LANGUAGE,this.cacheLang_=i||A.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new dt("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;A.CACHE.has(r)?(this.populate(A.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=A.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else A.CACHE.has(A.LATEST_CACHE_KEY)?(this.populate(A.CACHE.get(A.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+A.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&A.LANGUAGE_CACHE.size>0?(A.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(A.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(A.CACHE.delete(e),t=!0):e===void 0&&(A.CACHE=new Map,t=!0),t}cacheLanguage(){A.LANGUAGE_CACHE.has(this.cacheLang_)||A.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await pu.fetch(e))}catch(t){throw new dt(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=A.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=A.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=A.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=A.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=A.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=A.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=A.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=A.consentLanguages.parseLanguage(e)}catch(i){throw new dt("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===A.DEFAULT_LANGUAGE.toLowerCase()&&!A.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,A.LANGUAGE_CACHE.has(s)){const i=A.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=A.baseUrl+A.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new dt("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&A.CACHE.set(A.LATEST_CACHE_KEY,this.getJson()),A.CACHE.has(this.vendorListVersion)||A.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(c=>{a[String(c)]=this.vendors[String(c)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new A(this.getJson());return this.lang_!==A.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class cr extends gt{static consentLanguages=A.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=4;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new me;purposeConsents=new me;purposeLegitimateInterests=new me;publisherConsents=new me;publisherLegitimateInterests=new me;publisherCustomConsents=new me;publisherCustomLegitimateInterests=new me;customPurposes;vendorConsents=new me;vendorLegitimateInterests=new me;vendorsDisclosed=new me;vendorsAllowed=new me;publisherRestrictions=new tr;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){A.isInstanceOf(e)||(e=new A(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new ke("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new ke("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new ke("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new ke("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new ke("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new ke("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((s,i)=>Number(s)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new ke("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class hu{static encode(e,t){let s="",i;return e=Su.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new uu(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=ar.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new cr);for(let r=0;r<i;r++){const o=s[r],c=_s.decode(o.charAt(0)).substr(0,T.segmentType),d=sr.ID_TO_KEY[D.decode(c,T.segmentType).toString()];ar.decode(o,t,d)}return t}}var Qe;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Qe||(Qe={}));var sn;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(sn||(sn={}));var rn;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(rn||(rn={}));var lr;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(lr||(lr={}));class on{listenerId;callback;next;param;success=!0;constructor(e,t,s,i){Object.assign(this,{callback:e,listenerId:s,param:t,next:i});try{this.respond()}catch{this.invokeCallback(null)}}invokeCallback(e){const t=e!==null;typeof this.next=="function"?this.callback(this.next,e,t):this.callback(e,t)}}class an extends on{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Er(this.param,this.listenerId))}throwIfParamInvalid(){if(this.param!==void 0&&(!Array.isArray(this.param)||!this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class _u{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new an(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class oe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new _u;static cmpStatus=sn.LOADING;static disabled=!1;static displayStatus=rn.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=sn.LOADING,this.disabled=!1,this.displayStatus=rn.HIDDEN,this.eventQueue.clear()}}class dr{cmpId=oe.cmpId;cmpVersion=oe.cmpVersion;gdprApplies=oe.gdprApplies;tcfPolicyVersion=oe.tcfPolicyVersion}class Er extends dr{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=oe.eventStatus,this.cmpStatus=oe.cmpStatus,this.listenerId=t,oe.gdprApplies){const s=oe.tcModel;this.tcString=oe.tcString,this.isServiceSpecific=s.isServiceSpecific,this.useNonStandardTexts=s.useNonStandardTexts,this.purposeOneTreatment=s.purposeOneTreatment,this.publisherCC=s.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(s.vendorsAllowed,e),disclosedVendors:this.createVectorField(s.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(s.purposeConsents),legitimateInterests:this.createVectorField(s.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(s.vendorConsents,e),legitimateInterests:this.createVectorField(s.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(s.specialFeatureOptins),this.publisher={consents:this.createVectorField(s.publisherConsents),legitimateInterests:this.createVectorField(s.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(s.publisherCustomConsents),legitimateInterests:this.createVectorField(s.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(s.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let i=1;i<=s;i++){const r=i.toString();e.getRestrictions(i).forEach(o=>{const a=o.purposeId.toString();t[a]||(t[a]={}),t[a][r]=o.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((s,i)=>(s[String(i)]=e.has(Number(i)),s),{}):[...e].reduce((s,i)=>(s[i[0].toString(10)]=i[1],s),{})}}class gu extends Er{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,s)=>(t+=s[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(s)});for(let i=0;i<s;i++){const r=i+1;e.getRestrictions(r).forEach(o=>{const a=o.restrictionType.toString(),c=o.purposeId.toString(),d=t[c].substr(0,i),u=t[c].substr(i+1);t[c]=d+a+u})}}return t}}class Tu extends dr{cmpLoaded=!0;cmpStatus=oe.cmpStatus;displayStatus=oe.displayStatus;apiVersion=String(oe.apiVersion);gvlVersion;constructor(){super(),oe.tcModel&&oe.tcModel.vendorListVersion&&(this.gvlVersion=+oe.tcModel.vendorListVersion)}}class Ou extends on{respond(){this.invokeCallback(new Tu)}}class Nu extends an{respond(){this.throwIfParamInvalid(),this.invokeCallback(new gu(this.param))}}class Iu extends on{respond(){const e=oe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new A(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Au extends an{respond(){this.listenerId=oe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class Cu extends on{respond(){this.invokeCallback(oe.eventQueue.remove(this.param))}}class TS{static[Qe.PING]=Ou;static[Qe.GET_TC_DATA]=an;static[Qe.GET_IN_APP_TC_DATA]=Nu;static[Qe.GET_VENDOR_LIST]=Iu;static[Qe.ADD_EVENT_LISTENER]=Au;static[Qe.REMOVE_EVENT_LISTENER]=Cu}const fu=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(en);return t.split(".")[0]}return e??""};var mu=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const Pu=1,ur=[1,3,4,5,6],wu=2,Du=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(UE).map(o=>je(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${wu}~${s}~dv.${i}`},bu=n=>mu(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const c=new cr(new A(e.gvl));yield c.gvl.readyPromise,c.cmpId=ps,c.cmpVersion=Pu,c.consentScreen=1,c.isServiceSpecific=!0,c.supportOOB=!1,e.tcf_publisher_country_code&&(c.publisherCountryCode=e.tcf_publisher_country_code);const d=e.minimal_tcf?GE(e):LE(e);if(c.gvl.narrowVendorsTo(d),t){t.vendorsConsent.forEach(E=>{var N,g,f;if(nn(E,e.gvl)){const{id:C}=je(E);if(c.vendorConsents.set(+C),!((N=e.tcf_publisher_restrictions)!=null&&N.length)){const m=(g=e.gvl)==null?void 0:g.vendors[C];m&&!((f=m?.purposes)!=null&&f.length)&&m.flexiblePurposes.forEach(P=>{const ne=new $e;ne.purposeId=P,ne.restrictionType=Re.REQUIRE_CONSENT,c.publisherRestrictions.add(+C,ne)})}}}),t.vendorsLegint.forEach(E=>{var N,g;if(e.minimal_tcf)(N=e.tcf_vendor_legitimate_interest_ids)==null||N.forEach(f=>{const{id:C}=je(f);c.vendorLegitimateInterests.set(+C)});else if(nn(E,e.gvl)){const f=(g=e.tcf_vendor_legitimate_interests)==null?void 0:g.filter(P=>P.id===E)[0],C=f?.purpose_legitimate_interests;let m=!1;if(C&&(C.map(P=>P.id).filter(P=>ur.includes(P)).length&&(m=!0),!m)){const{id:P}=je(E);c.vendorLegitimateInterests.set(+P)}}}),(s=e.gvl)!=null&&s.vendors&&((i=e.tcf_vendor_relationships)==null||i.forEach(E=>{var N,g;const{id:f}=je(E.id),C=(N=e.gvl)==null?void 0:N.vendors[f];C&&(g=C.specialPurposes)!=null&&g.length&&(!C.legIntPurposes||C.legIntPurposes.length===0)&&c.vendorLegitimateInterests.set(+f)})),t.purposesConsent.forEach(E=>{c.purposeConsents.set(+E)}),t.purposesLegint.forEach(E=>{const N=+E;ur.includes(N)||c.purposeLegitimateInterests.set(N)}),t.specialFeatures.forEach(E=>{c.specialFeatureOptins.set(+E)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(E=>{E.vendors.forEach(N=>{const g=new $e;g.purposeId=E.purpose_id,g.restrictionType=E.restriction_type,c.publisherRestrictions.add(N,g)})}),a=hu.encode(c,{segments:[Q.CORE]});const u=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(E=>E.id),_=Du({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:u??[]});a=`${a}${en}${_}`}}catch(c){return console.error("Unable to instantiate GVL: ",c),Promise.resolve("")}return Promise.resolve(a)});var vu=Object.defineProperty,Vu=Object.defineProperties,Ru=Object.getOwnPropertyDescriptors,Sr=Object.getOwnPropertySymbols,yu=Object.prototype.hasOwnProperty,Mu=Object.prototype.propertyIsEnumerable,pr=(n,e,t)=>e in n?vu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Uu=(n,e)=>{for(var t in e||(e={}))yu.call(e,t)&&pr(n,t,e[t]);if(Sr)for(var t of Sr(e))Mu.call(e,t)&&pr(n,t,e[t]);return n},Lu=(n,e)=>Vu(n,Ru(e)),Gu=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const Ze=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=_t(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],et=n=>n!=null&&n.length?n.map(e=>{const t=_t(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],Fu=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consents)!=null&&a.map(c=>c.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interests)!=null&&a.map(c=>c.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:Ze({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:Ze({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:Ze({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:Ze({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:Ze({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:Ze({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:Ze({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},$u=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consent_ids)!=null&&a.includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interest_ids)!=null&&a.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:et(e.purposesConsent),purpose_legitimate_interests_preferences:et(e.purposesLegint),special_feature_preferences:et(e.specialFeatures),vendor_consent_preferences:et(s),vendor_legitimate_interests_preferences:et(r),system_consent_preferences:et(t),system_legitimate_interests_preferences:et(i)}},xu=(n,e,t,s,i)=>Gu(void 0,null,function*(){var r;const o=yield bu({tcStringPreferences:t,experience:s}),a=Lu(Uu({},n),{fides_string:o,tcf_consent:VE(e),tcf_version_hash:(r=s.meta)==null?void 0:r.version_hash});return i&&(a.consent=ji(i)),a}),ju=(n,e)=>!n||!e?[]:n.map(t=>{var s;const i=_t(e.includes(t.id),t.consent_mechanism);return new wi(t,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)});var De=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(De||{});const tt="us",hr=({cmpApi:n,sectionName:e,gppSettings:t})=>{t&&[{gppSettingField:t.mspa_covered_transactions,cmpApiField:I.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:I.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:I.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:s,cmpApiField:i})=>{const r=i===I.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:s&&(o=1),n.setFieldValue(e,i,o)})},Hu=n=>n?.toLowerCase().startsWith("us"),gs=({experienceRegion:n,usApproach:e})=>Hu(n)&&e===De.NATIONAL?tt:n,_r=({cmpApi:n,experience:e})=>{const t=new Set,{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=gs({experienceRegion:i,usApproach:o}),c=Xe[a];return!c&&o===De.ALL&&(a=tt,c=Xe[a]),!c||a===tt&&o===De.STATE?[]:(t.add(c),s.forEach(d=>{var u;const{gpp_field_mapping:_}=d,E=(u=_?.find(N=>N.region===a))==null?void 0:u.notice;E&&E.forEach(N=>{n.setFieldValue(c.name,N,1)})}),hr({cmpApi:n,sectionName:c.name,gppSettings:r}),Array.from(t))},gr=({cmpApi:n,cookie:e,experience:t})=>{const s=new Set,{privacy_notices:i=[],region:r,gpp_settings:o}=t,a=o?.us_approach;let c=gs({experienceRegion:r,usApproach:a}),d=Xe[c];if(!d&&a===De.ALL&&(c=tt,d=Xe[c]),!d||c===tt&&a===De.STATE)return[];s.add(d);const{consent:u}=e;return Object.keys(u).forEach(_=>{var E;const N=i?.find(f=>f.notice_key===_),g=u[_];if(N){const{gpp_field_mapping:f}=N,C=(E=f?.find(m=>m.region===c))==null?void 0:E.mechanism;C&&C.forEach(m=>{let P=m.not_available;g===!1?P=m.opt_out:g&&(P=m.not_opt_out);let ne=+P;P.length>1&&(ne=P.split("").map(ye=>+ye)),n.setFieldValue(d.name,m.field,ne)})}}),hr({cmpApi:n,sectionName:d.name,gppSettings:o}),Array.from(s)};var ku=Object.defineProperty,Bu=Object.defineProperties,Ku=Object.getOwnPropertyDescriptors,Tr=Object.getOwnPropertySymbols,Yu=Object.prototype.hasOwnProperty,zu=Object.prototype.propertyIsEnumerable,Or=(n,e,t)=>e in n?ku(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nr=(n,e)=>{for(var t in e||(e={}))Yu.call(e,t)&&Or(n,t,e[t]);if(Tr)for(var t of Tr(e))zu.call(e,t)&&Or(n,t,e[t]);return n},Ir=(n,e)=>Bu(n,Ku(e));const Wu=[1,3,4,5,6],Qu=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=gs({experienceRegion:i,usApproach:o}),c=Xe[a];return!c&&o===De.ALL&&(a=tt,c=Xe[a]),!c||a===tt&&o===De.STATE||s.forEach(d=>{var u;const{notice_key:_,gpp_field_mapping:E}=d,N=(u=E?.find(g=>g.region===a))==null?void 0:u.mechanism;if(N){const g=N.some(f=>{const C=n.getFieldValue(c.name,f.field),m=Array.isArray(C)?C.join(""):String(C);return m===f.opt_out?!0:(f.not_opt_out,!1)});g!==void 0&&(t[_]=!g)}}),t},Ju=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=TE,a=n.getSection(X.NAME);if(!a)return o;const c=a.PurposeConsents.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),d=a.PurposeLegitimateInterests.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),u=a.VendorConsents.map(E=>`gvl.${E}`),_=a.VendorLegitimateInterests.map(E=>`gvl.${E}`);return o.purposesConsent=c,o.purposesLegint=d.filter(E=>!Wu.includes(parseInt(E,10))),o.vendorsConsent=u,o.vendorsLegint=_,o.specialFeatures=a.SpecialFeatureOptins.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(E=>E.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(E=>E.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(E=>E.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(E=>E.toString()))||[]),o.customPurposesConsent=[],o},qu=({fidesString:n,cmpApi:e})=>{const{gpp:t}=FE(n);if(!n||!t||!e)return;const{options:s,cookie:i,geolocation:r,locale:o,config:a}=window.Fides,c=window.Fides.experience;if(!c||!c.experience_config||!c.privacy_notices)return;const d=c.experience_config.component===pt.TCF_OVERLAY,u=sE(r),_=c.experience_config.translations.find(C=>ki(C.language,o));if(!_)return;e.setGppString(t),e.setSignalStatus(be.READY);const E=c.privacy_notices.map(C=>({notice:C,bestTranslation:C.translations.find(m=>ki(m.language,o))||null}));let N,g,f;if(d){const C=Ju({cmpApi:e,experience:c});f=ju(E.map(({notice:m,bestTranslation:P})=>Ir(Nr({},m),{bestTranslation:P})),C.customPurposesConsent),g=c.minimal_tcf?$u({experience:c,enabledIds:C}):Fu({experience:c,enabledIds:C}),N=m=>xu(m,g,C,c)}else{const C=Qu({cmpApi:e,experience:c}),m=Object.entries(C).filter(([P,ne])=>ne).map(([P])=>P);f=rE(E,m),N=P=>Promise.resolve(Ir(Nr({},P),{consent:C}))}lu({consentPreferencesToSave:f,privacyExperienceConfigHistoryId:_.privacy_experience_config_history_id,experience:c,consentMethod:ht.SCRIPT,options:s,userLocationString:u||void 0,cookie:i,propertyId:a?.propertyId,tcf:g,updateCookie:N})},Ar="__gppLocator",Cr=n=>{if(!window.frames[n])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=n,window.document.body.appendChild(e)}else setTimeout(()=>Cr(n),5)},Xu=n=>{let e=window,t;for(;e;){try{if(e.frames[n]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},Zu=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,eS=()=>{const n=[],e=[];let t;const s=(r,o,a,c)=>{if(r==="queue")return n;if(r==="events")return e;const d={gppVersion:"1.1",cmpStatus:it.STUB,cmpDisplayStatus:Ye.HIDDEN,signalStatus:be.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(d,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const u=t;e.push({id:u,callback:o,parameter:a}),o({eventName:"listenerRegistered",listenerId:u,data:!0,pingData:d},!0)}else if(r==="removeEventListener"){let u=!1;for(let _=0;_<e.length;_++)if(e[_].id===a){e.splice(_,1),u=!0;break}o({eventName:"listenerRemoved",listenerId:a,data:u,pingData:d},!0)}else r==="hasSection"?o(!1,!0):r==="getSection"||r==="getField"?o(null,!0):n.push([].slice.apply([r,o,a,c]));return null},i=r=>{const o=typeof r.data=="string";let a={};if(o)try{a=JSON.parse(r.data)}catch{a={}}else a=r.data;if(!Zu(a))return null;if(a.__gppCall&&window.__gpp){const c=a.__gppCall;window.__gpp(c.command,(d,u)=>{const _={__gppReturn:{returnValue:d,success:u,callId:c.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(_):_,"*")},"parameter"in c?c.parameter:void 0,"version"in c?c.version:"1.1")}return null};Xu(Ar)||(Cr(Ar),window.__gpp=s,window.addEventListener("message",i,!1))},fr=(n,e,t)=>n?e?!0:!!(t&&Object.entries(n).some(([s,i])=>s in t.map(r=>r.notice_key)&&i!==void 0)):!1,mr=(n,e)=>{if(!lt(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!(t!=null&&t.enable_tcfeu_string))return!1;const s=fu(n);return s?(e.setFieldValueBySectionId(X.ID,"CmpId",ps),e.setSectionStringById(X.ID,s),!0):!1},tS=()=>{const n=[];if(lt(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${X.ID}:${X.NAME}`),(e.us_approach===De.NATIONAL||e.us_approach===De.ALL)&&n.push(`${re.ID}:${re.NAME}`),(e.us_approach===De.STATE||e.us_approach===De.ALL)&&Object.values(Xe).forEach(t=>{t.id!==re.ID&&n.push(`${t.id}:${t.name}`)}))}return n},nS=()=>{eS();const n=new Md(ps,$E);n.setCmpStatus(it.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=tS();if(n.setSupportedAPIs(o),!lt(s))return;const{fidesString:a}=r;if(a&&qu({fidesString:a,cmpApi:n}),!a&&(!iE(s,e.detail,i,r)||!r.tcfEnabled&&Ri(s.privacy_notices)&&!fr(i,e.detail.fides_string,s.privacy_notices))){const c=mr(e,n);c&&n.setApplicableSections([X.ID]);const d=_r({cmpApi:n,experience:s}),u=gr({cmpApi:n,cookie:e.detail,experience:s});u.length&&n.setApplicableSections(u.map(E=>E.id)),!c&&!d.length&&!u.length&&n.setApplicableSections([-1]),n.setSignalStatus(be.READY);const _=Hi(n);window.Fides.fides_string=_}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",c=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(lt(t)){!i.tcfEnabled&&Ri(t.privacy_notices)&&!fr(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(be.READY):n.setSignalStatus(be.NOT_READY),n.setCmpDisplayStatus(Ye.VISIBLE);const r=_r({cmpApi:n,experience:t});r.length&&(n.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{n.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(n.setCmpDisplayStatus(Ye.HIDDEN),n.setSignalStatus(be.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(Ye.HIDDEN),mr(e,n)&&(n.setApplicableSections([X.ID]),n.fireSectionChange("tcfeuv2")),lt(window.Fides.experience)){const t=gr({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});t.length&&(n.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{n.fireSectionChange(i.name)}));const s=Hi(n);window.Fides.cookie&&(window.Fides.fides_string=s,window.Fides.cookie.fides_string=s,xi(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(be.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&nS()});
|
1
|
+
class xt{eventName;listenerId;data;pingData;constructor(e,t,n,i){this.eventName=e,this.listenerId=t,this.data=n,this.pingData=i}}class Tt{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 tt=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)}},cn=class extends tt{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new xt("listenerRegistered",e,!0,new Tt(this.cmpApiContext));this.invokeCallback(t)}},dn=class extends tt{respond(){let e=new Tt(this.cmpApiContext);this.invokeCallback(e)}};class En extends tt{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 un extends tt{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 Sn extends tt{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 be;(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"})(be||(be={}));let pn=class extends tt{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),n=new xt("listenerRemoved",e,t,new Tt(this.cmpApiContext));this.invokeCallback(n)}},es=class{static[be.ADD_EVENT_LISTENER]=cn;static[be.GET_FIELD]=En;static[be.GET_SECTION]=un;static[be.HAS_SECTION]=Sn;static[be.PING]=dn;static[be.REMOVE_EVENT_LISTENER]=pn};var st;(function(s){s.STUB="stub",s.LOADING="loading",s.LOADED="loaded",s.ERROR="error"})(st||(st={}));var Ke;(function(s){s.VISIBLE="visible",s.HIDDEN="hidden",s.DISABLED="disabled"})(Ke||(Ke={}));var ts;(function(s){s.GPP_LOADED="gpploaded",s.CMP_UI_SHOWN="cmpuishown",s.USER_ACTION_COMPLETE="useractioncomplete"})(ts||(ts={}));var me;(function(s){s.NOT_READY="not ready",s.READY="ready"})(me||(me={}));class _n{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let n=be.ADD_EVENT_LISTENER;if(t?.[n])throw new Error(`Built-In Custom Commmand for ${n} not allowed`);if(n=be.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 es[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 es[e]!==void 0}}let hn=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 xt(e,i,t,new Tt(this.cmpApiContext));n.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class ct 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 ct("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 ct("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"}},Te=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class M{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 Te("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new _("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 gt{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);encode(e){if(!/^[0-1]*$/.test(e))throw new Te("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",n=0;for(;n<=e.length-6;){let i=e.substring(n,n+6);try{let r=M.decode(i),o=gt.DICT.charAt(r);t+=o,n+=6}catch{throw new Te("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=gt.REVERSE_DICT.get(i),o=M.encode(r,6);t+=o}return t}}class k extends gt{static instance=new k;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class w{static instance=new w;constructor(){}static getInstance(){return this.instance}encode(e,t){let 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 nt{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 it=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Te("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new _("Undecodable Boolean '"+e+"'")}};class ss{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=M.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"+nt.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"+nt.encode(a)+nt.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new _("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],n=M.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<n;o++){let a=it.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),E=nt.decode(e.substring(r,l+2))+i;i=E,r=l+2,l=e.indexOf("11",r);let S=nt.decode(e.substring(r,l+2))+i;i=S,r=l+2;for(let p=E;p<=S;p++)t.push(p)}else{let l=e.indexOf("11",r),E=nt.decode(e.substring(r,l+2))+i;i=E,t.push(E),r=l+2}}return t}}class gn extends Error{constructor(e){super(e),this.name="ValidationError"}}class Ve{hardFailIfMissing;validator;value;constructor(e=!0){this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new gn("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class we 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 we("Invalid substring indexes "+t+":"+n+" for string of length "+e.length);return e.substring(t,n)}}class Tn extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ss.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=ss.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{let n=M.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 we(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class c extends Ve{bitStringLength;constructor(e,t,n=!0){super(n),this.bitStringLength=e,this.setValue(t)}encode(){try{return M.encode(this.value,this.bitStringLength)}catch(e){throw new Te(e)}}decode(e){try{this.value=M.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.bitStringLength)}catch(n){throw new we(n)}}}class V{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 In=[Fe.ID,Fe.VERSION,Fe.SECTION_IDS];class D{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new ct("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 ct(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 On extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return In}initializeFields(){let e=new V;return e.put(Fe.ID.toString(),new c(6,Me.ID)),e.put(Fe.VERSION.toString(),new c(6,Me.VERSION)),e.put(Fe.SECTION_IDS.toString(),new Tn([])),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 Me extends Z{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Me.ID}getName(){return Me.NAME}getVersion(){return Me.VERSION}initializeSegments(){let e=[];return e.push(new On),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 Nn=[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],An=[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],fn=[h.VENDORS_ALLOWED_SEGMENT_TYPE,h.VENDORS_ALLOWED],Cn=[h.VENDORS_DISCLOSED_SEGMENT_TYPE,h.VENDORS_DISCLOSED];class et extends gt{static instance=new et;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class rt{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=M.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+M.encode(t[r][0],16):i+="1"+M.encode(t[r][0],16)+M.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new _("Undecodable FixedIntegerRange '"+e+"'");let t=[],n=M.decode(e.substring(0,12)),i=12;for(let r=0;r<n;r++){let o=it.decode(e.substring(i,i+1));if(i++,o===!0){let a=M.decode(e.substring(i,i+16));i+=16;let l=M.decode(e.substring(i,i+16));i+=16;for(let E=a;E<=l;E++)t.push(E)}else{let a=M.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Ft extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return rt.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=rt.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{let n=M.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 we(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class Pn{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 ns extends Ve{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+=M.encode(e.length,12);for(let n=0;n<e.length;n++){let i=e[n];t+=M.encode(i.getKey(),this.keyBitStringLength),t+=M.encode(i.getType(),this.typeBitStringLength),t+=rt.encode(i.getIds())}return t}catch(e){throw new Te(e)}}decode(e){try{let t=[],n=M.decode(ee.substring(e,0,12)),i=12;for(let r=0;r<n;r++){let o=M.decode(ee.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=M.decode(ee.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Ft([]).substring(e,i),E=rt.decode(l);i+=l.length,t.push(new Pn(o,a,E))}this.value=t}catch(t){throw new _(t)}}substring(e,t){try{let n="";n+=ee.substring(e,t,t+12);let i=M.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 E=new Ft([]).substring(e,r);r+=E.length,n+=E}return n}catch(n){throw new we(n)}}}class j extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return it.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=it.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+1)}catch(n){throw new we(n)}}}class is{static encode(e){return e?M.encode(Math.round(e.getTime()/100),36):M.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new _("Undecodable Datetime '"+e+"'");return new Date(M.decode(e)*100)}}class It extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return is.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=is.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+36)}catch(n){throw new we(n)}}}class ot{static encode(e,t){if(e.length>t)throw new Te("Too many values '"+e.length+"'");let n="";for(let i=0;i<e.length;i++)n+=it.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(it.decode(e.substring(n,n+1)));return t}}class Le extends Ve{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return ot.encode(this.value,this.numElements)}catch(e){throw new Te(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.numElements)}catch(n){throw new we(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 rs{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+=M.encode(63,6);else if(r>=65)n+=M.encode(e.charCodeAt(i)-65,6);else throw new Te("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=M.decode(e.substring(n,n+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class Bt extends Ve{stringLength;constructor(e,t,n=!0){super(n),this.stringLength=e,this.setValue(t)}encode(){try{return rs.encode(this.value,this.stringLength)}catch(e){throw new Te(e)}}decode(e){try{this.value=rs.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.stringLength*6)}catch(n){throw new we(n)}}}class Qe extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=rt.encode(this.value),n=t.length,i=e;if(n<=i)return M.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return M.encode(e,16)+"0"+ot.encode(r,i)}}catch(e){throw new Te(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=rt.decode(e.substring(17));else{let t=[],n=ot.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=M.decode(ee.substring(e,t,t+16));return e.charAt(t+16)==="1"?ee.substring(e,t,t+17)+new Ft([]).substring(e,t+17):ee.substring(e,t,t+17+n)}catch(n){throw new we(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class wn extends D{base64UrlEncoder=et.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Nn}initializeFields(){let e=new Date,t=new V;return t.put(h.VERSION.toString(),new c(6,W.VERSION)),t.put(h.CREATED.toString(),new It(e)),t.put(h.LAST_UPDATED.toString(),new It(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 Bt(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 j(!1)),t.put(h.USE_NON_STANDARD_STACKS.toString(),new j(!1)),t.put(h.SPECIAL_FEATURE_OPTINS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_CONSENTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_ONE_TREATMENT.toString(),new j(!1)),t.put(h.PUBLISHER_COUNTRY_CODE.toString(),new Bt(2,"AA")),t.put(h.VENDOR_CONSENTS.toString(),new Qe([])),t.put(h.VENDOR_LEGITIMATE_INTERESTS.toString(),new Qe([])),t.put(h.PUBLISHER_RESTRICTIONS.toString(),new ns(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 Ot extends Ve{getLength;constructor(e,t,n=!0){super(n),this.getLength=e,this.setValue(t)}encode(){try{return ot.encode(this.value,this.getLength())}catch(e){throw new Te(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.getLength())}catch(n){throw new we(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 Dn extends D{base64UrlEncoder=et.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return An}initializeFields(){let e=new V;e.put(h.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(h.PUBLISHER_CONSENTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(h.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(h.NUM_CUSTOM_PURPOSES.toString(),t),e.put(h.PUBLISHER_CUSTOM_CONSENTS.toString(),new Ot(()=>t.getValue(),[])),e.put(h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new Ot(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class mn extends D{base64UrlEncoder=et.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return fn}initializeFields(){let e=new V;return e.put(h.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(h.VENDORS_ALLOWED.toString(),new Qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Vn extends D{base64UrlEncoder=et.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Cn}initializeFields(){let e=new V;return e.put(h.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(h.VENDORS_DISCLOSED.toString(),new Qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class W extends Z{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return W.ID}getName(){return W.NAME}getVersion(){return W.VERSION}initializeSegments(){let e=[];return e.push(new wn),e.push(new Dn),e.push(new mn),e.push(new Vn),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 Rn=[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],Mn=[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],bn=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class Ln extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Rn}initializeFields(){let e=new Date,t=new V;return t.put(I.VERSION.toString(),new c(6,Ae.VERSION)),t.put(I.CREATED.toString(),new It(e)),t.put(I.LAST_UPDATED.toString(),new It(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 Bt(2,"EN")),t.put(I.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(I.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(I.USE_NON_STANDARD_STACKS.toString(),new j(!1)),t.put(I.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_IMPLIED_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.VENDOR_EXPRESS_CONSENT.toString(),new Qe([])),t.put(I.VENDOR_IMPLIED_CONSENT.toString(),new Qe([])),t.put(I.PUB_RESTRICTIONS.toString(),new ns(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 vn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Mn}initializeFields(){let e=new V;e.put(I.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(I.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(I.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(I.NUM_CUSTOM_PURPOSES.toString(),t),e.put(I.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new Ot(()=>t.getValue(),[])),e.put(I.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new Ot(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Gn extends D{base64UrlEncoder=et.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return bn}initializeFields(){let e=new V;return e.put(I.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(I.DISCLOSED_VENDORS.toString(),new Qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ae extends Z{static ID=5;static VERSION=1;static NAME="tcfcav1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ae.ID}getName(){return Ae.NAME}getVersion(){return Ae.VERSION}initializeSegments(){let e=[];return e.push(new Ln),e.push(new vn),e.push(new Gn),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 Ht{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 yn{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 Un{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 Ie;(function(s){s.VERSION="Version",s.NOTICE="Notice",s.OPT_OUT_SALE="OptOutSale",s.LSPA_COVERED="LspaCovered"})(Ie||(Ie={}));const xn=[Ie.VERSION,Ie.NOTICE,Ie.OPT_OUT_SALE,Ie.LSPA_COVERED];class Fn extends D{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return xn}initializeFields(){const e=new class{test(n){return n==="-"||n==="Y"||n==="N"}};let t=new Un;return t.put(Ie.VERSION,new yn(fe.VERSION)),t.put(Ie.NOTICE,new Ht("-",e)),t.put(Ie.OPT_OUT_SALE,new Ht("-",e)),t.put(Ie.LSPA_COVERED,new Ht("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Ie.VERSION).getValue(),t+=e.get(Ie.NOTICE).getValue(),t+=e.get(Ie.OPT_OUT_SALE).getValue(),t+=e.get(Ie.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new _("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Ie.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Ie.NOTICE).setValue(e.charAt(1)),t.get(Ie.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Ie.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new _("Unable to decode UspV1CoreSegment '"+e+"'")}}}class fe extends Z{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return fe.ID}getName(){return fe.NAME}getVersion(){return fe.VERSION}initializeSegments(){let e=[];return e.push(new Fn),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 Bn=[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],Hn=[N.GPC_SEGMENT_TYPE,N.GPC];class os{static encode(e,t,n){if(e.length>n)throw new Te("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=M.encode(e[r],t);for(;i.length<t*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(M.decode(e.substring(r,r+t)));for(;i.length<n;)i.push(0);return i}}class Q extends Ve{elementBitStringLength;numElements;constructor(e,t,n=!0){super(n),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return os.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Te(e)}}decode(e){try{this.value=os.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 we(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 kn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Bn}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 V;return i.put(N.VERSION.toString(),new c(6,X.VERSION)),i.put(N.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(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 Kn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hn}initializeFields(){let e=new V;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(N.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 kn),e.push(new Kn),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 b;(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"})(b||(b={}));const $n=[b.VERSION,b.SALE_OPT_OUT_NOTICE,b.SHARING_OPT_OUT_NOTICE,b.SENSITIVE_DATA_LIMIT_USE_NOTICE,b.SALE_OPT_OUT,b.SHARING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.PERSONAL_DATA_CONSENTS,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],jn=[b.GPC_SEGMENT_TYPE,b.GPC];class Yn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return $n}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},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 V;return i.put(b.VERSION.toString(),new c(6,ne.VERSION)),i.put(b.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0]).withValidator(n)),i.put(b.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(b.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCaCoreSegment '"+e+"'")}}}class zn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return jn}initializeFields(){let e=new V;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(b.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 Yn),e.push(new zn),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 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 Wn=[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 Qn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Wn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},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 V;return i.put(q.VERSION.toString(),new c(6,ie.VERSION)),i.put(q.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(q.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(q.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(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 Qn),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 K;(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"})(K||(K={}));const Jn=[K.VERSION,K.SHARING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_OPT_OUT_NOTICE,K.SALE_OPT_OUT,K.TARGETED_ADVERTISING_OPT_OUT,K.SENSITIVE_DATA_PROCESSING,K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,K.MSPA_COVERED_TRANSACTION,K.MSPA_OPT_OUT_OPTION_MODE,K.MSPA_SERVICE_PROVIDER_MODE],qn=[K.GPC_SEGMENT_TYPE,K.GPC];class Xn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Jn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},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 V;return i.put(K.VERSION.toString(),new c(6,re.VERSION)),i.put(K.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0]).withValidator(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 UsCoCoreSegment '"+e+"'")}}}class Zn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return qn}initializeFields(){let e=new V;return e.put(K.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(K.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(K.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 Xn),e.push(new Zn),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(K.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(K.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(K.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var Y;(function(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"})(Y||(Y={}));const ei=[Y.VERSION,Y.SHARING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];class ti extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ei}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},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 V;return i.put(Y.VERSION.toString(),new c(6,oe.VERSION)),i.put(Y.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(Y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(Y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(Y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 ti),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 $;(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"})($||($={}));const si=[$.VERSION,$.SHARING_NOTICE,$.SALE_OPT_OUT_NOTICE,$.TARGETED_ADVERTISING_OPT_OUT_NOTICE,$.SALE_OPT_OUT,$.TARGETED_ADVERTISING_OPT_OUT,$.SENSITIVE_DATA_PROCESSING,$.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,$.MSPA_COVERED_TRANSACTION,$.MSPA_OPT_OUT_OPTION_MODE,$.MSPA_SERVICE_PROVIDER_MODE],ni=[$.GPC_SEGMENT_TYPE,$.GPC];class ii extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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 V;return i.put($.VERSION.toString(),new c(6,ae.VERSION)),i.put($.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(n)),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 UsCtCoreSegment '"+e+"'")}}}class ri extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ni}initializeFields(){let e=new V;return e.put($.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put($.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put($.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 ii),e.push(new ri),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($.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue($.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue($.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var z;(function(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"})(z||(z={}));const oi=[z.VERSION,z.PROCESSING_NOTICE,z.SALE_OPT_OUT_NOTICE,z.TARGETED_ADVERTISING_OPT_OUT_NOTICE,z.SALE_OPT_OUT,z.TARGETED_ADVERTISING_OPT_OUT,z.SENSITIVE_DATA_PROCESSING,z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,z.ADDITIONAL_DATA_PROCESSING_CONSENT,z.MSPA_COVERED_TRANSACTION,z.MSPA_OPT_OUT_OPTION_MODE,z.MSPA_SERVICE_PROVIDER_MODE];class ai extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return oi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},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 V;return i.put(z.VERSION.toString(),new c(6,le.VERSION)),i.put(z.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(z.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(n)),i.put(z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(z.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(z.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 ai),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 L;(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"})(L||(L={}));const li=[L.VERSION,L.SHARING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],ci=[L.GPC_SEGMENT_TYPE,L.GPC];class di extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return li}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 V;return i.put(L.VERSION.toString(),new c(6,ce.VERSION)),i.put(L.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(n)),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 UsMtCoreSegment '"+e+"'")}}}class Ei extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ci}initializeFields(){let e=new V;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(L.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 di),e.push(new Ei),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 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 ui=[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],Si=[v.GPC_SEGMENT_TYPE,v.GPC];class pi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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 V;return i.put(v.VERSION.toString(),new c(6,de.VERSION)),i.put(v.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(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 _i extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){let e=new V;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(v.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 pi),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(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 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 hi=[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],gi=[G.GPC_SEGMENT_TYPE,G.GPC];class Ti extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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 V;return i.put(G.VERSION.toString(),new c(6,Ee.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(G.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ii extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){let e=new V;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(G.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 Ti),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(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 Oi=[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],Ni=[y.GPC_SEGMENT_TYPE,y.GPC];class Ai extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Oi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},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 V;return i.put(y.VERSION.toString(),new c(6,ue.VERSION)),i.put(y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(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 UsDeCoreSegment '"+e+"'")}}}class fi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ni}initializeFields(){let e=new V;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(y.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 Ai),e.push(new fi),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.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"})(U||(U={}));const Ci=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SENSITIVE_DATA_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],Pi=[U.GPC_SEGMENT_TYPE,U.GPC];class wi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ci}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},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 V;return i.put(U.VERSION.toString(),new c(6,Se.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsIaCoreSegment '"+e+"'")}}}class Di extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}initializeFields(){let e=new V;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(U.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 wi),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(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(".")}}var x;(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"})(x||(x={}));const mi=[x.VERSION,x.PROCESSING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.ADDITIONAL_DATA_PROCESSING_CONSENT,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],Vi=[x.GPC_SEGMENT_TYPE,x.GPC];class Ri extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},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 V;return i.put(x.VERSION.toString(),new c(6,pe.VERSION)),i.put(x.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(x.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNeCoreSegment '"+e+"'")}}}class Mi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}initializeFields(){let e=new V;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(x.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 Ri),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(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var F;(function(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"})(F||(F={}));const bi=[F.VERSION,F.PROCESSING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.ADDITIONAL_DATA_PROCESSING_CONSENT,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],Li=[F.GPC_SEGMENT_TYPE,F.GPC];class vi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return bi}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 V;return i.put(F.VERSION.toString(),new c(6,_e.VERSION)),i.put(F.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(n)),i.put(F.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Gi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Li}initializeFields(){let e=new V;return e.put(F.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(F.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 vi),e.push(new Gi),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 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 yi=[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],Ui=[B.GPC_SEGMENT_TYPE,B.GPC];class xi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yi}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 V;return i.put(B.VERSION.toString(),new c(6,he.VERSION)),i.put(B.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(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 UsNjCoreSegment '"+e+"'")}}}class Fi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ui}initializeFields(){let e=new V;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(B.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 xi),e.push(new Fi),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 H;(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"})(H||(H={}));const Bi=[H.VERSION,H.PROCESSING_NOTICE,H.SALE_OPT_OUT_NOTICE,H.TARGETED_ADVERTISING_OPT_OUT_NOTICE,H.SALE_OPT_OUT,H.TARGETED_ADVERTISING_OPT_OUT,H.SENSITIVE_DATA_PROCESSING,H.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,H.ADDITIONAL_DATA_PROCESSING_CONSENT,H.MSPA_COVERED_TRANSACTION,H.MSPA_OPT_OUT_OPTION_MODE,H.MSPA_SERVICE_PROVIDER_MODE],Hi=[H.GPC_SEGMENT_TYPE,H.GPC];class ki extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Bi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},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 V;return i.put(H.VERSION.toString(),new c(6,ge.VERSION)),i.put(H.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(H.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(H.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(H.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(H.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(H.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(H.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(H.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(H.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(H.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(H.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTnCoreSegment '"+e+"'")}}}class Ki extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}initializeFields(){let e=new V;return e.put(H.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(H.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(H.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let 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 ki),e.push(new Ki),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(H.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(H.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(H.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class te{static SECTION_ID_NAME_MAP=new Map([[W.ID,W.NAME],[Ae.ID,Ae.NAME],[fe.ID,fe.NAME],[X.ID,X.NAME],[ne.ID,ne.NAME],[ie.ID,ie.NAME],[re.ID,re.NAME],[oe.ID,oe.NAME],[ae.ID,ae.NAME],[le.ID,le.NAME],[ce.ID,ce.NAME],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[pe.ID,pe.NAME],[_e.ID,_e.NAME],[he.ID,he.NAME],[ge.ID,ge.NAME]]);static SECTION_ORDER=[W.NAME,Ae.NAME,fe.NAME,X.NAME,ne.NAME,ie.NAME,re.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,pe.NAME,_e.NAME,he.NAME,ge.NAME]}class as{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===Ae.NAME?(i=new Ae,this.sections.set(Ae.NAME,i)):e===W.NAME?(i=new W,this.sections.set(W.NAME,i)):e===fe.NAME?(i=new fe,this.sections.set(fe.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===ne.NAME?(i=new ne,this.sections.set(ne.NAME,i)):e===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===oe.NAME?(i=new oe,this.sections.set(oe.NAME,i)):e===ae.NAME?(i=new ae,this.sections.set(ae.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===_e.NAME?(i=new _e,this.sections.set(_e.NAME,i)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===ge.NAME&&(i=new ge,this.sections.set(ge.NAME,i)),i)i.setFieldValue(t,n),this.dirty=!0,i.setIsDirty(!0);else throw new ct(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 Me;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<te.SECTION_ORDER.length;t++){let 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 Me;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 Me(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]===Ae.ID){let l=new Ae(t[o+1]);n.set(Ae.NAME,l)}else if(r[o]===W.ID){let l=new W(t[o+1]);n.set(W.NAME,l)}else if(r[o]===fe.ID){let l=new fe(t[o+1]);n.set(fe.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 W(e);return t.set(W.NAME,n),new Me().setFieldValue(Fe.SECTION_IDS,[2]),t.set(Me.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===Ae.NAME?(n=new Ae,this.sections.set(Ae.NAME,n)):e===W.NAME?(n=new W,this.sections.set(W.NAME,n)):e===fe.NAME?(n=new fe,this.sections.set(fe.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 $i{gppVersion="1.1";supportedAPIs=[];eventQueue=new hn(this);cmpStatus=st.LOADING;cmpDisplayStatus=Ke.HIDDEN;signalStatus=me.NOT_READY;applicableSections=[];gppModel=new as;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=st.LOADING,this.cmpDisplayStatus=Ke.HIDDEN,this.signalStatus=me.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new as,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class kt{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 d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},E=()=>{o(new Error("error"))},S=()=>{o(new Error("aborted"))},p=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=n,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",S),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 Nt=class extends Error{constructor(e){super(e),this.name="GVLError"}},ji=class yt{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH"]);has(e){return yt.langSet.has(e)}forEach(e){yt.langSet.forEach(e)}get size(){return yt.langSet.size}},ls=class Ut{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new ji;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=Ut.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new Ut;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new Nt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Nt("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 Ut;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 kt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;n.populate(await kt.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 kt.fetch(n))}catch(i){throw new Nt("unable to load language: "+i.message)}}}else throw new Nt(`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 Yi{callResponder;cmpApiContext;constructor(e,t,n){this.cmpApiContext=new $i,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new _n(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 ls.fromVendorList(e)}async getGvlFromUrl(e){return ls.fromUrl(e)}}var zi=Object.defineProperty,Wi=(s,e,t)=>e in s?zi(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Kt=(s,e,t)=>Wi(s,typeof e!="symbol"?e+"":e,t);class cs{constructor(e,t,n){Kt(this,"consentPreference"),Kt(this,"notice"),Kt(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=n}}var ds;(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={}))})(ds||(ds={}));var Qi=(s=>(s.GPP_US_NATIONAL="gpp_us_national",s.GPP_US_STATE="gpp_us_state",s))(Qi||{}),Ji=(s=>(s.FRONTEND="frontend",s.SYSTEM_WIDE="system_wide",s.NOT_APPLICABLE="not_applicable",s))(Ji||{}),Es=(s=>(s.OPT_IN="opt_in",s.OPT_OUT="opt_out",s.NOTICE_ONLY="notice_only",s))(Es||{}),ve=(s=>(s.OPT_IN="opt_in",s.OPT_OUT="opt_out",s.ACKNOWLEDGE="acknowledge",s.NOT_APPLICABLE="not_applicable",s.TCF="tcf",s))(ve||{}),At=(s=>(s.OMIT="omit",s.INCLUDE="include",s))(At||{}),dt=(s=>(s.BOOLEAN="boolean",s.CONSENT_MECHANISM="consent_mechanism",s))(dt||{}),qi=(s=>(s.THROW="throw",s.WARN="warn",s.IGNORE="ignore",s))(qi||{}),Et=(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))(Et||{}),Xi=(s=>(s.ALWAYS_ENABLED="always_enabled",s.ENABLED_WHERE_REQUIRED="enabled_where_required",s.ALWAYS_DISABLED="always_disabled",s))(Xi||{}),Zi=(s=>(s.OPTIONS="options",s.EXPERIENCE_TRANSLATION="language",s))(Zi||{}),er=(s=>(s.PRIMARY="primary",s.SECONDARY="secondary",s.TERTIARY="tertiary",s))(er||{}),tr=(s=>(s.ACKNOWLEDGE="acknowledge",s.OPT_IN_OPT_OUT="opt_in_opt_out",s.OPT_IN_ONLY="opt_in_only",s))(tr||{}),sr=(s=>(s.REJECT_ALL="reject_all",s.REJECT_CONSENT_ONLY="reject_consent_only",s))(sr||{}),$e=(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))($e||{}),nr=(s=>(s.privacy_center="privacy_center",s.overlay="overlay",s.api="api",s))(nr||{}),ir=(s=>(s.NONE="none",s.APPLIED="applied",s.OVERRIDDEN="overridden",s))(ir||{}),rr=(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))(rr||{});const or=(s,e)=>!!Object.keys(e).includes(s.notice_key),$t=s=>!s||s===ve.OPT_OUT?!1:s===ve.OPT_IN?!0:s===ve.ACKNOWLEDGE,ut=(s,e)=>s?e===Es.NOTICE_ONLY?ve.ACKNOWLEDGE:ve.OPT_IN:ve.OPT_OUT,ar=s=>typeof s=="string"?$t(s):s,lr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var cr=Object.defineProperty,dr=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,us=Object.getOwnPropertySymbols,ur=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,Ss=(s,e,t)=>e in s?cr(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ft=(s,e)=>{for(var t in e||(e={}))ur.call(e,t)&&Ss(s,t,e[t]);if(us)for(var t of us(e))Sr.call(e,t)&&Ss(s,t,e[t]);return s},pr=(s,e)=>dr(s,Er(e));const at=s=>!s||typeof s!="object"?!1:Object.keys(s).length===0||"id"in s,ps=s=>!!(s&&s.every(e=>e.default_preference===ve.OPT_IN)),_r=s=>s?s.location&&lr.test(s.location)?s.location.replace("-","_").toLowerCase():s.country&&s.region?`${s.country.toLowerCase()}_${s.region.toLowerCase()}`:null:null,_s=s=>s.fidesConsentOverride===$e.ACCEPT||s.fidesConsentOverride===$e.REJECT,hr=(s,e,t,n)=>{var i,r,o,a,l,E;return n!=null&&n.fidesDisableBanner||!at(s)?!1:((i=s.experience_config)==null?void 0:i.component)===Et.TCF_OVERLAY&&e?n&&_s(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)===Et.MODAL||((a=s.experience_config)==null?void 0:a.component)===Et.HEADLESS||!((l=s?.privacy_notices)!=null&&l.length)?!1:t?n&&_s(n)?!1:e?.fides_meta.consentMethod===$e.GPC?!0:!((E=s.privacy_notices)!=null&&E.every(S=>or(S,t))):!0},gr=(s,e)=>s.map(t=>{var n;const i=ut(e.includes(t.notice.notice_key),t.notice.consent_mechanism);return new cs(t.notice,i,(n=t.bestTranslation)==null?void 0:n.privacy_notice_history_id)}),Tr=({consent:s,nonApplicableNotices:e,flagType:t,mode:n=At.OMIT})=>{if(!(e!=null&&e.length))return s;const i=ft({},s);return n===At.INCLUDE?e.forEach(r=>{i[r]=t===dt.CONSENT_MECHANISM?ve.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},Ir=({consent:s,flagType:e=dt.BOOLEAN,consentMechanisms:t})=>{const n={};if(e!==dt.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(s).map(([r,o])=>[r,ar(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]=ut(o,a)}}),n):ft({},s)},hs=(s,e,t=[],n,i)=>{var r,o,a;const l=ft({},s),E=(r=window.Fides)==null?void 0:r.options,S=(o=i??E?.fidesConsentNonApplicableFlagMode)!=null?o:At.OMIT,p=(a=n??E?.fidesConsentFlagType)!=null?a:dt.BOOLEAN,d={};Object.assign(d,Tr({consent:{},nonApplicableNotices:e??[],flagType:p,mode:S}));const O=t.reduce((T,P)=>pr(ft({},T),{[P.notice_key]:P.consent_mechanism}),{});return Object.assign(d,Ir({consent:l,consentMechanisms:O,flagType:p})),d};var jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ct={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */Ct.exports,function(s,e){(function(t){var n=e,i=s&&s.exports==n&&s,r=typeof jt=="object"&&jt;(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+/",E=/[\t\n\f\r ]/g,S=function(T){T=String(T).replace(E,"");var P=T.length;P%4==0&&(T=T.replace(/==?$/,""),P=T.length),(P%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var f=0,C,R,se="",Ue=-1;++Ue<P;)R=l.indexOf(T.charAt(Ue)),C=f%4?C*64+R:R,f++%4&&(se+=String.fromCharCode(255&C>>(-2*f&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 P=T.length%3,f="",C=-1,R,se,Ue,Ce,xe=T.length-P;++C<xe;)R=T.charCodeAt(C)<<16,se=T.charCodeAt(++C)<<8,Ue=T.charCodeAt(++C),Ce=R+se+Ue,f+=l.charAt(Ce>>18&63)+l.charAt(Ce>>12&63)+l.charAt(Ce>>6&63)+l.charAt(Ce&63);return P==2?(R=T.charCodeAt(C)<<8,se=T.charCodeAt(++C),Ce=R+se,f+=l.charAt(Ce>>10)+l.charAt(Ce>>4&63)+l.charAt(Ce<<2&63)+"="):P==1&&(Ce=T.charCodeAt(C),f+=l.charAt(Ce>>2)+l.charAt(Ce<<4&63)+"=="),f},d={encode:p,decode:S,version:"1.0.0"};if(n&&!n.nodeType)if(i)i.exports=d;else for(var O in d)d.hasOwnProperty(O)&&(n[O]=d[O]);else t.base64=d})(jt)}(Ct,Ct.exports);var gs=Ct.exports;/*! js-cookie v3.0.5 | MIT */function Pt(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 Or={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 Yt(s,e){function t(i,r,o){if(!(typeof document>"u")){o=Pt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+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("="),E=l.slice(1).join("=");try{var S=decodeURIComponent(l[0]);if(o[S]=s.read(E,S),i===S)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:n,remove:function(i,r){t(i,"",Pt({},r,{expires:-1}))},withAttributes:function(i){return Yt(this.converter,Pt({},this.attributes,i))},withConverter:function(i){return Yt(Pt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(s)}})}var Nr=Yt(Or,{path:"/"});let wt;const Ar=new Uint8Array(16);function fr(){if(!wt&&(wt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!wt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wt(Ar)}const Ne=[];for(let s=0;s<256;++s)Ne.push((s+256).toString(16).slice(1));function Cr(s,e=0){return Ne[s[e+0]]+Ne[s[e+1]]+Ne[s[e+2]]+Ne[s[e+3]]+"-"+Ne[s[e+4]]+Ne[s[e+5]]+"-"+Ne[s[e+6]]+Ne[s[e+7]]+"-"+Ne[s[e+8]]+Ne[s[e+9]]+"-"+Ne[s[e+10]]+Ne[s[e+11]]+Ne[s[e+12]]+Ne[s[e+13]]+Ne[s[e+14]]+Ne[s[e+15]]}const Pr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Ts={randomUUID:Pr};function wr(s,e,t){if(Ts.randomUUID&&!e&&!s)return Ts.randomUUID();s=s||{};const n=s.random||(s.rng||fr)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=n[i];return e}return Cr(n)}var Dr=(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))(Dr||{}),zt=(s=>(s.CONSENT="Consent",s.LEGITIMATE_INTERESTS="Legitimate interests",s))(zt||{});const Wt=407,Dt=",",mr=[{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"}],Vr=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];mr.filter(({experienceKey:s})=>s!=="tcf_features"&&s!=="tcf_special_purposes").map(s=>s.experienceKey),zt.CONSENT.toString(),zt.LEGITIMATE_INTERESTS.toString();const Rr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var Mr=Object.defineProperty,br=Object.defineProperties,Lr=Object.getOwnPropertyDescriptors,Is=Object.getOwnPropertySymbols,vr=Object.prototype.hasOwnProperty,Gr=Object.prototype.propertyIsEnumerable,Os=(s,e,t)=>e in s?Mr(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,yr=(s,e)=>{for(var t in e||(e={}))vr.call(e,t)&&Os(s,t,e[t]);if(Is)for(var t of Is(e))Gr.call(e,t)&&Os(s,t,e[t]);return s},Ur=(s,e)=>br(s,Lr(e)),xr=(s,e,t)=>new Promise((n,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Ns="fides_consent",Fr=365,mt=Nr.withConverter({read(s){return decodeURIComponent(s)},write(s){return encodeURIComponent(s)}}),Br=()=>wr();Br();const Hr=s=>mt.get(s),kr=()=>{const s=Hr(Ns);if(s)try{return JSON.parse(s)}catch{try{return JSON.parse(gs.decode(s))}catch{return}}},As=(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=gs.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("."),mt.set(Ns,n,{path:"/",domain:r,expires:Fr})){const a=kr();if(a&&a.fides_meta.updatedAt===s.fides_meta.updatedAt)break}},Kr=s=>{const e={};return Vr.forEach(({cookieKey:t})=>{var n;const i=(n=s[t])!=null?n:[];e[t]=Object.fromEntries(i.map(r=>[r.id,$t(r.preference)]))}),e},$r=(s,e=!0)=>{s.forEach(t=>{var n;if(mt.remove(t.name,{path:(n=t.path)!=null?n:"/",domain:t.domain}),e){const{hostname:i}=window.location;mt.remove(t.name,{domain:`.${i}`})}})},fs=s=>{const e=new Map(s.map(({notice:t,consentPreference:n})=>[t.notice_key,$t(n)]));return Object.fromEntries(e)},jr=(s,e)=>xr(void 0,null,function*(){return Ur(yr({},s),{consent:fs(e)})});var Yr=(s=>(s.GVL="gvl",s.AC="gacp",s))(Yr||{});const je=s=>{const e=s.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Vt=(s,e)=>{if(!(e!=null&&e.vendors))return;const{source:t,id:n}=je(s);if(t==="gvl"||t===void 0)return e.vendors[n]},zr=s=>je(s).source==="gacp",Wr=s=>{const{tcf_vendor_relationships:e=[]}=s;return e.map(t=>t.id).filter(t=>Vt(t,s.gvl)).map(t=>+je(t).id)},Qr=s=>{const e=[...s.tcf_vendor_consent_ids||[],...s.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>Vt(t,s.gvl)).map(t=>+je(t).id)},Jr=s=>{if(!s)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",n="",i=""]=s.split(Dt);return e?{tc:e,ac:t,gpp:n,nc:i}:{tc:"",ac:"",gpp:n,nc:i}},Cs=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(Dt))||[]).concat(n);return n.map((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},qr=1,Je={us:{name:X.NAME,id:X.ID},us_ca:{name:ne.NAME,id:ne.ID},us_co:{name:re.NAME,id:re.ID},us_ct:{name:ae.NAME,id:ae.ID},us_ut:{name:oe.NAME,id:oe.ID},us_va:{name:ie.NAME,id:ie.ID},us_de:{name:ue.NAME,id:ue.ID},us_fl:{name:le.NAME,id:le.ID},us_ia:{name:Se.NAME,id:Se.ID},us_mt:{name:ce.NAME,id:ce.ID},us_ne:{name:pe.NAME,id:pe.ID},us_nh:{name:_e.NAME,id:_e.ID},us_nj:{name:he.NAME,id:he.ID},us_or:{name:de.NAME,id:de.ID},us_tn:{name:ge.NAME,id:ge.ID},us_tx:{name:Ee.NAME,id:Ee.ID}};function Ps(s,e){return s.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}var Xr=Object.defineProperty,Zr=Object.defineProperties,eo=Object.getOwnPropertyDescriptors,ws=Object.getOwnPropertySymbols,to=Object.prototype.hasOwnProperty,so=Object.prototype.propertyIsEnumerable,Ds=(s,e,t)=>e in s?Xr(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ms=(s,e)=>{for(var t in e||(e={}))to.call(e,t)&&Ds(s,t,e[t]);if(ws)for(var t of ws(e))so.call(e,t)&&Ds(s,t,e[t]);return s},Vs=(s,e)=>Zr(s,eo(e)),no=(s,e,t)=>new Promise((n,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())}),io=(s=>(s.PRIVACY_EXPERIENCE="/privacy-experience",s.PRIVACY_PREFERENCES="/privacy-preferences",s.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",s.NOTICES_SERVED="/notices-served",s))(io||{});const ro={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},oo="Fides.js",ao=(s,e,t,n,i)=>no(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=Vs(ms({},ro),{body:JSON.stringify(Vs(ms({},e),{source:oo}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var lo=Object.defineProperty,co=Object.defineProperties,Eo=Object.getOwnPropertyDescriptors,Rs=Object.getOwnPropertySymbols,uo=Object.prototype.hasOwnProperty,So=Object.prototype.propertyIsEnumerable,Ms=(s,e,t)=>e in s?lo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Rt=(s,e)=>{for(var t in e||(e={}))uo.call(e,t)&&Ms(s,t,e[t]);if(Rs)for(var t of Rs(e))So.call(e,t)&&Ms(s,t,e[t]);return s},bs=(s,e)=>co(s,Eo(e)),Qt=(s=>(s.FIDES="fides",s.EXTERNAL="external",s))(Qt||{}),po=(s=>(s.TOGGLE="toggle",s.BUTTON="button",s.LINK="link",s))(po||{});const Ls=(s,e,t)=>{var n,i,r,o,a,l,E,S;const p=e?Rt({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const d=Rt({consentMethod:p?.fides_meta.consentMethod},t);(n=t?.trigger)!=null&&n.origin||(d.trigger=bs(Rt({},d.trigger),{origin:"fides"}));const O=(i=performance?.mark)==null?void 0:i.call(performance,s),T=O?.startTime,P=p;P&&p!=null&&p.consent&&(P.consent=hs(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 f=new CustomEvent(s,{detail:bs(Rt({},P),{debug:!!((S=(E=window.Fides)==null?void 0:E.options)!=null&&S.debug),extraDetails:d,timestamp:T}),bubbles:!0});window.dispatchEvent(f)}};var _o=Object.defineProperty,ho=Object.defineProperties,go=Object.getOwnPropertyDescriptors,vs=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,Io=Object.prototype.propertyIsEnumerable,Gs=(s,e,t)=>e in s?_o(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,St=(s,e)=>{for(var t in e||(e={}))To.call(e,t)&&Gs(s,t,e[t]);if(vs)for(var t of vs(e))Io.call(e,t)&&Gs(s,t,e[t]);return s},Mt=(s,e)=>ho(s,go(e)),ys=(s,e,t)=>new Promise((n,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Oo=[$e.SCRIPT,$e.GPC,$e.OT_MIGRATION];function No(s,e,t,n,i,r,o,a,l,E){return ys(this,null,function*(){const S=(o||[]).map(d=>({preference:d.consentPreference,privacy_notice_history_id:d.noticeHistoryId||""})),p=St({browser_identity:e.identity,preferences:S,privacy_experience_config_history_id:r,user_geography:l,method:n,served_notice_history_id:E,property_id:i},a??[]);yield ao(n,p,s,e,t)})}const Ao=s=>ys(void 0,[s],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:n,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:E,tcf:S,updateCookie:p,propertyId:d}){var O,T,P,f,C,R;if(!p&&e&&(p=xe=>jr(xe,e)),!p&&!e)throw new Error("updateCookie is required");const se=Mt(St({},l?.trigger),{origin:((O=l?.trigger)==null?void 0:O.origin)||(Oo.includes(i)?Qt.EXTERNAL:Qt.FIDES)}),Ue=yield p(a);Object.assign(a,Ue),Object.assign(a.fides_meta,{consentMethod:i}),Ls("FidesUpdating",a,Mt(St({},l),{trigger:se}));const Ce=hs(a.consent,(P=(T=window.Fides)==null?void 0:T.experience)==null?void 0:P.non_applicable_privacy_notices,(C=(f=window.Fides)==null?void 0:f.experience)==null?void 0:C.privacy_notices);if(window.Fides.consent=Ce,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,As(Mt(St({},a),{consent:Ce}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield No(r,a,n,i,((R=d?.length)!=null?R:0)>0?d:window.Fides.config.propertyId,t,e,S,o,E)}catch{}e&&e.filter(xe=>xe.consentPreference===ve.OPT_OUT).forEach(xe=>{var Xt,Zt;(Xt=xe.notice)!=null&&Xt.cookies&&$r(xe.notice.cookies,(Zt=n.experience_config)==null?void 0:Zt.auto_subdomain_cookie_deletion)}),Ls("FidesUpdated",a,Mt(St({},l),{trigger:se}))});class Ye extends Error{constructor(e){super(e),this.name="DecodingError"}}class Be extends Error{constructor(e){super(e),this.name="EncodingError"}}class lt extends Error{constructor(e){super(e),this.name="GVLError"}}class He extends Error{constructor(e,t,n=""){super(`invalid value ${t} passed for ${e} ${n}`),this.name="TCModelError"}}class Jt{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new Be("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let 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 Ye("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 ke{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return ke.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(ke.langSet.has(e))return e;if(ke.langSet.has(t))return t;const n=t+"-"+t;if(ke.langSet.has(n))return n;for(const i of ke.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){ke.langSet.forEach(e)}get size(){return ke.langSet.size}}class u{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class pt{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 Re;(function(s){s[s.NOT_ALLOWED=0]="NOT_ALLOWED",s[s.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",s[s.REQUIRE_LI=2]="REQUIRE_LI"})(Re||(Re={}));class ye extends pt{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 ye;if(t.length!==2)throw new He("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}${ye.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===Re.NOT_ALLOWED||this.restrictionType===Re.REQUIRE_CONSENT||this.restrictionType===Re.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class Us extends pt{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===Re.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case Re.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case Re.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const 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(ye.unHash(i)):t.push(ye.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,n)=>{e.add(ye.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=ye.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 xs;(function(s){s.COOKIE="cookie",s.WEB="web",s.APP="app"})(xs||(xs={}));var J;(function(s){s.CORE="core",s.VENDORS_DISCLOSED="vendorsDisclosed",s.VENDORS_ALLOWED="vendorsAllowed",s.PUBLISHER_TC="publisherTC"})(J||(J={}));class Fs{static ID_TO_KEY=[J.CORE,J.VENDORS_DISCLOSED,J.VENDORS_ALLOWED,J.PUBLISHER_TC];static KEY_TO_ID={[J.CORE]:0,[J.VENDORS_DISCLOSED]:1,[J.VENDORS_ALLOWED]:2,[J.PUBLISHER_TC]:3}}class Pe extends pt{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 He("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[u.cmpId]=12;static[u.cmpVersion]=12;static[u.consentLanguage]=12;static[u.consentScreen]=6;static[u.created]=36;static[u.isServiceSpecific]=1;static[u.lastUpdated]=36;static[u.policyVersion]=6;static[u.publisherCountryCode]=12;static[u.publisherLegitimateInterests]=24;static[u.publisherConsents]=24;static[u.purposeConsents]=24;static[u.purposeLegitimateInterests]=24;static[u.purposeOneTreatment]=1;static[u.specialFeatureOptins]=12;static[u.useNonStandardTexts]=1;static[u.vendorListVersion]=12;static[u.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class Ge{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class m{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 Be(`${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 Ye("invalid bit length");return parseInt(e,2)}}class Bs{static encode(e,t){return m.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new Ye("invalid bit length");const n=new Date;return n.setTime(m.decode(e,t)*100),n}}class ze{static encode(e,t){let n="";for(let i=1;i<=t;i++)n+=Ge.encode(e.has(i));return n}static decode(e,t){if(e.length!==t)throw new Ye("bitfield encoding length mismatch");const n=new Pe;for(let i=1;i<=t;i++)Ge.decode(e[i-1])&&n.set(i);return n.bitLength=e.length,n}}class Hs{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 Be(`invalid language code: ${e}`);if(t%2===1)throw new Be(`numBits must be even, ${t} is not valid`);t=t/2;const o=m.encode(i,t),a=m.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=m.decode(e.slice(0,r),r)+65,a=m.decode(e.slice(r),r)+65;n=String.fromCharCode(o)+String.fromCharCode(a)}else throw new Ye("invalid bit length for language");return n}}class fo{static encode(e){let t=m.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+=m.encode(i.purposeId,g.purposeId),t+=m.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,E="";for(let S=0;S<o;S++){const p=r[S];if(l===0&&(a++,l=p),S===o-1||r[S+1]>n(p,r[o-1])){const d=p!==l;E+=Ge.encode(d),E+=m.encode(l,g.vendorId),d&&(E+=m.encode(p,g.vendorId)),l=0}}t+=m.encode(a,g.numEntries),t+=E})}return t}static decode(e){let t=0;const n=new Us,i=m.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=m.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=m.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new ye(o,a),E=m.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let S=0;S<E;S++){const p=Ge.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const d=m.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,p){const O=m.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,O<d)throw new Ye(`Invalid RangeEntry: endVendorId ${O} is less than ${d}`);for(let T=d;T<=O;T++)n.add(T,l)}else n.add(d,l)}}return n.bitLength=t,n}}var _t;(function(s){s[s.FIELD=0]="FIELD",s[s.RANGE=1]="RANGE"})(_t||(_t={}));class ht{static encode(e){const t=[];let n=[],i=m.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,E=g.vendorId*2+g.singleOrRange+g.numEntries;let S=a+g.numEntries;return e.forEach((p,d)=>{r+=Ge.encode(p),o=e.maxId>E&&S<l,o&&p&&(e.has(d+1)?n.length===0&&(n.push(d),S+=g.singleOrRange,S+=g.vendorId):(n.push(d),S+=g.vendorId,t.push(n),n=[]))}),o?(i+=String(_t.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(_t.FIELD),i+=r),i}static decode(e,t){let n,i=0;const r=m.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=m.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===_t.RANGE){if(n=new Pe,t===1){if(e.substr(i,1)==="1")throw new Ye("Unable to decode default consent=1");i++}const a=m.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const E=Ge.decode(e.charAt(i));i+=g.singleOrRange;const S=m.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,E){const p=m.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let d=S;d<=p;d++)n.set(d)}else n.set(S)}}else{const a=e.substr(i,r);i+=r,n=ze.decode(a,r)}return n.bitLength=i,n}static buildRangeEncoding(e){const t=e.length;let n=m.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;n+=Ge.encode(!r),n+=m.encode(i[0],g.vendorId),r||(n+=m.encode(i[1],g.vendorId))}),n}}function ks(){return{[u.version]:m,[u.created]:Bs,[u.lastUpdated]:Bs,[u.cmpId]:m,[u.cmpVersion]:m,[u.consentScreen]:m,[u.consentLanguage]:Hs,[u.vendorListVersion]:m,[u.policyVersion]:m,[u.isServiceSpecific]:Ge,[u.useNonStandardTexts]:Ge,[u.specialFeatureOptins]:ze,[u.purposeConsents]:ze,[u.purposeLegitimateInterests]:ze,[u.purposeOneTreatment]:Ge,[u.publisherCountryCode]:Hs,[u.vendorConsents]:ht,[u.vendorLegitimateInterests]:ht,[u.publisherRestrictions]:fo,segmentType:m,[u.vendorsDisclosed]:ht,[u.vendorsAllowed]:ht,[u.publisherConsents]:ze,[u.publisherLegitimateInterests]:ze,[u.numCustomPurposes]:m,[u.publisherCustomConsents]:ze,[u.publisherCustomLegitimateInterests]:ze}}class Co{1={[J.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.purposeConsents,u.vendorConsents]};2={[J.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.policyVersion,u.isServiceSpecific,u.useNonStandardTexts,u.specialFeatureOptins,u.purposeConsents,u.purposeLegitimateInterests,u.purposeOneTreatment,u.publisherCountryCode,u.vendorConsents,u.vendorLegitimateInterests,u.publisherRestrictions],[J.PUBLISHER_TC]:[u.publisherConsents,u.publisherLegitimateInterests,u.numCustomPurposes,u.publisherCustomConsents,u.publisherCustomLegitimateInterests],[J.VENDORS_ALLOWED]:[u.vendorsAllowed],[J.VENDORS_DISCLOSED]:[u.vendorsDisclosed]}}class Po{1=[J.CORE];2=[J.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(J.PUBLISHER_TC);else{const n=!!(t&&t.isForVendors);(!n||e[u.supportOOB]===!0)&&this[2].push(J.VENDORS_DISCLOSED),n&&(e[u.supportOOB]&&e[u.vendorsAllowed].size>0&&this[2].push(J.VENDORS_ALLOWED),this[2].push(J.PUBLISHER_TC))}}}class Ks{static fieldSequence=new Co;static encode(e,t){let n;try{n=this.fieldSequence[String(e.version)][t]}catch{throw new Be(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==J.CORE&&(i=m.encode(Fs.KEY_TO_ID[t],g.segmentType));const r=ks();return n.forEach(o=>{const a=e[o],l=r[o];let E=g[o];E===void 0&&this.isPublisherCustom(o)&&(E=Number(e[u.numCustomPurposes]));try{i+=l.encode(a,E)}catch(S){throw new Be(`Error encoding ${t}->${o}: ${S.message}`)}}),Jt.encode(i)}static decode(e,t,n){const i=Jt.decode(e);let r=0;n===J.CORE&&(t.version=m.decode(i.substr(r,g[u.version]),g[u.version])),n!==J.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][n],a=ks();return o.forEach(l=>{const E=a[l];let S=g[l];if(S===void 0&&this.isPublisherCustom(l)&&(S=Number(t[u.numCustomPurposes])),S!==0){const p=i.substr(r,S);if(E===ht?t[l]=E.decode(p,t.version):t[l]=E.decode(p,S),Number.isInteger(S))r+=S;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new Ye(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class wo{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 E=e.publisherRestrictions.getRestrictions(a);let S=!1;for(let p=0,d=E.length;p<d&&!S;p++)S=E[p].restrictionType===Re.REQUIRE_CONSENT&&r==="purposes"||E[p].restrictionType===Re.REQUIRE_LI&&r==="legIntPurposes";S||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 Be("Unable to encode TCModel without a GVL");if(!n.isReady)throw new Be("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 Be(`Invalid version: ${e.version}`);return this.processor[i](e,n)}}class Do{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 d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},E=()=>{o(new Error("error"))},S=()=>{o(new Error("aborted"))},p=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=n,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",S),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 pt{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new ke;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new lt("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 lt("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 lt("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 Do.fetch(e))}catch(t){throw new lt(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 lt("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 lt("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 $s extends pt{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 Pe;purposeConsents=new Pe;purposeLegitimateInterests=new Pe;publisherConsents=new Pe;publisherLegitimateInterests=new Pe;publisherCustomConsents=new Pe;publisherCustomLegitimateInterests=new Pe;customPurposes;vendorConsents=new Pe;vendorLegitimateInterests=new Pe;vendorsDisclosed=new Pe;vendorsAllowed=new Pe;publisherRestrictions=new Us;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 He("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new He("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new He("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new He("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new He("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new He("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((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 He("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class mo{static encode(e,t){let n="",i;return e=wo.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new Po(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),n+=Ks.encode(e,r)+a}),n}static decode(e,t){const n=e.split("."),i=n.length;t||(t=new $s);for(let r=0;r<i;r++){const o=n[r],l=Jt.decode(o.charAt(0)).substr(0,g.segmentType),E=Fs.ID_TO_KEY[m.decode(l,g.segmentType).toString()];Ks.decode(o,t,E)}return t}}var We;(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"})(We||(We={}));var bt;(function(s){s.STUB="stub",s.LOADING="loading",s.LOADED="loaded",s.ERROR="error"})(bt||(bt={}));var Lt;(function(s){s.VISIBLE="visible",s.HIDDEN="hidden",s.DISABLED="disabled"})(Lt||(Lt={}));var js;(function(s){s.TC_LOADED="tcloaded",s.CMP_UI_SHOWN="cmpuishown",s.USER_ACTION_COMPLETE="useractioncomplete"})(js||(js={}));class vt{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 Gt extends vt{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 Vo{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new Gt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class Oe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new Vo;static cmpStatus=bt.LOADING;static disabled=!1;static displayStatus=Lt.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=bt.LOADING,this.disabled=!1,this.displayStatus=Lt.HIDDEN,this.eventQueue.clear()}}class Ys{cmpId=Oe.cmpId;cmpVersion=Oe.cmpVersion;gdprApplies=Oe.gdprApplies;tcfPolicyVersion=Oe.tcfPolicyVersion}class zs extends Ys{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=Oe.eventStatus,this.cmpStatus=Oe.cmpStatus,this.listenerId=t,Oe.gdprApplies){const n=Oe.tcModel;this.tcString=Oe.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 Ro 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(),E=t[l].substr(0,i),S=t[l].substr(i+1);t[l]=E+a+S})}}return t}}class Mo extends Ys{cmpLoaded=!0;cmpStatus=Oe.cmpStatus;displayStatus=Oe.displayStatus;apiVersion=String(Oe.apiVersion);gvlVersion;constructor(){super(),Oe.tcModel&&Oe.tcModel.vendorListVersion&&(this.gvlVersion=+Oe.tcModel.vendorListVersion)}}class bo extends vt{respond(){this.invokeCallback(new Mo)}}class Lo extends Gt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Ro(this.param))}}class vo extends vt{respond(){const e=Oe.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 Go extends Gt{respond(){this.listenerId=Oe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class yo extends vt{respond(){this.invokeCallback(Oe.eventQueue.remove(this.param))}}class wa{static[We.PING]=bo;static[We.GET_TC_DATA]=Gt;static[We.GET_IN_APP_TC_DATA]=Lo;static[We.GET_VENDOR_LIST]=vo;static[We.ADD_EVENT_LISTENER]=Go;static[We.REMOVE_EVENT_LISTENER]=yo}const Uo=s=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=s.detail;if(e){const[t]=e.split(Dt);return t.split(".")[0]}return e??""};var xo=(s,e,t)=>new Promise((n,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Fo=1,Ws=[1,3,4,5,6],Bo=2,Ho=({userConsentedVendorIds:s,disclosedVendorIds:e})=>{const t=r=>r.filter(zr).map(o=>je(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),n=t(s),i=t(e.filter(r=>!s.includes(r)));return`${Bo}~${n}~dv.${i}`},ko=s=>xo(void 0,[s],function*({experience:e,tcStringPreferences:t}){var n,i,r,o;let a="";try{const l=new $s(new A(e.gvl));yield l.gvl.readyPromise,l.cmpId=Wt,l.cmpVersion=Fo,l.consentScreen=1,l.isServiceSpecific=!0,l.supportOOB=!1,e.tcf_publisher_country_code&&(l.publisherCountryCode=e.tcf_publisher_country_code);const E=e.minimal_tcf?Qr(e):Wr(e);if(l.gvl.narrowVendorsTo(E),t){t.vendorsConsent.forEach(d=>{var O,T,P;if(Vt(d,e.gvl)){const{id:f}=je(d);if(l.vendorConsents.set(+f),!((O=e.tcf_publisher_restrictions)!=null&&O.length)){const C=(T=e.gvl)==null?void 0:T.vendors[f];C&&!((P=C?.purposes)!=null&&P.length)&&C.flexiblePurposes.forEach(R=>{const se=new ye;se.purposeId=R,se.restrictionType=Re.REQUIRE_CONSENT,l.publisherRestrictions.add(+f,se)})}}}),t.vendorsLegint.forEach(d=>{var O,T;if(e.minimal_tcf)(O=e.tcf_vendor_legitimate_interest_ids)==null||O.forEach(P=>{const{id:f}=je(P);l.vendorLegitimateInterests.set(+f)});else if(Vt(d,e.gvl)){const P=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(R=>R.id===d)[0],f=P?.purpose_legitimate_interests;let C=!1;if(f&&(f.map(R=>R.id).filter(R=>Ws.includes(R)).length&&(C=!0),!C)){const{id:R}=je(d);l.vendorLegitimateInterests.set(+R)}}}),Object.values((i=(n=e.gvl)==null?void 0:n.vendors)!=null?i:{}).forEach(d=>{var O,T;(O=d.specialPurposes)!=null&&O.length&&!((T=d.legIntPurposes)!=null&&T.length)&&l.vendorLegitimateInterests.set(d.id)}),t.purposesConsent.forEach(d=>{l.purposeConsents.set(+d)}),t.purposesLegint.forEach(d=>{const O=+d;Ws.includes(O)||l.purposeLegitimateInterests.set(O)}),t.specialFeatures.forEach(d=>{l.specialFeatureOptins.set(+d)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(d=>{d.vendors.forEach(O=>{const T=new ye;T.purposeId=d.purpose_id,T.restrictionType=d.restriction_type,l.publisherRestrictions.add(O,T)})}),a=mo.encode(l,{segments:[J.CORE]});const S=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(d=>d.id),p=Ho({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:S??[]});a=`${a}${Dt}${p}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var Ko=Object.defineProperty,$o=Object.defineProperties,jo=Object.getOwnPropertyDescriptors,Qs=Object.getOwnPropertySymbols,Yo=Object.prototype.hasOwnProperty,zo=Object.prototype.propertyIsEnumerable,Js=(s,e,t)=>e in s?Ko(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Wo=(s,e)=>{for(var t in e||(e={}))Yo.call(e,t)&&Js(s,t,e[t]);if(Qs)for(var t of Qs(e))zo.call(e,t)&&Js(s,t,e[t]);return s},Qo=(s,e)=>$o(s,jo(e)),Jo=(s,e,t)=>new Promise((n,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const qe=({modelList:s,enabledIds:e})=>s?s.map(t=>{const n=ut(e.includes(`${t.id}`));return{id:t.id,preference:n}}):[],Xe=s=>s!=null&&s.length?s.map(e=>{const t=ut(!0);let n=e;return Number.isNaN(parseInt(e,10))||(n=parseInt(e,10)),{id:n,preference:t}}):[],qo=({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:qe({modelList:s.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:qe({modelList:s.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:qe({modelList:s.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:qe({modelList:s.tcf_vendor_consents,enabledIds:n}),vendor_legitimate_interests_preferences:qe({modelList:s.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:qe({modelList:s.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:qe({modelList:s.tcf_system_legitimate_interests,enabledIds:i})}},Xo=({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:Xe(e.purposesConsent),purpose_legitimate_interests_preferences:Xe(e.purposesLegint),special_feature_preferences:Xe(e.specialFeatures),vendor_consent_preferences:Xe(n),vendor_legitimate_interests_preferences:Xe(r),system_consent_preferences:Xe(t),system_legitimate_interests_preferences:Xe(i)}},Zo=(s,e,t,n,i)=>Jo(void 0,null,function*(){var r;const o=yield ko({tcStringPreferences:t,experience:n}),a=Qo(Wo({},s),{fides_string:o,tcf_consent:Kr(e),tcf_version_hash:(r=n.meta)==null?void 0:r.version_hash});return i&&(a.consent=fs(i)),a}),ea=(s,e)=>!s||!e?[]:s.map(t=>{var n;const i=ut(e.includes(t.id),t.consent_mechanism);return new cs(t,i,(n=t.bestTranslation)==null?void 0:n.privacy_notice_history_id)});var De=(s=>(s.NATIONAL="national",s.STATE="state",s.ALL="all",s))(De||{});const Ze="us",qs=({cmpApi: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)})},ta=s=>s?.toLowerCase().startsWith("us"),qt=({experienceRegion:s,usApproach:e})=>ta(s)&&e===De.NATIONAL?Ze:s,Xs=({cmpApi:s,experience:e})=>{const t=new Set,{privacy_notices:n=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=qt({experienceRegion:i,usApproach:o}),l=Je[a];return!l&&o===De.ALL&&(a=Ze,l=Je[a]),!l||a===Ze&&o===De.STATE?[]:(t.add(l),n.forEach(E=>{var S;const{gpp_field_mapping:p}=E,d=(S=p?.find(O=>O.region===a))==null?void 0:S.notice;d&&d.forEach(O=>{s.setFieldValue(l.name,O,1)})}),qs({cmpApi:s,sectionName:l.name,gppSettings:r}),Array.from(t))},Zs=({cmpApi:s,cookie:e,experience:t})=>{const n=new Set,{privacy_notices:i=[],region:r,gpp_settings:o}=t,a=o?.us_approach;let l=qt({experienceRegion:r,usApproach:a}),E=Je[l];if(!E&&a===De.ALL&&(l=Ze,E=Je[l]),!E||l===Ze&&a===De.STATE)return[];n.add(E);const{consent:S}=e;return Object.keys(S).forEach(p=>{var d;const O=i?.find(P=>P.notice_key===p),T=S[p];if(O){const{gpp_field_mapping:P}=O,f=(d=P?.find(C=>C.region===l))==null?void 0:d.mechanism;f&&f.forEach(C=>{let R=C.not_available;T===!1?R=C.opt_out:T&&(R=C.not_opt_out);let se=+R;R.length>1&&(se=R.split("").map(Ue=>+Ue)),s.setFieldValue(E.name,C.field,se)})}}),qs({cmpApi:s,sectionName:E.name,gppSettings:o}),Array.from(n)};var sa=Object.defineProperty,na=Object.defineProperties,ia=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertySymbols,ra=Object.prototype.hasOwnProperty,oa=Object.prototype.propertyIsEnumerable,tn=(s,e,t)=>e in s?sa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,sn=(s,e)=>{for(var t in e||(e={}))ra.call(e,t)&&tn(s,t,e[t]);if(en)for(var t of en(e))oa.call(e,t)&&tn(s,t,e[t]);return s},nn=(s,e)=>na(s,ia(e));const aa=[1,3,4,5,6],la=({cmpApi:s,experience:e})=>{const t={},{privacy_notices:n=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=qt({experienceRegion:i,usApproach:o}),l=Je[a];return!l&&o===De.ALL&&(a=Ze,l=Je[a]),!l||a===Ze&&o===De.STATE||n.forEach(E=>{var S;const{notice_key:p,gpp_field_mapping:d}=E,O=(S=d?.find(T=>T.region===a))==null?void 0:S.mechanism;if(O){const T=O.some(P=>{const f=s.getFieldValue(l.name,P.field),C=Array.isArray(f)?f.join(""):String(f);return C===P.opt_out?!0:(P.not_opt_out,!1)});T!==void 0&&(t[p]=!T)}}),t},ca=({cmpApi:s,experience:e})=>{var t,n,i,r;const o=Rr,a=s.getSection(W.NAME);if(!a)return o;const l=a.PurposeConsents.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),E=a.PurposeLegitimateInterests.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),S=a.VendorConsents.map(d=>`gvl.${d}`),p=a.VendorLegitimateInterests.map(d=>`gvl.${d}`);return o.purposesConsent=l,o.purposesLegint=E.filter(d=>!aa.includes(parseInt(d,10))),o.vendorsConsent=S,o.vendorsLegint=p,o.specialFeatures=a.SpecialFeatureOptins.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(d=>d.id.toString()))||[],o.features=((n=e.tcf_features)==null?void 0:n.map(d=>d.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(d=>d.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(d=>d.toString()))||[]),o.customPurposesConsent=[],o},da=({fidesString:s,cmpApi:e})=>{const{gpp:t}=Jr(s);if(!s||!t||!e)return;const{options:n,cookie:i,geolocation:r,locale:o,config:a}=window.Fides,l=window.Fides.experience;if(!l||!l.experience_config||!l.privacy_notices)return;const E=l.experience_config.component===Et.TCF_OVERLAY,S=_r(r),p=l.experience_config.translations.find(f=>Ps(f.language,o));if(!p)return;e.setGppString(t),e.setSignalStatus(me.READY);const d=l.privacy_notices.map(f=>({notice:f,bestTranslation:f.translations.find(C=>Ps(C.language,o))||null}));let O,T,P;if(E){const f=ca({cmpApi:e,experience:l});P=ea(d.map(({notice:C,bestTranslation:R})=>nn(sn({},C),{bestTranslation:R})),f.customPurposesConsent),T=l.minimal_tcf?Xo({experience:l,enabledIds:f}):qo({experience:l,enabledIds:f}),O=C=>Zo(C,T,f,l)}else{const f=la({cmpApi:e,experience:l}),C=Object.entries(f).filter(([R,se])=>se).map(([R])=>R);P=gr(d,C),O=R=>Promise.resolve(nn(sn({},R),{consent:f}))}Ao({consentPreferencesToSave:P,privacyExperienceConfigHistoryId:p.privacy_experience_config_history_id,experience:l,consentMethod:$e.SCRIPT,options:n,userLocationString:S||void 0,cookie:i,propertyId:a?.propertyId,tcf:T,updateCookie:O})},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)},Ea=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},ua=s=>typeof s=="object"&&s!=null&&"__gppCall"in s,Sa=()=>{const s=[],e=[];let t;const n=(r,o,a,l)=>{if(r==="queue")return s;if(r==="events")return e;const E={gppVersion:"1.1",cmpStatus:st.STUB,cmpDisplayStatus:Ke.HIDDEN,signalStatus:me.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(E,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:o,parameter:a}),o({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:E},!0)}else if(r==="removeEventListener"){let S=!1;for(let p=0;p<e.length;p++)if(e[p].id===a){e.splice(p,1),S=!0;break}o({eventName:"listenerRemoved",listenerId:a,data:S,pingData:E},!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(!ua(a))return null;if(a.__gppCall&&window.__gpp){const l=a.__gppCall;window.__gpp(l.command,(E,S)=>{const p={__gppReturn:{returnValue:E,success:S,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};Ea(rn)||(on(rn),window.__gpp=n,window.addEventListener("message",i,!1))},an=(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,ln=(s,e)=>{if(!at(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=Uo(s);return n?(e.setFieldValueBySectionId(W.ID,"CmpId",Wt),e.setSectionStringById(W.ID,n),!0):!1},pa=()=>{const s=[];if(at(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&s.push(`${W.ID}:${W.NAME}`),(e.us_approach===De.NATIONAL||e.us_approach===De.ALL)&&s.push(`${X.ID}:${X.NAME}`),(e.us_approach===De.STATE||e.us_approach===De.ALL)&&Object.values(Je).forEach(t=>{t.id!==X.ID&&s.push(`${t.id}:${t.name}`)}))}return s},_a=()=>{Sa();const s=new Yi(Wt,qr);s.setCmpStatus(st.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:n,saved_consent:i,options:r}=window.Fides,o=pa();if(s.setSupportedAPIs(o),!at(n))return;const{fidesString:a}=r;if(a&&da({fidesString:a,cmpApi:s}),!a&&(!hr(n,e.detail,i,r)||!r.tcfEnabled&&ps(n.privacy_notices)&&!an(i,e.detail.fides_string,n.privacy_notices))){const l=ln(e,s);l&&s.setApplicableSections([W.ID]);const E=Xs({cmpApi:s,experience:n}),S=Zs({cmpApi:s,cookie:e.detail,experience:n});S.length&&s.setApplicableSections(S.map(d=>d.id)),!l&&!E.length&&!S.length&&s.setApplicableSections([-1]),s.setSignalStatus(me.READY);const p=Cs(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(at(t)){!i.tcfEnabled&&ps(t.privacy_notices)&&!an(n,e.detail.fides_string,t.privacy_notices)?s.setSignalStatus(me.READY):s.setSignalStatus(me.NOT_READY),s.setCmpDisplayStatus(Ke.VISIBLE);const r=Xs({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(Ke.HIDDEN),s.setSignalStatus(me.READY))}),window.addEventListener("FidesUpdated",e=>{if(s.setCmpDisplayStatus(Ke.HIDDEN),ln(e,s)&&(s.setApplicableSections([W.ID]),s.fireSectionChange("tcfeuv2")),at(window.Fides.experience)){const t=Zs({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=Cs(s);window.Fides.cookie&&(window.Fides.fides_string=n,window.Fides.cookie.fides_string=n,As(window.Fides.cookie,window.Fides.options.base64Cookie))}s.setSignalStatus(me.READY)})};window.addEventListener("FidesInitializing",s=>{var e;(e=s.detail.extraDetails)!=null&&e.gppEnabled&&_a()});
|