mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
2 lines
9.2 KiB
JavaScript
Executable File
2 lines
9.2 KiB
JavaScript
Executable File
"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[8042],{48042:(e,a,t)=>{t.r(a),t.d(a,{DsaModal:()=>ne});var n=t(30758),i=t(88677),s=t(13534),r=t(18367),l=t(64399),d=t(12602),o=t(92107),c=t(61548),u=t(88560),m=t(43980),v=t(77970),g=t(73188);const E="vkMQw77rXE4cp8xsAdzl",f="emw6kR941D2wReukhCAJ";var h=t(86070),N=function(e){var a=e.advertiser,t=e.legalEntityName,n=((0,u.L)()||{item:null}).item,i=n&&(0,v.N)(n)?null==n?void 0:n.images:void 0,r=(0,g.h)(i);return(0,h.jsxs)("div",{className:E,children:[r&&(0,h.jsx)(m._,{className:f,src:r,loading:"lazy"}),(0,h.jsx)(s.E,{variant:"bodyMediumBold","aria-label":a,children:a}),t&&(0,h.jsx)(s.E,{variant:"bodySmall",semanticColor:"textSubdued","aria-label":t,children:t})]})},x=(t(78551),t(25550),t(28430),t(43379),t(82467),t(34192),t(15342),t(9582),t(31682)),T=t(39944),R=t(14515);const p="khENZvA4G9EjpLQiINss",b="Fu87PEr0tL6oDjmw_X2H";var y=function(e){var a=e.title,t=e.showTitle,n=e.children;return(0,h.jsxs)("section",{className:p,children:[t&&(0,h.jsx)(s.E,{className:b,variant:"bodyMediumBold",as:"h3","aria-label":a,children:a}),n]})},j=t(72918);const A="P9gpV_sgryfUERYOdfor";var _=function(e){var a=e.text,t=e.icon;return(0,h.jsxs)(j.K,{className:A,condensed:!0,children:[t,(0,h.jsx)(s.E,{variant:"bodyMedium","aria-label":a,as:"h4",children:a})]})},w=(t(28169),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}({}));var G={fromJSON:function(e){return{targetingTypes:globalThis.Array.isArray(null==e?void 0:e.targetingTypes)?e.targetingTypes.map((function(e){return function(e){switch(e){case 0:case"UNKNOWN":return w.UNKNOWN;case 1:case"AGE":return w.AGE;case 2:case"GEO":return w.GEO;case 3:case"GENDER":return w.GENDER;case 4:case"INTEREST":return w.INTEREST;default:return w.UNRECOGNIZED}}(e)})):[],legalEntityName:S(e.legalEntityName)?globalThis.String(e.legalEntityName):"",showTailoredAdsSection:S(e.showTailoredAdsSection)?Boolean(e.showTailoredAdsSection):void 0}},toJSON:function(e){var a,t={};return null!==(a=e.targetingTypes)&&void 0!==a&&a.length&&(t.targetingTypes=e.targetingTypes.map((function(e){return function(e){switch(e){case w.UNKNOWN:return"UNKNOWN";case w.AGE:return"AGE";case w.GEO:return"GEO";case w.GENDER:return"GENDER";case w.INTEREST:return"INTEREST";case w.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e)}))),""!==e.legalEntityName&&(t.legalEntityName=e.legalEntityName),void 0!==e.showTailoredAdsSection&&(t.showTailoredAdsSection=e.showTailoredAdsSection),t},create:function(e){return G.fromPartial(null!=e?e:{})},fromPartial:function(e){var a,t,n,i={targetingTypes:[],legalEntityName:"",showTailoredAdsSection:void 0};return i.targetingTypes=(null===(a=e.targetingTypes)||void 0===a?void 0:a.map((function(e){return e})))||[],i.legalEntityName=null!==(t=e.legalEntityName)&&void 0!==t?t:"",i.showTailoredAdsSection=null!==(n=e.showTailoredAdsSection)&&void 0!==n?n:void 0,i}};function S(e){return null!=e}const O="FB2PxTNhkGbwFwYI2ufG",I="gZYgXNWbFSAAjLzGhOI9",k="eYxzC4s3Nw68RcbK7xzl",C="QrelMvam4WOTMVaO28Rl",B="_EaBFRLKy0nZJXkiRwlx",D="N77hKGzNc_lKQ5OG1EBN",U="JceC3xibcl3MHVULIK0b",M="Uk72m6OFBBdTZ3RJb0K_",K="IFqCps3krPbH25azco3F";var F=function(e){var a=e.activeTargetingTypes,t=[w.GEO,w.INTEREST].some((function(e){return a.includes(e)}));if(!t)return null;var n=t&&a.some((function(e){return e===w.AGE||e===w.GENDER}));return(0,h.jsx)(y,{title:o.Ru.get("ad-formats.dsa.modal.otherInfo"),showTitle:n,children:(0,h.jsx)(R.b,{className:K,condensedAll:!0,children:a.map((function(e){var a=function(e){switch(e){case w.GEO:return{icon:(0,h.jsx)(x.t,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.location")};case w.INTEREST:return{icon:(0,h.jsx)(T.T,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.interests")};default:return null}}(e);return a?(0,h.jsx)(_,{icon:a.icon,text:a.text},e):null}))})})},L=(t(56922),t(54515)),W=t(1358),Z=t(94842),z=t(96234),J=t(85726),P=t(42239),Y=t(99426),q=t(12430);var Q=function(e){var a=e.activeTargetingTypes,t=e.item,n=(0,J.vh)(),i=(0,q.L)().openURLWithSessionTransfer;return[w.AGE,w.GENDER].some((function(e){return a.includes(e)}))?(0,h.jsxs)(y,{title:o.Ru.get("ad-formats.dsa.modal.profileInfo"),showTitle:!0,children:[(0,h.jsx)(R.b,{className:K,condensedAll:!0,style:{marginBlockEnd:(0,Z.po)("base")},children:a.map((function(e){var a=function(e){switch(e){case w.AGE:return{icon:(0,h.jsx)(L.w,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.age")};case w.GENDER:return{icon:(0,h.jsx)(W.v,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.gender")};default:return null}}(e);return a?(0,h.jsx)(_,{icon:a.icon,text:a.text},e):null}))}),(0,h.jsx)(s.E,{variant:"bodyMedium",semanticColor:"textSubdued","aria-label":o.Ru.get("ad-formats.dsa.modal.adRelevancyAction"),children:o.Ru.get("ad-formats.dsa.modal.adRelevancyAction")}),(0,h.jsxs)(z.Y,{component:"button","aria-label":"Edit your Spotify profile, link",className:D,semanticColor:"textBrightAccent",onClick:function(){var e,a;i(Y.vE),n.send((0,d.m)({ad_id:t.adId,lineitem_id:null===(e=t.metadata)||void 0===e?void 0:e.lineitem_id,creative_id:null===(a=t.metadata)||void 0===a?void 0:a.creative_id,slot:t.slot,event:"event_clicked",reason:"edit_profile",surface:"ad_dsa_view"}))},standalone:!0,children:[(0,h.jsx)(s.E,{variant:"bodyMediumBold",as:"h2",children:o.Ru.get("ad-formats.dsa.modal.editProfile")}),(0,h.jsx)(P.p,{semanticColor:"textBrightAccent"})]})]}):null},V=function(e){var a=e.item,t=(0,J.vh)(),n=(0,q.L)().openURLWithSessionTransfer;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("hr",{className:U}),(0,h.jsx)(s.E,{className:M,variant:"titleSmall","aria-label":o.Ru.get("ad-formats.dsa.modal.aboutTailoredAds"),as:"h2",children:o.Ru.get("ad-formats.dsa.modal.aboutTailoredAds")}),(0,h.jsx)(s.E,{variant:"bodyMedium",semanticColor:"textSubdued","aria-label":o.Ru.get("ad-formats.dsa.modal.tailoredAds"),children:o.Ru.get("ad-formats.dsa.modal.tailoredAds")}),(0,h.jsxs)(z.Y,{component:"button","aria-label":"Visit your privacy settings, link",className:D,semanticColor:"textBrightAccent",onClick:function(){var e,i;n("".concat(Y.k$,"/#tailored-ads")),t.send((0,d.m)({ad_id:a.adId,creative_id:null===(e=a.metadata)||void 0===e?void 0:e.creative_id,event:"event_clicked",lineitem_id:null===(i=a.metadata)||void 0===i?void 0:i.lineitem_id,reason:"change_preferences",request_id:a.requestId,slot:a.slot,surface:"ad_dsa_view"}))},standalone:!0,children:[(0,h.jsx)(s.E,{variant:"bodyMediumBold",as:"h2",children:o.Ru.get("ad-formats.dsa.modal.privacySetting")}),(0,h.jsx)(P.p,{semanticColor:"textBrightAccent"})]})]})},X=t(62822),H=t(12341),$=t(93091),ee=t.n($),ae=t(8214),te=t(47540),ne=function(e){var a=e.item,t=(0,J.vh)(),u=(0,i.wA)(),m=(0,i.d4)((function(e){return e.ui.dsaDialog})).isOpen,v=function(e){var a=(0,n.useState)(null),t=(0,H.A)(a,2),i=t[0],s=t[1],r=(0,n.useState)(!1),l=(0,H.A)(r,2),d=l[0],o=l[1];return(0,n.useEffect)((function(){var a,t=function(){var e=(0,X.A)(ee().mark((function e(a){var t;return ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o(!0),e.next=4,ae.ZY(a);case 4:t=e.sent,s(G.fromJSON(t)),o(!1),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),o(!1);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(a){return e.apply(this,arguments)}}();null!=e&&null!==(a=e.metadata)&&void 0!==a&&a.lineitem_id&&e.adId&&t({lineitemId:e.metadata.lineitem_id,adId:e.adId})}),[e]),{data:i,loading:d}}(a),g=v.data,E=v.loading;return(0,n.useEffect)((function(){var e,n;t.send((0,d.m)({ad_id:a.adId,creative_id:null===(e=a.metadata)||void 0===e?void 0:e.creative_id,event:"event_viewed",lineitem_id:null===(n=a.metadata)||void 0===n?void 0:n.lineitem_id,reason:"ad_dsa_view",request_id:a.requestId,slot:a.slot,surface:"ad_dsa_view"}))}),[]),(0,h.jsxs)(te.A,{className:O,isOpen:m,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,contentLabel:o.Ru.get("ad-formats.dsa.aboutThisAd"),children:[(0,h.jsx)("div",{className:k,children:(0,h.jsx)(s.E,{"aria-label":o.Ru.get("ad-formats.dsa.aboutThisAd"),variant:"titleMedium",as:"h1",children:o.Ru.get("ad-formats.dsa.aboutThisAd")})}),(0,h.jsx)("hr",{className:U}),(0,h.jsx)("div",{className:I,children:E?(0,h.jsx)("div",{className:C,"data-testid":"loading-indicator",children:(0,h.jsx)(r.U,{size:"large"})}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(N,{advertiser:a.metadata.advertiser,legalEntityName:null==g?void 0:g.legalEntityName}),null!=g&&g.targetingTypes.length?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s.E,{className:M,variant:"titleSmall",as:"h2","aria-label":o.Ru.get("ad-formats.dsa.modal.adBasedInfoExplanation"),children:o.Ru.get("ad-formats.dsa.modal.adBasedInfoExplanation")}),(0,h.jsx)(Q,{item:a,activeTargetingTypes:null==g?void 0:g.targetingTypes}),(0,h.jsx)(F,{item:a,activeTargetingTypes:null==g?void 0:g.targetingTypes})]}):(0,h.jsx)(s.E,{className:M,as:"h2","aria-label":o.Ru.get("ad-formats.dsa.modal.targeting.unknown"),tabIndex:0,children:o.Ru.get("ad-formats.dsa.modal.targeting.unknown")}),(null==g?void 0:g.showTailoredAdsSection)&&(0,h.jsx)(V,{item:a})]})}),(0,h.jsx)("button",{"aria-label":o.Ru.get("close_button_action"),className:B,onClick:function(){u((0,c.ft)())},children:(0,h.jsx)(l.M,{size:"medium",semanticColor:"textBase"})})]})}}}]);
|
|
//# sourceMappingURL=8042.js.map
|