Module 772167

13,068 characters · in b60e195c52a56db6.js
Dependencies
Source Raw
function(e,t,i){i.d(t,{u5:()=>G,vw:()=>H,Cf:()=>B,wx:()=>W});var n,s=i(477900),r=i(582128),a=i(834730),l=i(366010),o=i(947641),d=i(408278),c=i(624479),u=i(821609),m=i(695366),p=i(194261),f=i(297264),h=i(331322),b=i(17928),g=i(661531),x=i(144165),C=i(325499),v=i(914410),_=i(363195),j=i(174459),R=i(58703),E=i(975571),P=i(38405),A=i(149995),y=i(398523),N=i(881373),T=i(264779),I=i(852218);function w(){return(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsxs)("g",{clipPath:"url(#clip0_5398_22750)",children:[(0,s.jsx)("mask",{id:"mask0_5398_22750",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:(0,s.jsx)("path",{d:"M0 0H20V20H0V0Z",fill:"white"})}),(0,s.jsxs)("g",{mask:"url(#mask0_5398_22750)",children:[(0,s.jsx)("path",{d:"M11.7346 16.986C8.84262 16.986 6.49024 14.6399 6.49024 11.756C6.49024 8.87208 8.84262 6.52593 11.7346 6.52593C14.6257 6.52593 16.9781 8.87208 16.9781 11.756C16.9781 14.6399 14.6257 16.986 11.7346 16.986ZM13.2458 3.65049V1.50705C13.2458 0.674633 12.5688 -0.00012207 11.7346 -0.00012207C10.9 -0.00012207 10.2235 0.674633 10.2235 1.50705V3.65002C6.87415 4.26987 4.22771 6.90882 3.60668 10.2497H1.51117C0.676547 10.2497 0 10.924 0 11.756C0 12.5884 0.676547 13.2631 1.51117 13.2631H3.60668C4.31898 17.0925 7.69231 19.9999 11.7346 19.9999C16.2926 19.9999 20 16.3019 20 11.756C20 7.72482 17.084 4.36044 13.2458 3.65049Z",fill:"#FBFBFB"}),(0,s.jsx)("path",{d:"M10.7447 11.765C10.7447 11.2291 11.1817 10.7932 11.7181 10.7932C12.2558 10.7932 12.6929 11.2291 12.6929 11.765C12.6929 12.3003 12.2558 12.7363 11.7181 12.7363C11.1817 12.7363 10.7447 12.3003 10.7447 11.765ZM8.47461 11.765C8.47461 13.549 9.9298 15.0008 11.7181 15.0008C13.5073 15.0008 14.9625 13.549 14.9625 11.765C14.9625 9.98094 13.5073 8.52914 11.7181 8.52914C9.9298 8.52914 8.47461 9.98094 8.47461 11.765Z",fill:"#FBFBFB"}),(0,s.jsx)("path",{d:"M5.42451 4.15601C5.42451 4.9889 4.74703 5.66553 3.91146 5.66553C3.07542 5.66553 2.39746 4.9889 2.39746 4.15601C2.39746 3.32266 3.07542 2.6465 3.91146 2.6465C4.74703 2.6465 5.42451 3.32266 5.42451 4.15601Z",fill:"#FBFBFB"})]})]}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"clip0_5398_22750",children:(0,s.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})}function O(){return(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsxs)("g",{clipPath:"url(#clip0_5398_22756)",children:[(0,s.jsx)("mask",{id:"mask0_5398_22756",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:(0,s.jsx)("path",{d:"M0 0H20V20H0V0Z",fill:"white"})}),(0,s.jsxs)("g",{mask:"url(#mask0_5398_22756)",children:[(0,s.jsx)("path",{d:"M11.7346 16.986C8.84262 16.986 6.49024 14.6399 6.49024 11.756C6.49024 8.87208 8.84262 6.52593 11.7346 6.52593C14.6257 6.52593 16.9781 8.87208 16.9781 11.756C16.9781 14.6399 14.6257 16.986 11.7346 16.986ZM13.2458 3.65049V1.50705C13.2458 0.674633 12.5688 -0.00012207 11.7346 -0.00012207C10.9 -0.00012207 10.2235 0.674633 10.2235 1.50705V3.65002C6.87415 4.26987 4.22771 6.90882 3.60668 10.2497H1.51117C0.676547 10.2497 0 10.924 0 11.756C0 12.5884 0.676547 13.2631 1.51117 13.2631H3.60668C4.31898 17.0925 7.69231 19.9999 11.7346 19.9999C16.2926 19.9999 20 16.3019 20 11.756C20 7.72482 17.084 4.36044 13.2458 3.65049Z",fill:"#2F3035"}),(0,s.jsx)("path",{d:"M10.7447 11.765C10.7447 11.2291 11.1817 10.7932 11.7181 10.7932C12.2558 10.7932 12.6929 11.2291 12.6929 11.765C12.6929 12.3003 12.2558 12.7363 11.7181 12.7363C11.1817 12.7363 10.7447 12.3003 10.7447 11.765ZM8.47461 11.765C8.47461 13.549 9.9298 15.0008 11.7181 15.0008C13.5073 15.0008 14.9625 13.549 14.9625 11.765C14.9625 9.98094 13.5073 8.52914 11.7181 8.52914C9.9298 8.52914 8.47461 9.98094 8.47461 11.765Z",fill:"#2F3035"}),(0,s.jsx)("path",{d:"M5.42451 4.15601C5.42451 4.9889 4.74703 5.66553 3.91146 5.66553C3.07542 5.66553 2.39746 4.9889 2.39746 4.15601C2.39746 3.32266 3.07542 2.6465 3.91146 2.6465C4.74703 2.6465 5.42451 3.32266 5.42451 4.15601Z",fill:"#2F3035"})]})]}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"clip0_5398_22756",children:(0,s.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})}function M(){return(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsxs)("g",{clipPath:"url(#clip0_5402_26507)",children:[(0,s.jsx)("path",{d:"M10 19.1252C5.31783 19.1252 1.52212 15.3294 1.52212 10.6474C1.52212 5.96514 5.31783 2.16943 10 2.16943C14.6821 2.16943 18.4778 5.96514 18.4778 10.6474C18.4778 15.3294 14.6821 19.1252 10 19.1252ZM10 -2.28882e-05C4.47718 -2.28882e-05 0 4.47716 0 10C0 15.5228 4.47718 20 10 20C15.5228 20 20 15.5228 20 10C20 4.47716 15.5228 -2.28882e-05 10 -2.28882e-05Z",fill:"#FBFBFB"}),(0,s.jsx)("path",{d:"M16.518 10.0407C16.146 8.811 15.3522 7.95319 13.9908 8.03448C13.3579 8.07227 12.8226 8.29801 12.2416 8.52348C11.5189 8.80392 10.7774 8.95798 10 8.95798C9.22266 8.95798 8.48125 8.80392 7.75856 8.52348C7.17751 8.29801 6.64229 8.07227 6.00932 8.03448C4.64799 7.95319 3.85404 8.811 3.4821 10.0407C3.15876 11.1098 3.00341 12.4285 3.51689 13.4654C4.05593 14.5539 5.43159 14.9536 6.45678 14.2962C7.64683 13.5333 8.40792 11.8853 10 11.9133C11.5922 11.8853 12.3533 13.5333 13.5434 14.2962C14.5685 14.9536 15.9441 14.5539 16.4832 13.4654C16.9967 12.4285 16.8414 11.1098 16.518 10.0407Z",fill:"#FBFBFB"}),(0,s.jsx)("path",{d:"M12.0012 17.0763H7.90866C7.51404 17.0763 7.19336 16.7555 7.19336 16.3609C7.19336 15.9663 7.51404 15.6456 7.90866 15.6456H12.0012C12.3958 15.6456 12.7165 15.9663 12.7165 16.3609C12.7165 16.7555 12.3958 17.0763 12.0012 17.0763Z",fill:"#FBFBFB"})]}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"clip0_5402_26507",children:(0,s.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})}function U(){return(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsxs)("g",{clipPath:"url(#clip0_5402_26509)",children:[(0,s.jsx)("path",{d:"M10 19.1252C5.31783 19.1252 1.52212 15.3294 1.52212 10.6474C1.52212 5.96514 5.31783 2.16943 10 2.16943C14.6821 2.16943 18.4778 5.96514 18.4778 10.6474C18.4778 15.3294 14.6821 19.1252 10 19.1252ZM10 -2.28882e-05C4.47718 -2.28882e-05 0 4.47716 0 10C0 15.5228 4.47718 20 10 20C15.5228 20 20 15.5228 20 10C20 4.47716 15.5228 -2.28882e-05 10 -2.28882e-05Z",fill:"#2F3035"}),(0,s.jsx)("path",{d:"M16.518 10.0407C16.146 8.811 15.3522 7.95319 13.9908 8.03448C13.3579 8.07227 12.8226 8.29801 12.2416 8.52348C11.5189 8.80392 10.7774 8.95798 10 8.95798C9.22266 8.95798 8.48125 8.80392 7.75856 8.52348C7.17751 8.29801 6.64229 8.07227 6.00932 8.03448C4.64799 7.95319 3.85404 8.811 3.4821 10.0407C3.15876 11.1098 3.00341 12.4285 3.51689 13.4654C4.05593 14.5539 5.43159 14.9536 6.45678 14.2962C7.64683 13.5333 8.40792 11.8853 10 11.9133C11.5922 11.8853 12.3533 13.5333 13.5434 14.2962C14.5685 14.9536 15.9441 14.5539 16.4832 13.4654C16.9967 12.4285 16.8414 11.1098 16.518 10.0407Z",fill:"#2F3035"}),(0,s.jsx)("path",{d:"M12.0012 17.0763H7.90866C7.51404 17.0763 7.19336 16.7555 7.19336 16.3609C7.19336 15.9663 7.51404 15.6456 7.90866 15.6456H12.0012C12.3958 15.6456 12.7165 15.9663 12.7165 16.3609C12.7165 16.7555 12.3958 17.0763 12.0012 17.0763Z",fill:"#2F3035"})]}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"clip0_5402_26509",children:(0,s.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})}var L=i(652215),S=i(962995),k=i(375708),D=i(640886);function B(){let e=(0,C.i)("getRecurringPromotionPartnerAttributes");return{[I.XY]:{title:e?S.default.PF1aT5:S.default.LsJ9hj,titleParams:e?{discountPercentage:N.aW}:{discountPercent:N.aW},body:e?S.default.KoKwMn:S.default.Yl5ww1,bodyWithExpiration:S.default["6KjkUa"],redemptionURL:"https://www.logitech.com/",logos:{dark:(0,s.jsx)(r.Fragment,{},"logitech-logo-dark"),light:(0,s.jsx)(r.Fragment,{},"logitech-logo-light")},asset:"https://cdn.discordapp.com/assets/content/c93472f5033e3079579ad496c9a54a95faa23623f5b1d11590d536c861f52e7c.svg"},[I.KS]:{title:k.t.p7BkHh,titleParams:{discountPercentage:(0,A.LR)("getRecurringPromotionPartnerAttributes")?y.zG:y.H7},body:e?k.t.nmvvaN:k.t.igiSKe,bodyWithExpiration:k.t.w8CXUl,redemptionURL:"https://steelseries.com/",logos:{dark:(0,s.jsx)(w,{}),light:(0,s.jsx)(O,{})},asset:"https://cdn.discordapp.com/assets/content/c23a186569a2e8606d206cd4b5cc7f4ee8f880c844bc0debd5fd3400400ff7bc.png"},[I.Cs]:{title:e?k.t.QEJnti:k.t["9N8obd"],titleParams:e?{discountPercentage:y.F0}:void 0,body:e?k.t.eT5vm0:k.t["34g+Z3"],bodyWithExpiration:k.t.rqmpXc,bodyNote:(0,A.Se)("getRecurringPromotionPartnerAttributes")?k.t.vblnHk:void 0,redemptionURL:"https://www.kontrolfreek.com/",logos:{dark:(0,s.jsx)(M,{}),light:(0,s.jsx)(U,{})},asset:"https://cdn.discordapp.com/assets/content/6706fc54c35e86999d3537dcc3ef8bfe91f25db6a141b4b6e5b451ebc5cae86b.png"}}}function H(){let e=(0,R.N5)(),t=(0,R.P6)();return(0,s.jsxs)("div",{className:`${D.G9} ${D.sQ}`,children:[(0,s.jsx)(a.E,{variant:"text-sm/normal",color:"text-muted",className:D.kT,children:k.intl.format(S.default["65EEvD"],{days:t})}),(0,s.jsx)(v.Ay,{progress:e,variant:v.qP.UNSET,override:{default:{gradientStart:"var(--illo-blue-70)",gradientEnd:"var(--illo-blue-10)"}}})]})}function V(e){let{children:t}=e;return(0,s.jsx)("div",{className:D.oP,children:(0,s.jsx)("div",{className:D.t0,children:t})})}let F=e=>{let{recurrence:t,analyticsLocations:i=[]}=e,n=(0,s.jsx)(o.r,{color:g.A.colors.CONTROL_CONNECTED_BACKGROUND_DEFAULT}),l=(0,s.jsx)("span",{className:D.nP,children:(0,s.jsx)(d.K,{icon:c.T,size:"sm",variant:"icon-only","aria-label":"",onClick:()=>{navigator.clipboard.writeText(t.code),p(n),j.default.track(L.HAw.THIRD_PARTY_PARTNER_CTA_CLICKED,{partner:t.partnerId,cta_type:"copy code",promotion:t.outboundTitle,promotion_id:t.id,location_stack:i})}})}),[m,p]=r.useState(()=>l);if(null!=t.code)return(0,s.jsx)("div",{className:D.oP,children:(0,s.jsxs)("div",{className:D.t0,children:[(0,s.jsx)("div",{className:D.cD,children:(0,s.jsx)(a.E,{variant:"text-md/medium",color:"text-strong",children:t.code})}),m,(0,s.jsx)(u.$,{variant:"secondary",size:"sm",text:t.redeemCtaText??k.intl.formatToPlainString(k.t.DF68t7,{redemptionURL:t.redemptionURL}),onClick:()=>{window.open(t.redemptionURL,"_blank"),j.default.track(L.HAw.RECURRING_PROMOTION_CLAIMED),j.default.track(L.HAw.THIRD_PARTY_PARTNER_CTA_CLICKED,{partner:t.partnerId,cta_type:"visit store",promotion:t.outboundTitle,promotion_id:t.id,url:t.redemptionURL,location_stack:i})}})]})})};function Y(e){let{recurrence:t,canBeClaimed:i,hasClaimError:n,setCode:r,setHasClaimError:a,className:l,analyticsLocations:o=[]}=e;return i?n?(0,s.jsx)("div",{className:l,children:(0,s.jsx)(u.$,{icon:m.E,variant:"critical-secondary",size:"sm",disabled:!0,text:k.intl.string(k.t["8LKchl"])})}):(0,s.jsx)("div",{className:l,children:(0,s.jsx)(u.$,{icon:p.X,variant:"secondary",size:"sm",text:t.claimCtaText??k.intl.string(k.t.vwASIl),onClick:()=>{(0,T.kd)({promotionId:t.id,promotionTitle:t.outboundTitle,partnerId:t.partnerId,analyticsLocations:o}).then(e=>{r(e.code)}).catch(e=>{a(!0),P.A.captureException(e)})}})}):null}var G=((n={}).INLINE="inline",n.FOOTER="footer",n);function W(e){var t;let i,n,{recurrence:a,titleClassName:o,showPartnerLogo:d=!1,showPartnerImage:c=!1,roundPromotionImage:u=!1,titleVariant:m="primary",claimButtonPlacement:p="inline",footerContent:g,analyticsLocations:C=[]}=e,[v,j]=r.useState(a.code),[R,P]=r.useState(!1),A=(t=a.partnerId,i=(0,b.bG)([_.A],()=>(0,l.M)(_.A.theme)),null==(n=B()[t])?null:i?n.logos.dark:n.logos.light),y=null==v;return(0,s.jsxs)("div",{className:D.lA,children:[(0,s.jsxs)("div",{className:D.LV,children:[(0,s.jsxs)("div",{className:D.JN,children:[d&&A,(0,s.jsxs)("div",{className:null!=o?`${D.yO} ${o}`:D.yO,children:[(0,s.jsx)(f.D,{variant:"secondary"===m?"heading-md/semibold":"heading-lg/semibold",color:"text-strong",children:a.title}),(0,s.jsxs)(h.B,{direction:"vertical",gap:8,children:[(0,s.jsx)(f.D,{variant:"heading-sm/medium",color:"text-subtle",children:R?k.intl.format(k.t.i2EuFO,{helpdeskArticle:E.A.getArticleURL(L.MVz.RECURRING_PROMOTION)}):y?a.body:null!=a.bodyWithExpiration?k.intl.format(a.bodyWithExpiration,{date:a.endDate}):a.body}),null!=a.bodyNote&&(0,s.jsx)(f.D,{variant:"heading-sm/medium",color:"text-subtle",children:k.intl.format(a.bodyNote,{partnerName:I.CD[a.partnerId].label,helpdeskArticle:E.A.getArticleURL(L.MVz.RECURRING_PROMOTION)})})]})]}),"inline"===p&&(0,s.jsx)(Y,{recurrence:a,canBeClaimed:y,hasClaimError:R,setCode:j,setHasClaimError:P,analyticsLocations:C})]}),c&&(0,s.jsx)("div",{className:D.R4,children:(0,s.jsx)(x._,{src:a.asset??"",className:D.Ys,imageClassName:u||a.partnerId===I.XY?D.Cy:void 0,width:100,height:100,zoomable:!1})})]}),"footer"===p&&g,null!=v&&(0,s.jsx)(F,{recurrence:{...a,code:v},analyticsLocations:C}),"footer"===p&&null==v&&(0,s.jsx)(V,{children:(0,s.jsx)(Y,{recurrence:a,canBeClaimed:y,hasClaimError:R,setCode:j,setHasClaimError:P,className:D.qx,analyticsLocations:C})})]})}}