scimgateway 5.0.11 → 5.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,7 @@ Latest news:
18
18
 
19
19
  - Major version **v5.0.0** marks a shift to native TypeScript support and prioritizes [Bun](https://bun.sh/) over Node.js. This upgrade requires some modifications to existing plugins.
20
20
  - **BREAKING**: [SCIM Stream](https://elshaug.xyz/docs/scim-stream) is the modern way of user provisioning letting clients subscribe to messages instead of traditional IGA top-down provisioning. SCIM Gateway now offers enhanced functionality with support for message subscription and automated provisioning using SCIM Stream
21
- - Authentication PassThrough letting plugin pass authentication directly to endpoint for avoid maintaining secrets at the gateway
21
+ - Authentication PassThrough letting plugin pass authentication directly to endpoint for avoid maintaining secrets at the gateway. E.g., using Entra ID application OAuth
22
22
  - Supports OAuth Client Credentials authentication
23
23
  - Major version **v4.0.0** getUsers() and getGroups() replacing some deprecated methods. No limitations on filtering/sorting. Admin user access can be linked to specific baseEntities. New MongoDB plugin
24
24
  - ipAllowList for restricting access to allowlisted IP addresses or subnets e.g. Azure IP-range
@@ -1111,6 +1111,24 @@ MIT © [Jarle Elshaug](https://www.elshaug.xyz)
1111
1111
 
1112
1112
  ## Change log
1113
1113
 
1114
+ ### v5.0.13
1115
+
1116
+ [Improved]
1117
+
1118
+ - scim-stream, using the new reorganized nats.js v3 client library
1119
+ - cosmetics, `use strict` not needed and removed because ES modules are always strict mode
1120
+
1121
+ ### v5.0.12
1122
+
1123
+ [Fixed]
1124
+
1125
+ - HelperRest doRequest() incorrect Auth PassThrough handling
1126
+
1127
+ [Improved]
1128
+
1129
+ - Dependencies bump
1130
+
1131
+
1114
1132
  ### v5.0.11
1115
1133
 
1116
1134
  [Fixed]
package/bun.lockb CHANGED
Binary file
@@ -43,31 +43,6 @@ export class HelperRest {
43
43
  if (errMsg) this.scimgateway.logError('undefined', errMsg)
44
44
  }
45
45
 
46
- /**
47
- * getClientIdentifier returns a unique client identifier having format user_secret
48
- * @param ctx having format { autorization: "<type>:xxxxx" }
49
- * @returns user_secret
50
- **/
51
- private getClientIdentifier(ctx: Record<string, any> | undefined): string {
52
- if (!ctx?.headers?.authorization) return 'undefined'
53
- const [user, secret] = this.getCtxAuth(ctx)
54
- return `${encodeURIComponent(user)}_${encodeURIComponent(secret)}` // user_password or undefined_password
55
- }
56
-
57
- /**
58
- * getCtxAuth returns [username, secret] based on Auth PassThrough autorization header included in ctx
59
- * @param ctx includes Auth PassThrough having format {headers:{autorization:"<type>:xxxxx"}}
60
- * @returns [username, secret]
61
- **/
62
- private getCtxAuth(ctx: Record<string, any> | undefined): any[] {
63
- if (!ctx?.headers?.authorization) return []
64
- const [authType, authToken] = (ctx.headers.authorization || '').split(' ') // [0] = 'Basic' or 'Bearer'
65
- let username, password
66
- if (authType === 'Basic') [username, password] = (Buffer.from(authToken, 'base64').toString() || '').split(':')
67
- if (username) return [username, password] // basic auth
68
- else return [undefined, authToken] // bearer auth
69
- }
70
-
71
46
  /**
72
47
  * getAccessToken returns oauth accesstoken object
73
48
  * @param baseEntity
@@ -76,12 +51,11 @@ export class HelperRest {
76
51
  */
77
52
  public async getAccessToken(baseEntity: string, ctx?: Record<string, any> | undefined) { // public in case token is needed for other logic e.g. sending mail
78
53
  await this.lock.acquire()
79
- const clientIdentifier = this.getClientIdentifier(ctx)
80
54
  const d = Math.floor(Date.now() / 1000) // seconds (unix time)
81
- if (this._serviceClient[baseEntity] && this._serviceClient[baseEntity][clientIdentifier] && this._serviceClient[baseEntity][clientIdentifier].accessToken
82
- && (this._serviceClient[baseEntity][clientIdentifier].accessToken.validTo >= d + 30)) { // avoid simultaneously token requests
55
+ if (this._serviceClient[baseEntity] && this._serviceClient[baseEntity].accessToken
56
+ && (this._serviceClient[baseEntity].accessToken.validTo >= d + 30)) { // avoid simultaneously token requests
83
57
  this.lock.release()
84
- return this._serviceClient[baseEntity][clientIdentifier].accessToken
58
+ return this._serviceClient[baseEntity].accessToken
85
59
  }
86
60
 
87
61
  const action = 'getAccessToken'
@@ -213,20 +187,19 @@ export class HelperRest {
213
187
  //
214
188
  // path (no url) - default approach and client will be cached based on config
215
189
  //
216
- const clientIdentifier = this.getClientIdentifier(ctx)
217
- if (this._serviceClient[baseEntity] && this._serviceClient[baseEntity][clientIdentifier]) { // serviceClient already exist - token specific
190
+ if (this._serviceClient[baseEntity]) { // serviceClient already exist - token specific
218
191
  this.scimgateway.logDebug(baseEntity, `${action}: Using existing client`)
219
- if (this._serviceClient[baseEntity][clientIdentifier].accessToken) {
192
+ if (this._serviceClient[baseEntity].accessToken) {
220
193
  // check if token refresh is needed when using oauth
221
194
  const d = Math.floor(Date.now() / 1000) // seconds (unix time)
222
- if (this._serviceClient[baseEntity][clientIdentifier].accessToken.validTo < d + 30) { // less than 30 sec before token expiration
223
- this.scimgateway.logDebug(baseEntity, `${action}: Accesstoken about to expire in ${this._serviceClient[baseEntity][clientIdentifier].accessToken.validTo - d} seconds`)
195
+ if (this._serviceClient[baseEntity].accessToken.validTo < d + 30) { // less than 30 sec before token expiration
196
+ this.scimgateway.logDebug(baseEntity, `${action}: Accesstoken about to expire in ${this._serviceClient[baseEntity].accessToken.validTo - d} seconds`)
224
197
  try {
225
198
  const accessToken = await this.getAccessToken(baseEntity, ctx)
226
- this._serviceClient[baseEntity][clientIdentifier].accessToken = accessToken
227
- this._serviceClient[baseEntity][clientIdentifier].options.headers['Authorization'] = ` Bearer ${accessToken.access_token}`
199
+ this._serviceClient[baseEntity].accessToken = accessToken
200
+ this._serviceClient[baseEntity].options.headers['Authorization'] = ` Bearer ${accessToken.access_token}`
228
201
  } catch (err) {
229
- if (this._serviceClient[baseEntity]) delete this._serviceClient[baseEntity][clientIdentifier]
202
+ delete this._serviceClient[baseEntity]
230
203
  const newErr = err
231
204
  throw newErr
232
205
  }
@@ -260,53 +233,49 @@ export class HelperRest {
260
233
  }
261
234
 
262
235
  // Supporting no auth, header based auth (e.g., config {"options":{"headers":{"APIkey":"123"}}}),
263
- // basicAuth, bearerAuth, oauth, tokenAuth and auth PassTrough using request header authorization
264
- if (ctx?.headers?.authorization) { // Auth PassThrough using ctx header
265
- param.options.headers['Authorization'] = ctx.headers.authorization
266
- } else {
267
- switch (this.config_entity[baseEntity]?.connection?.auth?.type) {
268
- case 'basic':
269
- if (!this.config_entity[baseEntity]?.connection?.auth?.options?.username || !this.config_entity[baseEntity]?.connection?.auth?.options?.password) {
270
- const err = new Error(`auth type 'basic' - missing configuration entity.${baseEntity}.connection.auth.options.username/password`)
271
- throw err
272
- }
273
- param.options.headers['Authorization'] = 'Basic ' + Buffer.from(`${this.config_entity[baseEntity].connection.auth.options.username}:${this.config_entity[baseEntity].connection.auth.options.password}`).toString('base64')
274
- break
275
- case 'oauth':
276
- if (!this.config_entity[baseEntity]?.connection?.auth?.options?.clientId || !this.config_entity[baseEntity]?.connection?.auth?.options?.clientSecret) {
277
- const err = new Error(`auth type 'oauth' - missing configuration entity.${baseEntity}.connection.auth.options.clientId/clientSecret`)
278
- throw err
279
- }
280
- param.accessToken = await this.getAccessToken(baseEntity, ctx)
281
- param.options.headers['Authorization'] = `Bearer ${param.accessToken.access_token}`
282
- break
283
- case 'token':
284
- if (!this.config_entity[baseEntity]?.connection?.auth?.options?.tokenUrl || !this.config_entity[baseEntity]?.connection?.auth?.options?.password) {
285
- const err = new Error(`missing configuration entity.${baseEntity}.connection.auth.options.tokenUrl/password`)
286
- throw err
287
- }
288
- param.accessToken = await this.getAccessToken(baseEntity, ctx)
289
- param.options.headers['Authorization'] = `Bearer ${param.accessToken.access_token}`
290
- break
291
- case 'bearer':
292
- if (!this.config_entity[baseEntity]?.connection?.auth?.options?.token) {
293
- const err = new Error(`missing configuration entity.${baseEntity}.connection.auth.options.token`)
294
- throw err
295
- }
296
- param.options.headers['Authorization'] = 'Bearer ' + Buffer.from(this.config_entity[baseEntity].connection.auth.options.token).toString('base64')
297
- break
298
- case 'oauthSamlAssertion':
299
- if (!this.config_entity[baseEntity]?.connection?.auth?.options?.clientId || !this.config_entity[baseEntity]?.connection?.auth?.options?.companyId
300
- || !this.config_entity[baseEntity]?.connection?.auth?.options?.certificate?.key) {
301
- const err = new Error(`auth type 'oauthSamlAssertion' - missing configuration entity.${baseEntity}.connection.auth.options...`)
302
- throw err
303
- }
304
- param.accessToken = await this.getAccessToken(baseEntity, ctx)
305
- param.options.headers['Authorization'] = `Bearer ${param.accessToken.access_token}`
306
- break
307
- default:
308
- // no auth
309
- }
236
+ // basicAuth, bearerAuth, oauth, tokenAuth, oauthSamlAssertion and auth PassTrough using request header authorization
237
+ switch (this.config_entity[baseEntity]?.connection?.auth?.type) {
238
+ case 'basic':
239
+ if (!this.config_entity[baseEntity]?.connection?.auth?.options?.username || !this.config_entity[baseEntity]?.connection?.auth?.options?.password) {
240
+ const err = new Error(`auth type 'basic' - missing configuration entity.${baseEntity}.connection.auth.options.username/password`)
241
+ throw err
242
+ }
243
+ param.options.headers['Authorization'] = 'Basic ' + Buffer.from(`${this.config_entity[baseEntity].connection.auth.options.username}:${this.config_entity[baseEntity].connection.auth.options.password}`).toString('base64')
244
+ break
245
+ case 'oauth':
246
+ if (!this.config_entity[baseEntity]?.connection?.auth?.options?.clientId || !this.config_entity[baseEntity]?.connection?.auth?.options?.clientSecret) {
247
+ const err = new Error(`auth type 'oauth' - missing configuration entity.${baseEntity}.connection.auth.options.clientId/clientSecret`)
248
+ throw err
249
+ }
250
+ param.accessToken = await this.getAccessToken(baseEntity, ctx)
251
+ param.options.headers['Authorization'] = `Bearer ${param.accessToken.access_token}`
252
+ break
253
+ case 'token':
254
+ if (!this.config_entity[baseEntity]?.connection?.auth?.options?.tokenUrl || !this.config_entity[baseEntity]?.connection?.auth?.options?.password) {
255
+ const err = new Error(`missing configuration entity.${baseEntity}.connection.auth.options.tokenUrl/password`)
256
+ throw err
257
+ }
258
+ param.accessToken = await this.getAccessToken(baseEntity, ctx)
259
+ param.options.headers['Authorization'] = `Bearer ${param.accessToken.access_token}`
260
+ break
261
+ case 'bearer':
262
+ if (!this.config_entity[baseEntity]?.connection?.auth?.options?.token) {
263
+ const err = new Error(`missing configuration entity.${baseEntity}.connection.auth.options.token`)
264
+ throw err
265
+ }
266
+ param.options.headers['Authorization'] = 'Bearer ' + Buffer.from(this.config_entity[baseEntity].connection.auth.options.token).toString('base64')
267
+ break
268
+ case 'oauthSamlAssertion':
269
+ if (!this.config_entity[baseEntity]?.connection?.auth?.options?.clientId || !this.config_entity[baseEntity]?.connection?.auth?.options?.companyId
270
+ || !this.config_entity[baseEntity]?.connection?.auth?.options?.certificate?.key) {
271
+ const err = new Error(`auth type 'oauthSamlAssertion' - missing configuration entity.${baseEntity}.connection.auth.options...`)
272
+ throw err
273
+ }
274
+ param.accessToken = await this.getAccessToken(baseEntity, ctx)
275
+ param.options.headers['Authorization'] = `Bearer ${param.accessToken.access_token}`
276
+ break
277
+ default:
278
+ // no auth or PassTrough
310
279
  }
311
280
 
312
281
  // proxy
@@ -342,19 +311,21 @@ export class HelperRest {
342
311
  }
343
312
 
344
313
  if (!this._serviceClient[baseEntity]) this._serviceClient[baseEntity] = {}
345
- if (!this._serviceClient[baseEntity][clientIdentifier]) this._serviceClient[baseEntity][clientIdentifier] = {}
346
- this._serviceClient[baseEntity][clientIdentifier] = param // serviceClient created
314
+ this._serviceClient[baseEntity] = param // serviceClient created
347
315
 
348
- // OData support - note, not using [clientIdentifier]
316
+ // OData support
349
317
  this._serviceClient[baseEntity].nextLink = {} // OData pagination (Entra ID)
350
318
  this._serviceClient[baseEntity].nextLink.users = null
351
319
  this._serviceClient[baseEntity].nextLink.groups = null
352
320
  }
353
321
 
354
- const cli: any = utils.copyObj(this._serviceClient[baseEntity][clientIdentifier]) // client ready
322
+ if (ctx?.headers?.get) { // Auth PassThrough using ctx header
323
+ this._serviceClient[baseEntity].options.headers['Authorization'] = ctx.headers.get('authorization')
324
+ }
325
+ const cli: any = utils.copyObj(this._serviceClient[baseEntity]) // client ready
355
326
 
356
327
  // failover support
357
- path = this._serviceClient[baseEntity][clientIdentifier].baseUrl + path
328
+ path = this._serviceClient[baseEntity].baseUrl + path
358
329
  urlObj = new URL(path)
359
330
  cli.options.host = urlObj.hostname
360
331
  cli.options.port = urlObj.port
@@ -410,11 +381,10 @@ export class HelperRest {
410
381
  /**
411
382
  * updateServiceClient merges obj with _serviceClient
412
383
  * @param baseEntity
413
- * @param clientIdentifier
414
384
  * @param obj
415
385
  */
416
- private updateServiceClient(baseEntity: string, clientIdentifier: string, obj: any) {
417
- if (this._serviceClient[baseEntity] && this._serviceClient[baseEntity][clientIdentifier]) this._serviceClient[baseEntity][clientIdentifier] = utils.extendObj(this._serviceClient[baseEntity][clientIdentifier], obj)
386
+ private updateServiceClient(baseEntity: string, obj: any) {
387
+ if (this._serviceClient[baseEntity]) this._serviceClient[baseEntity] = utils.extendObj(this._serviceClient[baseEntity], obj)
418
388
  }
419
389
 
420
390
  /**
@@ -514,14 +484,13 @@ export class HelperRest {
514
484
  } catch (err: any) { // includes failover/retry logic based on config baseUrls array
515
485
  let statusCode
516
486
  try { statusCode = JSON.parse(err.message).statusCode } catch (e) { void 0 }
517
- const clientIdentifier = this.getClientIdentifier(ctx)
518
487
  if (err.message.includes('ratelimit')) { // have seen throttling not follow standard 429/retry-after, but instead using 500 and error message only
519
488
  if (!retryAfter) retryAfter = 60
520
489
  }
521
490
  if (!retryCount) retryCount = 0
522
491
  let urlObj
523
492
  try { urlObj = new URL(path) } catch (err) { void 0 }
524
- let isServiceClient = !urlObj && this._serviceClient[baseEntity] && this._serviceClient[baseEntity][clientIdentifier] && !this.lock.isLocked() // !isLocked to avoid retry ongoing doRequest with failing getAccessToken()
493
+ let isServiceClient = !urlObj && this._serviceClient[baseEntity] && !this.lock.isLocked() // !isLocked to avoid retry ongoing doRequest with failing getAccessToken()
525
494
  let oAuthTokeErr = statusCode === 401 && this.config_entity[baseEntity].connection?.auth?.type && this.config_entity[baseEntity].connection.auth.type.startsWith('oauth')
526
495
  if (isServiceClient && (err.code === 'ECONNREFUSED' || err.code === 'ENOTFOUND' || err.code === 'ABORT_ERR' || err.code === 'ETIMEDOUT' || oAuthTokeErr || retryAfter)) {
527
496
  this.scimgateway.logDebug(baseEntity, `doRequest ${method} ${path} Body = ${JSON.stringify(body)} Error Response = ${err.message}`)
@@ -531,27 +500,27 @@ export class HelperRest {
531
500
  resolve(null)
532
501
  }, retryAfter * 1000))
533
502
  }
534
- if (oAuthTokeErr && this._serviceClient[baseEntity]) delete this._serviceClient[baseEntity][clientIdentifier] // ensure new getAccessToken request - token used should not have been expired, but rejected for other reason e.g. token server restart and no persistent token store?
535
503
  if (retryCount < this.config_entity[baseEntity].connection.baseUrls.length) {
536
504
  retryCount++
537
- this.updateServiceClient(baseEntity, clientIdentifier, { baseUrl: this.config_entity[baseEntity].connection.baseUrls[retryCount - 1] })
505
+ this.updateServiceClient(baseEntity, { baseUrl: this.config_entity[baseEntity].connection.baseUrls[retryCount - 1] })
538
506
  this.scimgateway.logDebug(baseEntity, `${(this.config_entity[baseEntity].connection.baseUrls.length > 1) ? 'failover ' : ''}retry[${retryCount}] using baseUrl = ${this._serviceClient[baseEntity].baseUrl}`)
507
+ if (oAuthTokeErr) {
508
+ delete this._serviceClient[baseEntity] // ensure new getAccessToken request - token used should not have been expired, but rejected for other reason e.g. token server restart and no persistent token store?
509
+ }
539
510
  const ret = await this.doRequestHandler(baseEntity, method, path, body, ctx, opt, retryCount) // retry
540
511
  return ret // problem fixed
541
512
  } else {
542
513
  if (statusCode === 404) { // not logged as error e.g. getUser-manager
543
514
  this.scimgateway.logDebug(baseEntity, `doRequest ${method} ${path} Body = ${JSON.stringify(body)} Error Response = ${err.message}`)
544
- } else this.scimgateway.logError(baseEntity, `doRequest ${method} ${path} Body = ${JSON.stringify(body)} 11Error Response = ${err.message}`)
515
+ } else this.scimgateway.logError(baseEntity, `doRequest ${method} ${path} Body = ${JSON.stringify(body)} Error Response = ${err.message}`)
545
516
  throw err
546
517
  }
547
518
  } else {
548
519
  if (statusCode === 404) { // not logged as error e.g. getUser-manager
549
520
  this.scimgateway.logDebug(baseEntity, `doRequest ${method} ${path} Body = ${JSON.stringify(body)} Error Response = ${err.message}`)
550
521
  } else this.scimgateway.logError(baseEntity, `doRequest ${method} ${path} Body = ${JSON.stringify(body)} Error Response = ${err.message}`)
551
- if (statusCode === 401 && this._serviceClient[baseEntity]) {
552
- delete this._serviceClient[baseEntity][clientIdentifier]
553
- }
554
- throw err // Symantec IM retries getUser 6 times on ECONNREFUSED
522
+ if (statusCode === 401) delete this._serviceClient[baseEntity]
523
+ throw err
555
524
  }
556
525
  }
557
526
  }
package/lib/plugin-api.ts CHANGED
@@ -24,8 +24,6 @@
24
24
  //
25
25
  // =================================================================================
26
26
 
27
- 'use strict'
28
-
29
27
  // for supporting nodejs running scimgateway package directly, using dynamic import instead of: import { ScimGateway } from 'scimgateway'
30
28
  // scimgateway also inclues HelperRest: import { ScimGateway, HelperRest } from 'scimgateway'
31
29
 
@@ -57,8 +57,6 @@
57
57
  // Members members members
58
58
  // =====================================================================================================================
59
59
 
60
- 'use strict'
61
-
62
60
  import querystring from 'querystring'
63
61
  // for supporting nodejs running scimgateway package directly, using dynamic import instead of: import { ScimGateway } from 'scimgateway'
64
62
  // scimgateway also inclues HelperRest: import { ScimGateway, HelperRest } from 'scimgateway'
@@ -79,8 +79,6 @@
79
79
  //
80
80
  // =================================================================================
81
81
 
82
- 'use strict'
83
-
84
82
  import ldap from 'ldapjs'
85
83
  // @ts-expect-error missing type definitions
86
84
  import { BerReader } from '@ldapjs/asn1'
@@ -24,8 +24,6 @@
24
24
  //
25
25
  // =================================================================================
26
26
 
27
- 'use strict'
28
-
29
27
  import Loki from 'lokijs'
30
28
  import path from 'node:path'
31
29
  // for supporting nodejs running scimgateway package directly, using dynamic import instead of: import { ScimGateway } from 'scimgateway'
@@ -22,8 +22,6 @@
22
22
  //
23
23
  // =================================================================================
24
24
 
25
- 'use strict'
26
-
27
25
  import { MongoClient } from 'mongodb'
28
26
  // for supporting nodejs running scimgateway package directly, using dynamic import instead of: import { ScimGateway } from 'scimgateway'
29
27
  // scimgateway also inclues HelperRest: import { ScimGateway, HelperRest } from 'scimgateway'
@@ -56,8 +56,6 @@
56
56
  //
57
57
  // =================================================================================
58
58
 
59
- 'use strict'
60
-
61
59
  import { Connection, Request } from 'tedious'
62
60
  // for supporting nodejs running scimgateway package directly, using dynamic import instead of: import { ScimGateway } from 'scimgateway'
63
61
  // scimgateway also inclues HelperRest: import { ScimGateway, HelperRest } from 'scimgateway'
@@ -17,8 +17,6 @@
17
17
  // Currently no other attributes needed for maintaining saml users
18
18
  // =================================================================================
19
19
 
20
- 'use strict'
21
-
22
20
  import hdb from 'hdb' // prereq: bun install hdb
23
21
  // for supporting nodejs running scimgateway package directly, using dynamic import instead of: import { ScimGateway } from 'scimgateway'
24
22
  // scimgateway also inclues HelperRest: import { ScimGateway, HelperRest } from 'scimgateway'
@@ -24,8 +24,6 @@
24
24
  //
25
25
  // =================================================================================
26
26
 
27
- 'use strict'
28
-
29
27
  // for supporting nodejs running scimgateway package directly, using dynamic import instead of: import { ScimGateway } from 'scimgateway'
30
28
  // scimgateway also inclues HelperRest: import { ScimGateway, HelperRest } from 'scimgateway'
31
29
 
@@ -27,8 +27,6 @@
27
27
  //
28
28
  // =================================================================================
29
29
 
30
- 'use strict'
31
-
32
30
  import soap from 'soap' // prereq: bun install soap
33
31
  import path from 'node:path'
34
32
  // for supporting nodejs running scimgateway package directly, using dynamic import instead of: import { ScimGateway } from 'scimgateway'
@@ -11,4 +11,4 @@
11
11
  // for details see: https://elshaug.xyz/docs/scim-stream
12
12
  //
13
13
  // ================================================================
14
- 'use strict';(function(_0xfaabdb,_0x4af979){const _0xb3b178=a0_0xe6f9,_0x4a84c5=_0xfaabdb();while(!![]){try{const _0x45bc59=parseInt(_0xb3b178(0x179))/0x1*(-parseInt(_0xb3b178(0xd7))/0x2)+-parseInt(_0xb3b178(0x189))/0x3+parseInt(_0xb3b178(0x1a3))/0x4*(parseInt(_0xb3b178(0x133))/0x5)+parseInt(_0xb3b178(0x1bd))/0x6*(parseInt(_0xb3b178(0x104))/0x7)+parseInt(_0xb3b178(0x19c))/0x8*(-parseInt(_0xb3b178(0x177))/0x9)+parseInt(_0xb3b178(0xd5))/0xa*(-parseInt(_0xb3b178(0x154))/0xb)+parseInt(_0xb3b178(0x17c))/0xc;if(_0x45bc59===_0x4af979)break;else _0x4a84c5['push'](_0x4a84c5['shift']());}catch(_0x87397d){_0x4a84c5['push'](_0x4a84c5['shift']());}}}(a0_0x3711,0x583e9));function a0_0x3711(){const _0x167e38=['ConsumerNotFound','Application','ConsumerEvents','length','foldReplacing','publisher\x20not\x20initialized/connected','value','deliver_policy','consumers','pluginName','onCreate','330PbBUWv','\x20Create\x20userName=','certificate',',\x20attributes=','parse','transports','config','configDir','false','allSettled','baseUrls','firstn','status','server_name','getGroups','gwName','apply','internal\x20stream\x20policy\x20have\x20been\x20changed\x20-\x20central\x20SCIM\x20Stream\x20must\x20be\x20stopped\x20and\x20corresponding\x20./jetstream\x20folder\x20deleted\x20before\x20startup\x20allowing\x20new\x20policy','attribute','\x20-\x20will\x20do\x20auto\x20reconnect\x20when\x20connection\x20becomes\x20available',']\x20client\x20is\x20attempting\x20to\x20reconnect\x20','\x20message:\x20user\x20not\x20created\x20because\x20of\x20active=false','\x20group\x20removal\x20error:\x20','from','\x20message\x20response:\x20','rejected','\x20done','Resources','All','toUpperCase','jwt','append','createGroup','nats','name','221652yHVewl','\x20-\x20','1XXWFpM','ENOTFOUND','passThrough','3332592kBhGso','operation','getMemberOf','modifyUser','prototype','approles','\x20role\x20removal\x20error:\x20','stringify','delete','headers','data','call','randomUUID','954585yjlphY','waitOnFirstConnect','forEach','/certs/','createWriteStream','path','\x20createUser()\x20obj=','fsExistsSync','getuniquevalue',',\x20id=','DeliverPolicy','startsWith','tls','utf8','uppercase','getUsers',']\x20initialization\x20error:\x20missing\x20configuration\x20nats.subject','info','copyObj','16HXgGpd','\x27\x20not\x20supported','servers','_info','charAt','DebugEvents','obj','2842124YeoZpL','push','replaceAll','handle','Operations','jetstreamManager','\x20not\x20equal\x20subscriber\x20configured\x20baseEntity=',',false',']\x20client\x20error\x20','update','modifyOnly','tenant','usePutSoftSync','subscriber\x20message\x20error:\x20message\x20baseEntity=','Reconnect','modifyGroup','Events','file-not-configured','utf-8','debug','type','connect',']\x20client\x20disconnected\x20',']\x20connected\x20','StaleConnection',']\x20error:\x20missing\x20entity\x20configuration\x20for\x20baseEntity=','6SaSiOJ','query','generateUserPassword','Msg-Id','SCIM\x20Stream',']\x20subscriber[',',true','GW.','readFileSync','\x20message:\x20user\x20not\x20created\x20because\x20of\x20configuration\x20modifyOnly=true','activityOperation','jetstream','\x20calling\x20\x22','mkdirSync','isArray','filter_subject','map','encode','deleteUserOnLastGroupRoleRemoval','\x22\x20with\x20chunks\x20and\x20awaiting\x20result','UnableConnectingHost','splice','{\x22error\x22:\x22','caller','publisher\x20response\x20error:\x20','\x20or\x20',']\x20publisher[','\x20Replace\x20User\x20id=','ack',']\x20initialization\x20error:\x20missing\x20configuration\x20nats.tenant','\x20message\x20handled:\x20','\x22,\x22errName\x22:\x22','SIGTERM','split','hasOwnProperty','\x20Delete\x20User\x20id=','181360wKQdkg','pingInterval','489434YJPhrF','putApi','level','subscriber\x20message\x20error:\x20message\x20missing\x20method',']\x20error:\x20client\x20have\x20not\x20been\x20initialized','baseEntity','\x20(count=','errName','active','\x20error:\x20','file','sub','undefined','message','\x20missing\x20mandatory\x20user.userName\x20in\x20message:\x20','subject','\x20Delete\x20User\x20userName=','lowercase','closed','\x20processing\x20incoming\x20message','postApi','secret','roles','createUser','toString','then','join','userName','\x20message:\x20user\x20does\x20not\x20exist',']\x20connect\x20error:\x20','patchApi','replaceUsrGrp','indexOf','\x20with\x20chunks\x20returned\x20errors:\x20','maxReconnectAttempts','Explicit','includes','503','jwtAuthenticator','createRandomPassword','func','getAppRoles','attributes','close','getApi','3706150SFJVzz',']\x20initialization\x20error:\x20nats.subject\x20root\x20topic\x20must\x20be\x20\x27GW\x27,\x20nats.subject\x20example:\x20GW.APP1','getServer','Reconnecting','\x20getUserId()\x20error:\x20','replace','\x20handling\x20message:\x20','\x20roles\x20converted\x20to\x20groups:\x20','increment','respond','rawFilter','drain','getUsers()\x20getObj=','Disconnect','replaceDomains','/approles','trim','publisher\x20error:\x20none\x20JSON\x20formatted\x20response:\x20','toLowerCase','maxPingOut','HR.','approles_','ctxPassThrough','SIGINT','getProcessed','all','reason','deleteUser','User','StringCodec',']\x20closed\x20with\x20error:\x20','timeout',']\x20initialization\x20error:\x20missing\x20configuration\x20stream.baseUrls','logger',']\x20initialization\x20error:\x20missing\x20certificate\x20configuration','\x22\x20and\x20awaiting\x20result','string','groups','reconnectTimeWait','publisher[','error',']\x20client\x20reconnected\x20','isClosed','AckPolicy','\x20-\x20will\x20do\x20auto\x20connect\x20when\x20available\x20-\x20however,\x20please\x20verify\x20stream\x20configuration','existsSync','typeId','5DSYPBs','endsWith',']\x20error:\x20message\x20must\x20be\x20JSON\x20formatted','filter','deleteApi','convertedScim20',',\x20obj=','\x20missing\x20user\x20object\x20in\x20message:\x20','reconnect','subscribe',']\x20initialization\x20error:\x20missing\x20configuration\x20nats','add','remove','##doIncrement',']\x20error:\x20no\x20subscribers/responders\x20to\x20subject\x20','operator','get','true','decode','Users','substring','\x20=>\x20subscriber\x20not\x20activated'];a0_0x3711=function(){return _0x167e38;};return a0_0x3711();}import a0_0x1f12d0 from'nats';import a0_0x7d5195 from'fold-to-ascii';import a0_0x804e61 from'node:fs';function a0_0xe6f9(_0x1afc6f,_0x43fb34){const _0x371179=a0_0x3711();return a0_0xe6f9=function(_0xe6f917,_0x4ac354){_0xe6f917=_0xe6f917-0xd3;let _0x546687=_0x371179[_0xe6f917];return _0x546687;},a0_0xe6f9(_0x1afc6f,_0x43fb34);}import a0_0x24d390 from'node:path';import a0_0xd1e96 from'crypto';import*as a0_0x3bafd7 from'./utils.ts';import*as a0_0x690914 from'./utils-scim.ts';export class Subscriber{constructor(_0x680bee){const _0x438835=a0_0xe6f9,_0x5cd7a3=_0x680bee,_0x870e65={};let _0x332977='';for(let _0x19afcd=0x0;_0x19afcd<_0x5cd7a3['logger']['transports'][_0x438835(0x14c)];_0x19afcd++){if(_0x5cd7a3[_0x438835(0x125)][_0x438835(0x159)][_0x19afcd][_0x438835(0x176)]===_0x438835(0xe1)){_0x332977=_0x5cd7a3[_0x438835(0x125)]['transports'][_0x19afcd][_0x438835(0xd9)];break;}}const _0x5bffdc=''+(_0x332977===_0x438835(0x1b6)?'\x0a':''),_0xbf2e38=async(_0x4b491c,_0x15c95e)=>{const _0x440c35=_0x438835,_0x16613d=_0x870e65[_0x4b491c][_0x440c35(0x15a)]?.[_0x440c35(0x175)]?.[_0x440c35(0xe6)];let _0x567ff;try{_0x567ff=await a0_0x1f12d0['connect'](_0x15c95e);if(_0x567ff['info'][_0x440c35(0x161)]!==_0x440c35(0x1c1)){_0x567ff[_0x440c35(0x102)]();return;}_0x870e65[_0x4b491c]['nc']=_0x567ff,_0x2667e9(_0x4b491c,_0x567ff),_0x5508c0(_0x4b491c,_0x567ff);}catch(_0x13e52b){_0x5cd7a3[_0x440c35(0x125)][_0x440c35(0x12c)](_0x5cd7a3[_0x440c35(0x163)]+'['+_0x5cd7a3[_0x440c35(0x152)]+']\x20subscriber['+_0x4b491c+']['+_0x16613d+_0x440c35(0xf4)+_0x13e52b['message']+_0x440c35(0x130)),_0x15c95e['waitOnFirstConnect']=!![];try{_0x567ff=await a0_0x1f12d0[_0x440c35(0x1b8)](_0x15c95e);if(_0x567ff[_0x440c35(0x19a)][_0x440c35(0x161)]!==_0x440c35(0x1c1)){_0x567ff[_0x440c35(0x102)]();return;}_0x870e65[_0x4b491c]['nc']=_0x567ff,_0x2667e9(_0x4b491c,_0x567ff),_0x5508c0(_0x4b491c,_0x567ff);}catch(_0xbc5adc){_0x5cd7a3[_0x440c35(0x125)][_0x440c35(0x12c)](_0x5cd7a3[_0x440c35(0x163)]+'['+_0x5cd7a3['pluginName']+_0x440c35(0x1c2)+_0x4b491c+']['+_0x16613d+']\x20connect\x20error:\x20'+_0xbc5adc['message']);return;}}_0x5cd7a3['logger'][_0x440c35(0x1b6)](_0x5cd7a3[_0x440c35(0x163)]+'['+_0x5cd7a3[_0x440c35(0x152)]+_0x440c35(0x1c2)+_0x4b491c+']['+_0x16613d+_0x440c35(0x1ba)+(_0x15c95e['tls']['ca']?'tls':'')+'\x20'+_0x567ff[_0x440c35(0x106)]()),_0x567ff['closed']()[_0x440c35(0xf0)](_0x5d6677=>{const _0x30733c=_0x440c35;_0x5d6677&&_0x5cd7a3[_0x30733c(0x125)][_0x30733c(0x12c)](_0x5cd7a3[_0x30733c(0x163)]+'['+_0x5cd7a3[_0x30733c(0x152)]+']\x20subscriber['+_0x4b491c+']['+_0x16613d+_0x30733c(0x122)+_0x5d6677[_0x30733c(0xe4)]);});};this[_0x438835(0x13e)]=async(_0x4a9018,_0x1d620e)=>{const _0x1e041e=_0x438835;if(!_0x1d620e?.[_0x1e041e(0x175)]){_0x5cd7a3['logger'][_0x1e041e(0x12c)](_0x5cd7a3[_0x1e041e(0x163)]+'['+_0x5cd7a3['pluginName']+']\x20subscriber['+_0x4a9018+_0x1e041e(0x13d));return;}if(!_0x1d620e?.[_0x1e041e(0x175)]?.[_0x1e041e(0x1ae)]){_0x5cd7a3['logger']['error'](_0x5cd7a3[_0x1e041e(0x163)]+'['+_0x5cd7a3[_0x1e041e(0x152)]+_0x1e041e(0x1c2)+_0x4a9018+']\x20initialization\x20error:\x20missing\x20configuration\x20nats.tenant');return;}if(!_0x1d620e?.[_0x1e041e(0x175)]?.[_0x1e041e(0xe6)]){_0x5cd7a3[_0x1e041e(0x125)][_0x1e041e(0x12c)](_0x5cd7a3['gwName']+'['+_0x5cd7a3['pluginName']+_0x1e041e(0x1c2)+_0x4a9018+_0x1e041e(0x199));return;}if(!_0x1d620e?.[_0x1e041e(0x156)]?.['ca']){_0x5cd7a3[_0x1e041e(0x125)][_0x1e041e(0x12c)](_0x5cd7a3[_0x1e041e(0x163)]+'['+_0x5cd7a3[_0x1e041e(0x152)]+_0x1e041e(0x1c2)+_0x4a9018+_0x1e041e(0x126));return;}if(!_0x1d620e[_0x1e041e(0x15e)]||!Array[_0x1e041e(0x1cb)](_0x1d620e[_0x1e041e(0x15e)])||_0x1d620e[_0x1e041e(0x15e)][_0x1e041e(0x14c)]<0x1){_0x5cd7a3[_0x1e041e(0x125)][_0x1e041e(0x12c)](_0x5cd7a3['gwName']+'['+_0x5cd7a3['pluginName']+_0x1e041e(0x1c2)+_0x4a9018+_0x1e041e(0x124));return;}if(!_0x1d620e[_0x1e041e(0x1af)]){const _0x4e513a=_0x1d620e?.[_0x1e041e(0x175)]?.[_0x1e041e(0xe6)][_0x1e041e(0x171)]();if(_0x4e513a[_0x1e041e(0x194)](_0x1e041e(0x118)))_0x1d620e[_0x1e041e(0x1af)]=!![];}const _0x362c80={};try{let _0x19ec3b=a0_0x24d390[_0x1e041e(0xf1)](_0x5cd7a3[_0x1e041e(0x15b)],_0x1e041e(0x18c),_0x1d620e?.[_0x1e041e(0x156)]?.['ca']||'file-not-configured');(_0x1d620e?.['certificate']?.['ca']?.[_0x1e041e(0x194)]('/')||_0x1d620e?.[_0x1e041e(0x156)]?.['ca']?.['includes']('\x5c'))&&(_0x19ec3b=_0x1d620e['certificate']['ca']),_0x362c80['ca']=[a0_0x804e61[_0x1e041e(0x1c5)](_0x19ec3b)],_0x362c80['rejectUnauthorized']=!![];}catch(_0x4daf5b){_0x5cd7a3[_0x1e041e(0x125)]['error'](_0x5cd7a3['gwName']+'['+_0x5cd7a3[_0x1e041e(0x152)]+_0x1e041e(0x1c2)+_0x4a9018+']\x20initialization\x20certificate\x20error:\x20'+_0x4daf5b[_0x1e041e(0xe4)]);return;}const _0x1061bd={},_0x315a37=new TextEncoder()[_0x1e041e(0x1ce)](_0x1d620e?.[_0x1e041e(0x175)]?.[_0x1e041e(0xec)]),_0x43bcc3=_0x1d620e?.['nats']?.[_0x1e041e(0x172)];_0x1061bd['authenticator']=a0_0x1f12d0[_0x1e041e(0xfd)](_0x43bcc3,_0x315a37),_0x1061bd[_0x1e041e(0x19e)]=_0x1d620e[_0x1e041e(0x15e)],_0x1061bd[_0x1e041e(0x195)]=_0x362c80,_0x1061bd[_0x1e041e(0x18a)]=![],_0x1061bd[_0x1e041e(0x13b)]=!![],_0x1061bd[_0x1e041e(0x12a)]=0x3e8*0xa,_0x1061bd[_0x1e041e(0xf9)]=-0x1,_0x1061bd[_0x1e041e(0xd6)]=0x2*0x3c*0x3e8,_0x1061bd[_0x1e041e(0x117)]=0x5,_0x1061bd[_0x1e041e(0x1b6)]=![],_0x870e65[_0x4a9018]={},_0x870e65[_0x4a9018][_0x1e041e(0x15a)]=_0x1d620e,_0x870e65[_0x4a9018]['nc']=undefined,_0x870e65[_0x4a9018][_0x1e041e(0xe2)]=undefined,_0xbf2e38(_0x4a9018,_0x1061bd);};const _0x5508c0=async(_0x46ea9e,_0x1c6193)=>{const _0x281443=_0x438835,_0x30ffff=_0x870e65[_0x46ea9e][_0x281443(0x15a)],_0x1d6ade=_0x30ffff?.[_0x281443(0x175)]?.[_0x281443(0xe6)];if(!_0x1c6193){_0x5cd7a3[_0x281443(0x125)][_0x281443(0x12c)](_0x5cd7a3[_0x281443(0x163)]+'['+_0x5cd7a3[_0x281443(0x152)]+_0x281443(0x1c2)+_0x46ea9e+']['+_0x1d6ade+_0x281443(0xdb));return;}const _0x2ea960=async(_0x5a81c0,_0x133c8e)=>{const _0x7ae8bc=_0x281443;try{_0x5cd7a3['logger'][_0x7ae8bc(0x19a)](_0x5a81c0+_0x7ae8bc(0x10a)+_0x133c8e);let _0x494456;try{if(_0x30ffff[_0x7ae8bc(0x112)]&&Array['isArray'](_0x30ffff['replaceDomains']))for(let _0x23a177=0x0;_0x23a177<_0x30ffff[_0x7ae8bc(0x112)][_0x7ae8bc(0x14c)];_0x23a177++){const _0x1ae729=_0x30ffff[_0x7ae8bc(0x112)][_0x23a177];if(!_0x1ae729[_0x7ae8bc(0x16b)]||!_0x1ae729['from'][_0x7ae8bc(0xfb)]('.')||!_0x1ae729['to']||!_0x1ae729['to']['includes']('.'))continue;const _0x2c1c44=new RegExp('@'+_0x1ae729[_0x7ae8bc(0x16b)]+'\x22','gi');_0x133c8e=_0x133c8e[_0x7ae8bc(0x109)](_0x2c1c44,'@'+_0x1ae729['to']+'\x22');}_0x494456=JSON[_0x7ae8bc(0x158)](_0x133c8e);}catch(_0x31790e){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x12c)](_0x5a81c0+'\x20message\x20json\x20parsing\x20error:\x20'+_0x31790e[_0x7ae8bc(0xe4)]+'\x20message:\x20'+_0x133c8e),_0x5cd7a3['logger'][_0x7ae8bc(0x1b6)](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);return;}const _0x1608db=_0x494456['user'];if(!_0x1608db){_0x5cd7a3['logger'][_0x7ae8bc(0x12c)](_0x5a81c0+_0x7ae8bc(0x13a)+JSON['stringify'](_0x494456)),_0x5cd7a3[_0x7ae8bc(0x125)]['debug'](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);return;}if(!_0x1608db[_0x7ae8bc(0xf2)]){_0x5cd7a3['logger']['error'](_0x5a81c0+_0x7ae8bc(0xe5)+JSON[_0x7ae8bc(0x183)](_0x494456)),_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x1b6)](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);return;}delete _0x1608db['schemas'];let _0x5975f8;_0x1608db['id']&&(_0x5975f8=_0x1608db['id'],delete _0x1608db['id']);let _0x17139f;_0x1608db[_0x7ae8bc(0x153)]&&(_0x17139f=a0_0x3bafd7[_0x7ae8bc(0x19b)](_0x1608db[_0x7ae8bc(0x153)]),delete _0x1608db[_0x7ae8bc(0x153)]);await _0x2c406b(_0x46ea9e,_0x1608db);const _0x50d822=_0x1608db[_0x7ae8bc(0xf2)];let _0x34ff08,_0x12d0a2;try{_0x34ff08=await _0x13ec27(_0x46ea9e,'userName',_0x50d822);}catch(_0x9a94c5){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x12c)](_0x5a81c0+_0x7ae8bc(0x108)+_0x9a94c5[_0x7ae8bc(0xe4)]),_0x5cd7a3[_0x7ae8bc(0x125)]['debug'](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);const _0x4005f7=[_0x7ae8bc(0x1d1),'UnableConnectingService','ECONNREFUSED',_0x7ae8bc(0x17a),'ETIMEDOUT',_0x7ae8bc(0x123)];for(const _0x49857 in _0x4005f7){if(_0x9a94c5[_0x7ae8bc(0xe4)][_0x7ae8bc(0xfb)](_0x49857))return!![];}return;}if(!_0x30ffff['skipConvertRolesToGroups']){let _0x7d2977=![];if(_0x494456[_0x7ae8bc(0x1a7)]&&Array[_0x7ae8bc(0x1cb)](_0x494456[_0x7ae8bc(0x1a7)]))for(let _0x456983=0x0;_0x456983<_0x494456[_0x7ae8bc(0x1a7)][_0x7ae8bc(0x14c)];_0x456983++){const _0x35aa23=_0x494456['Operations'][_0x456983];_0x35aa23[_0x7ae8bc(0x18e)][_0x7ae8bc(0x194)](_0x7ae8bc(0xed))&&(_0x35aa23['path']=_0x7ae8bc(0x129),Array[_0x7ae8bc(0x1cb)](_0x35aa23['value'])?(_0x35aa23[_0x7ae8bc(0x14f)][0x0]['id']=_0x35aa23['value'][0x0]['value'],_0x35aa23['value'][0x0]['display']=_0x35aa23['value'][0x0][_0x7ae8bc(0x1b7)]+_0x7ae8bc(0x178)+_0x35aa23[_0x7ae8bc(0x14f)][0x0][_0x7ae8bc(0x14f)],delete _0x35aa23[_0x7ae8bc(0x14f)][0x0][_0x7ae8bc(0x14f)],delete _0x35aa23[_0x7ae8bc(0x14f)][0x0]['type']):_0x35aa23[_0x7ae8bc(0x14f)]=[{'id':_0x35aa23[_0x7ae8bc(0x14f)],'display':_0x35aa23[_0x7ae8bc(0x14f)]}],delete _0x35aa23[_0x7ae8bc(0x132)],_0x7d2977=!![]);}if(_0x1608db[_0x7ae8bc(0xed)]&&Array[_0x7ae8bc(0x1cb)](_0x1608db[_0x7ae8bc(0xed)])&&_0x1608db[_0x7ae8bc(0xed)]['length']>0x0){if(!_0x1608db['groups'])_0x1608db[_0x7ae8bc(0x129)]=[];if(!Array['isArray'](_0x1608db['groups']))_0x1608db['groups']=[];for(let _0x5b8ae8=0x0;_0x5b8ae8<_0x1608db[_0x7ae8bc(0xed)][_0x7ae8bc(0x14c)];_0x5b8ae8++){const _0x447283={},_0x2916bd=_0x1608db['roles'][_0x5b8ae8];_0x447283[_0x7ae8bc(0x14f)]=_0x2916bd[_0x7ae8bc(0x14f)],_0x447283['display']=_0x2916bd['type']+_0x7ae8bc(0x178)+_0x2916bd['display'],_0x1608db['groups'][_0x7ae8bc(0x1a4)](_0x447283);}delete _0x1608db[_0x7ae8bc(0xed)],_0x7d2977=!![];}if(_0x7d2977)_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x1b6)](_0x5a81c0+_0x7ae8bc(0x10b)+JSON['stringify'](_0x494456));}if(!_0x34ff08){if(_0x494456['activityOperation']===_0x7ae8bc(0x11f)){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x1b6)](_0x5a81c0+_0x7ae8bc(0xe7)+_0x50d822+_0x7ae8bc(0xf3)),_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x1b6)](_0x5a81c0+'\x20done'+_0x5bffdc);return;}if(_0x30ffff[_0x7ae8bc(0x1ad)]&&_0x30ffff[_0x7ae8bc(0x1ad)]===!![]){_0x5cd7a3['logger']['debug'](_0x5a81c0+_0x7ae8bc(0x155)+_0x50d822+_0x7ae8bc(0x1c6)),_0x5cd7a3['logger']['debug'](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);return;}if(Object[_0x7ae8bc(0x180)][_0x7ae8bc(0xd3)][_0x7ae8bc(0x187)](_0x1608db,_0x7ae8bc(0xdf))){if(typeof _0x1608db[_0x7ae8bc(0xdf)]===_0x7ae8bc(0x128)){const _0x23f48a=_0x1608db['active'][_0x7ae8bc(0x116)]();if(_0x23f48a===_0x7ae8bc(0x144))_0x1608db[_0x7ae8bc(0xdf)]=!![];else{if(_0x23f48a===_0x7ae8bc(0x15c))_0x1608db[_0x7ae8bc(0xdf)]=![];}}if(_0x1608db[_0x7ae8bc(0xdf)]===![]){_0x5cd7a3['logger'][_0x7ae8bc(0x1b6)](_0x5a81c0+_0x7ae8bc(0x155)+_0x50d822+_0x7ae8bc(0x169)),_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x1b6)](_0x5a81c0+'\x20done'+_0x5bffdc);return;}}_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x1b6)](_0x5a81c0+'\x20Create\x20User\x20userName='+_0x50d822);const _0x40d2a3=a0_0x3bafd7['copyObj'](_0x1608db);try{delete _0x40d2a3['groups'];!_0x40d2a3['password']&&_0x30ffff[_0x7ae8bc(0x1bf)]&&_0x30ffff['generateUserPassword']===!![]&&(_0x40d2a3['password']=a0_0x3bafd7[_0x7ae8bc(0xfe)](0xf));if(_0x17139f||_0x5975f8){if(_0x17139f)for(const _0x3baf5d in _0x17139f){_0x40d2a3[_0x3baf5d]=_0x17139f[_0x3baf5d];}if(_0x5975f8)_0x40d2a3['id']=_0x5975f8;await _0x2c406b(_0x46ea9e,_0x40d2a3);}await _0x5cd7a3[_0x7ae8bc(0xee)](_0x46ea9e,_0x40d2a3),_0x1608db[_0x7ae8bc(0x129)]&&Array[_0x7ae8bc(0x1cb)](_0x1608db[_0x7ae8bc(0x129)])&&_0x1608db[_0x7ae8bc(0x129)][_0x7ae8bc(0x14c)]>0x0&&(_0x12d0a2=await _0x13ec27(_0x46ea9e,_0x7ae8bc(0xf2),_0x50d822));}catch(_0x4fda0f){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x12c)](_0x5a81c0+_0x7ae8bc(0x18f)+JSON[_0x7ae8bc(0x183)](_0x40d2a3)+_0x7ae8bc(0xe0)+_0x4fda0f[_0x7ae8bc(0xe4)]+'}'),_0x5cd7a3[_0x7ae8bc(0x125)]['debug'](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);return;}}if(_0x34ff08||_0x12d0a2){if(_0x494456[_0x7ae8bc(0x1c7)]===_0x7ae8bc(0x11f)){if(_0x30ffff['modifyOnly']&&_0x30ffff[_0x7ae8bc(0x1ad)]===!![]){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x1b6)](_0x5a81c0+'\x20Delete\x20User\x20id='+_0x34ff08+'\x20message:\x20user\x20not\x20deleted\x20because\x20of\x20configuration\x20modifyOnly=true'),_0x5cd7a3[_0x7ae8bc(0x125)]['debug'](_0x5a81c0+'\x20done'+_0x5bffdc);return;}_0x5cd7a3[_0x7ae8bc(0x125)]['debug'](_0x5a81c0+'\x20Delete\x20User\x20id='+_0x34ff08);try{await _0x5cd7a3['deleteUser'](_0x46ea9e,_0x34ff08);}catch(_0x9de8c5){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x12c)](_0x5a81c0+_0x7ae8bc(0xd4)+_0x34ff08+_0x7ae8bc(0xe0)+_0x9de8c5[_0x7ae8bc(0xe4)]+'}'),_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x1b6)](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);return;}}else{if(_0x12d0a2)_0x34ff08=_0x12d0a2;_0x5cd7a3[_0x7ae8bc(0x125)]['debug'](_0x5a81c0+'\x20Replace\x20User\x20id='+_0x34ff08);try{await _0x5cd7a3['replaceUsrGrp'](_0x7ae8bc(0x146),_0x46ea9e,_0x34ff08,_0x1608db,_0x30ffff[_0x7ae8bc(0x1af)]);}catch(_0x399c3d){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x12c)](_0x5a81c0+_0x7ae8bc(0x1d8)+_0x34ff08+_0x7ae8bc(0xe0)+_0x399c3d[_0x7ae8bc(0xe4)]),_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x1b6)](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);return;}if(_0x30ffff[_0x7ae8bc(0x1af)]){const [_0x5e9643,_0x5ec60a]=a0_0x690914[_0x7ae8bc(0x138)]({'Operations':_0x494456['Operations']});if(_0x5ec60a){_0x5cd7a3['logger']['error'](_0x5a81c0+_0x7ae8bc(0x1d8)+_0x34ff08+'\x20convertedScim20\x20error:\x20'+_0x5ec60a[_0x7ae8bc(0xe4)]),_0x5cd7a3['logger'][_0x7ae8bc(0x1b6)](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);return;}const _0x7525c8=[];if(_0x5e9643[_0x7ae8bc(0xed)]&&Array[_0x7ae8bc(0x1cb)](_0x5e9643[_0x7ae8bc(0xed)]))for(let _0x51cf05=0x0;_0x51cf05<_0x5e9643[_0x7ae8bc(0xed)][_0x7ae8bc(0x14c)];_0x51cf05++){_0x5e9643[_0x7ae8bc(0xed)][_0x51cf05][_0x7ae8bc(0x17d)]&&_0x5e9643[_0x7ae8bc(0xed)][_0x51cf05][_0x7ae8bc(0x17d)]===_0x7ae8bc(0x184)&&_0x7525c8['push'](_0x5e9643[_0x7ae8bc(0xed)][_0x51cf05]);}if(_0x7525c8[_0x7ae8bc(0x14c)]>0x0)try{await _0x5cd7a3[_0x7ae8bc(0x17f)](_0x46ea9e,_0x34ff08,{'roles':_0x7525c8});}catch(_0x4133d8){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x12c)](_0x5a81c0+_0x7ae8bc(0x1d8)+_0x34ff08+_0x7ae8bc(0x182)+_0x4133d8[_0x7ae8bc(0xe4)]);}const _0x37a828=[];if(_0x5e9643[_0x7ae8bc(0x129)]&&Array['isArray'](_0x5e9643[_0x7ae8bc(0x129)]))for(let _0x5ad472=0x0;_0x5ad472<_0x5e9643[_0x7ae8bc(0x129)]['length'];_0x5ad472++){_0x5e9643['groups'][_0x5ad472][_0x7ae8bc(0x17d)]&&_0x5e9643[_0x7ae8bc(0x129)][_0x5ad472][_0x7ae8bc(0x17d)]==='delete'&&_0x37a828[_0x7ae8bc(0x1a4)](_0x5e9643[_0x7ae8bc(0x129)][_0x5ad472]);}if(_0x37a828[_0x7ae8bc(0x14c)]>0x0)for(let _0x28c50e=0x0;_0x28c50e<_0x37a828[_0x7ae8bc(0x14c)];_0x28c50e++){try{await _0x5cd7a3['modifyGroup'](_0x46ea9e,_0x37a828[_0x28c50e]['id'],{'members':[{'operation':_0x7ae8bc(0x184),'value':_0x34ff08}]});}catch(_0x51516a){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x12c)](_0x5a81c0+'\x20Replace\x20User\x20id='+_0x34ff08+_0x7ae8bc(0x16a)+_0x51516a[_0x7ae8bc(0xe4)]);}}}if(_0x30ffff[_0x7ae8bc(0x1cf)]&&_0x494456[_0x7ae8bc(0x1c7)]===_0x7ae8bc(0x17f)){if(_0x1608db[_0x7ae8bc(0x129)]&&Array['isArray'](_0x1608db[_0x7ae8bc(0x129)])&&_0x1608db[_0x7ae8bc(0x129)][_0x7ae8bc(0x14c)]===0x0){if(_0x1608db[_0x7ae8bc(0xed)]&&Array[_0x7ae8bc(0x1cb)](_0x1608db[_0x7ae8bc(0xed)])&&_0x1608db[_0x7ae8bc(0xed)][_0x7ae8bc(0x14c)]===0x0){if(_0x494456[_0x7ae8bc(0x1a7)]&&Array[_0x7ae8bc(0x1cb)](_0x494456[_0x7ae8bc(0x1a7)])&&_0x494456[_0x7ae8bc(0x1a7)][_0x7ae8bc(0x14c)]>0x0){let _0x14a593=![];for(let _0x5d58ae=0x0;_0x5d58ae<_0x494456[_0x7ae8bc(0x1a7)][_0x7ae8bc(0x14c)];_0x5d58ae++){const _0x459b9e=_0x494456['Operations'][_0x5d58ae];if(_0x459b9e['op']===_0x7ae8bc(0x13f)){if(_0x459b9e[_0x7ae8bc(0x18e)]){if(_0x459b9e['path'][_0x7ae8bc(0x194)](_0x7ae8bc(0xed))&&_0x459b9e[_0x7ae8bc(0x132)]){_0x14a593=!![];break;}else{if(_0x459b9e[_0x7ae8bc(0x18e)]===_0x7ae8bc(0x129)){_0x14a593=!![];break;}}}}}if(_0x14a593){_0x5cd7a3[_0x7ae8bc(0x125)]['debug'](_0x5a81c0+_0x7ae8bc(0xd4)+_0x34ff08);try{await _0x5cd7a3[_0x7ae8bc(0x11f)](_0x46ea9e,_0x34ff08);}catch(_0x24793b){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x12c)](_0x5a81c0+_0x7ae8bc(0xd4)+_0x34ff08+_0x7ae8bc(0xe0)+_0x24793b[_0x7ae8bc(0xe4)]+'}'),_0x5cd7a3['logger'][_0x7ae8bc(0x1b6)](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);return;}}}}}}}}_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x1b6)](_0x5a81c0+_0x7ae8bc(0x16e)+_0x5bffdc);}catch(_0x32755f){_0x5cd7a3[_0x7ae8bc(0x125)][_0x7ae8bc(0x12c)](_0x5cd7a3[_0x7ae8bc(0x163)]+'['+_0x5cd7a3[_0x7ae8bc(0x152)]+_0x7ae8bc(0x1c2)+_0x46ea9e+']['+_0x1d6ade+']\x20error:\x20'+_0x32755f['message']+_0x7ae8bc(0x148)+_0x5bffdc);}},_0xe435c5=a0_0x1f12d0[_0x281443(0x121)](),_0x20c053=_0x1c6193[_0x281443(0x1c8)](),_0x68a56=('durable_'+_0x5cd7a3[_0x281443(0x152)]+'_'+_0x46ea9e)['replaceAll']('*','#')[_0x281443(0x1a5)]('>','##')[_0x281443(0x1a5)]('.','_'),_0x42ba30=_0x1d6ade[_0x281443(0x1de)]('.')[0x0]['toUpperCase']()==='GW',_0x1978fd=async()=>{const _0x442152=_0x281443;try{let _0x2a11a5;const _0x4779d8=''+_0x30ffff?.['nats']?.[_0x442152(0x1ae)],_0x237419=await _0x1c6193[_0x442152(0x1a8)](),_0x579503=async()=>{const _0x256cdf=_0x442152;let _0x31390a;try{_0x31390a=await _0x20c053[_0x256cdf(0x151)]['get'](_0x4779d8,_0x68a56);}catch(_0x55dd78){const _0x2d2f4e={'durable_name':_0x68a56,'deliver_policy':a0_0x1f12d0[_0x256cdf(0x193)][_0x256cdf(0x170)],'ack_policy':a0_0x1f12d0[_0x256cdf(0x12f)][_0x256cdf(0xfa)],'filter_subject':_0x1d6ade};await _0x237419[_0x256cdf(0x151)]['add'](_0x4779d8,_0x2d2f4e),_0x31390a=await _0x20c053['consumers'][_0x256cdf(0x143)](_0x4779d8,_0x68a56);}if(_0x31390a?.['_info']?.[_0x256cdf(0x15a)]?.[_0x256cdf(0x150)]!==_0x256cdf(0x11d))throw new Error(_0x256cdf(0x165));_0x31390a?.[_0x256cdf(0x19f)]?.['config']?.[_0x256cdf(0x1cc)]!==_0x1d6ade&&(await _0x237419[_0x256cdf(0x151)][_0x256cdf(0x1ac)](_0x4779d8,_0x68a56,{'filter_subject':_0x1d6ade}),_0x31390a=await _0x20c053[_0x256cdf(0x151)][_0x256cdf(0x143)](_0x4779d8,_0x68a56)),_0x2a11a5=await _0x31390a['consume']({'max_messages':0x64}),_0x24e427(_0x2a11a5);},_0x24e427=async _0x3d6bd6=>{const _0x525616=_0x442152;for await(const _0x3f3abd of await _0x3d6bd6[_0x525616(0x160)]()){switch(_0x3f3abd[_0x525616(0x1b7)]){case a0_0x1f12d0[_0x525616(0x14b)][_0x525616(0x149)]:_0x5cd7a3[_0x525616(0x125)][_0x525616(0x19a)](_0x5cd7a3[_0x525616(0x163)]+'['+_0x5cd7a3[_0x525616(0x152)]+_0x525616(0x1c2)+_0x46ea9e+']['+_0x1d6ade+']\x20client\x20consumer\x20reinitiated\x20because\x20of\x20'+_0x3f3abd['type']),_0x579503();return;}}};await _0x579503();let _0x2428b0=-0x1;do{for await(const _0x1077d8 of _0x2a11a5){if(!_0x1077d8['headers']||!_0x1077d8[_0x442152(0x185)][_0x442152(0x143)](_0x442152(0x1c0))){_0x1077d8[_0x442152(0x1d9)]();continue;}_0x2428b0=_0x2a11a5[_0x442152(0x11c)]();const _0x393e04=_0x5cd7a3[_0x442152(0x163)]+'['+_0x5cd7a3[_0x442152(0x152)]+']\x20subscriber['+_0x46ea9e+']['+_0x1077d8[_0x442152(0xe6)]+']['+_0x2428b0+']['+(_0x1077d8['headers']?_0x1077d8[_0x442152(0x185)][_0x442152(0x143)](_0x442152(0x1c0)):'')+']',_0x8f4677=_0xe435c5[_0x442152(0x145)](_0x1077d8[_0x442152(0x186)]),_0xb709d1=await _0x2ea960(_0x393e04,_0x8f4677);if(!_0xb709d1||_0xb709d1!==!![])_0x1077d8[_0x442152(0x1d9)]();else _0x5cd7a3[_0x442152(0x125)][_0x442152(0x12c)](_0x393e04+'\x20subscriber\x20error:\x20scimgateway\x20endpoint\x20connect\x20problem\x20-\x20will\x20do\x20auto\x20retry\x20until\x20connected');if(_0x2428b0<0x1)break;}}while(_0x2428b0===0x0);}catch(_0x22cac3){_0x5cd7a3[_0x442152(0x125)][_0x442152(0x12c)](_0x5cd7a3[_0x442152(0x163)]+'['+_0x5cd7a3[_0x442152(0x152)]+_0x442152(0x1c2)+_0x46ea9e+']['+_0x1d6ade+']\x20subscriber\x20stopped\x20error:\x20'+_0x22cac3[_0x442152(0xe4)]);}},_0x8966a2=async()=>{const _0x5f692=_0x281443,_0x1bc183=_0x1c6193[_0x5f692(0x13c)](_0x1d6ade,{'max':0x64});for await(const _0x56df08 of _0x1bc183){if(!_0x56df08[_0x5f692(0x185)]||!_0x56df08[_0x5f692(0x185)]['get'](_0x5f692(0x1c0)))continue;let _0x45967d,_0x263daa;try{try{_0x45967d=JSON[_0x5f692(0x158)](_0x56df08['string']());}catch(_0x996ff6){const _0x48c8a5='subscriber\x20message\x20error:\x20message\x20not\x20JSON\x20formatted';_0x5cd7a3[_0x5f692(0x125)][_0x5f692(0x12c)](_0x5cd7a3[_0x5f692(0x163)]+'['+_0x5cd7a3['pluginName']+_0x5f692(0x1c2)+_0x46ea9e+']['+_0x1d6ade+']\x20'+_0x48c8a5+':\x20'+_0x56df08[_0x5f692(0x128)]());throw new Error(_0x48c8a5);}if(!_0x45967d||!_0x45967d[_0x5f692(0xff)]){const _0x428e35=_0x5f692(0xda);this[_0x5f692(0x1d4)][_0x5f692(0x125)][_0x5f692(0x12c)](this['caller']['gwName']+'['+this[_0x5f692(0x1d4)][_0x5f692(0x152)]+']\x20subscriber['+_0x46ea9e+']['+_0x1d6ade+']\x20'+_0x428e35+':\x20'+_0x45967d);throw new Error(_0x428e35);}!Object[_0x5f692(0x180)]['hasOwnProperty'][_0x5f692(0x187)](_0x45967d,'baseEntity')&&(_0x45967d[_0x5f692(0xdc)]=_0x5f692(0xe3));if(_0x45967d['baseEntity']!==_0x46ea9e){const _0x4fb864=_0x5f692(0x1b0)+_0x45967d[_0x5f692(0xdc)]+_0x5f692(0x1a9)+_0x46ea9e;_0x5cd7a3['logger'][_0x5f692(0x12c)](_0x5cd7a3[_0x5f692(0x163)]+'['+_0x5cd7a3[_0x5f692(0x152)]+']\x20subscriber['+_0x46ea9e+']['+_0x1d6ade+']\x20'+_0x4fb864);throw new Error(_0x4fb864);}_0x263daa=_0x5cd7a3[_0x5f692(0x163)]+'['+_0x5cd7a3[_0x5f692(0x152)]+_0x5f692(0x1c2)+_0x46ea9e+']['+_0x56df08[_0x5f692(0xe6)]+']['+(_0x56df08[_0x5f692(0x185)]?_0x56df08[_0x5f692(0x185)][_0x5f692(0x143)](_0x5f692(0x1c0)):'')+']',_0x5cd7a3[_0x5f692(0x125)][_0x5f692(0x1b6)](_0x263daa+_0x5f692(0xea));const _0x4431c2={};let _0x1d8065,_0x486472;switch(_0x45967d[_0x5f692(0xff)]){case'getUsers':if(!_0x45967d[_0x5f692(0x1a2)][_0x5f692(0x142)]&&_0x45967d[_0x5f692(0x1a2)][_0x5f692(0x10e)]&&_0x45967d[_0x5f692(0x1a2)][_0x5f692(0x10e)][_0x5f692(0xfb)](_0x5f692(0x1d6))){const _0x3a7741=_0x45967d[_0x5f692(0x1a2)][_0x5f692(0x10e)][_0x5f692(0x1de)](_0x5f692(0x1d6));let _0x5adcc6=[];for(let _0x309aed=0x0;_0x309aed<_0x3a7741['length'];_0x309aed++){_0x3a7741[_0x309aed]=_0x3a7741[_0x309aed][_0x5f692(0x109)](/\(/g,'')[_0x5f692(0x109)](/\)/g,'')[_0x5f692(0x114)]();const _0x2f8ae6=_0x3a7741[_0x309aed]['split']('\x20');if(_0x2f8ae6['length']===0x3||_0x2f8ae6[_0x5f692(0x14c)]>0x2&&_0x2f8ae6[0x2][_0x5f692(0x194)]('\x22')&&_0x2f8ae6[_0x2f8ae6['length']-0x1][_0x5f692(0x134)]('\x22')){const _0x3c7cf1={};_0x3c7cf1[_0x5f692(0x166)]=_0x2f8ae6[0x0],_0x3c7cf1[_0x5f692(0x142)]=_0x2f8ae6[0x1][_0x5f692(0x116)](),_0x3c7cf1[_0x5f692(0x14f)]=decodeURIComponent(_0x2f8ae6['slice'](0x2)[_0x5f692(0xf1)]('\x20')[_0x5f692(0x109)](/"/g,'')),_0x5adcc6[_0x5f692(0x1a4)](_0x3c7cf1);}else{_0x5adcc6=[];break;}}if(_0x5adcc6[_0x5f692(0x14c)]>0x0){const _0x2e0405=async _0x59ca19=>{const _0x3d51ab=_0x5f692;return await _0x5cd7a3[_0x45967d[_0x3d51ab(0xff)]](_0x46ea9e,_0x59ca19,_0x45967d[_0x3d51ab(0x101)],_0x45967d[_0x3d51ab(0x17b)]);},_0x49f95e=0x5,_0xbf33e7=[];_0x5cd7a3['logger'][_0x5f692(0x1b6)](_0x263daa+'\x20calling\x20\x22'+_0x45967d[_0x5f692(0xff)]+_0x5f692(0x1d0));do{const _0x26deee=_0x5adcc6[_0x5f692(0x1d2)](0x0,_0x49f95e),_0x248983=await Promise[_0x5f692(0x15d)](_0x26deee[_0x5f692(0x1cd)](_0x129877=>_0x2e0405(_0x129877))),_0x3833e8=_0x248983[_0x5f692(0x136)](_0xe1ab4e=>_0xe1ab4e[_0x5f692(0x160)]===_0x5f692(0x16d))[_0x5f692(0x1cd)](_0x1e1be7=>_0x1e1be7[_0x5f692(0x11e)][_0x5f692(0xe4)]);if(_0x3833e8[_0x5f692(0x14c)]>0x0){const _0x37e60c=_0x45967d[_0x5f692(0xff)]+_0x5f692(0xf8)+_0x3833e8[_0x5f692(0xf1)](',\x20');throw new Error(_0x37e60c);}const _0x4ebbe7=_0x248983[_0x5f692(0x1cd)](_0x5b3828=>_0x5b3828?.[_0x5f692(0x14f)]?.[_0x5f692(0x16f)]);for(let _0x1f0483=0x0;_0x1f0483<_0x4ebbe7['length'];_0x1f0483++){Array[_0x5f692(0x180)][_0x5f692(0x1a4)][_0x5f692(0x164)](_0xbf33e7,_0x4ebbe7[_0x1f0483]);}}while(_0x5adcc6[_0x5f692(0x14c)]>0x0);_0x1d8065={'Resources':_0xbf33e7};}}!_0x1d8065&&(_0x5cd7a3[_0x5f692(0x125)][_0x5f692(0x1b6)](_0x263daa+_0x5f692(0x1c9)+_0x45967d[_0x5f692(0xff)]+'\x22\x20and\x20awaiting\x20result'),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d[_0x5f692(0x1a2)],_0x45967d[_0x5f692(0x101)],_0x45967d[_0x5f692(0x11a)]));if(Array[_0x5f692(0x1cb)](_0x1d8065?.[_0x5f692(0x16f)])){if(_0x45967d?.[_0x5f692(0x101)]?.[_0x5f692(0x14c)]===0x0||_0x45967d?.[_0x5f692(0x101)]?.['includes']('groups'))for(let _0x4ff87c=0x0;_0x4ff87c<_0x1d8065[_0x5f692(0x16f)]['length'];_0x4ff87c++){const _0x378e98=_0x1d8065[_0x5f692(0x16f)][_0x4ff87c];if(!_0x378e98['id'])break;if(_0x378e98[_0x5f692(0x129)])break;_0x378e98[_0x5f692(0x129)]=await _0x5cd7a3[_0x5f692(0x17e)](_0x46ea9e,_0x378e98['id'],'getGroups',_0x45967d['ctxPassThrough']);}}break;case _0x5f692(0x162):_0x5cd7a3['logger'][_0x5f692(0x1b6)](_0x263daa+_0x5f692(0x1c9)+_0x45967d[_0x5f692(0xff)]+'\x22\x20and\x20awaiting\x20result'),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d[_0x5f692(0x1a2)],_0x45967d['attributes'],_0x45967d[_0x5f692(0x11a)]);break;case'createUser':_0x5cd7a3['logger'][_0x5f692(0x1b6)](_0x263daa+_0x5f692(0x1c9)+_0x45967d[_0x5f692(0xff)]+'\x22\x20and\x20awaiting\x20result'),_0x1d8065=await _0x5cd7a3[_0x45967d['func']](_0x46ea9e,_0x45967d[_0x5f692(0x1a2)],_0x45967d[_0x5f692(0x11a)]);break;case _0x5f692(0x174):_0x5cd7a3[_0x5f692(0x125)][_0x5f692(0x1b6)](_0x263daa+_0x5f692(0x1c9)+_0x45967d[_0x5f692(0xff)]+_0x5f692(0x127)),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d['obj'],_0x45967d[_0x5f692(0x11a)]);break;case _0x5f692(0x11f):_0x5cd7a3[_0x5f692(0x125)][_0x5f692(0x1b6)](_0x263daa+_0x5f692(0x1c9)+_0x45967d[_0x5f692(0xff)]+_0x5f692(0x127)),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d['id'],_0x45967d[_0x5f692(0x11a)]);break;case'deleteGroup':_0x5cd7a3[_0x5f692(0x125)]['debug'](_0x263daa+_0x5f692(0x1c9)+_0x45967d['func']+'\x22\x20and\x20awaiting\x20result'),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d['id'],_0x45967d[_0x5f692(0x11a)]);break;case'modifyUser':_0x5cd7a3['logger'][_0x5f692(0x1b6)](_0x263daa+_0x5f692(0x1c9)+_0x45967d['func']+_0x5f692(0x127)),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d['id'],_0x45967d[_0x5f692(0x1a2)],_0x45967d[_0x5f692(0x11a)]);break;case _0x5f692(0x1b2):_0x5cd7a3[_0x5f692(0x125)]['debug'](_0x263daa+_0x5f692(0x1c9)+_0x45967d[_0x5f692(0xff)]+_0x5f692(0x127)),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d['id'],_0x45967d['obj'],_0x45967d[_0x5f692(0x11a)]);break;case _0x5f692(0xf6):_0x5cd7a3[_0x5f692(0x125)][_0x5f692(0x1b6)](_0x263daa+'\x20calling\x20\x22'+_0x45967d[_0x5f692(0xff)]+_0x5f692(0x127)),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x45967d[_0x5f692(0x1a6)],_0x46ea9e,_0x45967d['id'],_0x45967d['obj'],_0x30ffff[_0x5f692(0x1af)],_0x45967d[_0x5f692(0x11a)]);break;case _0x5f692(0xeb):_0x5cd7a3[_0x5f692(0x125)]['debug'](_0x263daa+_0x5f692(0x1c9)+_0x45967d['func']+_0x5f692(0x127)),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d[_0x5f692(0x1a2)],_0x45967d['ctxPassThrough']);break;case _0x5f692(0xd8):_0x5cd7a3[_0x5f692(0x125)][_0x5f692(0x1b6)](_0x263daa+'\x20calling\x20\x22'+_0x45967d[_0x5f692(0xff)]+_0x5f692(0x127)),_0x1d8065=await _0x5cd7a3[_0x45967d['func']](_0x46ea9e,_0x45967d['id'],_0x45967d[_0x5f692(0x1a2)],_0x45967d[_0x5f692(0x11a)]);break;case _0x5f692(0xf5):_0x5cd7a3[_0x5f692(0x125)][_0x5f692(0x1b6)](_0x263daa+_0x5f692(0x1c9)+_0x45967d['func']+_0x5f692(0x127)),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d['id'],_0x45967d['obj'],_0x45967d['ctxPassThrough']);break;case _0x5f692(0x103):_0x5cd7a3[_0x5f692(0x125)][_0x5f692(0x1b6)](_0x263daa+_0x5f692(0x1c9)+_0x45967d['func']+_0x5f692(0x127)),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d['id'],_0x45967d[_0x5f692(0x1be)],_0x45967d[_0x5f692(0x1a2)],_0x45967d[_0x5f692(0x11a)]);break;case _0x5f692(0x137):_0x5cd7a3[_0x5f692(0x125)]['debug'](_0x263daa+_0x5f692(0x1c9)+_0x45967d[_0x5f692(0xff)]+'\x22\x20and\x20awaiting\x20result'),_0x1d8065=await _0x5cd7a3[_0x45967d[_0x5f692(0xff)]](_0x46ea9e,_0x45967d['id'],_0x45967d[_0x5f692(0x11a)]);break;default:_0x486472='subscriber\x20message\x20error:\x20handle\x20\x27'+_0x45967d['func']+_0x5f692(0x19d),_0x5cd7a3[_0x5f692(0x125)][_0x5f692(0x12c)](_0x263daa+'\x20'+_0x486472);throw new Error(_0x486472);}if(!_0x1d8065)_0x1d8065=null;const _0xe2f6dc=JSON[_0x5f692(0x183)](_0x1d8065);_0x56df08[_0x5f692(0x10d)](_0xe2f6dc),_0x5cd7a3['logger'][_0x5f692(0x19a)](_0x263daa+_0x5f692(0x1db)+_0x45967d[_0x5f692(0xff)]+_0x5f692(0x139)+(_0x45967d['obj']?JSON[_0x5f692(0x183)](_0x45967d[_0x5f692(0x1a2)]):'')+_0x5f692(0x192)+(_0x45967d['id']?_0x45967d['id']:'')+_0x5f692(0x157)+(_0x45967d[_0x5f692(0x101)]?_0x45967d[_0x5f692(0x101)]:'')+_0x5f692(0x16c)+_0xe2f6dc+_0x5bffdc);}catch(_0x4d2b58){const _0x16d730=_0x5f692(0x1d3)+_0x4d2b58['message']+_0x5f692(0x1dc)+_0x4d2b58['name']+'\x22}';_0x56df08[_0x5f692(0x10d)](_0x16d730),_0x5cd7a3['logger'][_0x5f692(0x19a)]((_0x263daa||'')+'\x20message\x20handled:\x20'+_0x45967d[_0x5f692(0xff)]+_0x5f692(0x139)+(_0x45967d[_0x5f692(0x1a2)]?JSON[_0x5f692(0x183)](_0x45967d['obj']):'')+_0x5f692(0x192)+(_0x45967d['id']?_0x45967d['id']:'')+_0x5f692(0x157)+(_0x45967d[_0x5f692(0x101)]?_0x45967d['attributes']:'')+'\x20message\x20error\x20response:\x20'+_0x16d730+_0x5bffdc);}}};if(_0x42ba30)_0x8966a2();else _0x1978fd();},_0x2667e9=async(_0x51f58b,_0x5393a0)=>{const _0x2668a6=_0x438835,_0x4e3595=_0x870e65[_0x51f58b][_0x2668a6(0x15a)]?.['nats']?.['subject'];let _0x4457d1=0x0;for await(const _0x274361 of _0x5393a0[_0x2668a6(0x160)]()){switch(_0x274361['type']){case a0_0x1f12d0['Events']['Disconnect']:_0x5cd7a3[_0x2668a6(0x125)][_0x2668a6(0x12c)](_0x5cd7a3[_0x2668a6(0x163)]+'['+_0x5cd7a3[_0x2668a6(0x152)]+_0x2668a6(0x1c2)+_0x51f58b+']['+_0x4e3595+_0x2668a6(0x1b9)+_0x274361[_0x2668a6(0x186)]+_0x2668a6(0x167)),_0x4457d1=0x0;break;case a0_0x1f12d0[_0x2668a6(0x1b3)][_0x2668a6(0x1b1)]:_0x5cd7a3[_0x2668a6(0x125)][_0x2668a6(0x19a)](_0x5cd7a3['gwName']+'['+_0x5cd7a3['pluginName']+_0x2668a6(0x1c2)+_0x51f58b+']['+_0x4e3595+_0x2668a6(0x12d)+_0x274361[_0x2668a6(0x186)]);break;case a0_0x1f12d0[_0x2668a6(0x1b3)]['Error']:_0x5cd7a3[_0x2668a6(0x125)]['error'](_0x5cd7a3['gwName']+'['+_0x5cd7a3[_0x2668a6(0x152)]+']\x20subscriber['+_0x51f58b+']['+_0x4e3595+_0x2668a6(0x1ab)+_0x274361[_0x2668a6(0x186)]);break;case a0_0x1f12d0['DebugEvents']['Reconnecting']:_0x4457d1+=0x1;_0x4457d1%0x1e===0x0&&_0x5cd7a3['logger'][_0x2668a6(0x1b6)](_0x5cd7a3[_0x2668a6(0x163)]+'['+_0x5cd7a3['pluginName']+_0x2668a6(0x1c2)+_0x51f58b+']['+_0x4e3595+_0x2668a6(0x168)+_0x274361[_0x2668a6(0x186)]+'\x20(count='+_0x4457d1+')');break;case a0_0x1f12d0[_0x2668a6(0x1a1)][_0x2668a6(0x1bb)]:_0x5cd7a3['logger']['debug'](_0x5cd7a3[_0x2668a6(0x163)]+'['+_0x5cd7a3[_0x2668a6(0x152)]+_0x2668a6(0x1c2)+_0x51f58b+']['+_0x4e3595+']\x20client\x20has\x20a\x20stale\x20connection\x20'+_0x274361[_0x2668a6(0x186)]);break;}}};process['on'](_0x438835(0x1dd),async()=>{const _0x41deb1=_0x438835;for(const _0x5a1399 in _0x870e65){_0x870e65[_0x5a1399]['nc']&&!_0x870e65[_0x5a1399]['nc'][_0x41deb1(0x12e)]()&&await _0x870e65[_0x5a1399]['nc']['drain']();}}),process['on'](_0x438835(0x11b),async()=>{const _0x30c25e=_0x438835;for(const _0x43f45f in _0x870e65){_0x870e65[_0x43f45f]['nc']&&!_0x870e65[_0x43f45f]['nc'][_0x30c25e(0x12e)]()&&await _0x870e65[_0x43f45f]['nc'][_0x30c25e(0x10f)]();}});const _0x13ec27=async(_0xe1e17b,_0x50684c,_0x2cbb3a)=>{const _0x2cbe0c=_0x438835,_0x361048={'attribute':_0x50684c,'operator':'eq','value':_0x2cbb3a,'rawFilter':undefined,'startIndex':undefined,'count':undefined},_0x5956e9=[_0x50684c];if(_0x50684c!=='id')_0x5956e9[_0x2cbe0c(0x1a4)]('id');try{const _0x3c7d05=await _0x5cd7a3[_0x2cbe0c(0x198)](_0xe1e17b,_0x361048,_0x5956e9);if(!_0x3c7d05||!_0x3c7d05[_0x2cbe0c(0x16f)]||!Array[_0x2cbe0c(0x1cb)](_0x3c7d05[_0x2cbe0c(0x16f)]))throw new Error(_0x2cbe0c(0x110)+JSON['stringify'](_0x361048)+'\x20error:\x20missing\x20result');if(_0x3c7d05['Resources']['length']===0x0)return null;else{if(_0x3c7d05[_0x2cbe0c(0x16f)][_0x2cbe0c(0x14c)]>0x2)throw new Error(_0x2cbe0c(0x110)+JSON[_0x2cbe0c(0x183)](_0x361048)+'\x20error:\x20more\x20than\x20one\x20user\x20were\x20found}');else{const _0x18e8be=_0x3c7d05[_0x2cbe0c(0x16f)][0x0];if(!_0x18e8be['id'])throw new Error(_0x2cbe0c(0x110)+JSON[_0x2cbe0c(0x183)](_0x361048)+'\x20result='+JSON[_0x2cbe0c(0x183)](_0x18e8be)+'\x20error:\x20missing\x20id}');return decodeURIComponent(_0x18e8be['id']);}}}catch(_0x17d49f){throw new Error('getUsers()\x20getObj='+JSON[_0x2cbe0c(0x183)](_0x361048)+_0x2cbe0c(0xe0)+_0x17d49f[_0x2cbe0c(0xe4)]+'}');}},_0x2729f5=_0x5539dd=>{const _0x2b3e67=_0x438835;if(!_0x5539dd||typeof _0x5539dd!==_0x2b3e67(0x128))return[null,null];_0x5539dd=_0x5539dd[_0x2b3e67(0x114)]();const _0x596d13=_0x5539dd[_0x2b3e67(0xf7)]('(');if(_0x596d13<0x1)return[null,null];if(_0x5539dd[_0x2b3e67(0x147)](_0x5539dd[_0x2b3e67(0x14c)]-0x1)!==')')return[null,null];if(_0x4604e4(_0x5539dd,'(')!==_0x4604e4(_0x5539dd,')'))return[null,null];const _0x4e2890=_0x5539dd[_0x2b3e67(0x147)](0x0,_0x596d13),_0x52a25b=_0x5539dd['substring'](_0x596d13+0x1,_0x5539dd['length']-0x1);let _0x5c71c0=[];const _0x24d2a7=_0x52a25b[_0x2b3e67(0x1de)](',');let _0x43398c='';for(let _0x1d941d=0x0;_0x1d941d<_0x24d2a7[_0x2b3e67(0x14c)];_0x1d941d++){const _0x5c9b8e=_0x43398c?_0x43398c+','+_0x24d2a7[_0x1d941d]:_0x24d2a7[_0x1d941d],_0x502653=_0x4604e4(_0x5c9b8e,'('),_0x6c29b3=_0x4604e4(_0x5c9b8e,')');if(_0x502653===_0x6c29b3)_0x5c71c0['push'](_0x505015(_0x5c9b8e,'\x22')),_0x43398c='';else{if(_0x43398c)_0x43398c+=','+_0x24d2a7[_0x1d941d];else _0x43398c+=_0x24d2a7[_0x1d941d];}}if(_0x5c71c0['length']===0x0)_0x5c71c0=null;return[_0x4e2890,_0x5c71c0];};function _0x4604e4(_0x5a062a,_0x8cf49c){const _0x3bad2d=_0x438835;let _0x2588e8=0x0;for(let _0x424b48=0x0;_0x424b48<_0x5a062a[_0x3bad2d(0x14c)];_0x424b48++){_0x5a062a[_0x3bad2d(0x1a0)](_0x424b48)===_0x8cf49c&&(_0x2588e8+=0x1);}return _0x2588e8;}const _0x505015=(_0x280310,_0x1bf89a)=>{const _0x86080a=_0x438835;if(typeof _0x280310!==_0x86080a(0x128)||typeof _0x1bf89a!=='string')return _0x280310;if(_0x280310[_0x86080a(0x14c)]===0x1)return _0x280310;if(_0x1bf89a[_0x86080a(0x14c)]!==0x1)return _0x280310;return _0x280310=_0x280310[_0x86080a(0x114)](),_0x280310[_0x86080a(0x147)](0x0,0x1)===_0x1bf89a&&(_0x280310=_0x280310[_0x86080a(0x147)](0x1)),_0x280310['substring'](_0x280310[_0x86080a(0x14c)]-0x1)===_0x1bf89a&&(_0x280310=_0x280310[_0x86080a(0x147)](0x0,_0x280310['length']-0x1)),_0x280310;},_0x19b82c=async(_0x483b6f,_0x4690ea,_0x52169f,_0x4549c7)=>{const _0x1cd93a=_0x438835;if(!_0x4690ea||!_0x52169f||!_0x4549c7)return null;const [_0x1d1468,_0xb02044]=_0x2729f5(_0x4549c7);if(!_0x1d1468||!_0xb02044){const _0x238733=_0x4549c7[_0x1cd93a(0x1de)]('(');if(_0x238733[_0x1cd93a(0x14c)]>0x1){const _0x518440=[_0x1cd93a(0xe8),_0x1cd93a(0x197),_0x1cd93a(0x15f),'elementnumber',_0x1cd93a(0xf1),_0x1cd93a(0x109),'normalize',_0x1cd93a(0x10c),_0x1cd93a(0x191)],_0x45f8d4=_0x238733[0x0][_0x1cd93a(0x116)]();if(_0x518440[_0x1cd93a(0xfb)](_0x45f8d4))return null;}return _0x4549c7;}for(let _0x44a9ea=0x0;_0x44a9ea<_0xb02044[_0x1cd93a(0x14c)];_0x44a9ea++){if(_0xb02044[_0x44a9ea]['substring'](0x0,0x1)==='['){const _0x5386ed=_0xb02044[_0x44a9ea][_0x1cd93a(0xf7)](']');if(_0x5386ed<0x0)return null;const _0x61c227=_0xb02044[_0x44a9ea]['substring'](0x1,_0x5386ed),_0xbe774f=_0x61c227['split']('.');let _0x131c1c;for(let _0x44f5ff=0x0;_0x44f5ff<_0xbe774f['length'];_0x44f5ff++){if(_0x44f5ff===0x0)_0x131c1c=_0x4690ea[_0xbe774f[_0x44f5ff]];else{if(!_0x131c1c)return null;_0x131c1c=_0x131c1c[_0xbe774f[_0x44f5ff]];}}if(!_0x131c1c)return null;_0xb02044[_0x44a9ea]=_0x131c1c;}}for(let _0x985d5a=0x0;_0x985d5a<_0xb02044[_0x1cd93a(0x14c)];_0x985d5a++){const [_0x3d6d55]=_0x2729f5(_0xb02044[_0x985d5a]);_0x3d6d55&&(_0xb02044[_0x985d5a]=await _0x19b82c(_0x483b6f,_0x4690ea,_0x52169f,_0xb02044[_0x985d5a]));}if(_0xb02044[0x0]===null)return null;switch(_0x1d1468[_0x1cd93a(0x116)]()){case'lowercase':{if(_0xb02044[_0x1cd93a(0x14c)]!==0x1)return null;const [_0x437fad]=_0x2729f5(_0xb02044[0x0]);if(_0x437fad)_0xb02044[0x0]=await _0x19b82c(_0x483b6f,_0x4690ea,_0x52169f,_0x437fad);if(_0xb02044[0x0]===null)return null;return _0xb02044[0x0][_0x1cd93a(0x116)]();}case _0x1cd93a(0x197):{if(_0xb02044[_0x1cd93a(0x14c)]!==0x1)return null;const [_0x504648]=_0x2729f5(_0xb02044[0x0]);if(_0x504648)_0xb02044[0x0]=await _0x19b82c(_0x483b6f,_0x4690ea,_0x52169f,_0x504648);if(_0xb02044[0x0]===null)return null;return _0xb02044[0x0][_0x1cd93a(0x171)]();}case'firstn':{if(_0xb02044[_0x1cd93a(0x14c)]!==0x2)return null;const [_0x2dd456]=_0x2729f5(_0xb02044[0x0]);if(_0x2dd456)_0xb02044[0x0]=await _0x19b82c(_0x483b6f,_0x4690ea,_0x52169f,_0x2dd456);if(_0xb02044[0x0]===null)return null;if(isNaN(_0xb02044[0x1]))return null;return _0xb02044[0x0][_0x1cd93a(0x147)](0x0,_0xb02044[0x1]);}case'elementnumber':{const [_0x1aede6]=_0x2729f5(_0xb02044[0x0]);if(_0xb02044[_0x1cd93a(0x14c)]<0x2)return null;if(_0x1aede6)_0xb02044[0x0]=await _0x19b82c(_0x483b6f,_0x4690ea,_0x52169f,_0x1aede6);if(_0xb02044[0x0]===null)return null;const _0x18712b=_0xb02044[0x1];if(isNaN(_0x18712b))return null;let _0xe9411;if(_0xb02044[_0x1cd93a(0x14c)]===0x3)_0xe9411=_0xb02044[0x0][_0x1cd93a(0x1de)](_0xb02044[0x2]);else _0xe9411=_0xe9411=_0xb02044[0x0][_0x1cd93a(0x1de)]('\x20');if(_0x18712b<=_0xe9411[_0x1cd93a(0x14c)])return _0xe9411[_0x18712b-0x1];else return'';}case _0x1cd93a(0x109):{const [_0x51eca4]=_0x2729f5(_0xb02044[0x0]);if(_0x51eca4)_0xb02044[0x0]=await _0x19b82c(_0x483b6f,_0x4690ea,_0x52169f,_0x51eca4);if(_0xb02044[0x0]===null)return null;if(_0xb02044[_0x1cd93a(0x14c)]!==0x3)return null;return _0xb02044[0x0][_0x1cd93a(0x1a5)](_0xb02044[0x1],_0xb02044[0x2]);}case'normalize':{if(_0xb02044[_0x1cd93a(0x14c)]!==0x1)return null;const [_0x1dbda9]=_0x2729f5(_0xb02044[0x0]);if(_0x1dbda9)_0xb02044[0x0]=await _0x19b82c(_0x483b6f,_0x4690ea,_0x52169f,_0x1dbda9);if(_0xb02044[0x0]===null)return null;return a0_0x7d5195[_0x1cd93a(0x14d)](_0xb02044[0x0]);}case _0x1cd93a(0xf1):{let _0x18f092='';for(let _0x5cd186=0x0;_0x5cd186<_0xb02044[_0x1cd93a(0x14c)];_0x5cd186++){const [_0x504064]=_0x2729f5(_0xb02044[_0x5cd186]);if(_0x504064)_0xb02044[_0x5cd186]=await _0x19b82c(_0x483b6f,_0x4690ea,_0x52169f,_0x504064);if(_0xb02044[_0x5cd186]===null)return null;_0x18f092+=_0xb02044[_0x5cd186];}return _0x18f092;}case _0x1cd93a(0x10c):{if(_0xb02044[_0x1cd93a(0x14c)]>0x2)return null;const [_0x36c3da]=_0x2729f5(_0xb02044[0x0]);if(_0x36c3da)_0xb02044[0x0]=await _0x19b82c(_0x483b6f,_0x4690ea,_0x52169f,_0x36c3da);if(_0xb02044[0x0]===null)return null;const _0x26073a=parseInt(_0xb02044[0x0]);if(isNaN(_0x26073a))return null;let _0x37338b=_0x1cd93a(0x140);_0x37338b+=','+_0xb02044[0x0];if(_0xb02044['length']===0x2&&_0xb02044[0x1]['toLowerCase']()===_0x1cd93a(0x144))_0x37338b+=_0x1cd93a(0x1c3);else _0x37338b+=_0x1cd93a(0x1aa);return _0x37338b+='##',_0x37338b;}case _0x1cd93a(0x191):{if(_0xb02044[_0x1cd93a(0x14c)]!==0x1)return null;const [_0x5957df]=_0x2729f5(_0xb02044[0x0]);if(_0x5957df)_0xb02044[0x0]=await _0x19b82c(_0x483b6f,_0x4690ea,_0x52169f,_0x5957df);if(_0xb02044[0x0]===null)return null;let _0x5e7549,_0x2a6489=![],_0x4aa231='';const _0x3ab69e=_0xb02044[0x0][_0x1cd93a(0x1de)]('##');if(_0x3ab69e[_0x1cd93a(0x14c)]>0x2)for(let _0x4bdfc9=0x0;_0x4bdfc9<_0x3ab69e[_0x1cd93a(0x14c)];_0x4bdfc9++){if(_0x3ab69e[_0x4bdfc9][_0x1cd93a(0x194)]('doIncrement')){const _0x4ddc21=_0x3ab69e[_0x4bdfc9][_0x1cd93a(0x1de)](',');if(_0x4ddc21[_0x1cd93a(0x14c)]<0x2)return null;const _0x551eb0=parseInt(_0x4ddc21[0x1]);if(isNaN(_0x551eb0))return null;_0x4aa231='##'+_0x3ab69e[_0x4bdfc9]+'##',_0x5e7549=_0x4ddc21[0x1],_0x4ddc21[_0x1cd93a(0x14c)]>0x2&&(_0x2a6489=_0x4ddc21[0x2][_0x1cd93a(0x116)]()==='true');}}let _0x5cb1ad,_0x2c8ae7=0x0,_0x2148db=0x0;if(_0x5e7549){_0x2148db=_0x5e7549[_0x1cd93a(0x14c)],_0x2c8ae7=0xa;for(let _0xa99ee8=0x1;_0xa99ee8<_0x2148db;_0xa99ee8++){_0x2c8ae7*=0xa;}_0x2c8ae7-=0x1,_0x5cb1ad=parseInt(_0x5e7549);if(isNaN(_0x5cb1ad))return null;_0x5cb1ad-=0x1;}else _0x5cb1ad=0x0;do{_0x5cb1ad+=0x1;let _0x1e809c=_0xb02044[0x0];if(_0x5e7549!==undefined&&_0x4aa231){let _0x123009=_0x5cb1ad[_0x1cd93a(0xef)]();while(_0x123009[_0x1cd93a(0x14c)]<_0x2148db){_0x123009='0'+_0x123009;}_0x2a6489?_0x1e809c=_0x1e809c[_0x1cd93a(0x109)](_0x4aa231,_0x123009):(_0x1e809c=_0x1e809c[_0x1cd93a(0x109)](_0x4aa231,''),_0x2a6489=!![],_0x5cb1ad-=0x1);}try{const _0x14d95a=await _0x13ec27(_0x483b6f,_0x52169f,_0x1e809c);if(!_0x14d95a)return _0x1e809c;}catch(_0x58651f){return _0x5cd7a3['logger'][_0x1cd93a(0x12c)](_0x5cd7a3[_0x1cd93a(0x163)]+'['+_0x5cd7a3[_0x1cd93a(0x152)]+']\x20'+_0x1d1468+_0x1cd93a(0x108)+_0x58651f[_0x1cd93a(0xe4)]),null;}}while(_0x5cb1ad<_0x2c8ae7);return null;}default:}return null;},_0x2c406b=async(_0x44a163,_0x4632af)=>{const _0x9485c7=_0x438835;for(const _0xc6da70 in _0x4632af){const _0x11594e=_0x4632af[_0xc6da70],[_0x4651d9,_0x158e8c]=_0x2729f5(_0x11594e);if(_0x4651d9){const _0xaf184a=''+_0xc6da70,_0x5802d3=_0x4651d9+'('+_0x158e8c[_0x9485c7(0xf1)](',')+')',_0x376b64=await _0x19b82c(_0x44a163,_0x4632af,_0xaf184a,_0x5802d3);if(_0x376b64===null)delete _0x4632af[_0xc6da70];else _0x4632af[_0xc6da70]=_0x376b64;}for(const _0x488214 in _0x11594e){const _0x86d8ce=_0x11594e[_0x488214],[_0x2f627d,_0x5333a1]=_0x2729f5(_0x86d8ce);if(_0x2f627d){const _0x52fb3e=_0xc6da70+'.'+_0x488214,_0x1ac217=_0x2f627d+'('+_0x5333a1[_0x9485c7(0xf1)](',')+')',_0x228217=await _0x19b82c(_0x44a163,_0x4632af,_0x52fb3e,_0x1ac217);if(_0x228217===null)delete _0x11594e[_0x488214];else _0x11594e[_0x488214]=_0x228217;}}}return _0x4632af;};}}export class Publisher{constructor(_0x510f44){const _0x3c1a84=a0_0xe6f9,_0x5ad16e=_0x510f44,_0xbe3537={},_0x292b60=async(_0x42e0c0,_0x4dcdc2)=>{const _0x5ed36c=a0_0xe6f9,_0x37a861=_0xbe3537[_0x42e0c0]['config']?.[_0x5ed36c(0x175)]?.[_0x5ed36c(0xe6)];let _0x140973=0x0;for await(const _0x3d5d6c of _0x4dcdc2[_0x5ed36c(0x160)]()){switch(_0x3d5d6c[_0x5ed36c(0x1b7)]){case a0_0x1f12d0[_0x5ed36c(0x1b3)][_0x5ed36c(0x111)]:_0x5ad16e[_0x5ed36c(0x125)][_0x5ed36c(0x12c)](_0x5ad16e[_0x5ed36c(0x163)]+'['+_0x5ad16e[_0x5ed36c(0x152)]+']\x20publisher['+_0x42e0c0+']['+_0x37a861+_0x5ed36c(0x1b9)+_0x3d5d6c[_0x5ed36c(0x186)]+_0x5ed36c(0x167)),_0x140973=0x0;break;case a0_0x1f12d0[_0x5ed36c(0x1b3)][_0x5ed36c(0x1b1)]:_0x5ad16e[_0x5ed36c(0x125)][_0x5ed36c(0x19a)](_0x5ad16e[_0x5ed36c(0x163)]+'['+_0x5ad16e['pluginName']+']\x20publisher['+_0x42e0c0+']['+_0x37a861+_0x5ed36c(0x12d)+_0x3d5d6c[_0x5ed36c(0x186)]);break;case a0_0x1f12d0[_0x5ed36c(0x1b3)]['Error']:_0x5ad16e[_0x5ed36c(0x125)][_0x5ed36c(0x12c)](_0x5ad16e[_0x5ed36c(0x163)]+'['+_0x5ad16e[_0x5ed36c(0x152)]+_0x5ed36c(0x1d7)+_0x42e0c0+']['+_0x37a861+']\x20client\x20error\x20'+_0x3d5d6c[_0x5ed36c(0x186)]);break;case a0_0x1f12d0[_0x5ed36c(0x1a1)][_0x5ed36c(0x107)]:_0x140973+=0x1;_0x140973%0x1e===0x0&&_0x5ad16e['logger'][_0x5ed36c(0x1b6)](_0x5ad16e[_0x5ed36c(0x163)]+'['+_0x5ad16e[_0x5ed36c(0x152)]+_0x5ed36c(0x1d7)+_0x42e0c0+']['+_0x37a861+']\x20client\x20is\x20attempting\x20to\x20reconnect\x20'+_0x3d5d6c[_0x5ed36c(0x186)]+_0x5ed36c(0xdd)+_0x140973+')');break;case a0_0x1f12d0[_0x5ed36c(0x1a1)]['StaleConnection']:_0x5ad16e[_0x5ed36c(0x125)][_0x5ed36c(0x1b6)](_0x5ad16e['gwName']+'['+_0x5ad16e['pluginName']+']\x20publisher['+_0x42e0c0+']['+_0x37a861+']\x20client\x20has\x20a\x20stale\x20connection\x20'+_0x3d5d6c['data']);break;}}},_0x5bc997=async(_0x3cfc8b,_0xc10f7d)=>{const _0x5a23ea=a0_0xe6f9,_0x40f9c2=_0xbe3537[_0x3cfc8b][_0x5a23ea(0x15a)]?.[_0x5a23ea(0x175)]?.[_0x5a23ea(0xe6)];let _0x465b89;try{_0x465b89=await a0_0x1f12d0[_0x5a23ea(0x1b8)](_0xc10f7d);if(_0x465b89[_0x5a23ea(0x19a)][_0x5a23ea(0x161)]!==_0x5a23ea(0x1c1)){_0x465b89['close']();return;}_0xbe3537[_0x3cfc8b]['nc']=_0x465b89,_0x292b60(_0x3cfc8b,_0x465b89);}catch(_0x5e85db){_0x5ad16e[_0x5a23ea(0x125)][_0x5a23ea(0x12c)](_0x5ad16e[_0x5a23ea(0x163)]+'['+_0x5ad16e['pluginName']+_0x5a23ea(0x1d7)+_0x3cfc8b+']['+_0x40f9c2+_0x5a23ea(0xf4)+_0x5e85db[_0x5a23ea(0xe4)]+'\x20-\x20will\x20do\x20auto\x20connect\x20when\x20available\x20-\x20however,\x20please\x20verify\x20stream\x20configuration'),_0xc10f7d[_0x5a23ea(0x18a)]=!![];try{_0x465b89=await a0_0x1f12d0[_0x5a23ea(0x1b8)](_0xc10f7d);if(_0x465b89[_0x5a23ea(0x19a)][_0x5a23ea(0x161)]!==_0x5a23ea(0x1c1)){_0x465b89[_0x5a23ea(0x102)]();return;}_0xbe3537[_0x3cfc8b]['nc']=_0x465b89,_0x292b60(_0x3cfc8b,_0x465b89);}catch(_0x45c46d){_0x5ad16e[_0x5a23ea(0x125)]['error'](_0x5ad16e[_0x5a23ea(0x163)]+'['+_0x5ad16e[_0x5a23ea(0x152)]+_0x5a23ea(0x1d7)+_0x3cfc8b+']['+_0x40f9c2+_0x5a23ea(0xf4)+_0x45c46d['message']);return;}}_0x5ad16e[_0x5a23ea(0x125)]['debug'](_0x5ad16e[_0x5a23ea(0x163)]+'['+_0x5ad16e['pluginName']+']\x20publisher['+_0x3cfc8b+']['+_0x40f9c2+_0x5a23ea(0x1ba)+(_0xc10f7d['tls']['ca']?_0x5a23ea(0x195):'')+'\x20'+_0x465b89['getServer']()),_0x465b89[_0x5a23ea(0xe9)]()[_0x5a23ea(0xf0)](_0xd0d807=>{const _0x539f87=_0x5a23ea;_0xd0d807&&_0x5ad16e[_0x539f87(0x125)][_0x539f87(0x12c)](_0x5ad16e[_0x539f87(0x163)]+'['+_0x5ad16e['pluginName']+_0x539f87(0x1d7)+_0x3cfc8b+']['+_0x40f9c2+_0x539f87(0x122)+_0xd0d807[_0x539f87(0xe4)]);});};this['add']=async(_0x491304,_0x48a7bb)=>{const _0x5477c2=a0_0xe6f9;if(!_0x48a7bb?.[_0x5477c2(0x175)]){_0x5ad16e[_0x5477c2(0x125)][_0x5477c2(0x12c)](_0x5ad16e[_0x5477c2(0x163)]+'['+_0x5ad16e[_0x5477c2(0x152)]+_0x5477c2(0x1d7)+_0x491304+_0x5477c2(0x13d));return;}if(!_0x48a7bb?.[_0x5477c2(0x175)]?.['tenant']){_0x5ad16e[_0x5477c2(0x125)]['error'](_0x5ad16e['gwName']+'['+_0x5ad16e[_0x5477c2(0x152)]+']\x20publisher['+_0x491304+_0x5477c2(0x1da));return;}if(!_0x48a7bb?.[_0x5477c2(0x175)]?.[_0x5477c2(0xe6)]){_0x5ad16e[_0x5477c2(0x125)][_0x5477c2(0x12c)](_0x5ad16e[_0x5477c2(0x163)]+'['+_0x5ad16e[_0x5477c2(0x152)]+_0x5477c2(0x1d7)+_0x491304+_0x5477c2(0x199));return;}if(!_0x48a7bb?.[_0x5477c2(0x175)]?.[_0x5477c2(0xe6)][_0x5477c2(0x194)](_0x5477c2(0x1c4))){_0x5ad16e[_0x5477c2(0x125)][_0x5477c2(0x12c)](_0x5ad16e[_0x5477c2(0x163)]+'['+_0x5ad16e[_0x5477c2(0x152)]+_0x5477c2(0x1d7)+_0x491304+_0x5477c2(0x105));return;}if(!_0x48a7bb['baseUrls']||!Array[_0x5477c2(0x1cb)](_0x48a7bb['baseUrls'])||_0x48a7bb[_0x5477c2(0x15e)][_0x5477c2(0x14c)]<0x1){_0x5ad16e[_0x5477c2(0x125)][_0x5477c2(0x12c)](_0x5ad16e['gwName']+'['+_0x5ad16e[_0x5477c2(0x152)]+_0x5477c2(0x1d7)+_0x491304+_0x5477c2(0x124));return;}if(!_0x48a7bb?.[_0x5477c2(0x156)]?.['ca']){_0x5ad16e['logger']['error'](_0x5ad16e['gwName']+'['+_0x5ad16e[_0x5477c2(0x152)]+_0x5477c2(0x1d7)+_0x491304+']\x20initialization\x20error:\x20missing\x20certificate\x20configuration');return;}const _0x4b5a83={};try{let _0x5e85d5=a0_0x24d390[_0x5477c2(0xf1)](_0x5ad16e[_0x5477c2(0x15b)],_0x5477c2(0x18c),_0x48a7bb?.[_0x5477c2(0x156)]?.['ca']||_0x5477c2(0x1b4));(_0x48a7bb?.[_0x5477c2(0x156)]?.['ca']?.['startsWith']('/')||_0x48a7bb?.[_0x5477c2(0x156)]?.['ca']?.['includes']('\x5c'))&&(_0x5e85d5=_0x48a7bb['certificate']['ca']),_0x4b5a83['ca']=[a0_0x804e61[_0x5477c2(0x1c5)](_0x5e85d5)],_0x4b5a83['rejectUnauthorized']=!![];}catch(_0x3d855a){_0x5ad16e[_0x5477c2(0x125)][_0x5477c2(0x12c)](_0x5ad16e[_0x5477c2(0x163)]+'['+_0x5ad16e[_0x5477c2(0x152)]+_0x5477c2(0x1d7)+_0x491304+']\x20initialization\x20certificate\x20error:\x20'+_0x3d855a[_0x5477c2(0xe4)]);return;}const _0x30aeba={},_0x11bbbc=new TextEncoder()[_0x5477c2(0x1ce)](_0x48a7bb?.[_0x5477c2(0x175)]?.[_0x5477c2(0xec)]),_0x3dccc7=_0x48a7bb?.[_0x5477c2(0x175)]?.['jwt'];_0x30aeba['authenticator']=a0_0x1f12d0['jwtAuthenticator'](_0x3dccc7,_0x11bbbc),_0x30aeba['servers']=_0x48a7bb[_0x5477c2(0x15e)],_0x30aeba[_0x5477c2(0x195)]=_0x4b5a83,_0x30aeba['waitOnFirstConnect']=![],_0x30aeba['reconnect']=!![],_0x30aeba['reconnectTimeWait']=0x3e8*0xa,_0x30aeba[_0x5477c2(0xf9)]=-0x1,_0x30aeba[_0x5477c2(0xd6)]=0x2*0x3c*0x3e8,_0x30aeba['maxPingOut']=0x5,_0x30aeba[_0x5477c2(0x1b6)]=![],_0xbe3537[_0x491304]={},_0xbe3537[_0x491304][_0x5477c2(0x15a)]=_0x48a7bb,_0xbe3537[_0x491304]['nc']=undefined,_0x5bc997(_0x491304,_0x30aeba);};const _0x9778b2=a0_0x1f12d0['StringCodec']();this['publish']=async _0xfa4001=>{const _0x30d186=a0_0xe6f9;let _0x1b2739;try{if(_0xfa4001['constructor']===Object){_0x1b2739=_0xfa4001[_0x30d186(0xdc)];if(!_0x1b2739)_0xfa4001[_0x30d186(0xdc)]=_0x30d186(0xe3);_0xfa4001=JSON['stringify'](_0xfa4001);}else{const _0x16f574=JSON[_0x30d186(0x158)](_0xfa4001);_0x1b2739=_0x16f574['baseEntity'];}}catch(_0x42ec3b){throw new Error(_0x30d186(0x12b)+_0x1b2739+_0x30d186(0x135));}if(!_0xbe3537[_0x1b2739])throw new Error(_0x30d186(0x12b)+_0x1b2739+_0x30d186(0x1bc)+_0x1b2739);const _0x4b8cc1=a0_0x1f12d0[_0x30d186(0x185)]();_0x4b8cc1[_0x30d186(0x173)](_0x30d186(0x1c0),a0_0xd1e96[_0x30d186(0x188)]());let _0x15f045;try{if(!_0xbe3537[_0x1b2739]['nc'])throw new Error(_0x30d186(0x14e));_0x15f045=await _0xbe3537[_0x1b2739]['nc']['request'](_0xbe3537[_0x1b2739][_0x30d186(0x15a)]?.[_0x30d186(0x175)]?.['subject'],_0x9778b2['encode'](_0xfa4001),{'headers':_0x4b8cc1});}catch(_0xbface6){if(_0xbface6[_0x30d186(0xe4)]===_0x30d186(0xfc))throw new Error('publisher['+_0x1b2739+_0x30d186(0x141)+_0xbe3537[_0x1b2739][_0x30d186(0x15a)]?.['nats']?.[_0x30d186(0xe6)]);else throw new Error(_0x30d186(0x12b)+_0x1b2739+']\x20error:\x20'+_0xbface6['message']);}let _0xc2e300;try{_0xc2e300=JSON['parse'](_0x15f045[_0x30d186(0x128)]());}catch(_0x17d46d){throw new Error(_0x30d186(0x115)+_0x15f045['string']());}if(_0xc2e300?.[_0x30d186(0x12c)]){const _0x1634ad=new Error(_0x30d186(0x1d5)+_0xc2e300[_0x30d186(0x12c)]);_0x1634ad[_0x30d186(0x176)]=_0xc2e300[_0x30d186(0xde)];throw _0x1634ad;}return _0xc2e300;},process['on'](_0x3c1a84(0x1dd),async()=>{const _0x1ad7a5=_0x3c1a84;for(const _0x10514c in _0xbe3537){_0xbe3537[_0x10514c]['nc']&&!_0xbe3537[_0x10514c]['nc'][_0x1ad7a5(0x12e)]()&&await _0xbe3537[_0x10514c]['nc']['drain']();}}),process['on'](_0x3c1a84(0x11b),async()=>{const _0x8bdd93=_0x3c1a84;for(const _0xa7eed2 in _0xbe3537){_0xbe3537[_0xa7eed2]['nc']&&!_0xbe3537[_0xa7eed2]['nc'][_0x8bdd93(0x12e)]()&&await _0xbe3537[_0xa7eed2]['nc'][_0x8bdd93(0x10f)]();}});}}export const getAppRoles=async(_0x2af6a2,_0x118933)=>{const _0xaf47d5=a0_0xe6f9,_0x1cbcee=_0xaf47d5(0x100),_0x470236=_0x2af6a2;_0x470236[_0xaf47d5(0x125)][_0xaf47d5(0x1b6)](_0x470236[_0xaf47d5(0x163)]+'['+_0x470236[_0xaf47d5(0x152)]+']\x20handling\x20\x22'+_0x1cbcee+'\x22');try{if(!a0_0x804e61[_0xaf47d5(0x131)](_0x470236[_0xaf47d5(0x15b)]+'/approles'))a0_0x804e61[_0xaf47d5(0x1ca)](_0x470236[_0xaf47d5(0x15b)]+_0xaf47d5(0x113));}catch(_0x259e0a){void 0x0;}const _0x1bfbdf=a0_0x24d390['join'](''+_0x470236[_0xaf47d5(0x15b)],_0xaf47d5(0x181),_0xaf47d5(0x119)+_0x470236[_0xaf47d5(0x152)]+'_autogenerated.cfg'),_0xe0b9d5={};a0_0x3bafd7[_0xaf47d5(0x190)](_0x1bfbdf)&&a0_0x804e61[_0xaf47d5(0x1c5)](_0x1bfbdf,_0xaf47d5(0x1b5))[_0xaf47d5(0x1de)](/\r?\n/)[_0xaf47d5(0x18b)](_0x57f1d6=>{const _0xdfb2d0=_0xaf47d5,_0xafc7e7=_0x57f1d6[_0xdfb2d0(0x1de)]('\x20');_0xafc7e7[_0xdfb2d0(0x14c)]===0x2&&(_0xe0b9d5[_0xafc7e7[0x0]]=_0xafc7e7[0x1]);});const _0x9f44c3=a0_0x804e61[_0xaf47d5(0x18d)](_0x1bfbdf,{'flags':'w','encoding':_0xaf47d5(0x196),'mode':0x1b6,'autoClose':!![]}),_0x29c2cf=[],_0x105693=await _0x470236[_0xaf47d5(0x162)](_0x118933,{'attribute':undefined,'operator':undefined,'value':undefined},['id','displayName']);return _0x105693['Resources']['forEach'](_0x1b40fb=>{const _0x207852=_0xaf47d5;if(_0x1b40fb['id']){let _0x5b80da=a0_0xd1e96[_0x207852(0x188)]();if(_0xe0b9d5[_0x1b40fb['id']])_0x5b80da=_0xe0b9d5[_0x1b40fb['id']];const _0x17e71d={'allowedMemberTypes':[_0x207852(0x120)],'description':'SCIM\x20Stream\x20-\x20Autogenerated','displayName':_0x1b40fb['displayName']||_0x1b40fb['id'],'id':_0x5b80da,'isEnabled':!![],'lang':null,'origin':_0x207852(0x14a),'value':decodeURIComponent(_0x1b40fb['id'])};_0x29c2cf[_0x207852(0x1a4)](_0x17e71d),_0x9f44c3['write'](_0x1b40fb['id']+'\x20'+_0x5b80da+'\x0a');}}),_0x9f44c3[_0xaf47d5(0x102)](),_0x470236[_0xaf47d5(0x125)][_0xaf47d5(0x1b6)](_0x470236[_0xaf47d5(0x163)]+'['+_0x470236[_0xaf47d5(0x152)]+']\x20approle\x20uuid\x20file\x20created:\x20'+_0x1bfbdf),{'Resources':[{'appRoles':_0x29c2cf}]};};
14
+ 'use strict';(function(_0x9489f9,_0xa108ad){const _0x3d4f8b=a0_0xb16d,_0x364ee3=_0x9489f9();while(!![]){try{const _0x4537eb=-parseInt(_0x3d4f8b(0x15f))/0x1*(parseInt(_0x3d4f8b(0x123))/0x2)+-parseInt(_0x3d4f8b(0x181))/0x3+parseInt(_0x3d4f8b(0x1cc))/0x4+parseInt(_0x3d4f8b(0x188))/0x5+parseInt(_0x3d4f8b(0x1df))/0x6*(parseInt(_0x3d4f8b(0xe4))/0x7)+parseInt(_0x3d4f8b(0x13d))/0x8*(parseInt(_0x3d4f8b(0x1ab))/0x9)+-parseInt(_0x3d4f8b(0x150))/0xa*(parseInt(_0x3d4f8b(0x117))/0xb);if(_0x4537eb===_0xa108ad)break;else _0x364ee3['push'](_0x364ee3['shift']());}catch(_0x41e5c4){_0x364ee3['push'](_0x364ee3['shift']());}}}(a0_0x4ebe,0x6e113));import{jwtAuthenticator,headers}from'@nats-io/nats-core';import{jetstream,jetstreamManager,DeliverPolicy,AckPolicy}from'@nats-io/jetstream';import{connect as a0_0x1eb4cc}from'@nats-io/transport-node';function a0_0x4ebe(){const _0x918521=['typeId','utf8','\x22\x20with\x20chunks\x20and\x20awaiting\x20result','indexOf','4rgyKDU','ENOTFOUND','\x20missing\x20mandatory\x20user.userName\x20in\x20message:\x20','elementnumber','Resources','baseUrls','debug',']\x20error:\x20missing\x20entity\x20configuration\x20for\x20baseEntity=',']\x20error:\x20','\x20message:\x20user\x20not\x20created\x20because\x20of\x20configuration\x20modifyOnly=true','subject','approles','\x20getUserId()\x20error:\x20','\x20error:\x20','groups','reason','password','drain','normalize','forEach','write',']\x20error:\x20no\x20subscribers/responders\x20to\x20subject\x20','all','\x20message:\x20user\x20not\x20created\x20because\x20of\x20active=false','filter','status','8yiwNOh','Operations','\x22\x20and\x20awaiting\x20result','{\x22error\x22:\x22','prototype','randomUUID','getGroups','lowercase','filter_subject','SIGINT','constructor','modifyOnly','obj',']\x20handling\x20\x22',']\x20client\x20disconnected\x20','true','GW.',']\x20initialization\x20error:\x20nats.subject\x20root\x20topic\x20must\x20be\x20\x27GW\x27,\x20nats.subject\x20example:\x20GW.APP1','schemas','2673590zcWHHt','staleConnection','\x20or\x20','\x20missing\x20user\x20object\x20in\x20message:\x20',',\x20id=','modifyGroup','activityOperation','\x20createUser()\x20obj=','\x20subscriber\x20error:\x20scimgateway\x20endpoint\x20connect\x20problem\x20-\x20will\x20do\x20auto\x20retry\x20until\x20connected','Msg-Id','isClosed','createUser','publisher\x20not\x20initialized/connected','subscriber\x20message\x20error:\x20message\x20not\x20JSON\x20formatted','query','10321vRbKAY','handle','replaceDomains','getProcessed','active','deleteGroup','attributes','userName','attribute','copyObj','getApi',']\x20subscriber[','nats','endsWith','logger','allSettled','skipConvertRolesToGroups',']\x20closed\x20with\x20error:\x20','encode','createRandomPassword','certificate','baseEntity',']\x20initialization\x20error:\x20missing\x20configuration\x20nats.subject','pingInterval','convertedScim20','delete','maxPingOut','\x20handling\x20message:\x20','isArray','increment','info','message',',\x20obj=','startsWith','813705OBJWxl','replaceAll','deleteUser',']\x20client\x20reconnected\x20','request','\x20(count=','operator','2780350YTjVbI','\x20message:\x20user\x20not\x20deleted\x20because\x20of\x20configuration\x20modifyOnly=true','type','/approles','503','getMemberOf','get','slice','\x20-\x20',']\x20error:\x20client\x20have\x20not\x20been\x20initialized','ctxPassThrough','pluginName','gwName',']\x20initialization\x20error:\x20missing\x20configuration\x20nats',']\x20initialization\x20certificate\x20error:\x20','stringify','from','splice','\x20result=','SCIM\x20Stream\x20-\x20Autogenerated','rejected','level','configDir','\x20role\x20removal\x20error:\x20','deleteApi','rawFilter','name','_info',',true','\x27\x20not\x20supported','operation','closed','durable_','add',']\x20initialization\x20error:\x20missing\x20configuration\x20nats.tenant','845694wSPWrJ','getAppRoles','display','ack','passThrough','\x20message:\x20user\x20does\x20not\x20exist','caller','roles','maxReconnectAttempts','publish','string','ECONNREFUSED','disconnect','HR.','displayName','SCIM\x20Stream','append',']\x20client\x20is\x20attempting\x20to\x20reconnect\x20','\x20error:\x20more\x20than\x20one\x20user\x20were\x20found}','reconnect','consumers',']\x20client\x20error\x20','data','func','split','sub','server_name','path','Users','error','servers','rejectUnauthorized','config','769264vuvHlv','modifyUser','\x20error:\x20missing\x20result',']\x20initialization\x20error:\x20missing\x20certificate\x20configuration',']\x20publisher[','getUsers()\x20getObj=','\x20message\x20handled:\x20','close','\x20Delete\x20User\x20id=','push','waitOnFirstConnect','\x20message\x20json\x20parsing\x20error:\x20','\x20Create\x20User\x20userName=','secret','toUpperCase','call','\x20-\x20will\x20do\x20auto\x20connect\x20when\x20available\x20-\x20however,\x20please\x20verify\x20stream\x20configuration','internal\x20stream\x20policy\x20have\x20been\x20changed\x20-\x20central\x20SCIM\x20Stream\x20must\x20be\x20stopped\x20and\x20corresponding\x20./jetstream\x20folder\x20deleted\x20before\x20startup\x20allowing\x20new\x20policy','\x20-\x20will\x20do\x20auto\x20reconnect\x20when\x20connection\x20becomes\x20available','2202buZmkM','tls','/certs/','map',']\x20initialization\x20error:\x20missing\x20configuration\x20stream.baseUrls','getuniquevalue','reconnectTimeWait','\x20Create\x20userName=','apply','toLowerCase','\x20calling\x20\x22','replaceUsrGrp',']\x20connect\x20error:\x20','\x20Delete\x20User\x20userName=','3199vvveZk','file-not-configured','\x20message\x20error\x20response:\x20','\x20group\x20removal\x20error:\x20','UnableConnectingHost',']\x20client\x20has\x20a\x20stale\x20connection\x20','transports','publisher[','publisher\x20error:\x20none\x20JSON\x20formatted\x20response:\x20','headers','utf-8','\x20error:\x20missing\x20id}','substring','includes','\x20convertedScim20\x20error:\x20','ETIMEDOUT','deliver_policy','onCreate','foldReplacing','\x20message:\x20','\x20with\x20chunks\x20returned\x20errors:\x20',',\x20attributes=','charAt','hasOwnProperty','undefined','createWriteStream','createGroup','User','_autogenerated.cfg','All','respond','reconnecting','mkdirSync','SIGTERM','length','file','parse','tenant','readFileSync','trim','getUsers','Explicit',']\x20error:\x20message\x20must\x20be\x20JSON\x20formatted','publisher\x20response\x20error:\x20','then','consumer_not_found',']\x20subscriber\x20stopped\x20error:\x20','subscribe','jwt','\x20processing\x20incoming\x20message',',false','11HWeXwY','value','\x20Replace\x20User\x20id=','join','consume','replace','\x20done','usePutSoftSync'];a0_0x4ebe=function(){return _0x918521;};return a0_0x4ebe();}import a0_0x15849a from'fold-to-ascii';import a0_0x5517ab from'node:fs';import a0_0x31a0e9 from'node:path';import a0_0xf9b720 from'node:crypto';import*as a0_0x2da0c2 from'./utils.ts';import*as a0_0x370d20 from'./utils-scim.ts';export class Subscriber{constructor(_0x231acd){const _0x576821=a0_0xb16d,_0x6c3bac=_0x231acd,_0x2106a9={};let _0x3fcecc='';for(let _0x544b46=0x0;_0x544b46<_0x6c3bac['logger']['transports'][_0x576821(0x106)];_0x544b46++){if(_0x6c3bac[_0x576821(0x16d)][_0x576821(0xea)][_0x544b46][_0x576821(0x1a2)]===_0x576821(0x107)){_0x3fcecc=_0x6c3bac[_0x576821(0x16d)][_0x576821(0xea)][_0x544b46][_0x576821(0x19d)];break;}}const _0x146a38=''+(_0x3fcecc==='debug'?'\x0a':''),_0x4a81e6=async(_0x1cab3b,_0x2e5da1)=>{const _0x2f3463=_0x576821,_0x3d4a61=_0x2106a9[_0x1cab3b][_0x2f3463(0x1cb)]?.['nats']?.['subject'];let _0x2c390c;try{_0x2c390c=await a0_0x1eb4cc(_0x2e5da1);if(_0x2c390c[_0x2f3463(0x17d)][_0x2f3463(0x1c5)]!==_0x2f3463(0x1ba)){_0x2c390c[_0x2f3463(0x1d3)]();return;}_0x2106a9[_0x1cab3b]['nc']=_0x2c390c,_0x5232e7(_0x1cab3b,_0x2c390c),_0x499d06(_0x1cab3b,_0x2c390c);}catch(_0x3ed5f6){_0x6c3bac[_0x2f3463(0x16d)][_0x2f3463(0x1c8)](_0x6c3bac[_0x2f3463(0x194)]+'['+_0x6c3bac['pluginName']+_0x2f3463(0x16a)+_0x1cab3b+']['+_0x3d4a61+_0x2f3463(0xe2)+_0x3ed5f6[_0x2f3463(0x17e)]+'\x20-\x20will\x20do\x20auto\x20connect\x20when\x20available\x20-\x20however,\x20please\x20verify\x20stream\x20configuration'),_0x2e5da1[_0x2f3463(0x1d6)]=!![];try{_0x2c390c=await a0_0x1eb4cc(_0x2e5da1);if(_0x2c390c[_0x2f3463(0x17d)]['server_name']!=='SCIM\x20Stream'){_0x2c390c['close']();return;}_0x2106a9[_0x1cab3b]['nc']=_0x2c390c,_0x5232e7(_0x1cab3b,_0x2c390c),_0x499d06(_0x1cab3b,_0x2c390c);}catch(_0x3451a1){_0x6c3bac[_0x2f3463(0x16d)][_0x2f3463(0x1c8)](_0x6c3bac[_0x2f3463(0x194)]+'['+_0x6c3bac[_0x2f3463(0x193)]+_0x2f3463(0x16a)+_0x1cab3b+']['+_0x3d4a61+_0x2f3463(0xe2)+_0x3451a1[_0x2f3463(0x17e)]);return;}}_0x6c3bac['logger'][_0x2f3463(0x129)](_0x6c3bac['gwName']+'['+_0x6c3bac[_0x2f3463(0x193)]+']\x20subscriber['+_0x1cab3b+']['+_0x3d4a61+']\x20connected\x20'+(_0x2e5da1[_0x2f3463(0x1e0)]['ca']?_0x2f3463(0x1e0):'')+'\x20'+_0x2c390c['getServer']()),_0x2c390c['closed']()[_0x2f3463(0x110)](_0x2bc89f=>{const _0x4d451b=_0x2f3463;_0x2bc89f&&_0x6c3bac[_0x4d451b(0x16d)][_0x4d451b(0x1c8)](_0x6c3bac['gwName']+'['+_0x6c3bac[_0x4d451b(0x193)]+_0x4d451b(0x16a)+_0x1cab3b+']['+_0x3d4a61+_0x4d451b(0x170)+_0x2bc89f['message']);});};this[_0x576821(0x1a9)]=async(_0x33e51c,_0x16bb18)=>{const _0x129325=_0x576821;if(!_0x16bb18?.[_0x129325(0x16b)]){_0x6c3bac[_0x129325(0x16d)][_0x129325(0x1c8)](_0x6c3bac[_0x129325(0x194)]+'['+_0x6c3bac['pluginName']+']\x20subscriber['+_0x33e51c+_0x129325(0x195));return;}if(!_0x16bb18?.['nats']?.[_0x129325(0x109)]){_0x6c3bac['logger'][_0x129325(0x1c8)](_0x6c3bac[_0x129325(0x194)]+'['+_0x6c3bac[_0x129325(0x193)]+']\x20subscriber['+_0x33e51c+_0x129325(0x1aa));return;}if(!_0x16bb18?.[_0x129325(0x16b)]?.[_0x129325(0x12d)]){_0x6c3bac['logger'][_0x129325(0x1c8)](_0x6c3bac[_0x129325(0x194)]+'['+_0x6c3bac['pluginName']+_0x129325(0x16a)+_0x33e51c+_0x129325(0x175));return;}if(!_0x16bb18?.['certificate']?.['ca']){_0x6c3bac[_0x129325(0x16d)][_0x129325(0x1c8)](_0x6c3bac[_0x129325(0x194)]+'['+_0x6c3bac[_0x129325(0x193)]+_0x129325(0x16a)+_0x33e51c+']\x20initialization\x20error:\x20missing\x20certificate\x20configuration');return;}if(!_0x16bb18[_0x129325(0x128)]||!Array['isArray'](_0x16bb18[_0x129325(0x128)])||_0x16bb18['baseUrls'][_0x129325(0x106)]<0x1){_0x6c3bac[_0x129325(0x16d)][_0x129325(0x1c8)](_0x6c3bac[_0x129325(0x194)]+'['+_0x6c3bac[_0x129325(0x193)]+_0x129325(0x16a)+_0x33e51c+_0x129325(0x1e3));return;}if(!_0x16bb18[_0x129325(0x11e)]){const _0x4f1cc4=_0x16bb18?.[_0x129325(0x16b)]?.[_0x129325(0x12d)][_0x129325(0x1da)]();if(_0x4f1cc4[_0x129325(0x180)](_0x129325(0x1b8)))_0x16bb18[_0x129325(0x11e)]=!![];}const _0x2794d6={};try{let _0x3038fa=a0_0x31a0e9[_0x129325(0x11a)](_0x6c3bac[_0x129325(0x19e)],_0x129325(0x1e1),_0x16bb18?.['certificate']?.['ca']||_0x129325(0xe5));(_0x16bb18?.[_0x129325(0x173)]?.['ca']?.['startsWith']('/')||_0x16bb18?.[_0x129325(0x173)]?.['ca']?.[_0x129325(0xf1)]('\x5c'))&&(_0x3038fa=_0x16bb18[_0x129325(0x173)]['ca']),_0x2794d6['ca']=[a0_0x5517ab[_0x129325(0x10a)](_0x3038fa)],_0x2794d6[_0x129325(0x1ca)]=!![];}catch(_0x1ba58a){_0x6c3bac[_0x129325(0x16d)][_0x129325(0x1c8)](_0x6c3bac['gwName']+'['+_0x6c3bac['pluginName']+_0x129325(0x16a)+_0x33e51c+_0x129325(0x196)+_0x1ba58a['message']);return;}const _0x5ecf52={},_0xd0664=new TextEncoder()[_0x129325(0x171)](_0x16bb18?.[_0x129325(0x16b)]?.[_0x129325(0x1d9)]),_0x40ca4c=_0x16bb18?.[_0x129325(0x16b)]?.['jwt'];_0x5ecf52['authenticator']=jwtAuthenticator(_0x40ca4c,_0xd0664),_0x5ecf52[_0x129325(0x1c9)]=_0x16bb18[_0x129325(0x128)],_0x5ecf52[_0x129325(0x1e0)]=_0x2794d6,_0x5ecf52[_0x129325(0x1d6)]=![],_0x5ecf52[_0x129325(0x1be)]=!![],_0x5ecf52[_0x129325(0x1e5)]=0x3e8*0xa,_0x5ecf52['maxReconnectAttempts']=-0x1,_0x5ecf52[_0x129325(0x176)]=0x2*0x3c*0x3e8,_0x5ecf52[_0x129325(0x179)]=0x5,_0x5ecf52['debug']=![],_0x2106a9[_0x33e51c]={},_0x2106a9[_0x33e51c][_0x129325(0x1cb)]=_0x16bb18,_0x2106a9[_0x33e51c]['nc']=undefined,_0x2106a9[_0x33e51c][_0x129325(0x1c4)]=undefined,_0x4a81e6(_0x33e51c,_0x5ecf52);};const _0x499d06=async(_0x5f05b4,_0x2fe531)=>{const _0x73c459=_0x576821,_0x55455f=_0x2106a9[_0x5f05b4][_0x73c459(0x1cb)],_0x3c536d=_0x55455f?.[_0x73c459(0x16b)]?.[_0x73c459(0x12d)];if(!_0x2fe531){_0x6c3bac['logger'][_0x73c459(0x1c8)](_0x6c3bac['gwName']+'['+_0x6c3bac[_0x73c459(0x193)]+_0x73c459(0x16a)+_0x5f05b4+']['+_0x3c536d+_0x73c459(0x191));return;}const _0x58d20e=async(_0x4b165b,_0x5ab24c)=>{const _0x29b91c=_0x73c459;try{_0x6c3bac[_0x29b91c(0x16d)]['info'](_0x4b165b+_0x29b91c(0x17a)+_0x5ab24c);let _0xdb60de;try{if(_0x55455f[_0x29b91c(0x161)]&&Array[_0x29b91c(0x17b)](_0x55455f[_0x29b91c(0x161)]))for(let _0x1d3b3b=0x0;_0x1d3b3b<_0x55455f[_0x29b91c(0x161)]['length'];_0x1d3b3b++){const _0x4683a8=_0x55455f[_0x29b91c(0x161)][_0x1d3b3b];if(!_0x4683a8[_0x29b91c(0x198)]||!_0x4683a8['from'][_0x29b91c(0xf1)]('.')||!_0x4683a8['to']||!_0x4683a8['to']['includes']('.'))continue;const _0x1d95ee=new RegExp('@'+_0x4683a8[_0x29b91c(0x198)]+'\x22','gi');_0x5ab24c=_0x5ab24c[_0x29b91c(0x11c)](_0x1d95ee,'@'+_0x4683a8['to']+'\x22');}_0xdb60de=JSON[_0x29b91c(0x108)](_0x5ab24c);}catch(_0x20ffee){_0x6c3bac[_0x29b91c(0x16d)]['error'](_0x4b165b+_0x29b91c(0x1d7)+_0x20ffee[_0x29b91c(0x17e)]+_0x29b91c(0xf7)+_0x5ab24c),_0x6c3bac['logger'][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x11d)+_0x146a38);return;}const _0x14bf89=_0xdb60de['user'];if(!_0x14bf89){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x1c8)](_0x4b165b+_0x29b91c(0x153)+JSON['stringify'](_0xdb60de)),_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+'\x20done'+_0x146a38);return;}if(!_0x14bf89[_0x29b91c(0x166)]){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x1c8)](_0x4b165b+_0x29b91c(0x125)+JSON[_0x29b91c(0x197)](_0xdb60de)),_0x6c3bac[_0x29b91c(0x16d)]['debug'](_0x4b165b+_0x29b91c(0x11d)+_0x146a38);return;}delete _0x14bf89[_0x29b91c(0x14f)];let _0x5c7ee4;_0x14bf89['id']&&(_0x5c7ee4=_0x14bf89['id'],delete _0x14bf89['id']);let _0x127398;_0x14bf89[_0x29b91c(0xf5)]&&(_0x127398=a0_0x2da0c2['copyObj'](_0x14bf89['onCreate']),delete _0x14bf89['onCreate']);await _0x11ce40(_0x5f05b4,_0x14bf89);const _0xf9ab78=_0x14bf89[_0x29b91c(0x166)];let _0x2d3a22,_0x311b53;try{_0x2d3a22=await _0x53ada3(_0x5f05b4,_0x29b91c(0x166),_0xf9ab78);}catch(_0x2f916f){_0x6c3bac['logger'][_0x29b91c(0x1c8)](_0x4b165b+_0x29b91c(0x12f)+_0x2f916f[_0x29b91c(0x17e)]),_0x6c3bac[_0x29b91c(0x16d)]['debug'](_0x4b165b+'\x20done'+_0x146a38);const _0x47c51c=[_0x29b91c(0xe8),'UnableConnectingService',_0x29b91c(0x1b6),_0x29b91c(0x124),_0x29b91c(0xf3),'timeout'];for(const _0x6f66bb in _0x47c51c){if(_0x2f916f[_0x29b91c(0x17e)][_0x29b91c(0xf1)](_0x6f66bb))return!![];}return;}if(!_0x55455f[_0x29b91c(0x16f)]){let _0x5ae404=![];if(_0xdb60de[_0x29b91c(0x13e)]&&Array[_0x29b91c(0x17b)](_0xdb60de[_0x29b91c(0x13e)]))for(let _0x3d883b=0x0;_0x3d883b<_0xdb60de[_0x29b91c(0x13e)]['length'];_0x3d883b++){const _0x11449a=_0xdb60de[_0x29b91c(0x13e)][_0x3d883b];_0x11449a[_0x29b91c(0x1c6)][_0x29b91c(0x180)](_0x29b91c(0x1b2))&&(_0x11449a[_0x29b91c(0x1c6)]=_0x29b91c(0x131),Array[_0x29b91c(0x17b)](_0x11449a[_0x29b91c(0x118)])?(_0x11449a[_0x29b91c(0x118)][0x0]['id']=_0x11449a[_0x29b91c(0x118)][0x0]['value'],_0x11449a['value'][0x0][_0x29b91c(0x1ad)]=_0x11449a[_0x29b91c(0x118)][0x0][_0x29b91c(0x18a)]+_0x29b91c(0x190)+_0x11449a['value'][0x0][_0x29b91c(0x118)],delete _0x11449a[_0x29b91c(0x118)][0x0][_0x29b91c(0x118)],delete _0x11449a['value'][0x0][_0x29b91c(0x18a)]):_0x11449a['value']=[{'id':_0x11449a[_0x29b91c(0x118)],'display':_0x11449a['value']}],delete _0x11449a['typeId'],_0x5ae404=!![]);}if(_0x14bf89[_0x29b91c(0x1b2)]&&Array[_0x29b91c(0x17b)](_0x14bf89['roles'])&&_0x14bf89[_0x29b91c(0x1b2)]['length']>0x0){if(!_0x14bf89[_0x29b91c(0x131)])_0x14bf89[_0x29b91c(0x131)]=[];if(!Array[_0x29b91c(0x17b)](_0x14bf89[_0x29b91c(0x131)]))_0x14bf89[_0x29b91c(0x131)]=[];for(let _0x36fb19=0x0;_0x36fb19<_0x14bf89['roles'][_0x29b91c(0x106)];_0x36fb19++){const _0x26b22d={},_0x3d906d=_0x14bf89['roles'][_0x36fb19];_0x26b22d['value']=_0x3d906d[_0x29b91c(0x118)],_0x26b22d[_0x29b91c(0x1ad)]=_0x3d906d[_0x29b91c(0x18a)]+'\x20-\x20'+_0x3d906d['display'],_0x14bf89[_0x29b91c(0x131)][_0x29b91c(0x1d5)](_0x26b22d);}delete _0x14bf89[_0x29b91c(0x1b2)],_0x5ae404=!![];}if(_0x5ae404)_0x6c3bac[_0x29b91c(0x16d)]['debug'](_0x4b165b+'\x20roles\x20converted\x20to\x20groups:\x20'+JSON['stringify'](_0xdb60de));}if(!_0x2d3a22){if(_0xdb60de[_0x29b91c(0x156)]===_0x29b91c(0x183)){_0x6c3bac[_0x29b91c(0x16d)]['debug'](_0x4b165b+_0x29b91c(0xe3)+_0xf9ab78+_0x29b91c(0x1b0)),_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x11d)+_0x146a38);return;}if(_0x55455f['modifyOnly']&&_0x55455f[_0x29b91c(0x148)]===!![]){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x1e6)+_0xf9ab78+_0x29b91c(0x12c)),_0x6c3bac[_0x29b91c(0x16d)]['debug'](_0x4b165b+_0x29b91c(0x11d)+_0x146a38);return;}if(Object[_0x29b91c(0x141)][_0x29b91c(0xfb)]['call'](_0x14bf89,_0x29b91c(0x163))){if(typeof _0x14bf89[_0x29b91c(0x163)]===_0x29b91c(0x1b5)){const _0x564718=_0x14bf89[_0x29b91c(0x163)][_0x29b91c(0x1e8)]();if(_0x564718==='true')_0x14bf89[_0x29b91c(0x163)]=!![];else{if(_0x564718==='false')_0x14bf89['active']=![];}}if(_0x14bf89[_0x29b91c(0x163)]===![]){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x1e6)+_0xf9ab78+_0x29b91c(0x13a)),_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x11d)+_0x146a38);return;}}_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x1d8)+_0xf9ab78);const _0x4f6e28=a0_0x2da0c2[_0x29b91c(0x168)](_0x14bf89);try{delete _0x4f6e28[_0x29b91c(0x131)];!_0x4f6e28[_0x29b91c(0x133)]&&_0x55455f['generateUserPassword']&&_0x55455f['generateUserPassword']===!![]&&(_0x4f6e28[_0x29b91c(0x133)]=a0_0x2da0c2[_0x29b91c(0x172)](0xf));if(_0x127398||_0x5c7ee4){if(_0x127398)for(const _0x203075 in _0x127398){_0x4f6e28[_0x203075]=_0x127398[_0x203075];}if(_0x5c7ee4)_0x4f6e28['id']=_0x5c7ee4;await _0x11ce40(_0x5f05b4,_0x4f6e28);}await _0x6c3bac[_0x29b91c(0x15b)](_0x5f05b4,_0x4f6e28),_0x14bf89[_0x29b91c(0x131)]&&Array[_0x29b91c(0x17b)](_0x14bf89[_0x29b91c(0x131)])&&_0x14bf89[_0x29b91c(0x131)][_0x29b91c(0x106)]>0x0&&(_0x311b53=await _0x53ada3(_0x5f05b4,_0x29b91c(0x166),_0xf9ab78));}catch(_0x24e317){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x1c8)](_0x4b165b+_0x29b91c(0x157)+JSON['stringify'](_0x4f6e28)+'\x20error:\x20'+_0x24e317[_0x29b91c(0x17e)]+'}'),_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+'\x20done'+_0x146a38);return;}}if(_0x2d3a22||_0x311b53){if(_0xdb60de['activityOperation']===_0x29b91c(0x183)){if(_0x55455f[_0x29b91c(0x148)]&&_0x55455f['modifyOnly']===!![]){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+'\x20Delete\x20User\x20id='+_0x2d3a22+_0x29b91c(0x189)),_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x11d)+_0x146a38);return;}_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x1d4)+_0x2d3a22);try{await _0x6c3bac[_0x29b91c(0x183)](_0x5f05b4,_0x2d3a22);}catch(_0x28a64d){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x1c8)](_0x4b165b+_0x29b91c(0x1d4)+_0x2d3a22+_0x29b91c(0x130)+_0x28a64d[_0x29b91c(0x17e)]+'}'),_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x11d)+_0x146a38);return;}}else{if(_0x311b53)_0x2d3a22=_0x311b53;_0x6c3bac['logger'][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x119)+_0x2d3a22);try{await _0x6c3bac[_0x29b91c(0x1ea)](_0x29b91c(0x1c7),_0x5f05b4,_0x2d3a22,_0x14bf89,_0x55455f['usePutSoftSync']);}catch(_0x8caade){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x1c8)](_0x4b165b+_0x29b91c(0x119)+_0x2d3a22+'\x20error:\x20'+_0x8caade[_0x29b91c(0x17e)]),_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+'\x20done'+_0x146a38);return;}if(_0x55455f[_0x29b91c(0x11e)]){const [_0x35d644,_0x506944]=a0_0x370d20[_0x29b91c(0x177)]({'Operations':_0xdb60de['Operations']});if(_0x506944){_0x6c3bac['logger'][_0x29b91c(0x1c8)](_0x4b165b+_0x29b91c(0x119)+_0x2d3a22+_0x29b91c(0xf2)+_0x506944[_0x29b91c(0x17e)]),_0x6c3bac[_0x29b91c(0x16d)]['debug'](_0x4b165b+_0x29b91c(0x11d)+_0x146a38);return;}const _0x31c0a9=[];if(_0x35d644[_0x29b91c(0x1b2)]&&Array[_0x29b91c(0x17b)](_0x35d644['roles']))for(let _0x1b5da8=0x0;_0x1b5da8<_0x35d644[_0x29b91c(0x1b2)][_0x29b91c(0x106)];_0x1b5da8++){_0x35d644[_0x29b91c(0x1b2)][_0x1b5da8][_0x29b91c(0x1a6)]&&_0x35d644[_0x29b91c(0x1b2)][_0x1b5da8][_0x29b91c(0x1a6)]===_0x29b91c(0x178)&&_0x31c0a9[_0x29b91c(0x1d5)](_0x35d644['roles'][_0x1b5da8]);}if(_0x31c0a9['length']>0x0)try{await _0x6c3bac[_0x29b91c(0x1cd)](_0x5f05b4,_0x2d3a22,{'roles':_0x31c0a9});}catch(_0x5a9285){_0x6c3bac['logger'][_0x29b91c(0x1c8)](_0x4b165b+_0x29b91c(0x119)+_0x2d3a22+_0x29b91c(0x19f)+_0x5a9285['message']);}const _0xac8fc6=[];if(_0x35d644[_0x29b91c(0x131)]&&Array[_0x29b91c(0x17b)](_0x35d644[_0x29b91c(0x131)]))for(let _0x1b72af=0x0;_0x1b72af<_0x35d644[_0x29b91c(0x131)]['length'];_0x1b72af++){_0x35d644[_0x29b91c(0x131)][_0x1b72af][_0x29b91c(0x1a6)]&&_0x35d644[_0x29b91c(0x131)][_0x1b72af][_0x29b91c(0x1a6)]==='delete'&&_0xac8fc6['push'](_0x35d644[_0x29b91c(0x131)][_0x1b72af]);}if(_0xac8fc6[_0x29b91c(0x106)]>0x0)for(let _0xae40ca=0x0;_0xae40ca<_0xac8fc6[_0x29b91c(0x106)];_0xae40ca++){try{await _0x6c3bac[_0x29b91c(0x155)](_0x5f05b4,_0xac8fc6[_0xae40ca]['id'],{'members':[{'operation':'delete','value':_0x2d3a22}]});}catch(_0x2d9e6a){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x1c8)](_0x4b165b+'\x20Replace\x20User\x20id='+_0x2d3a22+_0x29b91c(0xe7)+_0x2d9e6a['message']);}}}if(_0x55455f['deleteUserOnLastGroupRoleRemoval']&&_0xdb60de[_0x29b91c(0x156)]===_0x29b91c(0x1cd)){if(_0x14bf89[_0x29b91c(0x131)]&&Array['isArray'](_0x14bf89['groups'])&&_0x14bf89[_0x29b91c(0x131)][_0x29b91c(0x106)]===0x0){if(_0x14bf89['roles']&&Array[_0x29b91c(0x17b)](_0x14bf89[_0x29b91c(0x1b2)])&&_0x14bf89[_0x29b91c(0x1b2)][_0x29b91c(0x106)]===0x0){if(_0xdb60de[_0x29b91c(0x13e)]&&Array[_0x29b91c(0x17b)](_0xdb60de[_0x29b91c(0x13e)])&&_0xdb60de[_0x29b91c(0x13e)][_0x29b91c(0x106)]>0x0){let _0x3afc39=![];for(let _0x4d5bfb=0x0;_0x4d5bfb<_0xdb60de[_0x29b91c(0x13e)]['length'];_0x4d5bfb++){const _0x34134a=_0xdb60de[_0x29b91c(0x13e)][_0x4d5bfb];if(_0x34134a['op']==='remove'){if(_0x34134a['path']){if(_0x34134a[_0x29b91c(0x1c6)][_0x29b91c(0x180)]('roles')&&_0x34134a[_0x29b91c(0x11f)]){_0x3afc39=!![];break;}else{if(_0x34134a['path']==='groups'){_0x3afc39=!![];break;}}}}}if(_0x3afc39){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x1d4)+_0x2d3a22);try{await _0x6c3bac[_0x29b91c(0x183)](_0x5f05b4,_0x2d3a22);}catch(_0x1872a3){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x1c8)](_0x4b165b+'\x20Delete\x20User\x20id='+_0x2d3a22+_0x29b91c(0x130)+_0x1872a3[_0x29b91c(0x17e)]+'}'),_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+'\x20done'+_0x146a38);return;}}}}}}}}_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x129)](_0x4b165b+_0x29b91c(0x11d)+_0x146a38);}catch(_0x54c35d){_0x6c3bac[_0x29b91c(0x16d)][_0x29b91c(0x1c8)](_0x6c3bac[_0x29b91c(0x194)]+'['+_0x6c3bac['pluginName']+_0x29b91c(0x16a)+_0x5f05b4+']['+_0x3c536d+_0x29b91c(0x12b)+_0x54c35d[_0x29b91c(0x17e)]+'\x20=>\x20subscriber\x20not\x20activated'+_0x146a38);}},_0x381681=jetstream(_0x2fe531),_0x312a19=(_0x73c459(0x1a8)+_0x6c3bac[_0x73c459(0x193)]+'_'+_0x5f05b4)[_0x73c459(0x182)]('*','#')[_0x73c459(0x182)]('>','##')[_0x73c459(0x182)]('.','_'),_0x42cd1c=_0x3c536d[_0x73c459(0x1c3)]('.')[0x0][_0x73c459(0x1da)]()==='GW',_0xdfe09a=async()=>{const _0x3b5637=_0x73c459;try{let _0x3fcf66;const _0x10bea2=''+_0x55455f?.[_0x3b5637(0x16b)]?.['tenant'],_0x1d79dd=await jetstreamManager(_0x2fe531),_0x10140c=async()=>{const _0x5e5ad1=_0x3b5637;let _0x38f7cc;try{_0x38f7cc=await _0x381681[_0x5e5ad1(0x1bf)][_0x5e5ad1(0x18e)](_0x10bea2,_0x312a19);}catch(_0x3c3663){const _0xd49452={'durable_name':_0x312a19,'deliver_policy':DeliverPolicy[_0x5e5ad1(0x101)],'ack_policy':AckPolicy[_0x5e5ad1(0x10d)],'filter_subject':_0x3c536d};await _0x1d79dd['consumers']['add'](_0x10bea2,_0xd49452),_0x38f7cc=await _0x381681[_0x5e5ad1(0x1bf)][_0x5e5ad1(0x18e)](_0x10bea2,_0x312a19);}if(_0x38f7cc?.[_0x5e5ad1(0x1a3)]?.[_0x5e5ad1(0x1cb)]?.[_0x5e5ad1(0xf4)]!==_0x5e5ad1(0x139))throw new Error(_0x5e5ad1(0x1dd));_0x38f7cc?.[_0x5e5ad1(0x1a3)]?.['config']?.[_0x5e5ad1(0x145)]!==_0x3c536d&&(await _0x1d79dd[_0x5e5ad1(0x1bf)]['update'](_0x10bea2,_0x312a19,{'filter_subject':_0x3c536d}),_0x38f7cc=await _0x381681[_0x5e5ad1(0x1bf)][_0x5e5ad1(0x18e)](_0x10bea2,_0x312a19)),_0x3fcf66=await _0x38f7cc[_0x5e5ad1(0x11b)]({'max_messages':0x64}),_0x1d1616(_0x3fcf66);},_0x1d1616=async _0x2086ce=>{const _0x2df83e=_0x3b5637;for await(const _0x440d13 of await _0x2086ce[_0x2df83e(0x13c)]()){switch(_0x440d13[_0x2df83e(0x18a)]){case _0x2df83e(0x111):_0x6c3bac[_0x2df83e(0x16d)][_0x2df83e(0x17d)](_0x6c3bac[_0x2df83e(0x194)]+'['+_0x6c3bac['pluginName']+_0x2df83e(0x16a)+_0x5f05b4+']['+_0x3c536d+']\x20client\x20consumer\x20reinitiated\x20because\x20of\x20'+_0x440d13[_0x2df83e(0x18a)]),_0x10140c();return;}}};await _0x10140c();let _0x560173=-0x1;do{for await(const _0x477f02 of _0x3fcf66){if(!_0x477f02[_0x3b5637(0xed)]||!_0x477f02[_0x3b5637(0xed)][_0x3b5637(0x18e)](_0x3b5637(0x159))){_0x477f02[_0x3b5637(0x1ae)]();continue;}_0x560173=_0x3fcf66[_0x3b5637(0x162)]();const _0x4b6e1f=_0x6c3bac['gwName']+'['+_0x6c3bac[_0x3b5637(0x193)]+_0x3b5637(0x16a)+_0x5f05b4+']['+_0x477f02['subject']+']['+_0x560173+']['+(_0x477f02['headers']?_0x477f02[_0x3b5637(0xed)][_0x3b5637(0x18e)](_0x3b5637(0x159)):'')+']',_0x560198=_0x477f02['string'](),_0x46ddd9=await _0x58d20e(_0x4b6e1f,_0x560198);if(!_0x46ddd9||_0x46ddd9!==!![])_0x477f02['ack']();else _0x6c3bac[_0x3b5637(0x16d)][_0x3b5637(0x1c8)](_0x4b6e1f+_0x3b5637(0x158));if(_0x560173<0x1)break;}}while(_0x560173===0x0);}catch(_0x3ae582){_0x6c3bac[_0x3b5637(0x16d)]['error'](_0x6c3bac['gwName']+'['+_0x6c3bac['pluginName']+']\x20subscriber['+_0x5f05b4+']['+_0x3c536d+_0x3b5637(0x112)+_0x3ae582['message']);}},_0x5dd8c3=async()=>{const _0x20d9c3=_0x73c459,_0xaf7598=_0x2fe531[_0x20d9c3(0x113)](_0x3c536d,{'max':0x64});for await(const _0xf36dbf of _0xaf7598){if(!_0xf36dbf[_0x20d9c3(0xed)]||!_0xf36dbf['headers']['get']('Msg-Id'))continue;let _0x5351c,_0x1967da;try{try{_0x5351c=JSON[_0x20d9c3(0x108)](_0xf36dbf[_0x20d9c3(0x1b5)]());}catch(_0x24ca89){const _0x466523=_0x20d9c3(0x15d);_0x6c3bac[_0x20d9c3(0x16d)][_0x20d9c3(0x1c8)](_0x6c3bac[_0x20d9c3(0x194)]+'['+_0x6c3bac[_0x20d9c3(0x193)]+_0x20d9c3(0x16a)+_0x5f05b4+']['+_0x3c536d+']\x20'+_0x466523+':\x20'+_0xf36dbf[_0x20d9c3(0x1b5)]());throw new Error(_0x466523);}if(!_0x5351c||!_0x5351c['func']){const _0x23d771='subscriber\x20message\x20error:\x20message\x20missing\x20method';this[_0x20d9c3(0x1b1)]['logger'][_0x20d9c3(0x1c8)](this[_0x20d9c3(0x1b1)]['gwName']+'['+this[_0x20d9c3(0x1b1)][_0x20d9c3(0x193)]+']\x20subscriber['+_0x5f05b4+']['+_0x3c536d+']\x20'+_0x23d771+':\x20'+_0x5351c);throw new Error(_0x23d771);}!Object[_0x20d9c3(0x141)]['hasOwnProperty'][_0x20d9c3(0x1db)](_0x5351c,_0x20d9c3(0x174))&&(_0x5351c[_0x20d9c3(0x174)]=_0x20d9c3(0xfc));if(_0x5351c[_0x20d9c3(0x174)]!==_0x5f05b4){const _0x29c9b5='subscriber\x20message\x20error:\x20message\x20baseEntity='+_0x5351c[_0x20d9c3(0x174)]+'\x20not\x20equal\x20subscriber\x20configured\x20baseEntity='+_0x5f05b4;_0x6c3bac[_0x20d9c3(0x16d)]['error'](_0x6c3bac[_0x20d9c3(0x194)]+'['+_0x6c3bac[_0x20d9c3(0x193)]+_0x20d9c3(0x16a)+_0x5f05b4+']['+_0x3c536d+']\x20'+_0x29c9b5);throw new Error(_0x29c9b5);}_0x1967da=_0x6c3bac[_0x20d9c3(0x194)]+'['+_0x6c3bac[_0x20d9c3(0x193)]+_0x20d9c3(0x16a)+_0x5f05b4+']['+_0xf36dbf['subject']+']['+(_0xf36dbf[_0x20d9c3(0xed)]?_0xf36dbf[_0x20d9c3(0xed)][_0x20d9c3(0x18e)]('Msg-Id'):'')+']',_0x6c3bac[_0x20d9c3(0x16d)]['debug'](_0x1967da+_0x20d9c3(0x115));let _0x2eac7b,_0x2eddee;switch(_0x5351c[_0x20d9c3(0x1c2)]){case _0x20d9c3(0x10c):if(!_0x5351c[_0x20d9c3(0x149)][_0x20d9c3(0x187)]&&_0x5351c[_0x20d9c3(0x149)][_0x20d9c3(0x1a1)]&&_0x5351c[_0x20d9c3(0x149)]['rawFilter'][_0x20d9c3(0xf1)](_0x20d9c3(0x152))){const _0x14d8c0=_0x5351c[_0x20d9c3(0x149)][_0x20d9c3(0x1a1)][_0x20d9c3(0x1c3)](_0x20d9c3(0x152));let _0xcc0a4d=[];for(let _0x168cf5=0x0;_0x168cf5<_0x14d8c0[_0x20d9c3(0x106)];_0x168cf5++){_0x14d8c0[_0x168cf5]=_0x14d8c0[_0x168cf5][_0x20d9c3(0x11c)](/\(/g,'')[_0x20d9c3(0x11c)](/\)/g,'')[_0x20d9c3(0x10b)]();const _0x53653b=_0x14d8c0[_0x168cf5]['split']('\x20');if(_0x53653b[_0x20d9c3(0x106)]===0x3||_0x53653b['length']>0x2&&_0x53653b[0x2][_0x20d9c3(0x180)]('\x22')&&_0x53653b[_0x53653b['length']-0x1][_0x20d9c3(0x16c)]('\x22')){const _0x20ed2e={};_0x20ed2e[_0x20d9c3(0x167)]=_0x53653b[0x0],_0x20ed2e[_0x20d9c3(0x187)]=_0x53653b[0x1][_0x20d9c3(0x1e8)](),_0x20ed2e[_0x20d9c3(0x118)]=decodeURIComponent(_0x53653b[_0x20d9c3(0x18f)](0x2)[_0x20d9c3(0x11a)]('\x20')[_0x20d9c3(0x11c)](/"/g,'')),_0xcc0a4d[_0x20d9c3(0x1d5)](_0x20ed2e);}else{_0xcc0a4d=[];break;}}if(_0xcc0a4d[_0x20d9c3(0x106)]>0x0){const _0x1bb7f2=async _0x1b01fd=>{const _0x137908=_0x20d9c3;return await _0x6c3bac[_0x5351c['func']](_0x5f05b4,_0x1b01fd,_0x5351c[_0x137908(0x165)],_0x5351c[_0x137908(0x1af)]);},_0x3aad60=0x5,_0x173d22=[];_0x6c3bac[_0x20d9c3(0x16d)][_0x20d9c3(0x129)](_0x1967da+'\x20calling\x20\x22'+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x121));do{const _0x3fa170=_0xcc0a4d[_0x20d9c3(0x199)](0x0,_0x3aad60),_0x2bc681=await Promise[_0x20d9c3(0x16e)](_0x3fa170['map'](_0x1759bc=>_0x1bb7f2(_0x1759bc))),_0x30b986=_0x2bc681[_0x20d9c3(0x13b)](_0x8881d0=>_0x8881d0[_0x20d9c3(0x13c)]===_0x20d9c3(0x19c))[_0x20d9c3(0x1e2)](_0x96d875=>_0x96d875[_0x20d9c3(0x132)][_0x20d9c3(0x17e)]);if(_0x30b986['length']>0x0){const _0x34811d=_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0xf8)+_0x30b986[_0x20d9c3(0x11a)](',\x20');throw new Error(_0x34811d);}const _0x56bc7e=_0x2bc681[_0x20d9c3(0x1e2)](_0x2c7f8b=>_0x2c7f8b?.['value']?.[_0x20d9c3(0x127)]);for(let _0x5d9193=0x0;_0x5d9193<_0x56bc7e[_0x20d9c3(0x106)];_0x5d9193++){Array[_0x20d9c3(0x141)][_0x20d9c3(0x1d5)][_0x20d9c3(0x1e7)](_0x173d22,_0x56bc7e[_0x5d9193]);}}while(_0xcc0a4d[_0x20d9c3(0x106)]>0x0);_0x2eac7b={'Resources':_0x173d22};}}!_0x2eac7b&&(_0x6c3bac['logger'][_0x20d9c3(0x129)](_0x1967da+_0x20d9c3(0x1e9)+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x13f)),_0x2eac7b=await _0x6c3bac[_0x5351c[_0x20d9c3(0x1c2)]](_0x5f05b4,_0x5351c[_0x20d9c3(0x149)],_0x5351c[_0x20d9c3(0x165)],_0x5351c['ctxPassThrough']));if(Array[_0x20d9c3(0x17b)](_0x2eac7b?.[_0x20d9c3(0x127)])){if(_0x5351c?.[_0x20d9c3(0x165)]?.[_0x20d9c3(0x106)]===0x0||_0x5351c?.[_0x20d9c3(0x165)]?.[_0x20d9c3(0xf1)](_0x20d9c3(0x131)))for(let _0x1c816b=0x0;_0x1c816b<_0x2eac7b[_0x20d9c3(0x127)][_0x20d9c3(0x106)];_0x1c816b++){const _0x95ff8b=_0x2eac7b[_0x20d9c3(0x127)][_0x1c816b];if(!_0x95ff8b['id'])break;if(_0x95ff8b['groups'])break;_0x95ff8b[_0x20d9c3(0x131)]=await _0x6c3bac[_0x20d9c3(0x18d)](_0x5f05b4,_0x95ff8b['id'],_0x20d9c3(0x143),_0x5351c['ctxPassThrough']);}}break;case _0x20d9c3(0x143):_0x6c3bac[_0x20d9c3(0x16d)][_0x20d9c3(0x129)](_0x1967da+_0x20d9c3(0x1e9)+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x13f)),_0x2eac7b=await _0x6c3bac[_0x5351c[_0x20d9c3(0x1c2)]](_0x5f05b4,_0x5351c['obj'],_0x5351c[_0x20d9c3(0x165)],_0x5351c[_0x20d9c3(0x192)]);break;case _0x20d9c3(0x15b):_0x6c3bac['logger'][_0x20d9c3(0x129)](_0x1967da+'\x20calling\x20\x22'+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x13f)),_0x2eac7b=await _0x6c3bac[_0x5351c[_0x20d9c3(0x1c2)]](_0x5f05b4,_0x5351c[_0x20d9c3(0x149)],_0x5351c[_0x20d9c3(0x192)]);break;case _0x20d9c3(0xfe):_0x6c3bac[_0x20d9c3(0x16d)][_0x20d9c3(0x129)](_0x1967da+_0x20d9c3(0x1e9)+_0x5351c['func']+_0x20d9c3(0x13f)),_0x2eac7b=await _0x6c3bac[_0x5351c['func']](_0x5f05b4,_0x5351c[_0x20d9c3(0x149)],_0x5351c[_0x20d9c3(0x192)]);break;case _0x20d9c3(0x183):_0x6c3bac[_0x20d9c3(0x16d)][_0x20d9c3(0x129)](_0x1967da+_0x20d9c3(0x1e9)+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x13f)),_0x2eac7b=await _0x6c3bac[_0x5351c[_0x20d9c3(0x1c2)]](_0x5f05b4,_0x5351c['id'],_0x5351c[_0x20d9c3(0x192)]);break;case _0x20d9c3(0x164):_0x6c3bac[_0x20d9c3(0x16d)][_0x20d9c3(0x129)](_0x1967da+_0x20d9c3(0x1e9)+_0x5351c['func']+'\x22\x20and\x20awaiting\x20result'),_0x2eac7b=await _0x6c3bac[_0x5351c[_0x20d9c3(0x1c2)]](_0x5f05b4,_0x5351c['id'],_0x5351c[_0x20d9c3(0x192)]);break;case'modifyUser':_0x6c3bac[_0x20d9c3(0x16d)][_0x20d9c3(0x129)](_0x1967da+'\x20calling\x20\x22'+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x13f)),_0x2eac7b=await _0x6c3bac[_0x5351c[_0x20d9c3(0x1c2)]](_0x5f05b4,_0x5351c['id'],_0x5351c[_0x20d9c3(0x149)],_0x5351c[_0x20d9c3(0x192)]);break;case _0x20d9c3(0x155):_0x6c3bac['logger']['debug'](_0x1967da+_0x20d9c3(0x1e9)+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x13f)),_0x2eac7b=await _0x6c3bac[_0x5351c[_0x20d9c3(0x1c2)]](_0x5f05b4,_0x5351c['id'],_0x5351c[_0x20d9c3(0x149)],_0x5351c[_0x20d9c3(0x192)]);break;case'replaceUsrGrp':_0x6c3bac[_0x20d9c3(0x16d)][_0x20d9c3(0x129)](_0x1967da+'\x20calling\x20\x22'+_0x5351c[_0x20d9c3(0x1c2)]+'\x22\x20and\x20awaiting\x20result'),_0x2eac7b=await _0x6c3bac[_0x5351c[_0x20d9c3(0x1c2)]](_0x5351c[_0x20d9c3(0x160)],_0x5f05b4,_0x5351c['id'],_0x5351c['obj'],_0x55455f[_0x20d9c3(0x11e)],_0x5351c[_0x20d9c3(0x192)]);break;case'postApi':_0x6c3bac['logger'][_0x20d9c3(0x129)](_0x1967da+_0x20d9c3(0x1e9)+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x13f)),_0x2eac7b=await _0x6c3bac[_0x5351c['func']](_0x5f05b4,_0x5351c[_0x20d9c3(0x149)],_0x5351c['ctxPassThrough']);break;case'putApi':_0x6c3bac[_0x20d9c3(0x16d)]['debug'](_0x1967da+_0x20d9c3(0x1e9)+_0x5351c[_0x20d9c3(0x1c2)]+'\x22\x20and\x20awaiting\x20result'),_0x2eac7b=await _0x6c3bac[_0x5351c[_0x20d9c3(0x1c2)]](_0x5f05b4,_0x5351c['id'],_0x5351c[_0x20d9c3(0x149)],_0x5351c[_0x20d9c3(0x192)]);break;case'patchApi':_0x6c3bac[_0x20d9c3(0x16d)][_0x20d9c3(0x129)](_0x1967da+_0x20d9c3(0x1e9)+_0x5351c['func']+'\x22\x20and\x20awaiting\x20result'),_0x2eac7b=await _0x6c3bac[_0x5351c[_0x20d9c3(0x1c2)]](_0x5f05b4,_0x5351c['id'],_0x5351c['obj'],_0x5351c[_0x20d9c3(0x192)]);break;case _0x20d9c3(0x169):_0x6c3bac[_0x20d9c3(0x16d)][_0x20d9c3(0x129)](_0x1967da+'\x20calling\x20\x22'+_0x5351c[_0x20d9c3(0x1c2)]+'\x22\x20and\x20awaiting\x20result'),_0x2eac7b=await _0x6c3bac[_0x5351c['func']](_0x5f05b4,_0x5351c['id'],_0x5351c[_0x20d9c3(0x15e)],_0x5351c[_0x20d9c3(0x149)],_0x5351c['ctxPassThrough']);break;case _0x20d9c3(0x1a0):_0x6c3bac[_0x20d9c3(0x16d)]['debug'](_0x1967da+_0x20d9c3(0x1e9)+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x13f)),_0x2eac7b=await _0x6c3bac[_0x5351c['func']](_0x5f05b4,_0x5351c['id'],_0x5351c[_0x20d9c3(0x192)]);break;default:_0x2eddee='subscriber\x20message\x20error:\x20handle\x20\x27'+_0x5351c['func']+_0x20d9c3(0x1a5),_0x6c3bac[_0x20d9c3(0x16d)]['error'](_0x1967da+'\x20'+_0x2eddee);throw new Error(_0x2eddee);}if(!_0x2eac7b)_0x2eac7b=null;const _0x32abd1=JSON['stringify'](_0x2eac7b);_0xf36dbf[_0x20d9c3(0x102)](_0x32abd1),_0x6c3bac['logger'][_0x20d9c3(0x17d)](_0x1967da+_0x20d9c3(0x1d2)+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x17f)+(_0x5351c[_0x20d9c3(0x149)]?JSON['stringify'](_0x5351c[_0x20d9c3(0x149)]):'')+_0x20d9c3(0x154)+(_0x5351c['id']?_0x5351c['id']:'')+_0x20d9c3(0xf9)+(_0x5351c[_0x20d9c3(0x165)]?_0x5351c[_0x20d9c3(0x165)]:'')+'\x20message\x20response:\x20'+_0x32abd1+_0x146a38);}catch(_0x1c8c48){const _0x175a1f=_0x20d9c3(0x140)+_0x1c8c48[_0x20d9c3(0x17e)]+'\x22,\x22errName\x22:\x22'+_0x1c8c48['name']+'\x22}';_0xf36dbf[_0x20d9c3(0x102)](_0x175a1f),_0x6c3bac['logger'][_0x20d9c3(0x17d)]((_0x1967da||'')+'\x20message\x20handled:\x20'+_0x5351c[_0x20d9c3(0x1c2)]+_0x20d9c3(0x17f)+(_0x5351c['obj']?JSON[_0x20d9c3(0x197)](_0x5351c[_0x20d9c3(0x149)]):'')+_0x20d9c3(0x154)+(_0x5351c['id']?_0x5351c['id']:'')+_0x20d9c3(0xf9)+(_0x5351c[_0x20d9c3(0x165)]?_0x5351c[_0x20d9c3(0x165)]:'')+_0x20d9c3(0xe6)+_0x175a1f+_0x146a38);}}};if(_0x42cd1c)_0x5dd8c3();else _0xdfe09a();},_0x5232e7=async(_0x4ca753,_0x206473)=>{const _0x17b5d6=_0x576821,_0x4641ed=_0x2106a9[_0x4ca753][_0x17b5d6(0x1cb)]?.[_0x17b5d6(0x16b)]?.[_0x17b5d6(0x12d)];let _0x3cc8cc=0x0;for await(const _0x470d49 of _0x206473['status']()){switch(_0x470d49[_0x17b5d6(0x18a)]){case _0x17b5d6(0x1b7):_0x6c3bac['logger']['error'](_0x6c3bac[_0x17b5d6(0x194)]+'['+_0x6c3bac[_0x17b5d6(0x193)]+']\x20subscriber['+_0x4ca753+']['+_0x4641ed+_0x17b5d6(0x14b)+_0x470d49[_0x17b5d6(0x1c1)]+_0x17b5d6(0x1de)),_0x3cc8cc=0x0;break;case _0x17b5d6(0x1be):_0x6c3bac['logger']['info'](_0x6c3bac['gwName']+'['+_0x6c3bac[_0x17b5d6(0x193)]+_0x17b5d6(0x16a)+_0x4ca753+']['+_0x4641ed+_0x17b5d6(0x184)+_0x470d49[_0x17b5d6(0x1c1)]);break;case _0x17b5d6(0x1c8):_0x6c3bac[_0x17b5d6(0x16d)]['error'](_0x6c3bac[_0x17b5d6(0x194)]+'['+_0x6c3bac['pluginName']+_0x17b5d6(0x16a)+_0x4ca753+']['+_0x4641ed+_0x17b5d6(0x1c0)+_0x470d49[_0x17b5d6(0x1c1)]);break;case _0x17b5d6(0x103):_0x3cc8cc+=0x1;_0x3cc8cc%0x1e===0x0&&_0x6c3bac['logger'][_0x17b5d6(0x129)](_0x6c3bac[_0x17b5d6(0x194)]+'['+_0x6c3bac[_0x17b5d6(0x193)]+_0x17b5d6(0x16a)+_0x4ca753+']['+_0x4641ed+']\x20client\x20is\x20attempting\x20to\x20reconnect\x20'+_0x470d49['data']+'\x20(count='+_0x3cc8cc+')');break;case _0x17b5d6(0x151):_0x6c3bac['logger']['debug'](_0x6c3bac[_0x17b5d6(0x194)]+'['+_0x6c3bac[_0x17b5d6(0x193)]+_0x17b5d6(0x16a)+_0x4ca753+']['+_0x4641ed+_0x17b5d6(0xe9)+_0x470d49[_0x17b5d6(0x1c1)]);break;}}};process['on'](_0x576821(0x105),async()=>{const _0x1bc137=_0x576821;for(const _0x8aca66 in _0x2106a9){_0x2106a9[_0x8aca66]['nc']&&!_0x2106a9[_0x8aca66]['nc'][_0x1bc137(0x15a)]()&&await _0x2106a9[_0x8aca66]['nc']['drain']();}}),process['on'](_0x576821(0x146),async()=>{for(const _0xec8e97 in _0x2106a9){_0x2106a9[_0xec8e97]['nc']&&!_0x2106a9[_0xec8e97]['nc']['isClosed']()&&await _0x2106a9[_0xec8e97]['nc']['drain']();}});const _0x53ada3=async(_0x5f5b0e,_0x580281,_0xed166b)=>{const _0x31ca58=_0x576821,_0x5e5b48={'attribute':_0x580281,'operator':'eq','value':_0xed166b,'rawFilter':undefined,'startIndex':undefined,'count':undefined},_0x4f6a70=[_0x580281];if(_0x580281!=='id')_0x4f6a70['push']('id');try{const _0x53cc77=await _0x6c3bac[_0x31ca58(0x10c)](_0x5f5b0e,_0x5e5b48,_0x4f6a70);if(!_0x53cc77||!_0x53cc77['Resources']||!Array['isArray'](_0x53cc77[_0x31ca58(0x127)]))throw new Error('getUsers()\x20getObj='+JSON[_0x31ca58(0x197)](_0x5e5b48)+_0x31ca58(0x1ce));if(_0x53cc77['Resources'][_0x31ca58(0x106)]===0x0)return null;else{if(_0x53cc77[_0x31ca58(0x127)][_0x31ca58(0x106)]>0x2)throw new Error('getUsers()\x20getObj='+JSON['stringify'](_0x5e5b48)+_0x31ca58(0x1bd));else{const _0x3e2914=_0x53cc77[_0x31ca58(0x127)][0x0];if(!_0x3e2914['id'])throw new Error(_0x31ca58(0x1d1)+JSON[_0x31ca58(0x197)](_0x5e5b48)+_0x31ca58(0x19a)+JSON[_0x31ca58(0x197)](_0x3e2914)+_0x31ca58(0xef));return decodeURIComponent(_0x3e2914['id']);}}}catch(_0x3b910f){throw new Error(_0x31ca58(0x1d1)+JSON[_0x31ca58(0x197)](_0x5e5b48)+_0x31ca58(0x130)+_0x3b910f['message']+'}');}},_0x1688ba=_0x15e411=>{const _0x421f81=_0x576821;if(!_0x15e411||typeof _0x15e411!==_0x421f81(0x1b5))return[null,null];_0x15e411=_0x15e411[_0x421f81(0x10b)]();const _0x109335=_0x15e411[_0x421f81(0x122)]('(');if(_0x109335<0x1)return[null,null];if(_0x15e411[_0x421f81(0xf0)](_0x15e411[_0x421f81(0x106)]-0x1)!==')')return[null,null];if(_0x120dce(_0x15e411,'(')!==_0x120dce(_0x15e411,')'))return[null,null];const _0x2a7dd4=_0x15e411[_0x421f81(0xf0)](0x0,_0x109335),_0x5151b9=_0x15e411[_0x421f81(0xf0)](_0x109335+0x1,_0x15e411['length']-0x1);let _0x976cdf=[];const _0x561a0d=_0x5151b9[_0x421f81(0x1c3)](',');let _0x523dac='';for(let _0x2f8eda=0x0;_0x2f8eda<_0x561a0d[_0x421f81(0x106)];_0x2f8eda++){const _0x15f99a=_0x523dac?_0x523dac+','+_0x561a0d[_0x2f8eda]:_0x561a0d[_0x2f8eda],_0x2025de=_0x120dce(_0x15f99a,'('),_0x189285=_0x120dce(_0x15f99a,')');if(_0x2025de===_0x189285)_0x976cdf[_0x421f81(0x1d5)](_0x3ff864(_0x15f99a,'\x22')),_0x523dac='';else{if(_0x523dac)_0x523dac+=','+_0x561a0d[_0x2f8eda];else _0x523dac+=_0x561a0d[_0x2f8eda];}}if(_0x976cdf[_0x421f81(0x106)]===0x0)_0x976cdf=null;return[_0x2a7dd4,_0x976cdf];};function _0x120dce(_0x41fcb1,_0x5cafde){const _0x319cc1=_0x576821;let _0x5662c0=0x0;for(let _0x3a3436=0x0;_0x3a3436<_0x41fcb1[_0x319cc1(0x106)];_0x3a3436++){_0x41fcb1[_0x319cc1(0xfa)](_0x3a3436)===_0x5cafde&&(_0x5662c0+=0x1);}return _0x5662c0;}const _0x3ff864=(_0x1865e4,_0x4975c3)=>{const _0x5edcc7=_0x576821;if(typeof _0x1865e4!==_0x5edcc7(0x1b5)||typeof _0x4975c3!==_0x5edcc7(0x1b5))return _0x1865e4;if(_0x1865e4[_0x5edcc7(0x106)]===0x1)return _0x1865e4;if(_0x4975c3[_0x5edcc7(0x106)]!==0x1)return _0x1865e4;return _0x1865e4=_0x1865e4['trim'](),_0x1865e4['substring'](0x0,0x1)===_0x4975c3&&(_0x1865e4=_0x1865e4[_0x5edcc7(0xf0)](0x1)),_0x1865e4['substring'](_0x1865e4[_0x5edcc7(0x106)]-0x1)===_0x4975c3&&(_0x1865e4=_0x1865e4['substring'](0x0,_0x1865e4[_0x5edcc7(0x106)]-0x1)),_0x1865e4;},_0x2865b8=async(_0x11138d,_0x385a69,_0x2e4f82,_0x2ed6b7)=>{const _0x152a2e=_0x576821;if(!_0x385a69||!_0x2e4f82||!_0x2ed6b7)return null;const [_0x1f905d,_0xd0e325]=_0x1688ba(_0x2ed6b7);if(!_0x1f905d||!_0xd0e325){const _0x2b2585=_0x2ed6b7[_0x152a2e(0x1c3)]('(');if(_0x2b2585[_0x152a2e(0x106)]>0x1){const _0x176e91=[_0x152a2e(0x144),'uppercase','firstn',_0x152a2e(0x126),_0x152a2e(0x11a),_0x152a2e(0x11c),_0x152a2e(0x135),_0x152a2e(0x17c),_0x152a2e(0x1e4)],_0x1192c4=_0x2b2585[0x0][_0x152a2e(0x1e8)]();if(_0x176e91[_0x152a2e(0xf1)](_0x1192c4))return null;}return _0x2ed6b7;}for(let _0x27b3cc=0x0;_0x27b3cc<_0xd0e325[_0x152a2e(0x106)];_0x27b3cc++){if(_0xd0e325[_0x27b3cc][_0x152a2e(0xf0)](0x0,0x1)==='['){const _0x169c07=_0xd0e325[_0x27b3cc][_0x152a2e(0x122)](']');if(_0x169c07<0x0)return null;const _0x5a6ea5=_0xd0e325[_0x27b3cc]['substring'](0x1,_0x169c07),_0x11f5cd=_0x5a6ea5['split']('.');let _0x88f068;for(let _0x19d23d=0x0;_0x19d23d<_0x11f5cd['length'];_0x19d23d++){if(_0x19d23d===0x0)_0x88f068=_0x385a69[_0x11f5cd[_0x19d23d]];else{if(!_0x88f068)return null;_0x88f068=_0x88f068[_0x11f5cd[_0x19d23d]];}}if(!_0x88f068)return null;_0xd0e325[_0x27b3cc]=_0x88f068;}}for(let _0x4b64c2=0x0;_0x4b64c2<_0xd0e325['length'];_0x4b64c2++){const [_0x2ce42b]=_0x1688ba(_0xd0e325[_0x4b64c2]);_0x2ce42b&&(_0xd0e325[_0x4b64c2]=await _0x2865b8(_0x11138d,_0x385a69,_0x2e4f82,_0xd0e325[_0x4b64c2]));}if(_0xd0e325[0x0]===null)return null;switch(_0x1f905d[_0x152a2e(0x1e8)]()){case _0x152a2e(0x144):{if(_0xd0e325[_0x152a2e(0x106)]!==0x1)return null;const [_0x5d5af8]=_0x1688ba(_0xd0e325[0x0]);if(_0x5d5af8)_0xd0e325[0x0]=await _0x2865b8(_0x11138d,_0x385a69,_0x2e4f82,_0x5d5af8);if(_0xd0e325[0x0]===null)return null;return _0xd0e325[0x0]['toLowerCase']();}case'uppercase':{if(_0xd0e325[_0x152a2e(0x106)]!==0x1)return null;const [_0x380077]=_0x1688ba(_0xd0e325[0x0]);if(_0x380077)_0xd0e325[0x0]=await _0x2865b8(_0x11138d,_0x385a69,_0x2e4f82,_0x380077);if(_0xd0e325[0x0]===null)return null;return _0xd0e325[0x0][_0x152a2e(0x1da)]();}case'firstn':{if(_0xd0e325[_0x152a2e(0x106)]!==0x2)return null;const [_0x1a7fb8]=_0x1688ba(_0xd0e325[0x0]);if(_0x1a7fb8)_0xd0e325[0x0]=await _0x2865b8(_0x11138d,_0x385a69,_0x2e4f82,_0x1a7fb8);if(_0xd0e325[0x0]===null)return null;if(isNaN(_0xd0e325[0x1]))return null;return _0xd0e325[0x0][_0x152a2e(0xf0)](0x0,_0xd0e325[0x1]);}case _0x152a2e(0x126):{const [_0x3ae8ec]=_0x1688ba(_0xd0e325[0x0]);if(_0xd0e325['length']<0x2)return null;if(_0x3ae8ec)_0xd0e325[0x0]=await _0x2865b8(_0x11138d,_0x385a69,_0x2e4f82,_0x3ae8ec);if(_0xd0e325[0x0]===null)return null;const _0x4a552a=_0xd0e325[0x1];if(isNaN(_0x4a552a))return null;let _0x46f541;if(_0xd0e325[_0x152a2e(0x106)]===0x3)_0x46f541=_0xd0e325[0x0]['split'](_0xd0e325[0x2]);else _0x46f541=_0x46f541=_0xd0e325[0x0][_0x152a2e(0x1c3)]('\x20');if(_0x4a552a<=_0x46f541[_0x152a2e(0x106)])return _0x46f541[_0x4a552a-0x1];else return'';}case _0x152a2e(0x11c):{const [_0x61582e]=_0x1688ba(_0xd0e325[0x0]);if(_0x61582e)_0xd0e325[0x0]=await _0x2865b8(_0x11138d,_0x385a69,_0x2e4f82,_0x61582e);if(_0xd0e325[0x0]===null)return null;if(_0xd0e325[_0x152a2e(0x106)]!==0x3)return null;return _0xd0e325[0x0][_0x152a2e(0x182)](_0xd0e325[0x1],_0xd0e325[0x2]);}case _0x152a2e(0x135):{if(_0xd0e325[_0x152a2e(0x106)]!==0x1)return null;const [_0x2f909e]=_0x1688ba(_0xd0e325[0x0]);if(_0x2f909e)_0xd0e325[0x0]=await _0x2865b8(_0x11138d,_0x385a69,_0x2e4f82,_0x2f909e);if(_0xd0e325[0x0]===null)return null;return a0_0x15849a[_0x152a2e(0xf6)](_0xd0e325[0x0]);}case _0x152a2e(0x11a):{let _0x322a8a='';for(let _0x376337=0x0;_0x376337<_0xd0e325[_0x152a2e(0x106)];_0x376337++){const [_0x5292ce]=_0x1688ba(_0xd0e325[_0x376337]);if(_0x5292ce)_0xd0e325[_0x376337]=await _0x2865b8(_0x11138d,_0x385a69,_0x2e4f82,_0x5292ce);if(_0xd0e325[_0x376337]===null)return null;_0x322a8a+=_0xd0e325[_0x376337];}return _0x322a8a;}case _0x152a2e(0x17c):{if(_0xd0e325['length']>0x2)return null;const [_0x394058]=_0x1688ba(_0xd0e325[0x0]);if(_0x394058)_0xd0e325[0x0]=await _0x2865b8(_0x11138d,_0x385a69,_0x2e4f82,_0x394058);if(_0xd0e325[0x0]===null)return null;const _0x3a8f3b=parseInt(_0xd0e325[0x0]);if(isNaN(_0x3a8f3b))return null;let _0x4b829d='##doIncrement';_0x4b829d+=','+_0xd0e325[0x0];if(_0xd0e325['length']===0x2&&_0xd0e325[0x1][_0x152a2e(0x1e8)]()===_0x152a2e(0x14c))_0x4b829d+=_0x152a2e(0x1a4);else _0x4b829d+=_0x152a2e(0x116);return _0x4b829d+='##',_0x4b829d;}case _0x152a2e(0x1e4):{if(_0xd0e325[_0x152a2e(0x106)]!==0x1)return null;const [_0x24c038]=_0x1688ba(_0xd0e325[0x0]);if(_0x24c038)_0xd0e325[0x0]=await _0x2865b8(_0x11138d,_0x385a69,_0x2e4f82,_0x24c038);if(_0xd0e325[0x0]===null)return null;let _0x29c337,_0x44c28d=![],_0x4cbf9a='';const _0x315897=_0xd0e325[0x0]['split']('##');if(_0x315897[_0x152a2e(0x106)]>0x2)for(let _0x5bf13c=0x0;_0x5bf13c<_0x315897['length'];_0x5bf13c++){if(_0x315897[_0x5bf13c][_0x152a2e(0x180)]('doIncrement')){const _0x5b921e=_0x315897[_0x5bf13c][_0x152a2e(0x1c3)](',');if(_0x5b921e[_0x152a2e(0x106)]<0x2)return null;const _0x13ec64=parseInt(_0x5b921e[0x1]);if(isNaN(_0x13ec64))return null;_0x4cbf9a='##'+_0x315897[_0x5bf13c]+'##',_0x29c337=_0x5b921e[0x1],_0x5b921e[_0x152a2e(0x106)]>0x2&&(_0x44c28d=_0x5b921e[0x2][_0x152a2e(0x1e8)]()===_0x152a2e(0x14c));}}let _0x4f37e0,_0x58d535=0x0,_0x2347c3=0x0;if(_0x29c337){_0x2347c3=_0x29c337[_0x152a2e(0x106)],_0x58d535=0xa;for(let _0x2fbf64=0x1;_0x2fbf64<_0x2347c3;_0x2fbf64++){_0x58d535*=0xa;}_0x58d535-=0x1,_0x4f37e0=parseInt(_0x29c337);if(isNaN(_0x4f37e0))return null;_0x4f37e0-=0x1;}else _0x4f37e0=0x0;do{_0x4f37e0+=0x1;let _0x1512d8=_0xd0e325[0x0];if(_0x29c337!==undefined&&_0x4cbf9a){let _0x4cfc5e=_0x4f37e0['toString']();while(_0x4cfc5e[_0x152a2e(0x106)]<_0x2347c3){_0x4cfc5e='0'+_0x4cfc5e;}_0x44c28d?_0x1512d8=_0x1512d8[_0x152a2e(0x11c)](_0x4cbf9a,_0x4cfc5e):(_0x1512d8=_0x1512d8[_0x152a2e(0x11c)](_0x4cbf9a,''),_0x44c28d=!![],_0x4f37e0-=0x1);}try{const _0x17a3d8=await _0x53ada3(_0x11138d,_0x2e4f82,_0x1512d8);if(!_0x17a3d8)return _0x1512d8;}catch(_0x293a6e){return _0x6c3bac[_0x152a2e(0x16d)][_0x152a2e(0x1c8)](_0x6c3bac[_0x152a2e(0x194)]+'['+_0x6c3bac[_0x152a2e(0x193)]+']\x20'+_0x1f905d+_0x152a2e(0x12f)+_0x293a6e[_0x152a2e(0x17e)]),null;}}while(_0x4f37e0<_0x58d535);return null;}default:}return null;},_0x11ce40=async(_0x524b83,_0x46bfe3)=>{const _0x3ae344=_0x576821;for(const _0x22d61c in _0x46bfe3){const _0x27a394=_0x46bfe3[_0x22d61c],[_0x2e80eb,_0x362945]=_0x1688ba(_0x27a394);if(_0x2e80eb){const _0x372e83=''+_0x22d61c,_0x2d5339=_0x2e80eb+'('+_0x362945[_0x3ae344(0x11a)](',')+')',_0x4d6396=await _0x2865b8(_0x524b83,_0x46bfe3,_0x372e83,_0x2d5339);if(_0x4d6396===null)delete _0x46bfe3[_0x22d61c];else _0x46bfe3[_0x22d61c]=_0x4d6396;}for(const _0xec2e5 in _0x27a394){const _0x13d2f0=_0x27a394[_0xec2e5],[_0x1d2305,_0x5eb2ef]=_0x1688ba(_0x13d2f0);if(_0x1d2305){const _0x10e852=_0x22d61c+'.'+_0xec2e5,_0x21c32f=_0x1d2305+'('+_0x5eb2ef[_0x3ae344(0x11a)](',')+')',_0x29749b=await _0x2865b8(_0x524b83,_0x46bfe3,_0x10e852,_0x21c32f);if(_0x29749b===null)delete _0x27a394[_0xec2e5];else _0x27a394[_0xec2e5]=_0x29749b;}}}return _0x46bfe3;};}}function a0_0xb16d(_0x207a7c,_0x13d1c0){const _0x4ebe68=a0_0x4ebe();return a0_0xb16d=function(_0xb16d14,_0x56d99e){_0xb16d14=_0xb16d14-0xe2;let _0x2555ee=_0x4ebe68[_0xb16d14];return _0x2555ee;},a0_0xb16d(_0x207a7c,_0x13d1c0);}export class Publisher{constructor(_0x37c773){const _0x2b202e=a0_0xb16d,_0x2a6e0f=_0x37c773,_0x3e6888={},_0x305537=async(_0x357da7,_0x2043ca)=>{const _0x4e7c19=a0_0xb16d,_0x5074ad=_0x3e6888[_0x357da7][_0x4e7c19(0x1cb)]?.[_0x4e7c19(0x16b)]?.[_0x4e7c19(0x12d)];let _0x137331=0x0;for await(const _0x2340c8 of _0x2043ca[_0x4e7c19(0x13c)]()){switch(_0x2340c8['type']){case _0x4e7c19(0x1b7):_0x2a6e0f[_0x4e7c19(0x16d)][_0x4e7c19(0x1c8)](_0x2a6e0f[_0x4e7c19(0x194)]+'['+_0x2a6e0f['pluginName']+_0x4e7c19(0x1d0)+_0x357da7+']['+_0x5074ad+']\x20client\x20disconnected\x20'+_0x2340c8[_0x4e7c19(0x1c1)]+_0x4e7c19(0x1de)),_0x137331=0x0;break;case _0x4e7c19(0x1be):_0x2a6e0f[_0x4e7c19(0x16d)][_0x4e7c19(0x17d)](_0x2a6e0f[_0x4e7c19(0x194)]+'['+_0x2a6e0f[_0x4e7c19(0x193)]+']\x20publisher['+_0x357da7+']['+_0x5074ad+_0x4e7c19(0x184)+_0x2340c8[_0x4e7c19(0x1c1)]);break;case _0x4e7c19(0x1c8):_0x2a6e0f[_0x4e7c19(0x16d)]['error'](_0x2a6e0f[_0x4e7c19(0x194)]+'['+_0x2a6e0f[_0x4e7c19(0x193)]+']\x20publisher['+_0x357da7+']['+_0x5074ad+_0x4e7c19(0x1c0)+_0x2340c8[_0x4e7c19(0x1c1)]);break;case _0x4e7c19(0x103):_0x137331+=0x1;_0x137331%0x1e===0x0&&_0x2a6e0f[_0x4e7c19(0x16d)][_0x4e7c19(0x129)](_0x2a6e0f['gwName']+'['+_0x2a6e0f[_0x4e7c19(0x193)]+_0x4e7c19(0x1d0)+_0x357da7+']['+_0x5074ad+_0x4e7c19(0x1bc)+_0x2340c8['data']+_0x4e7c19(0x186)+_0x137331+')');break;case'staleConnection':_0x2a6e0f[_0x4e7c19(0x16d)]['debug'](_0x2a6e0f[_0x4e7c19(0x194)]+'['+_0x2a6e0f[_0x4e7c19(0x193)]+_0x4e7c19(0x1d0)+_0x357da7+']['+_0x5074ad+_0x4e7c19(0xe9)+_0x2340c8[_0x4e7c19(0x1c1)]);break;}}},_0x330396=async(_0x34a171,_0x134916)=>{const _0xfd622d=a0_0xb16d,_0x1e247a=_0x3e6888[_0x34a171][_0xfd622d(0x1cb)]?.[_0xfd622d(0x16b)]?.[_0xfd622d(0x12d)];let _0x2d02ee;try{_0x2d02ee=await a0_0x1eb4cc(_0x134916);if(_0x2d02ee[_0xfd622d(0x17d)][_0xfd622d(0x1c5)]!==_0xfd622d(0x1ba)){_0x2d02ee[_0xfd622d(0x1d3)]();return;}_0x3e6888[_0x34a171]['nc']=_0x2d02ee,_0x305537(_0x34a171,_0x2d02ee);}catch(_0x177d35){_0x2a6e0f[_0xfd622d(0x16d)][_0xfd622d(0x1c8)](_0x2a6e0f['gwName']+'['+_0x2a6e0f[_0xfd622d(0x193)]+_0xfd622d(0x1d0)+_0x34a171+']['+_0x1e247a+_0xfd622d(0xe2)+_0x177d35[_0xfd622d(0x17e)]+_0xfd622d(0x1dc)),_0x134916[_0xfd622d(0x1d6)]=!![];try{_0x2d02ee=await a0_0x1eb4cc(_0x134916);if(_0x2d02ee[_0xfd622d(0x17d)]['server_name']!==_0xfd622d(0x1ba)){_0x2d02ee[_0xfd622d(0x1d3)]();return;}_0x3e6888[_0x34a171]['nc']=_0x2d02ee,_0x305537(_0x34a171,_0x2d02ee);}catch(_0x3206c5){_0x2a6e0f[_0xfd622d(0x16d)]['error'](_0x2a6e0f[_0xfd622d(0x194)]+'['+_0x2a6e0f[_0xfd622d(0x193)]+_0xfd622d(0x1d0)+_0x34a171+']['+_0x1e247a+_0xfd622d(0xe2)+_0x3206c5['message']);return;}}_0x2a6e0f['logger'][_0xfd622d(0x129)](_0x2a6e0f[_0xfd622d(0x194)]+'['+_0x2a6e0f[_0xfd622d(0x193)]+']\x20publisher['+_0x34a171+']['+_0x1e247a+']\x20connected\x20'+(_0x134916[_0xfd622d(0x1e0)]['ca']?'tls':'')+'\x20'+_0x2d02ee['getServer']()),_0x2d02ee[_0xfd622d(0x1a7)]()[_0xfd622d(0x110)](_0x13a29d=>{const _0x35c46a=_0xfd622d;_0x13a29d&&_0x2a6e0f[_0x35c46a(0x16d)]['error'](_0x2a6e0f[_0x35c46a(0x194)]+'['+_0x2a6e0f[_0x35c46a(0x193)]+_0x35c46a(0x1d0)+_0x34a171+']['+_0x1e247a+_0x35c46a(0x170)+_0x13a29d[_0x35c46a(0x17e)]);});};this[_0x2b202e(0x1a9)]=async(_0x6d4e4b,_0x5620cc)=>{const _0x36eb5b=_0x2b202e;if(!_0x5620cc?.[_0x36eb5b(0x16b)]){_0x2a6e0f['logger'][_0x36eb5b(0x1c8)](_0x2a6e0f['gwName']+'['+_0x2a6e0f[_0x36eb5b(0x193)]+']\x20publisher['+_0x6d4e4b+_0x36eb5b(0x195));return;}if(!_0x5620cc?.[_0x36eb5b(0x16b)]?.[_0x36eb5b(0x109)]){_0x2a6e0f[_0x36eb5b(0x16d)][_0x36eb5b(0x1c8)](_0x2a6e0f['gwName']+'['+_0x2a6e0f[_0x36eb5b(0x193)]+_0x36eb5b(0x1d0)+_0x6d4e4b+_0x36eb5b(0x1aa));return;}if(!_0x5620cc?.[_0x36eb5b(0x16b)]?.[_0x36eb5b(0x12d)]){_0x2a6e0f['logger'][_0x36eb5b(0x1c8)](_0x2a6e0f[_0x36eb5b(0x194)]+'['+_0x2a6e0f[_0x36eb5b(0x193)]+_0x36eb5b(0x1d0)+_0x6d4e4b+']\x20initialization\x20error:\x20missing\x20configuration\x20nats.subject');return;}if(!_0x5620cc?.[_0x36eb5b(0x16b)]?.[_0x36eb5b(0x12d)][_0x36eb5b(0x180)](_0x36eb5b(0x14d))){_0x2a6e0f[_0x36eb5b(0x16d)][_0x36eb5b(0x1c8)](_0x2a6e0f['gwName']+'['+_0x2a6e0f[_0x36eb5b(0x193)]+_0x36eb5b(0x1d0)+_0x6d4e4b+_0x36eb5b(0x14e));return;}if(!_0x5620cc[_0x36eb5b(0x128)]||!Array['isArray'](_0x5620cc[_0x36eb5b(0x128)])||_0x5620cc[_0x36eb5b(0x128)]['length']<0x1){_0x2a6e0f[_0x36eb5b(0x16d)][_0x36eb5b(0x1c8)](_0x2a6e0f[_0x36eb5b(0x194)]+'['+_0x2a6e0f['pluginName']+_0x36eb5b(0x1d0)+_0x6d4e4b+_0x36eb5b(0x1e3));return;}if(!_0x5620cc?.['certificate']?.['ca']){_0x2a6e0f[_0x36eb5b(0x16d)][_0x36eb5b(0x1c8)](_0x2a6e0f['gwName']+'['+_0x2a6e0f[_0x36eb5b(0x193)]+_0x36eb5b(0x1d0)+_0x6d4e4b+_0x36eb5b(0x1cf));return;}const _0x2a4cf7={};try{let _0x154206=a0_0x31a0e9['join'](_0x2a6e0f['configDir'],_0x36eb5b(0x1e1),_0x5620cc?.['certificate']?.['ca']||_0x36eb5b(0xe5));(_0x5620cc?.[_0x36eb5b(0x173)]?.['ca']?.['startsWith']('/')||_0x5620cc?.['certificate']?.['ca']?.[_0x36eb5b(0xf1)]('\x5c'))&&(_0x154206=_0x5620cc[_0x36eb5b(0x173)]['ca']),_0x2a4cf7['ca']=[a0_0x5517ab[_0x36eb5b(0x10a)](_0x154206)],_0x2a4cf7[_0x36eb5b(0x1ca)]=!![];}catch(_0x307d4e){_0x2a6e0f['logger'][_0x36eb5b(0x1c8)](_0x2a6e0f[_0x36eb5b(0x194)]+'['+_0x2a6e0f[_0x36eb5b(0x193)]+_0x36eb5b(0x1d0)+_0x6d4e4b+_0x36eb5b(0x196)+_0x307d4e[_0x36eb5b(0x17e)]);return;}const _0xae1db2={},_0x509c6d=new TextEncoder()[_0x36eb5b(0x171)](_0x5620cc?.[_0x36eb5b(0x16b)]?.[_0x36eb5b(0x1d9)]),_0x5b7d3d=_0x5620cc?.[_0x36eb5b(0x16b)]?.[_0x36eb5b(0x114)];_0xae1db2['authenticator']=jwtAuthenticator(_0x5b7d3d,_0x509c6d),_0xae1db2['servers']=_0x5620cc[_0x36eb5b(0x128)],_0xae1db2[_0x36eb5b(0x1e0)]=_0x2a4cf7,_0xae1db2[_0x36eb5b(0x1d6)]=![],_0xae1db2[_0x36eb5b(0x1be)]=!![],_0xae1db2[_0x36eb5b(0x1e5)]=0x3e8*0xa,_0xae1db2[_0x36eb5b(0x1b3)]=-0x1,_0xae1db2[_0x36eb5b(0x176)]=0x2*0x3c*0x3e8,_0xae1db2[_0x36eb5b(0x179)]=0x5,_0xae1db2[_0x36eb5b(0x129)]=![],_0x3e6888[_0x6d4e4b]={},_0x3e6888[_0x6d4e4b]['config']=_0x5620cc,_0x3e6888[_0x6d4e4b]['nc']=undefined,_0x330396(_0x6d4e4b,_0xae1db2);},this[_0x2b202e(0x1b4)]=async _0x2ab967=>{const _0x487da8=_0x2b202e;let _0x494527;try{if(_0x2ab967[_0x487da8(0x147)]===Object){_0x494527=_0x2ab967[_0x487da8(0x174)];if(!_0x494527)_0x2ab967[_0x487da8(0x174)]=_0x487da8(0xfc);_0x2ab967=JSON['stringify'](_0x2ab967);}else{const _0x4a646f=JSON[_0x487da8(0x108)](_0x2ab967);_0x494527=_0x4a646f[_0x487da8(0x174)];}}catch(_0x37b689){throw new Error(_0x487da8(0xeb)+_0x494527+_0x487da8(0x10e));}if(!_0x3e6888[_0x494527])throw new Error(_0x487da8(0xeb)+_0x494527+_0x487da8(0x12a)+_0x494527);const _0x83ed7a=headers();_0x83ed7a[_0x487da8(0x1bb)](_0x487da8(0x159),a0_0xf9b720['randomUUID']());let _0x3ef29a;try{if(!_0x3e6888[_0x494527]['nc'])throw new Error(_0x487da8(0x15c));_0x3ef29a=await _0x3e6888[_0x494527]['nc'][_0x487da8(0x185)](_0x3e6888[_0x494527][_0x487da8(0x1cb)]?.[_0x487da8(0x16b)]?.['subject'],_0x2ab967,{'headers':_0x83ed7a});}catch(_0x5aeece){if(_0x5aeece['message']===_0x487da8(0x18c))throw new Error(_0x487da8(0xeb)+_0x494527+_0x487da8(0x138)+_0x3e6888[_0x494527][_0x487da8(0x1cb)]?.[_0x487da8(0x16b)]?.[_0x487da8(0x12d)]);else throw new Error(_0x487da8(0xeb)+_0x494527+_0x487da8(0x12b)+_0x5aeece['message']);}let _0x36f94b;try{_0x36f94b=JSON['parse'](_0x3ef29a[_0x487da8(0x1b5)]());}catch(_0x1de63d){throw new Error(_0x487da8(0xec)+_0x3ef29a[_0x487da8(0x1b5)]());}if(_0x36f94b?.[_0x487da8(0x1c8)]){const _0xbc1f36=new Error(_0x487da8(0x10f)+_0x36f94b[_0x487da8(0x1c8)]);_0xbc1f36[_0x487da8(0x1a2)]=_0x36f94b['errName'];throw _0xbc1f36;}return _0x36f94b;},process['on'](_0x2b202e(0x105),async()=>{const _0x4a813d=_0x2b202e;for(const _0x5dfdf7 in _0x3e6888){_0x3e6888[_0x5dfdf7]['nc']&&!_0x3e6888[_0x5dfdf7]['nc']['isClosed']()&&await _0x3e6888[_0x5dfdf7]['nc'][_0x4a813d(0x134)]();}}),process['on'](_0x2b202e(0x146),async()=>{const _0x19bd8f=_0x2b202e;for(const _0x35271a in _0x3e6888){_0x3e6888[_0x35271a]['nc']&&!_0x3e6888[_0x35271a]['nc'][_0x19bd8f(0x15a)]()&&await _0x3e6888[_0x35271a]['nc']['drain']();}});}}export const getAppRoles=async(_0xf04722,_0x561713)=>{const _0x5b993d=a0_0xb16d,_0x192e78=_0x5b993d(0x1ac),_0x20e2aa=_0xf04722;_0x20e2aa[_0x5b993d(0x16d)][_0x5b993d(0x129)](_0x20e2aa[_0x5b993d(0x194)]+'['+_0x20e2aa[_0x5b993d(0x193)]+_0x5b993d(0x14a)+_0x192e78+'\x22');try{if(!a0_0x5517ab['existsSync'](_0x20e2aa[_0x5b993d(0x19e)]+'/approles'))a0_0x5517ab[_0x5b993d(0x104)](_0x20e2aa[_0x5b993d(0x19e)]+_0x5b993d(0x18b));}catch(_0x3b8198){void 0x0;}const _0x1cb423=a0_0x31a0e9[_0x5b993d(0x11a)](''+_0x20e2aa['configDir'],_0x5b993d(0x12e),'approles_'+_0x20e2aa[_0x5b993d(0x193)]+_0x5b993d(0x100)),_0x101a6c={};a0_0x2da0c2['fsExistsSync'](_0x1cb423)&&a0_0x5517ab[_0x5b993d(0x10a)](_0x1cb423,_0x5b993d(0xee))[_0x5b993d(0x1c3)](/\r?\n/)[_0x5b993d(0x136)](_0x5327ce=>{const _0x16423a=_0x5b993d,_0x72ef1d=_0x5327ce[_0x16423a(0x1c3)]('\x20');_0x72ef1d['length']===0x2&&(_0x101a6c[_0x72ef1d[0x0]]=_0x72ef1d[0x1]);});const _0x4e5606=a0_0x5517ab[_0x5b993d(0xfd)](_0x1cb423,{'flags':'w','encoding':_0x5b993d(0x120),'mode':0x1b6,'autoClose':!![]}),_0x537233=[],_0x3ccbb9=await _0x20e2aa[_0x5b993d(0x143)](_0x561713,{'attribute':undefined,'operator':undefined,'value':undefined},['id',_0x5b993d(0x1b9)]);return _0x3ccbb9[_0x5b993d(0x127)][_0x5b993d(0x136)](_0x31e6c1=>{const _0xa0cd82=_0x5b993d;if(_0x31e6c1['id']){let _0x574da8=a0_0xf9b720[_0xa0cd82(0x142)]();if(_0x101a6c[_0x31e6c1['id']])_0x574da8=_0x101a6c[_0x31e6c1['id']];const _0x1f73fd={'allowedMemberTypes':[_0xa0cd82(0xff)],'description':_0xa0cd82(0x19b),'displayName':_0x31e6c1[_0xa0cd82(0x1b9)]||_0x31e6c1['id'],'id':_0x574da8,'isEnabled':!![],'lang':null,'origin':'Application','value':decodeURIComponent(_0x31e6c1['id'])};_0x537233[_0xa0cd82(0x1d5)](_0x1f73fd),_0x4e5606[_0xa0cd82(0x137)](_0x31e6c1['id']+'\x20'+_0x574da8+'\x0a');}}),_0x4e5606['close'](),_0x20e2aa[_0x5b993d(0x16d)][_0x5b993d(0x129)](_0x20e2aa[_0x5b993d(0x194)]+'['+_0x20e2aa[_0x5b993d(0x193)]+']\x20approle\x20uuid\x20file\x20created:\x20'+_0x1cb423),{'Resources':[{'appRoles':_0x537233}]};};
@@ -8,8 +8,6 @@
8
8
  // Optional SCIM Stream subscriber/publisher
9
9
  // =================================================================================
10
10
 
11
- 'use strict'
12
-
13
11
  import { createServer as httpCreateServer } from 'node:http'
14
12
  import { createServer as httpsCreateServer } from 'node:https'
15
13
  import { type IncomingMessage, type ServerResponse } from 'node:http'
@@ -842,21 +840,16 @@ export class ScimGateway {
842
840
  ctx.response.status = 500
843
841
  return
844
842
  }
845
-
846
843
  let jsonBody = ctx.request.body
847
844
  try {
848
845
  if (!jsonBody) throw new Error('missing body')
849
- if (typeof jsonBody !== 'object') { // might have application/x-www-form-urlencoded body, but incorrect Content-Type header
846
+ if (typeof jsonBody !== 'object') { // might have application/x-www-form-urlencoded or multipart/form-data body, but incorrect Content-Type header
850
847
  logger.debug(`${gwName}[${pluginName}][${ctx?.routeObj?.baseEntity}] [oauth] continue request validation even though incorrect body vs header Content-Type: ${ctx.request.headers.get('content-type')}`)
851
- const arr = jsonBody.split('&')
852
- const body: Record<string, any> = {}
853
- arr.forEach((kv: string) => {
854
- const a = kv.split('=')
855
- if (a.length === 2) {
856
- body[a[0]] = decodeURIComponent(a[1])
857
- }
858
- })
859
- if (Object.keys(body).length < 1) throw new Error('body is not JSON nor application/x-www-form-urlencoded')
848
+ let body = utils.formUrlEncodedToJSON(jsonBody)
849
+ if (Object.keys(body).length < 1) {
850
+ body = utils.formDataMultipartToJSON(jsonBody)
851
+ if (Object.keys(body).length < 1) throw new Error('body is not JSON, application/x-www-form-urlencoded nor multipart/form-data')
852
+ }
860
853
  ctx.request.body = body // now json - ensure final info log will be masked
861
854
  jsonBody = body
862
855
  }
@@ -2310,14 +2303,9 @@ export class ScimGateway {
2310
2303
  } catch (err: any) {
2311
2304
  const contentType = request.headers.get('content-type')
2312
2305
  if (contentType && contentType.toLowerCase().startsWith('application/x-www-form-urlencoded')) {
2313
- const arr = bodyString.split('&') // "grant_type=client_credentials&client_id=id&client_secret=secret"
2314
- body = {}
2315
- arr.forEach((kv: string) => {
2316
- const a = kv.split('=')
2317
- if (a.length === 2) {
2318
- body[a[0]] = decodeURIComponent(a[1])
2319
- }
2320
- })
2306
+ body = utils.formUrlEncodedToJSON(bodyString)
2307
+ } else if (contentType && contentType.toLowerCase().startsWith('multipart/form-data')) {
2308
+ body = utils.formDataMultipartToJSON(bodyString)
2321
2309
  } else if (bodyString) body = bodyString
2322
2310
  }
2323
2311
 
package/lib/utils-scim.ts CHANGED
@@ -1,5 +1,3 @@
1
- 'use strict'
2
-
3
1
  import { fileURLToPath } from 'url'
4
2
  import dot from 'dot-object'
5
3
  import fs from 'node:fs'
package/lib/utils.ts CHANGED
@@ -3,11 +3,8 @@
3
3
  //
4
4
  // Author: Jarle Elshaug
5
5
  //
6
- // Note, don't use arrow functions
7
6
  // ==================================
8
7
 
9
- 'use strict'
10
-
11
8
  import * as crypto from 'node:crypto'
12
9
  import id from 'node-machine-id'
13
10
  import fs from 'node:fs'
@@ -613,3 +610,53 @@ export const createRandomPassword = function (len: number, ...set: string[]) {
613
610
  }
614
611
  return res
615
612
  }
613
+
614
+ /**
615
+ * formUrlEncodedToJSON converts application/x-www-form-urlencoded request body to json
616
+ * @param body http request body string
617
+ * @returns json formatted body
618
+ */
619
+ export const formUrlEncodedToJSON = function (body?: string): Record<string, any> {
620
+ if (!body) return {}
621
+ const arr = body.split('&') // "grant_type=client_credentials&client_id=id&client_secret=secret"
622
+ const json: Record<string, any> = {}
623
+ for (const kv of arr) {
624
+ const a = kv.split('=')
625
+ if (a.length === 2) {
626
+ try {
627
+ json[a[0]] = decodeURIComponent(a[1])
628
+ } catch (err) { return {} }
629
+ }
630
+ }
631
+ return json
632
+ }
633
+
634
+ /**
635
+ * formDataMultipartToJSON converts multipart/form-data request body to json - Content-Type: multipart/form-data;boundary="<some-delimiter>"
636
+ * @param body request body
637
+ * @param boundary the boundary/delimiter defiend in header Content-Type: multipart/form-data;boundary="<some-delimiter>"
638
+ * @returns json formatted body
639
+ */
640
+ export const formDataMultipartToJSON = function (body?: string, boundary?: string): Record<string, any> {
641
+ if (!body) return {} // --delimiter123\nContent-Disposition: form-data; name="field1"\n\nvalue1\n--delimiter123\nContent-Disposition: form-data; name="field2"; filename="example.txt"\n\nvalue2
642
+ if (!boundary) { // if boundary is missing, try to infer it
643
+ const inferredBoundary = body.match(/^--([^\r\n]+)/)
644
+ if (inferredBoundary) {
645
+ boundary = inferredBoundary[1]
646
+ } else return {} // No boundary found
647
+ }
648
+ const parts = body.split(`--${boundary}`).filter(part => part.trim() && !part.includes('--'))
649
+ const json: Record<string, any> = {}
650
+ for (const part of parts) {
651
+ const [headers, value] = part.split(/\r?\n\r?\n/)
652
+ const nameMatch = headers.match(/name="([^"]+)"/)
653
+ if (nameMatch) {
654
+ const key = nameMatch[1]
655
+ json[key] = value.trim()
656
+ try {
657
+ json[key] = decodeURIComponent(json[key])
658
+ } catch (err) { return {} }
659
+ }
660
+ }
661
+ return json
662
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scimgateway",
3
- "version": "5.0.11",
3
+ "version": "5.0.13",
4
4
  "type": "module",
5
5
  "description": "Using SCIM protocol as a gateway for user provisioning to other endpoints",
6
6
  "author": "Jarle Elshaug <jarle.elshaug@gmail.com> (https://elshaug.xyz)",
@@ -36,24 +36,26 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@ldapjs/asn1": "^2.0.0",
39
+ "@nats-io/jetstream": "^3.0.0-35",
40
+ "@nats-io/nats-core": "^3.0.0-48",
41
+ "@nats-io/transport-node": "^3.0.0-33",
39
42
  "@types/ldapjs": "^3.0.6",
40
43
  "@types/lokijs": "^1.5.14",
41
44
  "@types/tedious": "^4.0.14",
42
45
  "dot-object": "^2.1.5",
43
46
  "fold-to-ascii": "^5.0.1",
44
- "https-proxy-agent": "^7.0.4",
47
+ "https-proxy-agent": "^7.0.6",
45
48
  "is-in-subnet": "^4.0.1",
46
49
  "jsonwebtoken": "^9.0.2",
47
50
  "ldapjs": "^3.0.7",
48
51
  "lokijs": "^1.5.12",
49
- "mongodb": "^6.6.2",
50
- "nats": "^2.28.2",
52
+ "mongodb": "^6.12.0",
51
53
  "node-machine-id": "1.1.12",
52
- "nodemailer": "^6.9.13",
54
+ "nodemailer": "^6.9.16",
53
55
  "passport": "^0.7.0",
54
56
  "passport-azure-ad": "^4.3.5",
55
57
  "saml": "^3.0.1",
56
- "winston": "^3.13.0"
58
+ "winston": "^3.17.0"
57
59
  },
58
60
  "peerDependencies": {
59
61
  "typescript": "^5.0.0"