@c15t/react 3.0.0 → 3.1.0-canary.0

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.
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{createElement as i}from"react";import o from"@c15t/ui/styles/components/iab-consent-dialog";import{useTheme as n}from"../../../hooks/use-theme.js";import{useUIConfig as t}from"../../../ui-config-context.js";import{mergeSlotProps as d}from"../../../utils/merge-slot-props.js";import{useIABTranslations as s}from"../use-iab-translations.js";import*as c from"../../shared/ui/switch/index.js";let a=function(e,r,i){if(null!==i)return[];let o=r.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(o))},l=({providers:a,consents:l,onToggle:v})=>{let{components:m}=t(),{noStyle:h}=n(),p=s();if(0===a.length)return null;let{vendorList:f}=p.preferenceCenter,u=d(m?.["iab-vendor-list"]?.row,{baseClassName:o.vendorListItem,noStyle:h}),N=d(m?.["iab-vendor-list"]?.rowHeader,{baseClassName:o.vendorListItemHeader,noStyle:h});return r("div",{className:h?void 0:o.vendorSection,children:[r("div",{className:h?void 0:o.customVendorSectionHeader,children:[r("h3",{className:h?void 0:o.vendorSectionHeading,children:[r("svg",{className:h?void 0:o.vendorSectionIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[e("circle",{cx:"18",cy:"5",r:"3"}),e("circle",{cx:"6",cy:"12",r:"3"}),e("circle",{cx:"18",cy:"19",r:"3"}),e("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),e("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})]}),f.adTechProvidersHeading," (",a.length,")"]}),e("p",{className:h?void 0:o.customVendorNotice,children:f.adTechProvidersNotice})]}),e("div",{children:a.map(n=>{let t=String(n.id);return i("div",{...u,key:t,id:`ad-tech-provider-${t}`},r("div",{...N,children:[r("div",{className:h?void 0:o.vendorListInfo,children:[e("h3",{className:h?void 0:o.vendorListName,children:n.name}),e("div",{className:h?void 0:o.vendorListMeta,children:r("a",{href:n.policyUrl,target:"_blank",rel:"noopener noreferrer",className:h?void 0:o.vendorLink,children:[r("svg",{className:h?void 0:o.vendorLinkIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[e("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e("polyline",{points:"15 3 21 3 21 9"}),e("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),f.privacyPolicy]})})]}),e("div",{className:h?void 0:o.vendorConsentControl,children:e(c.Root,{"aria-label":`Consent for ${n.name}`,className:h?void 0:o.vendorConsentSwitch,checked:l[t]??!1,onCheckedChange:e=>v?.(n.id,e)})})]}))})})]})};export{l as AdTechProviderSection,a as filterAdTechProviders};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{Fragment as e,jsx as t,jsxs as r}from"react/jsx-runtime";import{iabDisplayTestId as n}from"@c15t/iab/headless";import i from"@c15t/ui/styles/components/iab-consent-dialog";import{useState as o}from"react";import{useTheme as s}from"../../../hooks/use-theme.js";import{useUIConfig as l}from"../../../ui-config-context.js";import{mergeSlotProps as a}from"../../../utils/merge-slot-props.js";import{useIABTranslations as c}from"../use-iab-translations.js";import*as d from"../../shared/ui/preference-item/index.js";import*as p from"../../shared/ui/switch/index.js";let m={},h={},g=({vendor:e,isConsented:n,onToggle:o,onClick:s,isLegitimateInterest:l=!1,isLegitimateInterestAllowed:a=!0,onLegitimateInterestToggle:d})=>{let m=c(),h=l&&d;return r("div",{className:`${i.vendorRow} ${l?i.vendorRowLi:""}`,children:[r("div",{className:i.vendorInfo,children:[r("button",{type:"button",onClick:s,className:i.vendorName,children:[t("span",{children:e.name}),e.isCustom&&r("svg",{className:i.customVendorIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-label":m.common.customPartner,children:[t("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),t("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})]}),r("div",{className:i.vendorDetails,children:[l&&t("span",{className:`${i.vendorDetail} ${i.vendorDetailLi}`,children:m.preferenceCenter.purposeItem.legitimateInterest}),e.usesCookies&&t("span",{className:i.vendorDetail,children:m.preferenceCenter.vendorList.usesCookies}),e.usesNonCookieAccess&&t("span",{className:i.vendorDetail,children:m.preferenceCenter.vendorList.nonCookieAccess})]})]}),h?t("button",{type:"button",onClick:()=>d(!a),className:`${i.objectButton} ${a?"":i.objectButtonActive}`,"aria-pressed":!a,children:a?m.preferenceCenter.purposeItem.objectButton:m.preferenceCenter.purposeItem.objected}):t(p.Root,{"aria-label":e.name,checked:n,onCheckedChange:o,size:"small"})]})},u=({purpose:u,testId:v,isEnabled:C,onToggle:f,vendorConsents:I,onVendorToggle:N,onVendorClick:k,isLocked:y=!1,vendorLegitimateInterests:b=m,onVendorLegitimateInterestToggle:x,purposeLegitimateInterests:S=h,onPurposeLegitimateInterestToggle:M})=>{let{components:L}=l(),{noStyle:w}=s(),[B,T]=o(!1),[j,W]=o(!1),[$,A]=o(!1),R=c(),D=u.vendors.filter(e=>e.usesLegitimateInterest),O=u.vendors.filter(e=>!e.usesLegitimateInterest),P=e=>I[String(e)]??!1,H=e=>b[String(e)]??!0,U=S[u.id]??!0,V=O.filter(e=>!e.isCustom),z=O.filter(e=>e.isCustom),K=D.filter(e=>!e.isCustom),E=D.filter(e=>e.isCustom),Y=!1!==u.hasConsentBasis||!M,q=a(L?.["iab-purpose-item"]?.header,{baseClassName:i.purposeHeader,noStyle:w}),F=a(L?.["iab-purpose-item"]?.legitimateInterest,{baseClassName:i.purposeLiSection,noStyle:w}),G=a(L?.["iab-purpose-item"]?.examples,{noStyle:w}),J=a(L?.["iab-purpose-item"]?.vendors,{noStyle:w});return r(d.Root,{className:w?void 0:i.purposeItem,"data-testid":v??n("purpose",u.id),noStyle:!0,onOpenChange:T,open:B,slotKey:"iab-purpose-item.root",children:[r("div",{...q,children:[r(d.Trigger,{className:w?void 0:i.purposeTrigger,noStyle:!0,slotKey:"iab-purpose-item.trigger",children:[t(d.Leading,{noStyle:!0,children:t("svg",{className:i.purposeArrow,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:B?t("path",{d:"M19 9l-7 7-7-7"}):t("path",{d:"M9 5l7 7-7 7"})})}),r(d.Header,{className:i.purposeInfo,noStyle:!0,children:[r(d.Title,{className:i.purposeName,noStyle:!0,children:[u.name,y&&r("svg",{className:i.lockIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),t("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})]}),t(d.Meta,{className:i.purposeMeta,noStyle:!0,children:R.preferenceCenter.purposeItem.partners.replace("{count}",String(u.vendors.length))}),D.length>0&&r(d.Auxiliary,{className:i.legitimateInterestBadge,noStyle:!0,children:[t("svg",{className:i.legitimateInterestIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:t("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),R.preferenceCenter.purposeItem.vendorsUseLegitimateInterest.replace("{count}",String(D.length))]})]})]}),Y&&t(d.Control,{noStyle:!0,children:t(p.Root,{"aria-label":u.name,checked:C,onCheckedChange:e=>{for(let t of(f(e),O))N(t.id,e)},disabled:y})})]}),r(d.Content,{innerClassName:w?void 0:i.purposeContent,innerSlotKey:"iab-purpose-item.content",noStyle:w,children:[t("p",{className:i.purposeDescription,children:u.description}),D.length>0&&M&&r("div",{...F,children:[r("div",{className:i.purposeLiSectionHeader,children:[r("div",{className:i.purposeLiInfo,children:[t("svg",{className:i.legitimateInterestIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:t("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),t("span",{children:R.preferenceCenter.purposeItem.vendorsUseLegitimateInterest.replace("{count}",String(D.length))})]}),t("button",{type:"button",onClick:()=>{let e=!U;if(M&&M(u.id,e),x)for(let t of D)x(t.id,e)},className:`${i.objectButton} ${U?"":i.objectButtonActive}`,"aria-pressed":!U,children:U?R.preferenceCenter.purposeItem.objectButton:R.preferenceCenter.purposeItem.objected})]}),t("p",{className:i.liExplanation,children:R.preferenceCenter.purposeItem.rightToObject})]}),D.length>0&&!M&&r("div",{className:i.legitimateInterestBadge,children:[t("svg",{className:i.legitimateInterestIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:t("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),R.preferenceCenter.purposeItem.vendorsUseLegitimateInterest.replace("{count}",String(D.length))]}),u.illustrations&&u.illustrations.length>0&&t("div",{...G,children:r(d.Root,{noStyle:!0,onOpenChange:W,open:j,children:[r(d.Trigger,{className:i.examplesToggle,noStyle:!0,children:[t("svg",{style:{height:"0.75rem",width:"0.75rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:j?t("path",{d:"M19 9l-7 7-7-7"}):t("path",{d:"M9 5l7 7-7 7"})}),R.preferenceCenter.purposeItem.examples," (",u.illustrations.length,")"]}),t(d.Content,{noStyle:w,children:t("ul",{className:i.examplesList,children:u.illustrations.map((e,r)=>t("li",{children:e},r))})})]})}),t("div",{...J,children:r(d.Root,{noStyle:!0,onOpenChange:A,open:$,children:[r(d.Trigger,{className:i.vendorsToggle,noStyle:!0,children:[t("svg",{style:{height:"0.75rem",width:"0.75rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:$?t("path",{d:"M19 9l-7 7-7-7"}):t("path",{d:"M9 5l7 7-7 7"})}),R.preferenceCenter.purposeItem.partnersUsingPurpose," (",u.vendors.length,")"]}),r(d.Content,{innerClassName:i.vendorSection,noStyle:w,children:[V.length>0&&r(e,{children:[r("h5",{className:i.vendorSectionTitle,children:[R.preferenceCenter.purposeItem.withYourPermission," (",V.length,")"]}),V.map(e=>t(g,{vendor:e,isConsented:P(e.id),onToggle:t=>N(e.id,t),onClick:()=>k(e.id)},e.id))]}),K.length>0&&r(e,{children:[r("h5",{className:`${i.vendorSectionTitle} ${i.vendorSectionTitleLi}`,children:[t("svg",{className:i.legitimateInterestIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:t("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),R.preferenceCenter.purposeItem.legitimateInterest," (",K.length,")"]}),t("p",{className:i.liExplanation,children:R.preferenceCenter.purposeItem.rightToObject}),K.map(e=>t(g,{vendor:e,isConsented:P(e.id),onToggle:t=>N(e.id,t),onClick:()=>k(e.id),isLegitimateInterest:!0,isLegitimateInterestAllowed:H(e.id),onLegitimateInterestToggle:x?t=>x(e.id,t):void 0},e.id))]}),(z.length>0||E.length>0)&&r("div",{className:i.customVendorPurposeSection,children:[r("h5",{className:i.vendorSectionTitleCustom,children:[r("svg",{className:i.legitimateInterestIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),t("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),R.preferenceCenter.vendorList.customVendorsHeading," (",z.length+E.length,")"]}),z.map(e=>t(g,{vendor:e,isConsented:P(e.id),onToggle:t=>N(e.id,t),onClick:()=>k(e.id)},e.id)),E.map(e=>t(g,{vendor:e,isConsented:P(e.id),onToggle:t=>N(e.id,t),onClick:()=>k(e.id),isLegitimateInterest:!0,isLegitimateInterestAllowed:H(e.id),onLegitimateInterestToggle:x?t=>x(e.id,t):void 0},e.id))]})]})]})})]})]})};export{u as PurposeItem};
2
+ import{Fragment as e,jsx as t,jsxs as r}from"react/jsx-runtime";import{countIABPartners as n,iabDisplayTestId as i}from"@c15t/iab/headless";import o from"@c15t/ui/styles/components/iab-consent-dialog";import{useState as s}from"react";import{useTheme as l}from"../../../hooks/use-theme.js";import{useUIConfig as a}from"../../../ui-config-context.js";import{mergeSlotProps as c}from"../../../utils/merge-slot-props.js";import{useIABTranslations as d}from"../use-iab-translations.js";import*as p from"../../shared/ui/preference-item/index.js";import*as m from"../../shared/ui/switch/index.js";let h={},g={},u=({vendor:e,isConsented:n,onToggle:i,onClick:s,isLegitimateInterest:l=!1,isLegitimateInterestAllowed:a=!0,onLegitimateInterestToggle:c})=>{let p=d(),h=l&&c;return r("div",{className:`${o.vendorRow} ${l?o.vendorRowLi:""}`,children:[r("div",{className:o.vendorInfo,children:[r("button",{type:"button",onClick:s,className:o.vendorName,children:[t("span",{children:e.name}),e.isCustom&&r("svg",{className:o.customVendorIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-label":p.common.customPartner,children:[t("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),t("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})]}),r("div",{className:o.vendorDetails,children:[l&&t("span",{className:`${o.vendorDetail} ${o.vendorDetailLi}`,children:p.preferenceCenter.purposeItem.legitimateInterest}),e.usesCookies&&t("span",{className:o.vendorDetail,children:p.preferenceCenter.vendorList.usesCookies}),e.usesNonCookieAccess&&t("span",{className:o.vendorDetail,children:p.preferenceCenter.vendorList.nonCookieAccess})]})]}),h?t("button",{type:"button",onClick:()=>c(!a),className:`${o.objectButton} ${a?"":o.objectButtonActive}`,"aria-pressed":!a,children:a?p.preferenceCenter.purposeItem.objectButton:p.preferenceCenter.purposeItem.objected}):t(m.Root,{"aria-label":e.name,checked:n,onCheckedChange:i,size:"small"})]})},v=({purpose:v,testId:C,isEnabled:f,onToggle:I,vendorConsents:N,onVendorToggle:k,onVendorClick:y,isLocked:b=!1,vendorLegitimateInterests:S=h,onVendorLegitimateInterestToggle:x,purposeLegitimateInterests:L=g,onPurposeLegitimateInterestToggle:M})=>{let{components:T}=a(),{noStyle:w}=l(),[B,j]=s(!1),[W,$]=s(!1),[A,R]=s(!1),P=d(),D=v.vendors.filter(e=>e.usesLegitimateInterest),H=v.vendors.filter(e=>!e.usesLegitimateInterest),O=e=>N[String(e)]??!1,U=e=>S[String(e)]??!0,V=L[v.id]??!0,z=v.adTechProviders??[],K=n([v]),E=H.filter(e=>!e.isCustom),Y=H.filter(e=>e.isCustom),_=D.filter(e=>!e.isCustom),q=D.filter(e=>e.isCustom),F=!1!==v.hasConsentBasis||!M,G=c(T?.["iab-purpose-item"]?.header,{baseClassName:o.purposeHeader,noStyle:w}),J=c(T?.["iab-purpose-item"]?.legitimateInterest,{baseClassName:o.purposeLiSection,noStyle:w}),Q=c(T?.["iab-purpose-item"]?.examples,{noStyle:w}),X=c(T?.["iab-purpose-item"]?.vendors,{noStyle:w});return r(p.Root,{className:w?void 0:o.purposeItem,"data-testid":C??i("purpose",v.id),noStyle:!0,onOpenChange:j,open:B,slotKey:"iab-purpose-item.root",children:[r("div",{...G,children:[r(p.Trigger,{className:w?void 0:o.purposeTrigger,noStyle:!0,slotKey:"iab-purpose-item.trigger",children:[t(p.Leading,{noStyle:!0,children:t("svg",{className:o.purposeArrow,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:B?t("path",{d:"M19 9l-7 7-7-7"}):t("path",{d:"M9 5l7 7-7 7"})})}),r(p.Header,{className:o.purposeInfo,noStyle:!0,children:[r(p.Title,{className:o.purposeName,noStyle:!0,children:[v.name,b&&r("svg",{className:o.lockIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),t("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})]}),t(p.Meta,{className:o.purposeMeta,noStyle:!0,children:P.preferenceCenter.purposeItem.partners.replace("{count}",String(K))}),D.length>0&&r(p.Auxiliary,{className:o.legitimateInterestBadge,noStyle:!0,children:[t("svg",{className:o.legitimateInterestIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:t("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),P.preferenceCenter.purposeItem.vendorsUseLegitimateInterest.replace("{count}",String(D.length))]})]})]}),F&&t(p.Control,{noStyle:!0,children:t(m.Root,{"aria-label":v.name,checked:f,onCheckedChange:e=>{for(let t of(I(e),H))k(t.id,e)},disabled:b})})]}),r(p.Content,{innerClassName:w?void 0:o.purposeContent,innerSlotKey:"iab-purpose-item.content",noStyle:w,children:[t("p",{className:o.purposeDescription,children:v.description}),D.length>0&&M&&r("div",{...J,children:[r("div",{className:o.purposeLiSectionHeader,children:[r("div",{className:o.purposeLiInfo,children:[t("svg",{className:o.legitimateInterestIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:t("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),t("span",{children:P.preferenceCenter.purposeItem.vendorsUseLegitimateInterest.replace("{count}",String(D.length))})]}),t("button",{type:"button",onClick:()=>{let e=!V;if(M&&M(v.id,e),x)for(let t of D)x(t.id,e)},className:`${o.objectButton} ${V?"":o.objectButtonActive}`,"aria-pressed":!V,children:V?P.preferenceCenter.purposeItem.objectButton:P.preferenceCenter.purposeItem.objected})]}),t("p",{className:o.liExplanation,children:P.preferenceCenter.purposeItem.rightToObject})]}),D.length>0&&!M&&r("div",{className:o.legitimateInterestBadge,children:[t("svg",{className:o.legitimateInterestIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:t("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),P.preferenceCenter.purposeItem.vendorsUseLegitimateInterest.replace("{count}",String(D.length))]}),v.illustrations&&v.illustrations.length>0&&t("div",{...Q,children:r(p.Root,{noStyle:!0,onOpenChange:$,open:W,children:[r(p.Trigger,{className:o.examplesToggle,noStyle:!0,children:[t("svg",{style:{height:"0.75rem",width:"0.75rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:W?t("path",{d:"M19 9l-7 7-7-7"}):t("path",{d:"M9 5l7 7-7 7"})}),P.preferenceCenter.purposeItem.examples," (",v.illustrations.length,")"]}),t(p.Content,{noStyle:w,children:t("ul",{className:o.examplesList,children:v.illustrations.map((e,r)=>t("li",{children:e},r))})})]})}),t("div",{...X,children:r(p.Root,{noStyle:!0,onOpenChange:R,open:A,children:[r(p.Trigger,{className:o.vendorsToggle,noStyle:!0,children:[t("svg",{style:{height:"0.75rem",width:"0.75rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:A?t("path",{d:"M19 9l-7 7-7-7"}):t("path",{d:"M9 5l7 7-7 7"})}),P.preferenceCenter.purposeItem.partnersUsingPurpose," (",K,")"]}),r(p.Content,{innerClassName:o.vendorSection,noStyle:w,children:[E.length>0&&r(e,{children:[r("h5",{className:o.vendorSectionTitle,children:[P.preferenceCenter.purposeItem.withYourPermission," (",E.length,")"]}),E.map(e=>t(u,{vendor:e,isConsented:O(e.id),onToggle:t=>k(e.id,t),onClick:()=>y(e.id)},e.id))]}),_.length>0&&r(e,{children:[r("h5",{className:`${o.vendorSectionTitle} ${o.vendorSectionTitleLi}`,children:[t("svg",{className:o.legitimateInterestIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:t("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),P.preferenceCenter.purposeItem.legitimateInterest," (",_.length,")"]}),t("p",{className:o.liExplanation,children:P.preferenceCenter.purposeItem.rightToObject}),_.map(e=>t(u,{vendor:e,isConsented:O(e.id),onToggle:t=>k(e.id,t),onClick:()=>y(e.id),isLegitimateInterest:!0,isLegitimateInterestAllowed:U(e.id),onLegitimateInterestToggle:x?t=>x(e.id,t):void 0},e.id))]}),(Y.length>0||q.length>0)&&r("div",{className:o.customVendorPurposeSection,children:[r("h5",{className:o.vendorSectionTitleCustom,children:[r("svg",{className:o.legitimateInterestIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),t("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),P.preferenceCenter.vendorList.customVendorsHeading," (",Y.length+q.length,")"]}),Y.map(e=>t(u,{vendor:e,isConsented:O(e.id),onToggle:t=>k(e.id,t),onClick:()=>y(e.id)},e.id)),q.map(e=>t(u,{vendor:e,isConsented:O(e.id),onToggle:t=>k(e.id,t),onClick:()=>y(e.id),isLegitimateInterest:!0,isLegitimateInterestAllowed:U(e.id),onLegitimateInterestToggle:x?t=>x(e.id,t):void 0},e.id))]}),z.length>0&&r(e,{children:[r("h5",{className:w?void 0:o.vendorSectionTitle,children:[P.preferenceCenter.vendorList.adTechProvidersHeading," (",z.length,")"]}),z.map(e=>t("div",{className:w?void 0:o.vendorRow,children:t("div",{className:w?void 0:o.vendorInfo,children:t("a",{href:e.policyUrl,target:"_blank",rel:"noopener noreferrer",className:w?void 0:o.vendorName,children:e.name})})},e.id))]})]})]})})]})]})};export{v as PurposeItem};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{Fragment as e,jsx as t,jsxs as r}from"react/jsx-runtime";import s from"@c15t/ui/styles/components/iab-consent-dialog";import{useState as o}from"react";import{useTheme as i}from"../../../hooks/use-theme.js";import{useUIConfig as a}from"../../../ui-config-context.js";import{mergeSlotProps as n}from"../../../utils/merge-slot-props.js";import{useIABTranslations as l}from"../use-iab-translations.js";import{PurposeItem as c}from"./purpose-item.js";import*as d from"../../shared/ui/preference-item/index.js";import*as m from"../../shared/ui/switch/index.js";let p={},h={},g=({stack:g,consents:f,onToggle:k,vendorConsents:u,onVendorToggle:v,onVendorClick:C,vendorLegitimateInterests:y=p,onVendorLegitimateInterestToggle:N,purposeLegitimateInterests:b=h,onPurposeLegitimateInterestToggle:S})=>{let{components:I}=a(),{noStyle:j}=i(),L=l(),[T,x]=o(!1),M=g.purposes.filter(e=>!1!==e.hasConsentBasis||void 0===S),w=M.every(e=>f[e.id]??!1),P=M.some(e=>f[e.id]??!1)&&!w,V=n(I?.["iab-stack-item"]?.header,{baseClassName:s.stackHeader,noStyle:j}),B=new Set(g.purposes.flatMap(e=>e.vendors.map(e=>e.id))).size;return r(d.Root,{className:j?void 0:s.stackItem,"data-testid":`stack-item-${g.id}`,noStyle:!0,onOpenChange:x,open:T,slotKey:"iab-stack-item.root",children:[r("div",{...V,children:[r(d.Trigger,{className:j?void 0:s.stackTrigger,noStyle:!0,slotKey:"iab-stack-item.trigger",children:[t(d.Leading,{noStyle:!0,children:t("svg",{className:s.purposeArrow,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:T?t("path",{d:"M19 9l-7 7-7-7"}):t("path",{d:"M9 5l7 7-7 7"})})}),r(d.Header,{className:s.stackInfo,noStyle:!0,children:[t(d.Title,{className:s.stackName,noStyle:!0,children:g.name}),r(d.Meta,{className:s.stackMeta,noStyle:!0,children:[B," ",1===B?L.preferenceCenter.vendorList.partnerSingular:L.preferenceCenter.vendorList.partnerPlural]})]})]}),r(d.Control,{className:s.stackControls,noStyle:!0,children:[P&&r(e,{children:[t("span",{className:s.srOnly,children:"Partially enabled"}),t("div",{className:s.partialIndicator})]}),M.length>0&&t(m.Root,{"aria-label":g.name,checked:w,onCheckedChange:e=>{for(let t of M)for(let r of(k(t.id,e),t.vendors))r.usesLegitimateInterest||v(r.id,e)}})]})]}),r(d.Content,{noStyle:j,children:[t("div",{className:s.stackDescription,children:t("p",{children:g.description})}),t("div",{...n(I?.["iab-stack-item"]?.content,{baseClassName:s.stackContent,noStyle:j}),children:g.purposes.map(e=>t(c,{purpose:e,isEnabled:f[e.id]??!1,onToggle:t=>k(e.id,t),vendorConsents:u,onVendorToggle:v,onVendorClick:C,vendorLegitimateInterests:y,onVendorLegitimateInterestToggle:N,purposeLegitimateInterests:b,onPurposeLegitimateInterestToggle:S},e.id))})]})]})};export{g as StackItem};
2
+ import{Fragment as e,jsx as t,jsxs as r}from"react/jsx-runtime";import{countIABPartners as s}from"@c15t/iab/headless";import o from"@c15t/ui/styles/components/iab-consent-dialog";import{useState as i}from"react";import{useTheme as a}from"../../../hooks/use-theme.js";import{useUIConfig as n}from"../../../ui-config-context.js";import{mergeSlotProps as l}from"../../../utils/merge-slot-props.js";import{useIABTranslations as c}from"../use-iab-translations.js";import{PurposeItem as d}from"./purpose-item.js";import*as m from"../../shared/ui/preference-item/index.js";import*as p from"../../shared/ui/switch/index.js";let h={},g={},f=({stack:f,consents:k,onToggle:u,vendorConsents:v,onVendorToggle:C,onVendorClick:y,vendorLegitimateInterests:N=h,onVendorLegitimateInterestToggle:b,purposeLegitimateInterests:S=g,onPurposeLegitimateInterestToggle:I})=>{let{components:j}=n(),{noStyle:L}=a(),T=c(),[x,M]=i(!1),w=f.purposes.filter(e=>!1!==e.hasConsentBasis||void 0===I),P=w.every(e=>k[e.id]??!1),V=w.some(e=>k[e.id]??!1)&&!P,B=l(j?.["iab-stack-item"]?.header,{baseClassName:o.stackHeader,noStyle:L}),H=s(f.purposes);return r(m.Root,{className:L?void 0:o.stackItem,"data-testid":`stack-item-${f.id}`,noStyle:!0,onOpenChange:M,open:x,slotKey:"iab-stack-item.root",children:[r("div",{...B,children:[r(m.Trigger,{className:L?void 0:o.stackTrigger,noStyle:!0,slotKey:"iab-stack-item.trigger",children:[t(m.Leading,{noStyle:!0,children:t("svg",{className:o.purposeArrow,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x?t("path",{d:"M19 9l-7 7-7-7"}):t("path",{d:"M9 5l7 7-7 7"})})}),r(m.Header,{className:o.stackInfo,noStyle:!0,children:[t(m.Title,{className:o.stackName,noStyle:!0,children:f.name}),r(m.Meta,{className:o.stackMeta,noStyle:!0,children:[H," ",1===H?T.preferenceCenter.vendorList.partnerSingular:T.preferenceCenter.vendorList.partnerPlural]})]})]}),r(m.Control,{className:o.stackControls,noStyle:!0,children:[V&&r(e,{children:[t("span",{className:o.srOnly,children:"Partially enabled"}),t("div",{className:o.partialIndicator})]}),w.length>0&&t(p.Root,{"aria-label":f.name,checked:P,onCheckedChange:e=>{for(let t of w)for(let r of(u(t.id,e),t.vendors))r.usesLegitimateInterest||C(r.id,e)}})]})]}),r(m.Content,{noStyle:L,children:[t("div",{className:o.stackDescription,children:t("p",{children:f.description})}),t("div",{...l(j?.["iab-stack-item"]?.content,{baseClassName:o.stackContent,noStyle:L}),children:f.purposes.map(e=>t(d,{purpose:e,isEnabled:k[e.id]??!1,onToggle:t=>u(e.id,t),vendorConsents:v,onVendorToggle:C,onVendorClick:y,vendorLegitimateInterests:N,onVendorLegitimateInterestToggle:b,purposeLegitimateInterests:S,onPurposeLegitimateInterestToggle:I},e.id))})]})]})};export{f as StackItem};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{resolveIABVendorUrls as n}from"@c15t/iab/headless";import t from"@c15t/ui/styles/components/iab-consent-dialog";import{useEffect as s,useState as i}from"react";import{useTranslations as o}from"../../../hooks.js";import{useTheme as a}from"../../../hooks/use-theme.js";import{useUIConfig as l}from"../../../ui-config-context.js";import{mergeSlotProps as d}from"../../../utils/merge-slot-props.js";import{useIABTranslations as c}from"../use-iab-translations.js";import*as m from"../../shared/ui/preference-item/index.js";import*as p from"../../shared/ui/switch/index.js";let h=[],u={},v=({vendorData:v,purposes:g,vendorConsents:f,onVendorToggle:N,selectedVendorId:C,onClearSelection:k,customVendors:L=h,vendorLegitimateInterests:S=u,onVendorLegitimateInterestToggle:x})=>{let{components:y}=l(),{noStyle:I}=a(),[P,b]=i(""),[M,w]=i(new Set),R=c(),B=o()?.language,V=[...v?Object.entries(v.vendors).map(([e,r])=>({cookieMaxAgeSeconds:r.cookieMaxAgeSeconds,cookieRefresh:r.cookieRefresh,dataDeclaration:r.dataDeclaration||[],dataRetention:r.dataRetention,deviceStorageDisclosureUrl:r.deviceStorageDisclosureUrl??null,features:r.features||[],id:Number(e),isCustom:!1,legIntPurposes:r.legIntPurposes||[],...n(r,B),name:r.name,purposes:r.purposes||[],specialFeatures:r.specialFeatures||[],specialPurposes:r.specialPurposes||[],usesCookies:r.usesCookies,usesNonCookieAccess:r.usesNonCookieAccess})):[],...L.map(e=>({cookieMaxAgeSeconds:e.cookieMaxAgeSeconds??null,cookieRefresh:void 0,dataDeclaration:e.dataCategories||[],dataRetention:void 0,deviceStorageDisclosureUrl:null,features:e.features||[],id:e.id,isCustom:!0,legIntPurposes:e.legIntPurposes||[],legitimateInterestUrl:null,name:e.name,policyUrl:e.privacyPolicyUrl,purposes:e.purposes||[],specialFeatures:e.specialFeatures||[],specialPurposes:[],usesCookies:e.usesCookies??!1,usesNonCookieAccess:e.usesNonCookieAccess??!1}))].sort((e,r)=>e.name.localeCompare(r.name));s(()=>{if(null!==C){let e=requestAnimationFrame(()=>{w(e=>new Set(e).add(C))}),r=setTimeout(()=>{let e=document.getElementById(`vendor-${String(C)}`);e&&e.scrollIntoView({behavior:"smooth",block:"start"})},100);return()=>{cancelAnimationFrame(e),clearTimeout(r)}}},[C]);let A=null===C?V.filter(e=>e.name.toLowerCase().includes(P.toLowerCase())):V.filter(e=>String(e.id)===String(C)),T=A.filter(e=>!e.isCustom),j=A.filter(e=>e.isCustom),D=d(y?.["iab-vendor-list"]?.root,{noStyle:I}),$=d(y?.["iab-vendor-list"]?.header,{baseClassName:t.vendorListHeader,noStyle:I}),H=d(y?.["iab-vendor-list"]?.search,{baseClassName:t.searchContainer,noStyle:I}),W=d(y?.["iab-vendor-list"]?.selectedVendor,{baseClassName:t.selectedVendorBanner,noStyle:I}),U=function(n){var s,i,o,a;let l,c,h,u,C=String(n.id),k=(s=n.id,(l=V.find(e=>String(e.id)===String(s)))?g.filter(e=>e.vendors.some(e=>String(e.id)===String(s))).map(e=>({...e,usesLegitimateInterest:l.legIntPurposes.includes(e.id)})):[]),L=(i=n.id,(c=V.find(e=>String(e.id)===String(i)))&&v?c.specialPurposes.map(e=>v.specialPurposes[e]).filter(e=>null!=e).map(e=>({description:e.description,id:e.id,name:e.name})):[]),P=(o=n.id,(h=V.find(e=>String(e.id)===String(o)))&&v?h.specialFeatures.map(e=>v.specialFeatures[e]).filter(e=>null!=e).map(e=>({description:e.description,id:e.id,name:e.name})):[]),b=(a=n.id,(u=V.find(e=>String(e.id)===String(a)))&&v?(u.features||[]).map(e=>v.features[e]).filter(e=>null!=e).map(e=>({description:e.description,id:e.id,name:e.name})):[]),B=M.has(n.id),A=k.filter(e=>e.usesLegitimateInterest).length,T=n.legIntPurposes.length>0,j=S[C]??!0,D=n.dataRetention?.stdRetention,$=null;n.cookieMaxAgeSeconds&&($=R.preferenceCenter.vendorList.maxAge.replace("{days}",String(Math.floor(n.cookieMaxAgeSeconds/86400))),n.cookieRefresh&&($=`${$} (refreshes)`));let H=d(y?.["iab-vendor-list"]?.rowHeader,{baseClassName:t.vendorListItemHeader,noStyle:I});return r(m.Root,{id:`vendor-${C}`,className:I?void 0:`${t.vendorListItem} ${n.isCustom?t.customVendorItem:""}`,noStyle:!0,onOpenChange:()=>{var e;return e=n.id,void w(r=>{let n=new Set(r);return n.has(e)?n.delete(e):n.add(e),n})},open:B,slotKey:"iab-vendor-list.row",children:[r("div",{...H,children:[r(m.Trigger,{className:t.vendorListTrigger,noStyle:!0,children:[r("div",{className:t.vendorListInfo,children:[r("h3",{className:t.vendorListName,children:[n.name,n.isCustom&&r("svg",{className:t.customVendorIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-label":R.common.customPartner,children:[e("circle",{cx:"12",cy:"12",r:"10"}),e("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),e("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})]}),r("div",{className:t.vendorListMeta,children:[r("span",{className:t.vendorListMetaText,children:[k.length," purpose",1===k.length?"":"s",L.length>0&&`, ${L.length} special`,P.length>0&&`, ${P.length} feature${1===P.length?"":"s"}`]}),A>0&&r("span",{className:t.vendorListLiBadge,children:[e("svg",{style:{height:"0.625rem",width:"0.625rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),A," ",R.preferenceCenter.vendorList.legitimateInterest]})]})]}),e("svg",{className:t.purposeArrow,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:B?e("path",{d:"M19 15l-7-7-7 7"}):e("path",{d:"M19 9l-7 7-7-7"})})]}),e("div",{className:t.vendorConsentControl,children:e(p.Root,{"aria-label":`Consent for ${n.name}`,className:t.vendorConsentSwitch,checked:f[C]??!1,onCheckedChange:e=>N(n.id,e)})})]}),r(m.Content,{innerClassName:I?void 0:t.vendorListContent,innerSlotKey:"iab-vendor-list.rowContent",noStyle:I,children:[r("div",{className:t.vendorLinks,children:[r("a",{href:n.policyUrl,target:"_blank",rel:"noopener noreferrer",className:t.vendorLink,children:[r("svg",{className:t.vendorLinkIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e("polyline",{points:"15 3 21 3 21 9"}),e("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),R.preferenceCenter.vendorList.privacyPolicy]}),n.legitimateInterestUrl&&r("a",{href:n.legitimateInterestUrl,target:"_blank",rel:"noopener noreferrer",className:t.vendorLink,children:[r("svg",{className:t.vendorLinkIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e("polyline",{points:"15 3 21 3 21 9"}),e("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),R.preferenceCenter.purposeItem.legitimateInterest]}),n.deviceStorageDisclosureUrl&&r("a",{href:n.deviceStorageDisclosureUrl,target:"_blank",rel:"noopener noreferrer",className:t.vendorLink,children:[r("svg",{className:t.vendorLinkIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e("polyline",{points:"15 3 21 3 21 9"}),e("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),R.preferenceCenter.vendorList.storageDisclosure]})]}),r("div",{className:t.vendorBadges,children:[n.usesCookies&&e("span",{className:t.vendorBadge,children:R.preferenceCenter.vendorList.usesCookies}),n.usesNonCookieAccess&&e("span",{className:t.vendorBadge,children:R.preferenceCenter.vendorList.nonCookieAccess}),$&&e("span",{className:t.vendorBadge,children:$}),D&&e("span",{className:t.vendorBadge,children:R.preferenceCenter.vendorList.retention.replace("{days}",String(D))})]}),k.length>0&&r("div",{className:t.vendorPurposesList,children:[r("h4",{className:t.vendorPurposesTitle,children:[R.preferenceCenter.vendorList.purposes," (",k.length,")"]}),e("ul",{className:t.vendorPurposesItems,children:k.map(s=>{let i;return n.dataRetention?.purposes?.[s.id]?i=n.dataRetention.purposes[s.id]:n.dataRetention?.stdRetention&&(i=n.dataRetention.stdRetention),r("li",{className:`${t.vendorPurposeItem} ${s.usesLegitimateInterest?t.vendorPurposeItemLi:""}`,children:[r("span",{children:[s.name,i&&r("span",{className:t.vendorRetention,children:[" ","(Retained: ",i,"d)"]})]}),s.usesLegitimateInterest&&r("span",{className:t.vendorListLiBadge,children:[e("svg",{style:{height:"0.625rem",width:"0.625rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),R.preferenceCenter.vendorList.legitimateInterest]})]},s.id)})})]}),T&&x&&r("div",{className:t.vendorLiSection,children:[r("div",{className:t.vendorLiSectionHeader,children:[r("h4",{className:t.vendorPurposesTitle,children:[e("svg",{style:{height:"0.75rem",marginRight:"0.25rem",width:"0.75rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),R.preferenceCenter.purposeItem.legitimateInterest]}),e("button",{type:"button",onClick:()=>x(n.id,!j),className:`${t.objectButton} ${j?"":t.objectButtonActive}`,"aria-pressed":!j,children:j?R.preferenceCenter.purposeItem.objectButton:R.preferenceCenter.purposeItem.objected})]}),e("p",{className:t.liExplanation,children:R.preferenceCenter.purposeItem.rightToObject})]}),n.dataDeclaration&&n.dataDeclaration.length>0&&r("div",{className:t.vendorPurposesList,children:[r("h4",{className:t.vendorPurposesTitle,children:[R.preferenceCenter.vendorList.dataCategories," (",n.dataDeclaration.length,")"]}),e("ul",{className:t.vendorPurposesItems,children:n.dataDeclaration.map(r=>{let n=v?.dataCategories?.[r];return e("li",{className:t.vendorPurposeItem,title:n?.description,children:n?.name||`Data Category ${r}`},r)})})]}),L.length>0&&r("div",{className:t.vendorPurposesList,children:[r("h4",{className:t.vendorPurposesTitle,children:[r("svg",{"aria-hidden":"true",focusable:"false",style:{height:"0.75rem",marginRight:"0.25rem",width:"0.75rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("title",{children:R.preferenceCenter.vendorList.specialPurposes}),e("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),e("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),R.preferenceCenter.vendorList.specialPurposes," (",L.length,")"]}),e("ul",{className:t.vendorPurposesItems,children:L.map(s=>{let i;return n.dataRetention?.specialPurposes?.[s.id]?i=n.dataRetention.specialPurposes[s.id]:n.dataRetention?.stdRetention&&(i=n.dataRetention.stdRetention),e("li",{className:t.vendorPurposeItem,children:r("span",{children:[s.name,i&&r("span",{className:t.vendorRetention,children:[" ","(Retained: ",i,"d)"]})]})},s.id)})}),e("p",{className:t.vendorListMetaText,style:{fontStyle:"italic",marginTop:"0.25rem"},children:R.preferenceCenter.vendorList.requiredNotice})]}),P.length>0&&r("div",{className:t.vendorPurposesList,children:[r("h4",{className:t.vendorPurposesTitle,children:[R.preferenceCenter.vendorList.specialFeatures," (",P.length,")"]}),e("ul",{className:t.vendorPurposesItems,children:P.map(r=>e("li",{className:t.vendorPurposeItem,children:r.name},r.id))})]}),b.length>0&&r("div",{className:t.vendorPurposesList,children:[r("h4",{className:t.vendorPurposesTitle,children:[R.preferenceCenter.vendorList.features," (",b.length,")"]}),e("ul",{className:t.vendorPurposesItems,children:b.map(r=>e("li",{className:t.vendorPurposeItem,children:r.name},r.id))})]})]})]},n.id)};return r("div",{...D,children:[null===C?r("div",{...$,children:[r("div",{...H,children:[r("svg",{className:t.searchIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("circle",{cx:"11",cy:"11",r:"8"}),e("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),e("input",{type:"text",placeholder:R.preferenceCenter.vendorList.search,value:P,onChange:e=>b(e.target.value),className:t.searchInput})]}),e("p",{className:t.vendorCount,children:R.preferenceCenter.vendorList.showingCount.replace("{filtered}",String(A.length)).replace("{total}",String(V.length))})]}):r("div",{...W,children:[e("p",{className:t.selectedVendorText,children:R.common.showingSelectedVendor}),r("button",{type:"button",onClick:k,className:t.clearSelectionButton,children:[r("svg",{className:t.clearIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),R.common.clearSelection]})]}),T.length>0&&r("div",{className:t.vendorSection,children:[r("div",{className:t.iabVendorSectionHeader,children:[r("h3",{className:t.vendorSectionHeading,children:[r("svg",{className:t.vendorSectionIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),e("path",{d:"M2 17l10 5 10-5"}),e("path",{d:"M2 12l10 5 10-5"})]}),R.preferenceCenter.vendorList.iabVendorsHeading," (",T.length,")"]}),e("p",{className:t.iabVendorNotice,children:R.preferenceCenter.vendorList.iabVendorsNotice})]}),e("div",{children:T.map(e=>U(e))})]}),j.length>0&&r("div",{className:t.vendorSection,children:[r("div",{className:t.customVendorSectionHeader,children:[r("h3",{className:t.vendorSectionHeading,children:[r("svg",{className:t.vendorSectionIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("circle",{cx:"12",cy:"12",r:"10"}),e("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),e("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),R.preferenceCenter.vendorList.customVendorsHeading," (",j.length,")"]}),e("p",{className:t.customVendorNotice,children:R.preferenceCenter.vendorList.customVendorsNotice})]}),e("div",{children:j.map(e=>U(e))})]}),0===A.length&&e("div",{className:t.emptyState,children:r("p",{className:t.emptyStateText,children:['No vendors found matching "',P,'"']})})]})};export{v as VendorList};
2
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{resolveIABVendorUrls as n}from"@c15t/iab/headless";import t from"@c15t/ui/styles/components/iab-consent-dialog";import{useEffect as s,useState as i}from"react";import{useTranslations as o}from"../../../hooks.js";import{useTheme as a}from"../../../hooks/use-theme.js";import{useUIConfig as l}from"../../../ui-config-context.js";import{mergeSlotProps as d}from"../../../utils/merge-slot-props.js";import{useIABTranslations as c}from"../use-iab-translations.js";import{AdTechProviderSection as m,filterAdTechProviders as p}from"./ad-tech-provider-section.js";import*as h from"../../shared/ui/preference-item/index.js";import*as u from"../../shared/ui/switch/index.js";let v=[],g={},f=[],N=({vendorData:N,purposes:C,vendorConsents:k,onVendorToggle:L,selectedVendorId:S,onClearSelection:x,customVendors:y=v,vendorLegitimateInterests:I=g,onVendorLegitimateInterestToggle:P,adTechProviders:b=f,adTechProviderConsents:M=g,onAdTechProviderToggle:w})=>{let{components:R}=l(),{noStyle:B}=a(),[V,A]=i(""),[T,j]=i(new Set),D=c(),$=o()?.language,H=[...N?Object.entries(N.vendors).map(([e,r])=>({cookieMaxAgeSeconds:r.cookieMaxAgeSeconds,cookieRefresh:r.cookieRefresh,dataDeclaration:r.dataDeclaration||[],dataRetention:r.dataRetention,deviceStorageDisclosureUrl:r.deviceStorageDisclosureUrl??null,features:r.features||[],id:Number(e),isCustom:!1,legIntPurposes:r.legIntPurposes||[],...n(r,$),name:r.name,purposes:r.purposes||[],specialFeatures:r.specialFeatures||[],specialPurposes:r.specialPurposes||[],usesCookies:r.usesCookies,usesNonCookieAccess:r.usesNonCookieAccess})):[],...y.map(e=>({cookieMaxAgeSeconds:e.cookieMaxAgeSeconds??null,cookieRefresh:void 0,dataDeclaration:e.dataCategories||[],dataRetention:void 0,deviceStorageDisclosureUrl:null,features:e.features||[],id:e.id,isCustom:!0,legIntPurposes:e.legIntPurposes||[],legitimateInterestUrl:null,name:e.name,policyUrl:e.privacyPolicyUrl,purposes:e.purposes||[],specialFeatures:e.specialFeatures||[],specialPurposes:[],usesCookies:e.usesCookies??!1,usesNonCookieAccess:e.usesNonCookieAccess??!1}))].sort((e,r)=>e.name.localeCompare(r.name));s(()=>{if(null!==S){let e=requestAnimationFrame(()=>{j(e=>new Set(e).add(S))}),r=setTimeout(()=>{let e=document.getElementById(`vendor-${String(S)}`);e&&e.scrollIntoView({behavior:"smooth",block:"start"})},100);return()=>{cancelAnimationFrame(e),clearTimeout(r)}}},[S]);let W=null===S?H.filter(e=>e.name.toLowerCase().includes(V.toLowerCase())):H.filter(e=>String(e.id)===String(S)),U=W.filter(e=>!e.isCustom),F=W.filter(e=>e.isCustom),z=p(b,V,S),O=H.length+b.length,_=W.length+z.length,q=d(R?.["iab-vendor-list"]?.root,{noStyle:B}),E=d(R?.["iab-vendor-list"]?.header,{baseClassName:t.vendorListHeader,noStyle:B}),K=d(R?.["iab-vendor-list"]?.search,{baseClassName:t.searchContainer,noStyle:B}),G=d(R?.["iab-vendor-list"]?.selectedVendor,{baseClassName:t.selectedVendorBanner,noStyle:B}),J=function(n){var s,i,o,a;let l,c,m,p,v=String(n.id),g=(s=n.id,(l=H.find(e=>String(e.id)===String(s)))?C.filter(e=>e.vendors.some(e=>String(e.id)===String(s))).map(e=>({...e,usesLegitimateInterest:l.legIntPurposes.includes(e.id)})):[]),f=(i=n.id,(c=H.find(e=>String(e.id)===String(i)))&&N?c.specialPurposes.map(e=>N.specialPurposes[e]).filter(e=>null!=e).map(e=>({description:e.description,id:e.id,name:e.name})):[]),S=(o=n.id,(m=H.find(e=>String(e.id)===String(o)))&&N?m.specialFeatures.map(e=>N.specialFeatures[e]).filter(e=>null!=e).map(e=>({description:e.description,id:e.id,name:e.name})):[]),x=(a=n.id,(p=H.find(e=>String(e.id)===String(a)))&&N?(p.features||[]).map(e=>N.features[e]).filter(e=>null!=e).map(e=>({description:e.description,id:e.id,name:e.name})):[]),y=T.has(n.id),b=g.filter(e=>e.usesLegitimateInterest).length,M=n.legIntPurposes.length>0,w=I[v]??!0,V=n.dataRetention?.stdRetention,A=null;n.cookieMaxAgeSeconds&&(A=D.preferenceCenter.vendorList.maxAge.replace("{days}",String(Math.floor(n.cookieMaxAgeSeconds/86400))),n.cookieRefresh&&(A=`${A} (refreshes)`));let $=d(R?.["iab-vendor-list"]?.rowHeader,{baseClassName:t.vendorListItemHeader,noStyle:B});return r(h.Root,{id:`vendor-${v}`,className:B?void 0:`${t.vendorListItem} ${n.isCustom?t.customVendorItem:""}`,noStyle:!0,onOpenChange:()=>{var e;return e=n.id,void j(r=>{let n=new Set(r);return n.has(e)?n.delete(e):n.add(e),n})},open:y,slotKey:"iab-vendor-list.row",children:[r("div",{...$,children:[r(h.Trigger,{className:t.vendorListTrigger,noStyle:!0,children:[r("div",{className:t.vendorListInfo,children:[r("h3",{className:t.vendorListName,children:[n.name,n.isCustom&&r("svg",{className:t.customVendorIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-label":D.common.customPartner,children:[e("circle",{cx:"12",cy:"12",r:"10"}),e("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),e("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})]}),r("div",{className:t.vendorListMeta,children:[r("span",{className:t.vendorListMetaText,children:[g.length," purpose",1===g.length?"":"s",f.length>0&&`, ${f.length} special`,S.length>0&&`, ${S.length} feature${1===S.length?"":"s"}`]}),b>0&&r("span",{className:t.vendorListLiBadge,children:[e("svg",{style:{height:"0.625rem",width:"0.625rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),b," ",D.preferenceCenter.vendorList.legitimateInterest]})]})]}),e("svg",{className:t.purposeArrow,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:y?e("path",{d:"M19 15l-7-7-7 7"}):e("path",{d:"M19 9l-7 7-7-7"})})]}),e("div",{className:t.vendorConsentControl,children:e(u.Root,{"aria-label":`Consent for ${n.name}`,className:t.vendorConsentSwitch,checked:k[v]??!1,onCheckedChange:e=>L(n.id,e)})})]}),r(h.Content,{innerClassName:B?void 0:t.vendorListContent,innerSlotKey:"iab-vendor-list.rowContent",noStyle:B,children:[r("div",{className:t.vendorLinks,children:[r("a",{href:n.policyUrl,target:"_blank",rel:"noopener noreferrer",className:t.vendorLink,children:[r("svg",{className:t.vendorLinkIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e("polyline",{points:"15 3 21 3 21 9"}),e("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),D.preferenceCenter.vendorList.privacyPolicy]}),n.legitimateInterestUrl&&r("a",{href:n.legitimateInterestUrl,target:"_blank",rel:"noopener noreferrer",className:t.vendorLink,children:[r("svg",{className:t.vendorLinkIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e("polyline",{points:"15 3 21 3 21 9"}),e("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),D.preferenceCenter.purposeItem.legitimateInterest]}),n.deviceStorageDisclosureUrl&&r("a",{href:n.deviceStorageDisclosureUrl,target:"_blank",rel:"noopener noreferrer",className:t.vendorLink,children:[r("svg",{className:t.vendorLinkIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e("polyline",{points:"15 3 21 3 21 9"}),e("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),D.preferenceCenter.vendorList.storageDisclosure]})]}),r("div",{className:t.vendorBadges,children:[n.usesCookies&&e("span",{className:t.vendorBadge,children:D.preferenceCenter.vendorList.usesCookies}),n.usesNonCookieAccess&&e("span",{className:t.vendorBadge,children:D.preferenceCenter.vendorList.nonCookieAccess}),A&&e("span",{className:t.vendorBadge,children:A}),V&&e("span",{className:t.vendorBadge,children:D.preferenceCenter.vendorList.retention.replace("{days}",String(V))})]}),g.length>0&&r("div",{className:t.vendorPurposesList,children:[r("h4",{className:t.vendorPurposesTitle,children:[D.preferenceCenter.vendorList.purposes," (",g.length,")"]}),e("ul",{className:t.vendorPurposesItems,children:g.map(s=>{let i;return n.dataRetention?.purposes?.[s.id]?i=n.dataRetention.purposes[s.id]:n.dataRetention?.stdRetention&&(i=n.dataRetention.stdRetention),r("li",{className:`${t.vendorPurposeItem} ${s.usesLegitimateInterest?t.vendorPurposeItemLi:""}`,children:[r("span",{children:[s.name,i&&r("span",{className:t.vendorRetention,children:[" ","(Retained: ",i,"d)"]})]}),s.usesLegitimateInterest&&r("span",{className:t.vendorListLiBadge,children:[e("svg",{style:{height:"0.625rem",width:"0.625rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),D.preferenceCenter.vendorList.legitimateInterest]})]},s.id)})})]}),M&&P&&r("div",{className:t.vendorLiSection,children:[r("div",{className:t.vendorLiSectionHeader,children:[r("h4",{className:t.vendorPurposesTitle,children:[e("svg",{style:{height:"0.75rem",marginRight:"0.25rem",width:"0.75rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e("path",{d:"M12 3v18M3 12h18M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07"})}),D.preferenceCenter.purposeItem.legitimateInterest]}),e("button",{type:"button",onClick:()=>P(n.id,!w),className:`${t.objectButton} ${w?"":t.objectButtonActive}`,"aria-pressed":!w,children:w?D.preferenceCenter.purposeItem.objectButton:D.preferenceCenter.purposeItem.objected})]}),e("p",{className:t.liExplanation,children:D.preferenceCenter.purposeItem.rightToObject})]}),n.dataDeclaration&&n.dataDeclaration.length>0&&r("div",{className:t.vendorPurposesList,children:[r("h4",{className:t.vendorPurposesTitle,children:[D.preferenceCenter.vendorList.dataCategories," (",n.dataDeclaration.length,")"]}),e("ul",{className:t.vendorPurposesItems,children:n.dataDeclaration.map(r=>{let n=N?.dataCategories?.[r];return e("li",{className:t.vendorPurposeItem,title:n?.description,children:n?.name||`Data Category ${r}`},r)})})]}),f.length>0&&r("div",{className:t.vendorPurposesList,children:[r("h4",{className:t.vendorPurposesTitle,children:[r("svg",{"aria-hidden":"true",focusable:"false",style:{height:"0.75rem",marginRight:"0.25rem",width:"0.75rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("title",{children:D.preferenceCenter.vendorList.specialPurposes}),e("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),e("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),D.preferenceCenter.vendorList.specialPurposes," (",f.length,")"]}),e("ul",{className:t.vendorPurposesItems,children:f.map(s=>{let i;return n.dataRetention?.specialPurposes?.[s.id]?i=n.dataRetention.specialPurposes[s.id]:n.dataRetention?.stdRetention&&(i=n.dataRetention.stdRetention),e("li",{className:t.vendorPurposeItem,children:r("span",{children:[s.name,i&&r("span",{className:t.vendorRetention,children:[" ","(Retained: ",i,"d)"]})]})},s.id)})}),e("p",{className:t.vendorListMetaText,style:{fontStyle:"italic",marginTop:"0.25rem"},children:D.preferenceCenter.vendorList.requiredNotice})]}),S.length>0&&r("div",{className:t.vendorPurposesList,children:[r("h4",{className:t.vendorPurposesTitle,children:[D.preferenceCenter.vendorList.specialFeatures," (",S.length,")"]}),e("ul",{className:t.vendorPurposesItems,children:S.map(r=>e("li",{className:t.vendorPurposeItem,children:r.name},r.id))})]}),x.length>0&&r("div",{className:t.vendorPurposesList,children:[r("h4",{className:t.vendorPurposesTitle,children:[D.preferenceCenter.vendorList.features," (",x.length,")"]}),e("ul",{className:t.vendorPurposesItems,children:x.map(r=>e("li",{className:t.vendorPurposeItem,children:r.name},r.id))})]})]})]},n.id)};return r("div",{...q,children:[null===S?r("div",{...E,children:[r("div",{...K,children:[r("svg",{className:t.searchIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("circle",{cx:"11",cy:"11",r:"8"}),e("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),e("input",{type:"text",placeholder:D.preferenceCenter.vendorList.search,value:V,onChange:e=>A(e.target.value),className:t.searchInput})]}),e("p",{className:t.vendorCount,children:D.preferenceCenter.vendorList.showingCount.replace("{filtered}",String(_)).replace("{total}",String(O))})]}):r("div",{...G,children:[e("p",{className:t.selectedVendorText,children:D.common.showingSelectedVendor}),r("button",{type:"button",onClick:x,className:t.clearSelectionButton,children:[r("svg",{className:t.clearIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),D.common.clearSelection]})]}),U.length>0&&r("div",{className:t.vendorSection,children:[r("div",{className:t.iabVendorSectionHeader,children:[r("h3",{className:t.vendorSectionHeading,children:[r("svg",{className:t.vendorSectionIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),e("path",{d:"M2 17l10 5 10-5"}),e("path",{d:"M2 12l10 5 10-5"})]}),D.preferenceCenter.vendorList.iabVendorsHeading," (",U.length,")"]}),e("p",{className:t.iabVendorNotice,children:D.preferenceCenter.vendorList.iabVendorsNotice})]}),e("div",{children:U.map(e=>J(e))})]}),F.length>0&&r("div",{className:t.vendorSection,children:[r("div",{className:t.customVendorSectionHeader,children:[r("h3",{className:t.vendorSectionHeading,children:[r("svg",{className:t.vendorSectionIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("circle",{cx:"12",cy:"12",r:"10"}),e("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),e("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),D.preferenceCenter.vendorList.customVendorsHeading," (",F.length,")"]}),e("p",{className:t.customVendorNotice,children:D.preferenceCenter.vendorList.customVendorsNotice})]}),e("div",{children:F.map(e=>J(e))})]}),e(m,{providers:z,consents:M,onToggle:w}),0===_&&e("div",{className:t.emptyState,children:r("p",{className:t.emptyStateText,children:['No vendors found matching "',V,'"']})})]})};export{N as VendorList};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{Fragment as e,jsx as t,jsxs as o}from"react/jsx-runtime";import{applyPublisherRestrictionsToGVL as n}from"@c15t/iab/headless";import{isDialogDismissKey as i}from"@c15t/ui/primitives/dialog";import r from"@c15t/ui/styles/components/consent-actions";import a from"@c15t/ui/styles/components/iab-consent-dialog";import{useCallback as s,useEffect as l,useLayoutEffect as d,useMemo as c,useRef as m,useState as p}from"react";import{createPortal as u}from"react-dom";import{useHeadlessIABConsentUI as g}from"../../component-hooks/use-headless-iab-consent-ui.js";import{useTranslations as h}from"../../component-hooks/use-translations.js";import{ConsentDialogTrigger as b}from"../panel-trigger/index.js";import{Branding as y}from"../panel/atoms/card.js";import{ConsentTrackingContext as f}from"../../context/consent-tracking-context.js";import{LocalThemeContext as v}from"../../context/theme-context.js";import{useComponentConfig as C}from"../../hooks/use-component-config.js";import{useFocusTrap as S}from"../../hooks/use-focus-trap.js";import{useIABConsentManager as k}from"../../hooks/use-iab-manager.js";import{useScrollLock as N}from"../../hooks/use-scroll-lock.js";import{useTextDirection as I}from"../../hooks/use-text-direction.js";import{useUIConfig as x}from"../../ui-config-context.js";import{mergeSlotProps as L}from"../../utils/merge-slot-props.js";import{IAB_DIALOG_SHEETS as j}from"../shared/iab-dialog-sheets.js";import{SurfaceStyles as T,useSurfaceSheetsReady as A}from"../shared/surface-styles.js";import{FeatureItem as F}from"./atoms/feature-item.js";import{IABConsentDialogOverlay as V}from"./atoms/overlay.js";import{PurposeItem as w}from"./atoms/purpose-item.js";import{StackItem as P}from"./atoms/stack-item.js";import{VendorList as B}from"./atoms/vendor-list.js";import{useIABDisplayModel as R}from"./hooks/use-display-model.js";import{useIABTranslations as $}from"./use-iab-translations.js";import*as M from"../shared/ui/button/index.js";import*as q from"../shared/ui/tabs/index.js";let z=["iab"],E={tabIndex:-1},H=({open:H,noStyle:D,disableAnimation:W,scrollLock:G,trapFocus:O,hideBranding:_,initialTab:J,showTrigger:K=!1,models:Q=z,uiSource:U})=>{let X=$(),{common:Y}=h(),{components:Z}=x(),{iab:ee,activeUI:et,policyDialog:eo,translationConfig:en,model:ei}=k({preferences:{scrollLock:G,trapFocus:O}}),{banner:er,closeUI:ea,openDialog:es,performDialogAction:el}=g(),ed=eo.blocking,ec=I(en.defaultLanguage),em=m(null),ep=m(null),eu=m(null),[eg,eh]=p(J??ee?.preferenceCenterTab??"purposes"),[eb,ey]=p(null),[ef,ev]=p(!1),[eC,eS]=p(!1),[ek,eN]=p(!1),eI=A(j,D)&&null!==ei&&Q.includes(ei)&&(H??"dialog"===et),ex=C({disableAnimation:W,noStyle:D,scrollLock:ed,trapFocus:eo.blocking}),{consentRows:eL,essentialRows:ej,essentialPartnerCount:eT,featureRows:eA,featuresStandardText:eF,purposeTabCount:eV,vendorTabCount:ew,data:{purposes:eP}}=R(),eB=ee?.gvl??null,eR=ee?.publisherRestrictions,e$=c(()=>eB?n(eB,eR):null,[eB,eR]),eM=s((e,t)=>{ee?.setPurposeConsent(e,t)},[ee]),eq=s((e,t)=>{ee?.setSpecialFeatureOptIn(e,t)},[ee]),ez=s((e,t)=>{ee?.setVendorConsent(e,t)},[ee]),eE=s((e,t)=>{ee?.setVendorLegitimateInterest(e,t)},[ee]),eH=s((e,t)=>{ee?.setPurposeLegitimateInterest(e,t)},[ee]),eD=async()=>{try{await el("accept")}catch{}},eW=async()=>{try{await el("reject")}catch{}},eG=async()=>{try{await el("customize")}catch{}},eO=s(()=>{ea()},[ea]),e_=e=>{ey(e),eh("vendors"),es({tab:"vendors"})};S(!!(eC&&eI&&ex.trapFocus),em,{initialFocus:"first-tabbable"}),N(!!(eI&&ex.scrollLock)),l(()=>{if(!eI)return;let e=e=>{i(e.key)&&(e.preventDefault(),eO())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[eO,eI]),l(()=>{let e=requestAnimationFrame(()=>eS(!0));return()=>cancelAnimationFrame(e)},[]),l(()=>{if(eI){let e=requestAnimationFrame(()=>eN(!0));return()=>cancelAnimationFrame(e)}if(ex.disableAnimation){let e=requestAnimationFrame(()=>eN(!1));return()=>cancelAnimationFrame(e)}let e=setTimeout(()=>{eN(!1)},150);return()=>clearTimeout(e)},[eI,ex.disableAnimation]);let eJ=m(!!J);l(()=>{let e=ee?.preferenceCenterTab;if(!(eI&&e))return;if(eJ.current){eJ.current=!1;return}let t=requestAnimationFrame(()=>{eh(e)});return()=>cancelAnimationFrame(t)},[eI,ee?.preferenceCenterTab]),d(()=>{let e,t;if("purposes"!==eg&&"vendors"!==eg)return;let o=ep.current;if(!o||null===eu.current)return;let n=eu.current;if(eu.current=null,!window.matchMedia("(prefers-reduced-motion: reduce)").matches)return o.style.height=`${n}px`,o.style.overflow="hidden",o.style.transition="none",e=requestAnimationFrame(()=>{t=requestAnimationFrame(()=>{if(!o)return;o.style.height="auto";let e=o.getBoundingClientRect().height;if(o.style.height=`${n}px`,1>Math.abs(n-e)){o.style.height="",o.style.overflow="",o.style.transition="";return}o.getBoundingClientRect(),o.style.transition="height 180ms cubic-bezier(0.33, 1, 0.68, 1)",o.style.height=`${e}px`,o.addEventListener("transitionend",e=>{"height"===e.propertyName&&(o.style.height="",o.style.overflow="",o.style.transition="")},{once:!0})})}),()=>{cancelAnimationFrame(e),cancelAnimationFrame(t)}},[eg]);let eK=s(e=>{ep.current&&(eu.current=ep.current.offsetHeight),eh(e),es({tab:e})},[es]),eQ=c(()=>({uiSource:U??"iab_dialog"}),[U]);if(!eC||!ee?.config.enabled)return null;let eU=ee.isLoadingGVL||!ee.gvl,eX=L(Z?.["iab-dialog"]?.root,{baseClassName:`${a.root} ${ek?a.dialogVisible:a.dialogHidden}`,noStyle:ex.noStyle}),eY=L(Z?.["iab-dialog"]?.card,{baseClassName:`${a.card} ${ek?a.contentVisible:a.contentHidden}`,noStyle:ex.noStyle}),eZ=L(Z?.["iab-dialog"]?.header,{baseClassName:a.header,noStyle:ex.noStyle}),e1=L(Z?.["iab-dialog"]?.headerContent,{baseClassName:a.headerContent,noStyle:ex.noStyle}),e0=L(Z?.["iab-dialog"]?.title,{baseClassName:a.title,noStyle:ex.noStyle}),e2=L(Z?.["iab-dialog"]?.description,{baseClassName:a.description,noStyle:ex.noStyle}),e7=L(Z?.["iab-dialog"]?.closeButton,{baseClassName:a.closeButton,noStyle:ex.noStyle}),e4=L(Z?.["iab-dialog"]?.body,{baseClassName:a.body,noStyle:ex.noStyle}),e5=L(Z?.["iab-dialog"]?.tabs,{baseClassName:a.tabsContainer,noStyle:ex.noStyle}),e8=L(Z?.["iab-dialog"]?.tabsList,{baseClassName:a.tabsList,noStyle:ex.noStyle}),e6=L(Z?.["iab-dialog"]?.tabTrigger,{baseClassName:a.tabButton,noStyle:ex.noStyle}),e3=L(Z?.["iab-dialog"]?.tabIndicator,{baseClassName:a.tabIndicator,noStyle:ex.noStyle}),e9=L(Z?.["iab-dialog"]?.content,{baseClassName:a.content,noStyle:ex.noStyle}),te=L(Z?.["iab-dialog"]?.loading,{baseClassName:a.loadingContainer,noStyle:ex.noStyle}),tt=L(Z?.["iab-dialog"]?.tabPanel,{baseClassName:a.tabPanel,noStyle:ex.noStyle}),to=L(Z?.["iab-dialog"]?.specialPurposes,{baseClassName:a.specialPurposesSection,noStyle:ex.noStyle}),tn=L(Z?.["iab-dialog"]?.consentNotice,{baseClassName:a.consentNotice,noStyle:ex.noStyle}),ti=L(Z?.["iab-dialog"]?.actions,{baseClassName:r.actionRoot,noStyle:ex.noStyle}),tr=L(Z?.["iab-dialog"]?.footer,{baseClassName:a.footer,noStyle:ex.noStyle,...ti}),ta=L(Z?.["iab-dialog"]?.actionGroup,{baseClassName:r.actionGroup,"data-direction":"row",noStyle:ex.noStyle}),ts=t(f.Provider,{value:eQ,children:o(v.Provider,{value:ex,children:[t(T,{sheets:j,noStyle:ex.noStyle}),t(V,{isOpen:eI}),t("div",{...eX,"data-testid":"iab-consent-dialog-root",dir:ec,children:o("div",{"aria-describedby":"iab-consent-dialog-description",...eY,ref:em,"aria-label":X.preferenceCenter.title,"aria-modal":ex.trapFocus?"true":void 0,role:"dialog",...E,"data-testid":"iab-consent-dialog-card",children:[o("div",{...eZ,children:[o("div",{...e1,children:[t("h2",{...e0,children:X.preferenceCenter.title}),t("p",{...e2,id:"iab-consent-dialog-description",children:X.preferenceCenter.description})]}),t("button",{...e7,type:"button","data-testid":"iab-consent-dialog-close",onClick:eO,"aria-label":Y.close,children:o("svg",{"aria-hidden":"true",style:{height:"1rem",width:"1rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),o(q.Root,{...e4,noStyle:!0,onValueChange:e=>eK(e),value:eg,children:[t("div",{...e5,children:o(q.List,{...e8,noStyle:!0,children:[o(q.Trigger,{...e6,noStyle:!0,value:"purposes",children:[X.preferenceCenter.tabs.purposes,!eU&&` (${eV})`]}),o(q.Trigger,{...e6,noStyle:!0,value:"vendors",children:[X.preferenceCenter.tabs.vendors,!eU&&` (${ew})`]}),t("div",{...e3,"aria-hidden":"true","data-active-tab":eg})]})}),t("div",{...e9,ref:ep,children:eU?o("div",{...te,children:[t("div",{className:a.loadingSpinner}),t("p",{className:a.loadingText,children:X.common.loading})]}):o(e,{children:[o(q.Content,{...tt,forceMount:!0,noStyle:!0,value:"purposes",children:[eL.map(e=>"stack"===e.kind?t(P,{stack:e,consents:ee.purposeConsents,onToggle:eM,vendorConsents:ee.vendorConsents,onVendorToggle:ez,onVendorClick:e_,vendorLegitimateInterests:ee.vendorLegitimateInterests,onVendorLegitimateInterestToggle:eE,purposeLegitimateInterests:ee.purposeLegitimateInterests,onPurposeLegitimateInterestToggle:eH},e.testId):t(w,{purpose:e,testId:e.testId,isEnabled:"special-feature"===e.toggle?ee.specialFeatureOptIns[e.id]??!1:ee.purposeConsents[e.id]??!1,onToggle:t=>{"special-feature"===e.toggle?eq(e.id,t):eM(e.id,t)},vendorConsents:ee.vendorConsents,onVendorToggle:ez,onVendorClick:e_,vendorLegitimateInterests:ee.vendorLegitimateInterests,onVendorLegitimateInterestToggle:eE,purposeLegitimateInterests:"purpose"===e.kind?ee.purposeLegitimateInterests:void 0,onPurposeLegitimateInterestToggle:"purpose"===e.kind?eH:void 0},e.testId)),ej.length>0&&o("div",{...to,children:[o("div",{className:a.specialPurposesHeader,children:[o("button",{type:"button","aria-expanded":ef,onClick:()=>ev(!ef),className:a.purposeTrigger,children:[t("svg",{"aria-hidden":"true",className:a.purposeArrow,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:ef?t("path",{d:"M19 9l-7 7-7-7"}):t("path",{d:"M9 5l7 7-7 7"})}),o("div",{className:a.purposeInfo,children:[o("h3",{className:a.specialPurposesTitle,children:[X.preferenceCenter.specialPurposes.title,o("svg",{"aria-hidden":"true",className:a.lockIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),t("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})]}),o("p",{className:a.purposeMeta,children:[eT," ",1===eT?X.preferenceCenter.vendorList.partnerSingular:X.preferenceCenter.vendorList.partnerPlural]})]})]}),t("div",{style:{position:"relative"},children:o("svg",{className:a.infoIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-label":X.preferenceCenter.specialPurposes.tooltip,children:[t("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),t("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})})]}),ef&&t("div",{style:{padding:"0.75rem"},children:ej.map(e=>t(w,{purpose:e,testId:e.testId,isEnabled:!0,onToggle:()=>{},vendorConsents:ee.vendorConsents,onVendorToggle:ez,onVendorClick:e_,isLocked:!0},e.testId))})]}),eA.length>0&&o("section",{"aria-label":X.preferenceCenter.features.title,className:ex.noStyle?void 0:a.featuresSection,"data-testid":"iab-consent-dialog-features",children:[o("div",{className:ex.noStyle?void 0:a.featuresHeader,children:[t("h3",{className:ex.noStyle?void 0:a.featuresTitle,children:X.preferenceCenter.features.title}),t("p",{className:ex.noStyle?void 0:a.featuresDescription,children:eF??X.preferenceCenter.features.description})]}),t("div",{className:ex.noStyle?void 0:a.featuresList,children:eA.map(e=>t(F,{feature:e,testId:e.testId},e.testId))})]}),t("div",{...tn,children:t("p",{className:a.consentNoticeText,children:X.preferenceCenter.footer.consentStorage})})]}),t(q.Content,{...tt,forceMount:!0,noStyle:!0,value:"vendors",children:t(B,{vendorData:e$,purposes:eP,vendorConsents:ee.vendorConsents,onVendorToggle:ez,selectedVendorId:eb,onClearSelection:()=>ey(null),customVendors:ee.nonIABVendors,vendorLegitimateInterests:ee.vendorLegitimateInterests,onVendorLegitimateInterestToggle:eE})})]})})]}),o("div",{...tr,children:[o("div",{...ta,children:[t(M.Root,{variant:"neutral",mode:"stroke",size:"small",onClick:eW,disabled:!er.isReady,"data-action":"reject",children:X.common.rejectAll}),t(M.Root,{variant:"neutral",mode:"stroke",size:"small",onClick:eD,disabled:!er.isReady,"data-action":"accept",children:X.common.acceptAll})]}),t("div",{...ta,children:t(M.Root,{variant:"primary",mode:"filled",size:"small",onClick:eG,disabled:eU,"data-action":"customize",children:X.common.saveSettings})})]}),t(y,{hideBranding:_??!1,variant:"dialog-tag",slotContext:"iab-dialog","data-testid":"iab-consent-dialog-branding"})]})})]})}),tl=!0===K?{}:!1===K?null:K,td=tl?t(b,{...tl}):null;return eI||ek?o(e,{children:[td,u(ts,document.body)]}):td};export{H as IABConsentDialog};
2
+ import{Fragment as e,jsx as t,jsxs as o}from"react/jsx-runtime";import{applyPublisherRestrictionsToGVL as n}from"@c15t/iab/headless";import{isDialogDismissKey as r}from"@c15t/ui/primitives/dialog";import i from"@c15t/ui/styles/components/consent-actions";import a from"@c15t/ui/styles/components/iab-consent-dialog";import{useCallback as s,useEffect as l,useLayoutEffect as d,useMemo as c,useRef as m,useState as p}from"react";import{createPortal as u}from"react-dom";import{useHeadlessIABConsentUI as g}from"../../component-hooks/use-headless-iab-consent-ui.js";import{useTranslations as h}from"../../component-hooks/use-translations.js";import{ConsentDialogTrigger as b}from"../panel-trigger/index.js";import{Branding as y}from"../panel/atoms/card.js";import{ConsentTrackingContext as f}from"../../context/consent-tracking-context.js";import{LocalThemeContext as v}from"../../context/theme-context.js";import{useComponentConfig as C}from"../../hooks/use-component-config.js";import{useFocusTrap as S}from"../../hooks/use-focus-trap.js";import{useIABConsentManager as k}from"../../hooks/use-iab-manager.js";import{useScrollLock as N}from"../../hooks/use-scroll-lock.js";import{useTextDirection as I}from"../../hooks/use-text-direction.js";import{useUIConfig as x}from"../../ui-config-context.js";import{mergeSlotProps as L}from"../../utils/merge-slot-props.js";import{IAB_DIALOG_SHEETS as T}from"../shared/iab-dialog-sheets.js";import{SurfaceStyles as j,useSurfaceSheetsReady as A}from"../shared/surface-styles.js";import{FeatureItem as P}from"./atoms/feature-item.js";import{IABConsentDialogOverlay as F}from"./atoms/overlay.js";import{PurposeItem as V}from"./atoms/purpose-item.js";import{StackItem as w}from"./atoms/stack-item.js";import{VendorList as B}from"./atoms/vendor-list.js";import{useIABDisplayModel as R}from"./hooks/use-display-model.js";import{useIABTranslations as $}from"./use-iab-translations.js";import*as M from"../shared/ui/button/index.js";import*as q from"../shared/ui/tabs/index.js";let z=["iab"],E={tabIndex:-1},H=({open:H,noStyle:D,disableAnimation:W,scrollLock:G,trapFocus:O,hideBranding:_,initialTab:J,showTrigger:K=!1,models:Q=z,uiSource:U})=>{let X=$(),{common:Y}=h(),{components:Z}=x(),{iab:ee,activeUI:et,policyDialog:eo,translationConfig:en,model:er}=k({preferences:{scrollLock:G,trapFocus:O}}),{banner:ei,closeUI:ea,openDialog:es,performDialogAction:el}=g(),ed=eo.blocking,ec=I(en.defaultLanguage),em=m(null),ep=m(null),eu=m(null),[eg,eh]=p(J??ee?.preferenceCenterTab??"purposes"),[eb,ey]=p(null),[ef,ev]=p(!1),[eC,eS]=p(!1),[ek,eN]=p(!1),eI=A(T,D)&&null!==er&&Q.includes(er)&&(H??"dialog"===et),ex=C({disableAnimation:W,noStyle:D,scrollLock:ed,trapFocus:eo.blocking}),{consentRows:eL,essentialRows:eT,essentialPartnerCount:ej,featureRows:eA,featuresStandardText:eP,purposeTabCount:eF,vendorTabCount:eV,data:{purposes:ew}}=R(),eB=ee?.gvl??null,eR=ee?.publisherRestrictions,e$=c(()=>eB?n(eB,eR):null,[eB,eR]),eM=s((e,t)=>{ee?.setPurposeConsent(e,t)},[ee]),eq=s((e,t)=>{ee?.setSpecialFeatureOptIn(e,t)},[ee]),ez=s((e,t)=>{ee?.setVendorConsent(e,t)},[ee]),eE=s((e,t)=>{ee?.setAdTechProviderConsent(e,t)},[ee]),eH=s((e,t)=>{ee?.setVendorLegitimateInterest(e,t)},[ee]),eD=s((e,t)=>{ee?.setPurposeLegitimateInterest(e,t)},[ee]),eW=async()=>{try{await el("accept")}catch{}},eG=async()=>{try{await el("reject")}catch{}},eO=async()=>{try{await el("customize")}catch{}},e_=s(()=>{ea()},[ea]),eJ=e=>{ey(e),eh("vendors"),es({tab:"vendors"})};S(!!(eC&&eI&&ex.trapFocus),em,{initialFocus:"first-tabbable"}),N(!!(eI&&ex.scrollLock)),l(()=>{if(!eI)return;let e=e=>{r(e.key)&&(e.preventDefault(),e_())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[e_,eI]),l(()=>{let e=requestAnimationFrame(()=>eS(!0));return()=>cancelAnimationFrame(e)},[]),l(()=>{if(eI){let e=requestAnimationFrame(()=>eN(!0));return()=>cancelAnimationFrame(e)}if(ex.disableAnimation){let e=requestAnimationFrame(()=>eN(!1));return()=>cancelAnimationFrame(e)}let e=setTimeout(()=>{eN(!1)},150);return()=>clearTimeout(e)},[eI,ex.disableAnimation]);let eK=m(!!J);l(()=>{let e=ee?.preferenceCenterTab;if(!(eI&&e))return;if(eK.current){eK.current=!1;return}let t=requestAnimationFrame(()=>{eh(e)});return()=>cancelAnimationFrame(t)},[eI,ee?.preferenceCenterTab]),d(()=>{let e,t;if("purposes"!==eg&&"vendors"!==eg)return;let o=ep.current;if(!o||null===eu.current)return;let n=eu.current;if(eu.current=null,!window.matchMedia("(prefers-reduced-motion: reduce)").matches)return o.style.height=`${n}px`,o.style.overflow="hidden",o.style.transition="none",e=requestAnimationFrame(()=>{t=requestAnimationFrame(()=>{if(!o)return;o.style.height="auto";let e=o.getBoundingClientRect().height;if(o.style.height=`${n}px`,1>Math.abs(n-e)){o.style.height="",o.style.overflow="",o.style.transition="";return}o.getBoundingClientRect(),o.style.transition="height 180ms cubic-bezier(0.33, 1, 0.68, 1)",o.style.height=`${e}px`,o.addEventListener("transitionend",e=>{"height"===e.propertyName&&(o.style.height="",o.style.overflow="",o.style.transition="")},{once:!0})})}),()=>{cancelAnimationFrame(e),cancelAnimationFrame(t)}},[eg]);let eQ=s(e=>{ep.current&&(eu.current=ep.current.offsetHeight),eh(e),es({tab:e})},[es]),eU=c(()=>({uiSource:U??"iab_dialog"}),[U]);if(!eC||!ee?.config.enabled)return null;let eX=ee.isLoadingGVL||!ee.gvl,eY=L(Z?.["iab-dialog"]?.root,{baseClassName:`${a.root} ${ek?a.dialogVisible:a.dialogHidden}`,noStyle:ex.noStyle}),eZ=L(Z?.["iab-dialog"]?.card,{baseClassName:`${a.card} ${ek?a.contentVisible:a.contentHidden}`,noStyle:ex.noStyle}),e1=L(Z?.["iab-dialog"]?.header,{baseClassName:a.header,noStyle:ex.noStyle}),e0=L(Z?.["iab-dialog"]?.headerContent,{baseClassName:a.headerContent,noStyle:ex.noStyle}),e2=L(Z?.["iab-dialog"]?.title,{baseClassName:a.title,noStyle:ex.noStyle}),e7=L(Z?.["iab-dialog"]?.description,{baseClassName:a.description,noStyle:ex.noStyle}),e4=L(Z?.["iab-dialog"]?.closeButton,{baseClassName:a.closeButton,noStyle:ex.noStyle}),e5=L(Z?.["iab-dialog"]?.body,{baseClassName:a.body,noStyle:ex.noStyle}),e8=L(Z?.["iab-dialog"]?.tabs,{baseClassName:a.tabsContainer,noStyle:ex.noStyle}),e6=L(Z?.["iab-dialog"]?.tabsList,{baseClassName:a.tabsList,noStyle:ex.noStyle}),e3=L(Z?.["iab-dialog"]?.tabTrigger,{baseClassName:a.tabButton,noStyle:ex.noStyle}),e9=L(Z?.["iab-dialog"]?.tabIndicator,{baseClassName:a.tabIndicator,noStyle:ex.noStyle}),te=L(Z?.["iab-dialog"]?.content,{baseClassName:a.content,noStyle:ex.noStyle}),tt=L(Z?.["iab-dialog"]?.loading,{baseClassName:a.loadingContainer,noStyle:ex.noStyle}),to=L(Z?.["iab-dialog"]?.tabPanel,{baseClassName:a.tabPanel,noStyle:ex.noStyle}),tn=L(Z?.["iab-dialog"]?.specialPurposes,{baseClassName:a.specialPurposesSection,noStyle:ex.noStyle}),tr=L(Z?.["iab-dialog"]?.consentNotice,{baseClassName:a.consentNotice,noStyle:ex.noStyle}),ti=L(Z?.["iab-dialog"]?.actions,{baseClassName:i.actionRoot,noStyle:ex.noStyle}),ta=L(Z?.["iab-dialog"]?.footer,{baseClassName:a.footer,noStyle:ex.noStyle,...ti}),ts=L(Z?.["iab-dialog"]?.actionGroup,{baseClassName:i.actionGroup,"data-direction":"row",noStyle:ex.noStyle}),tl=t(f.Provider,{value:eU,children:o(v.Provider,{value:ex,children:[t(j,{sheets:T,noStyle:ex.noStyle}),t(F,{isOpen:eI}),t("div",{...eY,"data-testid":"iab-consent-dialog-root",dir:ec,children:o("div",{"aria-describedby":"iab-consent-dialog-description",...eZ,ref:em,"aria-label":X.preferenceCenter.title,"aria-modal":ex.trapFocus?"true":void 0,role:"dialog",...E,"data-testid":"iab-consent-dialog-card",children:[o("div",{...e1,children:[o("div",{...e0,children:[t("h2",{...e2,children:X.preferenceCenter.title}),t("p",{...e7,id:"iab-consent-dialog-description",children:X.preferenceCenter.description})]}),t("button",{...e4,type:"button","data-testid":"iab-consent-dialog-close",onClick:e_,"aria-label":Y.close,children:o("svg",{"aria-hidden":"true",style:{height:"1rem",width:"1rem"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),o(q.Root,{...e5,noStyle:!0,onValueChange:e=>eQ(e),value:eg,children:[t("div",{...e8,children:o(q.List,{...e6,noStyle:!0,children:[o(q.Trigger,{...e3,noStyle:!0,value:"purposes",children:[X.preferenceCenter.tabs.purposes,!eX&&` (${eF})`]}),o(q.Trigger,{...e3,noStyle:!0,value:"vendors",children:[X.preferenceCenter.tabs.vendors,!eX&&` (${eV})`]}),t("div",{...e9,"aria-hidden":"true","data-active-tab":eg})]})}),t("div",{...te,ref:ep,children:eX?o("div",{...tt,children:[t("div",{className:a.loadingSpinner}),t("p",{className:a.loadingText,children:X.common.loading})]}):o(e,{children:[o(q.Content,{...to,forceMount:!0,noStyle:!0,value:"purposes",children:[eL.map(e=>"stack"===e.kind?t(w,{stack:e,consents:ee.purposeConsents,onToggle:eM,vendorConsents:ee.vendorConsents,onVendorToggle:ez,onVendorClick:eJ,vendorLegitimateInterests:ee.vendorLegitimateInterests,onVendorLegitimateInterestToggle:eH,purposeLegitimateInterests:ee.purposeLegitimateInterests,onPurposeLegitimateInterestToggle:eD},e.testId):t(V,{purpose:e,testId:e.testId,isEnabled:"special-feature"===e.toggle?ee.specialFeatureOptIns[e.id]??!1:ee.purposeConsents[e.id]??!1,onToggle:t=>{"special-feature"===e.toggle?eq(e.id,t):eM(e.id,t)},vendorConsents:ee.vendorConsents,onVendorToggle:ez,onVendorClick:eJ,vendorLegitimateInterests:ee.vendorLegitimateInterests,onVendorLegitimateInterestToggle:eH,purposeLegitimateInterests:"purpose"===e.kind?ee.purposeLegitimateInterests:void 0,onPurposeLegitimateInterestToggle:"purpose"===e.kind?eD:void 0},e.testId)),eT.length>0&&o("div",{...tn,children:[o("div",{className:a.specialPurposesHeader,children:[o("button",{type:"button","aria-expanded":ef,onClick:()=>ev(!ef),className:a.purposeTrigger,children:[t("svg",{"aria-hidden":"true",className:a.purposeArrow,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:ef?t("path",{d:"M19 9l-7 7-7-7"}):t("path",{d:"M9 5l7 7-7 7"})}),o("div",{className:a.purposeInfo,children:[o("h3",{className:a.specialPurposesTitle,children:[X.preferenceCenter.specialPurposes.title,o("svg",{"aria-hidden":"true",className:a.lockIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),t("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})]}),o("p",{className:a.purposeMeta,children:[ej," ",1===ej?X.preferenceCenter.vendorList.partnerSingular:X.preferenceCenter.vendorList.partnerPlural]})]})]}),t("div",{style:{position:"relative"},children:o("svg",{className:a.infoIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-label":X.preferenceCenter.specialPurposes.tooltip,children:[t("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),t("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})})]}),ef&&t("div",{style:{padding:"0.75rem"},children:eT.map(e=>t(V,{purpose:e,testId:e.testId,isEnabled:!0,onToggle:()=>{},vendorConsents:ee.vendorConsents,onVendorToggle:ez,onVendorClick:eJ,isLocked:!0},e.testId))})]}),eA.length>0&&o("section",{"aria-label":X.preferenceCenter.features.title,className:ex.noStyle?void 0:a.featuresSection,"data-testid":"iab-consent-dialog-features",children:[o("div",{className:ex.noStyle?void 0:a.featuresHeader,children:[t("h3",{className:ex.noStyle?void 0:a.featuresTitle,children:X.preferenceCenter.features.title}),t("p",{className:ex.noStyle?void 0:a.featuresDescription,children:eP??X.preferenceCenter.features.description})]}),t("div",{className:ex.noStyle?void 0:a.featuresList,children:eA.map(e=>t(P,{feature:e,testId:e.testId},e.testId))})]}),t("div",{...tr,children:t("p",{className:a.consentNoticeText,children:X.preferenceCenter.footer.consentStorage})})]}),t(q.Content,{...to,forceMount:!0,noStyle:!0,value:"vendors",children:t(B,{vendorData:e$,purposes:ew,vendorConsents:ee.vendorConsents,onVendorToggle:ez,selectedVendorId:eb,onClearSelection:()=>ey(null),customVendors:ee.nonIABVendors,vendorLegitimateInterests:ee.vendorLegitimateInterests,onVendorLegitimateInterestToggle:eH,adTechProviders:ee.adTechProviders,adTechProviderConsents:ee.adTechProviderConsents,onAdTechProviderToggle:eE})})]})})]}),o("div",{...ta,children:[o("div",{...ts,children:[t(M.Root,{variant:"neutral",mode:"stroke",size:"small",onClick:eG,disabled:!ei.isReady,"data-action":"reject",children:X.common.rejectAll}),t(M.Root,{variant:"neutral",mode:"stroke",size:"small",onClick:eW,disabled:!ei.isReady,"data-action":"accept",children:X.common.acceptAll})]}),t("div",{...ts,children:t(M.Root,{variant:"primary",mode:"filled",size:"small",onClick:eO,disabled:eX,"data-action":"customize",children:X.common.saveSettings})})]}),t(y,{hideBranding:_??!1,variant:"dialog-tag",slotContext:"iab-dialog","data-testid":"iab-consent-dialog-branding"})]})})]})}),td=!0===K?{}:!1===K?null:K,tc=td?t(b,{...td}):null;return eI||ek?o(e,{children:[tc,u(tl,document.body)]}):tc};export{H as IABConsentDialog};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{vendorsListedUnder as o}from"@c15t/core";import n from"@c15t/ui/styles/components/vendor-list";import{useId as r,useMemo as i,useState as s}from"react";import{useTranslations as l}from"../../../component-hooks/use-translations.js";import{Box as d}from"../../shared/primitives/box.js";import{useConsentDraftSlice as a,useConsentDraftStore as c}from"../../../draft.js";import{useDeclaredVendors as h}from"../../../hooks.js";import{useTheme as m}from"../../../hooks/use-theme.js";import*as y from"../../shared/ui/preference-item/index.js";import*as p from"../../shared/ui/switch/index.js";let v=({open:o})=>t("svg",{"aria-hidden":"true",fill:"none",focusable:"false",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",children:[e("title",{children:o?"Close":"Open"}),o?e("path",{d:"M5 12h14"}):e("path",{d:"M5 12h14M12 5v14"})]}),g={disabledByCategory:"Turn on this category to choose vendors.",privacyPolicy:"Privacy policy",switchLabel:"Allow {vendor}",title:"Vendors ({count})"},u=({category:o,categoryOn:n,checked:r,copy:i,labelId:l,noStyle:a,onCheckedChange:c,styles:h,vendor:m})=>{let[g,u]=s(!1),C=m.name??m.id,b=!0!==m.disabled,f=!!(m.description||m.privacyPolicyUrl);return t(y.Root,{className:h?.item,"data-testid":`consent-widget-vendor-item-${o}-${m.id}`,disabled:!f,noStyle:a,onOpenChange:u,open:g,slotKey:"vendor-list.item",children:[t(d,{noStyle:a,baseClassName:h?.header,slotKey:"vendor-list.header",children:[t(y.Trigger,{className:h?.trigger,"data-testid":`consent-widget-vendor-trigger-${o}-${m.id}`,noStyle:a,slotKey:"vendor-list.trigger",children:[e(y.Leading,{className:h?.arrow,noStyle:a,children:e(v,{open:g})}),e(d,{asChild:!0,noStyle:a,baseClassName:h?.name,slotKey:"vendor-list.name",children:e("span",{"data-testid":`consent-widget-vendor-name-${o}-${m.id}`,id:l,children:C})})]}),b?e(d,{noStyle:a,baseClassName:h?.control,slotKey:"vendor-list.control",children:e(p.Root,{"aria-label":i.switchLabel.replace("{vendor}",C),"aria-describedby":l,checked:r,"data-testid":`consent-widget-vendor-switch-${o}-${m.id}`,disabled:!n,onCheckedChange:c,size:"small"})}):null]}),f?t(y.Content,{className:h?.content,"data-testid":`consent-widget-vendor-content-${o}-${m.id}`,innerClassName:h?.contentInner,noStyle:a,slotKey:"vendor-list.content",children:[m.description?e(d,{asChild:!0,noStyle:a,baseClassName:h?.description,slotKey:"vendor-list.description",children:e("p",{children:m.description})}):null,m.privacyPolicyUrl?e(d,{asChild:!0,noStyle:a,baseClassName:h?.link,slotKey:"vendor-list.link",children:e("a",{href:m.privacyPolicyUrl,rel:"noopener noreferrer",target:"_blank",children:i.privacyPolicy})}):null]}):null]})},C=({category:s,className:y,noStyle:p,...v})=>{let C=h(),b=i(()=>o(C,s),[C,s]),f=c(),$=a(f,e=>!0===e.values[s]),k=a(f,e=>e.vendors),{consentManagerDialog:w}=l(),{noStyle:N}=m(),S=r(),j=p??N??!1;if(0===b.length)return null;let K={...g,...w.vendors},x=j?void 0:n,L=K.title.replace("{count}",String(b.length));return e(d,{asChild:!0,className:y,"data-testid":`consent-widget-vendor-list-${s}`,noStyle:j,baseClassName:x?.root,slotKey:"vendor-list.root",...v,children:t("section",{"aria-label":L,children:[$?null:e("p",{className:x?.hint,"data-testid":`consent-widget-vendor-hint-${s}`,children:K.disabledByCategory}),b.map(t=>e(u,{category:s,categoryOn:$,checked:k[t.id]??!0,copy:K,labelId:`${S}vendor-${s}-${t.id}`,noStyle:j,onCheckedChange:e=>f.setVendor(t.id,e),styles:x,vendor:t},t.id))]})})};export{C as ConsentWidgetVendorList};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{deniedVendorIds as o,vendorsListedUnder as n}from"@c15t/core";import r from"@c15t/ui/styles/components/vendor-list";import{useId as i,useMemo as s,useState as l}from"react";import{useTranslations as d}from"../../../component-hooks/use-translations.js";import{Box as a}from"../../shared/primitives/box.js";import{useConsentDraftSlice as c,useConsentDraftStore as h}from"../../../draft.js";import{useDeclaredVendors as m,useVendorChoice as y}from"../../../hooks.js";import{useTheme as p}from"../../../hooks/use-theme.js";import*as v from"../../shared/ui/preference-item/index.js";import*as g from"../../shared/ui/switch/index.js";let u=({open:o})=>t("svg",{"aria-hidden":"true",fill:"none",focusable:"false",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",children:[e("title",{children:o?"Close":"Open"}),o?e("path",{d:"M5 12h14"}):e("path",{d:"M5 12h14M12 5v14"})]}),C={disabledByCategory:"Turn on this category to choose vendors.",privacyPolicy:"Privacy policy",switchLabel:"Allow {vendor}",title:"Vendors ({count})"},b=({category:o,categoryOn:n,checked:r,copy:i,labelId:s,noStyle:d,onCheckedChange:c,styles:h,vendor:m})=>{let[y,p]=l(!1),C=m.name??m.id,b=!0!==m.disabled,f=!!(m.description||m.privacyPolicyUrl);return t(v.Root,{className:h?.item,"data-testid":`consent-widget-vendor-item-${o}-${m.id}`,disabled:!f,noStyle:d,onOpenChange:p,open:y,slotKey:"vendor-list.item",children:[t(a,{noStyle:d,baseClassName:h?.header,slotKey:"vendor-list.header",children:[t(v.Trigger,{className:h?.trigger,"data-testid":`consent-widget-vendor-trigger-${o}-${m.id}`,noStyle:d,slotKey:"vendor-list.trigger",children:[e(v.Leading,{className:h?.arrow,noStyle:d,children:e(u,{open:y})}),e(a,{asChild:!0,noStyle:d,baseClassName:h?.name,slotKey:"vendor-list.name",children:e("span",{"data-testid":`consent-widget-vendor-name-${o}-${m.id}`,id:s,children:C})})]}),b?e(a,{noStyle:d,baseClassName:h?.control,slotKey:"vendor-list.control",children:e(g.Root,{"aria-label":i.switchLabel.replace("{vendor}",C),"aria-describedby":s,checked:r,"data-testid":`consent-widget-vendor-switch-${o}-${m.id}`,disabled:!n,onCheckedChange:c,size:"small"})}):null]}),f?t(v.Content,{className:h?.content,"data-testid":`consent-widget-vendor-content-${o}-${m.id}`,innerClassName:h?.contentInner,noStyle:d,slotKey:"vendor-list.content",children:[m.description?e(a,{asChild:!0,noStyle:d,baseClassName:h?.description,slotKey:"vendor-list.description",children:e("p",{children:m.description})}):null,m.privacyPolicyUrl?e(a,{asChild:!0,noStyle:d,baseClassName:h?.link,slotKey:"vendor-list.link",children:e("a",{href:m.privacyPolicyUrl,rel:"noopener noreferrer",target:"_blank",children:i.privacyPolicy})}):null]}):null]})},f=({category:l,className:v,noStyle:g,...u})=>{let f=m(),$=y(),k=s(()=>n(f,l,o({vendorChoice:$,vendors:{declared:f,listVersion:null}})),[f,l,$]),w=h(),N=c(w,e=>!0===e.values[l]),S=c(w,e=>e.vendors),{consentManagerDialog:j}=d(),{noStyle:K}=p(),x=i(),L=g??K??!1;if(0===k.length)return null;let P={...C,...j.vendors},V=L?void 0:r,B=P.title.replace("{count}",String(k.length));return e(a,{asChild:!0,className:v,"data-testid":`consent-widget-vendor-list-${l}`,noStyle:L,baseClassName:V?.root,slotKey:"vendor-list.root",...u,children:t("section",{"aria-label":B,children:[N?null:e("p",{className:V?.hint,"data-testid":`consent-widget-vendor-hint-${l}`,children:P.disabledByCategory}),k.map(t=>e(b,{category:l,categoryOn:N,checked:S[t.id]??!0,copy:P,labelId:`${x}vendor-${l}-${t.id}`,noStyle:L,onCheckedChange:e=>w.setVendor(t.id,e),styles:V,vendor:t},t.id))]})})};export{f as ConsentWidgetVendorList};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{jsx as e}from"react/jsx-runtime";import{createIAB as r}from"@c15t/iab";import{useCallback as t,useContext as n,useEffect as o,useMemo as s,useRef as i,useState as l,useSyncExternalStore as c}from"react";import{KernelContext as u}from"./context.js";import{IABContext as a}from"./context/iab-context-value.js";import{useCommittedRef as d}from"./hooks/use-committed-ref.js";import{markIABProviderLoaded as m}from"./hooks/use-iab-policy-guard.js";m();let p=function(e){let[r,t]=l(()=>({kernel:e}));if(r.kernel===e)return r;let n={kernel:e};return t(n),n},f=({children:c,...m})=>{let f=n(u);if(!f)throw Error("IABProvider: no kernel in context. Wrap with <ConsentProvider options={...}> first.");let[h,v]=l("purposes"),g=p(f),b=d(g),[P,I]=l(null),V=P?.selection===g?P.handle:null,A=i(m),k=i(null),x=i(new WeakSet),C=i([]),w=i(!1),S=i(!1);o(()=>{A.current=m},[m]),o(()=>(w.current=!0,S.current=!1,()=>{w.current=!1,queueMicrotask(()=>{if(!w.current)for(let e of(S.current=!0,C.current.splice(0)))e.cancel()})}),[]),o(()=>{let e=x.current;if(e.delete(g),g.kernel.getSnapshot().externalPermissions)return;let t=r({...A.current,kernel:g.kernel});k.current={handle:t,selection:g},I({handle:t,selection:g});let n=C.current;for(let e of(C.current=[],n))e.selection===g?e.run(t):e.cancel();return()=>{k.current=null,e.add(g),t.dispose()}},[g]);let j=t(e=>{let r=b.current!==g,{current:t}=k;if(!r&&t?.selection===g)return Promise.resolve(e(t.handle));let n=new Promise((t,n)=>{if(g.kernel.getSnapshot().externalPermissions)return void n(Error("Consent is managed by an external CMP. Open its preferences instead."));let o=()=>n(new DOMException("IAB provider unmounted or switched to another consent kernel.","AbortError"));r||S.current||x.current.has(g)?o():C.current.push({cancel:o,run:async r=>{try{await e(r),t()}catch(e){n(e)}},selection:g})});return n.catch(()=>{}),n},[b,g]),B=s(()=>({customVendors:m.customVendors,filtered:!!m.vendors?.length,handle:V,run:j,setTab:v,tab:h}),[V,j,h,m.vendors?.length,m.customVendors]);return e(a.Provider,{value:B,children:c})},h=function(){let e=n(u),r=n(a);if(!e)throw Error("useIAB must be used within <ConsentProvider options={...}> from @c15t/react");let t=c(r=>e.subscribe(r),()=>e.getSnapshot().iab,()=>e.getServerSnapshot().iab);return s(()=>{if(!t)return null;let e=r?.handle,n=r?.run??(r=>e?Promise.resolve(r(e)):Promise.resolve()),o=e=>(...r)=>{n(t=>e(t)(...r))};return{...t,acceptAll:o(e=>e.acceptAll),config:{cmpId:t.cmpId,enabled:t.enabled},customVendors:r?.customVendors??t.customVendors,gvlReference:t.gvlReference&&r?.filtered?{...t.gvlReference,summary:void 0}:t.gvlReference,isLoadingGVL:t.enabled&&!t.gvl,nonIABVendors:r?.customVendors??t.customVendors,preferenceCenterTab:r?.tab??"purposes",rejectAll:o(e=>e.rejectAll),save:()=>n(e=>e.save()),setPreferenceCenterTab:r?.setTab??(()=>{}),setPurposeConsent:o(e=>e.setPurposeConsent),setPurposeLegitimateInterest:o(e=>e.setPurposeLegitimateInterest),setSpecialFeatureOptIn:o(e=>e.setSpecialFeatureOptIn),setVendorConsent:o(e=>e.setVendorConsent),setVendorLegitimateInterest:o(e=>e.setVendorLegitimateInterest)}},[t,r])};export{f as IABProvider,h as useIAB};
2
+ import{jsx as e}from"react/jsx-runtime";import{createIAB as r}from"@c15t/iab";import{useCallback as t,useContext as n,useEffect as o,useMemo as s,useRef as i,useState as c,useSyncExternalStore as l}from"react";import{KernelContext as u}from"./context.js";import{IABContext as a}from"./context/iab-context-value.js";import{useCommittedRef as d}from"./hooks/use-committed-ref.js";import{markIABProviderLoaded as m}from"./hooks/use-iab-policy-guard.js";m();let p=function(e){let[r,t]=c(()=>({kernel:e}));if(r.kernel===e)return r;let n={kernel:e};return t(n),n},f=({children:l,...m})=>{let f=n(u);if(!f)throw Error("IABProvider: no kernel in context. Wrap with <ConsentProvider options={...}> first.");let[h,v]=c("purposes"),g=p(f),P=d(g),[b,I]=c(null),A=b?.selection===g?b.handle:null,V=i(m),C=i(null),k=i(new WeakSet),x=i([]),w=i(!1),S=i(!1);o(()=>{V.current=m},[m]),o(()=>(w.current=!0,S.current=!1,()=>{w.current=!1,queueMicrotask(()=>{if(!w.current)for(let e of(S.current=!0,x.current.splice(0)))e.cancel()})}),[]),o(()=>{let e=k.current;if(e.delete(g),g.kernel.getSnapshot().externalPermissions)return;let t=r({...V.current,kernel:g.kernel});C.current={handle:t,selection:g},I({handle:t,selection:g});let n=x.current;for(let e of(x.current=[],n))e.selection===g?e.run(t):e.cancel();return()=>{C.current=null,e.add(g),t.dispose()}},[g]);let j=t(e=>{let r=P.current!==g,{current:t}=C;if(!r&&t?.selection===g)return Promise.resolve(e(t.handle));let n=new Promise((t,n)=>{if(g.kernel.getSnapshot().externalPermissions)return void n(Error("Consent is managed by an external CMP. Open its preferences instead."));let o=()=>n(new DOMException("IAB provider unmounted or switched to another consent kernel.","AbortError"));r||S.current||k.current.has(g)?o():x.current.push({cancel:o,run:async r=>{try{await e(r),t()}catch(e){n(e)}},selection:g})});return n.catch(()=>{}),n},[P,g]),B=s(()=>({customVendors:m.customVendors,filtered:!!m.vendors?.length,handle:A,run:j,setTab:v,tab:h}),[A,j,h,m.vendors?.length,m.customVendors]);return e(a.Provider,{value:B,children:l})},h=function(){let e=n(u),r=n(a);if(!e)throw Error("useIAB must be used within <ConsentProvider options={...}> from @c15t/react");let t=l(r=>e.subscribe(r),()=>e.getSnapshot().iab,()=>e.getServerSnapshot().iab);return s(()=>{if(!t)return null;let e=r?.handle,n=r?.run??(r=>e?Promise.resolve(r(e)):Promise.resolve()),o=e=>(...r)=>{n(t=>e(t)(...r))};return{...t,acceptAll:o(e=>e.acceptAll),config:{cmpId:t.cmpId,enabled:t.enabled},customVendors:r?.customVendors??t.customVendors,gvlReference:t.gvlReference&&r?.filtered?{...t.gvlReference,summary:void 0}:t.gvlReference,isLoadingGVL:t.enabled&&!t.gvl,nonIABVendors:r?.customVendors??t.customVendors,preferenceCenterTab:r?.tab??"purposes",rejectAll:o(e=>e.rejectAll),save:()=>n(e=>e.save()),setAdTechProviderConsent:o(e=>e.setAdTechProviderConsent),setPreferenceCenterTab:r?.setTab??(()=>{}),setPurposeConsent:o(e=>e.setPurposeConsent),setPurposeLegitimateInterest:o(e=>e.setPurposeLegitimateInterest),setSpecialFeatureOptIn:o(e=>e.setSpecialFeatureOptIn),setVendorConsent:o(e=>e.setVendorConsent),setVendorLegitimateInterest:o(e=>e.setVendorLegitimateInterest)}},[t,r])};export{f as IABProvider,h as useIAB};
@@ -69,7 +69,7 @@
69
69
  .c15t-ui-root-p7SV0:not(.headless){box-sizing:border-box;width:100%;z-index:var(--consent-banner-z-index);pointer-events:none;font-family:var(--consent-banner-font-family);line-height:var(--consent-banner-line-height);-webkit-text-size-adjust:var(--consent-banner-text-size-adjust);-webkit-font-smoothing:antialiased;tab-size:var(--consent-banner-tab-size);flex-direction:column;padding:1rem;display:flex;position:fixed}.c15t-ui-root-p7SV0:not(.headless)>*{pointer-events:auto}.c15t-ui-root-p7SV0:not(.headless)>.c15t-ui-cardShell-djyPy:not(.headless){pointer-events:none}.c15t-ui-cardShell-djyPy:not(.headless)>*,.c15t-ui-root-p7SV0[data-blocking=true]:not(.headless){pointer-events:auto}:is(.c15t-ui-bannerEnterActive-IytGL:not(.headless),.c15t-ui-bannerEnterFrom-BJMc7:not(.headless),.c15t-ui-bannerEnterTo-yatsy:not(.headless),.c15t-ui-bannerEntering-Cqrwl:not(.headless),.c15t-ui-bannerLeaveFrom-RVGoD:not(.headless),.c15t-ui-bannerVisible-AFth0:not(.headless)){opacity:1}.c15t-ui-bannerEntering-Cqrwl[data-entry=late]:not(.c15t-ui-bannerHidden-R0_3M):not(.headless){transition:opacity var(--consent-banner-entry-duration) var(--consent-banner-entry-timing)}@starting-style{.c15t-ui-bannerEntering-Cqrwl[data-entry=late]:not(.headless){opacity:0}}.c15t-ui-bannerLeaveActive-C7qrk:not(.headless){transition:opacity var(--consent-banner-animation-duration) var(--consent-banner-animation-timing)}.c15t-ui-bannerLeaveTo-dXNcB:not(.headless){opacity:0}.c15t-ui-bannerHidden-R0_3M:not(.headless){opacity:0;transition:opacity var(--consent-banner-animation-duration) var(--consent-banner-animation-timing)}@media (width>=640px){.c15t-ui-root-p7SV0:not(.headless){width:auto;padding:1.5rem}}.c15t-ui-root-p7SV0[data-position=bottom-left]:not(.headless){bottom:0;left:0}.c15t-ui-root-p7SV0[data-position=bottom-right]:not(.headless){bottom:0;right:0}.c15t-ui-root-p7SV0[data-position=top-left]:not(.headless){top:0;left:0}.c15t-ui-root-p7SV0[data-position=top-right]:not(.headless){top:0;right:0}.c15t-ui-root-p7SV0[data-variant=floating][data-position=bottom-center]:not(.headless){inset-inline:0;width:fit-content;margin-inline:auto;bottom:0}.c15t-ui-root-p7SV0[data-variant=floating][data-position=top-center]:not(.headless){inset-inline:0;width:fit-content;margin-inline:auto;top:0}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless){width:100%;padding:0;left:0;right:0}.c15t-ui-root-p7SV0[data-variant=bar][data-position=bottom]:not(.headless){top:auto;bottom:0}.c15t-ui-root-p7SV0[data-variant=bar][data-position=top]:not(.headless){top:0;bottom:auto}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-cardShell-djyPy{width:100%;max-width:none}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-card-lgjVq{box-shadow:var(--consent-banner-shadow);border-width:0;border-radius:0}.c15t-ui-root-p7SV0[data-variant=bar][data-position=bottom]:not(.headless) .c15t-ui-card-lgjVq{border-top-width:var(--consent-banner-border-width);padding-bottom:env(safe-area-inset-bottom);border-top-style:solid}.c15t-ui-root-p7SV0[data-variant=bar][data-position=top]:not(.headless) .c15t-ui-card-lgjVq{border-bottom-width:var(--consent-banner-border-width);padding-top:env(safe-area-inset-top);border-bottom-style:solid}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-cardShell-djyPy>[data-variant=banner-tag]{margin-inline-end:1.5rem}.c15t-ui-root-p7SV0[data-variant=bar][data-position=top]:not(.headless) .c15t-ui-cardShell-djyPy>[data-variant=banner-tag]{border-top-width:0;border-bottom-width:1px;border-radius:0 0 .75rem .75rem;order:1;margin-block:-1px 0}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe{flex-direction:column;align-items:stretch;gap:.75rem}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe .c15t-ui-rights-wZg5K{flex-direction:column;align-items:flex-start}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe button[data-action]:not(.c15t-ui-rightLink-IXsSJ){flex:auto;width:100%;min-width:0}@media (width>=640px){.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe{flex-direction:row;justify-content:space-between;align-items:center}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe .c15t-ui-rights-wZg5K{flex-flow:wrap;align-items:center;margin-inline-end:auto}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe>*{width:auto}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe button[data-action]:not(.c15t-ui-rightLink-IXsSJ){flex:none;width:auto}}@media (width>=1024px){.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-card-lgjVq{flex-direction:row;align-items:center;display:flex}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-header-S6GiJ{flex:auto;min-width:0}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe{background-color:#0000;width:auto;min-width:0}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-card-lgjVq>:not([hidden])~:not([hidden]){border-top-width:0}}:is(.c15t-ui-root-p7SV0[data-variant=floating][data-position$=-right]:not(.headless) .c15t-ui-cardShell-djyPy,.c15t-ui-root-p7SV0[data-variant=widget][data-position$=-right]:not(.headless) .c15t-ui-cardShell-djyPy){margin-left:auto;margin-right:0}:is(.c15t-ui-root-p7SV0[data-variant=floating][data-position$=-left]:not(.headless) .c15t-ui-cardShell-djyPy,.c15t-ui-root-p7SV0[data-variant=widget][data-position$=-left]:not(.headless) .c15t-ui-cardShell-djyPy){margin-left:0;margin-right:auto}.c15t-ui-root-p7SV0[data-variant=floating][data-position$=-center]:not(.headless) .c15t-ui-cardShell-djyPy{margin-left:auto;margin-right:auto}.c15t-ui-root-p7SV0[data-variant=widget]:not(.headless){padding:.75rem}@media (width>=640px){.c15t-ui-root-p7SV0[data-variant=widget]:not(.headless){padding:1rem}}.c15t-ui-root-p7SV0[data-variant=widget]:not(.headless) .c15t-ui-cardShell-djyPy{width:min(calc(100vw - 1.5rem), var(--consent-banner-widget-max-width))}.c15t-ui-root-p7SV0[data-variant=widget]:not(.headless) .c15t-ui-header-S6GiJ{padding:.75rem}.c15t-ui-root-p7SV0[data-variant=widget]:not(.headless) .c15t-ui-title-vm8nL{font-size:.875rem;line-height:1.25rem}.c15t-ui-root-p7SV0[data-variant=widget]:not(.headless) .c15t-ui-description-s8Qhg{font-size:.8125rem;line-height:1.125rem}.c15t-ui-root-p7SV0[data-variant=widget]:not(.headless) .c15t-ui-footer-JhJAe{gap:.5rem;padding:.75rem}.c15t-ui-root-p7SV0[data-variant=widget]:not(.headless) .c15t-ui-footer-JhJAe button[data-action]:not(.c15t-ui-rightLink-IXsSJ){padding:.5rem .75rem}.c15t-ui-root-p7SV0[data-variant=widget]:not(.headless) .c15t-ui-footer-JhJAe .c15t-ui-rightLink-IXsSJ{font-size:.8125rem;line-height:1.125rem}.c15t-ui-root-p7SV0[data-variant=wall]:not(.headless){place-items:center;width:auto;padding:1rem;display:grid;inset:0}.c15t-ui-root-p7SV0[data-variant=wall]:not(.headless) .c15t-ui-cardShell-djyPy{width:min(calc(100vw - 2rem), var(--consent-banner-wall-max-width))}.c15t-ui-card-lgjVq:not(.headless){border-radius:var(--consent-banner-border-radius);border-width:var(--consent-banner-border-width);border-style:solid;border-color:var(--consent-banner-border-color);background-color:var(--consent-banner-background-color);width:100%;box-shadow:var(--consent-banner-shadow);position:relative;overflow:hidden}.c15t-ui-cardShell-djyPy:not(.headless){width:min(calc(100vw - 2rem), var(--consent-banner-max-width));flex-direction:column;display:flex;container:c15t-banner/inline-size}@media (width>=640px){.c15t-ui-cardShell-djyPy:not(.headless){width:min(calc(100vw - 3rem), var(--consent-banner-max-width))}}.c15t-dark .c15t-ui-card-lgjVq:not(.headless){background-color:var(--consent-banner-background-color-dark);border-color:var(--consent-banner-border-color-dark);box-shadow:var(--consent-banner-shadow-dark)}.c15t-dark .c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-card-lgjVq{box-shadow:var(--consent-banner-shadow-dark)}.c15t-ui-card-lgjVq:not(.headless)>:not([hidden])~:not([hidden]){border-top-width:var(--consent-banner-border-width);border-top-style:solid;border-color:var(--consent-banner-border-color)}.c15t-dark .c15t-ui-card-lgjVq:not(.headless)>:not([hidden])~:not([hidden]){border-color:var(--consent-banner-border-color-dark)}.c15t-ui-card-lgjVq:not(.headless):focus{outline:none}.c15t-ui-header-S6GiJ:not(.headless){color:var(--consent-banner-text-color);flex-direction:column;padding:1rem;display:flex}.c15t-dark .c15t-ui-header-S6GiJ:not(.headless){color:var(--consent-banner-text-color-dark)}@media (width>=640px){.c15t-ui-header-S6GiJ:not(.headless){padding:1.5rem}}.c15t-ui-header-S6GiJ:not(.headless)>:not([hidden])~:not([hidden]){--consent-banner-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--consent-banner-space-y-reverse)));margin-bottom:calc(.5rem * var(--consent-banner-space-y-reverse))}.c15t-ui-footer-JhJAe:not(.headless){background-color:var(--consent-banner-footer-background-color);flex-direction:column;justify-content:space-between;gap:.75rem;padding:1rem 1.25rem;display:flex}.c15t-dark .c15t-ui-footer-JhJAe:not(.headless){background-color:var(--consent-banner-footer-background-color-dark)}@media (width>=640px){.c15t-ui-footer-JhJAe:not(.headless){flex-direction:row}}.c15t-ui-rights-wZg5K:not(.headless){flex-flow:wrap;align-items:center;gap:.75rem;min-width:0;display:flex}.c15t-ui-rightLink-IXsSJ:not(.headless){width:auto;font:inherit;font-family:var(--consent-banner-font-family);letter-spacing:-.006em;color:var(--consent-banner-description-color);text-underline-offset:.15em;text-align:start;cursor:pointer;border-radius:var(--consent-banner-border-radius-sm);touch-action:manipulation;background:0 0;border:0;flex:none;align-self:center;margin:0;padding:0;font-size:.875rem;font-weight:400;line-height:1.25rem;text-decoration:underline;display:inline-block}.c15t-ui-rightLink-IXsSJ:not(.headless):hover{color:var(--consent-banner-text-color)}.c15t-ui-rightLink-IXsSJ:not(.headless):focus-visible{box-shadow:var(--button-shadow-primary-focus,0 0 0 2px var(--c15t-primary));outline:none}.c15t-dark .c15t-ui-rightLink-IXsSJ:not(.headless){color:var(--consent-banner-description-color-dark)}.c15t-dark .c15t-ui-rightLink-IXsSJ:not(.headless):hover{color:var(--consent-banner-text-color-dark)}.c15t-dark .c15t-ui-rightLink-IXsSJ:not(.headless):focus-visible{box-shadow:var(--button-shadow-primary-focus-dark,0 0 0 2px var(--c15t-primary))}.c15t-ui-root-p7SV0[data-prompt=notice]:not(.headless) .c15t-ui-footer-JhJAe{flex-direction:column;align-items:stretch;gap:.75rem}.c15t-ui-root-p7SV0[data-prompt=notice]:not(.headless) .c15t-ui-footer-JhJAe .c15t-ui-rights-wZg5K{flex-direction:column;align-items:flex-start;gap:.5rem}.c15t-ui-root-p7SV0[data-prompt=notice]:not(.headless) .c15t-ui-footer-JhJAe button[data-action]:not(.c15t-ui-rightLink-IXsSJ){flex:auto;width:100%;min-width:0}.c15t-ui-root-p7SV0[data-prompt=notice]:not(.headless) .c15t-ui-footer-JhJAe .c15t-ui-rightLink-IXsSJ{flex:none;align-self:flex-start;width:auto}@media (width>=640px){.c15t-ui-root-p7SV0[data-prompt=notice]:not(.headless) .c15t-ui-footer-JhJAe{flex-direction:row;justify-content:space-between;align-items:center;gap:.75rem}.c15t-ui-root-p7SV0[data-prompt=notice]:not(.headless) .c15t-ui-footer-JhJAe .c15t-ui-rights-wZg5K{flex-flow:wrap;flex:auto;align-items:center;gap:.75rem;min-width:0}.c15t-ui-root-p7SV0[data-prompt=notice]:not(.headless) .c15t-ui-footer-JhJAe>*{width:auto}.c15t-ui-root-p7SV0[data-prompt=notice]:not(.headless) .c15t-ui-footer-JhJAe button[data-action]:not(.c15t-ui-rightLink-IXsSJ){flex:none;width:auto}.c15t-ui-root-p7SV0[data-prompt=notice]:not(.headless) .c15t-ui-footer-JhJAe .c15t-ui-rightLink-IXsSJ{align-self:center}}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-header-S6GiJ,.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe{padding:.75rem 1rem}@media (width>=640px){.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-header-S6GiJ{padding:1rem 1.5rem}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe{padding:.75rem 1.5rem}}@media (width>=1024px){.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-header-S6GiJ{padding:.75rem 1.5rem}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-header-S6GiJ>:not([hidden])~:not([hidden]){margin-top:.25rem}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-title-vm8nL{line-height:1.25rem}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe{flex:none;gap:.75rem}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe .c15t-ui-rights-wZg5K{flex-flow:row;flex:none;align-items:center;gap:.75rem;margin-inline-end:0}.c15t-ui-root-p7SV0[data-variant=bar]:not(.headless) .c15t-ui-footer-JhJAe .c15t-ui-rightLink-IXsSJ{white-space:nowrap;font-size:.8125rem;line-height:1.125rem}}.c15t-ui-description-s8Qhg:not(.headless){letter-spacing:-.006em;color:var(--consent-banner-description-color);font-size:.875rem;font-weight:400;line-height:1.25rem}.c15t-dark .c15t-ui-description-s8Qhg:not(.headless){color:var(--consent-banner-description-color-dark)}.c15t-ui-description-s8Qhg[data-context=banner]:not(.headless){letter-spacing:-.006em;color:var(--consent-banner-description-color);font-size:.875rem;font-weight:400;line-height:1.25rem}.c15t-dark .c15t-ui-description-s8Qhg[data-context=banner]:not(.headless){color:var(--consent-banner-description-color-dark)}.c15t-ui-description-s8Qhg[data-context=dialog]:not(.headless){color:var(--consent-dialog-muted-color);font-size:var(--consent-dialog-description-font-size);font-weight:var(--consent-dialog-description-font-weight);line-height:var(--consent-dialog-description-line-height)}.c15t-dark .c15t-ui-description-s8Qhg[data-context=dialog]:not(.headless){color:var(--consent-dialog-muted-color-dark)}.c15t-ui-description-s8Qhg[data-context=manager]:not(.headless){color:var(--consent-manager-text-muted-color)}.c15t-dark .c15t-ui-description-s8Qhg[data-context=manager]:not(.headless){color:var(--consent-manager-text-muted-color-dark)}.c15t-ui-title-vm8nL:not(.headless){letter-spacing:-.011em;color:var(--consent-banner-title-color);margin:0;font-size:1rem;font-weight:500;line-height:1.5rem}.c15t-dark .c15t-ui-title-vm8nL:not(.headless){color:var(--consent-banner-title-color-dark)}.c15t-ui-overlay-DoHh4:not(.headless){background-color:var(--consent-banner-overlay-background-color);z-index:var(--consent-banner-overlay-z-index);position:fixed;inset:0}:is(.c15t-ui-overlayEnterActive-YGn_8:not(.headless),.c15t-ui-overlayEnterFrom-OtDqj:not(.headless),.c15t-ui-overlayEnterTo-jcvNq:not(.headless),.c15t-ui-overlayEntering-p5Z3U:not(.headless),.c15t-ui-overlayLeaveFrom-EYTMT:not(.headless),.c15t-ui-overlayVisible-ywHQp:not(.headless)){opacity:1}.c15t-ui-overlayEntering-p5Z3U[data-entry=late]:not(.c15t-ui-overlayHidden-WgrJC):not(.headless){transition:opacity var(--consent-banner-entry-duration) var(--consent-banner-entry-timing)}@starting-style{.c15t-ui-overlayEntering-p5Z3U[data-entry=late]:not(.headless){opacity:0}}.c15t-ui-overlayLeaveActive-FvP5W:not(.headless){transition:opacity var(--consent-banner-animation-duration) var(--consent-banner-animation-timing)}.c15t-ui-overlayLeaveTo-V7aI7:not(.headless){opacity:0}.c15t-ui-overlayHidden-WgrJC:not(.headless){opacity:0;transition:opacity var(--consent-banner-animation-duration) var(--consent-banner-animation-timing)}.c15t-dark .c15t-ui-overlay-DoHh4:not(.headless){background-color:var(--consent-banner-overlay-background-color-dark)}@media (prefers-reduced-motion:reduce){.c15t-ui-bannerEntering-Cqrwl[data-entry=late]:not(.c15t-ui-bannerHidden-R0_3M):not(.headless),.c15t-ui-overlayEntering-p5Z3U[data-entry=late]:not(.c15t-ui-overlayHidden-WgrJC):not(.headless),.c15t-ui-bannerLeaveActive-C7qrk:not(.headless),.c15t-ui-bannerHidden-R0_3M:not(.headless),.c15t-ui-overlayLeaveActive-FvP5W:not(.headless),.c15t-ui-overlayHidden-WgrJC:not(.headless){transition:none;animation:none}}
70
70
 
71
71
  /* components/accordion */
72
- .c15t-ui-list-T3EU0:not(.headless){gap:var(--accordion-stack-gap,.75rem);display:grid}.c15t-ui-item-Jgm_X:not(.headless){border:1px solid var(--accordion-border-color,var(--c15t-border));border-radius:var(--accordion-radius,var(--c15t-radius-md));box-shadow:none;background-color:var(--accordion-background-color,var(--c15t-surface));padding:0;display:grid;overflow:visible}.c15t-dark .c15t-ui-item-Jgm_X:not(.headless){border-color:var(--accordion-border-color-dark,var(--c15t-border));background-color:var(--accordion-background-color-dark,var(--c15t-surface))}.c15t-ui-triggerRow-xXdTH:not(.headless){align-items:center;gap:var(--accordion-gap,var(--c15t-space-xs));box-sizing:border-box;width:100%;padding:var(--accordion-padding,var(--c15t-space-sm));border-radius:var(--accordion-radius,var(--c15t-radius-md));color:var(--accordion-text-color,var(--c15t-text));transition:background-color var(--accordion-duration,var(--c15t-duration-normal)) var(--accordion-ease,var(--c15t-easing));background-color:#0000;border:0;grid-column:1/-1;grid-template-columns:minmax(0,1fr) auto;margin:0;display:grid}.c15t-ui-triggerRow-xXdTH:not(.headless):hover{background-color:var(--accordion-background-hover,var(--c15t-surface-hover))}.c15t-dark .c15t-ui-triggerRow-xXdTH:not(.headless){color:var(--accordion-text-color-dark,var(--c15t-text))}.c15t-dark .c15t-ui-triggerRow-xXdTH:not(.headless):hover{background-color:var(--accordion-background-hover-dark,var(--c15t-surface-hover))}.c15t-ui-item-Jgm_X:not(.headless):has(.c15t-ui-trigger-KT5J_:focus-visible){outline:2px solid var(--accordion-focus-ring,var(--c15t-primary));outline-offset:-2px}.c15t-dark .c15t-ui-item-Jgm_X:not(.headless):has(.c15t-ui-trigger-KT5J_:focus-visible){outline-color:var(--accordion-focus-ring-dark,var(--c15t-primary))}.c15t-ui-trigger-KT5J_:not(.headless):focus-visible{outline:none}.c15t-ui-item-Jgm_X:not(.headless)>.c15t-ui-content-qdPhy{grid-column:1/-1}.c15t-ui-trigger-KT5J_:not(.headless){appearance:none;align-items:center;gap:var(--accordion-gap,var(--c15t-space-xs));min-width:0;min-height:calc(var(--accordion-icon-size,1.25rem) + .25rem);font-family:inherit;font-size:var(--accordion-title-size,var(--c15t-font-size-sm));line-height:var(--c15t-line-height-tight);letter-spacing:inherit;font-weight:var(--c15t-font-weight-normal);border-radius:var(--accordion-radius,var(--c15t-radius-md));width:100%;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;flex:auto;align-self:stretch;padding:0;display:flex;position:relative}.c15t-ui-arrow-JFKgd:not(.headless){color:var(--accordion-arrow-color,color-mix(in srgb, var(--c15t-text-muted) 60%, var(--c15t-surface)));width:var(--accordion-icon-size,1.25rem);height:var(--accordion-icon-size,1.25rem);transition:transform var(--accordion-duration,var(--c15t-duration-normal)) var(--accordion-ease,var(--c15t-easing));flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.c15t-ui-arrow-JFKgd:not(.headless) svg{width:100%;height:100%;display:block}.c15t-dark .c15t-ui-arrow-JFKgd:not(.headless){color:var(--accordion-arrow-color-dark,color-mix(in srgb, var(--c15t-text-muted) 40%, var(--c15t-text)))}.c15t-ui-header-ogZie:not(.headless){flex-direction:column;flex:1;min-width:0;display:flex}.c15t-ui-title-vmC1f:not(.headless){font:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0}.c15t-ui-control-dy7nh:not(.headless){flex-shrink:0;align-self:center;position:relative;top:-1px}.c15t-ui-restriction-bXiI7:not(.headless){padding:0 var(--accordion-row-padding-x,var(--c15t-space-md)) .75rem;color:var(--accordion-restriction-color,var(--c15t-text-muted));font-size:var(--c15t-font-size-sm);line-height:var(--c15t-line-height-normal);grid-column:1/-1;margin:0;display:block}.c15t-ui-content-qdPhy:not(.headless){color:var(--accordion-content-color,color-mix(in srgb, var(--c15t-text-muted) 87%, var(--c15t-text)));letter-spacing:inherit;transition:grid-template-rows var(--accordion-duration,var(--c15t-duration-normal)) var(--accordion-ease,var(--c15t-easing));grid-template-rows:0fr;padding:0;font-size:.875rem;line-height:1.5;display:grid;overflow:hidden}.c15t-ui-content-qdPhy:not(.headless)[data-state=open]{grid-template-rows:1fr}.c15t-ui-content-qdPhy:not(.headless)[data-state=closed]{pointer-events:none}.c15t-ui-contentViewport-O2Kny:not(.headless){min-height:0;padding-top:0;padding-inline:calc(var(--accordion-icon-size,1.25rem) + var(--accordion-gap,var(--c15t-space-xs)));overflow:hidden}.c15t-ui-contentInner-b3ykf:not(.headless){opacity:1;transition:opacity calc(var(--accordion-duration,var(--c15t-duration-normal)) * .35) var(--c15t-easing-out);padding-top:0}.c15t-ui-content-qdPhy[data-state=open] .c15t-ui-contentViewport-O2Kny:not(.headless){padding-bottom:var(--accordion-padding,var(--c15t-space-sm))}.c15t-ui-content-qdPhy[data-state=closed] .c15t-ui-contentViewport-O2Kny:not(.headless){padding-bottom:0}.c15t-ui-content-qdPhy[data-state=closed] .c15t-ui-contentInner-b3ykf:not(.headless){opacity:0}.c15t-dark .c15t-ui-content-qdPhy:not(.headless){color:var(--accordion-content-color-dark,var(--c15t-text-muted))}:is([data-disable-animation] .c15t-ui-content-qdPhy:not(.headless),.disable-animation .c15t-ui-content-qdPhy:not(.headless)),:is([data-disable-animation] .c15t-ui-contentInner-b3ykf:not(.headless),.disable-animation .c15t-ui-contentInner-b3ykf:not(.headless)),:is([data-disable-animation] .c15t-ui-arrow-JFKgd:not(.headless),.disable-animation .c15t-ui-arrow-JFKgd:not(.headless)){transition:none}@media (prefers-reduced-motion:reduce){.c15t-ui-triggerRow-xXdTH:not(.headless),.c15t-ui-arrow-JFKgd:not(.headless),.c15t-ui-content-qdPhy:not(.headless),.c15t-ui-contentInner-b3ykf:not(.headless){transition:none}}
72
+ .c15t-ui-list-T3EU0:not(.headless){gap:var(--accordion-stack-gap,.75rem);grid-auto-rows:max-content;display:grid}.c15t-ui-item-Jgm_X:not(.headless){border:1px solid var(--accordion-border-color,var(--c15t-border));border-radius:var(--accordion-radius,var(--c15t-radius-md));box-shadow:none;background-color:var(--accordion-background-color,var(--c15t-surface));padding:0;display:grid;overflow:visible}.c15t-dark .c15t-ui-item-Jgm_X:not(.headless){border-color:var(--accordion-border-color-dark,var(--c15t-border));background-color:var(--accordion-background-color-dark,var(--c15t-surface))}.c15t-ui-triggerRow-xXdTH:not(.headless){align-items:center;gap:var(--accordion-gap,var(--c15t-space-xs));box-sizing:border-box;width:100%;padding:var(--accordion-padding,var(--c15t-space-sm));border-radius:var(--accordion-radius,var(--c15t-radius-md));color:var(--accordion-text-color,var(--c15t-text));transition:background-color var(--accordion-duration,var(--c15t-duration-normal)) var(--accordion-ease,var(--c15t-easing));background-color:#0000;border:0;grid-column:1/-1;grid-template-columns:minmax(0,1fr) auto;margin:0;display:grid}.c15t-ui-triggerRow-xXdTH:not(.headless):hover{background-color:var(--accordion-background-hover,var(--c15t-surface-hover))}.c15t-dark .c15t-ui-triggerRow-xXdTH:not(.headless){color:var(--accordion-text-color-dark,var(--c15t-text))}.c15t-dark .c15t-ui-triggerRow-xXdTH:not(.headless):hover{background-color:var(--accordion-background-hover-dark,var(--c15t-surface-hover))}.c15t-ui-item-Jgm_X:not(.headless):has(.c15t-ui-trigger-KT5J_:focus-visible){outline:2px solid var(--accordion-focus-ring,var(--c15t-primary));outline-offset:-2px}.c15t-dark .c15t-ui-item-Jgm_X:not(.headless):has(.c15t-ui-trigger-KT5J_:focus-visible){outline-color:var(--accordion-focus-ring-dark,var(--c15t-primary))}.c15t-ui-trigger-KT5J_:not(.headless):focus-visible{outline:none}.c15t-ui-item-Jgm_X:not(.headless)>.c15t-ui-content-qdPhy{grid-column:1/-1}.c15t-ui-trigger-KT5J_:not(.headless){appearance:none;align-items:center;gap:var(--accordion-gap,var(--c15t-space-xs));min-width:0;min-height:calc(var(--accordion-icon-size,1.25rem) + .25rem);font-family:inherit;font-size:var(--accordion-title-size,var(--c15t-font-size-sm));line-height:var(--c15t-line-height-tight);letter-spacing:inherit;font-weight:var(--c15t-font-weight-normal);border-radius:var(--accordion-radius,var(--c15t-radius-md));width:100%;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;flex:auto;align-self:stretch;padding:0;display:flex;position:relative}.c15t-ui-arrow-JFKgd:not(.headless){color:var(--accordion-arrow-color,color-mix(in srgb, var(--c15t-text-muted) 60%, var(--c15t-surface)));width:var(--accordion-icon-size,1.25rem);height:var(--accordion-icon-size,1.25rem);transition:transform var(--accordion-duration,var(--c15t-duration-normal)) var(--accordion-ease,var(--c15t-easing));flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.c15t-ui-arrow-JFKgd:not(.headless) svg{width:100%;height:100%;display:block}.c15t-dark .c15t-ui-arrow-JFKgd:not(.headless){color:var(--accordion-arrow-color-dark,color-mix(in srgb, var(--c15t-text-muted) 40%, var(--c15t-text)))}.c15t-ui-header-ogZie:not(.headless){flex-direction:column;flex:1;min-width:0;display:flex}.c15t-ui-title-vmC1f:not(.headless){font:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0}.c15t-ui-control-dy7nh:not(.headless){flex-shrink:0;align-self:center;position:relative;top:-1px}.c15t-ui-restriction-bXiI7:not(.headless){padding:0 var(--accordion-row-padding-x,var(--c15t-space-md)) .75rem;color:var(--accordion-restriction-color,var(--c15t-text-muted));font-size:var(--c15t-font-size-sm);line-height:var(--c15t-line-height-normal);grid-column:1/-1;margin:0;display:block}.c15t-ui-content-qdPhy:not(.headless){color:var(--accordion-content-color,color-mix(in srgb, var(--c15t-text-muted) 87%, var(--c15t-text)));letter-spacing:inherit;transition:grid-template-rows var(--accordion-duration,var(--c15t-duration-normal)) var(--accordion-ease,var(--c15t-easing));grid-template-rows:0fr;padding:0;font-size:.875rem;line-height:1.5;display:grid;overflow:hidden}.c15t-ui-content-qdPhy:not(.headless)[data-state=open]{grid-template-rows:1fr}.c15t-ui-content-qdPhy:not(.headless)[data-state=closed]{pointer-events:none}.c15t-ui-contentViewport-O2Kny:not(.headless){min-height:0;padding-top:0;padding-inline:calc(var(--accordion-icon-size,1.25rem) + var(--accordion-gap,var(--c15t-space-xs)));overflow:hidden}.c15t-ui-contentInner-b3ykf:not(.headless){opacity:1;transition:opacity calc(var(--accordion-duration,var(--c15t-duration-normal)) * .35) var(--c15t-easing-out);padding-top:0}.c15t-ui-content-qdPhy[data-state=open] .c15t-ui-contentViewport-O2Kny:not(.headless){padding-bottom:var(--accordion-padding,var(--c15t-space-sm))}.c15t-ui-content-qdPhy[data-state=closed] .c15t-ui-contentViewport-O2Kny:not(.headless){padding-bottom:0}.c15t-ui-content-qdPhy[data-state=closed] .c15t-ui-contentInner-b3ykf:not(.headless){opacity:0}.c15t-dark .c15t-ui-content-qdPhy:not(.headless){color:var(--accordion-content-color-dark,var(--c15t-text-muted))}:is([data-disable-animation] .c15t-ui-content-qdPhy:not(.headless),.disable-animation .c15t-ui-content-qdPhy:not(.headless)),:is([data-disable-animation] .c15t-ui-contentInner-b3ykf:not(.headless),.disable-animation .c15t-ui-contentInner-b3ykf:not(.headless)),:is([data-disable-animation] .c15t-ui-arrow-JFKgd:not(.headless),.disable-animation .c15t-ui-arrow-JFKgd:not(.headless)){transition:none}@media (prefers-reduced-motion:reduce){.c15t-ui-triggerRow-xXdTH:not(.headless),.c15t-ui-arrow-JFKgd:not(.headless),.c15t-ui-content-qdPhy:not(.headless),.c15t-ui-contentInner-b3ykf:not(.headless){transition:none}}
73
73
 
74
74
  /* components/collapsible */
75
75
  .c15t-ui-root-kvWB1{row-gap:var(--collapsible-gap);transition:row-gap var(--collapsible-duration) var(--collapsible-ease);width:100%;display:grid}.c15t-ui-root-kvWB1[data-state=closed]{row-gap:0}.c15t-ui-trigger-JJCBI{color:var(--c15t-text);cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:.5rem;padding:0;display:inline-flex}.c15t-ui-trigger-JJCBI:focus-visible{outline:2px solid var(--c15t-primary);outline-offset:2px}.c15t-ui-content-NAyDi{transition:grid-template-rows var(--collapsible-duration) var(--collapsible-ease);grid-template-rows:0fr;display:grid;overflow:hidden}.c15t-ui-content-NAyDi[data-state=open]{grid-template-rows:1fr}.c15t-ui-content-NAyDi[data-state=closed]{pointer-events:none}.c15t-ui-contentViewport-uLaLK{min-height:0;overflow:hidden}.c15t-ui-contentInner-E8hPF{color:var(--collapsible-content-color);opacity:1;transition:opacity calc(var(--collapsible-duration) * .35) var(--c15t-easing-out), transform calc(var(--collapsible-duration) * .35) var(--c15t-easing-out);will-change:opacity, transform;transform:translateY(0)}.c15t-ui-content-NAyDi[data-state=closed] .c15t-ui-contentInner-E8hPF{opacity:0;transform:translateY(-.125rem)}@media (prefers-reduced-motion:reduce){.c15t-ui-root-kvWB1,.c15t-ui-content-NAyDi,.c15t-ui-contentInner-E8hPF{transition:none}}
@@ -78,7 +78,7 @@
78
78
  .c15t-ui-manager-VznZW:not(.headless){width:100%;font-family:var(--consent-manager-font-family);line-height:var(--consent-manager-line-height);-webkit-font-smoothing:antialiased;position:relative}.c15t-ui-manager-VznZW:not(.headless)>:not([hidden])~:not([hidden]){--space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--space-y-reverse)));margin-bottom:calc(1.5rem * var(--space-y-reverse))}.c15t-ui-footer-fl3dz:not(.headless){padding:var(--consent-manager-footer-padding);background-color:var(--consent-manager-footer-background-color);justify-content:space-between;gap:1rem;display:flex}.c15t-dark .c15t-ui-footer-fl3dz:not(.headless){background-color:var(--consent-manager-footer-background-color-dark)}@media (width<=640px){.c15t-ui-footer-fl3dz:not(.headless){flex-direction:column}}@media (width>=640px){.c15t-ui-footer-fl3dz:not(.headless){flex-direction:row}}
79
79
 
80
80
  /* components/panel */
81
- .c15t-ui-root-I07nx:not(.headless){pointer-events:none;box-sizing:border-box;isolation:isolate;font-family:var(--consent-dialog-font-family);color:var(--c15t-text);line-height:var(--consent-dialog-line-height);-webkit-text-size-adjust:100%;tab-size:4;padding:var(--consent-dialog-card-padding-mobile);z-index:var(--consent-dialog-z-index);border-radius:var(--consent-dialog-card-radius);width:100%;height:var(--consent-dialog-height);background:0 0;border:0;justify-content:center;align-items:center;margin:0;display:flex;position:fixed;inset:0}.c15t-ui-root-I07nx:not(.headless)[data-blocking=true]{pointer-events:auto}.c15t-ui-root-I07nx:not(.headless)[dir=rtl]{direction:rtl}.c15t-ui-root-I07nx:not(.headless):focus{outline:none}@keyframes c15t-ui-consent-dialog-fade-in-I04Yp{0%{opacity:0}to{opacity:1}}@keyframes c15t-ui-consent-dialog-fade-out-t5_x2{0%{opacity:1}to{opacity:0}}.c15t-ui-overlay-c1WEk:not(.headless)[data-state=open]{animation:c15t-ui-consent-dialog-fade-in-I04Yp var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-overlay-c1WEk:not(.headless)[data-state=closed]{animation:c15t-ui-consent-dialog-fade-out-t5_x2 var(--consent-dialog-animation-duration) ease-in}.c15t-ui-root-I07nx:not(.headless)[data-state=open]{animation:c15t-ui-consent-dialog-fade-in-I04Yp var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-root-I07nx:not(.headless)[data-state=closed]{animation:c15t-ui-consent-dialog-fade-out-t5_x2 var(--consent-dialog-animation-duration) ease-in}.c15t-ui-root-I07nx[data-state=open] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-enter-vWVet var(--consent-dialog-animation-duration) var(--c15t-easing-spring)}.c15t-ui-root-I07nx[data-state=closed] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-exit-ioDiW var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-root-I07nx:not(.headless)[data-mode=dialog]{justify-content:center;align-items:center}:is(.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-left],.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-right]){justify-content:flex-start;align-items:stretch;padding:0}.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-right]{justify-content:flex-end}:is(.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-left] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-right] .c15t-ui-container-KTZOT:not(.headless)){z-index:var(--consent-dialog-z-index);width:min(100%, var(--consent-dialog-max-width));height:100%;max-height:100%;position:relative}:is(.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-left] .c15t-ui-card-ve6qQ:not(.headless),.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-right] .c15t-ui-card-ve6qQ:not(.headless)){border-radius:0;width:100%;height:100%;max-height:100%;margin:0}@keyframes c15t-ui-consent-dialog-slide-in-left-N9bgJ{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes c15t-ui-consent-dialog-slide-out-left-hkcUP{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes c15t-ui-consent-dialog-slide-in-right-L40wh{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes c15t-ui-consent-dialog-slide-out-right-GjtEq{0%{transform:translate(0)}to{transform:translate(100%)}}.c15t-ui-root-I07nx[data-mode=sidebar-left][data-state=open] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-consent-dialog-slide-in-left-N9bgJ var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-root-I07nx[data-mode=sidebar-left][data-state=closed] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-consent-dialog-slide-out-left-hkcUP var(--consent-dialog-animation-duration) ease-in}.c15t-ui-root-I07nx[data-mode=sidebar-right][data-state=open] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-consent-dialog-slide-in-right-L40wh var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-root-I07nx[data-mode=sidebar-right][data-state=closed] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-consent-dialog-slide-out-right-GjtEq var(--consent-dialog-animation-duration) ease-in}.c15t-ui-dialogVisible-dkX4M:not(.headless){opacity:1;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-dialogHidden-uBU9W:not(.headless){opacity:0;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-contentVisible-KxAWb:not(.headless){opacity:1;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing), transform var(--consent-dialog-animation-duration) var(--c15t-easing-spring);transform:scale(1)}.c15t-ui-contentHidden-LflgF:not(.headless){opacity:0;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing), transform var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing);transform:scale(.95)}@starting-style{.c15t-ui-dialogEntering-aakBt:not(.headless){opacity:0}.c15t-ui-contentEntering-N3wrp:not(.headless){opacity:0;transform:scale(.95)}}@media (width>=640px){.c15t-ui-root-I07nx:not(.headless){padding:var(--consent-dialog-card-padding);width:auto}}.c15t-ui-container-KTZOT:not(.headless){pointer-events:auto;flex-direction:column;width:100%;max-height:100%;display:flex}.c15t-ui-container-KTZOT:not(.headless):focus-visible{outline:none}.c15t-ui-container-KTZOT:not(.headless):focus-visible>.c15t-ui-card-ve6qQ:not(.headless){outline:2px solid var(--c15t-primary);outline-offset:2px}.c15t-ui-headerWrapper-DQg3z:not(.headless){position:relative}.c15t-ui-closeButton-uPYIe:not(.headless){position:absolute;top:22px;right:22px}.c15t-ui-footer-PeM4f:not(.headless){border-top:solid 1px var(--consent-dialog-stroke-color);justify-content:center;padding-top:1rem;padding-bottom:1rem;font-size:14px}.c15t-ui-overlay-c1WEk:not(.headless){color:var(--consent-dialog-link-text-color);background-color:var(--consent-dialog-overlay-background-color);z-index:var(--consent-dialog-overlay-z-index);position:fixed;inset:0}.c15t-ui-overlayVisible-gG3jJ:not(.headless){opacity:1;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-overlayHidden-eY362:not(.headless){opacity:0;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}@starting-style{.c15t-ui-overlayEntering-x3YKh:not(.headless){opacity:0}}.c15t-dark .c15t-ui-overlay-c1WEk:not(.headless){background-color:var(--consent-dialog-overlay-background-color-dark);color:var(--consent-dialog-link-text-color-dark)}.c15t-ui-card-ve6qQ:not(.headless){box-sizing:border-box;width:min(100%, var(--consent-dialog-max-width));max-height:var(--consent-dialog-max-height);border-radius:var(--consent-dialog-card-radius);border:var(--consent-dialog-border-width) var(--consent-dialog-border-style) var(--consent-dialog-border-color);background-color:var(--consent-dialog-background-color);color:var(--consent-dialog-foreground-color);box-shadow:var(--consent-dialog-card-shadow);flex-direction:column;margin:0 auto;display:flex;position:relative;overflow:visible}.c15t-dark .c15t-ui-card-ve6qQ:not(.headless){background-color:var(--consent-dialog-background-color-dark);color:var(--consent-dialog-foreground-color-dark);border-color:var(--consent-dialog-border-color-dark)}.c15t-ui-header-VbAnL:not(.headless){padding:var(--consent-dialog-card-padding);gap:var(--consent-dialog-header-gap);flex-direction:column;flex-shrink:0;display:flex}.c15t-ui-header-VbAnL:not(.headless)>*+*{margin-top:var(--consent-dialog-card-gap)}.c15t-ui-title-ErzRZ:not(.headless){font-weight:var(--consent-dialog-title-font-weight);font-size:var(--consent-dialog-title-font-size);letter-spacing:var(--consent-dialog-title-letter-spacing);margin:0;line-height:1}.c15t-ui-description-OQyBx:not(.headless){color:var(--consent-dialog-muted-color);font-size:var(--consent-dialog-description-font-size);font-weight:var(--consent-dialog-description-font-weight);line-height:var(--consent-dialog-description-line-height)}.c15t-dark .c15t-ui-description-OQyBx:not(.headless){color:var(--consent-dialog-muted-color-dark)}.c15t-ui-description-OQyBx[data-context=dialog]:not(.headless){color:var(--consent-dialog-muted-color);font-size:var(--consent-dialog-description-font-size);font-weight:var(--consent-dialog-description-font-weight);line-height:var(--consent-dialog-description-line-height)}.c15t-dark .c15t-ui-description-OQyBx[data-context=dialog]:not(.headless){color:var(--consent-dialog-muted-color-dark)}.c15t-ui-content-Y_5Ie:not(.headless){padding:var(--consent-dialog-card-padding);gap:var(--consent-dialog-content-gap);flex-direction:column;flex:auto;min-height:0;padding-top:0;display:flex;overflow-y:auto}.c15t-ui-content-Y_5Ie:not(.headless):has(>[data-testid=consent-widget-root]>[data-testid=consent-widget-accordion]){overflow-y:visible}.c15t-ui-content-Y_5Ie:not(.headless)>*{flex-shrink:0}.c15t-ui-content-Y_5Ie:not(.headless)>[data-testid=consent-widget-root]:not(.headless){flex-direction:column;flex:auto;min-height:0;display:flex}.c15t-ui-content-Y_5Ie:not(.headless)>[data-testid=consent-widget-root]:not(.headless)>[data-testid=consent-widget-accordion]{flex:auto;min-height:0;margin:-2px;padding:2px;overflow-y:auto}.c15t-ui-content-Y_5Ie:not(.headless)>[data-testid=consent-widget-root]:not(.headless)>[data-testid=consent-widget-footer]{flex-shrink:0}.c15t-ui-footer-PeM4f:not(.headless){justify-content:center;align-items:center;gap:var(--consent-dialog-footer-gap);font-size:var(--consent-dialog-footer-font-size);padding-top:var(--consent-dialog-footer-padding-y);padding-bottom:var(--consent-dialog-footer-padding-y);border-top:var(--consent-dialog-border-width) var(--consent-dialog-border-style) var(--consent-dialog-stroke-color);flex-direction:column;flex-shrink:0;display:flex}.c15t-ui-footer-PeM4f:not(.headless):empty{border-top:none;display:none}.c15t-dark .c15t-ui-footer-PeM4f:not(.headless){border-color:var(--consent-dialog-stroke-color-dark)}@media (prefers-reduced-motion:reduce){.c15t-ui-dialogVisible-dkX4M:not(.headless),.c15t-ui-dialogHidden-uBU9W:not(.headless),.c15t-ui-contentVisible-KxAWb:not(.headless),.c15t-ui-contentHidden-LflgF:not(.headless),.c15t-ui-overlayVisible-gG3jJ:not(.headless),.c15t-ui-overlayHidden-eY362:not(.headless),.c15t-ui-overlay-c1WEk:not(.headless)[data-state=open],.c15t-ui-overlay-c1WEk:not(.headless)[data-state=closed],.c15t-ui-root-I07nx:not(.headless)[data-state=open],.c15t-ui-root-I07nx:not(.headless)[data-state=closed],.c15t-ui-root-I07nx[data-state=open] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-state=closed] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-mode=sidebar-left][data-state=open] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-mode=sidebar-left][data-state=closed] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-mode=sidebar-right][data-state=open] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-mode=sidebar-right][data-state=closed] .c15t-ui-container-KTZOT:not(.headless){transition:none;animation:none}}.c15t-ui-overlay-c1WEk[data-disable-animation]:not(.headless)[data-state=open],.c15t-ui-overlay-c1WEk[data-disable-animation]:not(.headless)[data-state=closed],.c15t-ui-root-I07nx[data-disable-animation]:not(.headless)[data-state=open],.c15t-ui-root-I07nx[data-disable-animation]:not(.headless)[data-state=closed],.c15t-ui-root-I07nx[data-disable-animation][data-state=open] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-disable-animation][data-state=closed] .c15t-ui-container-KTZOT:not(.headless),.disable-animation .c15t-ui-overlay-c1WEk:not(.headless)[data-state=open],.disable-animation .c15t-ui-overlay-c1WEk:not(.headless)[data-state=closed],.disable-animation .c15t-ui-root-I07nx:not(.headless)[data-state=open],.disable-animation .c15t-ui-root-I07nx:not(.headless)[data-state=closed],.disable-animation .c15t-ui-root-I07nx[data-state=open] .c15t-ui-container-KTZOT:not(.headless),.disable-animation .c15t-ui-root-I07nx[data-state=closed] .c15t-ui-container-KTZOT:not(.headless),[data-disable-animation] .c15t-ui-overlay-c1WEk:not(.headless)[data-state=open],[data-disable-animation] .c15t-ui-overlay-c1WEk:not(.headless)[data-state=closed],[data-disable-animation] .c15t-ui-root-I07nx:not(.headless)[data-state=open],[data-disable-animation] .c15t-ui-root-I07nx:not(.headless)[data-state=closed],[data-disable-animation] .c15t-ui-root-I07nx[data-state=open] .c15t-ui-container-KTZOT:not(.headless),[data-disable-animation] .c15t-ui-root-I07nx[data-state=closed] .c15t-ui-container-KTZOT:not(.headless){animation:none}
81
+ .c15t-ui-root-I07nx:not(.headless){pointer-events:none;box-sizing:border-box;isolation:isolate;font-family:var(--consent-dialog-font-family);color:var(--c15t-text);line-height:var(--consent-dialog-line-height);-webkit-text-size-adjust:100%;tab-size:4;padding:var(--consent-dialog-card-padding-mobile);z-index:var(--consent-dialog-z-index);border-radius:var(--consent-dialog-card-radius);width:100%;height:var(--consent-dialog-height);background:0 0;border:0;justify-content:center;align-items:center;margin:0;display:flex;position:fixed;inset:0}.c15t-ui-root-I07nx:not(.headless)[data-blocking=true]{pointer-events:auto}.c15t-ui-root-I07nx:not(.headless)[dir=rtl]{direction:rtl}.c15t-ui-root-I07nx:not(.headless):focus{outline:none}@keyframes c15t-ui-consent-dialog-fade-in-I04Yp{0%{opacity:0}to{opacity:1}}@keyframes c15t-ui-consent-dialog-fade-out-t5_x2{0%{opacity:1}to{opacity:0}}.c15t-ui-overlay-c1WEk:not(.headless)[data-state=open]{animation:c15t-ui-consent-dialog-fade-in-I04Yp var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-overlay-c1WEk:not(.headless)[data-state=closed]{animation:c15t-ui-consent-dialog-fade-out-t5_x2 var(--consent-dialog-animation-duration) ease-in}.c15t-ui-root-I07nx:not(.headless)[data-state=open]{animation:c15t-ui-consent-dialog-fade-in-I04Yp var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-root-I07nx:not(.headless)[data-state=closed]{animation:c15t-ui-consent-dialog-fade-out-t5_x2 var(--consent-dialog-animation-duration) ease-in}.c15t-ui-root-I07nx[data-state=open] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-enter-vWVet var(--consent-dialog-animation-duration) var(--c15t-easing-spring)}.c15t-ui-root-I07nx[data-state=closed] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-exit-ioDiW var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-root-I07nx:not(.headless)[data-mode=dialog]{justify-content:center;align-items:center}:is(.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-left],.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-right]){justify-content:flex-start;align-items:stretch;padding:0}.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-right]{justify-content:flex-end}:is(.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-left] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-right] .c15t-ui-container-KTZOT:not(.headless)){z-index:var(--consent-dialog-z-index);width:min(100%, var(--consent-dialog-max-width));height:100%;max-height:100%;position:relative}:is(.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-left] .c15t-ui-card-ve6qQ:not(.headless),.c15t-ui-root-I07nx:not(.headless)[data-mode=sidebar-right] .c15t-ui-card-ve6qQ:not(.headless)){border-radius:0;width:100%;height:100%;max-height:100%;margin:0}@keyframes c15t-ui-consent-dialog-slide-in-left-N9bgJ{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes c15t-ui-consent-dialog-slide-out-left-hkcUP{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes c15t-ui-consent-dialog-slide-in-right-L40wh{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes c15t-ui-consent-dialog-slide-out-right-GjtEq{0%{transform:translate(0)}to{transform:translate(100%)}}.c15t-ui-root-I07nx[data-mode=sidebar-left][data-state=open] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-consent-dialog-slide-in-left-N9bgJ var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-root-I07nx[data-mode=sidebar-left][data-state=closed] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-consent-dialog-slide-out-left-hkcUP var(--consent-dialog-animation-duration) ease-in}.c15t-ui-root-I07nx[data-mode=sidebar-right][data-state=open] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-consent-dialog-slide-in-right-L40wh var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-root-I07nx[data-mode=sidebar-right][data-state=closed] .c15t-ui-container-KTZOT:not(.headless){animation:c15t-ui-consent-dialog-slide-out-right-GjtEq var(--consent-dialog-animation-duration) ease-in}.c15t-ui-dialogVisible-dkX4M:not(.headless){opacity:1;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-dialogHidden-uBU9W:not(.headless){opacity:0;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-contentVisible-KxAWb:not(.headless){opacity:1;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing), transform var(--consent-dialog-animation-duration) var(--c15t-easing-spring);transform:scale(1)}.c15t-ui-contentHidden-LflgF:not(.headless){opacity:0;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing), transform var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing);transform:scale(.95)}@starting-style{.c15t-ui-dialogEntering-aakBt:not(.headless){opacity:0}.c15t-ui-contentEntering-N3wrp:not(.headless){opacity:0;transform:scale(.95)}}@media (width>=640px){.c15t-ui-root-I07nx:not(.headless){padding:var(--consent-dialog-card-padding);width:auto}}.c15t-ui-container-KTZOT:not(.headless){pointer-events:auto;flex-direction:column;width:100%;max-height:100%;display:flex}.c15t-ui-container-KTZOT:not(.headless):focus-visible{outline:none}.c15t-ui-container-KTZOT:not(.headless):focus-visible>.c15t-ui-card-ve6qQ:not(.headless){outline:2px solid var(--c15t-primary);outline-offset:2px}.c15t-ui-headerWrapper-DQg3z:not(.headless){position:relative}.c15t-ui-closeButton-uPYIe:not(.headless){position:absolute;top:22px;right:22px}.c15t-ui-footer-PeM4f:not(.headless){border-top:solid 1px var(--consent-dialog-stroke-color);justify-content:center;padding-top:1rem;padding-bottom:1rem;font-size:14px}.c15t-ui-overlay-c1WEk:not(.headless){color:var(--consent-dialog-link-text-color);background-color:var(--consent-dialog-overlay-background-color);z-index:var(--consent-dialog-overlay-z-index);position:fixed;inset:0}.c15t-ui-overlayVisible-gG3jJ:not(.headless){opacity:1;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}.c15t-ui-overlayHidden-eY362:not(.headless){opacity:0;transition:opacity var(--consent-dialog-animation-duration) var(--consent-dialog-animation-timing)}@starting-style{.c15t-ui-overlayEntering-x3YKh:not(.headless){opacity:0}}.c15t-dark .c15t-ui-overlay-c1WEk:not(.headless){background-color:var(--consent-dialog-overlay-background-color-dark);color:var(--consent-dialog-link-text-color-dark)}.c15t-ui-card-ve6qQ:not(.headless){box-sizing:border-box;width:min(100%, var(--consent-dialog-max-width));max-height:var(--consent-dialog-max-height);border-radius:var(--consent-dialog-card-radius);border:var(--consent-dialog-border-width) var(--consent-dialog-border-style) var(--consent-dialog-border-color);background-color:var(--consent-dialog-background-color);color:var(--consent-dialog-foreground-color);box-shadow:var(--consent-dialog-card-shadow);flex-direction:column;margin:0 auto;display:flex;position:relative;overflow:visible}.c15t-dark .c15t-ui-card-ve6qQ:not(.headless){background-color:var(--consent-dialog-background-color-dark);color:var(--consent-dialog-foreground-color-dark);border-color:var(--consent-dialog-border-color-dark)}.c15t-ui-header-VbAnL:not(.headless){padding:var(--consent-dialog-card-padding);gap:var(--consent-dialog-header-gap);flex-direction:column;flex-shrink:0;display:flex}.c15t-ui-header-VbAnL:not(.headless)>*+*{margin-top:var(--consent-dialog-card-gap)}.c15t-ui-title-ErzRZ:not(.headless){font-weight:var(--consent-dialog-title-font-weight);font-size:var(--consent-dialog-title-font-size);letter-spacing:var(--consent-dialog-title-letter-spacing);margin:0;line-height:1}.c15t-ui-description-OQyBx:not(.headless){color:var(--consent-dialog-muted-color);font-size:var(--consent-dialog-description-font-size);font-weight:var(--consent-dialog-description-font-weight);line-height:var(--consent-dialog-description-line-height)}.c15t-dark .c15t-ui-description-OQyBx:not(.headless){color:var(--consent-dialog-muted-color-dark)}.c15t-ui-description-OQyBx[data-context=dialog]:not(.headless){color:var(--consent-dialog-muted-color);font-size:var(--consent-dialog-description-font-size);font-weight:var(--consent-dialog-description-font-weight);line-height:var(--consent-dialog-description-line-height)}.c15t-dark .c15t-ui-description-OQyBx[data-context=dialog]:not(.headless){color:var(--consent-dialog-muted-color-dark)}.c15t-ui-content-Y_5Ie:not(.headless){padding:var(--consent-dialog-card-padding);gap:var(--consent-dialog-content-gap);flex-direction:column;flex:auto;min-height:0;padding-top:0;display:flex;overflow-y:auto}.c15t-ui-content-Y_5Ie:not(.headless):has(>[data-testid=consent-widget-root]>[data-testid=consent-widget-accordion]){overflow-y:visible}.c15t-ui-content-Y_5Ie:not(.headless)>*{flex-shrink:0}.c15t-ui-content-Y_5Ie:not(.headless)>[data-testid=consent-widget-root]:not(.headless){flex-direction:column;flex:auto;min-height:0;display:flex}.c15t-ui-content-Y_5Ie:not(.headless)>[data-testid=consent-widget-root]:not(.headless)>[data-testid=consent-widget-accordion]{flex:auto;min-height:0;margin:-2px;padding:2px;overflow-y:auto!important}.c15t-ui-content-Y_5Ie:not(.headless)>[data-testid=consent-widget-root]:not(.headless)>[data-testid=consent-widget-footer]{flex-shrink:0}.c15t-ui-footer-PeM4f:not(.headless){justify-content:center;align-items:center;gap:var(--consent-dialog-footer-gap);font-size:var(--consent-dialog-footer-font-size);padding-top:var(--consent-dialog-footer-padding-y);padding-bottom:var(--consent-dialog-footer-padding-y);border-top:var(--consent-dialog-border-width) var(--consent-dialog-border-style) var(--consent-dialog-stroke-color);flex-direction:column;flex-shrink:0;display:flex}.c15t-ui-footer-PeM4f:not(.headless):empty{border-top:none;display:none}.c15t-dark .c15t-ui-footer-PeM4f:not(.headless){border-color:var(--consent-dialog-stroke-color-dark)}@media (prefers-reduced-motion:reduce){.c15t-ui-dialogVisible-dkX4M:not(.headless),.c15t-ui-dialogHidden-uBU9W:not(.headless),.c15t-ui-contentVisible-KxAWb:not(.headless),.c15t-ui-contentHidden-LflgF:not(.headless),.c15t-ui-overlayVisible-gG3jJ:not(.headless),.c15t-ui-overlayHidden-eY362:not(.headless),.c15t-ui-overlay-c1WEk:not(.headless)[data-state=open],.c15t-ui-overlay-c1WEk:not(.headless)[data-state=closed],.c15t-ui-root-I07nx:not(.headless)[data-state=open],.c15t-ui-root-I07nx:not(.headless)[data-state=closed],.c15t-ui-root-I07nx[data-state=open] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-state=closed] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-mode=sidebar-left][data-state=open] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-mode=sidebar-left][data-state=closed] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-mode=sidebar-right][data-state=open] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-mode=sidebar-right][data-state=closed] .c15t-ui-container-KTZOT:not(.headless){transition:none;animation:none}}.c15t-ui-overlay-c1WEk[data-disable-animation]:not(.headless)[data-state=open],.c15t-ui-overlay-c1WEk[data-disable-animation]:not(.headless)[data-state=closed],.c15t-ui-root-I07nx[data-disable-animation]:not(.headless)[data-state=open],.c15t-ui-root-I07nx[data-disable-animation]:not(.headless)[data-state=closed],.c15t-ui-root-I07nx[data-disable-animation][data-state=open] .c15t-ui-container-KTZOT:not(.headless),.c15t-ui-root-I07nx[data-disable-animation][data-state=closed] .c15t-ui-container-KTZOT:not(.headless),.disable-animation .c15t-ui-overlay-c1WEk:not(.headless)[data-state=open],.disable-animation .c15t-ui-overlay-c1WEk:not(.headless)[data-state=closed],.disable-animation .c15t-ui-root-I07nx:not(.headless)[data-state=open],.disable-animation .c15t-ui-root-I07nx:not(.headless)[data-state=closed],.disable-animation .c15t-ui-root-I07nx[data-state=open] .c15t-ui-container-KTZOT:not(.headless),.disable-animation .c15t-ui-root-I07nx[data-state=closed] .c15t-ui-container-KTZOT:not(.headless),[data-disable-animation] .c15t-ui-overlay-c1WEk:not(.headless)[data-state=open],[data-disable-animation] .c15t-ui-overlay-c1WEk:not(.headless)[data-state=closed],[data-disable-animation] .c15t-ui-root-I07nx:not(.headless)[data-state=open],[data-disable-animation] .c15t-ui-root-I07nx:not(.headless)[data-state=closed],[data-disable-animation] .c15t-ui-root-I07nx[data-state=open] .c15t-ui-container-KTZOT:not(.headless),[data-disable-animation] .c15t-ui-root-I07nx[data-state=closed] .c15t-ui-container-KTZOT:not(.headless){animation:none}
82
82
 
83
83
  /* components/preference-item */
84
84
  .c15t-ui-root-O9Wgf{align-items:start;column-gap:var(--preference-item-gap);grid-template-columns:minmax(0,1fr) auto;row-gap:0;width:100%;display:grid}.c15t-ui-trigger-jd_B0{align-items:flex-start;gap:var(--preference-item-leading-gap);text-align:left;width:100%;min-width:0;color:var(--c15t-text);cursor:pointer;background:0 0;border:0;padding:0;display:flex}.c15t-ui-trigger-jd_B0:focus-visible{outline:2px solid var(--preference-item-focus-ring);outline-offset:2px}.c15t-ui-leading-exw6I{flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.c15t-ui-header-HJIda{flex-direction:column;flex:1;min-width:0;display:flex}.c15t-ui-title-CCKRH{color:var(--c15t-text);font:inherit;min-width:0;margin:0}.c15t-ui-meta-tK1eS{color:var(--c15t-text-muted);font:inherit;margin:0}.c15t-ui-auxiliary-b8p9d{flex-wrap:wrap;align-items:center;gap:.375rem;min-width:0;display:flex}.c15t-ui-control-ppUQm{flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.c15t-ui-content-npfsa{transition:grid-template-rows var(--preference-item-duration) var(--preference-item-ease);grid-column:1/-1;grid-template-rows:0fr;display:grid;overflow:hidden}.c15t-ui-content-npfsa[data-state=open]{grid-template-rows:1fr}.c15t-ui-content-npfsa[data-state=closed]{pointer-events:none}.c15t-ui-contentViewport-TH10a{min-height:0;overflow:hidden}.c15t-ui-contentInner-yZmkz{color:var(--preference-item-content-color)}@media (prefers-reduced-motion:reduce){.c15t-ui-content-npfsa{transition:none}}
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- let e="3.0.0";export{e as version};
1
+ let e="3.1.0-canary.0";export{e as version};
@@ -0,0 +1,23 @@
1
+ import type { AdTechProvider } from '@c15t/core';
2
+ import type { FC } from 'react';
3
+ import type { VendorId } from '../types.js';
4
+ /**
5
+ * Providers matching the vendor search. A vendor selected from the Purposes
6
+ * tab is never an ad tech provider, since providers process no TCF
7
+ * purposes, so a selection hides them all.
8
+ */
9
+ export declare const filterAdTechProviders: (providers: AdTechProvider[], searchTerm: string, selectedVendorId: VendorId | null) => AdTechProvider[];
10
+ interface AdTechProviderSectionProps {
11
+ /** Providers to list, already filtered by the vendor search. */
12
+ providers: AdTechProvider[];
13
+ /** Consent switches keyed by provider ID. */
14
+ consents: Record<string, boolean>;
15
+ onToggle?: (providerId: number, value: boolean) => void;
16
+ }
17
+ /**
18
+ * Google Additional Consent providers in the vendor list. Each row shows the
19
+ * provider's name and privacy policy without expanding, which is what the
20
+ * Additional Consent spec requires before a provider counts as disclosed.
21
+ */
22
+ export declare const AdTechProviderSection: FC<AdTechProviderSectionProps>;
23
+ export {};
@@ -1,4 +1,4 @@
1
- import type { GlobalVendorList } from '@c15t/core';
1
+ import type { AdTechProvider, GlobalVendorList } from '@c15t/core';
2
2
  import type { FC } from 'react';
3
3
  import type { ProcessedPurpose, VendorId } from '../types.js';
4
4
  interface CustomVendor {
@@ -26,6 +26,12 @@ interface VendorListProps {
26
26
  vendorLegitimateInterests?: Record<string, boolean>;
27
27
  /** Handler for legitimate interest objection toggle */
28
28
  onVendorLegitimateInterestToggle?: (vendorId: VendorId, value: boolean) => void;
29
+ /** Google ad tech providers disclosed for Additional Consent. */
30
+ adTechProviders?: AdTechProvider[];
31
+ /** Consent switches for those providers, keyed by provider ID. */
32
+ adTechProviderConsents?: Record<string, boolean>;
33
+ /** Handler for an ad tech provider consent switch. */
34
+ onAdTechProviderToggle?: (providerId: number, value: boolean) => void;
29
35
  }
30
36
  export declare const VendorList: FC<VendorListProps>;
31
37
  export {};
@@ -56,6 +56,8 @@ interface IABTranslations {
56
56
  iabVendorsNotice: string;
57
57
  customVendorsHeading: string;
58
58
  customVendorsNotice: string;
59
+ adTechProvidersHeading: string;
60
+ adTechProvidersNotice: string;
59
61
  purposes: string;
60
62
  specialPurposes: string;
61
63
  specialFeatures: string;
@@ -15,6 +15,8 @@ export interface ReactIABState extends KernelIABState {
15
15
  setPurposeConsent: (purposeId: number, value: boolean) => void;
16
16
  setPurposeLegitimateInterest: (purposeId: number, value: boolean) => void;
17
17
  setSpecialFeatureOptIn: (featureId: number, value: boolean) => void;
18
+ /** Set consent for a Google ad tech provider (Additional Consent). */
19
+ setAdTechProviderConsent: (providerId: number, value: boolean) => void;
18
20
  acceptAll: () => void;
19
21
  rejectAll: () => void;
20
22
  save: () => Promise<void>;
@@ -1 +1 @@
1
- export declare const version = "3.0.0";
1
+ export declare const version = "3.1.0-canary.0";
@@ -234,6 +234,152 @@ preference centres show it as allowed, and saving without touching it encodes
234
234
  it as allowed. `introducedLegitimateInterest` from `@c15t/iab/headless` lists
235
235
  those purposes and vendors for custom preference UIs.
236
236
 
237
+ ## Add Google Additional Consent
238
+
239
+ Google's Additional Consent (AC) string carries consent for Google ad tech
240
+ providers (ATPs) that are not on the IAB Global Vendor List. The TC String
241
+ cannot name them, so without an AC string those providers get no consent
242
+ signal and Google cannot serve personalised ads through them.
243
+
244
+ Take the provider IDs from Google's
245
+ [Additional Consent provider list](https://storage.googleapis.com/tcfac/additional-consent-providers.csv).
246
+ c15t ignores IDs that Google does not list. When Google removes a provider
247
+ from the list, usually because it joined the Global Vendor List, it leaves
248
+ the AC string on the visitor's next page load.
249
+
250
+ ### List the providers on your backend
251
+
252
+ A self-hosted backend lists the providers in its manifest's `iab` block,
253
+ next to `customVendors`. It loads each provider's name and privacy policy the
254
+ way it loads the vendor list, caches them, and sends them in `/init` to every
255
+ visitor whose policy uses IAB TCF. Framework servers and browsers that
256
+ resolve `/init` from the manifest load the same providers.
257
+
258
+ ```ts
259
+ manifest: {
260
+ iab: {
261
+ enabled: true,
262
+ cmpId: 123,
263
+ additionalConsent: {
264
+ // Google ATP IDs: Meta and Snap Inc.
265
+ providers: [89, 2572],
266
+ },
267
+ },
268
+ },
269
+ ```
270
+
271
+ The backend's `additionalConsent` option sets the cache, which defaults to the
272
+ `gvl` cache, and `enabled: false` stops `/init` from serving the providers. See
273
+ [instance options](https://c15t.com/docs/self-host/api/configuration#instance-options).
274
+
275
+ ### List the providers in the browser
276
+
277
+ Offline mode has no backend, and some backends do not list providers. In
278
+ those setups, pass `additionalConsent` with your other IAB options: the
279
+ `IABProvider` props in React, Next.js and TanStack Start, the `createIAB`
280
+ options in JavaScript, and the `iab` option of the Vue, Nuxt, Svelte, Astro
281
+ and script-tag setups. A list passed here replaces the one the backend sent.
282
+
283
+ ```ts
284
+ additionalConsent: {
285
+ providers: [89, 2572],
286
+ },
287
+ ```
288
+
289
+ ### What the visitor sees
290
+
291
+ The Vendors tab of the preference centre gets a Google Ad Tech Providers
292
+ section. Each provider shows its name, a link to the privacy policy Google
293
+ lists for it, and a consent switch. Accept All switches every provider on,
294
+ and Reject All switches them off. The banner's partner count includes them.
295
+
296
+ The names and links come from `https://gvl.inth.app/additional-consent`.
297
+ The backend fetches them when the providers are listed in its manifest. When
298
+ they are listed in the browser, c15t fetches them as the CMP mounts, in
299
+ parallel with the vendor list. To serve the list yourself, set `endpoint` in
300
+ the manifest's `additionalConsent`, or `url` in the browser option. c15t
301
+ requests `?providerIds=89,2572` and expects JSON in this shape:
302
+
303
+ ```json
304
+ {
305
+ "providers": {
306
+ "89": {
307
+ "id": 89,
308
+ "name": "Meta",
309
+ "policyUrl": "https://www.facebook.com/about/privacy/update"
310
+ }
311
+ }
312
+ }
313
+ ```
314
+
315
+ If the list does not load, the response carries no providers and c15t writes
316
+ no AC string. The TC String works as before.
317
+
318
+ ### What vendors receive
319
+
320
+ After the visitor saves, `__tcfapi` returns the AC string as `addtlConsent`,
321
+ next to `tcString`, from `getTCData`, `getInAppTCData` and `addEventListener`
322
+ callbacks. It uses version 2 of Google's format, for example `2~89~dv.2572`.
323
+ The part before `~dv.` lists the providers the visitor consented to. The part
324
+ after it lists the providers they were shown but did not consent to. After
325
+ Reject All, every provider is in the second part: `2~~dv.89.2572`.
326
+
327
+ A provider counts as consented only when its switch is on and the visitor
328
+ also consented to TCF purposes 1, 3 and 4: storing information on the device,
329
+ and creating and using profiles for personalised advertising. Google's spec
330
+ requires consent to device storage and to personalised ads before a provider
331
+ can be listed as consented. Without those purposes, the provider is listed as
332
+ shown only.
333
+
334
+ c15t writes an AC string only together with a TC String, because Google
335
+ discards an AC string that arrives without one. It stores the string in the
336
+ `addtl_consent` cookie and localStorage entry next to `euconsent-v2`, and
337
+ removes both when it withdraws the TC String. A returning visitor gets their
338
+ saved provider choices back. A provider you add later has not been shown to
339
+ them, so it stays out of their AC string until they save again. A provider
340
+ you remove and add back keeps the choice the visitor saved for it.
341
+
342
+ When the visitor's policy does not use IAB TCF, `__tcfapi` reports
343
+ `gdprApplies: false` and returns no `tcString` or `addtlConsent`. CMP API v2
344
+ allows only `cmpId`, `cmpVersion` and `tcfPolicyVersion` beside it, plus the
345
+ status fields.
346
+
347
+ A self-hosted backend records the AC string with each consent, in the
348
+ `addtlConsent` column of the `consent` table beside the TC String. Run the
349
+ backend's migrations after upgrading to add the column. Consents recorded
350
+ before then, and consents saved without a TC String, store `null`.
351
+
352
+ ### Send the string with ad requests
353
+
354
+ Pixels and ad requests that cannot call `__tcfapi` take the AC string in the
355
+ `addtl_consent` URL parameter. Google's ad renderers replace the
356
+ `${ADDTL_CONSENT}` macro, as in `&addtl_consent=${ADDTL_CONSENT}`. For
357
+ requests your own code builds, read the string from `__tcfapi`, add it next
358
+ to the TC String, and then send the request. This pixel fires once the CMP
359
+ answers with TCF data:
360
+
361
+ ```js
362
+ window.__tcfapi('getTCData', 2, (data, success) => {
363
+ if (!success || !data.gdprApplies) {
364
+ return;
365
+ }
366
+ const url = new URL('https://ads.example.com/pixel');
367
+ url.searchParams.set('gdpr_consent', data.tcString);
368
+ if (data.addtlConsent) {
369
+ url.searchParams.set('addtl_consent', data.addtlConsent);
370
+ }
371
+ new Image().src = url.toString();
372
+ });
373
+ ```
374
+
375
+ ### Ask Google to list your CMP ID
376
+
377
+ Google accepts AC strings only from a CMP registered with IAB Europe, using
378
+ its own CMP ID. It lists the CMPs it has certified on its
379
+ [Additional Consent page](https://support.google.com/admanager/answer/9681920).
380
+ Ask Google to list your CMP ID through its CMP intake form before you rely on
381
+ the AC string in production.
382
+
237
383
  ## How the preference centre shows features
238
384
 
239
385
  The stock IAB preference centres in React, Next.js, Vue, Svelte, Astro and the
@@ -94,7 +94,8 @@ configuration and browser limits.
94
94
 
95
95
  ## Let visitors turn off one vendor
96
96
 
97
- A visitor can allow marketing and still switch off one vendor in it. Pass
97
+ Optional: a visitor can allow marketing and still switch off one vendor in it.
98
+ Skip this unless your site needs per-vendor choices. Pass
98
99
  `vendors` to the provider options. Helpers from `@c15t/integrations` already carry
99
100
  their vendor slug. See [vendor consent](./vendor-consent.md).
100
101
 
@@ -8,6 +8,15 @@ group: frameworks
8
8
 
9
9
  ## How vendor consent works
10
10
 
11
+ Vendor consent is optional. Most sites need only categories, and the stock
12
+ preference dialog shows only category switches until you declare a vendor
13
+ in `vendors` or on the backend. Add vendor switches when a visitor must be
14
+ able to refuse one vendor inside a category they allow.
15
+
16
+ A helper vendor the visitor previously switched off stays visible, even
17
+ without a vendor declaration. Its saved denial still blocks loading until
18
+ the visitor turns it on and saves. Other helper vendors stay hidden.
19
+
11
20
  A visitor allows marketing, then switches off X Pixel. Other marketing
12
21
  scripts load; X Pixel does not. c15t loads a script, network request or
13
22
  iframe that names a vendor only when both are true:
@@ -22,9 +31,9 @@ TC string instead; see [IAB TCF](./iab.md).
22
31
 
23
32
  ## Declare the vendors
24
33
 
25
- Built-in `@c15t/integrations` helpers already list their vendor by name, so
26
- you only declare a vendor for a script of your own, or to replace a helper's
27
- name and privacy policy.
34
+ Declaring a vendor turns on vendor switches. Built-in `@c15t/integrations`
35
+ helpers then list their own vendor by name, so you only declare a vendor for a
36
+ script of your own, or to replace a helper's name and privacy policy.
28
37
 
29
38
  Declare the vendors next to the scripts in `src/scripts.ts`, using the `vendor`
30
39
  slug each script already carries:
@@ -70,11 +79,13 @@ helper sets `vendor` to its script ID, so `xPixel()` is `x-pixel`, `gtag()`
70
79
  is `gtag` and `cloudflareZaraz()` is `cloudflare-zaraz`. Each
71
80
  [vendor guide](../../integrations/overview.md) names its slug.
72
81
 
73
- You don't need to declare a helper's vendor. Each helper also sets
74
- `vendorDetails` on its script: the vendor's name, privacy policy, homepage
75
- and legal entity. The dialog lists the vendor with its own switch from
76
- those. Declare the vendor in `vendors` to replace them, for example to link
77
- your own data processing notice, or when you self-host a tool such as
82
+ Each helper also sets `vendorDetails` on its script: the vendor's name,
83
+ privacy policy, homepage and legal entity. Until you declare a vendor, a
84
+ helper's slug only gates loading and the dialog has no switch for it. Once
85
+ you declare any vendor, in `vendors` or on the backend, the dialog also lists
86
+ every helper's vendor by name with its own switch, so you don't need to
87
+ declare those. Declare a helper's vendor to replace its details, for example
88
+ to link your own data processing notice, or when you self-host a tool such as
78
89
  Matomo, Umami, Plausible or PostHog and the vendor's privacy policy doesn't
79
90
  cover your install. A declaration replaces `vendorDetails` as a whole and
80
91
  doesn't merge with it.
@@ -177,8 +188,8 @@ the same as withdrawing a category, so code the vendor already ran stops.
177
188
  Test the production build in a private window with DevTools Network open and
178
189
  filtered to `ads-twitter.com`:
179
190
 
180
- 1. Register `xPixel()`. Open Privacy settings. The marketing row lists X
181
- Pixel with a switch.
191
+ 1. Register `xPixel()` and declare the vendors from this page. Open Privacy
192
+ settings. The marketing row lists X Pixel with a switch.
182
193
  2. Allow marketing and save. `uwt.js` loads.
183
194
  3. Open Privacy settings, switch X Pixel off and save. c15t reloads the
184
195
  page. After the reload there is no `uwt.js` request, and other marketing
@@ -129,9 +129,10 @@ on revocation and how to check it.
129
129
 
130
130
  ## Vendor switches and cookie cleanup
131
131
 
132
- Every helper sets a `vendor` slug and the vendor's name and privacy policy, so
133
- the preference dialog lists the vendor with its own switch. A visitor can allow
134
- a category and still switch one vendor off. c15t then does not load that
132
+ Every helper sets a `vendor` slug and the vendor's name and privacy policy.
133
+ Vendor switches are optional: the preference dialog shows only categories until
134
+ you declare a vendor. Once you do, it lists each helper's vendor with its own
135
+ switch, and a visitor can allow a category and still switch one vendor off. c15t then does not load that
135
136
  vendor's script. Helpers that load on every page, such as Google Tag Manager,
136
137
  Microsoft UET and Mixpanel, still load and send the vendor a denied signal
137
138
  instead. The dialog lists `necessary` helpers without a switch. Declare
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c15t/react",
3
- "version": "3.0.0",
3
+ "version": "3.1.0-canary.0",
4
4
  "description": "React cookie banner, consent manager, preference center, and headless CMP components with IAB TCF and Consent Mode support.",
5
5
  "keywords": [
6
6
  "ccpa",
@@ -264,16 +264,16 @@
264
264
  "test:watch": "bun prebuild && vitest"
265
265
  },
266
266
  "dependencies": {
267
- "@c15t/core": "3.0.0",
268
- "@c15t/dev-tools": "3.0.0",
269
- "@c15t/iab": "3.0.0",
270
- "@c15t/schema": "3.0.0",
271
- "@c15t/translations": "3.0.0",
272
- "@c15t/ui": "3.0.0",
267
+ "@c15t/core": "3.1.0-canary.0",
268
+ "@c15t/dev-tools": "3.1.0-canary.0",
269
+ "@c15t/iab": "3.1.0-canary.0",
270
+ "@c15t/schema": "3.1.0-canary.0",
271
+ "@c15t/translations": "3.1.0-canary.0",
272
+ "@c15t/ui": "3.0.1-canary.0",
273
273
  "@types/google.maps": "3.65.3"
274
274
  },
275
275
  "devDependencies": {
276
- "@c15t/backend": "3.0.0",
276
+ "@c15t/backend": "3.1.0-canary.0",
277
277
  "@c15t/conformance": "0.0.1",
278
278
  "@c15t/typescript-config": "0.0.1",
279
279
  "@c15t/vitest-config": "1.0.0",