-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path8384.js
1 lines (1 loc) · 14.2 KB
/
8384.js
1
"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[8384],{98384:(e,a,t)=>{t.d(a,{DsaModal:()=>ae});var n=t(30758),i=t(62411),s=t(13505),r=t(58885),o=t(27508);function c(e){return{name:"AdDSAEvent",environments:["browser","device","desktop"],data:e}}var l=t(93492),d=t(12032),m=t(64612),u=t(48450),g=t(82414),h=t(51496);const v="vkMQw77rXE4cp8xsAdzl",E="emw6kR941D2wReukhCAJ";var f=t(86070);const x=({advertiser:e,legalEntityName:a})=>{const{item:t}=(0,m.L)()||{item:null},n=t&&(0,g.N)(t)?t?.images:void 0,i=(0,h.h)(n);return(0,f.jsxs)("div",{className:v,children:[i&&(0,f.jsx)(u._,{className:E,src:i,loading:"lazy"}),(0,f.jsx)(s.E,{variant:"bodyMediumBold","aria-label":e,children:e}),a&&(0,f.jsx)(s.E,{variant:"bodySmall",semanticColor:"textSubdued","aria-label":a,children:a})]})};var N=t(43871),y=t(12323);function p(e){var a,t,i,s,r,o=e.size?y.$Z[e.size]:e.iconSize,c=(0,y._C)([{size:16,svgContent:"<path d='M6.5.003a.75.75 0 0 0-.75.75V12.25c0 .414.336.75.75.75h3a.75.75 0 0 0 .75-.75V.753a.75.75 0 0 0-.75-.75h-3ZM7.25 11.5V1.503h1.5V11.5h-1.5ZM0 16h16v-1.5H0V16Zm0-8.25A.75.75 0 0 1 .75 7h3a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-3a.75.75 0 0 1-.75-.75v-4.5Zm1.5.75v3H3v-3H1.5Zm10.75-4.504a.75.75 0 0 0-.75.75v7.5c0 .414.336.75.75.75h3a.75.75 0 0 0 .75-.75v-7.5a.75.75 0 0 0-.75-.75h-3Zm.75 7.5v-6h1.5v6H13Z'/>"},{size:24,svgContent:"<path d='M9.25 3a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3.5a1 1 0 0 1-1-1V3Zm3.5 1h-1.5v12h1.5V4ZM22 22H2v-2h20v2ZM3 10a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h3.5a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1H3Zm1 6v-4h1.5v4H4Zm12.5-9a1 1 0 0 1 1-1H21a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3.5a1 1 0 0 1-1-1V7Zm3.5 9V8h-1.5v8H20Z'/>"}],o||24),l=null!==(a=e.autoMirror)&&void 0!==a&&a;return n.createElement(y.In,Object.assign({},e,{autoMirror:l,viewBox:"0 0 ".concat(c.size," ").concat(c.size),dangerouslySetInnerHTML:{__html:"".concat((s=e.title,r=e.titleId,s?"<title ".concat(r?'id="'.concat(r,'"'):"",">").concat(s,"</title>"):"")).concat((t=e.desc,i=e.descId,t?"<desc ".concat(i?'id="'.concat(i,'"'):"",">").concat(t,"</desc>"):"")).concat(c.svgContent)}}))}var T=t(55480);const b="khENZvA4G9EjpLQiINss",R="Fu87PEr0tL6oDjmw_X2H",A=({title:e,showTitle:a,children:t})=>(0,f.jsxs)("section",{className:b,children:[a&&(0,f.jsx)(s.E,{className:R,variant:"bodyMediumBold",as:"h3","aria-label":e,children:e}),t]});var j=t(47517);const w="P9gpV_sgryfUERYOdfor",_=({text:e,icon:a})=>(0,f.jsxs)(j.K,{className:w,condensed:!0,children:[a,(0,f.jsx)(s.E,{variant:"bodyMedium","aria-label":e,as:"h4",children:e})]});let z=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.AGE=1]="AGE",e[e.GEO=2]="GEO",e[e.GENDER=3]="GENDER",e[e.INTEREST=4]="INTEREST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});const I={fromJSON:e=>({targetingTypes:globalThis.Array.isArray(e?.targetingTypes)?e.targetingTypes.map((e=>function(e){switch(e){case 0:case"UNKNOWN":return z.UNKNOWN;case 1:case"AGE":return z.AGE;case 2:case"GEO":return z.GEO;case 3:case"GENDER":return z.GENDER;case 4:case"INTEREST":return z.INTEREST;default:return z.UNRECOGNIZED}}(e))):[],legalEntityName:S(e.legalEntityName)?globalThis.String(e.legalEntityName):"",showTailoredAdsSection:S(e.showTailoredAdsSection)?Boolean(e.showTailoredAdsSection):void 0}),toJSON(e){const a={};return e.targetingTypes?.length&&(a.targetingTypes=e.targetingTypes.map((e=>function(e){switch(e){case z.UNKNOWN:return"UNKNOWN";case z.AGE:return"AGE";case z.GEO:return"GEO";case z.GENDER:return"GENDER";case z.INTEREST:return"INTEREST";case z.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e)))),""!==e.legalEntityName&&(a.legalEntityName=e.legalEntityName),void 0!==e.showTailoredAdsSection&&(a.showTailoredAdsSection=e.showTailoredAdsSection),a},create:e=>I.fromPartial(e??{}),fromPartial(e){const a={targetingTypes:[],legalEntityName:"",showTailoredAdsSection:void 0};return a.targetingTypes=e.targetingTypes?.map((e=>e))||[],a.legalEntityName=e.legalEntityName??"",a.showTailoredAdsSection=e.showTailoredAdsSection??void 0,a}};function S(e){return null!=e}const C="FB2PxTNhkGbwFwYI2ufG",M="gZYgXNWbFSAAjLzGhOI9",G="eYxzC4s3Nw68RcbK7xzl",O="QrelMvam4WOTMVaO28Rl",Z="_EaBFRLKy0nZJXkiRwlx",k="N77hKGzNc_lKQ5OG1EBN",V="JceC3xibcl3MHVULIK0b",B="Uk72m6OFBBdTZ3RJb0K_",D="IFqCps3krPbH25azco3F";const H=({activeTargetingTypes:e})=>{const a=[z.GEO,z.INTEREST].some((a=>e.includes(a)));if(!a)return null;const t=a&&e.some((e=>e===z.AGE||e===z.GENDER));return(0,f.jsx)(A,{title:l.Ru.get("ad-formats.dsa.modal.otherInfo"),showTitle:t,children:(0,f.jsx)(T.b,{className:D,condensedAll:!0,children:e.map((e=>{const a=function(e){switch(e){case z.GEO:return{icon:(0,f.jsx)(N.t,{}),text:l.Ru.get("ad-formats.dsa.modal.targeting.location")};case z.INTEREST:return{icon:(0,f.jsx)(p,{}),text:l.Ru.get("ad-formats.dsa.modal.targeting.interests")};default:return null}}(e);return a?(0,f.jsx)(_,{icon:a.icon,text:a.text},e):null}))})})};function L(e){var a,t,i,s,r,o=e.size?y.$Z[e.size]:e.iconSize,c=(0,y._C)([{size:16,svgContent:"<path d='M9.5 2.4c0 .74-.302 1.207-.75 1.434v1.49h4.5c.966 0 1.75.784 1.75 1.75v1.917c0 .74-.284 1.415-.75 1.92v3.839c0 .69-.56 1.25-1.25 1.25H3c-.69 0-1.25-.56-1.25-1.25v-3.839A2.823 2.823 0 0 1 1 8.991V7.074c0-.966.784-1.75 1.75-1.75h4.5v-1.49C6.802 3.607 6.5 3.14 6.5 2.4c0-.937.809-1.723 1.284-2.184A8.73 8.73 0 0 0 8 0c.057.06.131.133.216.216C8.691.677 9.5 1.463 9.5 2.4Zm-6.25 9.364V14.5h9.5v-2.736c-.188.04-.383.06-.583.06h-.094a2.732 2.732 0 0 1-1.975-.84 2.823 2.823 0 0 1-2.098.93c-.832 0-1.58-.359-2.098-.93-.499.518-1.2.84-1.975.84h-.094c-.2 0-.395-.02-.583-.06Zm6.833-3.43a.75.75 0 0 1 .75.75c0 .685.556 1.24 1.24 1.24h.094c.736 0 1.333-.597 1.333-1.333V7.074a.25.25 0 0 0-.25-.25H2.75a.25.25 0 0 0-.25.25v1.917c0 .736.597 1.333 1.333 1.333h.094a1.24 1.24 0 0 0 1.24-1.24.75.75 0 0 1 .75-.75h.003a.75.75 0 0 1 .75.75 1.33 1.33 0 1 0 2.66 0 .75.75 0 0 1 .75-.75h.003Z'/>"},{size:24,svgContent:"<path d='M13 5.793c.598-.284 1-.868 1-1.793 0-1.17-1.079-2.154-1.711-2.73-.114-.104-.213-.194-.289-.27-.076.076-.175.166-.289.27C11.08 1.846 10 2.83 10 4c0 .925.402 1.509 1 1.793V7.9H5a3 3 0 0 0-2.993 2.8H2v2.4a3.99 3.99 0 0 0 1 2.646V21a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5.254c.622-.705 1-1.632 1-2.646v-2.4h-.007A3 3 0 0 0 19 7.9h-6V5.793ZM5 9.9h14a1 1 0 0 1 1 1v2.2a2 2 0 1 1-4 0V13a1 1 0 0 0-2 0v.1a2 2 0 1 1-4 0V13a1 1 0 0 0-2 0v.1a2 2 0 1 1-4 0v-2.2a1 1 0 0 1 1-1Zm14 7.074V21H5v-4.026a4.006 4.006 0 0 0 4-1.228 3.99 3.99 0 0 0 3 1.354 3.99 3.99 0 0 0 3-1.354 3.99 3.99 0 0 0 4 1.228Z'/>"}],o||24),l=null!==(a=e.autoMirror)&&void 0!==a&&a;return n.createElement(y.In,Object.assign({},e,{autoMirror:l,viewBox:"0 0 ".concat(c.size," ").concat(c.size),dangerouslySetInnerHTML:{__html:"".concat((s=e.title,r=e.titleId,s?"<title ".concat(r?'id="'.concat(r,'"'):"",">").concat(s,"</title>"):"")).concat((t=e.desc,i=e.descId,t?"<desc ".concat(i?'id="'.concat(i,'"'):"",">").concat(t,"</desc>"):"")).concat(c.svgContent)}}))}var U=t(45959),K=t(70585),F=t(74905),P=t(26906),W=t(99155),J=t(94910),$=t(42626);const Y=({activeTargetingTypes:e,item:a})=>{const t=(0,P.vh)(),{openURLWithSessionTransfer:n}=(0,$.L)();return[z.AGE,z.GENDER].some((a=>e.includes(a)))?(0,f.jsxs)(A,{title:l.Ru.get("ad-formats.dsa.modal.profileInfo"),showTitle:!0,children:[(0,f.jsx)(T.b,{className:D,condensedAll:!0,style:{marginBlockEnd:(0,K.po)("base")},children:e.map((e=>{const a=function(e){switch(e){case z.AGE:return{icon:(0,f.jsx)(L,{}),text:l.Ru.get("ad-formats.dsa.modal.targeting.age")};case z.GENDER:return{icon:(0,f.jsx)(U.v,{}),text:l.Ru.get("ad-formats.dsa.modal.targeting.gender")};default:return null}}(e);return a?(0,f.jsx)(_,{icon:a.icon,text:a.text},e):null}))}),(0,f.jsx)(s.E,{variant:"bodyMedium",semanticColor:"textSubdued","aria-label":l.Ru.get("ad-formats.dsa.modal.adRelevancyAction"),children:l.Ru.get("ad-formats.dsa.modal.adRelevancyAction")}),(0,f.jsxs)(F.Y,{component:"button","aria-label":"Edit your Spotify profile, link",className:k,semanticColor:"textBrightAccent",onClick:()=>{n(J.vE),t.send(c({ad_id:a.adId,lineitem_id:a.metadata?.lineitem_id,creative_id:a.metadata?.creative_id,slot:a.slot,event:"event_clicked",reason:"edit_profile",surface:"ad_dsa_view"}))},standalone:!0,children:[(0,f.jsx)(s.E,{variant:"bodyMediumBold",as:"h2",children:l.Ru.get("ad-formats.dsa.modal.editProfile")}),(0,f.jsx)(W.p,{semanticColor:"textBrightAccent"})]})]}):null},q=({item:e})=>{const a=(0,P.vh)(),{openURLWithSessionTransfer:t}=(0,$.L)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("hr",{className:V}),(0,f.jsx)(s.E,{className:B,variant:"titleSmall","aria-label":l.Ru.get("ad-formats.dsa.modal.aboutTailoredAds"),as:"h2",children:l.Ru.get("ad-formats.dsa.modal.aboutTailoredAds")}),(0,f.jsx)(s.E,{variant:"bodyMedium",semanticColor:"textSubdued","aria-label":l.Ru.get("ad-formats.dsa.modal.tailoredAds"),children:l.Ru.get("ad-formats.dsa.modal.tailoredAds")}),(0,f.jsxs)(F.Y,{component:"button","aria-label":"Visit your privacy settings, link",className:k,semanticColor:"textBrightAccent",onClick:()=>{t(`${J.k$}/#tailored-ads`),a.send(c({ad_id:e.adId,creative_id:e.metadata?.creative_id,event:"event_clicked",lineitem_id:e.metadata?.lineitem_id,reason:"change_preferences",request_id:e.requestId,slot:e.slot,surface:"ad_dsa_view"}))},standalone:!0,children:[(0,f.jsx)(s.E,{variant:"bodyMediumBold",as:"h2",children:l.Ru.get("ad-formats.dsa.modal.privacySetting")}),(0,f.jsx)(W.p,{semanticColor:"textBrightAccent"})]})]})};var Q=t(35422);const X=e=>{const[a,t]=(0,n.useState)(null),[i,s]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{e?.metadata?.lineitem_id&&e.adId&&(async e=>{try{s(!0);const a=await Q.ZY(e);t(I.fromJSON(a)),s(!1)}catch(e){s(!1)}})({lineitemId:e.metadata.lineitem_id,adId:e.adId})}),[e]),{data:a,loading:i}};var ee=t(71353);const ae=({item:e})=>{const a=(0,P.vh)(),t=(0,i.wA)(),{isOpen:m}=(0,i.d4)((e=>e.ui.dsaDialog)),{data:u,loading:g}=X(e);return(0,n.useEffect)((()=>{a.send(c({ad_id:e.adId,creative_id:e.metadata?.creative_id,event:"event_viewed",lineitem_id:e.metadata?.lineitem_id,reason:"ad_dsa_view",request_id:e.requestId,slot:e.slot,surface:"ad_dsa_view"}))}),[]),(0,f.jsxs)(ee.A,{className:C,isOpen:m,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,contentLabel:l.Ru.get("ad-formats.dsa.aboutThisAd"),children:[(0,f.jsx)("div",{className:G,children:(0,f.jsx)(s.E,{"aria-label":l.Ru.get("ad-formats.dsa.aboutThisAd"),variant:"titleMedium",as:"h1",children:l.Ru.get("ad-formats.dsa.aboutThisAd")})}),(0,f.jsx)("hr",{className:V}),(0,f.jsx)("div",{className:M,children:g?(0,f.jsx)("div",{className:O,"data-testid":"loading-indicator",children:(0,f.jsx)(r.U,{size:"large"})}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(x,{advertiser:e.metadata.advertiser,legalEntityName:u?.legalEntityName}),u?.targetingTypes.length?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.E,{className:B,variant:"titleSmall",as:"h2","aria-label":l.Ru.get("ad-formats.dsa.modal.adBasedInfoExplanation"),children:l.Ru.get("ad-formats.dsa.modal.adBasedInfoExplanation")}),(0,f.jsx)(Y,{item:e,activeTargetingTypes:u?.targetingTypes}),(0,f.jsx)(H,{item:e,activeTargetingTypes:u?.targetingTypes})]}):(0,f.jsx)(s.E,{className:B,as:"h2","aria-label":l.Ru.get("ad-formats.dsa.modal.targeting.unknown"),tabIndex:0,children:l.Ru.get("ad-formats.dsa.modal.targeting.unknown")}),u?.showTailoredAdsSection&&(0,f.jsx)(q,{item:e})]})}),(0,f.jsx)("button",{"aria-label":l.Ru.get("close_button_action"),className:Z,onClick:()=>{t((0,d.ft)())},children:(0,f.jsx)(o.M,{size:"medium",semanticColor:"textBase"})})]})}},43871:(e,a,t)=>{t.d(a,{t:()=>s});var n=t(30758),i=t(12323);function s(e){var a,t,s,r,o,c=e.size?i.$Z[e.size]:e.iconSize,l=(0,i._C)([{size:16,svgContent:"<path d='M8 1.562a4.732 4.732 0 0 0-3.47 7.95l.013.014L8 13.646l3.456-4.12.013-.013A4.732 4.732 0 0 0 8 1.563zM1.768 6.294a6.232 6.232 0 1 1 10.813 4.225L8 15.98l-4.582-5.46a6.212 6.212 0 0 1-1.65-4.225z'/><path d='M8 5.05a1.243 1.243 0 1 0 0 2.488A1.243 1.243 0 0 0 8 5.05zM5.257 6.295a2.743 2.743 0 1 1 5.486 0 2.743 2.743 0 0 1-5.486 0z'/>"},{size:24,svgContent:"<path d='M12 2.465a7.25 7.25 0 0 0-5.32 12.177l.018.018L12 20.979l5.302-6.318.017-.018A7.25 7.25 0 0 0 12 2.466zm-9.25 7.25a9.25 9.25 0 1 1 16.052 6.268L12 24.09l-6.803-8.107A9.22 9.22 0 0 1 2.75 9.715z'/><path d='M12 7.715a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm-4 2a4 4 0 1 1 8 0 4 4 0 0 1-8 0z'/>"}],c||24),d=null!==(a=e.autoMirror)&&void 0!==a&&a;return n.createElement(i.In,Object.assign({},e,{autoMirror:d,viewBox:"0 0 ".concat(l.size," ").concat(l.size),dangerouslySetInnerHTML:{__html:"".concat((r=e.title,o=e.titleId,r?"<title ".concat(o?'id="'.concat(o,'"'):"",">").concat(r,"</title>"):"")).concat((t=e.desc,s=e.descId,t?"<desc ".concat(s?'id="'.concat(s,'"'):"",">").concat(t,"</desc>"):"")).concat(l.svgContent)}}))}},58885:(e,a,t)=>{t.d(a,{U:()=>E});var n=t(32511),i=t(30758),s=t(63616),r=t(32037),o=t(93414),c=t(87150),l=t(59804),d=(0,c.i7)(["0%{animation-timing-function:cubic-bezier(1,0,0.7,1);opacity:0.5;transform:scale(1);}40%{animation-timing-function:cubic-bezier(0.3,0,0,1);opacity:0.75;transform:scale(1.3);}72.5%{animation-timing-function:linear;opacity:0.5;transform:scale(1);}100%{opacity:0.5;transform:scale(1);}"]),m=l.Ay.circle.withConfig({displayName:"ProgressDot",componentId:"sc-734kfk-0"})(["fill:",";animation:"," 1.32s linear infinite;transform-origin:center;&:nth-of-type(2){animation-delay:",";}&:nth-of-type(3){animation-delay:",";}[dir='rtl'] &{&:nth-of-type(1){animation-delay:",";}&:nth-of-type(3){animation-delay:0s;}}"],(0,r.oj)(r.ZI.essentialBase),d,o.Z_,o.yJ,o.yJ),u=t(11101),g=function(e){switch(e){case"small":return 56;case"medium":return 84;case"large":return 112;default:return(0,u.x)(e)}},h=l.Ay.svg.withConfig({displayName:"ProgressDotsSvg",componentId:"sc-18dhrwh-0"})(["content:'';block-size:","px;inline-size:","px;"],(function(e){return g(e.$size)/4.5}),(function(e){return g(e.$size)})),v=["size","role","ariaValueText"],E=i.forwardRef((function(e,a){var t=e.size,r=void 0===t?"small":t,o=e.role,c=void 0===o?"progressbar":o,l=e.ariaValueText,d=void 0===l?"Loading":l,u=(0,n.A)(e,v);return i.createElement(h,Object.assign({xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 1 100",xmlSpace:"preserve",$size:r,role:c,"aria-valuetext":d,ref:a},u,{"data-encore-id":s.j.ProgressDots}),i.createElement(m,{stroke:"none",cx:"-140",cy:"50",r:"32"}),i.createElement(m,{stroke:"none",cx:"0",cy:"50",r:"32"}),i.createElement(m,{stroke:"none",cx:"140",cy:"50",r:"32"}))}))}}]);