1import{a as G}from"./chunk-NVKXDWWT.js";import{a as _}from"./chunk-45WCVJBT.js";import{U as ft,V as $,ha as lt,ia as wt,na as V,q as J}from"./chunk-SEQCRKB6.js";import{C as ot,Db as at,E as X,R as W,Tb as ct,U as K,V as ht,Y as R,ma as ut,n as L,s as B,u as st}from"./chunk-HBLARLGW.js";var et=(()=>{let t=class t{constructor(){this.flowInfoService=R(G),this.routes=R(ft),this.pages=R(V)}canActivate(e){return this.flowInfoService.retrieveFlowInfo().pipe(B(n=>{if(n.nextStep==="OAUTH2_CLIENT_AUTHORIZATION_REQUIRED"||n.nextStep==="OAUTH2_CLIENT_AUTHORIZATION_URI_RETRIEVAL_REQUIRED")switch(n.flowType.type()){case $.Authentication:return this.routes.auth.oauth2.client.authorization.navigate({queryParams:e.queryParams}),!1;case $.Protected:return this.routes.protected.oauth2.client.authorization.navigate({queryParams:e.queryParams}),!1;default:break}return this.handleInvalidStateError(),!1}),X(()=>(this.handleInvalidStateError(),L(!1))))}handleInvalidStateError(){this.pages.errors.showErrorPage(new wt({title:"error.oauth2-client-authorization-failed.title",description:"error.oauth2-client-authorization-failed.invalid-state"}))}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=K({token:t,factory:t.\u0275fac});let r=t;return r})();var St="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ht="ARRAYBUFFER not supported by this environment",bt="UINT8ARRAY not supported by this environment";function pt(r,t,i,e){let n,o,u,f=t||[0],a=(i=i||0)>>>3,c=e===-1?3:0;for(n=0;n<r.length;n+=1)u=n+a,o=u>>>2,f.length<=o&&f.push(0),f[o]|=r[n]<<8*(c+e*(u%4));return{value:f,binLen:8*r.length+i}}function O(r,t,i){switch(t){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(r){case"HEX":return function(e,n,o){return(function(u,f,a,c){let p,h,l,m;if(u.length%2!=0)throw new Error("String of HEX type must be in byte increments");let g=f||[0],d=(a=a||0)>>>3,A=c===-1?3:0;for(p=0;p<u.length;p+=2){if(h=parseInt(u.substr(p,2),16),isNaN(h))throw new Error("String of HEX type contains invalid characters");for(m=(p>>>1)+d,l=m>>>2;g.length<=l;)g.push(0);g[l]|=h<<8*(A+c*(m%4))}return{value:g,binLen:4*u.length+a}})(e,n,o,i)};case"TEXT":return function(e,n,o){return(function(u,f,a,c,p){let h,l,m,g,d,A,E,I,S=0,v=a||[0],H=(c=c||0)>>>3;if(f==="UTF8")for(E=p===-1?3:0,m=0;m<u.length;m+=1)for(h=u.charCodeAt(m),l=[],128>h?l.push(h):2048>h?(l.push(192|h>>>6),l.push(128|63&h)):55296>h||57344<=h?l.push(224|h>>>12,128|h>>>6&63,128|63&h):(m+=1,h=65536+((1023&h)<<10|1023&u.charCodeAt(m)),l.push(240|h>>>18,128|h>>>12&63,128|h>>>6&63,128|63&h)),g=0;g<l.length;g+=1){for(A=S+H,d=A>>>2;v.length<=d;)v.push(0);v[d]|=l[g]<<8*(E+p*(A%4)),S+=1}else for(E=p===-1?2:0,I=f==="UTF16LE"&&p!==1||f!=="UTF16LE"&&p===1,m=0;m<u.length;m+=1){for(h=u.charCodeAt(m),I===!0&&(g=255&h,h=g<<8|h>>>8),A=S+H,d=A>>>2;v.length<=d;)v.push(0);v[d]|=h<<8*(E+p*(A%4)),S+=2}return{value:v,binLen:8*S+c}})(e,t,n,o,i)};case"B64":return function(e,n,o){return(function(u,f,a,c){let p,h,l,m,g,d,A,E=0,I=f||[0],S=(a=a||0)>>>3,v=c===-1?3:0,H=u.indexOf("=");if(u.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(u=u.replace(/=/g,""),H!==-1&&H<u.length)throw new Error("Invalid '=' found in base-64 string");for(h=0;h<u.length;h+=4){for(g=u.substr(h,4),m=0,l=0;l<g.length;l+=1)p=St.indexOf(g.charAt(l)),m|=p<<18-6*l;for(l=0;l<g.length-1;l+=1){for(A=E+S,d=A>>>2;I.length<=d;)I.push(0);I[d]|=(m>>>16-8*l&255)<<8*(v+c*(A%4)),E+=1}}return{value:I,binLen:8*E+a}})(e,n,o,i)};case"BYTES":return function(e,n,o){return(function(u,f,a,c){let p,h,l,m,g=f||[0],d=(a=a||0)>>>3,A=c===-1?3:0;for(h=0;h<u.length;h+=1)p=u.charCodeAt(h),m=h+d,l=m>>>2,g.length<=l&&g.push(0),g[l]|=p<<8*(A+c*(m%4));return{value:g,binLen:8*u.length+a}})(e,n,o,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch{throw new Error(Ht)}return function(e,n,o){return(function(u,f,a,c){return pt(new Uint8Array(u),f,a,c)})(e,n,o,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch{throw new Error(bt)}return function(e,n,o){return pt(e,n,o,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function mt(r,t,i,e){switch(r){case"HEX":return function(n){return(function(o,u,f,a){let c="0123456789abcdef",p,h,l="",m=u/8,g=f===-1?3:0;for(p=0;p<m;p+=1)h=o[p>>>2]>>>8*(g+f*(p%4)),l+=c.charAt(h>>>4&15)+c.charAt(15&h);return a.outputUpper?l.toUpperCase():l})(n,t,i,e)};case"B64":return function(n){return(function(o,u,f,a){let c,p,h,l,m,g="",d=u/8,A=f===-1?3:0;for(c=0;c<d;c+=3)for(l=c+1<d?o[c+1>>>2]:0,m=c+2<d?o[c+2>>>2]:0,h=(o[c>>>2]>>>8*(A+f*(c%4))&255)<<16|(l>>>8*(A+f*((c+1)%4))&255)<<8|m>>>8*(A+f*((c+2)%4))&255,p=0;p<4;p+=1)g+=8*c+6*p<=u?St.charAt(h>>>6*(3-p)&63):a.b64Pad;return g})(n,t,i,e)};case"BYTES":return function(n){return(function(o,u,f){let a,c,p="",h=u/8,l=f===-1?3:0;for(a=0;a<h;a+=1)c=o[a>>>2]>>>8*(l+f*(a%4))&255,p+=String.fromCharCode(c);return p})(n,t,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch{throw new Error(Ht)}return function(n){return(function(o,u,f){let a,c=u/8,p=new ArrayBuffer(c),h=new Uint8Array(p),l=f===-1?3:0;for(a=0;a<c;a+=1)h[a]=o[a>>>2]>>>8*(l+f*(a%4))&255;return p})(n,t,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch{throw new Error(bt)}return function(n){return(function(o,u,f){let a,c=u/8,p=f===-1?3:0,h=new Uint8Array(c);for(a=0;a<c;a+=1)h[a]=o[a>>>2]>>>8*(p+f*(a%4))&255;return h})(n,t,i)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var z=4294967296,w=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
1734187,3204031479,3329325298],T=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],U=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],x="Chosen SHA variant is not supported",yt="Cannot set numRounds with MAC";function D(r,t){let i,e,n=r.binLen>>>3,o=t.binLen>>>3,u=n<<3,f=4-n<<3;if(n%4!=0){for(i=0;i<o;i+=4)e=n+i>>>2,r.value[e]|=t.value[i>>>2]<<u,r.value.push(0),r.value[e+1]|=t.value[i>>>2]>>>f;return(r.value.length<<2)-4>=o+n&&r.value.pop(),{value:r.value,binLen:r.binLen+t.binLen}}return{value:r.value.concat(t.value),binLen:r.binLen+t.binLen}}function gt(r){let t={outputUpper:!1,b64Pad:"=",outputLen:-1},i=r||{},e="Output length must be a multiple of 8";if(t.outputUpper=i.outputUpper||!1,i.b64Pad&&(t.b64Pad=i.b64Pad),i.outputLen){if(i.outputLen%8!=0)throw new Error(e);t.outputLen=i.outputLen}else if(i.shakeLen){if(i.shakeLen%8!=0)throw new Error(e);t.outputLen=i.shakeLen}if(typeof t.outputUpper!="boolean")throw new Error("Invalid outputUpper formatting option");if(typeof t.b64Pad!="string")throw new Error("Invalid b64Pad formatting option");return t}function k(r,t,i,e){let n=r+" must include a value and format";if(!t){if(!e)throw new Error(n);return e}if(t.value===void 0||!t.format)throw new Error(n);return O(t.format,t.encoding||"UTF8",i)(t.value)}var F=class{constructor(t,i,e){let n=e||{};if(this.t=i,this.i=n.encoding||"UTF8",this.numRounds=n.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.o=t,this.h=[],this.u=0,this.l=!1,this.A=0,this.H=!1,this.S=[],this.p=[]}update(t){let i,e=0,n=this.m>>>5,o=this.C(t,this.h,this.u),u=o.binLen,f=o.value,a=u>>>5;for(i=0;i<a;i+=n)e+this.m<=u&&(this.U=this.v(f.slice(i,i+n),this.U),e+=this.m);return this.A+=e,this.h=f.slice(e>>>5),this.u=u%this.m,this.l=!0,this}getHash(t,i){let e,n,o=this.R,u=gt(i);if(this.K){if(u.outputLen===-1)throw new Error("Output length must be specified in options");o=u.outputLen}let f=mt(t,o,this.T,u);if(this.H&&this.g)return f(this.g(u));for(n=this.F(this.h.slice(),this.u,this.A,this.L(this.U),o),e=1;e<this.numRounds;e+=1)this.K&&o%32!=0&&(n[n.length-1]&=16777215>>>24-o%32),n=this.F(n,o,0,this.B(this.o),o);return f(n)}setHMACKey(t,i,e){if(!this.M)throw new Error("Variant does not support HMAC");if(this.l)throw new Error("Cannot set MAC key after calling update");let n=O(i,(e||{}).encoding||"UTF8",this.T);this.k(n(t))}k(t){let i=this.m>>>3,e=i/4-1,n;if(this.numRounds!==1)throw new Error(yt);if(this.H)throw new Error("MAC key already set");for(i<t.binLen/8&&(t.value=this.F(t.value,t.binLen,0,this.B(this.o),this.R));t.value.length<=e;)t.value.push(0);for(n=0;n<=e;n+=1)this.S[n]=909522486^t.value[n],this.p[n]=1549556828^t.value[n];this.U=this.v(this.S,this.U),this.A=this.m,this.H=!0}getHMAC(t,i){let e=gt(i);return mt(t,this.R,this.T,e)(this.Y())}Y(){let t;if(!this.H)throw new Error("Cannot call getHMAC without first setting MAC key");let i=this.F(this.h.slice(),this.u,this.A,this.L(this.U),this.R);return t=this.v(this.p,this.B(this.o)),t=this.F(i,this.R,this.m,t,this.R),t}};function M(r,t){return r<<t|r>>>32-t}function y(r,t){return r>>>t|r<<32-t}function Ct(r,t){return r>>>t}function dt(r,t,i){return r^t^i}function Tt(r,t,i){return r&t^~r&i}function Ut(r,t,i){return r&t^r&i^t&i}function Ft(r){return y(r,2)^y(r,13)^y(r,22)}function N(r,t){let i=(65535&r)+(65535&t);return(65535&(r>>>16)+(t>>>16)+(i>>>16))<<16|65535&i}function Ot(r,t,i,e){let n=(65535&r)+(65535&t)+(65535&i)+(65535&e);return(65535&(r>>>16)+(t>>>16)+(i>>>16)+(e>>>16)+(n>>>16))<<16|65535&n}function Y(r,t,i,e,n){let o=(65535&r)+(65535&t)+(65535&i)+(65535&e)+(65535&n);return(65535&(r>>>16)+(t>>>16)+(i>>>16)+(e>>>16)+(n>>>16)+(o>>>16))<<16|65535&o}function Bt(r){return y(r,7)^y(r,18)^Ct(r,3)}function Pt(r){return y(r,6)^y(r,11)^y(r,25)}function Yt(r){return[1732584193,4023233417,2562383102,271733878,3285377520]}function Lt(r,t){let i,e,n,o,u,f,a,c=[];for(i=t[0],e=t[1],n=t[2],o=t[3],u=t[4],a=0;a<80;a+=1)c[a]=a<16?r[a]:M(c[a-3]^c[a-8]^c[a-14]^c[a-16],1),f=a<20?Y(M(i,5),Tt(e,n,o),u,1518500249,c[a]):a<40?Y(M(i,5),dt(e,n,o),u,1859775393,c[a]):a<60?Y(M(i,5),Ut(e,n,o),u,2400959708,c[a]):Y(M(i,5),dt(e,n,o),u,3395469782,c[a]),u=o,o=n,n=M(e,30),e=i,i=f;return t[0]=N(i,t[0]),t[1]=N(e,t[1]),t[2]=N(n,t[2]),t[3]=N(o,t[3]),t[4]=N(u,t[4]),t}function zt(r,t,i,e){let n,o=15+(t+65>>>9<<4),u=t+i;for(;r.length<=o;)r.push(0);for(r[t>>>5]|=128<<24-t%32,r[o]=4294967295&u,r[o-1]=u/z|0,n=0;n<r.length;n+=16)e=Lt(r.slice(n,n+16),e);return e}var xt=class extends F{constructor(r,t,i){if(r!=="SHA-1")throw new Error(x);super(r,t,i);let e=i||{};this.M=!0,this.g=this.Y,this.T=-1,this.C=O(this.t,this.i,this.T),this.v=Lt,this.L=function(n){return n.slice()},this.B=Yt,this.F=zt,this.U=[1732584193,4023233417,2562383102,271733878,3285377520],this.m=512,this.R=160,this.K=!1,e.hmacKey&&this.k(k("hmacKey",e.hmacKey,this.T))}};function At(r){let t;return t=r=="SHA-224"?T.slice():U.slice(),t}function It(r,t){let i,e,n,o,u,f,a,c,p,h,l,m=[];for(i=t[0],e=t[1],n=t[2],o=t[3],u=t[4],f=t[5],a=t[6],c=t[7],l=0;l<64;l+=1)m[l]=l<16?r[l]:Ot(y(g=m[l-2],17)^y(g,19)^Ct(g,10),m[l-7],Bt(m[l-15]),m[l-16]),p=Y(c,Pt(u),Tt(u,f,a),w[l],m[l]),h=N(Ft(i),Ut(i,e,n)),c=a,a=f,f
1=u,u=N(o,p),o=n,n=e,e=i,i=N(p,h);var g;return t[0]=N(i,t[0]),t[1]=N(e,t[1]),t[2]=N(n,t[2]),t[3]=N(o,t[3]),t[4]=N(u,t[4]),t[5]=N(f,t[5]),t[6]=N(a,t[6]),t[7]=N(c,t[7]),t}var jt=class extends F{constructor(r,t,i){if(r!=="SHA-224"&&r!=="SHA-256")throw new Error(x);super(r,t,i);let e=i||{};this.g=this.Y,this.M=!0,this.T=-1,this.C=O(this.t,this.i,this.T),this.v=It,this.L=function(n){return n.slice()},this.B=At,this.F=function(n,o,u,f){return(function(a,c,p,h,l){let m,g,d=15+(c+65>>>9<<4),A=c+p;for(;a.length<=d;)a.push(0);for(a[c>>>5]|=128<<24-c%32,a[d]=4294967295&A,a[d-1]=A/z|0,m=0;m<a.length;m+=16)h=It(a.slice(m,m+16),h);return g=l==="SHA-224"?[h[0],h[1],h[2],h[3],h[4],h[5],h[6]]:h,g})(n,o,u,f,r)},this.U=At(r),this.m=512,this.R=r==="SHA-224"?224:256,this.K=!1,e.hmacKey&&this.k(k("hmacKey",e.hmacKey,this.T))}},s=class{constructor(t,i){this.N=t,this.I=i}};function Nt(r,t){let i;return t>32?(i=64-t,new s(r.I<<t|r.N>>>i,r.N<<t|r.I>>>i)):t!==0?(i=32-t,new s(r.N<<t|r.I>>>i,r.I<<t|r.N>>>i)):r}function C(r,t){let i;return t<32?(i=32-t,new s(r.N>>>t|r.I<<i,r.I>>>t|r.N<<i)):(i=64-t,new s(r.I>>>t|r.N<<i,r.N>>>t|r.I<<i))}function kt(r,t){return new s(r.N>>>t,r.I>>>t|r.N<<32-t)}function Xt(r,t,i){return new s(r.N&t.N^r.N&i.N^t.N&i.N,r.I&t.I^r.I&i.I^t.I&i.I)}function Vt(r){let t=C(r,28),i=C(r,34),e=C(r,39);return new s(t.N^i.N^e.N,t.I^i.I^e.I)}function b(r,t){let i,e;i=(65535&r.I)+(65535&t.I),e=(r.I>>>16)+(t.I>>>16)+(i>>>16);let n=(65535&e)<<16|65535&i;return i=(65535&r.N)+(65535&t.N)+(e>>>16),e=(r.N>>>16)+(t.N>>>16)+(i>>>16),new s((65535&e)<<16|65535&i,n)}function Gt(r,t,i,e){let n,o;n=(65535&r.I)+(65535&t.I)+(65535&i.I)+(65535&e.I),o=(r.I>>>16)+(t.I>>>16)+(i.I>>>16)+(e.I>>>16)+(n>>>16);let u=(65535&o)<<16|65535&n;return n=(65535&r.N)+(65535&t.N)+(65535&i.N)+(65535&e.N)+(o>>>16),o=(r.N>>>16)+(t.N>>>16)+(i.N>>>16)+(e.N>>>16)+(n>>>16),new s((65535&o)<<16|65535&n,u)}function qt(r,t,i,e,n){let o,u;o=(65535&r.I)+(65535&t.I)+(65535&i.I)+(65535&e.I)+(65535&n.I),u=(r.I>>>16)+(t.I>>>16)+(i.I>>>16)+(e.I>>>16)+(n.I>>>16)+(o>>>16);let f=(65535&u)<<16|65535&o;return o=(65535&r.N)+(65535&t.N)+(65535&i.N)+(65535&e.N)+(65535&n.N)+(u>>>16),u=(r.N>>>16)+(t.N>>>16)+(i.N>>>16)+(e.N>>>16)+(n.N>>>16)+(o>>>16),new s((65535&u)<<16|65535&o,f)}function P(r,t){return new s(r.N^t.N,r.I^t.I)}function Dt(r){let t=C(r,19),i=C(r,61),e=kt(r,6);return new s(t.N^i.N^e.N,t.I^i.I^e.I)}function Zt(r){let t=C(r,1),i=C(r,8),e=kt(r,7);return new s(t.N^i.N^e.N,t.I^i.I^e.I)}function Qt(r){let t=C(r,14),i=C(r,18),e=C(r,41);return new s(t.N^i.N^e.N,t.I^i.I^e.I)}var Wt=[new s(w[0],3609767458),new s(w[1],602891725),new s(w[2],3964484399),new s(w[3],2173295548),new s(w[4],4081628472),new s(w[5],3053834265),new s(w[6],2937671579),new s(w[7],3664609560),new s(w[8],2734883394),new s(w[9],1164996542),new s(w[10],1323610764),new s(w[11],3590304994),new s(w[12],4068182383),new s(w[13],991336113),new s(w[14],633803317),new s(w[15],3479774868),new s(w[16],2666613458),new s(w[17],944711139),new s(w[18],2341262773),new s(w[19],2007800933),new s(w[20],1495990901),new s(w[21],1856431235),new s(w[22],3175218132),new s(w[23],2198950837),new s(w[24],3999719339),new s(w[25],766784016),new s(w[26],2566594879),new s(w[27],3203337956),new s(w[28],1034457026),new s(w[29],2466948901),new s(w[30],3758326383),new s(w[31],168717936),new s(w[32],1188179964),new s(w[33],1546045734),new s(w[34],1522805485),new s(w[35],2643833823),new s(w[36],2343527390),new s(w[37],1014477480),new s(w[38],1206759142),new s(w[39],344077627),new s(w[40],1290863460),new s(w[41],3158454273),new s(w[42],3505952657),new s(w[43],106217008),new s(w[44],3606008344),new s(w[45],1432725776),new s(w[46],1467031594),new s(w[47],851169720),new s(w[48],3100823752),new s(w[49],1363258195),new s(w[50],3750685593),new s(w[51],3785050280),new s(w[52],3318307427),new s(w[53],3812723403),new s(w[54],2003034995),new s(w[55],3602036899),new s(w[56],1575990012),new s(w[57],1125592928),new s(w[58],2716904306),new s(w[59],442776044),new s(w[60],593698344),new s(w[61],3733110249),new s(w[62],2999351573),new s(w[63],3815920427),new s(3391569614,3928383900),new s(3515267271,566280711),new s(3940187606,3454069534),new s(4118630271,4000239992),new s(116418474,1914138554),new s(174292421,2731055270),new s(289380356,3203993006),new s(460393269,320620315),new s(685471733,587496836),new s(852142971,1086792851),new s(1017036298,365543100),new s(1126000580,2618297676),new s(1288033470,3409855158),new s(1501505948,4234509866),new s(1607167915,987167468),new s(1816402316,1246189591)];function Et(r){return r==="SHA-384"?[new s(3418070365,T[0]),new s(1654270250,T[1]),new s(2438529370,T[2]),new s(355462360,T[3]),new s(1731405415,T[4]),new s(41048885895,T[5]),new s(3675008525,T[6]),new s(1203062813,T[7])]:[new s(U[0],4089235720),new s(U[1],2227873595),new s(U[2],4271175723),new s(U[3],1595750129),new s(U[4],2917565137),new s(U[5],725511199),new s(U[6],4215389547),new s(U[7],327033209)]}function vt(r,t){let i,e,n,o,u,f,a,c,p,h,l,m,g=[];for(i=t[0],e=t[1],n=t[2],o=t[3],u=t[4],f=t[5],a=t[6],c=t[7],l=0;l<80;l+=1)l<16?(m=2*l,g[l]=new s(r[m],r[m+1])):g[l]=Gt(Dt(g[l-2]),g[l-7],Zt(g[l-15]),g[l-16]
1),p=qt(c,Qt(u),(A=f,E=a,new s((d=u).N&A.N^~d.N&E.N,d.I&A.I^~d.I&E.I)),Wt[l],g[l]),h=b(Vt(i),Xt(i,e,n)),c=a,a=f,f=u,u=b(o,p),o=n,n=e,e=i,i=b(p,h);var d,A,E;return t[0]=b(i,t[0]),t[1]=b(e,t[1]),t[2]=b(n,t[2]),t[3]=b(o,t[3]),t[4]=b(u,t[4]),t[5]=b(f,t[5]),t[6]=b(a,t[6]),t[7]=b(c,t[7]),t}var Jt=class extends F{constructor(r,t,i){if(r!=="SHA-384"&&r!=="SHA-512")throw new Error(x);super(r,t,i);let e=i||{};this.g=this.Y,this.M=!0,this.T=-1,this.C=O(this.t,this.i,this.T),this.v=vt,this.L=function(n){return n.slice()},this.B=Et,this.F=function(n,o,u,f){return(function(a,c,p,h,l){let m,g,d=31+(c+129>>>10<<5),A=c+p;for(;a.length<=d;)a.push(0);for(a[c>>>5]|=128<<24-c%32,a[d]=4294967295&A,a[d-1]=A/z|0,m=0;m<a.length;m+=32)h=vt(a.slice(m,m+32),h);return g=l==="SHA-384"?[h[0].N,h[0].I,h[1].N,h[1].I,h[2].N,h[2].I,h[3].N,h[3].I,h[4].N,h[4].I,h[5].N,h[5].I]:[h[0].N,h[0].I,h[1].N,h[1].I,h[2].N,h[2].I,h[3].N,h[3].I,h[4].N,h[4].I,h[5].N,h[5].I,h[6].N,h[6].I,h[7].N,h[7].I],g})(n,o,u,f,r)},this.U=Et(r),this.m=1024,this.R=r==="SHA-384"?384:512,this.K=!1,e.hmacKey&&this.k(k("hmacKey",e.hmacKey,this.T))}},$t=[new s(0,1),new s(0,32898),new s(2147483648,32906),new s(2147483648,2147516416),new s(0,32907),new s(0,2147483649),new s(2147483648,2147516545),new s(2147483648,32777),new s(0,138),new s(0,136),new s(0,2147516425),new s(0,2147483658),new s(0,2147516555),new s(2147483648,139),new s(2147483648,32905),new s(2147483648,32771),new s(2147483648,32770),new s(2147483648,128),new s(0,32778),new s(2147483648,2147483658),new s(2147483648,2147516545),new s(2147483648,32896),new s(0,2147483649),new s(2147483648,2147516424)],_t=[[0,36,3,41,18],[1,44,10,45,2],[62,6,43,15,61],[28,55,25,21,56],[27,20,39,8,14]];function rt(r){let t,i=[];for(t=0;t<5;t+=1)i[t]=[new s(0,0),new s(0,0),new s(0,0),new s(0,0),new s(0,0)];return i}function te(r){let t,i=[];for(t=0;t<5;t+=1)i[t]=r[t].slice();return i}function q(r,t){let i,e,n,o,u=[],f=[];if(r!==null)for(e=0;e<r.length;e+=2)t[(e>>>1)%5][(e>>>1)/5|0]=P(t[(e>>>1)%5][(e>>>1)/5|0],new s(r[e+1],r[e]));for(i=0;i<24;i+=1){for(o=rt(),e=0;e<5;e+=1)u[e]=(a=t[e][0],c=t[e][1],p=t[e][2],h=t[e][3],l=t[e][4],new s(a.N^c.N^p.N^h.N^l.N,a.I^c.I^p.I^h.I^l.I));for(e=0;e<5;e+=1)f[e]=P(u[(e+4)%5],Nt(u[(e+1)%5],1));for(e=0;e<5;e+=1)for(n=0;n<5;n+=1)t[e][n]=P(t[e][n],f[e]);for(e=0;e<5;e+=1)for(n=0;n<5;n+=1)o[n][(2*e+3*n)%5]=Nt(t[e][n],_t[e][n]);for(e=0;e<5;e+=1)for(n=0;n<5;n+=1)t[e][n]=P(o[e][n],new s(~o[(e+1)%5][n].N&o[(e+2)%5][n].N,~o[(e+1)%5][n].I&o[(e+2)%5][n].I));t[0][0]=P(t[0][0],$t[i])}var a,c,p,h,l;return t}function Kt(r){let t,i,e=0,n=[0,0],o=[4294967295&r,r/z&2097151];for(t=6;t>=0;t--)i=o[t>>2]>>>8*t&255,i===0&&e===0||(n[e+1>>2]|=i<<8*(e+1),e+=1);return e=e!==0?e:1,n[0]|=e,{value:e+1>4?n:[n[0]],binLen:8+8*e}}function nt(r){return D(Kt(r.binLen),r)}function Rt(r,t){let i,e=Kt(t);e=D(e,r);let n=t>>>2,o=(n-e.value.length%n)%n;for(i=0;i<o;i++)e.value.push(0);return e.value}var ee=class extends F{constructor(r,t,i){let e=6,n=0;super(r,t,i);let o=i||{};if(this.numRounds!==1){if(o.kmacKey||o.hmacKey)throw new Error(yt);if(this.o==="CSHAKE128"||this.o==="CSHAKE256")throw new Error("Cannot set numRounds for CSHAKE variants")}switch(this.T=1,this.C=O(this.t,this.i,this.T),this.v=q,this.L=te,this.B=rt,this.U=rt(),this.K=!1,r){case"SHA3-224":this.m=n=1152,this.R=224,this.M=!0,this.g=this.Y;break;case"SHA3-256":this.m=n=1088,this.R=256,this.M=!0,this.g=this.Y;break;case"SHA3-384":this.m=n=832,this.R=384,this.M=!0,this.g=this.Y;break;case"SHA3-512":this.m=n=576,this.R=512,this.M=!0,this.g=this.Y;break;case"SHAKE128":e=31,this.m=n=1344,this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"SHAKE256":e=31,this.m=n=1088,this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"KMAC128":e=4,this.m=n=1344,this.X(i),this.R=-1,this.K=!0,this.M=!1,this.g=this._;break;case"KMAC256":e=4,this.m=n=1088,this.X(i),this.R=-1,this.K=!0,this.M=!1,this.g=this._;break;case"CSHAKE128":this.m=n=1344,e=this.O(i),this.R=-1,this.K=!0,this.M=!1,this.g=null;break;case"CSHAKE256":this.m=n=1088,e=this.O(i),this.R=-1,this.K=!0,this.M=!1,this.g=null;break;default:throw new Error(x)}this.F=function(u,f,a,c,p){return(function(h,l,m,g,d,A,E){let I,S,v=0,H=[],j=d>>>5,Mt=l>>>5;for(I=0;I<Mt&&l>=d;I+=j)g=q(h.slice(I,I+j),g),l-=d;for(h=h.slice(I),l%=d;h.length<j;)h.push(0);for(I=l>>>3,h[I>>2]^=A<<I%4*8,h[j-1]^=2147483648,g=q(h,g);32*H.length<E&&(S=g[v%5][v/5|0],H.push(S.I),!(32*H.length>=E));)H.push(S.N),v+=1,64*v%d==0&&(q(null,g),v=0);return H})(u,f,0,c,n,e,p)},o.hmacKey&&this.k(k("hmacKey",o.hmacKey,this.T))}O(r,t){let i=(function(n){let o=n||{};return{funcName:k("funcName",o.funcName,1,{value:[],binLen:0}),customization:k("Customization",o.customization,1,{value:[],binLen:0})}})(r||{});t&&(i.funcName=t);let e=D(nt(i.funcName),nt(i.customization));if(i.customization.binLen!==0||i.funcName.binLen!==0){let n=Rt(e,this.m>>>3);for(let o=0;o<n.length;o+=this.m>>>5)this.U=this.v(n.slice(o,o+(this.m>>>5)),this.U),this.A+=this.m;return 4}return 31}X(r){let t=(function(e){let n=e||{};return{kmacKey:k("kmacKey",n.kmacKey,1),funcName:{value:[1128353099],binLen:32},customization:k("Customization",n.customization,1,{value:[],binLen:0})}})(r||{});this.O(r,t.funcName);let i=Rt(nt(t.kmacKey),this.m>>>3);for(let e=0;e<i.length;e+=this.m>>>5)this.U=this.v(i.slice(e,e+(this.m>>>5)),this.U),this.A+=this.m;this.H=!0}_(r){let t=D({value:this.h.slice(),binLen:this.u},(function(i){let e,n,o=0,u=[0,0],f=[4294967295&i,i/z&2097151];for(e=6;e>=0;e--)n=f[e>>2]>>>8*e&255,n===0&&o===0||(u[o>>2]|=n<<8*o,o+=1);return o=o!==0?o:1,u[o>>2]|=o<<8*o,{value:o+1>4?u:[u[0]],binLen:8+8*o}})(r.outputLen));return this.F(t.value,t.binLen,this.A,this.L(this.U),r.outputLen)}},Z=class{constructor(t,i,e){if(t=="SHA-1")this.P=new xt(t,i,e);else if(t=="SHA-224"||t=="SHA-256")this.P=new jt(t,i,e);else if(t=="SHA-384"||t=="SHA-512")this.P=new Jt(t,i,e);else{if(t!="SHA3-224"&&t!="SHA3-256"&&t!="SHA3-384"&&t!="SHA3-512"&&t!="SHAKE128"&&t!="SHAKE256"&&t!="CSHAKE128"&&t!="CSHAKE256"&&t!="KMAC128"&&t!="KMAC256")throw new Error(x);this.P=new ee(t,i,e)}}update(t){return this.P.update(t),this}getHash(t,i){return this.P.getHash(t,i)}setHMACKey(t,i,e){this.P.setHMACKey(t,i,e)}getHMAC(t,i){return this.P.getHMAC(t,i)}};var Q=(()=>{let t=class t{constructor(){this.http=R(at),this.window=R(Window),this.pages=R(V),this.checkOriginResultCache={}}registerAuthorizationServerEventListener(e){return this.getConfig(e).pipe(W(n=>this.window.addEventListener("message",o=>this.receiveMessage(e,o,n.debug),!1)),st(()=>L(!0)),X(n=>
1(n.status===404?this.pages.routes.error.notFound.navigate():this.pages.routes.error.root.navigate(),L(!1))))}getConfig(e){return this.http.get(J(["public","authentication","ui","configuration","oauth2","authorization-servers",e,"session-management"])).pipe(B(n=>this.toConfig(n)))}toConfig(e){return{debug:e.data.attributes.debug}}receiveMessage(e,n,o){try{if(n.data==="error"||n.data==="unchanged"||n.data==="changed")return;if(!new RegExp("^[\\x20-\\x7e]+ [0-9a-f]+\\.[0-9a-zA-Z]+$").test(n.data)){this.log("Ignoring invalid session management message: "+n.data,o),this.postErrorMessageToSource(n);return}let u=n.data.split(" ",2),f=u[0],a=u[1];this.checkOriginAllowed(e,n.origin,f,o).subscribe({next:c=>this.handleCheckOriginResponse(c,n,f,a,o),error:c=>this.handleCheckOriginError(c,n,o)})}catch(u){this.handleGeneralError(u,n,o)}}checkOriginAllowed(e,n,o,u){let f=n+" "+o,a=this.checkOriginResultCache[f];return a?(this.log("Got origin check result from cache",u),L(a)):this.http.post(J(["oauth2","authorization-servers",e,"check-origin"]),{origin:n,clientId:o},{observe:"response"}).pipe(B(c=>c.body.data.attributes.allowed),W(c=>this.checkOriginResultCache[f]=c))}handleCheckOriginError(e,n,o){return this.log("Failed to check origin validity - response: "+JSON.stringify(e),o),this.postErrorMessageToSource(n),ot}handleCheckOriginResponse(e,n,o,u,f){try{if(!e){this.log("Origin '"+n.origin+"' is not allowed for client '"+o+"'.",f),this.postErrorMessageToSource(n);return}this.log("Received message from '"+n.origin+"': "+n.data,f);let a=u.split(".")[1];if(a===void 0||a===""){this.log("No salt in session_state",f),this.postErrorMessageToSource(n);return}let c=this.getCookieValue("IAM_OP_USER_AGENT_STATE");if(c===""){this.log("No opuas cookie found.",f),n.source.postMessage("changed",n.origin);return}let p=o+" "+n.origin+" "+c+" "+a;this.log("Hashing: "+p,f);let l=this.sha256(p)+"."+a;u===l?(this.log("Session state unchanged",f),n.source.postMessage("unchanged",n.origin)):(this.log("Session state changed",f),n.source.postMessage("changed",n.origin))}catch(a){this.handleGeneralError(a,n,!1)}}handleGeneralError(e,n,o){this.log("Session Check error: "+e,o),this.postErrorMessageToSource(n)}log(e,n){n&&console.warn(e)}postErrorMessageToSource(e){e.source.postMessage("error",e.origin)}getCookieValue(e){let n=e+"=",u=decodeURIComponent(document.cookie).split("; ");for(let f of u){let a=f.trim();if(a.indexOf(n)===0)return a.substring(n.length,a.length)}return""}sha256(e){let n=new Z("SHA-256","TEXT",{encoding:"UTF8"});return n.update(e),n.getHash("HEX")}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=K({token:t,factory:t.\u0275fac});let r=t;return r})();var it=(()=>{let t=class t{constructor(){this.service=R(Q)}canActivate(e){let n=e.paramMap.get("asId");return n?this.service.registerAuthorizationServerEventListener(n):L(!1)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=K({token:t,factory:t.\u0275fac});let r=t;return r})();var ne=[{path:"",redirectTo:"client",pathMatch:"full"},{path:"client",pathMatch:"full",canActivate:[r=>R(et).canActivate(r)],component:_},{path:"authorization-servers/:asId/session/check",pathMatch:"full",canActivate:[r=>R(it).canActivate(r)],component:_}],xe=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=ut({type:t}),t.\u0275inj=ht({providers:[{provide:Window,useValue:window},lt,et,G,it,Q],imports:[ct.forChild(ne)]});let r=t;return r})();export{xe as OAuth2Module};
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.