1"use strict";(self.webpackChunkkanava_web=self.webpackChunkkanava_web||[]).push([[818],{1026:function(e,s,n){n.d(s,{W:function(){return i}});var i=!1},1174:function(e,s,n){n.r(s),n.d(s,{default:function(){return u}});var i=n(6261),a=n(8616),r=n(2791),t=n(184),c=r.lazy((function(){return Promise.all([n.e(831),n.e(639),n.e(811)]).then(n.bind(n,3481))})),l=r.lazy((function(){return Promise.all([n.e(659),n.e(442),n.e(639),n.e(305),n.e(794),n.e(90)]).then(n.bind(n,2873))})),o=r.lazy((function(){return Promise.all([n.e(639),n.e(808)]).then(n.bind(n,4440))})),d=r.lazy((function(){return Promise.all([n.e(639),n.e(0)]).then(n.bind(n,9520))}));var u=function(){switch((0,i._g)().user.role){case a.i4.Veterinary:return(0,t.jsx)(c,{});case a.i4.Packer:return(0,t.jsx)(o,{});case a.i4.SlaughterHouse:return(0,t.jsx)(d,{});default:return(0,t.jsx)(l,{})}}},4842:function(e,s,n){n.r(s),n.d(s,{default:function(){return c}});var i=n(2791),a=n(6261),r=n(3271),t=n(184);function c(){var e=(0,a.aC)().logout;return(0,i.useEffect)((function(){(0,r.ET)(),e()}),[e]),(0,t.jsx)("p",{children:"Logging out..."})}},8237:function(e,s,n){n.r(s);var i=n(6152),a=n(9439),r=n(2791),t=n(1134),c=n(6261),l=n(1523),o=n.n(l),d=n(6651),u=n(7680),h=n(2060),x=n(4349),m=n(6871),j=n(9858),f=n(4587),g=n(8616),p=n(4911),v=n(5070),N=n(1026),b=n(184);function w(){var e=(0,h.bU)(),s=e.locale,n=e.setLocale,i=[{name:"Suomi",locale:h.go.fi},{name:"Svenska",locale:h.go.sv},{name:"English",locale:h.go.en}];return(0,b.jsxs)("div",{className:"hero-foot",children:[(0,b.jsxs)("div",{className:"block content has-text-centered",children:[(0,b.jsx)("p",{children:(0,b.jsx)(x.Z,{id:"Siipikarjaliitto"})}),(0,b.jsx)("div",{className:"columns is-centered",children:(0,b.jsx)("div",{className:"column buttons has-addons",children:i.map((function(e,i){return(0,b.jsx)("button",{className:"button is-small".concat(e.locale!==s?" is-black":""),onClick:function(){return n(e.locale)},children:e.name},i)}))})})]}),(0,b.jsx)("div",{className:"block"})]})}function _(e){var s=e.children;return(0,b.jsx)("p",{className:"help is-danger",children:s})}function k(e){var s=e.children;return(0,b.jsx)("div",{className:"notification is-danger p-2",children:s})}s.default=function(){var e=(0,c.aC)(),s=e.login,n=e.user,l=e.error,h=(0,r.useState)(l),Z=(0,a.Z)(h,2),U=Z[0],C=Z[1],L=(0,m.s0)(),P=(0,p.E)(),y=(0,f.zQ)(n,P);(0,r.useEffect)((function(){n?P?y?L(P,{replace:!0}):window.location.assign(decodeURIComponent(P)):n.role===g.i4.Administrator?window.location.assign("".concat(f.j4.FrontPage)):L(f.nc.FrontPage):(0,v.j9)()}),[n,L,P,y]);var E=(0,t.cI)(),S=E.watch,z=E.register,R=E.handleSubmit,q=E.formState.errors,I=JSON.stringify(S());return(0,r.useEffect)((function(){if(l&&500===l.statusCode)throw l;C(l)}),[l]),(0,r.useEffect)((function(){C(void 0)}),[I]),(0,b.jsxs)("section",{className:"hero is-fullheight is-warning",children:[(0,b.jsx)("div",{className:"hero-body has-text-centered",children:(0,b.jsxs)("div",{className:"container",children:[(0,b.jsx)(u.T,{variant:"black",className:"icon is-large"}),(0,b.jsx)("h1",{className:"title has-text-black",children:(0,b.jsx)(x.Z,{id:"Master_Unauthenticated_Header"})}),(0,b.jsx)("div",{className:"columns is-centered",children:(0,b.jsx)("div",{className:"column is-half",children:(0,b.jsxs)("div",{className:"notification is-white",children:[(0,b.jsx)("h2",{className:"title has-text-black is-4",children:(0,b.jsx)(x.Z,{id:"User_Login_Title"})}),(0,b.jsxs)("form",{method:"post",onSubmit:R(s),children:[(0,b.jsxs)("div",{className:"field",children:[(0,b.jsx)("label",{className:"label",children:(0,b.jsx)(x.Z,{id:"User_Login_Username"})}),(0,b.jsxs)("div",{className:"control has-icons-left",children:[(0,b.jsx)("input",(0,i.Z)({className:"input ".concat(q.username?"is-danger":""),type:"text",autoComplete:"username"},z("username",{required:!0}))),(0,b.jsx)("span",{className:"icon is-left pt-2",children:(0,b.jsx)(o(),{size:1,path:d.rI3})})]}),q.username&&(0,b.jsx)(_,{children:(0,b.jsx)(x.Z,{id:"ValidationError_Required"})})]}),(0,b.jsxs)("div",{className:"field",children:[(0,b.jsx)("label",{className:"label",children:(0,b.jsx)(x.Z,{id:"User_Login_Password"})}),(0,b.jsxs)("div",{className:"control has-icons-left",children:[(0,b.jsx)("input",(0,i.Z)({type:"password",autoComplete:"current-password",placeholder:"********",className:"input ".concat(q.password?"is-danger":"")},z("password",{required:!0}))),(0,b.jsx)("span",{className:"icon is-left pt-2",children:(0,b.jsx)(o(),{size:1,path:d.d5D})})]}),q.password&&(0,b.jsx)(_,{children:(0,b.jsx)(x.Z,{id:"ValidationError_Required"})})]}),U&&(0,b.jsxs)(k,{children:[(0,b.jsx)(x.Z,{id:401===U.statusCode?"Login_InvalidUsernameOrPassword":"Login_OtherError"}),N.W&&401!==U.statusCode&&(0,b.jsx)("p",{children:JSON.stringify(U)})]}),(0,b.jsxs)("div",{className:"buttons is-centered is-flex is-flex-direction-column",children:[(0,b.jsx)("button",{className:"button is-black is-medium",children:(0,b.jsx)(x.Z,{id:"User_Login_LogIn"})}),(0,b.jsx)(j.r,{to:f.n4.PasswordReset.request,children:(0,b.jsx)(x.Z,{id:"User_Login_ForgotPassword"})}),(0,b.jsx)(j.r,{to:f.n4.UserRegistration.edit.route,children:(0,b.jsx)(x.Z,{id:"User_Login_Registration"})})]})]})]})})})]})}),(0,b.jsx)(w,{})]})}}}]); 2//# sourceMappingURL=auth.831cd745.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.