PageSourceSearch

https://nautos.de/chunk-CJHUNIC5.js

js nautos.de collected 2026-10-04 09:50:49 UTC 9,885 bytes, 1 lines download raw bytes

1import{N as a,Z as v,bd as m,n as h,pa as d,qd as I,r as p,t as u,ta as l,x as i}from"./chunk-BUIIXSYE.js";var S=(function(t){return t.PASSWORD_LOGIN="PasswordLogin",t.LOGIN_MODE_EXTERNAL="external",t.IP_LOGIN="IPAddressLogin",t.LDAP="LDAP",t.SAML="SAML",t.SSO_V2="ssoV2",t})(S||{}),R=(function(t){return t.LOGOUT_DISABLED="LogoutDisabled",t.GOTO_LOGIN_PAGE="ReturnToLoginDialog",t.GOTO_STANDARD_LOGOUT_PAGE="NautosLogoutPage",t.GOTO_CUSTOM_LOGOUT_PAGE="CustomLogoutPage",t})(R||{}),A=(function(t){return t.USERNAME_AND_PASSWORD="passwordLogin",t.IP_LOGIN="ipAddressLogin",t.SSO_V2="saml2",t})(A||{}),D=(function(t){return t.INSERT="INSERT",t.UPDATE="UPDATE",t.FIXINSERT="FIXINSERT",t.FIXUPDATE="FIXUPDATE",t})(D||{}),U=(function(t){return t.None="None",t.SUCCESS="SUCCESS",t.ERROR="ERROR",t.LOGOUT="LOGOUT",t.REJECTED="REJECTED",t.INFO="INFO",t.Unkown="Unkown",t})(U||{}),y=(function(t){return t.Username="user_management.users.username",t.Email="user_management.users.email",t.Forename="user_management.users.first_name",t.Surname="user_management.users.last_name",t.Roles="user_management.users.roles",t.Salutation="user_management.users.salutation",t.Abbreviation="user_management.users.abbreviation",t.Info="user_management.users.information",t.Company="user_management.users.company",t.PhoneNumber="user_management.users.phone_number",t.Location="user_management.users.location",t.Language="common.language",t.CostCenters="user_management.users.cost_centers",t.OrderNumber="orders.request.order_number",t.Groups="user_management.groups.title",t.Department="user_management.users.department",t})(y||{});var P="Nautos",N="00000000-0000-0000-0000-000000000000";var F=["csv"];var M=["7z","ace","csv","doc","docx","iso","jpeg","jpg","pdf","png","ppt","pptx","rar","tar.gz","tgz","txt","xls","xlsx","zip"];var T="isIntranet";var f="tenantKey";var G=" OR ";var b=class{static isAccepted(c){return c>=200&&c<=299}static isClientSideError(c){return c>=400&&c<=499}static getFilenameFromContentDisposition(c){if(!c.headers)return null;let e=c.headers["content-disposition"],r=/filename\*=UTF-8''(.+?)($|;)|filename="?([^";]+)"?/i.exec(e);return r?r[1]?decodeURIComponent(r[1]):r[3]||null:null}};var L="authInfo",E=(()=>{class t{constructor(){this._sender=new h("")}load(){if(this.exists())return JSON.parse(window.localStorage.getItem(L))}exists(){return!!window.localStorage.getItem(L)}store(e){window.localStorage.setItem(L,JSON.stringify(e)),this._sender.next(e.token)}tokenChanged(){return this._sender.asObservable()}invalidate(){window.localStorage.removeItem(L)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var C={token:"",tenantId:"",tenantKey:"",usedLoginMethod:"",userAccountId:"",username:"",forename:"",surname:"",email:"",roles:"",logoutOption:"",logoutUrl:"",isIntranet:!1},O=(()=>{class t{constructor(){this._httpClient=l(m),this._authStorageService=l(E),this._configService=l(I),this._loggedIn=new h(!1),this.loggedIn$=this._loggedIn.asObservable(),this._userInfo=new h(C),this.userInfo$=this._userInfo.asObservable(),this.checkIsLoggedIn()}get userInfo(){return this._userInfo.getValue()}get currentTokenDecoded(){return this._currentTokenDecoded}get userIsAdmin(){return this.userInfo.roles.split(",").map(e=>e.trim().toLowerCase()).includes("admin")}getAuthenticationOptions(e){let n=this._configService.baseConfig.baseUrl+`/authentication/${e}`;return this._httpClient.get(n,{observe:"response"}).pipe(i(r=>b.isAccepted(r.status)?r.body:null),a(()=>u(null)))}ipLogin(e){localStorage.clear();let n=this._configService.baseConfig.baseUrl+`/authentication/${e}`;return this._httpClient.post(n,{},{observe:"response"}).pipe(i(r=>this.storeLoginResponse(r)),a(r=>(this._loggedIn.next(!1),u(r.status))))}supportLogin(e,n){localStorage.clear();let r=this._configService.baseConfig.baseUrl+"/authentication/support",o={token:e,password:n};return this._httpClient.post(r,o,{observe:"response"}).pipe(i(s=>{if(s?.body?.tenantKey&&s.body?.token){let g=s.body;localStorage.setItem(f,g.tenantKey),this._authStorageService.store(g);let _=g.token;return this.setAuthenticationData(_),this._loggedIn.next(!0),s.body}return null}),a(()=>(this._loggedIn.next(!1),u(null))))}oAuthLogin(e){let n=this._configService.baseConfig.baseUrl+"/v1/oauth2/oauth2login";e.action=n,document.body.appendChild(e),e.submit()}login(e,n=!1){localStorage.clear();let r=this._configService.baseConfig.baseUrl+"/authentication";return this._httpClient.post(r,e,{observe:"response"}).pipe(i(o=>
1{if(o?.body?.token){let{tenantName:s}=e;s&&localStorage.setItem(f,s);let g=o.body.isIntranet?.toString()??"false";localStorage.setItem(T,g);let _=o.body;_.external=n,this._authStorageService.store(_);let k=_.token;return this.setAuthenticationData(k),this._loggedIn.next(!0),o.status}return null}),a(o=>(this._loggedIn.next(!1),u(o.status))))}initiateSamlLogin(e){localStorage.clear();let n=this._configService.baseConfig.baseUrl+`/authentication/saml/${e}`;return this._httpClient.post(n,{},{observe:"response",params:this.redirectUrl?{returnUrl:this.redirectUrl}:{}}).pipe(i(r=>r?.body?r.body:null),a(()=>(this._loggedIn.next(!1),p)))}completeSamlLogin(e){let n=this._configService.baseConfig.baseUrl+`/authentication/saml/${e}/login`;return this._httpClient.post(n,{},{observe:"response"}).pipe(i(r=>this.storeLoginResponse(r)),a(r=>{throw this._loggedIn.next(!1),r}))}completeShibbolethLogin(){let e=this.getUrl("/Auth/saml2",2);return this._httpClient.get(e,{observe:"response"}).pipe(i(n=>this.storeLoginResponse(n)),a(n=>{throw this._loggedIn.next(!1),n}))}ldapLogin(e){localStorage.clear();let n=this._configService.baseConfig.baseUrl+"/authentication/ldap";return this._httpClient.post(n,e,{observe:"response"}).pipe(i(r=>{if(r?.body?.token){let{tenantName:o}=e;o&&localStorage.setItem(f,o);let s=r.body;s.external=!1,this._authStorageService.store(s);let g=s.token;return this.setAuthenticationData(g),this._loggedIn.next(!0),r.status}return null}),a(r=>(this._loggedIn.next(!1),u(r.status))))}ldapSsoLogin(e){let n=this._configService.baseConfig.baseUrl+`/authentication/ldap/${e}`;return this._httpClient.post(n,{},{observe:"response",withCredentials:!0}).pipe(i(r=>this.storeLoginResponse(r)),a(r=>{throw this._loggedIn.next(!1),r}))}logout(){let e=()=>{this.redirectUrl=void 0,this._authStorageService.invalidate(),this._currentTokenDecoded=void 0,this._currentToken=void 0,this._loggedIn.next(!1),this._userInfo.next(C)};if(this.userInfo.usedLoginMethod===S.SSO_V2||this.userInfo.usedLoginMethod===S.SAML){let n=this._configService.baseConfig.baseUrl+"/saml2/logout";return this._httpClient.post(n,{},{observe:"response"}).pipe(a(()=>p),v(()=>{e()}))}return e(),p}userHasPermission(e){return this._currentTokenDecoded?this._currentTokenDecoded.roles.findIndex(n=>n.toLocaleLowerCase()===e.toLocaleLowerCase())>-1:!1}userHasAllPermissions(e){return this._currentTokenDecoded?e.every(n=>this._currentTokenDecoded.roles.indexOf(n)>-1):!1}userHasOnePermission(e){return this._currentTokenDecoded?e.some(n=>this._currentTokenDecoded.roles.findIndex(r=>r.toLocaleLowerCase()===n.toLocaleLowerCase())>-1):!1}isTokenValid(){return this.isTokenExpired()?(this.logout().subscribe(),!1):!0}checkIsLoggedIn(){let e=this._authStorageService.load();e&&this.setAuthenticationData(e.token)}setAuthenticationData(e){if(this._currentToken=e,this.isTokenValid()){let n=this.getBase64Token(this._currentToken),r=JSON.parse(atob(n)),o=r["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];this._currentTokenDecoded={roles:o,userAggregate:r.user_aggregate,userTenant:r.user_tenant,hasHostingModule:r.has_hosting_module},this._userInfo.next(this._authStorageService.load()),this._loggedIn.next(!0)}else this.logout().subscribe()}isTokenExpired(){let e=this.getBase64Token(this._currentToken),n=JSON.parse(atob(e)).exp;return Math.floor(new Date().getTime()/1e3)>=n}getBase64Token(e){return e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")}storeLoginResponse(e){if(e?.body?.token){let{tenantKey:n}=e.body;localStorage.setItem(f,n);let r=e.body;this._authStorageService.store(r);let o=r.token;return this.setAuthenticationData(o),this._loggedIn.next(!0),this.redirectUrl=e.body.returnUrl??this.redirectUrl,e.status}return null}getUrl(e,n=1){return`${`${this._configService.baseConfig.baseUrl}`}${n===1?"/v1":"/v2"}${e}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ae=(()=>{class t{constructor(){this._authService=l(O),this._configService=l(I),this._httpClient=l(m),this._defaultLanguageKey="de",this._currentLanguageSubject=ne
1w h("de"),this.currentLanguage$=this._currentLanguageSubject.asObservable(),this.getLayoutLanguage().subscribe(e=>{e?this._currentLanguageSubject.next(e):this._currentLanguageSubject.next(this._defaultLanguageKey)})}initializeLanguage(e){e||(e=this._defaultLanguageKey),this._currentLanguageSubject.next(e)}setLanguage(e){this.setLayoutLanguage(e).subscribe(),this.initializeLanguage(e)}getLayoutLanguage(){let e=this._authService.userInfo.userAccountId;if(e){let n=this.getUrl(`useraccounts/${e}/layoutLanguage`);return this._httpClient.get(n).pipe(i(r=>r.layoutLanguage))}else return u(this._defaultLanguageKey)}setLayoutLanguage(e){let n=this._authService.userInfo.userAccountId;if(n){let r=this.getUrl(`useraccounts/${n}/layoutLanguage`),o={layoutLanguage:e};return this._httpClient.put(r,o)}else return u()}getUrl(e){return`${this._configService.baseConfig.baseUrl}${this._configService.baseConfig.extension}/${e}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=d({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{E as a,S as b,R as c,A as d,D as e,U as f,y as g,P as h,N as i,F as j,M as k,T as l,f as m,G as n,b as o,O as p,ae as q};

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.