auth0 4.14.0 → 4.16.0

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.
Files changed (30) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/auth/backchannel.d.ts +139 -0
  3. package/dist/cjs/auth/backchannel.js +110 -0
  4. package/dist/cjs/auth/backchannel.js.map +1 -0
  5. package/dist/cjs/auth/index.d.ts +2 -0
  6. package/dist/cjs/auth/index.js +2 -0
  7. package/dist/cjs/auth/index.js.map +1 -1
  8. package/dist/cjs/management/__generated/managers/prompts-manager.d.ts +15 -1
  9. package/dist/cjs/management/__generated/managers/prompts-manager.js +36 -0
  10. package/dist/cjs/management/__generated/managers/prompts-manager.js.map +1 -1
  11. package/dist/cjs/management/__generated/models/index.d.ts +362 -0
  12. package/dist/cjs/management/__generated/models/index.js +261 -5
  13. package/dist/cjs/management/__generated/models/index.js.map +1 -1
  14. package/dist/cjs/version.d.ts +1 -1
  15. package/dist/cjs/version.js +1 -1
  16. package/dist/esm/auth/backchannel.d.ts +139 -0
  17. package/dist/esm/auth/backchannel.js +106 -0
  18. package/dist/esm/auth/backchannel.js.map +1 -0
  19. package/dist/esm/auth/index.d.ts +2 -0
  20. package/dist/esm/auth/index.js +2 -0
  21. package/dist/esm/auth/index.js.map +1 -1
  22. package/dist/esm/management/__generated/managers/prompts-manager.d.ts +15 -1
  23. package/dist/esm/management/__generated/managers/prompts-manager.js +36 -0
  24. package/dist/esm/management/__generated/managers/prompts-manager.js.map +1 -1
  25. package/dist/esm/management/__generated/models/index.d.ts +362 -0
  26. package/dist/esm/management/__generated/models/index.js +256 -0
  27. package/dist/esm/management/__generated/models/index.js.map +1 -1
  28. package/dist/esm/version.d.ts +1 -1
  29. package/dist/esm/version.js +1 -1
  30. package/package.json +1 -1
@@ -0,0 +1,139 @@
1
+ import { BaseAuthAPI } from './base-auth-api.js';
2
+ /**
3
+ * The response from the authorize endpoint.
4
+ */
5
+ export type AuthorizeResponse = {
6
+ /**
7
+ * The authorization request ID.
8
+ */
9
+ auth_req_id: string;
10
+ /**
11
+ * The duration in seconds until the authentication request expires.
12
+ */
13
+ expires_in: number;
14
+ /**
15
+ * The interval in seconds to wait between poll requests.
16
+ */
17
+ interval: number;
18
+ };
19
+ /**
20
+ * Options for the authorize request.
21
+ */
22
+ export type AuthorizeOptions = {
23
+ /**
24
+ * A human-readable string intended to be displayed on both the device calling /bc-authorize and the user’s authentication device.
25
+ */
26
+ binding_message: string;
27
+ /**
28
+ * A space-separated list of OIDC and custom API scopes.
29
+ */
30
+ scope: string;
31
+ /**
32
+ * Unique identifier of the audience for an issued token.
33
+ */
34
+ audience?: string;
35
+ /**
36
+ * Custom expiry time in seconds for this request.
37
+ */
38
+ request_expiry?: string;
39
+ /**
40
+ * The user ID.
41
+ */
42
+ userId: string;
43
+ /**
44
+ * Optional parameter for subject issuer context.
45
+ */
46
+ subjectIssuerContext?: string;
47
+ };
48
+ /**
49
+ * The response from the token endpoint.
50
+ */
51
+ export type TokenResponse = {
52
+ /**
53
+ * The access token.
54
+ */
55
+ access_token: string;
56
+ /**
57
+ * The refresh token, available with the `offline_access` scope.
58
+ */
59
+ refresh_token?: string;
60
+ /**
61
+ * The user's ID Token.
62
+ */
63
+ id_token: string;
64
+ /**
65
+ * The token type of the access token.
66
+ */
67
+ token_type?: string;
68
+ /**
69
+ * The duration in seconds that the access token is valid.
70
+ */
71
+ expires_in: number;
72
+ /**
73
+ * The scopes associated with the token.
74
+ */
75
+ scope: string;
76
+ };
77
+ /**
78
+ * Options for the token request.
79
+ */
80
+ export type TokenOptions = {
81
+ /**
82
+ * The authorization request ID.
83
+ */
84
+ auth_req_id: string;
85
+ };
86
+ /**
87
+ * Interface for the backchannel authentication.
88
+ */
89
+ export interface IBackchannel {
90
+ authorize: (options: AuthorizeOptions) => Promise<AuthorizeResponse>;
91
+ backchannelGrant: (options: TokenOptions) => Promise<TokenResponse>;
92
+ }
93
+ /**
94
+ * Class implementing the backchannel authentication flow.
95
+ */
96
+ export declare class Backchannel extends BaseAuthAPI implements IBackchannel {
97
+ /**
98
+ * Initiates a CIBA authorization request.
99
+ *
100
+ * @param {AuthorizeOptions} options - The options for the request.
101
+ * @returns {Promise<AuthorizeResponse>} - The authorization response.
102
+ *
103
+ * @throws {Error} - If the request fails.
104
+ */
105
+ authorize({ userId, ...options }: AuthorizeOptions): Promise<AuthorizeResponse>;
106
+ /**
107
+ * Handles the backchannel grant flow for authentication. Client can poll this method at regular intervals to check if the backchannel auth request has been approved.
108
+ *
109
+ * @param {string} auth_req_id - The authorization request ID. This value is returned from the call to /bc-authorize. Once you have exchanged an auth_req_id for an ID and access token, it is no longer usable.
110
+ * @returns {Promise<TokenResponse>} - A promise that resolves to the token response.
111
+ *
112
+ * @throws {Error} - Throws an error if the request fails.
113
+ *
114
+ * If the authorizing user has not yet approved or rejected the request, you will receive a response like this:
115
+ * ```json
116
+ * {
117
+ * "error": "authorization_pending",
118
+ * "error_description": "The end-user authorization is pending"
119
+ * }
120
+ * ```
121
+ *
122
+ * If the authorizing user rejects the request, you will receive a response like this:
123
+ * ```json
124
+ * {
125
+ * "error": "access_denied",
126
+ * "error_description": "The end-user denied the authorization request or it has been expired"
127
+ * }
128
+ * ```
129
+ *
130
+ * If you are polling too quickly (faster than the interval value returned from /bc-authorize), you will receive a response like this:
131
+ * ```json
132
+ * {
133
+ * "error": "slow_down",
134
+ * "error_description": "You are polling faster than allowed. Try again in 10 seconds."
135
+ * }
136
+ * ```
137
+ */
138
+ backchannelGrant({ auth_req_id }: TokenOptions): Promise<TokenResponse>;
139
+ }
@@ -0,0 +1,106 @@
1
+ // Wednesday, 8 January, 2025
2
+ // Client Initiated Backchannel Authentication (CIBA)
3
+ // CIBA is an OpenID Foundation standard for a decoupled authentication flow. It enables
4
+ // solution developers to build authentication flows where the user logging in does not do so
5
+ // directly on the device that receives the ID or access tokens (the “Consumption Device”), but
6
+ // instead on a separate “Authorization Device”.
7
+ import { JSONApiResponse } from '../lib/models.js';
8
+ import { BaseAuthAPI } from './base-auth-api.js';
9
+ /**
10
+ * Generates the login hint for the user.
11
+ *
12
+ * @param {string} userId - The user ID.
13
+ * @param {string} domain - The tenant domain.
14
+ * @returns {string} - The login hint as a JSON string.
15
+ */
16
+ const getLoginHint = (userId, domain) => {
17
+ // remove trailing '/' from domain, added later for uniformity
18
+ const trimmedDomain = domain.endsWith('/') ? domain.slice(0, -1) : domain;
19
+ const loginHint = {
20
+ format: 'iss_sub',
21
+ iss: `https://${trimmedDomain}/`,
22
+ sub: `${userId}`,
23
+ };
24
+ return JSON.stringify(loginHint);
25
+ };
26
+ const CIBA_GRANT_TYPE = 'urn:openid:params:grant-type:ciba';
27
+ const CIBA_AUTHORIZE_URL = '/bc-authorize';
28
+ const CIBA_TOKEN_URL = '/oauth/token';
29
+ /**
30
+ * Class implementing the backchannel authentication flow.
31
+ */
32
+ export class Backchannel extends BaseAuthAPI {
33
+ /**
34
+ * Initiates a CIBA authorization request.
35
+ *
36
+ * @param {AuthorizeOptions} options - The options for the request.
37
+ * @returns {Promise<AuthorizeResponse>} - The authorization response.
38
+ *
39
+ * @throws {Error} - If the request fails.
40
+ */
41
+ async authorize({ userId, ...options }) {
42
+ const body = {
43
+ ...options,
44
+ login_hint: getLoginHint(userId, this.domain),
45
+ client_id: this.clientId,
46
+ };
47
+ await this.addClientAuthentication(body);
48
+ const response = await this.request.bind(this)({
49
+ path: CIBA_AUTHORIZE_URL,
50
+ method: 'POST',
51
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
52
+ body: new URLSearchParams(body),
53
+ }, {});
54
+ const r = await JSONApiResponse.fromResponse(response);
55
+ return r.data;
56
+ }
57
+ /**
58
+ * Handles the backchannel grant flow for authentication. Client can poll this method at regular intervals to check if the backchannel auth request has been approved.
59
+ *
60
+ * @param {string} auth_req_id - The authorization request ID. This value is returned from the call to /bc-authorize. Once you have exchanged an auth_req_id for an ID and access token, it is no longer usable.
61
+ * @returns {Promise<TokenResponse>} - A promise that resolves to the token response.
62
+ *
63
+ * @throws {Error} - Throws an error if the request fails.
64
+ *
65
+ * If the authorizing user has not yet approved or rejected the request, you will receive a response like this:
66
+ * ```json
67
+ * {
68
+ * "error": "authorization_pending",
69
+ * "error_description": "The end-user authorization is pending"
70
+ * }
71
+ * ```
72
+ *
73
+ * If the authorizing user rejects the request, you will receive a response like this:
74
+ * ```json
75
+ * {
76
+ * "error": "access_denied",
77
+ * "error_description": "The end-user denied the authorization request or it has been expired"
78
+ * }
79
+ * ```
80
+ *
81
+ * If you are polling too quickly (faster than the interval value returned from /bc-authorize), you will receive a response like this:
82
+ * ```json
83
+ * {
84
+ * "error": "slow_down",
85
+ * "error_description": "You are polling faster than allowed. Try again in 10 seconds."
86
+ * }
87
+ * ```
88
+ */
89
+ async backchannelGrant({ auth_req_id }) {
90
+ const body = {
91
+ client_id: this.clientId,
92
+ auth_req_id,
93
+ grant_type: CIBA_GRANT_TYPE,
94
+ };
95
+ await this.addClientAuthentication(body);
96
+ const response = await this.request.bind(this)({
97
+ path: CIBA_TOKEN_URL,
98
+ method: 'POST',
99
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
100
+ body: new URLSearchParams(body),
101
+ }, {});
102
+ const r = await JSONApiResponse.fromResponse(response);
103
+ return r.data;
104
+ }
105
+ }
106
+ //# sourceMappingURL=backchannel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backchannel.js","sourceRoot":"","sources":["../../../src/auth/backchannel.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,qDAAqD;AAErD,wFAAwF;AACxF,6FAA6F;AAC7F,+FAA+F;AAC/F,gDAAgD;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AA6CjD;;;;;;GAMG;AACH,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,MAAc,EAAU,EAAE;IAC9D,8DAA8D;IAC9D,MAAM,aAAa,G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;;;;;;;;;;;;;OA+BG;IACH,KAAK,CAAC,gBAAgB,CAAC,EAAE,WAAW,EAAgB;QAClD,MAAM,IAAI,GAAqB;YAC7B,SAAS,EAAE,IAAI,CAAC,QAAQ;YACxB,WAAW;YACX,UAAU,EAAE,eAAe;SAC5B,CAAC;QAEF,MAAM,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAEzC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAC5C;YACE,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE;YAChE,IAAI,EAAE,IAAI,eAAe,CAAC,IAAI,CAAC;SAChC,EACD,EAAE,CACH,CAAC;QAEF,MAAM,CAAC,GAAmC,MAAM,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QACvF,OAAO,CAAC,CAAC,IAAI,CAAC;IAChB,CAAC;CACF"}
@@ -1,3 +1,4 @@
1
+ import { Backchannel } from './backchannel.js';
1
2
  import { AuthenticationClientOptions } from './base-auth-api.js';
2
3
  import { Database } from './database.js';
3
4
  import { OAuth } from './oauth.js';
@@ -11,5 +12,6 @@ export declare class AuthenticationClient {
11
12
  database: Database;
12
13
  oauth: OAuth;
13
14
  passwordless: Passwordless;
15
+ backchannel: Backchannel;
14
16
  constructor(options: AuthenticationClientOptions);
15
17
  }
@@ -1,3 +1,4 @@
1
+ import { Backchannel } from './backchannel.js';
1
2
  import { Database } from './database.js';
2
3
  import { OAuth } from './oauth.js';
3
4
  import { Passwordless } from './passwordless.js';
@@ -11,6 +12,7 @@ export class AuthenticationClient {
11
12
  this.database = new Database(options);
12
13
  this.oauth = new OAuth(options);
13
14
  this.passwordless = new Passwordless(options);
15
+ this.backchannel = new Backchannel(options);
14
16
  }
15
17
  }
16
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAA0B,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,YAAY,EAA+B,MAAM,oBAAoB,CAAC;AAE/E,MAAM,OAAO,oBAAoB;IAK/B,YAAY,OAAoC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;CACF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAA0B,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,YAAY,EAA+B,MAAM,oBAAoB,CAAC;AAE/E,MAAM,OAAO,oBAAoB;IAM/B,YAAY,OAAoC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import * as runtime from '../../../lib/runtime.js';
2
2
  import type { InitOverride, ApiResponse } from '../../../lib/runtime.js';
3
- import type { PromptsSettings, PromptsSettingsUpdate, GetCustomTextByLanguageRequest, GetPartialsRequest, PutCustomTextByLanguageRequest, PutPartialsRequest } from '../models/index.js';
3
+ import type { GetRendering200Response, PatchRenderingRequest, PromptsSettings, PromptsSettingsUpdate, GetCustomTextByLanguageRequest, GetPartialsRequest, GetRenderingRequest, PatchRenderingOperationRequest, PutCustomTextByLanguageRequest, PutPartialsRequest } from '../models/index.js';
4
4
  declare const BaseAPI: typeof runtime.BaseAPI;
5
5
  /**
6
6
  *
@@ -31,6 +31,13 @@ export declare class PromptsManager extends BaseAPI {
31
31
  * @throws {RequiredError}
32
32
  */
33
33
  get(initOverrides?: InitOverride): Promise<ApiResponse<PromptsSettings>>;
34
+ /**
35
+ * View the render settings for a specific screen
36
+ * Get render settings for a prompt
37
+ *
38
+ * @throws {RequiredError}
39
+ */
40
+ getRendering(requestParameters: GetRenderingRequest, initOverrides?: InitOverride): Promise<ApiResponse<GetRendering200Response>>;
34
41
  /**
35
42
  * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features.
36
43
  * Update prompt settings
@@ -38,6 +45,13 @@ export declare class PromptsManager extends BaseAPI {
38
45
  * @throws {RequiredError}
39
46
  */
40
47
  update(bodyParameters: PromptsSettingsUpdate, initOverrides?: InitOverride): Promise<ApiResponse<PromptsSettings>>;
48
+ /**
49
+ * Configure the render settings for a specific screen
50
+ * Configure render settings for a prompt
51
+ *
52
+ * @throws {RequiredError}
53
+ */
54
+ updateRendering(requestParameters: PatchRenderingOperationRequest, bodyParameters: PatchRenderingRequest, initOverrides?: InitOverride): Promise<ApiResponse<void>>;
41
55
  /**
42
56
  * Set custom text for a specific prompt. Existing texts will be overwritten.
43
57
  * Set custom text for a specific prompt
@@ -47,6 +47,22 @@ export class PromptsManager extends BaseAPI {
47
47
  }, initOverrides);
48
48
  return runtime.JSONApiResponse.fromResponse(response);
49
49
  }
50
+ /**
51
+ * View the render settings for a specific screen
52
+ * Get render settings for a prompt
53
+ *
54
+ * @throws {RequiredError}
55
+ */
56
+ async getRendering(requestParameters, initOverrides) {
57
+ runtime.validateRequiredRequestParams(requestParameters, ['prompt', 'screen']);
58
+ const response = await this.request({
59
+ path: `/prompts/{prompt}/screen/{screen}/rendering`
60
+ .replace('{prompt}', encodeURIComponent(String(requestParameters.prompt)))
61
+ .replace('{screen}', encodeURIComponent(String(requestParameters.screen))),
62
+ method: 'GET',
63
+ }, initOverrides);
64
+ return runtime.JSONApiResponse.fromResponse(response);
65
+ }
50
66
  /**
51
67
  * Update the Universal Login configuration of your tenant. This includes the <a href="https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first">Identifier First Authentication</a> and <a href="https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa">WebAuthn with Device Biometrics for MFA</a> features.
52
68
  * Update prompt settings
@@ -64,6 +80,26 @@ export class PromptsManager extends BaseAPI {
64
80
  }, initOverrides);
65
81
  return runtime.JSONApiResponse.fromResponse(response);
66
82
  }
83
+ /**
84
+ * Configure the render settings for a specific screen
85
+ * Configure render settings for a prompt
86
+ *
87
+ * @throws {RequiredError}
88
+ */
89
+ async updateRendering(requestParameters, bodyParameters, initOverrides) {
90
+ runtime.validateRequiredRequestParams(requestParameters, ['prompt', 'screen']);
91
+ const headerParameters = {};
92
+ headerParameters['Content-Type'] = 'application/json';
93
+ const response = await this.request({
94
+ path: `/prompts/{prompt}/screen/{screen}/rendering`
95
+ .replace('{prompt}', encodeURIComponent(String(requestParameters.prompt)))
96
+ .replace('{screen}', encodeURIComponent(String(requestParameters.screen))),
97
+ method: 'PATCH',
98
+ headers: headerParameters,
99
+ body: bodyParameters,
100
+ }, initOverrides);
101
+ return runtime.VoidApiResponse.fromResponse(response);
102
+ }
67
103
  /**
68
104
  * Set custom text for a specific prompt. Existing texts will be overwritten.
69
105
  * Set custom text for a specific prompt
@@ -1 +1 @@
1
- {"version":3,"file":"prompts-manager.js","sourceRoot":"","sources":["../../../../../src/management/__generated/managers/prompts-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,yBAAyB,CAAC;AAWnD,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;AAE5B;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,OAAO;IACzC;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB,CAC3B,iBAAiD,EACjD,aAA4B;QAE5B,OAAO,CAAC,6BAA6B,CAAC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;QAEjF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CACjC;YACE,IAAI,EAAE,0CAA0C;iBAC7C,OAAO,CAAC,UAAU,EAAE,kBAAkB,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;iBACzE,OAAO,CAAC,YAAY,EAAE,kBAAkB,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChF,MAAM,EAAE,KAAK;SACd,EACD,aAAa,CACd,CAAC;QAEF,OAAO,OAAO,CAAC,eAAe,CAAC,YAAY,CAAM,QAAQ,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,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