ethyca-fides 2.63.1b4__py2.py3-none-any.whl → 2.63.2__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/RECORD +110 -113
  3. fides/_version.py +3 -3
  4. fides/api/models/attachment.py +23 -36
  5. fides/api/models/detection_discovery/monitor_task.py +1 -0
  6. fides/api/service/privacy_request/dsr_package/dsr_report_builder.py +46 -264
  7. fides/api/service/privacy_request/dsr_package/templates/collection_index.html +9 -34
  8. fides/api/service/privacy_request/dsr_package/templates/item.html +37 -0
  9. fides/api/service/privacy_request/dsr_package/templates/main.css +2 -45
  10. fides/api/service/privacy_request/dsr_package/templates/welcome.html +8 -12
  11. fides/api/service/privacy_request/request_runner_service.py +139 -258
  12. fides/api/service/storage/gcs.py +3 -15
  13. fides/api/service/storage/s3.py +14 -28
  14. fides/api/service/storage/util.py +7 -45
  15. fides/api/tasks/storage.py +91 -85
  16. fides/ui-build/static/admin/404.html +1 -1
  17. fides/ui-build/static/admin/_next/static/{X2nvWLg2_-vsCTkhSWpzw → IrQqz_6ngcumU4YlWY9nL}/_buildManifest.js +1 -1
  18. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-8cab04871908cfeb.js +1 -0
  19. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-150d40428245ee0c.js +1 -0
  20. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-20cdb2c8a03deae1.js +1 -0
  21. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  22. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  23. fides/ui-build/static/admin/add-systems.html +1 -1
  24. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  25. fides/ui-build/static/admin/consent/configure.html +1 -1
  26. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  27. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  28. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  29. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  30. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  31. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  32. fides/ui-build/static/admin/consent/properties.html +1 -1
  33. fides/ui-build/static/admin/consent/reporting.html +1 -1
  34. fides/ui-build/static/admin/consent.html +1 -1
  35. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  36. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  37. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  38. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  39. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  40. fides/ui-build/static/admin/data-catalog.html +1 -1
  41. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  42. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  43. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  44. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  45. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  46. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  47. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  48. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  49. fides/ui-build/static/admin/datamap.html +1 -1
  50. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  51. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  52. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  53. fides/ui-build/static/admin/dataset/new.html +1 -1
  54. fides/ui-build/static/admin/dataset.html +1 -1
  55. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  56. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  57. fides/ui-build/static/admin/datastore-connection.html +1 -1
  58. fides/ui-build/static/admin/index.html +1 -1
  59. fides/ui-build/static/admin/integrations/[id].html +1 -1
  60. fides/ui-build/static/admin/integrations.html +1 -1
  61. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  62. fides/ui-build/static/admin/lib/fides-headless.js +1 -1
  63. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  64. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  65. fides/ui-build/static/admin/lib/fides.js +2 -2
  66. fides/ui-build/static/admin/login/[provider].html +1 -1
  67. fides/ui-build/static/admin/login.html +1 -1
  68. fides/ui-build/static/admin/messaging/[id].html +1 -1
  69. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  70. fides/ui-build/static/admin/messaging.html +1 -1
  71. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  72. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  73. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  74. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  75. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  76. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  77. fides/ui-build/static/admin/poc/forms.html +1 -1
  78. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  79. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  80. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  81. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  82. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  83. fides/ui-build/static/admin/privacy-requests.html +1 -1
  84. fides/ui-build/static/admin/properties/[id].html +1 -1
  85. fides/ui-build/static/admin/properties/add-property.html +1 -1
  86. fides/ui-build/static/admin/properties.html +1 -1
  87. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  88. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  89. fides/ui-build/static/admin/settings/about.html +1 -1
  90. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  91. fides/ui-build/static/admin/settings/consent.html +1 -1
  92. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  93. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  94. fides/ui-build/static/admin/settings/domains.html +1 -1
  95. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  96. fides/ui-build/static/admin/settings/locations.html +1 -1
  97. fides/ui-build/static/admin/settings/organization.html +1 -1
  98. fides/ui-build/static/admin/settings/regulations.html +1 -1
  99. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  100. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  101. fides/ui-build/static/admin/systems.html +1 -1
  102. fides/ui-build/static/admin/taxonomy.html +1 -1
  103. fides/ui-build/static/admin/user-management/new.html +1 -1
  104. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  105. fides/ui-build/static/admin/user-management.html +1 -1
  106. fides/api/service/privacy_request/attachment_handling.py +0 -132
  107. fides/api/service/privacy_request/dsr_package/templates/attachments_index.html +0 -33
  108. fides/api/tasks/csv_utils.py +0 -170
  109. fides/api/tasks/encryption_utils.py +0 -42
  110. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-c583a61302f02add.js +0 -1
  111. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-20d20a8d1736f7c4.js +0 -1
  112. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-0e557d79e1e43c2b.js +0 -1
  113. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/WHEEL +0 -0
  114. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/entry_points.txt +0 -0
  115. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/licenses/LICENSE +0 -0
  116. {ethyca_fides-2.63.1b4.dist-info → ethyca_fides-2.63.2.dist-info}/top_level.txt +0 -0
  117. /fides/ui-build/static/admin/_next/static/{X2nvWLg2_-vsCTkhSWpzw → IrQqz_6ngcumU4YlWY9nL}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- var wr=Object.defineProperty,Dr=(n,e,t)=>e in n?wr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nt=(n,e,t)=>Dr(n,typeof e!="symbol"?e+"":e,t);class vn{constructor(e,t,s,i){Nt(this,"eventName"),Nt(this,"listenerId"),Nt(this,"data"),Nt(this,"pingData"),this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}var br=Object.defineProperty,vr=(n,e,t)=>e in n?br(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Me=(n,e,t)=>vr(n,typeof e!="symbol"?e+"":e,t);class It{constructor(e){Me(this,"gppVersion"),Me(this,"cmpStatus"),Me(this,"cmpDisplayStatus"),Me(this,"signalStatus"),Me(this,"supportedAPIs"),Me(this,"cmpId"),Me(this,"sectionList"),Me(this,"applicableSections"),Me(this,"gppString"),Me(this,"parsedSections"),this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}var Vr=Object.defineProperty,Rr=(n,e,t)=>e in n?Vr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,At=(n,e,t)=>Rr(n,typeof e!="symbol"?e+"":e,t);let nt=class{constructor(e,t,s){At(this,"callback"),At(this,"parameter"),At(this,"success",!0),At(this,"cmpApiContext"),this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:s})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},yr=class extends nt{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new vn("listenerRegistered",e,!0,new It(this.cmpApiContext));this.invokeCallback(t)}},Mr=class extends nt{respond(){let e=new It(this.cmpApiContext);this.invokeCallback(e)}};class Ur extends nt{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],s=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,s);this.invokeCallback(i)}}class Lr extends nt{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class Gr extends nt{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var Ue;(function(n){n.ADD_EVENT_LISTENER="addEventListener",n.GET_FIELD="getField",n.GET_SECTION="getSection",n.HAS_SECTION="hasSection",n.PING="ping",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Ue||(Ue={}));let Fr=class extends nt{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new vn("listenerRemoved",e,t,new It(this.cmpApiContext));this.invokeCallback(s)}};var $r=Object.defineProperty,xr=(n,e,t)=>e in n?$r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,st=(n,e,t)=>xr(n,typeof e!="symbol"?e+"":e,t),Os,Ns,Is,As,Cs,fs;fs=Ue.ADD_EVENT_LISTENER,Cs=Ue.GET_FIELD,As=Ue.GET_SECTION,Is=Ue.HAS_SECTION,Ns=Ue.PING,Os=Ue.REMOVE_EVENT_LISTENER;let Ke=class{};st(Ke,fs,yr),st(Ke,Cs,Ur),st(Ke,As,Lr),st(Ke,Is,Gr),st(Ke,Ns,Mr),st(Ke,Os,Fr);var it;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(it||(it={}));var Ye;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Ye||(Ye={}));var ms;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ms||(ms={}));var be;(function(n){n.NOT_READY="not ready",n.READY="ready"})(be||(be={}));var jr=Object.defineProperty,Hr=(n,e,t)=>e in n?jr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vn=(n,e,t)=>Hr(n,typeof e!="symbol"?e+"":e,t);class kr{constructor(e,t){if(Vn(this,"callQueue"),Vn(this,"customCommands"),Vn(this,"cmpApiContext"),this.cmpApiContext=e,t){let s=Ue.ADD_EVENT_LISTENER;if(t!=null&&t[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=Ue.REMOVE_EVENT_LISTENER,t!=null&&t[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch{this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,s,i){if(typeof e!="string")t(null,!1);else{if(t&&typeof t!="function")throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,s):this.isBuiltInCommand(e)?new Ke[e](this.cmpApiContext,t,s).execute():t&&t(null,!1)}}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(t=>{window.__gpp(...t)})}isCustomCommand(e){return this.customCommands&&typeof this.customCommands[e]=="function"}isBuiltInCommand(e){return Ke[e]!==void 0}}var Br=Object.defineProperty,Kr=(n,e,t)=>e in n?Br(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rn=(n,e,t)=>Kr(n,typeof e!="symbol"?e+"":e,t);let Yr=class{constructor(e){Rn(this,"eventQueue",new Map),Rn(this,"queueNumber",1e3),Rn(this,"cmpApiContext"),this.cmpApiContext=e;try{let s=window.__gpp("events")||[];for(var t=0;t<s.length;t++){let i=s[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(s){console.log(s)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((s,i)=>{let r=new vn(e,i,t,new It(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}},Et=class extends Error{constructor(e){super(e),this.name="InvalidFieldError"}};var zr=Object.defineProperty,Wr=(n,e,t)=>e in n?zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ct=(n,e,t)=>Wr(n,typeof e!="symbol"?e+"":e,t);class ee{constructor(){Ct(this,"segments"),Ct(this,"encodedString",null),Ct(this,"dirty",!1),Ct(this,"decoded",!0),this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.getFieldNames().includes(e))return s.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.hasField(e))return s.getFieldValue(e)}throw new Et("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let s=0;s<this.segments.length;s++){let i=this.segments[s];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new Et("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let p=class extends Error{constructor(e){super(e),this.name="DecodingError"}},se=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class V{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new se("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length;i++)i===0?s[e.length-(i+1)]=1:s[e.length-(i+1)]=s[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}var Qr=Object.defineProperty,Jr=(n,e,t)=>e in n?Qr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ps=(n,e,t)=>Jr(n,typeof e!="symbol"?e+"":e,t);const yn=class Ts{encode(e){if(!/^[0-1]*$/.test(e))throw new se("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=V.decode(i),o=Ts.DICT.charAt(r);t+=o,s+=6}catch{throw new se("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new p("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=Ts.REVERSE_DICT.get(i),o=V.encode(r,6);t+=o}return t}};Ps(yn,"DICT","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Ps(yn,"REVERSE_DICT",new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]));let ws=yn;var qr=Object.defineProperty,Xr=(n,e,t)=>e in n?qr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zr=(n,e,t)=>Xr(n,typeof e!="symbol"?e+"":e,t);const Mn=class extends ws{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}};Zr(Mn,"instance",new Mn);let H=Mn;var eo=Object.defineProperty,to=(n,e,t)=>e in n?eo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,no=(n,e,t)=>to(n,typeof e!="symbol"?e+"":e,t);const Un=class{constructor(){}static getInstance(){return this.instance}encode(e,t){let s="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);s+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return s}decode(e,t,s){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(s.containsKey(o)){let a=s.get(o);try{let c=a.substring(e,i);a.decode(c),i+=c.length}catch(c){if(c.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new p("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}};no(Un,"instance",new Un);let b=Un;class rt{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let s="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(s="1"+s,e-=r):s="0"+s}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new p("Undecodable FibonacciInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length-1;i++)i===0?s.push(1):i===1?s.push(2):s.push(s[i-1]+s[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}let ot=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new se("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new p("Undecodable Boolean '"+e+"'")}};class Ds{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=V.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+rt.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let c=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+rt.encode(a)+rt.encode(c)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=ot.decode(e.substring(r,r+1));if(r++,a===!0){let c=e.indexOf("11",r),d=rt.decode(e.substring(r,c+2))+i;i=d,r=c+2,c=e.indexOf("11",r);let u=rt.decode(e.substring(r,c+2))+i;i=u,r=c+2;for(let _=d;_<=u;_++)t.push(_)}else{let c=e.indexOf("11",r),d=rt.decode(e.substring(r,c+2))+i;i=d,t.push(d),r=c+2}}return t}}let so=class extends Error{constructor(e){super(e),this.name="ValidationError"}};var io=Object.defineProperty,ro=(n,e,t)=>e in n?io(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ln=(n,e,t)=>ro(n,typeof e!="symbol"?e+"":e,t);class ve{constructor(e=!0){Ln(this,"hardFailIfMissing"),Ln(this,"validator"),Ln(this,"value"),this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new so("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}let we=class extends p{constructor(e){super(e),this.name="SubstringError"}};class te{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new we("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class oo extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Ds.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=Ds.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=V.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i=e.indexOf("11",e.indexOf("11",i+1)+2)+2:i=e.indexOf("11",i+1)+2;return te.substring(e,t,i)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var ao=Object.defineProperty,co=(n,e,t)=>e in n?ao(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,lo=(n,e,t)=>co(n,typeof e!="symbol"?e+"":e,t);class l extends ve{constructor(e,t,s=!0){super(s),lo(this,"bitStringLength"),this.bitStringLength=e,this.setValue(t)}encode(){try{return V.encode(this.value,this.bitStringLength)}catch(e){throw new se(e)}}decode(e){try{this.value=V.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.bitStringLength)}catch(s){throw new we(s)}}}var Eo=Object.defineProperty,uo=(n,e,t)=>e in n?Eo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,So=(n,e,t)=>uo(n,typeof e!="symbol"?e+"":e,t);class v{constructor(){So(this,"fields",new Map)}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var xe;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(xe||(xe={}));const po=[xe.ID,xe.VERSION,xe.SECTION_IDS];var ho=Object.defineProperty,_o=(n,e,t)=>e in n?ho(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ft=(n,e,t)=>_o(n,typeof e!="symbol"?e+"":e,t);class w{constructor(){ft(this,"fields"),ft(this,"encodedString",null),ft(this,"dirty",!1),ft(this,"decoded",!0),this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new Et("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new Et(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}var go=Object.defineProperty,To=(n,e,t)=>e in n?go(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bs=(n,e,t)=>To(n,typeof e!="symbol"?e+"":e,t);class Oo extends w{constructor(e){super(),bs(this,"base64UrlEncoder",H.getInstance()),bs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return po}initializeFields(){let e=new v;return e.put(xe.ID.toString(),new l(6,Je.ID)),e.put(xe.VERSION.toString(),new l(6,Je.VERSION)),e.put(xe.SECTION_IDS.toString(),new oo([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var No=Object.defineProperty,Io=(n,e,t)=>e in n?No(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gn=(n,e,t)=>Io(n,typeof e!="symbol"?e+"":e,t);const mt=class cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return cn.ID}getName(){return cn.NAME}getVersion(){return cn.VERSION}initializeSegments(){let e=[];return e.push(new Oo),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Gn(mt,"ID",3),Gn(mt,"VERSION",1),Gn(mt,"NAME","header");let Je=mt;var h;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.POLICY_VERSION="PolicyVersion",n.IS_SERVICE_SPECIFIC="IsServiceSpecific",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",n.PURPOSE_CONSENTS="PurposeConsents",n.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",n.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",n.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",n.VENDOR_CONSENTS="VendorConsents",n.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",n.PUBLISHER_RESTRICTIONS="PublisherRestrictions",n.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",n.PUBLISHER_CONSENTS="PublisherConsents",n.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",n.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",n.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",n.VENDORS_ALLOWED="VendorsAllowed",n.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",n.VENDORS_DISCLOSED="VendorsDisclosed"})(h||(h={}));const Ao=[h.VERSION,h.CREATED,h.LAST_UPDATED,h.CMP_ID,h.CMP_VERSION,h.CONSENT_SCREEN,h.CONSENT_LANGUAGE,h.VENDOR_LIST_VERSION,h.POLICY_VERSION,h.IS_SERVICE_SPECIFIC,h.USE_NON_STANDARD_STACKS,h.SPECIAL_FEATURE_OPTINS,h.PURPOSE_CONSENTS,h.PURPOSE_LEGITIMATE_INTERESTS,h.PURPOSE_ONE_TREATMENT,h.PUBLISHER_COUNTRY_CODE,h.VENDOR_CONSENTS,h.VENDOR_LEGITIMATE_INTERESTS,h.PUBLISHER_RESTRICTIONS],Co=[h.PUBLISHER_PURPOSES_SEGMENT_TYPE,h.PUBLISHER_CONSENTS,h.PUBLISHER_LEGITIMATE_INTERESTS,h.NUM_CUSTOM_PURPOSES,h.PUBLISHER_CUSTOM_CONSENTS,h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],fo=[h.VENDORS_ALLOWED_SEGMENT_TYPE,h.VENDORS_ALLOWED],mo=[h.VENDORS_DISCLOSED_SEGMENT_TYPE,h.VENDORS_DISCLOSED];var Po=Object.defineProperty,wo=(n,e,t)=>e in n?Po(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Do=(n,e,t)=>wo(n,typeof e!="symbol"?e+"":e,t);const Fn=class extends ws{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}};Do(Fn,"instance",new Fn);let ut=Fn;class at{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=V.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+V.encode(t[r][0],16):i+="1"+V.encode(t[r][0],16)+V.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=ot.decode(e.substring(i,i+1));if(i++,o===!0){let a=V.decode(e.substring(i,i+16));i+=16;let c=V.decode(e.substring(i,i+16));i+=16;for(let d=a;d<=c;d++)t.push(d)}else{let a=V.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class $n extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=V.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return te.substring(e,t,i)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var bo=Object.defineProperty,vo=(n,e,t)=>e in n?bo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xn=(n,e,t)=>vo(n,typeof e!="symbol"?e+"":e,t);class Vo{constructor(e,t,s){xn(this,"key"),xn(this,"type"),xn(this,"ids"),this.key=e,this.type=t,this.ids=s}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}var Ro=Object.defineProperty,yo=(n,e,t)=>e in n?Ro(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,vs=(n,e,t)=>yo(n,typeof e!="symbol"?e+"":e,t);class Vs extends ve{constructor(e,t,s,i=!0){super(i),vs(this,"keyBitStringLength"),vs(this,"typeBitStringLength"),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=V.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=V.encode(i.getKey(),this.keyBitStringLength),t+=V.encode(i.getType(),this.typeBitStringLength),t+=at.encode(i.getIds())}return t}catch(e){throw new se(e)}}decode(e){try{let t=[],s=V.decode(te.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=V.decode(te.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=V.decode(te.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let c=new $n([]).substring(e,i),d=at.decode(c);i+=c.length,t.push(new Vo(o,a,d))}this.value=t}catch(t){throw new p(t)}}substring(e,t){try{let s="";s+=te.substring(e,t,t+12);let i=V.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=te.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let c=te.substring(e,r,r+this.typeBitStringLength);r+=c.length,s+=c;let d=new $n([]).substring(e,r);r+=d.length,s+=d}return s}catch(s){throw new we(s)}}}class K extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ot.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+1)}catch(s){throw new we(s)}}}class Rs{static encode(e){return e?V.encode(Math.round(e.getTime()/100),36):V.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new p("Undecodable Datetime '"+e+"'");return new Date(V.decode(e)*100)}}class Pt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Rs.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=Rs.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+36)}catch(s){throw new we(s)}}}class ct{static encode(e,t){if(e.length>t)throw new se("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=ot.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(ot.decode(e.substring(s,s+1)));return t}}var Mo=Object.defineProperty,Uo=(n,e,t)=>e in n?Mo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Lo=(n,e,t)=>Uo(n,typeof e!="symbol"?e+"":e,t);class Le extends ve{constructor(e,t=!0){super(t),Lo(this,"numElements"),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new se(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.numElements)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class ys{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=V.encode(63,6);else if(r>=65)s+=V.encode(e.charCodeAt(i)-65,6);else throw new se("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new p("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=V.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}var Go=Object.defineProperty,Fo=(n,e,t)=>e in n?Go(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$o=(n,e,t)=>Fo(n,typeof e!="symbol"?e+"":e,t);class jn extends ve{constructor(e,t,s=!0){super(s),$o(this,"stringLength"),this.stringLength=e,this.setValue(t)}encode(){try{return ys.encode(this.value,this.stringLength)}catch(e){throw new se(e)}}decode(e){try{this.value=ys.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.stringLength*6)}catch(s){throw new we(s)}}}class qe extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=at.encode(this.value),s=t.length,i=e;if(s<=i)return V.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return V.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new se(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=at.decode(e.substring(17));else{let t=[],s=ct.decode(e.substring(17));for(let i=0;i<s.length;i++)s[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new p(t)}}substring(e,t){try{let s=V.decode(te.substring(e,t,t+16));return e.charAt(t+16)==="1"?te.substring(e,t,t+17)+new $n([]).substring(e,t+17):te.substring(e,t,t+17+s)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var xo=Object.defineProperty,jo=(n,e,t)=>e in n?xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ms=(n,e,t)=>jo(n,typeof e!="symbol"?e+"":e,t);class Ho extends w{constructor(e){super(),Ms(this,"base64UrlEncoder",ut.getInstance()),Ms(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ao}initializeFields(){let e=new Date,t=new v;return t.put(h.VERSION.toString(),new l(6,X.VERSION)),t.put(h.CREATED.toString(),new Pt(e)),t.put(h.LAST_UPDATED.toString(),new Pt(e)),t.put(h.CMP_ID.toString(),new l(12,0)),t.put(h.CMP_VERSION.toString(),new l(12,0)),t.put(h.CONSENT_SCREEN.toString(),new l(6,0)),t.put(h.CONSENT_LANGUAGE.toString(),new jn(2,"EN")),t.put(h.VENDOR_LIST_VERSION.toString(),new l(12,0)),t.put(h.POLICY_VERSION.toString(),new l(6,2)),t.put(h.IS_SERVICE_SPECIFIC.toString(),new K(!1)),t.put(h.USE_NON_STANDARD_STACKS.toString(),new K(!1)),t.put(h.SPECIAL_FEATURE_OPTINS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_CONSENTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_ONE_TREATMENT.toString(),new K(!1)),t.put(h.PUBLISHER_COUNTRY_CODE.toString(),new jn(2,"AA")),t.put(h.VENDOR_CONSENTS.toString(),new qe([])),t.put(h.VENDOR_LEGITIMATE_INTERESTS.toString(),new qe([])),t.put(h.PUBLISHER_RESTRICTIONS.toString(),new Vs(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}var ko=Object.defineProperty,Bo=(n,e,t)=>e in n?ko(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ko=(n,e,t)=>Bo(n,typeof e!="symbol"?e+"":e,t);class wt extends ve{constructor(e,t,s=!0){super(s),Ko(this,"getLength"),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new se(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.getLength())}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),s=[...e];for(let i=s.length;i<t;i++)s.push(!1);s.length>t&&(s=s.slice(0,t)),super.setValue([...s])}}var Yo=Object.defineProperty,zo=(n,e,t)=>e in n?Yo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Us=(n,e,t)=>zo(n,typeof e!="symbol"?e+"":e,t);class Wo extends w{constructor(e){super(),Us(this,"base64UrlEncoder",ut.getInstance()),Us(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Co}initializeFields(){let e=new v;e.put(h.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(h.PUBLISHER_CONSENTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(h.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new l(6,0);return e.put(h.NUM_CUSTOM_PURPOSES.toString(),t),e.put(h.PUBLISHER_CUSTOM_CONSENTS.toString(),new wt(()=>t.getValue(),[])),e.put(h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new wt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}var Qo=Object.defineProperty,Jo=(n,e,t)=>e in n?Qo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ls=(n,e,t)=>Jo(n,typeof e!="symbol"?e+"":e,t);class qo extends w{constructor(e){super(),Ls(this,"base64UrlEncoder",ut.getInstance()),Ls(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return fo}initializeFields(){let e=new v;return e.put(h.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new l(3,2)),e.put(h.VENDORS_ALLOWED.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}var Xo=Object.defineProperty,Zo=(n,e,t)=>e in n?Xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gs=(n,e,t)=>Zo(n,typeof e!="symbol"?e+"":e,t);class ea extends w{constructor(e){super(),Gs(this,"base64UrlEncoder",ut.getInstance()),Gs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return mo}initializeFields(){let e=new v;return e.put(h.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new l(3,1)),e.put(h.VENDORS_DISCLOSED.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}var ta=Object.defineProperty,na=(n,e,t)=>e in n?ta(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hn=(n,e,t)=>na(n,typeof e!="symbol"?e+"":e,t);const Dt=class ln extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ln.ID}getName(){return ln.NAME}getVersion(){return ln.VERSION}initializeSegments(){let e=[];return e.push(new Ho),e.push(new Wo),e.push(new qo),e.push(new ea),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[3].decode(s[i]);else if(o>="Q"&&o<="X")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new p("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(h.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode()))),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==h.CREATED&&e!==h.LAST_UPDATED){let s=new Date;super.setFieldValue(h.CREATED,s),super.setFieldValue(h.LAST_UPDATED,s)}}};Hn(Dt,"ID",2),Hn(Dt,"VERSION",2),Hn(Dt,"NAME","tcfeuv2");let X=Dt;var O;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(O||(O={}));const sa=[O.VERSION,O.CREATED,O.LAST_UPDATED,O.CMP_ID,O.CMP_VERSION,O.CONSENT_SCREEN,O.CONSENT_LANGUAGE,O.VENDOR_LIST_VERSION,O.TCF_POLICY_VERSION,O.USE_NON_STANDARD_STACKS,O.SPECIAL_FEATURE_EXPRESS_CONSENT,O.PURPOSES_EXPRESS_CONSENT,O.PURPOSES_IMPLIED_CONSENT,O.VENDOR_EXPRESS_CONSENT,O.VENDOR_IMPLIED_CONSENT,O.PUB_RESTRICTIONS],ia=[O.PUB_PURPOSES_SEGMENT_TYPE,O.PUB_PURPOSES_EXPRESS_CONSENT,O.PUB_PURPOSES_IMPLIED_CONSENT,O.NUM_CUSTOM_PURPOSES,O.CUSTOM_PURPOSES_EXPRESS_CONSENT,O.CUSTOM_PURPOSES_IMPLIED_CONSENT],ra=[O.DISCLOSED_VENDORS_SEGMENT_TYPE,O.DISCLOSED_VENDORS];var oa=Object.defineProperty,aa=(n,e,t)=>e in n?oa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fs=(n,e,t)=>aa(n,typeof e!="symbol"?e+"":e,t);class ca extends w{constructor(e){super(),Fs(this,"base64UrlEncoder",H.getInstance()),Fs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return sa}initializeFields(){let e=new Date,t=new v;return t.put(O.VERSION.toString(),new l(6,Ae.VERSION)),t.put(O.CREATED.toString(),new Pt(e)),t.put(O.LAST_UPDATED.toString(),new Pt(e)),t.put(O.CMP_ID.toString(),new l(12,0)),t.put(O.CMP_VERSION.toString(),new l(12,0)),t.put(O.CONSENT_SCREEN.toString(),new l(6,0)),t.put(O.CONSENT_LANGUAGE.toString(),new jn(2,"EN")),t.put(O.VENDOR_LIST_VERSION.toString(),new l(12,0)),t.put(O.TCF_POLICY_VERSION.toString(),new l(6,2)),t.put(O.USE_NON_STANDARD_STACKS.toString(),new K(!1)),t.put(O.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.PURPOSES_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.PURPOSES_IMPLIED_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.VENDOR_EXPRESS_CONSENT.toString(),new qe([])),t.put(O.VENDOR_IMPLIED_CONSENT.toString(),new qe([])),t.put(O.PUB_RESTRICTIONS.toString(),new Vs(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}var la=Object.defineProperty,da=(n,e,t)=>e in n?la(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$s=(n,e,t)=>da(n,typeof e!="symbol"?e+"":e,t);class Ea extends w{constructor(e){super(),$s(this,"base64UrlEncoder",H.getInstance()),$s(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ia}initializeFields(){let e=new v;e.put(O.PUB_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(O.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(O.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new l(6,0);return e.put(O.NUM_CUSTOM_PURPOSES.toString(),t),e.put(O.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new wt(()=>t.getValue(),[])),e.put(O.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new wt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}var ua=Object.defineProperty,Sa=(n,e,t)=>e in n?ua(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xs=(n,e,t)=>Sa(n,typeof e!="symbol"?e+"":e,t);class pa extends w{constructor(e){super(),xs(this,"base64UrlEncoder",ut.getInstance()),xs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ra}initializeFields(){let e=new v;return e.put(O.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new l(3,1)),e.put(O.DISCLOSED_VENDORS.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var ha=Object.defineProperty,_a=(n,e,t)=>e in n?ha(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,kn=(n,e,t)=>_a(n,typeof e!="symbol"?e+"":e,t);const bt=class dn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return dn.ID}getName(){return dn.NAME}getVersion(){return dn.VERSION}initializeSegments(){let e=[];return e.push(new ca),e.push(new Ea),e.push(new pa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new p("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(O.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==O.CREATED&&e!==O.LAST_UPDATED){let s=new Date;super.setFieldValue(O.CREATED,s),super.setFieldValue(O.LAST_UPDATED,s)}}};kn(bt,"ID",5),kn(bt,"VERSION",1),kn(bt,"NAME","tcfcav1");let Ae=bt;var ga=Object.defineProperty,Ta=(n,e,t)=>e in n?ga(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,js=(n,e,t)=>Ta(n,typeof e!="symbol"?e+"":e,t);class Bn{constructor(e,t){js(this,"validator"),js(this,"value",null),t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}var Oa=Object.defineProperty,Na=(n,e,t)=>e in n?Oa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hs=(n,e,t)=>Na(n,typeof e!="symbol"?e+"":e,t);class Ia{constructor(e,t){Hs(this,"validator"),Hs(this,"value",null),t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}var Aa=Object.defineProperty,Ca=(n,e,t)=>e in n?Aa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,fa=(n,e,t)=>Ca(n,typeof e!="symbol"?e+"":e,t);class ma{constructor(){fa(this,"fields",new Map)}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var ie;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(ie||(ie={}));const Pa=[ie.VERSION,ie.NOTICE,ie.OPT_OUT_SALE,ie.LSPA_COVERED];class wa extends w{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pa}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new ma;return t.put(ie.VERSION,new Ia(Ce.VERSION)),t.put(ie.NOTICE,new Bn("-",e)),t.put(ie.OPT_OUT_SALE,new Bn("-",e)),t.put(ie.LSPA_COVERED,new Bn("-",e)),t}encodeSegment(e){let t="";return t+=e.get(ie.VERSION).getValue(),t+=e.get(ie.NOTICE).getValue(),t+=e.get(ie.OPT_OUT_SALE).getValue(),t+=e.get(ie.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new p("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(ie.VERSION).setValue(parseInt(e.substring(0,1))),t.get(ie.NOTICE).setValue(e.charAt(1)),t.get(ie.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(ie.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new p("Unable to decode UspV1CoreSegment '"+e+"'")}}}var Da=Object.defineProperty,ba=(n,e,t)=>e in n?Da(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kn=(n,e,t)=>ba(n,typeof e!="symbol"?e+"":e,t);const vt=class En extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return En.ID}getName(){return En.NAME}getVersion(){return En.VERSION}initializeSegments(){let e=[];return e.push(new wa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Kn(vt,"ID",6),Kn(vt,"VERSION",1),Kn(vt,"NAME","uspv1");let Ce=vt;var I;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(I||(I={}));const va=[I.VERSION,I.SHARING_NOTICE,I.SALE_OPT_OUT_NOTICE,I.SHARING_OPT_OUT_NOTICE,I.TARGETED_ADVERTISING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_LIMIT_USE_NOTICE,I.SALE_OPT_OUT,I.SHARING_OPT_OUT,I.TARGETED_ADVERTISING_OPT_OUT,I.SENSITIVE_DATA_PROCESSING,I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,I.PERSONAL_DATA_CONSENTS,I.MSPA_COVERED_TRANSACTION,I.MSPA_OPT_OUT_OPTION_MODE,I.MSPA_SERVICE_PROVIDER_MODE],Va=[I.GPC_SEGMENT_TYPE,I.GPC];class ks{static encode(e,t,s){if(e.length>s)throw new se("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=V.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new p("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new p("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(V.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}var Ra=Object.defineProperty,ya=(n,e,t)=>e in n?Ra(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Bs=(n,e,t)=>ya(n,typeof e!="symbol"?e+"":e,t);class W extends ve{constructor(e,t,s=!0){super(s),Bs(this,"elementBitStringLength"),Bs(this,"numElements"),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return ks.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new se(e)}}decode(e){try{this.value=ks.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}var Ma=Object.defineProperty,Ua=(n,e,t)=>e in n?Ma(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ks=(n,e,t)=>Ua(n,typeof e!="symbol"?e+"":e,t);class La extends w{constructor(e){super(),Ks(this,"base64UrlEncoder",H.getInstance()),Ks(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return va}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(I.VERSION.toString(),new l(6,re.VERSION)),i.put(I.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(I.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(I.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(I.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(I.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNatCoreSegment '"+e+"'")}}}var Ga=Object.defineProperty,Fa=(n,e,t)=>e in n?Ga(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ys=(n,e,t)=>Fa(n,typeof e!="symbol"?e+"":e,t);class $a extends w{constructor(e){super(),Ys(this,"base64UrlEncoder",H.getInstance()),Ys(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Va}initializeFields(){let e=new v;return e.put(I.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(I.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(I.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNatGpcSegment '"+e+"'")}}}var xa=Object.defineProperty,ja=(n,e,t)=>e in n?xa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yn=(n,e,t)=>ja(n,typeof e!="symbol"?e+"":e,t);const Vt=class un extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return un.ID}getName(){return un.NAME}getVersion(){return un.VERSION}initializeSegments(){let e=[];return e.push(new La),e.push(new $a),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(I.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Yn(Vt,"ID",7),Yn(Vt,"VERSION",1),Yn(Vt,"NAME","usnat");let re=Vt;var R;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(R||(R={}));const Ha=[R.VERSION,R.SALE_OPT_OUT_NOTICE,R.SHARING_OPT_OUT_NOTICE,R.SENSITIVE_DATA_LIMIT_USE_NOTICE,R.SALE_OPT_OUT,R.SHARING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.PERSONAL_DATA_CONSENTS,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],ka=[R.GPC_SEGMENT_TYPE,R.GPC];var Ba=Object.defineProperty,Ka=(n,e,t)=>e in n?Ba(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zs=(n,e,t)=>Ka(n,typeof e!="symbol"?e+"":e,t);class Ya extends w{constructor(e){super(),zs(this,"base64UrlEncoder",H.getInstance()),zs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ha}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(R.VERSION.toString(),new l(6,ce.VERSION)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(R.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0]).withValidator(s)),i.put(R.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCaCoreSegment '"+e+"'")}}}var za=Object.defineProperty,Wa=(n,e,t)=>e in n?za(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ws=(n,e,t)=>Wa(n,typeof e!="symbol"?e+"":e,t);class Qa extends w{constructor(e){super(),Ws(this,"base64UrlEncoder",H.getInstance()),Ws(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ka}initializeFields(){let e=new v;return e.put(R.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(R.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCaGpcSegment '"+e+"'")}}}var Ja=Object.defineProperty,qa=(n,e,t)=>e in n?Ja(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zn=(n,e,t)=>qa(n,typeof e!="symbol"?e+"":e,t);const Rt=class Sn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Sn.ID}getName(){return Sn.NAME}getVersion(){return Sn.VERSION}initializeSegments(){let e=[];return e.push(new Ya),e.push(new Qa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};zn(Rt,"ID",8),zn(Rt,"VERSION",1),zn(Rt,"NAME","usca");let ce=Rt;var J;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(J||(J={}));const Xa=[J.VERSION,J.SHARING_NOTICE,J.SALE_OPT_OUT_NOTICE,J.TARGETED_ADVERTISING_OPT_OUT_NOTICE,J.SALE_OPT_OUT,J.TARGETED_ADVERTISING_OPT_OUT,J.SENSITIVE_DATA_PROCESSING,J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,J.MSPA_COVERED_TRANSACTION,J.MSPA_OPT_OUT_OPTION_MODE,J.MSPA_SERVICE_PROVIDER_MODE];var Za=Object.defineProperty,ec=(n,e,t)=>e in n?Za(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qs=(n,e,t)=>ec(n,typeof e!="symbol"?e+"":e,t);class tc extends w{constructor(e){super(),Qs(this,"base64UrlEncoder",H.getInstance()),Qs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Xa}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(J.VERSION.toString(),new l(6,le.VERSION)),i.put(J.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(J.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(J.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(J.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(J.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsVaCoreSegment '"+e+"'")}}}var nc=Object.defineProperty,sc=(n,e,t)=>e in n?nc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wn=(n,e,t)=>sc(n,typeof e!="symbol"?e+"":e,t);const yt=class pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pn.ID}getName(){return pn.NAME}getVersion(){return pn.VERSION}initializeSegments(){let e=[];return e.push(new tc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Wn(yt,"ID",9),Wn(yt,"VERSION",1),Wn(yt,"NAME","usva");let le=yt;var k;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(k||(k={}));const ic=[k.VERSION,k.SHARING_NOTICE,k.SALE_OPT_OUT_NOTICE,k.TARGETED_ADVERTISING_OPT_OUT_NOTICE,k.SALE_OPT_OUT,k.TARGETED_ADVERTISING_OPT_OUT,k.SENSITIVE_DATA_PROCESSING,k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,k.MSPA_COVERED_TRANSACTION,k.MSPA_OPT_OUT_OPTION_MODE,k.MSPA_SERVICE_PROVIDER_MODE],rc=[k.GPC_SEGMENT_TYPE,k.GPC];var oc=Object.defineProperty,ac=(n,e,t)=>e in n?oc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Js=(n,e,t)=>ac(n,typeof e!="symbol"?e+"":e,t);class cc extends w{constructor(e){super(),Js(this,"base64UrlEncoder",H.getInstance()),Js(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ic}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(k.VERSION.toString(),new l(6,de.VERSION)),i.put(k.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(k.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(k.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(k.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCoCoreSegment '"+e+"'")}}}var lc=Object.defineProperty,dc=(n,e,t)=>e in n?lc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qs=(n,e,t)=>dc(n,typeof e!="symbol"?e+"":e,t);class Ec extends w{constructor(e){super(),qs(this,"base64UrlEncoder",H.getInstance()),qs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return rc}initializeFields(){let e=new v;return e.put(k.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(k.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(k.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCoGpcSegment '"+e+"'")}}}var uc=Object.defineProperty,Sc=(n,e,t)=>e in n?uc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qn=(n,e,t)=>Sc(n,typeof e!="symbol"?e+"":e,t);const Mt=class hn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return hn.ID}getName(){return hn.NAME}getVersion(){return hn.VERSION}initializeSegments(){let e=[];return e.push(new cc),e.push(new Ec),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(k.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(k.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(k.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Qn(Mt,"ID",10),Qn(Mt,"VERSION",1),Qn(Mt,"NAME","usco");let de=Mt;var Y;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(Y||(Y={}));const pc=[Y.VERSION,Y.SHARING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];var hc=Object.defineProperty,_c=(n,e,t)=>e in n?hc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xs=(n,e,t)=>_c(n,typeof e!="symbol"?e+"":e,t);class gc extends w{constructor(e){super(),Xs(this,"base64UrlEncoder",H.getInstance()),Xs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return pc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(Y.VERSION.toString(),new l(6,Ee.VERSION)),i.put(Y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(Y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(Y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(Y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsUtCoreSegment '"+e+"'")}}}var Tc=Object.defineProperty,Oc=(n,e,t)=>e in n?Tc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jn=(n,e,t)=>Oc(n,typeof e!="symbol"?e+"":e,t);const Ut=class _n extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _n.ID}getName(){return _n.NAME}getVersion(){return _n.VERSION}initializeSegments(){let e=[];return e.push(new gc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Jn(Ut,"ID",11),Jn(Ut,"VERSION",1),Jn(Ut,"NAME","usut");let Ee=Ut;var B;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(B||(B={}));const Nc=[B.VERSION,B.SHARING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],Ic=[B.GPC_SEGMENT_TYPE,B.GPC];var Ac=Object.defineProperty,Cc=(n,e,t)=>e in n?Ac(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zs=(n,e,t)=>Cc(n,typeof e!="symbol"?e+"":e,t);class fc extends w{constructor(e){super(),Zs(this,"base64UrlEncoder",H.getInstance()),Zs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Nc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(B.VERSION.toString(),new l(6,ue.VERSION)),i.put(B.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCtCoreSegment '"+e+"'")}}}var mc=Object.defineProperty,Pc=(n,e,t)=>e in n?mc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ei=(n,e,t)=>Pc(n,typeof e!="symbol"?e+"":e,t);class wc extends w{constructor(e){super(),ei(this,"base64UrlEncoder",H.getInstance()),ei(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ic}initializeFields(){let e=new v;return e.put(B.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(B.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCtGpcSegment '"+e+"'")}}}var Dc=Object.defineProperty,bc=(n,e,t)=>e in n?Dc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qn=(n,e,t)=>bc(n,typeof e!="symbol"?e+"":e,t);const Lt=class gn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return gn.ID}getName(){return gn.NAME}getVersion(){return gn.VERSION}initializeSegments(){let e=[];return e.push(new fc),e.push(new wc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(B.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};qn(Lt,"ID",12),qn(Lt,"VERSION",1),qn(Lt,"NAME","usct");let ue=Lt;var z;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(z||(z={}));const vc=[z.VERSION,z.PROCESSING_NOTICE,z.SALE_OPT_OUT_NOTICE,z.TARGETED_ADVERTISING_OPT_OUT_NOTICE,z.SALE_OPT_OUT,z.TARGETED_ADVERTISING_OPT_OUT,z.SENSITIVE_DATA_PROCESSING,z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,z.ADDITIONAL_DATA_PROCESSING_CONSENT,z.MSPA_COVERED_TRANSACTION,z.MSPA_OPT_OUT_OPTION_MODE,z.MSPA_SERVICE_PROVIDER_MODE];var Vc=Object.defineProperty,Rc=(n,e,t)=>e in n?Vc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ti=(n,e,t)=>Rc(n,typeof e!="symbol"?e+"":e,t);class yc extends w{constructor(e){super(),ti(this,"base64UrlEncoder",H.getInstance()),ti(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return vc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(z.VERSION.toString(),new l(6,Se.VERSION)),i.put(z.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(z.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(z.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(z.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsFlCoreSegment '"+e+"'")}}}var Mc=Object.defineProperty,Uc=(n,e,t)=>e in n?Mc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xn=(n,e,t)=>Uc(n,typeof e!="symbol"?e+"":e,t);const Gt=class Tn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Tn.ID}getName(){return Tn.NAME}getVersion(){return Tn.VERSION}initializeSegments(){let e=[];return e.push(new yc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Xn(Gt,"ID",13),Xn(Gt,"VERSION",1),Xn(Gt,"NAME","usfl");let Se=Gt;var y;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(y||(y={}));const Lc=[y.VERSION,y.SHARING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],Gc=[y.GPC_SEGMENT_TYPE,y.GPC];var Fc=Object.defineProperty,$c=(n,e,t)=>e in n?Fc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ni=(n,e,t)=>$c(n,typeof e!="symbol"?e+"":e,t);class xc extends w{constructor(e){super(),ni(this,"base64UrlEncoder",H.getInstance()),ni(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Lc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(y.VERSION.toString(),new l(6,pe.VERSION)),i.put(y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsMtCoreSegment '"+e+"'")}}}var jc=Object.defineProperty,Hc=(n,e,t)=>e in n?jc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,si=(n,e,t)=>Hc(n,typeof e!="symbol"?e+"":e,t);class kc extends w{constructor(e){super(),si(this,"base64UrlEncoder",H.getInstance()),si(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Gc}initializeFields(){let e=new v;return e.put(y.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(y.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsMtGpcSegment '"+e+"'")}}}var Bc=Object.defineProperty,Kc=(n,e,t)=>e in n?Bc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zn=(n,e,t)=>Kc(n,typeof e!="symbol"?e+"":e,t);const Ft=class On extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return On.ID}getName(){return On.NAME}getVersion(){return On.VERSION}initializeSegments(){let e=[];return e.push(new xc),e.push(new kc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(y.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Zn(Ft,"ID",14),Zn(Ft,"VERSION",1),Zn(Ft,"NAME","usmt");let pe=Ft;var M;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const Yc=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.ADDITIONAL_DATA_PROCESSING_CONSENT,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],zc=[M.GPC_SEGMENT_TYPE,M.GPC];var Wc=Object.defineProperty,Qc=(n,e,t)=>e in n?Wc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ii=(n,e,t)=>Qc(n,typeof e!="symbol"?e+"":e,t);class Jc extends w{constructor(e){super(),ii(this,"base64UrlEncoder",H.getInstance()),ii(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Yc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(M.VERSION.toString(),new l(6,fe.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsOrCoreSegment '"+e+"'")}}}var qc=Object.defineProperty,Xc=(n,e,t)=>e in n?qc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ri=(n,e,t)=>Xc(n,typeof e!="symbol"?e+"":e,t);class Zc extends w{constructor(e){super(),ri(this,"base64UrlEncoder",H.getInstance()),ri(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return zc}initializeFields(){let e=new v;return e.put(M.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(M.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsOrGpcSegment '"+e+"'")}}}var el=Object.defineProperty,tl=(n,e,t)=>e in n?el(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,es=(n,e,t)=>tl(n,typeof e!="symbol"?e+"":e,t);const $t=class Nn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Nn.ID}getName(){return Nn.NAME}getVersion(){return Nn.VERSION}initializeSegments(){let e=[];return e.push(new Jc),e.push(new Zc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};es($t,"ID",15),es($t,"VERSION",1),es($t,"NAME","usor");let fe=$t;var U;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(U||(U={}));const nl=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.ADDITIONAL_DATA_PROCESSING_CONSENT,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],sl=[U.GPC_SEGMENT_TYPE,U.GPC];var il=Object.defineProperty,rl=(n,e,t)=>e in n?il(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,oi=(n,e,t)=>rl(n,typeof e!="symbol"?e+"":e,t);class ol extends w{constructor(e){super(),oi(this,"base64UrlEncoder",H.getInstance()),oi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return nl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(U.VERSION.toString(),new l(6,he.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTxCoreSegment '"+e+"'")}}}var al=Object.defineProperty,cl=(n,e,t)=>e in n?al(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ai=(n,e,t)=>cl(n,typeof e!="symbol"?e+"":e,t);class ll extends w{constructor(e){super(),ai(this,"base64UrlEncoder",H.getInstance()),ai(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return sl}initializeFields(){let e=new v;return e.put(U.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(U.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTxGpcSegment '"+e+"'")}}}var dl=Object.defineProperty,El=(n,e,t)=>e in n?dl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ts=(n,e,t)=>El(n,typeof e!="symbol"?e+"":e,t);const xt=class In extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return In.ID}getName(){return In.NAME}getVersion(){return In.VERSION}initializeSegments(){let e=[];return e.push(new ol),e.push(new ll),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(U.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};ts(xt,"ID",16),ts(xt,"VERSION",1),ts(xt,"NAME","ustx");let he=xt;var L;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(L||(L={}));const ul=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],Sl=[L.GPC_SEGMENT_TYPE,L.GPC];var pl=Object.defineProperty,hl=(n,e,t)=>e in n?pl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ci=(n,e,t)=>hl(n,typeof e!="symbol"?e+"":e,t);class _l extends w{constructor(e){super(),ci(this,"base64UrlEncoder",H.getInstance()),ci(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ul}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(L.VERSION.toString(),new l(6,_e.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsDeCoreSegment '"+e+"'")}}}var gl=Object.defineProperty,Tl=(n,e,t)=>e in n?gl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,li=(n,e,t)=>Tl(n,typeof e!="symbol"?e+"":e,t);class Ol extends w{constructor(e){super(),li(this,"base64UrlEncoder",H.getInstance()),li(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Sl}initializeFields(){let e=new v;return e.put(L.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(L.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsDeGpcSegment '"+e+"'")}}}var Nl=Object.defineProperty,Il=(n,e,t)=>e in n?Nl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ns=(n,e,t)=>Il(n,typeof e!="symbol"?e+"":e,t);const jt=class An extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return An.ID}getName(){return An.NAME}getVersion(){return An.VERSION}initializeSegments(){let e=[];return e.push(new _l),e.push(new Ol),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};ns(jt,"ID",17),ns(jt,"VERSION",1),ns(jt,"NAME","usde");let _e=jt;var G;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(G||(G={}));const Al=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SENSITIVE_DATA_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Cl=[G.GPC_SEGMENT_TYPE,G.GPC];var fl=Object.defineProperty,ml=(n,e,t)=>e in n?fl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,di=(n,e,t)=>ml(n,typeof e!="symbol"?e+"":e,t);class Pl extends w{constructor(e){super(),di(this,"base64UrlEncoder",H.getInstance()),di(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Al}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(G.VERSION.toString(),new l(6,ge.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsIaCoreSegment '"+e+"'")}}}var wl=Object.defineProperty,Dl=(n,e,t)=>e in n?wl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ei=(n,e,t)=>Dl(n,typeof e!="symbol"?e+"":e,t);class bl extends w{constructor(e){super(),Ei(this,"base64UrlEncoder",H.getInstance()),Ei(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Cl}initializeFields(){let e=new v;return e.put(G.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(G.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsIaGpcSegment '"+e+"'")}}}var vl=Object.defineProperty,Vl=(n,e,t)=>e in n?vl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ss=(n,e,t)=>Vl(n,typeof e!="symbol"?e+"":e,t);const Ht=class Cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Cn.ID}getName(){return Cn.NAME}getVersion(){return Cn.VERSION}initializeSegments(){let e=[];return e.push(new Pl),e.push(new bl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(G.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};ss(Ht,"ID",18),ss(Ht,"VERSION",1),ss(Ht,"NAME","usia");let ge=Ht;var F;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(F||(F={}));const Rl=[F.VERSION,F.PROCESSING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.ADDITIONAL_DATA_PROCESSING_CONSENT,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],yl=[F.GPC_SEGMENT_TYPE,F.GPC];var Ml=Object.defineProperty,Ul=(n,e,t)=>e in n?Ml(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ui=(n,e,t)=>Ul(n,typeof e!="symbol"?e+"":e,t);class Ll extends w{constructor(e){super(),ui(this,"base64UrlEncoder",H.getInstance()),ui(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Rl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(F.VERSION.toString(),new l(6,Te.VERSION)),i.put(F.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(F.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNeCoreSegment '"+e+"'")}}}var Gl=Object.defineProperty,Fl=(n,e,t)=>e in n?Gl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Si=(n,e,t)=>Fl(n,typeof e!="symbol"?e+"":e,t);class $l extends w{constructor(e){super(),Si(this,"base64UrlEncoder",H.getInstance()),Si(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return yl}initializeFields(){let e=new v;return e.put(F.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(F.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNeGpcSegment '"+e+"'")}}}var xl=Object.defineProperty,jl=(n,e,t)=>e in n?xl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,is=(n,e,t)=>jl(n,typeof e!="symbol"?e+"":e,t);const kt=class fn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return fn.ID}getName(){return fn.NAME}getVersion(){return fn.VERSION}initializeSegments(){let e=[];return e.push(new Ll),e.push(new $l),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(F.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};is(kt,"ID",19),is(kt,"VERSION",1),is(kt,"NAME","usne");let Te=kt;var $;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})($||($={}));const Hl=[$.VERSION,$.PROCESSING_NOTICE,$.SALE_OPT_OUT_NOTICE,$.TARGETED_ADVERTISING_OPT_OUT_NOTICE,$.SALE_OPT_OUT,$.TARGETED_ADVERTISING_OPT_OUT,$.SENSITIVE_DATA_PROCESSING,$.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,$.ADDITIONAL_DATA_PROCESSING_CONSENT,$.MSPA_COVERED_TRANSACTION,$.MSPA_OPT_OUT_OPTION_MODE,$.MSPA_SERVICE_PROVIDER_MODE],kl=[$.GPC_SEGMENT_TYPE,$.GPC];var Bl=Object.defineProperty,Kl=(n,e,t)=>e in n?Bl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,pi=(n,e,t)=>Kl(n,typeof e!="symbol"?e+"":e,t);class Yl extends w{constructor(e){super(),pi(this,"base64UrlEncoder",H.getInstance()),pi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Hl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put($.VERSION.toString(),new l(6,Oe.VERSION)),i.put($.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put($.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put($.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNhCoreSegment '"+e+"'")}}}var zl=Object.defineProperty,Wl=(n,e,t)=>e in n?zl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hi=(n,e,t)=>Wl(n,typeof e!="symbol"?e+"":e,t);class Ql extends w{constructor(e){super(),hi(this,"base64UrlEncoder",H.getInstance()),hi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return kl}initializeFields(){let e=new v;return e.put($.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put($.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put($.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNhGpcSegment '"+e+"'")}}}var Jl=Object.defineProperty,ql=(n,e,t)=>e in n?Jl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,rs=(n,e,t)=>ql(n,typeof e!="symbol"?e+"":e,t);const Bt=class mn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return mn.ID}getName(){return mn.NAME}getVersion(){return mn.VERSION}initializeSegments(){let e=[];return e.push(new Yl),e.push(new Ql),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue($.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue($.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue($.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};rs(Bt,"ID",20),rs(Bt,"VERSION",1),rs(Bt,"NAME","usnh");let Oe=Bt;var x;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const Xl=[x.VERSION,x.PROCESSING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.ADDITIONAL_DATA_PROCESSING_CONSENT,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],Zl=[x.GPC_SEGMENT_TYPE,x.GPC];var ed=Object.defineProperty,td=(n,e,t)=>e in n?ed(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_i=(n,e,t)=>td(n,typeof e!="symbol"?e+"":e,t);class nd extends w{constructor(e){super(),_i(this,"base64UrlEncoder",H.getInstance()),_i(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Xl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(x.VERSION.toString(),new l(6,Ne.VERSION)),i.put(x.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put(x.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNjCoreSegment '"+e+"'")}}}var sd=Object.defineProperty,id=(n,e,t)=>e in n?sd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,gi=(n,e,t)=>id(n,typeof e!="symbol"?e+"":e,t);class rd extends w{constructor(e){super(),gi(this,"base64UrlEncoder",H.getInstance()),gi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Zl}initializeFields(){let e=new v;return e.put(x.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(x.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNjGpcSegment '"+e+"'")}}}var od=Object.defineProperty,ad=(n,e,t)=>e in n?od(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,os=(n,e,t)=>ad(n,typeof e!="symbol"?e+"":e,t);const Kt=class Pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pn.ID}getName(){return Pn.NAME}getVersion(){return Pn.VERSION}initializeSegments(){let e=[];return e.push(new nd),e.push(new rd),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};os(Kt,"ID",21),os(Kt,"VERSION",1),os(Kt,"NAME","usnj");let Ne=Kt;var j;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(j||(j={}));const cd=[j.VERSION,j.PROCESSING_NOTICE,j.SALE_OPT_OUT_NOTICE,j.TARGETED_ADVERTISING_OPT_OUT_NOTICE,j.SALE_OPT_OUT,j.TARGETED_ADVERTISING_OPT_OUT,j.SENSITIVE_DATA_PROCESSING,j.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,j.ADDITIONAL_DATA_PROCESSING_CONSENT,j.MSPA_COVERED_TRANSACTION,j.MSPA_OPT_OUT_OPTION_MODE,j.MSPA_SERVICE_PROVIDER_MODE],ld=[j.GPC_SEGMENT_TYPE,j.GPC];var dd=Object.defineProperty,Ed=(n,e,t)=>e in n?dd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ti=(n,e,t)=>Ed(n,typeof e!="symbol"?e+"":e,t);class ud extends w{constructor(e){super(),Ti(this,"base64UrlEncoder",H.getInstance()),Ti(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return cd}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new v;return i.put(j.VERSION.toString(),new l(6,Ie.VERSION)),i.put(j.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(j.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(j.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(j.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(j.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(j.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(j.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(j.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTnCoreSegment '"+e+"'")}}}var Sd=Object.defineProperty,pd=(n,e,t)=>e in n?Sd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Oi=(n,e,t)=>pd(n,typeof e!="symbol"?e+"":e,t);class hd extends w{constructor(e){super(),Oi(this,"base64UrlEncoder",H.getInstance()),Oi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ld}initializeFields(){let e=new v;return e.put(j.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(j.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(j.GPC.toString(),new K(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTnGpcSegment '"+e+"'")}}}var _d=Object.defineProperty,gd=(n,e,t)=>e in n?_d(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,as=(n,e,t)=>gd(n,typeof e!="symbol"?e+"":e,t);const Yt=class wn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return wn.ID}getName(){return wn.NAME}getVersion(){return wn.VERSION}initializeSegments(){let e=[];return e.push(new ud),e.push(new hd),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(j.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(j.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(j.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};as(Yt,"ID",22),as(Yt,"VERSION",1),as(Yt,"NAME","ustn");let Ie=Yt;var Td=Object.defineProperty,Od=(n,e,t)=>e in n?Td(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ni=(n,e,t)=>Od(n,typeof e!="symbol"?e+"":e,t);class Z{}Ni(Z,"SECTION_ID_NAME_MAP",new Map([[X.ID,X.NAME],[Ae.ID,Ae.NAME],[Ce.ID,Ce.NAME],[re.ID,re.NAME],[ce.ID,ce.NAME],[le.ID,le.NAME],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[pe.ID,pe.NAME],[fe.ID,fe.NAME],[he.ID,he.NAME],[_e.ID,_e.NAME],[ge.ID,ge.NAME],[Te.ID,Te.NAME],[Oe.ID,Oe.NAME],[Ne.ID,Ne.NAME],[Ie.ID,Ie.NAME]])),Ni(Z,"SECTION_ORDER",[X.NAME,Ae.NAME,Ce.NAME,re.NAME,ce.NAME,le.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,pe.NAME,fe.NAME,he.NAME,_e.NAME,ge.NAME,Te.NAME,Oe.NAME,Ne.NAME,Ie.NAME]);var Nd=Object.defineProperty,Id=(n,e,t)=>e in n?Nd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zt=(n,e,t)=>Id(n,typeof e!="symbol"?e+"":e,t);class Ii{constructor(e){zt(this,"sections",new Map),zt(this,"encodedString",null),zt(this,"decoded",!0),zt(this,"dirty",!1),e&&this.decode(e)}setFieldValue(e,t,s){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===Ae.NAME?(i=new Ae,this.sections.set(Ae.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===fe.NAME?(i=new fe,this.sections.set(fe.NAME,i)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===_e.NAME?(i=new _e,this.sections.set(_e.NAME,i)):e===ge.NAME?(i=new ge,this.sections.set(ge.NAME,i)):e===Te.NAME?(i=new Te,this.sections.set(Te.NAME,i)):e===Oe.NAME?(i=new Oe,this.sections.set(Oe.NAME,i)):e===Ne.NAME?(i=new Ne,this.sections.set(Ne.NAME,i)):e===Ie.NAME&&(i=new Ie,this.sections.set(Ie.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new Et(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).hasField(t):!1}hasFieldBySectionId(e,t){return this.hasField(Z.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(Z.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(Z.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new Je;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<Z.SECTION_ORDER.length;t++){let s=Z.SECTION_ORDER[t];if(this.sections.has(s)){let i=this.sections.get(s);e.push(i.getId())}}return e}encodeModel(e){let t=[],s=[];for(let r=0;r<Z.SECTION_ORDER.length;r++){let o=Z.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);t.push(a.encode()),s.push(a.getId())}}let i=new Je;return i.setFieldValue("SectionIds",s),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),s=new Map;if(t[0].startsWith("D")){let i=new Je(t[0]).getFieldValue("SectionIds");if(i.length!==t.length-1)throw new p("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let r=0;r<i.length;r++){if(t[r+1].trim()==="")throw new p("Unable to decode '"+e+"'. Section "+(r+1)+" is blank.");if(i[r]===Ae.ID){let o=new Ae(t[r+1]);s.set(Ae.NAME,o)}else if(i[r]===X.ID){let o=new X(t[r+1]);s.set(X.NAME,o)}else if(i[r]===Ce.ID){let o=new Ce(t[r+1]);s.set(Ce.NAME,o)}else if(i[r]===re.ID){let o=new re(t[r+1]);s.set(re.NAME,o)}else if(i[r]===ce.ID){let o=new ce(t[r+1]);s.set(ce.NAME,o)}else if(i[r]===le.ID){let o=new le(t[r+1]);s.set(le.NAME,o)}else if(i[r]===de.ID){let o=new de(t[r+1]);s.set(de.NAME,o)}else if(i[r]===Ee.ID){let o=new Ee(t[r+1]);s.set(Ee.NAME,o)}else if(i[r]===ue.ID){let o=new ue(t[r+1]);s.set(ue.NAME,o)}else if(i[r]===Se.ID){let o=new Se(t[r+1]);s.set(Se.NAME,o)}else if(i[r]===pe.ID){let o=new pe(t[r+1]);s.set(pe.NAME,o)}else if(i[r]===fe.ID){let o=new fe(t[r+1]);s.set(fe.NAME,o)}else if(i[r]===he.ID){let o=new he(t[r+1]);s.set(he.NAME,o)}else if(i[r]===_e.ID){let o=new _e(t[r+1]);s.set(_e.NAME,o)}else if(i[r]===ge.ID){let o=new ge(t[r+1]);s.set(ge.NAME,o)}else if(i[r]===Te.ID){let o=new Te(t[r+1]);s.set(Te.NAME,o)}else if(i[r]===Oe.ID){let o=new Oe(t[r+1]);s.set(Oe.NAME,o)}else if(i[r]===Ne.ID){let o=new Ne(t[r+1]);s.set(Ne.NAME,o)}else if(i[r]===Ie.ID){let o=new Ie(t[r+1]);s.set(Ie.NAME,o)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new X(e);return t.set(X.NAME,s),new Je().setFieldValue(xe.SECTION_IDS,[2]),t.set(Je.NAME,s),t}else throw new p("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(Z.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let s=null;this.sections.has(e)?s=this.sections.get(e):e===Ae.NAME?(s=new Ae,this.sections.set(Ae.NAME,s)):e===X.NAME?(s=new X,this.sections.set(X.NAME,s)):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===fe.NAME?(s=new fe,this.sections.set(fe.NAME,s)):e===he.NAME?(s=new he,this.sections.set(he.NAME,s)):e===_e.NAME?(s=new _e,this.sections.set(_e.NAME,s)):e===ge.NAME?(s=new ge,this.sections.set(ge.NAME,s)):e===Te.NAME?(s=new Te,this.sections.set(Te.NAME,s)):e===Oe.NAME?(s=new Oe,this.sections.set(Oe.NAME,s)):e===Ne.NAME?(s=new Ne,this.sections.set(Ne.NAME,s)):e===Ie.NAME&&(s=new Ie,this.sections.set(Ie.NAME,s)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(Z.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e={};for(let t=0;t<Z.SECTION_ORDER.length;t++){let s=Z.SECTION_ORDER[t];this.sections.has(s)&&(e[s]=this.sections.get(s).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}var Ad=Object.defineProperty,Cd=(n,e,t)=>e in n?Ad(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ve=(n,e,t)=>Cd(n,typeof e!="symbol"?e+"":e,t);class fd{constructor(){Ve(this,"gppVersion","1.1"),Ve(this,"supportedAPIs",[]),Ve(this,"eventQueue",new Yr(this)),Ve(this,"cmpStatus",it.LOADING),Ve(this,"cmpDisplayStatus",Ye.HIDDEN),Ve(this,"signalStatus",be.NOT_READY),Ve(this,"applicableSections",[]),Ve(this,"gppModel",new Ii),Ve(this,"cmpId"),Ve(this,"cmpVersion"),Ve(this,"eventStatus")}reset(){this.eventQueue.clear(),this.cmpStatus=it.LOADING,this.cmpDisplayStatus=Ye.HIDDEN,this.signalStatus=be.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new Ii,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class cs{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},_=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=_,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}let Wt=class extends Error{constructor(e){super(e),this.name="GVLError"}};var md=Object.defineProperty,Pd=(n,e,t)=>e in n?md(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,wd=(n,e,t)=>Pd(n,typeof e!="symbol"?e+"":e,t);const Ai=class Dn{has(e){return Dn.langSet.has(e)}forEach(e){Dn.langSet.forEach(e)}get size(){return Dn.langSet.size}};wd(Ai,"langSet",new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]));let Dd=Ai;var bd=Object.defineProperty,vd=(n,e,t)=>e in n?bd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q=(n,e,t)=>vd(n,typeof e!="symbol"?e+"":e,t),Ci=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const fi=class bn{constructor(){q(this,"vendors"),q(this,"consentLanguages",new Dd),q(this,"gvlSpecificationVersion"),q(this,"vendorListVersion"),q(this,"tcfPolicyVersion"),q(this,"lastUpdated"),q(this,"purposes"),q(this,"specialPurposes"),q(this,"features"),q(this,"specialFeatures"),q(this,"stacks"),q(this,"dataCategories"),q(this,"language",bn.DEFAULT_LANGUAGE),q(this,"vendorIds"),q(this,"ready",!1),q(this,"fullVendorList"),q(this,"byPurposeVendorMap"),q(this,"bySpecialPurposeVendorMap"),q(this,"byFeatureVendorMap"),q(this,"bySpecialFeatureVendorMap"),q(this,"baseUrl"),q(this,"languageFilename","purposes-[LANG].json")}static fromVendorList(e){let t=new bn;return t.populate(e),t}static fromUrl(e){return Ci(this,null,function*(){let t=e.baseUrl;if(!t||t.length===0)throw new Wt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Wt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new bn;if(s.baseUrl=t,e.languageFilename?s.languageFilename=e.languageFilename:s.languageFilename="purposes-[LANG].json",e.version>0){let i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");let r=t+i.replace("[VERSION]",String(e.version));s.populate(yield cs.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(yield cs.fetch(r))}return s})}changeLanguage(e){return Ci(this,null,function*(){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const s=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(yield cs.fetch(s))}catch(i){throw new Wt("unable to load language: "+i.message)}}}else throw new Wt(`unsupported language ${e}`)})}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(c=>{a[String(c)]=this.vendors[String(c)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};q(fi,"DEFAULT_LANGUAGE","EN");let mi=fi;var Vd=Object.defineProperty,Rd=(n,e,t)=>e in n?Vd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Pi=(n,e,t)=>Rd(n,typeof e!="symbol"?e+"":e,t),yd=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});class Md{constructor(e,t,s){Pi(this,"callResponder"),Pi(this,"cmpApiContext"),this.cmpApiContext=new fd,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new kr(this.cmpApiContext,s)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(Z.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(Z.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(Z.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(Z.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(Z.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return mi.fromVendorList(e)}getGvlFromUrl(e){return yd(this,null,function*(){return mi.fromUrl(e)})}}var Ud=Object.defineProperty,Ld=(n,e,t)=>e in n?Ud(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ls=(n,e,t)=>Ld(n,typeof e!="symbol"?e+"":e,t);class wi{constructor(e,t,s){ls(this,"consentPreference"),ls(this,"notice"),ls(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Di;(n=>{(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFgdprApplies||(n.IABTCFgdprApplies={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFPurposeOneTreatment||(n.IABTCFPurposeOneTreatment={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFUseNonStandardTexts||(n.IABTCFUseNonStandardTexts={}))})(Di||(Di={}));var Gd=(n=>(n.GPP_US_NATIONAL="gpp_us_national",n.GPP_US_STATE="gpp_us_state",n))(Gd||{}),Fd=(n=>(n.FRONTEND="frontend",n.SYSTEM_WIDE="system_wide",n.NOT_APPLICABLE="not_applicable",n))(Fd||{}),bi=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(bi||{}),Ge=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(Ge||{}),Qt=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(Qt||{}),St=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(St||{}),$d=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))($d||{}),pt=(n=>(n.OVERLAY="overlay",n.BANNER_AND_MODAL="banner_and_modal",n.MODAL="modal",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.HEADLESS="headless",n))(pt||{}),xd=(n=>(n.ALWAYS_ENABLED="always_enabled",n.ENABLED_WHERE_REQUIRED="enabled_where_required",n.ALWAYS_DISABLED="always_disabled",n))(xd||{}),jd=(n=>(n.OPTIONS="options",n.EXPERIENCE_TRANSLATION="language",n))(jd||{}),Hd=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n))(Hd||{}),kd=(n=>(n.ACKNOWLEDGE="acknowledge",n.OPT_IN_OPT_OUT="opt_in_opt_out",n.OPT_IN_ONLY="opt_in_only",n))(kd||{}),Bd=(n=>(n.REJECT_ALL="reject_all",n.REJECT_CONSENT_ONLY="reject_consent_only",n))(Bd||{}),ht=(n=>(n.BUTTON="button",n.REJECT="reject",n.ACCEPT="accept",n.SCRIPT="script",n.SAVE="save",n.DISMISS="dismiss",n.GPC="gpc",n.INDIVIDUAL_NOTICE="individual_notice",n.ACKNOWLEDGE="acknowledge",n.OT_MIGRATION="ot_migration",n))(ht||{}),Kd=(n=>(n.privacy_center="privacy_center",n.overlay="overlay",n.api="api",n))(Kd||{}),Yd=(n=>(n.NONE="none",n.APPLIED="applied",n.OVERRIDDEN="overridden",n))(Yd||{}),zd=(n=>(n.OVERLAY="overlay",n.MODAL="modal",n.BANNER="banner",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.TCF_BANNER="tcf_banner",n))(zd||{});const Wd=(n,e)=>!!Object.keys(e).includes(n.notice_key),ds=n=>!n||n===Ge.OPT_OUT?!1:n===Ge.OPT_IN?!0:n===Ge.ACKNOWLEDGE,_t=(n,e)=>n?e===bi.NOTICE_ONLY?Ge.ACKNOWLEDGE:Ge.OPT_IN:Ge.OPT_OUT,Qd=n=>typeof n=="string"?ds(n):n,Jd=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var qd=Object.defineProperty,Xd=Object.defineProperties,Zd=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,eE=Object.prototype.hasOwnProperty,tE=Object.prototype.propertyIsEnumerable,Vi=(n,e,t)=>e in n?qd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jt=(n,e)=>{for(var t in e||(e={}))eE.call(e,t)&&Vi(n,t,e[t]);if(vi)for(var t of vi(e))tE.call(e,t)&&Vi(n,t,e[t]);return n},nE=(n,e)=>Xd(n,Zd(e));const lt=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Ri=n=>!!(n&&n.every(e=>e.default_preference===Ge.OPT_IN)),sE=n=>n?n.location&&Jd.test(n.location)?n.location.replace("-","_").toLowerCase():n.country&&n.region?`${n.country.toLowerCase()}_${n.region.toLowerCase()}`:null:null,yi=n=>n.fidesConsentOverride===ht.ACCEPT||n.fidesConsentOverride===ht.REJECT,iE=(n,e,t,s)=>{var i,r,o,a,c,d;return s!=null&&s.fidesDisableBanner||!lt(n)?!1:((i=n.experience_config)==null?void 0:i.component)===pt.TCF_OVERLAY&&e?s&&yi(s)?!1:(r=n.meta)!=null&&r.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((o=n.experience_config)==null?void 0:o.component)===pt.MODAL||((a=n.experience_config)==null?void 0:a.component)===pt.HEADLESS||!((c=n?.privacy_notices)!=null&&c.length)?!1:t?s&&yi(s)?!1:e?.fides_meta.consentMethod===ht.GPC?!0:!((d=n.privacy_notices)!=null&&d.every(u=>Wd(u,t))):!0},rE=(n,e)=>n.map(t=>{var s;const i=_t(e.includes(t.notice.notice_key),t.notice.consent_mechanism);return new wi(t.notice,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)}),oE=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=Qt.OMIT})=>{if(!(e!=null&&e.length))return n;const i=Jt({},n);return s===Qt.INCLUDE?e.forEach(r=>{i[r]=t===St.CONSENT_MECHANISM?Ge.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},aE=({consent:n,flagType:e=St.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==St.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,Qd(o)]));const i=Object.values(n).some(r=>typeof r=="boolean");if(i&&!t)throw new Error("Cannot transform boolean consent values to consent mechanisms without consent mechanisms map");return i?(Object.keys(n).forEach(r=>{const o=n[r];if(typeof o=="string")s[r]=o;else{const a=t[r];s[r]=_t(o,a)}}),s):Jt({},n)},Mi=(n,e,t=[],s,i)=>{var r,o,a;const c=Jt({},n),d=(r=window.Fides)==null?void 0:r.options,u=(o=i??d?.fidesConsentNonApplicableFlagMode)!=null?o:Qt.OMIT,_=(a=s??d?.fidesConsentFlagType)!=null?a:St.BOOLEAN,E={};Object.assign(E,oE({consent:{},nonApplicableNotices:e??[],flagType:_,mode:u}));const N=t.reduce((g,f)=>nE(Jt({},g),{[f.notice_key]:f.consent_mechanism}),{});return Object.assign(E,aE({consent:c,consentMechanisms:N,flagType:_})),E};var Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */qt.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof Es=="object"&&Es;(r.global===r||r.window===r)&&(t=r);var o=function(g){this.message=g};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(g){throw new o(g)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,u=function(g){g=String(g).replace(d,"");var f=g.length;f%4==0&&(g=g.replace(/==?$/,""),f=g.length),(f%4==1||/[^+a-zA-Z0-9/]/.test(g))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var C=0,m,P,ne="",ye=-1;++ye<f;)P=c.indexOf(g.charAt(ye)),m=C%4?m*64+P:P,C++%4&&(ne+=String.fromCharCode(255&m>>(-2*C&6)));return ne},_=function(g){g=String(g),/[^\0-\xFF]/.test(g)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var f=g.length%3,C="",m=-1,P,ne,ye,Pe,Pr=g.length-f;++m<Pr;)P=g.charCodeAt(m)<<16,ne=g.charCodeAt(++m)<<8,ye=g.charCodeAt(++m),Pe=P+ne+ye,C+=c.charAt(Pe>>18&63)+c.charAt(Pe>>12&63)+c.charAt(Pe>>6&63)+c.charAt(Pe&63);return f==2?(P=g.charCodeAt(m)<<8,ne=g.charCodeAt(++m),Pe=P+ne,C+=c.charAt(Pe>>10)+c.charAt(Pe>>4&63)+c.charAt(Pe<<2&63)+"="):f==1&&(Pe=g.charCodeAt(m),C+=c.charAt(Pe>>2)+c.charAt(Pe<<4&63)+"=="),C},E={encode:_,decode:u,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=E;else for(var N in E)E.hasOwnProperty(N)&&(s[N]=E[N]);else t.base64=E})(Es)}(qt,qt.exports);var Ui=qt.exports;/*! js-cookie v3.0.5 | MIT */function Xt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)n[s]=t[s]}return n}var cE={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function us(n,e){function t(i,r,o){if(!(typeof document>"u")){o=Xt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in o)o[c]&&(a+="; "+c,o[c]!==!0&&(a+="="+o[c].split(";")[0]));return document.cookie=i+"="+n.write(r,i)+a}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var r=document.cookie?document.cookie.split("; "):[],o={},a=0;a<r.length;a++){var c=r[a].split("="),d=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(o[u]=n.read(d,u),i===u)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",Xt({},r,{expires:-1}))},withAttributes:function(i){return us(this.converter,Xt({},this.attributes,i))},withConverter:function(i){return us(Xt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var lE=us(cE,{path:"/"});let Zt;const dE=new Uint8Array(16);function EE(){if(!Zt&&(Zt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zt(dE)}const ae=[];for(let n=0;n<256;++n)ae.push((n+256).toString(16).slice(1));function uE(n,e=0){return ae[n[e+0]]+ae[n[e+1]]+ae[n[e+2]]+ae[n[e+3]]+"-"+ae[n[e+4]]+ae[n[e+5]]+"-"+ae[n[e+6]]+ae[n[e+7]]+"-"+ae[n[e+8]]+ae[n[e+9]]+"-"+ae[n[e+10]]+ae[n[e+11]]+ae[n[e+12]]+ae[n[e+13]]+ae[n[e+14]]+ae[n[e+15]]}const SE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Li={randomUUID:SE};function pE(n,e,t){if(Li.randomUUID&&!e&&!n)return Li.randomUUID();n=n||{};const s=n.random||(n.rng||EE)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=s[i];return e}return uE(s)}var hE=(n=>(n.CONSENT="Consent",n.CONTRACT="Contract",n.LEGAL_OBLIGATIONS="Legal obligations",n.VITAL_INTERESTS="Vital interests",n.PUBLIC_INTEREST="Public interest",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(hE||{}),Ss=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(Ss||{});const ps=407,en=",",_E=[{experienceKey:"tcf_purpose_consents",tcfModelKey:"purposeConsents",enabledIdsKey:"purposesConsent"},{experienceKey:"tcf_purpose_legitimate_interests",tcfModelKey:"purposeLegitimateInterests",enabledIdsKey:"purposesLegint"},{experienceKey:"tcf_special_features",tcfModelKey:"specialFeatureOptins",enabledIdsKey:"specialFeatures"},{experienceKey:"tcf_vendor_consents",tcfModelKey:"vendorConsents",enabledIdsKey:"vendorsConsent"},{experienceKey:"tcf_vendor_legitimate_interests",tcfModelKey:"vendorLegitimateInterests",enabledIdsKey:"vendorsLegint"}],gE=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];_E.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),Ss.CONSENT.toString(),Ss.LEGITIMATE_INTERESTS.toString();const TE={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var OE=Object.defineProperty,NE=Object.defineProperties,IE=Object.getOwnPropertyDescriptors,Gi=Object.getOwnPropertySymbols,AE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,Fi=(n,e,t)=>e in n?OE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,fE=(n,e)=>{for(var t in e||(e={}))AE.call(e,t)&&Fi(n,t,e[t]);if(Gi)for(var t of Gi(e))CE.call(e,t)&&Fi(n,t,e[t]);return n},mE=(n,e)=>NE(n,IE(e)),PE=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const $i="fides_consent",wE=365,tn=lE.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),DE=()=>pE();DE();const bE=n=>tn.get(n),vE=()=>{const n=bE($i);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(Ui.decode(n))}catch{return}}},xi=(n,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();n.fides_meta.updatedAt=t;let s=JSON.stringify(n);e&&(s=Ui.encode(s));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),tn.set($i,s,{path:"/",domain:r,expires:wE})){const a=vE();if(a&&a.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},VE=n=>{const e={};return gE.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,ds(r.preference)]))}),e},RE=(n,e=!0)=>{n.forEach(t=>{var s;if(tn.remove(t.name,{path:(s=t.path)!=null?s:"/",domain:t.domain}),e){const{hostname:i}=window.location;tn.remove(t.name,{domain:`.${i}`})}})},ji=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,ds(s)]));return Object.fromEntries(e)},yE=(n,e)=>PE(void 0,null,function*(){return mE(fE({},n),{consent:ji(e)})});var ME=(n=>(n.GVL="gvl",n.AC="gacp",n))(ME||{});const je=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},nn=(n,e)=>{if(!(e!=null&&e.vendors))return;const{source:t,id:s}=je(n);if(t==="gvl"||t===void 0)return e.vendors[s]},UE=n=>je(n).source==="gacp",LE=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(t=>t.id).filter(t=>nn(t,n.gvl)).map(t=>+je(t).id)},GE=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>nn(t,n.gvl)).map(t=>+je(t).id)},FE=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(en);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},Hi=n=>{var e;const t=n.getGppString();if(!t)return window.Fides.fides_string;const s=new Array(4).fill(""),i=(((e=window.Fides.fides_string)==null?void 0:e.split(en))||[]).concat(s);return s.map((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},$E=1,Xe={us:{name:re.NAME,id:re.ID},us_ca:{name:ce.NAME,id:ce.ID},us_co:{name:de.NAME,id:de.ID},us_ct:{name:ue.NAME,id:ue.ID},us_ut:{name:Ee.NAME,id:Ee.ID},us_va:{name:le.NAME,id:le.ID},us_de:{name:_e.NAME,id:_e.ID},us_fl:{name:Se.NAME,id:Se.ID},us_ia:{name:ge.NAME,id:ge.ID},us_mt:{name:pe.NAME,id:pe.ID},us_ne:{name:Te.NAME,id:Te.ID},us_nh:{name:Oe.NAME,id:Oe.ID},us_nj:{name:Ne.NAME,id:Ne.ID},us_tn:{name:Ie.NAME,id:Ie.ID},us_tx:{name:he.NAME,id:he.ID}};function ki(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}var xE=Object.defineProperty,jE=Object.defineProperties,HE=Object.getOwnPropertyDescriptors,Bi=Object.getOwnPropertySymbols,kE=Object.prototype.hasOwnProperty,BE=Object.prototype.propertyIsEnumerable,Ki=(n,e,t)=>e in n?xE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yi=(n,e)=>{for(var t in e||(e={}))kE.call(e,t)&&Ki(n,t,e[t]);if(Bi)for(var t of Bi(e))BE.call(e,t)&&Ki(n,t,e[t]);return n},zi=(n,e)=>jE(n,HE(e)),KE=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())}),YE=(n=>(n.PRIVACY_EXPERIENCE="/privacy-experience",n.PRIVACY_PREFERENCES="/privacy-preferences",n.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",n.NOTICES_SERVED="/notices-served",n))(YE||{});const zE={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},WE="Fides.js",QE=(n,e,t,s,i)=>KE(void 0,null,function*(){var r;if((r=t.apiOptions)!=null&&r.savePreferencesFn){try{yield t.apiOptions.savePreferencesFn(n,s.consent,s.fides_string,i)}catch(c){return Promise.reject(c)}return Promise.resolve()}const o=zi(Yi({},zE),{body:JSON.stringify(zi(Yi({},e),{source:WE}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var JE=Object.defineProperty,qE=Object.defineProperties,XE=Object.getOwnPropertyDescriptors,Wi=Object.getOwnPropertySymbols,ZE=Object.prototype.hasOwnProperty,eu=Object.prototype.propertyIsEnumerable,Qi=(n,e,t)=>e in n?JE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hs=(n,e)=>{for(var t in e||(e={}))ZE.call(e,t)&&Qi(n,t,e[t]);if(Wi)for(var t of Wi(e))eu.call(e,t)&&Qi(n,t,e[t]);return n},tu=(n,e)=>qE(n,XE(e));const Ji=(n,e,t)=>{var s,i,r,o,a,c,d;const u=e?hs({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const _=hs({consentMethod:u?.fides_meta.consentMethod},t),E=(s=performance?.mark)==null?void 0:s.call(performance,n),N=E?.startTime,g=u;g&&u!=null&&u.consent&&(g.consent=Mi(u.consent,(r=(i=window.Fides)==null?void 0:i.experience)==null?void 0:r.non_applicable_privacy_notices,(a=(o=window.Fides)==null?void 0:o.experience)==null?void 0:a.privacy_notices));const f=new CustomEvent(n,{detail:tu(hs({},g),{debug:!!((d=(c=window.Fides)==null?void 0:c.options)!=null&&d.debug),extraDetails:_,timestamp:N}),bubbles:!0});window.dispatchEvent(f)}};var nu=Object.defineProperty,su=Object.defineProperties,iu=Object.getOwnPropertyDescriptors,qi=Object.getOwnPropertySymbols,ru=Object.prototype.hasOwnProperty,ou=Object.prototype.propertyIsEnumerable,Xi=(n,e,t)=>e in n?nu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zi=(n,e)=>{for(var t in e||(e={}))ru.call(e,t)&&Xi(n,t,e[t]);if(qi)for(var t of qi(e))ou.call(e,t)&&Xi(n,t,e[t]);return n},au=(n,e)=>su(n,iu(e)),er=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});function cu(n,e,t,s,i,r,o,a,c,d){return er(this,null,function*(){const u=(r||[]).map(E=>({preference:E.consentPreference,privacy_notice_history_id:E.noticeHistoryId||""})),_=Zi({browser_identity:e.identity,preferences:u,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:c,property_id:d},o??[]);yield QE(s,_,n,e,t)})}const lu=n=>er(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,servedNoticeHistoryId:c,tcf:d,updateCookie:u,propertyId:_}){var E,N,g,f;if(!u&&e&&(u=P=>yE(P,e)),!u&&!e)throw new Error("updateCookie is required");const C=yield u(a);Object.assign(a,C),Object.assign(a.fides_meta,{consentMethod:i}),Ji("FidesUpdating",a);const m=Mi(a.consent,(N=(E=window.Fides)==null?void 0:E.experience)==null?void 0:N.non_applicable_privacy_notices,(f=(g=window.Fides)==null?void 0:g.experience)==null?void 0:f.privacy_notices);if(window.Fides.consent=m,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,xi(au(Zi({},a),{consent:m}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield cu(r,a,s,i,t,e,d,o,c,_)}catch{}e&&e.filter(P=>P.consentPreference===Ge.OPT_OUT).forEach(P=>{var ne,ye;(ne=P.notice)!=null&&ne.cookies&&RE(P.notice.cookies,(ye=s.experience_config)==null?void 0:ye.auto_subdomain_cookie_deletion)}),Ji("FidesUpdated",a)});class ze extends Error{constructor(e){super(e),this.name="DecodingError"}}class He extends Error{constructor(e){super(e),this.name="EncodingError"}}class dt extends Error{constructor(e){super(e),this.name="GVLError"}}class ke extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class _s{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new He("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let i=0;i<e.length;i+=this.BASIS)s+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new ze("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const i=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class Be{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return Be.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(Be.langSet.has(e))return e;if(Be.langSet.has(t))return t;const s=t+"-"+t;if(Be.langSet.has(s))return s;for(const i of Be.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){Be.langSet.forEach(e)}get size(){return Be.langSet.size}}class S{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class gt{clone(){const e=new this.constructor;return Object.keys(this).forEach(s=>{const i=this.deepClone(this[s]);i!==void 0&&(e[s]=i)}),e}deepClone(e){const t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){const s=[];for(const i of e)s.push(this.deepClone(i));return e instanceof Array?s:new e.constructor(s)}else{const s={};for(const i in e)e.hasOwnProperty(i)&&(s[i]=this.deepClone(e[i]));return s}}}}var Re;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(Re||(Re={}));class $e extends gt{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),s=new $e;if(t.length!==2)throw new ke("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${$e.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===Re.NOT_ALLOWED||this.restrictionType===Re.REQUIRE_CONSENT||this.restrictionType===Re.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class tr extends gt{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[s];if(r)if(e===Re.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case Re.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case Re.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(s))this.map.set(s,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(s).add(o)}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const s=new Set;this.map.forEach(i=>{i.forEach(r=>{s.add(r)})}),t=Array.from(s)}return t.sort((s,i)=>s-i)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(s===void 0||s>i.restrictionType)&&(s=i.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!s;r++)s=t.isSameAs(i[r]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,i)=>{e?s.has(e)&&t.push($e.unHash(i)):t.push($e.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add($e.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,i=this.map.get(s);i&&(i.delete(e),i.size==0&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,s)=>{const i=$e.unHash(s);Array.from(t).forEach(o=>{this.isOkToHave(i.restrictionType,i.purposeId,o)||t.delete(o)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}}var nr;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(nr||(nr={}));var Q;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(Q||(Q={}));class sr{static ID_TO_KEY=[Q.CORE,Q.VENDORS_DISCLOSED,Q.VENDORS_ALLOWED,Q.PUBLISHER_TC];static KEY_TO_ID={[Q.CORE]:0,[Q.VENDORS_DISCLOSED]:1,[Q.VENDORS_ALLOWED]:2,[Q.PUBLISHER_TC]:3}}class me extends gt{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(s=>{let i=Number.isInteger(parseInt(s,10));return i=i&&this.isValidNumber(e[s].id),i=i&&e[s].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new ke("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class T{static[S.cmpId]=12;static[S.cmpVersion]=12;static[S.consentLanguage]=12;static[S.consentScreen]=6;static[S.created]=36;static[S.isServiceSpecific]=1;static[S.lastUpdated]=36;static[S.policyVersion]=6;static[S.publisherCountryCode]=12;static[S.publisherLegitimateInterests]=24;static[S.publisherConsents]=24;static[S.purposeConsents]=24;static[S.purposeLegitimateInterests]=24;static[S.purposeOneTreatment]=1;static[S.specialFeatureOptins]=12;static[S.useNonStandardTexts]=1;static[S.vendorListVersion]=12;static[S.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class Fe{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class D{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new He(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");return parseInt(e,2)}}class ir{static encode(e,t){return D.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");const s=new Date;return s.setTime(D.decode(e,t)*100),s}}class We{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=Fe.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new ze("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)Fe.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class rr{static encode(e,t){e=e.toUpperCase();const s=65,i=e.charCodeAt(0)-s,r=e.charCodeAt(1)-s;if(i<0||i>25||r<0||r>25)throw new He(`invalid language code: ${e}`);if(t%2===1)throw new He(`numBits must be even, ${t} is not valid`);t=t/2;const o=D.encode(i,t),a=D.encode(r,t);return o+a}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=D.decode(e.slice(0,r),r)+65,a=D.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new ze("invalid bit length for language");return s}}class du{static encode(e){let t=D.encode(e.numRestrictions,T.numRestrictions);if(!e.isEmpty()){const s=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=D.encode(i.purposeId,T.purposeId),t+=D.encode(i.restrictionType,T.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,c=0,d="";for(let u=0;u<o;u++){const _=r[u];if(c===0&&(a++,c=_),u===o-1||r[u+1]>s(_,r[o-1])){const E=_!==c;d+=Fe.encode(E),d+=D.encode(c,T.vendorId),E&&(d+=D.encode(_,T.vendorId)),c=0}}t+=D.encode(a,T.numEntries),t+=d})}return t}static decode(e){let t=0;const s=new tr,i=D.decode(e.substr(t,T.numRestrictions),T.numRestrictions);t+=T.numRestrictions;for(let r=0;r<i;r++){const o=D.decode(e.substr(t,T.purposeId),T.purposeId);t+=T.purposeId;const a=D.decode(e.substr(t,T.restrictionType),T.restrictionType);t+=T.restrictionType;const c=new $e(o,a),d=D.decode(e.substr(t,T.numEntries),T.numEntries);t+=T.numEntries;for(let u=0;u<d;u++){const _=Fe.decode(e.substr(t,T.anyBoolean));t+=T.anyBoolean;const E=D.decode(e.substr(t,T.vendorId),T.vendorId);if(t+=T.vendorId,_){const N=D.decode(e.substr(t,T.vendorId),T.vendorId);if(t+=T.vendorId,N<E)throw new ze(`Invalid RangeEntry: endVendorId ${N} is less than ${E}`);for(let g=E;g<=N;g++)s.add(g,c)}else s.add(E,c)}}return s.bitLength=t,s}}var Tt;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Tt||(Tt={}));class Ot{static encode(e){const t=[];let s=[],i=D.encode(e.maxId,T.maxId),r="",o;const a=T.maxId+T.encodingType,c=a+e.maxId,d=T.vendorId*2+T.singleOrRange+T.numEntries;let u=a+T.numEntries;return e.forEach((_,E)=>{r+=Fe.encode(_),o=e.maxId>d&&u<c,o&&_&&(e.has(E+1)?s.length===0&&(s.push(E),u+=T.singleOrRange,u+=T.vendorId):(s.push(E),u+=T.vendorId,t.push(s),s=[]))}),o?(i+=String(Tt.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(Tt.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=D.decode(e.substr(i,T.maxId),T.maxId);i+=T.maxId;const o=D.decode(e.charAt(i),T.encodingType);if(i+=T.encodingType,o===Tt.RANGE){if(s=new me,t===1){if(e.substr(i,1)==="1")throw new ze("Unable to decode default consent=1");i++}const a=D.decode(e.substr(i,T.numEntries),T.numEntries);i+=T.numEntries;for(let c=0;c<a;c++){const d=Fe.decode(e.charAt(i));i+=T.singleOrRange;const u=D.decode(e.substr(i,T.vendorId),T.vendorId);if(i+=T.vendorId,d){const _=D.decode(e.substr(i,T.vendorId),T.vendorId);i+=T.vendorId;for(let E=u;E<=_;E++)s.set(E)}else s.set(u)}}else{const a=e.substr(i,r);i+=r,s=We.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=D.encode(t,T.numEntries);return e.forEach(i=>{const r=i.length===1;s+=Fe.encode(!r),s+=D.encode(i[0],T.vendorId),r||(s+=D.encode(i[1],T.vendorId))}),s}}function or(){return{[S.version]:D,[S.created]:ir,[S.lastUpdated]:ir,[S.cmpId]:D,[S.cmpVersion]:D,[S.consentScreen]:D,[S.consentLanguage]:rr,[S.vendorListVersion]:D,[S.policyVersion]:D,[S.isServiceSpecific]:Fe,[S.useNonStandardTexts]:Fe,[S.specialFeatureOptins]:We,[S.purposeConsents]:We,[S.purposeLegitimateInterests]:We,[S.purposeOneTreatment]:Fe,[S.publisherCountryCode]:rr,[S.vendorConsents]:Ot,[S.vendorLegitimateInterests]:Ot,[S.publisherRestrictions]:du,segmentType:D,[S.vendorsDisclosed]:Ot,[S.vendorsAllowed]:Ot,[S.publisherConsents]:We,[S.publisherLegitimateInterests]:We,[S.numCustomPurposes]:D,[S.publisherCustomConsents]:We,[S.publisherCustomLegitimateInterests]:We}}class Eu{1={[Q.CORE]:[S.version,S.created,S.lastUpdated,S.cmpId,S.cmpVersion,S.consentScreen,S.consentLanguage,S.vendorListVersion,S.purposeConsents,S.vendorConsents]};2={[Q.CORE]:[S.version,S.created,S.lastUpdated,S.cmpId,S.cmpVersion,S.consentScreen,S.consentLanguage,S.vendorListVersion,S.policyVersion,S.isServiceSpecific,S.useNonStandardTexts,S.specialFeatureOptins,S.purposeConsents,S.purposeLegitimateInterests,S.purposeOneTreatment,S.publisherCountryCode,S.vendorConsents,S.vendorLegitimateInterests,S.publisherRestrictions],[Q.PUBLISHER_TC]:[S.publisherConsents,S.publisherLegitimateInterests,S.numCustomPurposes,S.publisherCustomConsents,S.publisherCustomLegitimateInterests],[Q.VENDORS_ALLOWED]:[S.vendorsAllowed],[Q.VENDORS_DISCLOSED]:[S.vendorsDisclosed]}}class uu{1=[Q.CORE];2=[Q.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(Q.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[S.supportOOB]===!0)&&this[2].push(Q.VENDORS_DISCLOSED),s&&(e[S.supportOOB]&&e[S.vendorsAllowed].size>0&&this[2].push(Q.VENDORS_ALLOWED),this[2].push(Q.PUBLISHER_TC))}}}class ar{static fieldSequence=new Eu;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new He(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==Q.CORE&&(i=D.encode(sr.KEY_TO_ID[t],T.segmentType));const r=or();return s.forEach(o=>{const a=e[o],c=r[o];let d=T[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[S.numCustomPurposes]));try{i+=c.encode(a,d)}catch(u){throw new He(`Error encoding ${t}->${o}: ${u.message}`)}}),_s.encode(i)}static decode(e,t,s){const i=_s.decode(e);let r=0;s===Q.CORE&&(t.version=D.decode(i.substr(r,T[S.version]),T[S.version])),s!==Q.CORE&&(r+=T.segmentType);const o=this.fieldSequence[String(t.version)][s],a=or();return o.forEach(c=>{const d=a[c];let u=T[c];if(u===void 0&&this.isPublisherCustom(c)&&(u=Number(t[S.numCustomPurposes])),u!==0){const _=i.substr(r,u);if(d===Ot?t[c]=d.decode(_,t.version):t[c]=d.decode(_,u),Number.isInteger(u))r+=u;else if(Number.isInteger(t[c].bitLength))r+=t[c].bitLength;else throw new ze(c)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Su{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((i,r)=>{i.forEach((o,a)=>{if(o){const c=t.vendors[a];if(!c||c.deletedDate)i.unset(a);else if(c[r].length===0)if(r==="legIntPurposes"&&c.purposes.length===0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&c.purposes.length>0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(c.flexiblePurposes.length===0)i.unset(a);else{const d=e.publisherRestrictions.getRestrictions(a);let u=!1;for(let _=0,E=d.length;_<E&&!u;_++)u=d[_].restrictionType===Re.REQUIRE_CONSENT&&r==="purposes"||d[_].restrictionType===Re.REQUIRE_LI&&r==="legIntPurposes";u||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const s=e.gvl;if(!s)throw new He("Unable to encode TCModel without a GVL");if(!s.isReady)throw new He("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const i=e.version-1;if(!this.processor[i])throw new He(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class pu{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},_=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=_,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class A extends gt{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new Be;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new dt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=A.baseUrl,i=t?.language;if(i)try{i=A.consentLanguages.parseLanguage(i)}catch(r){throw new dt("Error during parsing the language: "+r.message)}if(this.lang_=i||A.DEFAULT_LANGUAGE,this.cacheLang_=i||A.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new dt("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;A.CACHE.has(r)?(this.populate(A.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=A.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else A.CACHE.has(A.LATEST_CACHE_KEY)?(this.populate(A.CACHE.get(A.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+A.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&A.LANGUAGE_CACHE.size>0?(A.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(A.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(A.CACHE.delete(e),t=!0):e===void 0&&(A.CACHE=new Map,t=!0),t}cacheLanguage(){A.LANGUAGE_CACHE.has(this.cacheLang_)||A.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await pu.fetch(e))}catch(t){throw new dt(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=A.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=A.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=A.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=A.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=A.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=A.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=A.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=A.consentLanguages.parseLanguage(e)}catch(i){throw new dt("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===A.DEFAULT_LANGUAGE.toLowerCase()&&!A.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,A.LANGUAGE_CACHE.has(s)){const i=A.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=A.baseUrl+A.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new dt("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&A.CACHE.set(A.LATEST_CACHE_KEY,this.getJson()),A.CACHE.has(this.vendorListVersion)||A.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(c=>{a[String(c)]=this.vendors[String(c)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new A(this.getJson());return this.lang_!==A.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class cr extends gt{static consentLanguages=A.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=4;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new me;purposeConsents=new me;purposeLegitimateInterests=new me;publisherConsents=new me;publisherLegitimateInterests=new me;publisherCustomConsents=new me;publisherCustomLegitimateInterests=new me;customPurposes;vendorConsents=new me;vendorLegitimateInterests=new me;vendorsDisclosed=new me;vendorsAllowed=new me;publisherRestrictions=new tr;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){A.isInstanceOf(e)||(e=new A(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new ke("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new ke("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new ke("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new ke("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new ke("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new ke("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((s,i)=>Number(s)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new ke("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class hu{static encode(e,t){let s="",i;return e=Su.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new uu(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=ar.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new cr);for(let r=0;r<i;r++){const o=s[r],c=_s.decode(o.charAt(0)).substr(0,T.segmentType),d=sr.ID_TO_KEY[D.decode(c,T.segmentType).toString()];ar.decode(o,t,d)}return t}}var Qe;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Qe||(Qe={}));var sn;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(sn||(sn={}));var rn;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(rn||(rn={}));var lr;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(lr||(lr={}));class on{listenerId;callback;next;param;success=!0;constructor(e,t,s,i){Object.assign(this,{callback:e,listenerId:s,param:t,next:i});try{this.respond()}catch{this.invokeCallback(null)}}invokeCallback(e){const t=e!==null;typeof this.next=="function"?this.callback(this.next,e,t):this.callback(e,t)}}class an extends on{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Er(this.param,this.listenerId))}throwIfParamInvalid(){if(this.param!==void 0&&(!Array.isArray(this.param)||!this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class _u{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new an(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class oe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new _u;static cmpStatus=sn.LOADING;static disabled=!1;static displayStatus=rn.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=sn.LOADING,this.disabled=!1,this.displayStatus=rn.HIDDEN,this.eventQueue.clear()}}class dr{cmpId=oe.cmpId;cmpVersion=oe.cmpVersion;gdprApplies=oe.gdprApplies;tcfPolicyVersion=oe.tcfPolicyVersion}class Er extends dr{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=oe.eventStatus,this.cmpStatus=oe.cmpStatus,this.listenerId=t,oe.gdprApplies){const s=oe.tcModel;this.tcString=oe.tcString,this.isServiceSpecific=s.isServiceSpecific,this.useNonStandardTexts=s.useNonStandardTexts,this.purposeOneTreatment=s.purposeOneTreatment,this.publisherCC=s.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(s.vendorsAllowed,e),disclosedVendors:this.createVectorField(s.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(s.purposeConsents),legitimateInterests:this.createVectorField(s.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(s.vendorConsents,e),legitimateInterests:this.createVectorField(s.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(s.specialFeatureOptins),this.publisher={consents:this.createVectorField(s.publisherConsents),legitimateInterests:this.createVectorField(s.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(s.publisherCustomConsents),legitimateInterests:this.createVectorField(s.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(s.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let i=1;i<=s;i++){const r=i.toString();e.getRestrictions(i).forEach(o=>{const a=o.purposeId.toString();t[a]||(t[a]={}),t[a][r]=o.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((s,i)=>(s[String(i)]=e.has(Number(i)),s),{}):[...e].reduce((s,i)=>(s[i[0].toString(10)]=i[1],s),{})}}class gu extends Er{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,s)=>(t+=s[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(s)});for(let i=0;i<s;i++){const r=i+1;e.getRestrictions(r).forEach(o=>{const a=o.restrictionType.toString(),c=o.purposeId.toString(),d=t[c].substr(0,i),u=t[c].substr(i+1);t[c]=d+a+u})}}return t}}class Tu extends dr{cmpLoaded=!0;cmpStatus=oe.cmpStatus;displayStatus=oe.displayStatus;apiVersion=String(oe.apiVersion);gvlVersion;constructor(){super(),oe.tcModel&&oe.tcModel.vendorListVersion&&(this.gvlVersion=+oe.tcModel.vendorListVersion)}}class Ou extends on{respond(){this.invokeCallback(new Tu)}}class Nu extends an{respond(){this.throwIfParamInvalid(),this.invokeCallback(new gu(this.param))}}class Iu extends on{respond(){const e=oe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new A(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Au extends an{respond(){this.listenerId=oe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class Cu extends on{respond(){this.invokeCallback(oe.eventQueue.remove(this.param))}}class OS{static[Qe.PING]=Ou;static[Qe.GET_TC_DATA]=an;static[Qe.GET_IN_APP_TC_DATA]=Nu;static[Qe.GET_VENDOR_LIST]=Iu;static[Qe.ADD_EVENT_LISTENER]=Au;static[Qe.REMOVE_EVENT_LISTENER]=Cu}const fu=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(en);return t.split(".")[0]}return e??""};var mu=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const Pu=1,ur=[1,3,4,5,6],wu=2,Du=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(UE).map(o=>je(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${wu}~${s}~dv.${i}`},bu=n=>mu(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const c=new cr(new A(e.gvl));yield c.gvl.readyPromise,c.cmpId=ps,c.cmpVersion=Pu,c.consentScreen=1,c.isServiceSpecific=!0,c.supportOOB=!1,e.tcf_publisher_country_code&&(c.publisherCountryCode=e.tcf_publisher_country_code);const d=e.minimal_tcf?GE(e):LE(e);if(c.gvl.narrowVendorsTo(d),t){t.vendorsConsent.forEach(E=>{var N,g,f;if(nn(E,e.gvl)){const{id:C}=je(E);if(c.vendorConsents.set(+C),!((N=e.tcf_publisher_restrictions)!=null&&N.length)){const m=(g=e.gvl)==null?void 0:g.vendors[C];m&&!((f=m?.purposes)!=null&&f.length)&&m.flexiblePurposes.forEach(P=>{const ne=new $e;ne.purposeId=P,ne.restrictionType=Re.REQUIRE_CONSENT,c.publisherRestrictions.add(+C,ne)})}}}),t.vendorsLegint.forEach(E=>{var N,g;if(e.minimal_tcf)(N=e.tcf_vendor_legitimate_interest_ids)==null||N.forEach(f=>{const{id:C}=je(f);c.vendorLegitimateInterests.set(+C)});else if(nn(E,e.gvl)){const f=(g=e.tcf_vendor_legitimate_interests)==null?void 0:g.filter(P=>P.id===E)[0],C=f?.purpose_legitimate_interests;let m=!1;if(C&&(C.map(P=>P.id).filter(P=>ur.includes(P)).length&&(m=!0),!m)){const{id:P}=je(E);c.vendorLegitimateInterests.set(+P)}}}),(s=e.gvl)!=null&&s.vendors&&((i=e.tcf_vendor_relationships)==null||i.forEach(E=>{var N,g;const{id:f}=je(E.id),C=(N=e.gvl)==null?void 0:N.vendors[f];C&&(g=C.specialPurposes)!=null&&g.length&&(!C.legIntPurposes||C.legIntPurposes.length===0)&&c.vendorLegitimateInterests.set(+f)})),t.purposesConsent.forEach(E=>{c.purposeConsents.set(+E)}),t.purposesLegint.forEach(E=>{const N=+E;ur.includes(N)||c.purposeLegitimateInterests.set(N)}),t.specialFeatures.forEach(E=>{c.specialFeatureOptins.set(+E)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(E=>{E.vendors.forEach(N=>{const g=new $e;g.purposeId=E.purpose_id,g.restrictionType=E.restriction_type,c.publisherRestrictions.add(N,g)})}),a=hu.encode(c,{segments:[Q.CORE]});const u=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(E=>E.id),_=Du({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:u??[]});a=`${a}${en}${_}`}}catch(c){return console.error("Unable to instantiate GVL: ",c),Promise.resolve("")}return Promise.resolve(a)});var vu=Object.defineProperty,Vu=Object.defineProperties,Ru=Object.getOwnPropertyDescriptors,Sr=Object.getOwnPropertySymbols,yu=Object.prototype.hasOwnProperty,Mu=Object.prototype.propertyIsEnumerable,pr=(n,e,t)=>e in n?vu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Uu=(n,e)=>{for(var t in e||(e={}))yu.call(e,t)&&pr(n,t,e[t]);if(Sr)for(var t of Sr(e))Mu.call(e,t)&&pr(n,t,e[t]);return n},Lu=(n,e)=>Vu(n,Ru(e)),Gu=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const Ze=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=_t(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],et=n=>n!=null&&n.length?n.map(e=>{const t=_t(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],Fu=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consents)!=null&&a.map(c=>c.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interests)!=null&&a.map(c=>c.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:Ze({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:Ze({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:Ze({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:Ze({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:Ze({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:Ze({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:Ze({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},$u=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consent_ids)!=null&&a.includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interest_ids)!=null&&a.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:et(e.purposesConsent),purpose_legitimate_interests_preferences:et(e.purposesLegint),special_feature_preferences:et(e.specialFeatures),vendor_consent_preferences:et(s),vendor_legitimate_interests_preferences:et(r),system_consent_preferences:et(t),system_legitimate_interests_preferences:et(i)}},xu=(n,e,t,s,i)=>Gu(void 0,null,function*(){var r;const o=yield bu({tcStringPreferences:t,experience:s}),a=Lu(Uu({},n),{fides_string:o,tcf_consent:VE(e),tcf_version_hash:(r=s.meta)==null?void 0:r.version_hash});return i&&(a.consent=ji(i)),a}),ju=(n,e)=>!n||!e?[]:n.map(t=>{var s;const i=_t(e.includes(t.id),t.consent_mechanism);return new wi(t,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)});var De=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(De||{});const tt="us",hr=({cmpApi:n,sectionName:e,gppSettings:t})=>{t&&[{gppSettingField:t.mspa_covered_transactions,cmpApiField:I.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:I.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:I.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:s,cmpApiField:i})=>{const r=i===I.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:s&&(o=1),n.setFieldValue(e,i,o)})},Hu=n=>n?.toLowerCase().startsWith("us"),gs=({experienceRegion:n,usApproach:e})=>Hu(n)&&e===De.NATIONAL?tt:n,_r=({cmpApi:n,experience:e})=>{const t=new Set,{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=gs({experienceRegion:i,usApproach:o}),c=Xe[a];return!c&&o===De.ALL&&(a=tt,c=Xe[a]),!c||a===tt&&o===De.STATE?[]:(t.add(c),s.forEach(d=>{var u;const{gpp_field_mapping:_}=d,E=(u=_?.find(N=>N.region===a))==null?void 0:u.notice;E&&E.forEach(N=>{n.setFieldValue(c.name,N,1)})}),hr({cmpApi:n,sectionName:c.name,gppSettings:r}),Array.from(t))},gr=({cmpApi:n,cookie:e,experience:t})=>{const s=new Set,{privacy_notices:i=[],region:r,gpp_settings:o}=t,a=o?.us_approach;let c=gs({experienceRegion:r,usApproach:a}),d=Xe[c];if(!d&&a===De.ALL&&(c=tt,d=Xe[c]),!d||c===tt&&a===De.STATE)return[];s.add(d);const{consent:u}=e;return Object.keys(u).forEach(_=>{var E;const N=i?.find(f=>f.notice_key===_),g=u[_];if(N){const{gpp_field_mapping:f}=N,C=(E=f?.find(m=>m.region===c))==null?void 0:E.mechanism;C&&C.forEach(m=>{let P=m.not_available;g===!1?P=m.opt_out:g&&(P=m.not_opt_out);let ne=+P;P.length>1&&(ne=P.split("").map(ye=>+ye)),n.setFieldValue(d.name,m.field,ne)})}}),hr({cmpApi:n,sectionName:d.name,gppSettings:o}),Array.from(s)};var ku=Object.defineProperty,Bu=Object.defineProperties,Ku=Object.getOwnPropertyDescriptors,Tr=Object.getOwnPropertySymbols,Yu=Object.prototype.hasOwnProperty,zu=Object.prototype.propertyIsEnumerable,Or=(n,e,t)=>e in n?ku(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nr=(n,e)=>{for(var t in e||(e={}))Yu.call(e,t)&&Or(n,t,e[t]);if(Tr)for(var t of Tr(e))zu.call(e,t)&&Or(n,t,e[t]);return n},Ir=(n,e)=>Bu(n,Ku(e));const Wu=[1,3,4,5,6],Qu=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=gs({experienceRegion:i,usApproach:o}),c=Xe[a];return!c&&o===De.ALL&&(a=tt,c=Xe[a]),!c||a===tt&&o===De.STATE||s.forEach(d=>{var u;const{notice_key:_,gpp_field_mapping:E}=d,N=(u=E?.find(g=>g.region===a))==null?void 0:u.mechanism;if(N){const g=N.some(f=>{const C=n.getFieldValue(c.name,f.field),m=Array.isArray(C)?C.join(""):String(C);return m===f.opt_out?!0:(f.not_opt_out,!1)});g!==void 0&&(t[_]=!g)}}),t},Ju=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=TE,a=n.getSection(X.NAME);if(!a)return o;const c=a.PurposeConsents.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),d=a.PurposeLegitimateInterests.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),u=a.VendorConsents.map(E=>`gvl.${E}`),_=a.VendorLegitimateInterests.map(E=>`gvl.${E}`);return o.purposesConsent=c,o.purposesLegint=d.filter(E=>!Wu.includes(parseInt(E,10))),o.vendorsConsent=u,o.vendorsLegint=_,o.specialFeatures=a.SpecialFeatureOptins.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(E=>E.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(E=>E.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(E=>E.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(E=>E.toString()))||[]),o.customPurposesConsent=[],o},qu=({fidesString:n,cmpApi:e})=>{const{gpp:t}=FE(n);if(!n||!t||!e)return;const{options:s,cookie:i,geolocation:r,locale:o,config:a}=window.Fides,c=window.Fides.experience;if(!c||!c.experience_config||!c.privacy_notices)return;const d=c.experience_config.component===pt.TCF_OVERLAY,u=sE(r),_=c.experience_config.translations.find(C=>ki(C.language,o));if(!_)return;e.setGppString(t),e.setSignalStatus(be.READY);const E=c.privacy_notices.map(C=>({notice:C,bestTranslation:C.translations.find(m=>ki(m.language,o))||null}));let N,g,f;if(d){const C=Ju({cmpApi:e,experience:c});f=ju(E.map(({notice:m,bestTranslation:P})=>Ir(Nr({},m),{bestTranslation:P})),C.customPurposesConsent),g=c.minimal_tcf?$u({experience:c,enabledIds:C}):Fu({experience:c,enabledIds:C}),N=m=>xu(m,g,C,c)}else{const C=Qu({cmpApi:e,experience:c}),m=Object.entries(C).filter(([P,ne])=>ne).map(([P])=>P);f=rE(E,m),N=P=>Promise.resolve(Ir(Nr({},P),{consent:C}))}lu({consentPreferencesToSave:f,privacyExperienceConfigHistoryId:_.privacy_experience_config_history_id,experience:c,consentMethod:ht.SCRIPT,options:s,userLocationString:u||void 0,cookie:i,propertyId:a?.propertyId,tcf:g,updateCookie:N})},Ar="__gppLocator",Cr=n=>{if(!window.frames[n])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=n,window.document.body.appendChild(e)}else setTimeout(()=>Cr(n),5)},Xu=n=>{let e=window,t;for(;e;){try{if(e.frames[n]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},Zu=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,eS=()=>{const n=[],e=[];let t;const s=(r,o,a,c)=>{if(r==="queue")return n;if(r==="events")return e;const d={gppVersion:"1.1",cmpStatus:it.STUB,cmpDisplayStatus:Ye.HIDDEN,signalStatus:be.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(d,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const u=t;e.push({id:u,callback:o,parameter:a}),o({eventName:"listenerRegistered",listenerId:u,data:!0,pingData:d},!0)}else if(r==="removeEventListener"){let u=!1;for(let _=0;_<e.length;_++)if(e[_].id===a){e.splice(_,1),u=!0;break}o({eventName:"listenerRemoved",listenerId:a,data:u,pingData:d},!0)}else r==="hasSection"?o(!1,!0):r==="getSection"||r==="getField"?o(null,!0):n.push([].slice.apply([r,o,a,c]));return null},i=r=>{const o=typeof r.data=="string";let a={};if(o)try{a=JSON.parse(r.data)}catch{a={}}else a=r.data;if(!Zu(a))return null;if(a.__gppCall&&window.__gpp){const c=a.__gppCall;window.__gpp(c.command,(d,u)=>{const _={__gppReturn:{returnValue:d,success:u,callId:c.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(_):_,"*")},"parameter"in c?c.parameter:void 0,"version"in c?c.version:"1.1")}return null};Xu(Ar)||(Cr(Ar),window.__gpp=s,window.addEventListener("message",i,!1))},fr=(n,e,t)=>n?e?!0:!!(t&&Object.entries(n).some(([s,i])=>s in t.map(r=>r.notice_key)&&i!==void 0)):!1,mr=(n,e)=>{if(!lt(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!(t!=null&&t.enable_tcfeu_string))return!1;const s=fu(n);return s?(e.setFieldValueBySectionId(X.ID,"CmpId",ps),e.setSectionStringById(X.ID,s),!0):!1},tS=()=>{const n=[];if(lt(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${X.ID}:${X.NAME}`),(e.us_approach===De.NATIONAL||e.us_approach===De.ALL)&&n.push(`${re.ID}:${re.NAME}`),(e.us_approach===De.STATE||e.us_approach===De.ALL)&&Object.values(Xe).forEach(t=>{t.id!==re.ID&&n.push(`${t.id}:${t.name}`)}))}return n},nS=()=>{eS();const n=new Md(ps,$E);n.setCmpStatus(it.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=tS();if(n.setSupportedAPIs(o),!lt(s))return;const{fidesString:a}=r;if(a&&qu({fidesString:a,cmpApi:n}),!a&&(!iE(s,e.detail,i,r)||!r.tcfEnabled&&Ri(s.privacy_notices)&&!fr(i,e.detail.fides_string,s.privacy_notices))){const c=mr(e,n);c&&n.setApplicableSections([X.ID]);const d=_r({cmpApi:n,experience:s}),u=gr({cmpApi:n,cookie:e.detail,experience:s});u.length&&n.setApplicableSections(u.map(E=>E.id)),!c&&!d.length&&!u.length&&n.setApplicableSections([-1]),n.setSignalStatus(be.READY);const _=Hi(n);window.Fides.fides_string=_}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",c=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(lt(t)){!i.tcfEnabled&&Ri(t.privacy_notices)&&!fr(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(be.READY):n.setSignalStatus(be.NOT_READY),n.setCmpDisplayStatus(Ye.VISIBLE);const r=_r({cmpApi:n,experience:t});r.length&&(n.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{n.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(n.setCmpDisplayStatus(Ye.HIDDEN),n.setSignalStatus(be.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(Ye.HIDDEN),mr(e,n)&&(n.setApplicableSections([X.ID]),n.fireSectionChange("tcfeuv2")),lt(window.Fides.experience)){const t=gr({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});t.length&&(n.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{n.fireSectionChange(i.name)}));const s=Hi(n);window.Fides.cookie&&(window.Fides.fides_string=s,window.Fides.cookie.fides_string=s,xi(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(be.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&nS()});
1
+ 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()});