PageSourceSearch

https://www.vialma.com/static/js/3247.978453e6.chunk.js

js vialma.com collected 2026-10-02 10:52:48 UTC 8,339 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkvialma_web=self.webpackChunkvialma_web||[]).push([[3247],{81901:function(e,a,t){t(72791);a.Z=t.p+"static/media/greentick.130cf0ddc5dd17d144c4c84d645faacf.svg"},83436:function(e,a,t){var n=t(70885),i=t(72791),r=t(92907),c=t(81901),s=t(55948),o=t(66364),l=t.n(o),u=t(80184);a.Z=(0,r.Z)()((function(e){e.t;var a=e.onChangeFunc,t=e.className,r=e.type,o=e.placeholder,d=e.disabled,m=e.required,p=e.testId,h=e.label,_=(0,i.useState)(!1),v=(0,n.Z)(_,2),g=v[0],f=v[1];return(0,u.jsxs)("div",{className:"giftcard__inputField ".concat(t),children:[h&&(0,u.jsxs)("p",{className:"my-10",children:[h,m&&(0,u.jsx)("sup",{className:"giftcard__inputField__required",children:" *"})]}),(0,u.jsx)("input",{type:r,placeholder:o,onChange:function(e){var t;switch(r){case"email":f((0,s.Z)(e.target.value));break;case"password":f(e.target.value.length>5);break;default:f(!l()(null===(t=e.target.value)||void 0===t?void 0:t.trim()))}a(e.target.value)},disabled:d,"data-cy":p}),g&&(0,u.jsx)("img",{className:"green-tick",src:c.Z,alt:""})]})}))},62993:function(e,a,t){t.r(a),t.d(a,{default:function(){return A}});var n=t(74165),i=t(15861),r=t(70885),c=t(72791),s=t(92907),o=t(78687),l=t(81982),u=t.p+"static/media/Card Red.cbb09d6e185f69a4855f.jpg",d=t(2677),m=t(80184),p=(0,s.Z)()((function(e){var a=e.t,t=e.imageRootUrl,n=e.imagePath,i=e.giftcardName,r=function(){return"".concat(i&&(i.split(" - ")[1]||"-"))},c=function(){return" ".concat(i&&(i.split(" - ")[0]||"-"))},s=function(){return("classical & jazz"===c().toLowerCase().trim()||"classique & jazz"===c().toLowerCase().trim())&&"-"!==r()};return(0,m.jsxs)("div",{className:"voucher-box",children:[(0,m.jsxs)("div",{className:"voucher-box__image-container",children:[(0,m.jsx)("div",{className:"voucher-box__image-container__text1".concat(s()?" dark-text":""),children:a("GIFTCARD_IMAGE_BOX_TEXT1")}),(0,m.jsx)("div",{className:"voucher-box__image-container__text2".concat(s()?" dark-text":""),children:a("GIFTCARD_IMAGE_BOX_TEXT2",{term:r(),universe:c()})}),(0,m.jsx)(d.Z,{size:"large",imageRootUrl:t,imagePath:n,fallbackImage:u})]}),(0,m.jsxs)("div",{className:"voucher-box__text-container",children:[(0,m.jsx)("div",{className:"voucher-box__text-container__title",children:a("VOUCHER_GIFTBOX_TITLE")}),(0,m.jsx)("p",{className:"voucher-box__text-container__description",children:a("VOUCHER_GIFTBOX_DESCRIPTION")})]})]})})),h=t(74569),_=t.n(h),v=t(17160),g=t(48326),f=t(98555),x=t(87567),b=t(28931),I=t(55948),E=t(83436),T=(0,b.EN)((0,s.Z)()((function(e){var a=e.t,t=e.match,n=e.defaultEmail,i=e.activateFunc,s=e.loading,o=t.params.voucherCode,l=(0,c.useState)(""),u=(0,r.Z)(l,2),d=u[0],p=u[1],h=(0,c.useState)(""),_=(0,r.Z)(h,2),v=_[0],g=_[1];return(0,m.jsxs)("div",{className:"voucher-activation-form",children:[(0,m.jsx)(E.Z,{type:"text",placeholder:o,disabled:!0}),(0,m.jsx)(E.Z,{type:"email",placeholder:n,onChangeFunc:function(e){p(e)}}),(0,m.jsx)(E.Z,{type:"password",placeholder:"Password",onChangeFunc:function(e){g(e)}}),s?(0,m.jsx)(f.Z,{color:"#DD4E52"}):(0,m.jsx)("button",{className:"button-red gift-next-button",onClick:function(){i(d||n,v)},children:a("VOUCHER_ACTIVATE_BUTTON")})]})}))),j=t(25984),C=t(14346),N=t(13235),O=t(66291),S=(0,s.Z)()((function(e){var a=e.text;return(0,m.jsxs)("div",{className:"voucher-activation__hero",children:[(0,m.jsx)("h1",{children:a[0]}),(0,m.jsx)("h1",{children:a[1]})]})})),Z=t(48387),R=t(62757),A=(0,b.EN)((0,s.Z)()((function(e){var a=e.t,t=e.match,s=(0,o.v9)((function(e){return e.config.lang})),u=(0,c.useState)(!0),d=(0,r.Z)(u,2),h=d[0],b=d[1],E=(0,c.useState)(!1),A=(0,r.Z)(E,2),w=A[0],k=A[1],U=t.params.voucherCode,D=a("VOUCHER_ACTIVATE_DEFAULT_MESSAGE"),F=(0,c.useState)(""),V=(0,r.Z)(F,2),y=V[0],L=V[1],H=(0,o.I0)(),P=(0,j.Z)(),G=(0,c.useState)(""),M=(0,r.Z)(G,2),B=M[0],X=M[1],z=(0,c.useState)(""),q=(0,r.Z)(z,2),W=q[0],$=q[1],J=(0,c.useState)(""),K=(0,r.Z)(J,2),Q=K[0],Y=K[1],ee=(0,c.useState)(""),ae=(0,r.Z)(ee,2),te=ae[0],ne=ae[1],ie=(0,c.useState)(""),re=(0,r.Z)(ie,2),ce=re[0],se=re[1],oe=(0,c.useState)(""),le=(0,r.Z)(oe,2),ue=le[0],de=le[1],me=(0,c.useCallback)((function(e){var t="".concat("https://api.vialma.com/api","/crm/vouchers/").concat(e,"?lang=").concat(s);b(!0),_()({method:"get",url:t}).then((function(e){e.data&&(X(e.data.giftee_email),$(e.data.gifter_name),Y(e.data.imageRootUrl),ne(e.data.imagePath),se(e.data.message),de(e.data.giftcard_title))})).catch((function(){g.Z.showMessage("none",a("VOUCHER_ACTIVATE_CODE_WRONG_NOTIFICATION"))})).finally((function(){b(!1)}))}),[s]);(0,c.useEffect)((function(){me(U)}),[me,U]);return(0,m.jsxs)(c.Fragment,{children:[(0,m.jsxs)("div",{className:"voucher-activation",children:[(0,m.jsx)(l.Z,{noUniverse:!0,noSubscribe:!0}),(0,m.jsx)(S,{text:[a("VOUCHER_BANNER_PART1"),""]}),h?(0,m.jsx)("div",{className:"gift-loading-icon",children:(0,m.jsx)(f.Z,{color:"#DD4E52"})}):(0,m.jsxs)("div",{className:"voucher-activation__content",children:[(0,m.jsx)(p,{imageRootUrl:Q,imagePath:te,giftcardName:ue}),(0,m.jsxs)("div",{className:"voucher-form",children:[(0,m.jsx)("h1",{className:"voucher-form__title-1",children:a("VOUCHER_FORM_TITLE1")}),(0,m.jsxs)("div",{className:"voucher-form__wrapper",children:[(0,m.jsx)(T,{defaultEmail:B,activateFunc:function(e,t){if(function(e,t){return(0,I.Z)(e)?t.length<=5?(L(a("VOUCHER_VALIDATION_ERROR_PASSWORD")),!1):(L(""),!0):(L(a("VOUCHER_VALIDATION_ERROR_EMAIL")),!1)}(e,t)){k(!0);var r="".concat("https://api.vialma.com/api","/crm/activate/voucher/").concat(U,"?lang=").concat(s),c=new FormData;c.append("email",e),c.append("password",t),_()({method:"post",url:r,data:c,headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((function(r){r.data&&(v.n.track("Giftcard redeemed",{user:r.data.user}
1),r.data.customer&&r.data.customer.id&&(P(),function(e,t,r){var c="".concat("https://api.vialma.com/api","/login_check?lang=").concat(s),o={_username:(0,Z.dI)(e),_password:(0,Z.dI)(t)};_().post(c,o).then(function(){var e=(0,i.Z)((0,n.Z)().mark((function e(t){var i,c,s,o,l;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!["Sorry! The user name and password do not match.","D\xe9sol\xe9 ! L'email ou le mot de passe est incorrect."].includes(t.data[0])){e.next=4;break}return k(!1),g.Z.showMessage("none",a("VOUCHER_ACTIVATE_ACCOUNT_EXISTS")),e.abrupt("return");case 4:if(!t.data.token){e.next=19;break}return e.next=7,(0,R.jk)("Bearer ".concat(t.data.token));case 7:s=e.sent,o=s.subscription_ensemble.subscription,l=null===s||void 0===s||null===(i=s.subscription_ensemble)||void 0===i||null===(c=i.endDate)||void 0===c?void 0:c.date,localStorage.setItem("loginData",JSON.stringify(Object.assign({},t.data,s))),v.n.identify(s.subscription_ensemble.user.id),v.n.people.set_once({"First Login Date":(new Date).toISOString(),$email:s.email,$name:t.data.name,"User ID":s.subscription_ensemble.user.id,"On Trial":o.trial,"Subscription Plan":o.name,"Subscription Interval":o.unit,"Subscription Id":o.subscriptionId,"Subscription End Date":l?new Date(l.substring(0,19).replace(/-/g,"/")).toISOString():"none"}),v.n.register({"Subscription Plan":o.name}),v.n.track("Logged In",{"Subscription Interval":o.unit,"Subscription End Date":l?new Date(l.substring(0,19).replace(/-/g,"/")).toISOString():"none"}),O.av({email:s.email,plan:o.name,userId:s.subscription_ensemble.user.id}),H((0,C.F)(s)),H((0,N.sC)(!0)),window.top.location=r;case 19:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}())}(e,t,r.data.redirectUrl)))})).catch((function(e){k(!1),g.Z.showMessage("none",a("VOUCHER_ACTIVATE_FAILURE"))}))}},loading:w}),(0,m.jsx)("p",{children:y})]}),(0,m.jsx)("h1",{className:"voucher-form__title-2",children:a("VOUCHER_LETTER_TITLE",W)}),(0,m.jsxs)("p",{children:[ce||D," "]})]})]})]}),(0,m.jsx)(x.Z,{headText:a("ABOUT_VIALMA_4_TITLE")})]})})))},25984:function(e,a,t){var n=t(78687),i=t(17160),r=t(65344),c=t(14346),s=t(13235),o=t(48193);a.Z=function(){var e=(0,n.I0)();return function(){localStorage.clear(),i.n.reset(),e((0,r.E3)({playing:!1,url:null,indexOfTrack:0,dataTrack:null,isWebPlayer:!1,collapsed:!0,slug:null,composerImage:null,composerName:null,composerSlug:null,composerId:null,playlist:null,playlistId:null,pageOrigin:o.gN,mediaId:null,mediaProps:null})),e((0,s.sC)(!1)),e((0,c.F)(null))}}}}]);
2//# sourceMappingURL=3247.978453e6.chunk.js.map

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.