1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1660],{47408:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/purchase-by-code",function(){return n(95149)}])},14092:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var r=n(44474),i=n(59713),o=n(44985),a=n(64673);let c=()=>{let e=(0,a.ZP)(i.Y.NAVIGATION,i.U.GET_MEDIA,null);return(0,r.Vp)(e,{appendAuthData:!0})};t.Z=e=>{let t=(0,a.ZP)(i.Y.NAVIGATION,i.U.GET_MEDIA,e),{data:n,isFetching:c,error:l}=(0,r.Al)(t,{appendAuthData:!0});return{data:new o.P(n),isFetching:c,error:l}}},71512:function(e,t,n){"use strict";n.d(t,{r:function(){return r}});let r=n(50661).ZP.div.withConfig({componentId:"sc-5091a6d4-0"})(["flex:1;margin:0 auto;padding:",";max-width:",";display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;"],e=>{let{padding:t}=e;return t?"".concat(t,"rem"):"20vh 0"},e=>{let{maxWidth:t}=e;return t?"".concat(t,"rem"):"44rem"})},34677:function(e,t,n){"use strict";n.d(t,{o:function(){return p}});var r=n(85893),i=n(67825),o=n(7824),a=n(67294),c=n(94470),l=n(71257),u=n(68200),s=n(79749),d=n(73539);let f=e=>e?e.trim().endsWith(".")?e:e.trim()+".":"",p=(0,a.forwardRef)((e,t)=>{let{name:n,type:p=l.rC.TEXT,size:h,gutter:g=o.G.NORMAL,icon:m,value:b,error:v,errorMessage:C,onChange:w,placeholder:x="",placeholderDisplay:I=l.JD.LEFT,maxLength:E,disabled:y,handleClearInput:P,isSearch:T,countryCode:A="+48",handleEnter:Z,autoFocus:_=!1,onFocus:O,dataTesting:S,ariaLabel:j,autoComplete:R,insideInputLabel:D,useWideInput:N=!1,noClick:U}=e,[k,M]=(0,a.useState)(_),[L,G]=(0,a.useState)(!1),[W,V]=(0,a.useState)(_),[B,F]=(0,a.useState)(p),[X,Y]=(0,a.useState)(!1),[z,H]=(0,a.useState)(""),K=()=>{Y(!0),F("password"===B?"text":"password")},J=(0,a.useRef)(null);(0,a.useEffect)(()=>{k||V(!1)},[k]),(0,a.useEffect)(()=>{var e,t;W?null==J||null===(e=J.current)||void 0===e||e.focus():null==J||null===(t=J.current)||void 0===t||t.blur(),G(""===b&&""!==x&&"center"===I)},[W,b,x,I]);let q="".concat(s.X.TEXT_INPUT,"-").concat(s.X.LABEL,"-").concat(n),Q=W||!!z,$=N?c.Ov:c.SP;return(0,r.jsxs)(c.__,{onClick:()=>{V(!0),G(!1)},gutter:g,size:h,"data-testing":q,noClick:U,children:[j&&(0,r.jsx)(d.Z,{children:j}),(0,r.jsxs)($,{focus:k,value:b,children:[m&&(0,r.jsxs)(c.CM,{iconPosition:L,children:[(0,r.jsx)(c.a1,{children:(0,r.jsx)(i.JO,{name:m})}),p===l.rC.TEL&&(0,r.jsx)(c.Cv,{children:A})]}),(0,r.jsxs)(c.pj,{type:p,showInsideInputLabel:Q,children:[Q&&(0,r.jsx)(c.Bs,{children:D||x}),(0,r.jsx)(c.II,{focus:k,placeholder:k?"":x,placeholderDisplay:I,type:B,name:n,value:b,onChange:e=>{null==w||w(e),H(e.target.value)},onKeyPress:e=>{"Enter"===e.key&&(null==Z||Z())},maxLength:E,isSearch:T,disabled:y,autoComplete:R,ref:e=>{"function"==typeof t&&t(e),J.current=e},onFocus:e=>{V(!0),O&&O(e),X?Y(!1):M(!0)},onBlur:()=>{V(!1),X?Y(!1):M(!1)},"data-testing":S||"".concat(s.X.TEXT_INPUT,"-").concat(n),"aria-describedby":v?"error":void 0,"aria-invalid":!!C,tabIndex:U?-3:void 0})]}),p===l.rC.PASSWORD&&""!==b&&(0,r.jsx)(c.gq,{error:v,onClick:e=>{e.stopPropagation(),K()},tabIndex:0,type:"button",title:"password"===B?(0,u.Z)("WCAG.aria-label.show-password"):(0,u.Z)("WCAG.aria-label.hide-password"),"aria-label":"password"===B?(0,u.Z)("WCAG.aria-label.show-password"):(0,u.Z)("WCAG.aria-label.hide-password"),"html-on-key-down":e=>{"Enter"===e.key&&K&&K()},"data-testing":"".concat(s.X.BUTTON,"-show-password"),children:(0,r.jsx)(c.KX,{children:(0,r.jsx)(i.JO,{name:i.UZ.SHOW_PASSWORD})})}),P&&""!==b&&(0,r.jsx)(c.l8,{onClick:P,tabIndex:0,title:(0,u.Z)("WCAG.aria-label.clear-search"),"aria-label":(0,u.Z)("WCAG.aria-label.clear-search"),onKeyDown:e=>{"Enter"===e.key&&P&&P()},children:(0,r.jsx)(c.o_,{children:(0,r.jsx)(i.JO,{name:i.UZ.CLOSE})})}),v&&(0,r.jsx)(c.jj,{children:(0,r.jsx)(c.Vx,{"data-testing":"".concat(s.X.WRAPPER,"-").concat(s.X.ERROR),children:(0,r.jsx)(i.JO,{name:i.UZ.ALERT})})})]}),v&&(0,r.jsx)(c.y,{id:"error","aria-live":"assertive",children:f(C)})]})});p.displayName="TextInput"},94470:function(e,t,n){"use strict";n.d(t,{Bs:function(){return m},CM:function(){return C},Cv:function(){return E},II:function(){return b},KX:function(){return u},Ov:function(){return d},SP:function(){return s},Vx:function(){return l},__:function(){return v},a1:function(){return f},gq:function(){return p},jj:function(){return x},l8:function(){return w},o_:function(){return h},pj:function(){return g},y:function(){return I}});var r=n(50661),i=n(33205),o=n(1566),a=n(71257);let c=e=>{let{size:t}=e;if(t&&t===a.vz.BIG)return(0,r.iv)(["","{border-radius:2.9rem;}","{width:1.6rem;height:auto;}","{margin-left:2.2rem;}","{padding-left:1.7rem;}"],s,f,C,g)},l=r.ZP.div.withConfig({componentId:"sc-b95fcbdb-0"})(["fill:",";height:2rem;stroke:transparent;width:2rem;"],e=>{let{theme:t}=e;return t.input.errorBgColor}),u=r.ZP.div.withConfig({componentId:"sc-b95fcbdb-1"}
1)(["height:1.4rem;width:2.2rem;"]),s=r.ZP.div.withConfig({componentId:"sc-b95fcbdb-2"})(["background:",";border:",";border-radius:2.3rem;box-shadow:none;display:flex;flex-grow:1;width:100%;height:4.4rem;"],e=>{let{focus:t,theme:n}=e;return t?n.input.activeFocusBgColor:n.input.nonActiveFocusBgColor},e=>{let{focus:t,theme:n}=e;return t?"1px solid ".concat(n.input.activeBorderColor):"1px solid ".concat(n.input.borderColor)}),d=(0,r.ZP)(s).withConfig({componentId:"sc-b95fcbdb-3"})(["height:5.1rem;"]);r.ZP.div.withConfig({componentId:"sc-b95fcbdb-4"})(["display:flex;flex-direction:column;text-align:left;"]);let f=r.ZP.div.withConfig({componentId:"sc-b95fcbdb-5"})(["fill:",";height:1.8rem;width:1.8rem;stroke:transparent;"],e=>{let{theme:t}=e;return t.input.iconWrapperColor}),p=r.ZP.button.withConfig({componentId:"sc-b95fcbdb-6"})(["align-items:center;cursor:pointer;display:flex;flex:0 auto;height:2.4rem;justify-content:center;align-self:center;margin-right:",";",";width:auto;background:none;border:none;background:transparent;border:transparent;"],e=>e.error?"1rem":"1.7rem",e=>{let{error:t}=e;return t&&"position: relative"}),h=r.ZP.div.withConfig({componentId:"sc-b95fcbdb-7"})(["height:1.4rem;width:2.2rem;fill:",";"],e=>{let{theme:t}=e;return t.text.color.secondary}),g=r.ZP.div.withConfig({componentId:"sc-b95fcbdb-8"})(e=>{let{type:t,showInsideInputLabel:n}=e,i=t===a.rC.PASSWORD?"0":"2",o=t===a.rC.PASSWORD?"0":"1.8";return(0,r.iv)(["display:flex;width:100%;padding:"," ","rem 0.9rem 1rem;margin-right:","rem;position:relative;"],n?"1.8rem":"0.9rem",i,o)}),m=r.ZP.span.withConfig({componentId:"sc-b95fcbdb-9"})(["color:#757a7a;font-size:0.9rem;font-weight:400;text-align:left;position:absolute;top:0.5rem;"]),b=r.ZP.input.withConfig({componentId:"sc-b95fcbdb-10"})(e=>{let{focus:t,type:n,placeholderDisplay:a,theme:c,isSearch:l}=e,u=l&&(0,r.iv)(["",";"],(0,i.a)("font-size",o.Yr.search.input)),s=t?c.input.textColor:c.input.notFocusTextColor;return(0,r.iv)(["background-color:transparent;border:none;color:",";flex-grow:1;outline:none;width:100%;",";-webkit-text-fill-color:",";&::placeholder{font-size:1.4rem;color:",";text-align:",";}&:-webkit-autofill::first-line,&:-webkit-autofill:focus{caret-color:",";}&:-webkit-autofill{-webkit-background-clip:text;}&::-webkit-credentials-auto-fill-button{background-color:",";}&::-ms-reveal{display:none;}"],s,u,s,c.input.placeholderColor,a,s,c.text.color.whiteTone0)}),v=r.ZP.label.withConfig({componentId:"sc-b95fcbdb-11"})(["display:block;margin-bottom:","rem;width:100%;",";pointer-events:",";"],e=>{let{gutter:t}=e;return t},e=>c(e),e=>{let{noClick:t}=e;return t?"none":"auto"}),C=r.ZP.div.withConfig({componentId:"sc-b95fcbdb-12"})(["align-items:center;display:flex;flex:0 auto;height:4.8rem;justify-content:center;left:",";margin-left:",";position:",";width:auto;align-self:center;"],e=>e.iconPosition?"25rem":"0",e=>e.iconPosition?"6.75rem":"1.8rem",e=>e.iconPosition?"relative":""),w=r.ZP.div.withConfig({componentId:"sc-b95fcbdb-13"})(["align-items:center;cursor:pointer;display:flex;flex:0 auto;height:4.8rem;justify-content:center;width:auto;margin-right:2rem;"]),x=r.ZP.div.withConfig({componentId:"sc-b95fcbdb-14"})(["align-items:center;display:flex;flex:0 auto;height:4.8rem;justify-content:center;margin-right:1.5rem;width:auto;"]),I=r.ZP.div.withConfig({componentId:"sc-b95fcbdb-15"})(["color:",";font-size:1.2rem;font-weight:400;margin-top:0.6rem;text-align:center;"],e=>{let{theme:t}=e;return t.input.errorBgColor}),E=r.ZP.span.withConfig({componentId:"sc-b95fcbdb-16"})(["color:",";font-size:1.4rem;margin-left:0.8rem;"],e=>{let{theme:t}=e;return t.input.iconWrapperColor})},71257:function(e,t,n){"use strict";var r,i,o,a,c,l,u;n.d(t,{JD:function(){return a},nG:function(){return o},rC:function(){return r},vz:function(){return i}}),(c=r||(r={}
1)).PASSWORD="password",c.TEXT="text",c.NUMBER="number",c.DATE="date",c.TEL="tel",(i||(i={})).BIG="big",(l=o||(o={})).EMAIL="email",l.NEW_PASSWORD="new-password",l.CURRENT_PASSWORD="current-password",(u=a||(a={})).LEFT="left",u.CENTER="center",u.RIGHT="right"},71896:function(e,t,n){"use strict";n.d(t,{o:function(){return r.o}});var r=n(34677)},32618:function(e,t,n){"use strict";n.d(t,{Gq:function(){return u},Qt:function(){return r},gf:function(){return c},lN:function(){return l}});var r,i=n(1566),o=n(50661);(r||(r={})).LONG="long";let a=(0,o.iv)(["margin-left:auto;margin-right:auto;@media ","{width:26rem;}@media ","{width:28rem;}@media ","{width:33rem;}"],i.Uh.mobileS,i.Uh.mobileM,i.Uh.tablet),c=o.ZP.div.withConfig({componentId:"sc-a525a00d-0"})(["",";",";margin:auto;max-width:",";"," #highlight-span{display:flex;justify-content:center;",";}h1{line-height:3.3rem;}"],e=>{let{hide:t}=e;return t&&"display: none;"},e=>{let{centered:t}=e;return t&&"\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center\n "},e=>{let{maxWidth:t}=e;return"".concat(t||41.5,"rem")},e=>{let{topGutter:t}=e;return t&&(0,o.iv)(["margin-top:","rem;"],t)},e=>{let{theme:t}=e;return"color: ".concat(t.text.color.highlight)}),l=o.ZP.div.withConfig({componentId:"sc-a525a00d-1"})([""," ",";"],a,e=>{let{inputSize:t}=e;return"long"===t&&(0,o.iv)(["@media ","{width:36rem;}"],i.Uh.tablet)}),u=o.ZP.form.withConfig({componentId:"sc-a525a00d-2"})(["",""],a);o.ZP.div.withConfig({componentId:"sc-a525a00d-3"})(["margin:2rem 0;&& > *{margin:auto;}"])},31170:function(e,t,n){"use strict";n.d(t,{EX:function(){return m},Lz:function(){return h},Mn:function(){return s},NI:function(){return p},Uk:function(){return l},W6:function(){return g},_w:function(){return u},fN:function(){return c},oe:function(){return f},wS:function(){return d}});var r=n(20567),i=n(62501),o=n(34050),a=n(14852);function c(e){return e.type===a.Pm.MEDIA&&e.subType===a.A5.LIVE}function l(e){return e.type===a.Pm.MEDIA&&e.subType===a.A5.TV}function u(e){return e.type===a.Pm.MEDIA&&(e.subType===a.A5.VOD||e.subType===a.A5.MOVIE)}function s(e){return e.type===a.Pm.MULTIPLE&&e.subType===a.A5.PACKET}function d(e,t){return e.id===t.id&&e.type===t.type&&e.subType===t.subType}function f(e,t){return e.id===t.id&&e.type===t.type}function p(e){switch(!0){case u(e):return a.pP.VOD_OR_MOVIE;case c(e)||l(e):return a.pP.EVENT_OR_CHANNEL;default:return}}function h(e){return e===a.pP.VOD_OR_MOVIE||e===a.pP.EVENT_OR_CHANNEL?e:void 0}function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(s(e)){let t=o.Z6.PACKET_DETAILS,l=(0,r._)({packetId:e.id,trimPurchaseHistory:n},c&&{paymentSuccess:!0});a?i.F0.replaceRoute(t,l):i.F0.pushRoute(t,l);return}if(t){t.goToDetails({trimPurchaseHistory:n,replaceRoute:a},c);return}i.F0.pushRoute(o.Z6.HOME)}function m(e,t){let n=e.getOffers()[0],r=n.getOptions(),i=r.find(e=>e.getType()===t);return{productId:e.getAddonIds(),offer:null==n?void 0:n.getOfferId(),option:i?null==i?void 0:i.getOptionId(!0):r[0].getOptionId(!0)}}},95149:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return N}});var r=n(20567),i=n(85893),o=n(67294),a=n(89274),c=n(11817),l=n(62501),u=n(2436),s=n(81855),d=n(68200),f=n(34050),p=n(3464),h=n(32618),g=n(71896),m=n(34737),b=n(43058),v=n(7824),C=n(71257),w=n(67825),x=n(85362),I=n(71512),E=n(11010),y=n(14932),P=n(64673),T=n(44474),A=n(59713),Z=n(51592);let _=e=>e||(0,d.Z)("pages.have-code.try-again");var O=e=>{var t;let{onSuccess:n}=e,[i]=(0,T.Vp)((0,P.ZP)(A.Y.PAYMENTS,A.U.GET_PURCHASE_CODE_DATA,null),{appendAuthData:!0}),[a]=(0,T.Vp)((0,P.ZP)(A.Y.NAVIGATION,A.U.GET_PURCHASE_CODE_PRODUCT,null),{appendAuthData:!0}),[c]=(0,T.Vp)((0,P.ZP)(A.Y.PAYMENTS,A.U.FETCH_ORDER_ID,null),{appendAuthData:!0,disableCache:!0}),[l]=(0,T.Vp)((0,P.ZP)(A.Y.PAYMENTS,A.U.SUBMIT_PURCHASE_CODE,null),{appendAuthData:!0}),u=(0,o.useRef)(!1),[s,d]=(0,o.useState)(!1),[f,p]=(0,o.useState)(),[h,g]=(0,o.useState)(),[m,b]=(0,o.useState)(),[v,C]=(0,o.useState)(),[w,x]=(0,o.useState)(),I=(0,o.useCallback)(()=>x(void 0),[]),O=(0,o.useCallback)(e=>{x(_(e)),d(!1)},[]),S=()=>{p(void 0),g(void 0),b(void 0),C(void 0),x(void 0)};return{activate:(0,o.useCallback)((t=(0,E._)(function*(e){let{purchaseCode:t,product:o}=e;if(!u.current){u.current=!0,d(!0),S();try{var s,f,h,m,v,w,x,I;let e=yield i({purchaseCode:t});if(!e.ok){O(null===(v=e.error)||void 0===v?void 0:v.getUserMessage());return}let u=e.data,d=null===(f=u.purchaseItems)||void 0===f?void 0:null===(s=f[0])||void 0===s?void 0:s.offer;if("active"!==u.status||0!==u.activationAvailability.status||!d){O(u.activationAvailability.statusUserMessage||u.activationAvailability.statusDescription);return}let E=yield a({purchaseCode:t,product:o});if(!E.ok){O(null===(w=E.error)||void 0===w?void 0:w.getUserMessage());return}let P=null===(h=E.data.offers)||void 0===h?void 0:h.find(e=>{let{id:t,type:n}=e;return t===d.id&&n===d.type}),T=null==P?void 0:null===(m=P.options)||void 0===m?void 0:m.find(e=>"code"===e.type);if(!P||!T){O();return}let A={id:d.id,type:d.type},Z={id:T.id,type:"code"};p(A),g(Z);let _={product:o,offer:A,option:Z},S=yield c(_);if(!S.ok){O(null===(x=S.error)||void 0===x?void 0:x.getUserMessage());return}if(!S.data.orderId){O();return}b(S.data.orderId);let j=yield l((0,y._)((0,r._)({},_),{orderId:S.data.orderId,purchaseCode:t}));if(!j.ok){O(null===(I=j.error)||void 0===I?void 0:I.getUserMessage());return}if(0!==j.data.status){O(j.data.statusUserMessage||j.data.statusDescription);return}C(j.data),n()}catch(e){O(e instanceof Z.Z?e.getUserMessage():void 0)}finally{u.current=!1}}}),function(e){return t.apply(this,arguments)}),[c,i,a,l,n,O]),clearError:I,isFetching:s,offer:f,option:h,orderId:m,data:v,error:w}},S=n(14092),j=n(31170),R=n(55710),D=n(16058),N=()=>{let{id:e,type:t,subtype:n}=(0,a.o)(),E={id:e,type:t,subType:n},[y,P]=(0,o.useState)(""),[T,A]=(0,o.useState)(),Z=(0,u.L)().isLogged(),_=(0,j.NI)(E),{data:N,isFetching:U}=(0,S.Z)(void 0!==_&&e?{mediaId:e,cpid:_}:void 0),k=(0,D.K)(),{activate:M,clearError:L,isFetching:G,error:W}=O({onSuccess:()=>(0,j.W6)(E,N,!1,!0,!0)}),V=N.getTitle(),B=G||!!U;(0,o.useEffect)(()=>{Z||l.F0.replaceRoute(f.Z6.LOGIN_TO_CONTINUE,{target:(0,s.tr)()})},[Z]);let F=()=>{let e=y.trim();if(!B){if(!e){A((0,d.Z)("form.validate.required"));return}M({purchaseCode:e,product:E})}};return Z?(0,i.jsx)(c.Z,{customTabTitle:(0,d.Z)("account-menu.code"),cancelAction:k,simpleView:!0,hideCloseButton:!0,children:(0,i.jsx)(I.r,{children:(0,i.jsx)(x.u,{isFetching:B,text:(0,d.Z)("pages.have-code.verification"),calculateBottom:!1,children:W?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.v,{icon:w.UZ.INFO_CIRCLE,title:(0,d.Z)("pages.have-code.activate-access-error"),description:W}),(0,i.jsx)(h.lN,{children:(0,i.jsx)(m.z,{text:(0,d.Z)("ok-button-label"),onButtonAction:()=>{L(),P(""),A(void 0)},btnType:b.J.PRIMARY,fullWidth:!0,gutter:v.G.MEDIUM})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.v,{icon:w.UZ.KEY_CIRCLE,innerHtmlTitle:V?(0,d.Z)("pages.have-code.access-title-with-product",(0,r._)({productName:V},(0,R.R1)("highlight"))):(0,d.Z)("pages.have-code.access-title")}),(0,i.jsxs)(h.Gq,{onSubmit:e=>{e.preventDefault(),F()},children:[(0,i.jsx)(g.o,{value:y,onChange:e=>{P(e.target.value),T&&A(void 0)},name:"purchaseCode",placeholder:(0,d.Z)("pages.have-code.code-placeholder"),type:C.rC.TEXT,icon:w.UZ.KEY,gutter:v.G.MEDIUM,maxLength:50,ariaLabel:(0,d.Z)("WCAG.aria-label.enter-code"),error:!!T,errorMessage:T}),(0,i.jsx)(m.z,{text:(0,d.Z)("pages.have-code.activate-access"),onButtonAction:F,btnType:b.J.PRIMARY,disabled:B,fullWidth:!0,gutter:v.G.MEDIUM})]})]})})})}):null}}},function(e){e.O(0,[5079,5675,2901,2903,1817,2888,9774,179],function(){return e(e.s=47408)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.