PageSourceSearch

https://portal.pens-expert.ch/auth/ui/chunk-CU5B3T72.js

js pens-expert.ch collected 2026-10-08 19:50:22 UTC 11,926 bytes, 1 lines download raw bytes

1import{b as S}from"./chunk-5HCA7LLS.js";import{a as M}from"./chunk-CQWNJITX.js";import{a as y}from"./chunk-WMGSV2R2.js";import{a as _e,b as he,c as Ae}from"./chunk-7WJIN2XE.js";import{g as ge}from"./chunk-OZEV3NCO.js";import{A as de,D as ve,I as fe,M as ue,c as oe,f as ce,h as se,i as pe,n as le,o as me}from"./chunk-5MNH3SI7.js";import"./chunk-EPWUJLM3.js";import"./chunk-RUJGRZ74.js";import{T as re,Y as ae,fa as $,ma as ne,n as v}from"./chunk-ZFLJCFKT.js";import{$ as D,Aa as m,Ba as h,Ca as j,D as q,Da as H,E as z,F as d,Fa as C,G as P,Ga as F,Ha as s,Hb as w,P as J,Sb as te,V as g,W as K,Wb as ie,Ya as X,Z as n,_ as k,_a as b,db as x,eb as O,fb as B,la as c,o as U,pa as L,pb as Y,qa as Q,qb as Z,t as u,ta as W,ua as _,ub as ee,v as R,ya as o,za as l}from"./chunk-SPV2DEUE.js";var T=class{},E=class{},I=class{};var A=class extends ae{};var G=(()=>{class i{constructor(){this.http=n(w),this.config=n(A),this.pages=n(ne),this.protectedUiService=n(S),this.flowsService=n(M),this.accessService=n(y)}getAirlock2FADeviceManagement(){return this.fetchUsersAppDevices().pipe(P(e=>this.fetchUsersHardwareDevices().pipe(P(t=>this.flowsService.retrieveSelfServiceFlows().pipe(u(r=>this.createManagement(e,t,r)))))))}navigateToExitTarget(){this.pages.routes.navigateTo(this.config.pageExitTarget)}startFlowToChangeDisplayName(e){return this.startFlowAndSelectDevice(e,this.config.flowToChangeDisplayName)}startFlowToDeleteDevice(e){return this.startFlowAndDeleteDevice(e,this.config.flowToDeleteDevice)}startFlowToActivateAppDevice(){let e=this.config.flowToActivateAppDevice;return this.protectedUiService.startFlow(e).pipe(d(t=>this.handleAccessError(t,this.pages.routes.protected.select.flow.append(e).url,e)))}getUiConfig(){return U(this.config)}createManagement(e,t,r){let p=new I;return p.appDevices=e,p.hardwareDevices=t,p.canRename=r.isAccessible(this.config.flowToChangeDisplayName),p.canDelete=r.isAccessible(this.config.flowToDeleteDevice)&&this.shouldShowDeleteButton(e.length),p.canAdd=r.isAccessible(this.config.flowToActivateAppDevice),p.hasExitTarget=!!this.config.pageExitTarget,p}shouldShowDeleteButton(e){return!!this.config.flowToDeleteDevice&&!(!this.config.canUserDeleteAllDevices&&e===1)}fetchUsersAppDevices(){return this.http.get(v(["/protected","self-service","airlock-2fa","app-devices"])).pipe(u(e=>this.toAppDevices(e.data)),d(e=>this.handleErrorResponse(e)))}fetchUsersHardwareDevices(){return this.http.get(v(["/protected","self-service","airlock-2fa","hardware-devices"])).pipe(u(e=>this.toHardwareDevices(e.data)),d(e=>this.handleErrorResponse(e)))}handleErrorResponse(e){return e.status===404?U([]):this.handleAccessError(e,this.pages.routes.protected.tokens.airlock2fa.devices.url)}startFlowAndSelectDevice(e,t){return this.protectedUiService.startFlow(t).pipe(R(()=>this.selectAirlock2FADevice(e.id)),d(r=>this.handleAccessError(r,this.pages.routes.protected.tokens.airlock2fa.devices.url,t)))}startFlowAndDeleteDevice(e,t){return this.protectedUiService.startFlow(t).pipe(R(()=>this.deleteAirlock2FADevice(e.id)),d(r=>this.handleAccessError(r,this.pages.routes.protected.tokens.airlock2fa.devices.url,t)))}handleAccessError(e,t,r){return this.accessService.handleAccessError(e,t,r)}selectAirlock2FADevice(e){return this.http.post(v(["/protected","self-service","airlock-2fa","devices",e,"select"]),null,{observe:"response"}).pipe(u(t=>new $(t)))}deleteAirlock2FADevice(e){return this.http.post(v(["/protected","self-service","airlock-2fa","devices",e,"remove"]),null,{observe:"response"}).pipe(u(t=>new $(t)))}toAppDevices(e){return e.map(t=>this.toAppDevice(t))}toAppDevice(e){let t=new T;
1return t.id=e.id,t.displayName=e.attributes.displayName,t.appVersion=e.attributes.appVersion,t.appVersionSupported=e.attributes.appVersionSupported,t.type=e.attributes.type,t}toHardwareDevices(e){return e.map(t=>this.toHardwareDevice(t))}toHardwareDevice(e){let t=new E;return t.id=e.id,t.serialNumber=e.attributes.serialNumber,t}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=g({token:i,factory:i.\u0275fac})}}return i})();var N=(()=>{class i{constructor(){this.http=n(w)}getDeviceManagementConfig(){return this.http.get(v(["protected","self-service","ui","configuration","tokens","airlock-2fa"]))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=g({token:i,factory:i.\u0275fac})}}return i})();var f=class i{constructor(){this.service=n(N),this.accessService=n(y),this.routes=n(re)}static{this.PROVIDER={provide:A,useFactory:i.resolveConfig,deps:[te]}}resolve(){return this.service.getDeviceManagementConfig().pipe(d(a=>(a.status===404?this.routes.error.notFound.navigate():this.accessService.handleAccessError(a,this.routes.protected.tokens.airlock2fa.devices.url),q)))}static resolveConfig(a){return a.snapshot.data.deviceManagementConfig}static{this.\u0275fac=function(e){return new(e||i)}}static{this.\u0275prov=g({token:i,factory:i.\u0275fac})}};var Ce=i=>({keyPrefix:"protected.tokens.airlock-2fa.app-device.types",values:i}),Fe=i=>({type:i}),ke=i=>({version:i});function be(i,a){i&1&&h(0,"iam-alert",6),i&2&&o("text","protected.tokens.airlock-2fa.app-device.missing")("type","info")("id","airlock2FADevicesMissing")}function xe(i,a){if(i&1&&(j(0),l(1,"ul",11)(2,"li"),h(3,"iam-text-row",12),m(),l(4,"li"),h(5,"iam-text-row",12),x(6,"translate"),m()(),H()),i&2){let e=s(),t=e.$implicit,r=e.index;c(3),o("id","airlock2FADisplayName["+r+"]")("label","protected.tokens.airlock-2fa.app-device.display-name")("value",t.displayName?t.displayName:"-"),c(2),o("id","airlock2FAAppVersion["+r+"]")("label","protected.tokens.airlock-2fa.app-device.app-version.label")("value",B(6,6,"protected.tokens.airlock-2fa.app-device.app-version."+(t.appVersionSupported?"up-to-date":"out-of-date"),b(9,ke,t.appVersion)))}}function we(i,a){if(i&1&&(j(0),h(1,"iam-text-row",12)(2,"iam-text-row",12),x(3,"translate"),H()),i&2){let e=s(),t=e.$implicit,r=e.index;c(),o("id","airlock2FADisplayName["+r+"]")("label","protected.tokens.airlock-2fa.app-device.display-name")("value",t.displayName?t.displayName:"-"),c(),o("id","airlock2FAAppVersion["+r+"]")("label","protected.tokens.airlock-2fa.app-device.app-version.label")("value",B(3,6,"protected.tokens.airlock-2fa.app-device.app-version."+(t.appVersionSupported?"up-to-date":"out-of-date"),b(9,ke,t.appVersion)))}}function ye(i,a){if(i&1){let e=C();l(0,"iam-button",13),F("buttonClick",function(){k(e);let r=s().$implicit,p=s(2);return D(p.renameAirlock2FADevice(r))}),m()}if(i&2){let e=s().index;o("id","changeAirlock2FADisplayName["+e+"]")("text","protected.tokens.airlock-2fa.app-device.actions.rename")}}function Se(i,a){if(i&1){let e=C();l(0,"iam-button",14),F("buttonClick",function(){k(e);let r=s().$implicit,p=s(2);return D(p.showDeviceDeleteConfirmationDialog(r))}),m()}if(i&2){let e=s().index;o("id","deleteAirlock2FADevice["+e+"]")("type","error")("text","protected.tokens.airlock-2fa.app-device.actions.delete")}}function Me(i,a){if(i&1&&(l(0,"iam-card",7),x(1,"translatedEnum"),_(2,xe,7,11,"ng-container",8)(3,we,4,11,"ng-container",8),l(4,"iam-button-row"),_(5,ye,1,2,"iam-button",9)(6,Se,1,3,"iam-button",10),m()()),i&2){let e=a.$implicit,t=a.index,r=s().ngIf,p=s();o("id","airlock2FAAppDevice["+t+"]")("title","protected.tokens.airlock-2fa.app-device.title")("titleArguments",b(12,Fe,e.type?"("+O(1,8,b(10,Ce,e.type))+")":""))("detailCard",!0),c(2),o("ngIf",p.wcagMode()),c(),o("ngIf",!p.wcagMode()),c(2),o("ngIf",r.canRename),c(),o("ngIf",r.canDelete)}}function Te(i,a){if(i&1&&(l(0,"iam-card",15),h(1,"iam-text-row",12),m()),i&2){let e=a.$implicit,t=a.index;o("id","airlock2FAHardwareDevice["+t+"]")("title","protected.tokens.airlock-2fa.hardware-device.title")("detailCard",!0),c(),o("id","airlock2FAHardwareDeviceSerial["+t+"]")("label","protected.tokens.airlock-2fa.hardware-device.serial-number")("value",e.serialNumber)}}function Ee(i,a){if(i&1){let e=C();l(0,"iam-button",13),F("buttonClick",function(){k(e);let r=s(3);return D(r.activateAppDevice())}),m()}i&2&&o("id","activateAirlock2FAAppDevice")("text","protected.tokens.airlock-2fa.actions.activate-app-device")}function Ie(i,a){if(i&1){let e=C();l(0,"iam-button",13),F("buttonClick",function(){k(e);let r=s(3);return D(r.navigateToExitTarget())}),m()}i&2&&o("id","exitAirlock2FADeviceManagement")("text","protected.tokens.airlock-2fa.actions.exit")}function Ve(i,a){if(i&1&&(l(0,"iam-button-row",16),_(1,Ee,1,2,"iam-button",9)(2,Ie,1,2,"iam-button",9),m()),i&2){let e=s().ngIf;o("rowNgClass","iam-mt-3"),c(),o("ngIf",e.canAdd),c(),o("ngIf",e.hasExitTarget)}}function Ne(i,a){if(i&1&&(l(0,"iam-page",1),_(1,be,1,3,"iam-alert",2)(2,Me,7,14,"iam-card",3)(3,Te,2,6,"iam-card",4)(4,Ve,3,3,"iam-button-row",5),m()),i&2){let e=a.ngIf,t=s();o("pageId",t.pageId)("bodyAttributes",t.bodyAttributes)("title","protected.tokens.airlock-2fa.title")("hideMaintenanceMessages",!0),c(),o("ngIf",e.appDevices.length===0&&e.hardwareDevices.length===0),c(),o("ngForOf",e.appDevices),c(),o("ngForOf",e.hardwareDevices),c(),o("ngIf",e.canAdd||e.hasExitTarget)}}var De=(()=>{class i extends he{constructor(){super(),this.bodyAttributes={[_e]:Ae.ProtectedSelfService},this.pageId="iamProtectedAirlock2FADeviceManagement",this.deviceManagementService=n(G),this.pageDialog=n(fe),this.protectedUiService=n(S),this.accessibilityService=n(oe)}ngOnInit(){this.airlock2FADeviceManagement=this.initUiConfig().pipe(J(()=>this.deviceManagementService.getAirlock2FADeviceManagement()))}showDeviceDeleteConfirmationDialog(e){this.pageDialog.show({text:"protected.tokens.airlock-2fa.deletion.dialog.text",title:"protected.tokens.airlock-2fa.deletion.dialog.title"}).pipe(z(t=>t.ok)).subscribe(()=>this.deleteAirlock2FADevice(e))}deleteAirlock2FADevice(e){this.deviceManagementService.startFlowToDeleteDevice(e).subscribe({next:t=>this.protectedUiService.handleSuccessfulStep(t),error:t=>this.protectedUiService.handleFailedStep(t)})}renameAirlock2FADevice(e){this.deviceManagementService.startFlowToChangeDisplayName(e).subscribe({next:t=>this.protectedUiService.handleSuccessfulStep(t),error:t=>this.protectedUiService.handleFailedStep(t)})}activateAppDevice(){this.deviceManagementService.startFlowToActivateAppDevice().subscribe({next:e=>this.protectedUiService.handleSuccessfulStep(e),error:e=>this.protectedUiService.handleFailedStep(e)})}navigateToExitTarget(){this.deviceManagementService.navigateToExitTarget()}wcagMode(){return this.accessibilityService.wcagModeEnabled()}getUiConfig(){return this.deviceManagementService.getUiConfig()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=L({type:i,selectors:[["ng-component"]],standalone:!1,features:[X([M,G,f.PROVIDER]),W],decls:2,vars:3,consts:[[3,"pageId","bodyAttributes","title","hideMaintenanceMessages",4,"ngIf"],[3,"pageId","bodyAttributes","title","hideMaintenanceMessages"],[3,"text","type","id",4,"ngIf"],[3,"id","title","titleArguments","detailCard",4,"ngFor","ngForOf"],[3,"id","title","detailCard",4,"ngFor","ngForOf"],[3,"rowNgClass",4,"ngIf"],[3,"text","type","id"],[3,"id","title","titleArguments","detailCard"],[4,"ngIf"],[3,"id","text","buttonClick",4,"ngIf"],[3,"id","type","text","buttonClick",4,"ngIf"],[1,"list-unstyled"],[3,"id","label","value"],[3,"buttonClick","id","text"],[3,"buttonClick","id","type","text"],[3,"id","title","detailCard"],[3,"rowNgClass"]],template:function(t,r){t&1&&(_(0,Ne,5,8,"iam-page",0),x(1,"async")),t&2&&o("ngIf",O(1,1,r.airlock2FADeviceManagement))},dependencies:[Y,Z,me,se,pe,le,de,ue,ee,ce,ve],encapsulation:2})}}return i})();var Ue=[{path:"",pathMatch:"full",redirectTo:"devices"},{path:"devices",component:De,resolve:{deviceManagementConfig:()=>n(f).resolve()},runGuardsAndResolvers:"always"}],Gt=(()=>
1{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=Q({type:i})}static{this.\u0275inj=K({providers:[N,f],imports:[ie.forChild(Ue),ge]})}}return i})();export{Gt as Airlock2FADeviceManagementModule};

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.