1"use strict";(self.webpackChunkota=self.webpackChunkota||[]).push([[6652],{51223(U,g,o){o.d(g,{IT:()=>m,UL:()=>t,Zx:()=>h,t1:()=>c,u7:()=>s});var e=o(68754);const t=(0,e.VP)("[Pro Settings] Load Company Api Keys]",(0,e.xk)()),m=(0,e.VP)("[Pro Settings] Add Company Api Key]",(0,e.xk)()),c=(0,e.VP)("[Pro Settings] Remove Company Api Key]",(0,e.xk)()),h=(0,e.VP)("[Pro Settings] Load Company Api Keys Success",(0,e.xk)()),s=(0,e.VP)("[Pro Settings] Load Company Api Keys Error",e.w5)},17076(U,g,o){o.d(g,{A:()=>h,Hz:()=>m});var e=o(68754),t=o(51223);const m="company-api-keys",h=(0,e.VG)({name:m,reducer:(0,e.vy)({companyApiKeys:[],companyApiKeysLoading:!0},(0,e.on)(t.UL,s=>({...s,companyApiKeysLoading:!0})),(0,e.on)(t.Zx,(s,{apiKeys:r})=>({...s,companyApiKeys:[...r],companyApiKeysLoading:!1})),(0,e.on)(t.u7,s=>({...s,companyApiKeysLoading:!1,companyApiKeys:[]})),(0,e.on)(t.IT,s=>({...s,companyApiKeysLoading:!0})),(0,e.on)(t.t1,s=>({...s,companyApiKeysLoading:!0})))})},54271(U,g,o){o.r(g),o.d(g,{COMPANY_ID_PARAM:()=>T,PRO_SETTINGS_V2_ROUTES:()=>L,default:()=>b});var e=o(62552),t=o(21152),m=o(68754),c=o(32479),h=o(13361),s=o(5445),r=o(17862),a=o(99388),l=o(6215),v=o(83752),$=o(93183),u=o(43463),H=o(76356),K=o(44768),F=o(82320),C=o(62281);const O=1;let x=(()=>{var y;class d{constructor(){this.actions$=(0,e.WQX)(t.En),this.companyProviderService=(0,e.WQX)(K.w),this.userResourceService=(0,e.WQX)(F.t),this.initCompanyStart$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(u.YQ),(0,c.T)(({companyId:n})=>u.Gj({companyId:n})))),this.initCompany$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(u.Gj),(0,h.p)(({companyId:n})=>(0,s.H)(this.companyProviderService.loadCompany(n)).pipe((0,r.W)(()=>(0,a.of)(null)))),(0,c.T)(n=>u.A2({company:n})))),this.updateCompanyStart$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(u.JT),(0,c.T)(({company:n})=>u.aE({company:n})))),this.updateCompany$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(u.aE),(0,h.p)(({company:n})=>(0,s.H)(this.companyProviderService.saveCompany(n)).pipe((0,c.T)(i=>u.A2({company:i})),(0,r.W)(i=>{const A=i.error.code??i.status;return(0,a.of)(u.yh({message:this.customError[A]??null,code:A}))}))))),this.updateCompanySuccess$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(u.A2),(0,c.T)(()=>u.bK()))),this.submitCompanyInfo$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(u._k),(0,c.T)(({id:n,contact:i,social:A,billingContacts:E})=>{const P=new H.A;return P.setId(n),P.setName(i.name),P.setHideAddress(i.hideAddress),P.setHidePhone(i.hidePhone),(0,C.w4)(P,i),(0,C.VY)(P,i),(0,C.CN)(P,A),P.setBillingContacts(E),u.JT({company:P})}))),this.loadCompanyContacts$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(u.jD),(0,l.n)(({companyId:n})=>(0,s.H)(this.companyProviderService.getCompanyContacts(n)).pipe((0,r.W)(()=>(0,a.of)([])))),(0,c.T)(n=>u.q0({companyContacts:n})))),this.addCompanyContact$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(u.hG),(0,h.p)(({companyId:n,contact:i})=>(0,s.H)(this.companyProviderService.addCompanyContact(n,i)).pipe((0,r.W)(()=>v.w))),(0,c.T)(n=>u.OG({companyContact:n})))),this.deleteCompanyContact$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(u.x1),(0,$.H)(({companyId:n,companyContactId:i})=>(0,s.H)(this.companyProviderService.deleteCompanyContact(n,i)).pipe((0,c.T)(()=>u.e$({companyContactId:i})),(0,r.W)(()=>v.w))))),this.loadUserCompanies$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(u.Ln),(0,h.p)(()=>(0,s.H)(this.userResourceService.userCompanies()).pipe((0,c.T)(n=>u.gr({userCompanies:n})),(0,r.W)(()=>v.w))))),this.customError={[O]:$localize`:Brand color 1 or 2 is invalid in the Brand Tools section. The color must be six characters long and contain only letters AâF and numbers 0â9.|Pro settings custom error:Brändiväri 1 tai 2 on virheellinen Brändityökalut-osiossa. Värikoodin tulee olla kuusi merkkiä pitkä ja sisältää vain kirjaimia A-F ja numeroita 0-9.`}}static#e=y=()=>(this.\u0275fac=function(i){return new(i||d)},this.\u0275prov=e.jDH({token:d,factory:d.\u0275fac}))}return y(),d})();var V=o(50627),W=o(17226),f=o(51223),D=o(67576);let B=(()=>{var y;class d{constructor(){this.actions$=(0,e.WQX)(t.En),this.companyResourceService=(0,e.WQX)(D.T),this.loadCompanyApiKeys$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(f.UL),(0,h.p)(({companyId:n})=>(0,s.H)(this.companyResourceService.getKeys(n))),(0,c.T)(n=>(0,f.Zx)({apiKeys:n})),(0,r.W)(()=>(0,a.of)((0,f.u7)())))),this.addCompanyApiKey$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(f.IT),(0,l.n)(({companyId:n,email:i})=>(0,s.H)(this.companyResourceService.postKey(n,{email:i})).pipe((0,c.T)(()=>n))),(0,c.T)(n=>(0,f.UL)({companyId:n})))),this.removeApiKey$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(f.t1),(0,l.n)(({companyId:n,keyId:i})=>(0,s.H)(this.companyResourceService.deleteKey(n,i)).pipe((0,c.T)(()=>n))),(0,c.T)(n=>(0,f.UL)({companyId:n}))))}static#e=y=()=>(this.\u0275fac=function(i){return new(i||d)},this.\u0275prov=e.jDH({token:d,factory:d.\u0275fac}))}return y(),d})();var N=o(17076),G=o(96315),Y=o(80171),j=o(83756),X=o(55465),Z=o(61391),p=o(10739),S=o(96975),J=o(5196),k=o(8402);let z=(()=>{var y;class d{constructor(){this.actions$=(0,e.WQX)(t.En),this.CompanyResourceService=(0,e.WQX)(D.T),this.ModalService=(0,e.WQX)(J.B),this.store=(0,e.WQX)(m.il),this.getUsers$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(p.iA,p.b9,p.u$,p.Tx),(0,l.n)(({companyId:n})=>(0,s.H)(this.CompanyResourceService.getUsers(n)).pipe((0,c.T)(i=>p.bI({users:i,companyId:n})),(0,r.W)(()=>(0,a.of)(p.sm({companyId:n}))))))),this.deleteUser$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(p.hG),(0,l.n)(({companyId:n,userId:i})=>(0,s.H)(this.CompanyResourceService.deleteUser(n,i)).pipe((0,c.T)(()=>p.gJ({userId:i,companyId:n})),(0,r.W)(()=>(0,a.of)(p.nL({companyId:n,userId:i}))))))),this.updateUser$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(p.oo),(0,h.p)(({companyId:n,userId:i,isAdmin:A,modalName:E})=>(0,s.H)(this.CompanyResourceService.putUser(n,i,{isAdmin:A})).pipe((0,j.M)(()=>{this.ModalService.close(E)}),(0,c.T)(()=>p.Zq({userId:i,companyId:n,isAdmin:A})),(0,r.W)(()=>(0,a.of)(p.mm({companyId:n,userId:i}))))))),this.addUser$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(p.nu),(0,h.p)(({companyId:n,email:i})=>(0,s.H)(this.CompanyResourceService.addUser(n,{email:i})).pipe((0,l.n)(()=>(0,a.of)(p.OP({companyId:n}),p.b9({companyId:n}))),(0,r.W)(({reason:A})=>{switch(A){case S.pe.NOT_FOUND:return(0,a.of)(p.hk({companyId:n}));case S.pe.ALREADY_IN_COMPANY:return(0,a.of)(p.tc({companyId:n}));default:return(0,a.of)(p.el({companyId:n}))}}))))),this.loadUsersOnCompanyChange$=(0,t.EH)(()=>this.store.select(k.Ip).pipe((0,X.F)((n,i)=>n?.getId?.()===i?.getId?.()),(0,c.T)(n=>n?.getId?.()),(0,Z.p)(n=>!!n),(0,c.T)(n=>(0,p.iA)({companyId:n}))))}static#e=y=()=>(this.\u0275fac=function(i){return new(i||d)},this.\u0275prov=e.jDH({token:d,factory:d.\u0275fac}))}return y(),d})();const T="company_id",R=y=>{const d=y.paramMap.get(T);return Number.isFinite(Number(d))},L=[{path:"",providers:[(0,e.oKB)(Y.r)],children:[{path:`yritystiedot/tilausvahvistus/:${T}`,loadComponent:()=>o.e(4811).then(o.bind(o,94811)).then(y=>
1y.ContractOrderConfirmationPageComponent),canActivate:[R]},{path:`yritystiedot/:section_name/:${T}`,loadComponent:()=>Promise.all([o.e(4271),o.e(1389),o.e(9325),o.e(1365),o.e(2076),o.e(6246)]).then(o.bind(o,86112)).then(y=>y.ProSettingsComponent),providers:[function Q(){return[(0,m.vQ)(N.A),(0,t.SI)(B)]}(),(0,G.b)(),(0,W.A)(),function M(){return[(0,m.vQ)(V.z9),(0,t.SI)(x)]}(),function I(){return[(0,m.vQ)(S.fr,S.F6),(0,t.SI)(z)]}()],canActivate:[R]}]}],b=L},10739(U,g,o){o.d(g,{OP:()=>u,Tx:()=>h,Zq:()=>l,b9:()=>m,bI:()=>s,el:()=>F,gJ:()=>O,hG:()=>C,hk:()=>H,iA:()=>t,mm:()=>v,nL:()=>x,nu:()=>$,oo:()=>a,sm:()=>r,tc:()=>K,u$:()=>c});var e=o(68754);const t=(0,e.VP)("[Pro users] Fetch current company users on init and company change",(0,e.xk)()),m=(0,e.VP)("[Pro users] Fetch current company users after adding a user",(0,e.xk)()),c=(0,e.VP)("[Pro users] Fetch current company users after deleting a user",(0,e.xk)()),h=(0,e.VP)("[Pro users] Fetch current company users after updating a user state",(0,e.xk)()),s=(0,e.VP)("[Pro users] Fetching from company users from the backend done",(0,e.xk)()),r=(0,e.VP)("[Pro users] Fetching from company users from the backend failed",(0,e.xk)()),a=(0,e.VP)("[Pro users] Component updates user status in the company",(0,e.xk)()),l=(0,e.VP)("[Pro users] Updating user status in the company API request complete",(0,e.xk)()),v=(0,e.VP)("[Pro users] Updating user status in the company API request failed",(0,e.xk)()),$=(0,e.VP)("[Pro users] Add a new user to company",(0,e.xk)()),u=(0,e.VP)("[Pro users] Adding user to company API request done",(0,e.xk)()),H=(0,e.VP)("[Pro users] Adding user to company failed due to user not being found",(0,e.xk)()),K=(0,e.VP)("[Pro users] Adding user to company failed due to probably already being in a company",(0,e.xk)()),F=(0,e.VP)("[Pro users] Adding user to company failed in general",(0,e.xk)()),C=(0,e.VP)("[Pro users] Delete user from the company",(0,e.xk)()),O=(0,e.VP)("[Pro users] Delete user from the company API success",(0,e.xk)()),x=(0,e.VP)("[Pro users] Delete user from the company API failure",(0,e.xk)())},96975(U,g,o){o.d(g,{F6:()=>h,fr:()=>c,pe:()=>m});var e=o(68754),t=o(10739),m=function(s){return s.NOT_FOUND="not found",s.ALREADY_IN_COMPANY="already in company",s}(m||{});const c="company-users",h=(0,e.vy)({},(0,e.on)(t.bI,(s,{users:r,companyId:a})=>({...s,[a]:{...s?.[a]??{},users:r,userFetchedError:!1}})),(0,e.on)(t.sm,(s,{companyId:r})=>({...s,[r]:{...s?.[r]??{},users:[],userFetchedError:!0}})),(0,e.on)(t.hG,(s,{userId:r,companyId:a})=>({...s,[a]:{...s?.[a]??{},usersBeingDeleted:[...s?.[a]?.usersBeingDeleted??[],r]}})),(0,e.on)(t.nL,t.gJ,(s,{companyId:r,userId:a})=>({...s,[r]:{...s?.[r]??{},usersBeingDeleted:s?.[r]?.usersBeingDeleted?.filter(l=>l!==a)}})),(0,e.on)(t.gJ,(s,{userId:r,companyId:a})=>({...s,[a]:{...s?.[a]??{},users:(s?.[a].users??[]).filter(l=>l.userId!==r)}})),(0,e.on)(t.oo,(s,{userId:r,companyId:a})=>({...s,[a]:{...s?.[a]??{},userAdminStatusBeingUpdated:[...s?.[a]?.userAdminStatusBeingUpdated??[],r]}})),(0,e.on)(t.mm,t.Zq,(s,{companyId:r,userId:a})=>({...s,[r]:{...s?.[r]??{},userAdminStatusBeingUpdated:s?.[r]?.userAdminStatusBeingUpdated?.filter(l=>l!==a)}})),(0,e.on)(t.Zq,(s,{userId:r,companyId:a,isAdmin:l})=>({...s,[a]:{...s?.[a]??{},users:(s?.[a].users??[]).map(v=>v.userId===r?{...v,isAdmin:l}:v)}})),(0,e.on)(t.nu,(s,{companyId:r})=>({...s,[r]:{...s?.[r]??{},userAddPending:!0,userAddSuccess:!1,userAddFailure:null}})),(0,e.on)(t.OP,(s,{companyId:r})=>({...s,[r]:{...s?.[r]??{},userAddPending:!1,userAddSuccess:!0,userAddFailure:null}})),(0,e.on)(t.el,(s,{companyId:r})=>({...s,[r]:{...s?.[r]??{},userAddPending:!1,userAddSuccess:!1,userAddFailure:null}})),(0,e.on)(t.hk,(s,{companyId:r})=>({...s,[r]:{...s?.[r]??{},userAddPending:!1,userAddSuccess:!1,userAddFailure:m.NOT_FOUND}})),(0,e.on)(t.tc,(s,{companyId:r})=>({...s,[r]:{...s?.[r]??{},userAddPending:!1,userAddSuccess:!1,userAddFailure:m.ALREADY_IN_COMPANY}})))}}]);
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.