PageSourceSearch

https://regiojet.com/_next/static/chunks/pages/identity/ticket/[code]-3a76d1ddb532229f.js

js regiojet.com collected 2026-10-01 12:05:31 UTC 11,925 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="46a6dc18-dab3-4d54-a902-c95c80904b38",e._sentryDebugIdIdentifier="sentry-dbid-46a6dc18-dab3-4d54-a902-c95c80904b38")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[63424],{67169:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/identity/ticket/[code]",function(){return t(28647)}])},43716:function(e,n,t){"use strict";var r=t(67294),i=t(15972);n.Z=function(e,n,t){if(!i.jU)return[n,i.ZT,i.ZT];if(!e)throw Error("useLocalStorage key may not be falsy");var a=t?t.raw?function(e){return e}:t.deserializer:JSON.parse,c=(0,r.useRef)(function(e){try{var r=t?t.raw?String:t.serializer:JSON.stringify,i=localStorage.getItem(e);if(null!==i)return a(i);return n&&localStorage.setItem(e,r(n)),n}catch(e){return n}}),s=(0,r.useState)(function(){return c.current(e)}),l=s[0],o=s[1];(0,r.useLayoutEffect)(function(){return o(c.current(e))},[e]);var u=(0,r.useCallback)(function(n){try{var r="function"==typeof n?n(l):n;if(void 0===r)return;var i=void 0;i=t?t.raw?"string"==typeof r?r:JSON.stringify(r):t.serializer?t.serializer(r):JSON.stringify(r):JSON.stringify(r),localStorage.setItem(e,i),o(a(i))}catch(e){}},[e,o]);return[l,u,(0,r.useCallback)(function(){try{localStorage.removeItem(e),o(void 0)}catch(e){}},[e,o])]}},28647:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return ei},default:function(){return ea}});var r,i,a,c,s=t(75766),l=t(85893),o=t(71816),u=t(41664),d=t.n(u),m=t(11163),f=t(23123),y=t(67294),x=t(98740),p=t(11010),h=t(72253),v=t(24043),j=t(70655),b=t(53312),g=t(496),N=t(64019),k=t(37353),T=t(20677),_=t(80445),C=function(e){var n=(0,b.u6)(),t=n.values,r=n.setFieldValue,i=(0,f.$G)().t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h2",{className:"mb-4 text-h3 text-primary-blue",children:(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.personalInfoSettingsTitle"})}),(0,l.jsxs)("div",{className:"px-1 pb-2 space-y-1",children:[(0,l.jsxs)("div",{className:"font-bold",children:[(e.firstName||e.surname)&&(0,l.jsxs)("p",{children:[e.firstName," ",e.surname]}),(0,l.jsx)("p",{children:e.email})]}),(0,l.jsx)(g.Z,{variant:"info",children:(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.personalInfoAlert"})})]}),(0,l.jsx)(_.Z,{value:e.phoneNumber,title:"identity.ticket.phone",children:(0,l.jsx)(k.Z,{id:"phoneNumber",name:"phoneNumber",label:i("identity.ticket.phone")})}),(0,l.jsxs)(_.Z,{value:null==e?void 0:e.companyInformation,vertical:!0,title:"identity.ticket.companyInfo",children:[(0,l.jsxs)("div",{className:"flex gap-0.5 pl-1.5 items-center",children:[(0,l.jsx)(T.Z,{id:"companyInformation",checked:t.companyInformation,onChange:function(e){return r("companyInformation",e.currentTarget.checked)}}),(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.companyInfoEnabled"})]}),t.companyInformation&&(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,l.jsx)(N.Z,{name:"company.companyName",type:"text",label:i("identity.ticket.companyName")}),(0,l.jsx)(N.Z,{name:"company.address",type:"text",label:i("identity.ticket.companyAddress")}),(0,l.jsx)(N.Z,{name:"company.registrationNumber",type:"text",label:i("identity.ticket.companyIdentificationNumber")}),(0,l.jsx)(N.Z,{name:"company.vatNumber",type:"text",label:i("identity.ticket.companyVatNumber")})]})]})]})},w=t(44682),I=t(40397),Z=t(7258),S=t(27105),E=t(25593),K=function(){var e,n=(0,w.Sz)(S.Z,function(e){return e.pushToMessages}),t=(0,E.Z)().yupField,r=(0,o._y)().changeUserInfo,i=(0,f.$G)().t,a=(0,o.aF)().user.user,c=(0,v._)((0,y.useState)(null),2),s=c[0],u=c[1];(0,y.useEffect)(function(){a&&u(a)},[a]);var d=(e=(0,p._)(function(e){return(0,j.__generator)(this,function(t){switch(t.label){case 0:return[4,r({phoneNumber:e.phoneNumber,companyInformation:e.companyInformation,company:e.company})];case 1:return t.sent(),u(e),n({text:i("settings.change.success")}),[2]}})}),function(n){return e.apply(this,arguments)});return s?(0,l.jsx)(I.J9,{initialValues:{phoneNumber:s.phoneNumber,company:s.company,companyInformation:s.companyInformation}
1,validationSchema:Z.Ry({phoneNumber:t.string,company:Z.Ry().when(["companyInformation"],{is:function(e){return!!e},then:Z.Ry({companyName:Z.Z_(),address:Z.Z_(),registrationNumber:Z.Z_(),vatNumber:Z.Z_()}).required(),otherwise:Z.Ry().nullable()})}),onSubmit:d,children:(0,l.jsx)(I.l0,{children:(0,l.jsx)(C,(0,h._)({},s))})}):null},A=function(){return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(K,{})})},R=t(75939),P=t(43716),D=t(33824),F=t(19422),z=t(14757),O=t(33743),U=t(14932),G=t(93967),L=t.n(G),M=t(33299),V=t(68399),J=t(62564),$=t(47041),q=t(55673),B=t(85025),Y=t(41732),X=t(80631),H=t(83389),Q=t(37509),W=function(e){var n,t=e.code,r=(0,V.Z)().hideAllModals,i=(0,o.hk)().clearBooking,a=(0,o.Iz)().setToken,c=(0,o.aF)().user,s=(0,o._y)().logout,u=(0,R.j)(),d=u.refreshConnectedTickets,y=u.removeConnectedTicket,x=(0,m.useRouter)().push,h=(0,H.d)().removeTicket,v=(n=(0,p._)(function(){var e,n,l,o;return(0,j.__generator)(this,function(u){switch(u.label){case 0:return[4,h(t)];case 1:if(l=(n=u.sent()).passwordSetupUrl,!n.success)return[2];if(r(),localStorage.removeItem(B.G),y(t),!(0,Q.p6)(t,null==c?void 0:null===(e=c.user)||void 0===e?void 0:e.accountCode))return[3,4];return[4,s()];case 2:return u.sent(),[4,a(null)];case 3:u.sent(),i(),u.label=4;case 4:if(l)return o="".concat(window.location.origin).concat(X.ZP.IDENTITY.ACCOUNT,"?category=").concat(Y.S.SECURITY),(0,$.setCookie)("next-auth.callback-url",o,{path:"/"}),window.location.href=l,[2];return[4,d()];case 5:return u.sent(),x(X.ZP.IDENTITY.ACCOUNT),[2]}})}),function(){return n.apply(this,arguments)});return(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{children:(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.removeTicketSubtitle"})}),(0,l.jsxs)("div",{className:"flex flex-row mt-4 sm:flex-col gap-custom-12",children:[(0,l.jsx)(q.zx,{onClick:r,className:"w-full",variant:"primary",size:"big",children:(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.notRemoveTicket"})}),(0,l.jsx)(q.zx,{className:"w-full",variant:"transparentBlue",size:"big",onClick:v,children:(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.removeTicket"})})]})]})};(r=i||(i={})).GENERAL="general",r.TARIFFS="tariffs";var ee=(a={},(0,s._)(a,"general",J.Person),(0,s._)(a,"tariffs",J.TrainTicket),a),en=function(e){var n=e.code,t=(0,f.$G)().t,r=(0,V.Z)().showModal,i=(0,m.useRouter)(),a=i.push,c=i.query;return(0,l.jsxs)("div",{className:"space-y-2",children:[Object.entries(ee).map(function(e){var n=(0,v._)(e,2),t=n[0],r=n[1],i=t===((null==c?void 0:c.category)||"general");return(0,l.jsxs)(M.Z,{className:L()("flex gap-1 items-center font-semibold",i?"text-primary-blue":"text-neutral-gray"),onClick:function(){return a({query:(0,U._)((0,h._)({},c),{category:t})},void 0,{shallow:!0})},children:[(0,l.jsx)(r,{className:"w-3 h-3 fill-current"}),(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.".concat(t)})]},t)}),(0,l.jsxs)(M.Z,{className:"flex gap-1 items-center pt-2 border-t-1 border-neutral-gray3 text-neutral-gray",onClick:function(){return r((0,l.jsx)(W,{code:n}),{title:t("identity.ticket.removeTicketTitle")})},children:[(0,l.jsx)(J.Cancel,{className:"w-3 h-3 fill-current"}),(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.unpairAccount"})]})]})},et=t(42115),er=(c={},(0,s._)(c,i.GENERAL,(0,l.jsx)(A,{})),(0,s._)(c,i.TARIFFS,(0,l.jsx)(function(){var e,n=(0,w.Sz)(S.Z,function(e){return e.pushToMessages}),t=(0,o.aR)().data,r=void 0===t?[]:t,i=(0,o._y)().changeUserInfo,a=(0,f.$G)().t,c=(0,o.aF)().user,s="pl"===(0,m.useRouter)().locale?F.x.PL:F.x.CZ,u=(0,y.useMemo)(function(){return r.filter(function(e){return e.key===D.ZP.Regular||(s===F.x.PL?D.iv.includes(e.key):D.oP.includes(e.key))})},[r,s]),d=(0,v._)((0,P.Z)("@disabled-attendance-enabled",!1),2),x=d[0],h=d[1],b=u.find(function(e){return e.key===o.V5.Tariff.DisabledAttendance}),g=(e=(0,p._)(function(e){return(0,j.__generator)(this,function(t){switch(t.label){case 0:return e!==o.V5.Tariff.DisabledAttendance&&h(!1),[4,i({defaultTariffKey:e})];case 1:return t.sent()&&n({text:a("settings.change.success")}),[2]}})}),function(n){return e.apply(this,arguments)});return(0,l.jsxs)("div",{className:"sm:p-2",children:[(0,l.jsx)("h2",{className:"mb-4 text-h3 text-primary-blue",children:(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.tariffSettingsTitle"})}),u.map(function(e){var n,t;return(0,l.jsxs)("div",{className:"flex sm:flex-col lg:gap-1",children:[(0,l.jsx)(O.Z,{className:"mb-0.5 !w-fit",name:"selectedTariff",value:e.key,checked:e.ke
1y===(null==c?void 0:null===(n=c.user)||void 0===n?void 0:n.defaultTariffKey),onChange:function(){return g(e.key)},children:(0,l.jsx)("span",{children:e.value})}),e.key===o.V5.Tariff.DisabledAttendance&&(0,l.jsx)(z.Z,{disabled:(null==c?void 0:null===(t=c.user)||void 0===t?void 0:t.defaultTariffKey)!==o.V5.Tariff.DisabledAttendance,onChange:function(e){return h(e.currentTarget.checked)},checked:x,hasCustomStateControl:!0,tabIndex:0,role:"checkbox","aria-checked":x,label:(0,l.jsxs)("span",{className:"text-neutral-gray2",children:[(0,l.jsx)(f.cC,{i18nKey:"tariff.".concat(b.key)})," ",(0,l.jsx)(f.cC,{i18nKey:"tariff.".concat(b.key,".detail")})]})})]},e.key)})]})},{})),c),ei=!0,ea=function(){var e,n,t,r,i,a,c,s,u,p=(0,o.aF)().user,h=(0,R.j)().connectedTickets,v=(0,f.$G)().t,j=(0,m.useRouter)().query,b=null!==(a=null===(e=j.code)||void 0===e?void 0:e.toString())&&void 0!==a?a:"",g=(0,y.useMemo)(function(){return null==h?void 0:h.find(function(e){return e.code===b})},[b,h]),N=[null==p?void 0:null===(n=p.user)||void 0===n?void 0:n.firstName,null==p?void 0:null===(t=p.user)||void 0===t?void 0:t.surname].filter(Boolean).join(" "),k=v("identity.ticket.defaultAccountName",{code:b}),T=null!==(c=null==g?void 0:g.balance.amount)&&void 0!==c?c:"number"==typeof(null==p?void 0:null===(r=p.user)||void 0===r?void 0:r.creditPrice)?p.user.creditPrice:0,_=null!==(s=null==g?void 0:g.balance.currency)&&void 0!==s?s:null==p?void 0:null===(i=p.user)||void 0===i?void 0:i.currency;return(0,l.jsxs)(et.Z,{className:"flex flex-col gap-3 pt-4 sm:px-0",children:[(0,l.jsxs)("div",{className:"space-y-2 sm:px-2",children:[(0,l.jsx)(d(),{href:X.ZP.IDENTITY.ACCOUNT,children:(0,l.jsxs)("span",{className:"flex items-center font-semibold sm:mt-2 text-primary-blue",children:[(0,l.jsx)(J.ArrowBack,{className:"w-3 h-3 mr-0.5 fill-current"}),(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.backToAccount"})]})}),(0,l.jsx)("h1",{className:"text-h1",children:(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.accountTitle"})})]}),(0,l.jsxs)("div",{className:"grid grid-cols-[320px_minmax(0,1fr)] gap-3 sm:grid-cols-1 sm:px-2",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"px-1 ml-1 text-white rounded-tl-sm rounded-tr-sm w-fit py-0.5 text-14 bg-primary-blue",children:(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.active"})}),(0,l.jsxs)("div",{className:"p-2 border-2 rounded-sm border-primary-blue bg-primary-bluelight2 shadow-modal",children:[(0,l.jsx)("span",{className:"text-14",children:(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.accountTypeLong"})}),(0,l.jsx)("h2",{className:"my-0.5 text-h3",children:k}),(0,l.jsx)("p",{children:b}),N&&(0,l.jsx)("p",{children:N}),(0,l.jsx)("p",{className:"mt-2 font-bold text-h2 text-primary-blue",children:(0,l.jsx)(x.ZP,{price:T,customCurrency:_})})]})]}),(0,l.jsx)(d(),{href:X.ZP.CREDIT,children:(0,l.jsxs)("span",{className:"flex items-center gap-1 py-1.5 text-neutral-gray hover:text-primary-blue",children:[(0,l.jsx)(J.Money1,{className:"w-3 h-3 fill-current"}),(0,l.jsx)(f.cC,{i18nKey:"identity.ticket.topUpCredit"})]})}),(0,l.jsx)(en,{code:b})]}),(0,l.jsx)("div",{className:"max-w-[800px] w-full",children:null!==(u=er[j.category])&&void 0!==u?u:(0,l.jsx)(A,{})})]})]})}}},function(e){e.O(0,[82409,92888,49774,40179],function(){return e(e.s=67169)}),_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.