@kya-os/consent 0.1.0 → 0.1.2
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/dist/bundle/index.d.ts +44 -0
- package/dist/bundle/index.d.ts.map +1 -0
- package/dist/bundle/index.js +45 -0
- package/dist/bundle/index.js.map +1 -0
- package/dist/bundle/inline.d.ts +18 -0
- package/dist/bundle/inline.d.ts.map +1 -0
- package/dist/bundle/inline.js +18 -0
- package/dist/bundle/inline.js.map +1 -0
- package/dist/bundle/shell.d.ts +91 -0
- package/dist/bundle/shell.d.ts.map +1 -0
- package/dist/bundle/shell.js +282 -0
- package/dist/bundle/shell.js.map +1 -0
- package/dist/components/consent-button.d.ts +61 -0
- package/dist/components/consent-button.d.ts.map +1 -0
- package/dist/components/consent-button.js +177 -0
- package/dist/components/consent-button.js.map +1 -0
- package/dist/components/consent-checkbox.d.ts +61 -0
- package/dist/components/consent-checkbox.d.ts.map +1 -0
- package/dist/components/consent-checkbox.js +220 -0
- package/dist/components/consent-checkbox.js.map +1 -0
- package/dist/components/consent-input.d.ts +91 -0
- package/dist/components/consent-input.d.ts.map +1 -0
- package/dist/components/consent-input.js +332 -0
- package/dist/components/consent-input.js.map +1 -0
- package/dist/components/consent-oauth-button.d.ts +87 -0
- package/dist/components/consent-oauth-button.d.ts.map +1 -0
- package/dist/components/consent-oauth-button.js +389 -0
- package/dist/components/consent-oauth-button.js.map +1 -0
- package/dist/components/consent-otp-input.d.ts +92 -0
- package/dist/components/consent-otp-input.d.ts.map +1 -0
- package/dist/components/consent-otp-input.js +385 -0
- package/dist/components/consent-otp-input.js.map +1 -0
- package/dist/components/consent-permissions.d.ts +104 -0
- package/dist/components/consent-permissions.d.ts.map +1 -0
- package/dist/components/consent-permissions.js +430 -0
- package/dist/components/consent-permissions.js.map +1 -0
- package/dist/components/consent-shell.d.ts +72 -0
- package/dist/components/consent-shell.d.ts.map +1 -0
- package/dist/components/consent-shell.js +231 -0
- package/dist/components/consent-shell.js.map +1 -0
- package/dist/components/consent-terms.d.ts +89 -0
- package/dist/components/consent-terms.d.ts.map +1 -0
- package/dist/components/consent-terms.js +284 -0
- package/dist/components/consent-terms.js.map +1 -0
- package/dist/components/index.d.ts +19 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +23 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/mcp-consent.d.ts +152 -0
- package/dist/components/mcp-consent.d.ts.map +1 -0
- package/dist/components/mcp-consent.js +874 -0
- package/dist/components/mcp-consent.js.map +1 -0
- package/dist/consent.js +3744 -0
- package/dist/consent.min.js +1564 -0
- package/dist/constants/auth-modes.d.ts +7 -2
- package/dist/constants/auth-modes.d.ts.map +1 -1
- package/dist/constants/auth-modes.js +28 -36
- package/dist/constants/auth-modes.js.map +1 -1
- package/dist/constants/colors.js +1 -4
- package/dist/constants/colors.js.map +1 -1
- package/dist/constants/defaults.d.ts +1 -1
- package/dist/constants/defaults.d.ts.map +1 -1
- package/dist/constants/defaults.js +16 -19
- package/dist/constants/defaults.js.map +1 -1
- package/dist/constants/index.d.ts +3 -3
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +3 -26
- package/dist/constants/index.js.map +1 -1
- package/dist/index.d.ts +10 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -23
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +123 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +154 -0
- package/dist/react/index.js.map +1 -0
- package/dist/resolution/index.d.ts +3 -3
- package/dist/resolution/index.d.ts.map +1 -1
- package/dist/resolution/index.js +3 -19
- package/dist/resolution/index.js.map +1 -1
- package/dist/resolution/resolve-branding.d.ts +1 -1
- package/dist/resolution/resolve-branding.d.ts.map +1 -1
- package/dist/resolution/resolve-branding.js +14 -24
- package/dist/resolution/resolve-branding.js.map +1 -1
- package/dist/resolution/resolve-config.d.ts +2 -2
- package/dist/resolution/resolve-config.d.ts.map +1 -1
- package/dist/resolution/resolve-config.js +57 -53
- package/dist/resolution/resolve-config.js.map +1 -1
- package/dist/resolution/resolve-copy.d.ts +2 -2
- package/dist/resolution/resolve-copy.d.ts.map +1 -1
- package/dist/resolution/resolve-copy.js +35 -43
- package/dist/resolution/resolve-copy.js.map +1 -1
- package/dist/schemas/api.schemas.d.ts +7 -4
- package/dist/schemas/api.schemas.d.ts.map +1 -1
- package/dist/schemas/api.schemas.js +70 -74
- package/dist/schemas/api.schemas.js.map +1 -1
- package/dist/schemas/branding.schemas.js +17 -20
- package/dist/schemas/branding.schemas.js.map +1 -1
- package/dist/schemas/config.schemas.d.ts +1 -1
- package/dist/schemas/config.schemas.d.ts.map +1 -1
- package/dist/schemas/config.schemas.js +64 -70
- package/dist/schemas/config.schemas.js.map +1 -1
- package/dist/schemas/index.d.ts +4 -4
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +4 -20
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/modes.schemas.js +60 -63
- package/dist/schemas/modes.schemas.js.map +1 -1
- package/dist/security/escape.d.ts.map +1 -1
- package/dist/security/escape.js +12 -17
- package/dist/security/escape.js.map +1 -1
- package/dist/security/index.d.ts +2 -2
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +2 -18
- package/dist/security/index.js.map +1 -1
- package/dist/security/validators.js +9 -20
- package/dist/security/validators.js.map +1 -1
- package/dist/styles/css-variables.d.ts +1 -1
- package/dist/styles/css-variables.d.ts.map +1 -1
- package/dist/styles/css-variables.js +18 -27
- package/dist/styles/css-variables.js.map +1 -1
- package/dist/styles/index.d.ts +3 -3
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/styles/index.js +3 -19
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/stylesheet.d.ts +1 -1
- package/dist/styles/stylesheet.d.ts.map +1 -1
- package/dist/styles/stylesheet.js +20 -27
- package/dist/styles/stylesheet.js.map +1 -1
- package/dist/styles/tokens.js +1 -4
- package/dist/styles/tokens.js.map +1 -1
- package/dist/templates/base/base-template.d.ts +3 -3
- package/dist/templates/base/base-template.d.ts.map +1 -1
- package/dist/templates/base/base-template.js +31 -35
- package/dist/templates/base/base-template.js.map +1 -1
- package/dist/templates/base/components.js +49 -65
- package/dist/templates/base/components.js.map +1 -1
- package/dist/templates/base/index.d.ts +2 -2
- package/dist/templates/base/index.d.ts.map +1 -1
- package/dist/templates/base/index.js +2 -20
- package/dist/templates/base/index.js.map +1 -1
- package/dist/templates/index.d.ts +9 -9
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +9 -25
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/modes/consent-only.template.d.ts +2 -2
- package/dist/templates/modes/consent-only.template.d.ts.map +1 -1
- package/dist/templates/modes/consent-only.template.js +11 -15
- package/dist/templates/modes/consent-only.template.js.map +1 -1
- package/dist/templates/modes/credentials.template.d.ts +4 -4
- package/dist/templates/modes/credentials.template.d.ts.map +1 -1
- package/dist/templates/modes/credentials.template.js +20 -24
- package/dist/templates/modes/credentials.template.js.map +1 -1
- package/dist/templates/modes/index.d.ts +6 -6
- package/dist/templates/modes/index.d.ts.map +1 -1
- package/dist/templates/modes/index.js +6 -16
- package/dist/templates/modes/index.js.map +1 -1
- package/dist/templates/modes/magic-link.template.d.ts +2 -2
- package/dist/templates/modes/magic-link.template.d.ts.map +1 -1
- package/dist/templates/modes/magic-link.template.js +14 -18
- package/dist/templates/modes/magic-link.template.js.map +1 -1
- package/dist/templates/modes/oauth.template.d.ts +2 -2
- package/dist/templates/modes/oauth.template.d.ts.map +1 -1
- package/dist/templates/modes/oauth.template.js +21 -25
- package/dist/templates/modes/oauth.template.js.map +1 -1
- package/dist/templates/modes/otp.template.d.ts +2 -2
- package/dist/templates/modes/otp.template.d.ts.map +1 -1
- package/dist/templates/modes/otp.template.js +17 -21
- package/dist/templates/modes/otp.template.js.map +1 -1
- package/dist/templates/modes/success.template.d.ts +2 -2
- package/dist/templates/modes/success.template.d.ts.map +1 -1
- package/dist/templates/modes/success.template.js +24 -29
- package/dist/templates/modes/success.template.js.map +1 -1
- package/dist/templates/registry.d.ts +4 -4
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +30 -38
- package/dist/templates/registry.js.map +1 -1
- package/dist/types/api.types.d.ts +6 -5
- package/dist/types/api.types.d.ts.map +1 -1
- package/dist/types/api.types.js +1 -2
- package/dist/types/api.types.js.map +1 -1
- package/dist/types/branding.types.js +1 -2
- package/dist/types/branding.types.js.map +1 -1
- package/dist/types/config.types.d.ts +5 -5
- package/dist/types/config.types.d.ts.map +1 -1
- package/dist/types/config.types.js +1 -2
- package/dist/types/config.types.js.map +1 -1
- package/dist/types/copy.types.js +1 -2
- package/dist/types/copy.types.js.map +1 -1
- package/dist/types/index.d.ts +6 -6
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +6 -22
- package/dist/types/index.js.map +1 -1
- package/dist/types/modes.types.js +1 -4
- package/dist/types/modes.types.js.map +1 -1
- package/dist/types/page.types.d.ts +6 -6
- package/dist/types/page.types.d.ts.map +1 -1
- package/dist/types/page.types.js +1 -2
- package/dist/types/page.types.js.map +1 -1
- package/package.json +41 -4
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Wrappers for Consent Web Components
|
|
3
|
+
*
|
|
4
|
+
* Uses @lit/react to create React components from Lit web components.
|
|
5
|
+
* This enables using the same components in AgentShield (React/Next.js).
|
|
6
|
+
*
|
|
7
|
+
* @module react
|
|
8
|
+
*/
|
|
9
|
+
import { type EventName } from '@lit/react';
|
|
10
|
+
import { ConsentButton } from '../components/consent-button.js';
|
|
11
|
+
import { ConsentCheckbox } from '../components/consent-checkbox.js';
|
|
12
|
+
import { ConsentInput } from '../components/consent-input.js';
|
|
13
|
+
import { ConsentShell } from '../components/consent-shell.js';
|
|
14
|
+
import { ConsentPermissions } from '../components/consent-permissions.js';
|
|
15
|
+
import { ConsentTerms } from '../components/consent-terms.js';
|
|
16
|
+
import { ConsentOAuthButton } from '../components/consent-oauth-button.js';
|
|
17
|
+
import { ConsentOTPInput } from '../components/consent-otp-input.js';
|
|
18
|
+
import { McpConsent } from '../components/mcp-consent.js';
|
|
19
|
+
/**
|
|
20
|
+
* React wrapper for consent-button
|
|
21
|
+
*/
|
|
22
|
+
export declare const ConsentButtonReact: import("@lit/react").ReactWebComponent<ConsentButton, {
|
|
23
|
+
onClick: EventName<MouseEvent>;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* React wrapper for consent-checkbox
|
|
27
|
+
*/
|
|
28
|
+
export declare const ConsentCheckboxReact: import("@lit/react").ReactWebComponent<ConsentCheckbox, {
|
|
29
|
+
onChange: EventName<CustomEvent<{
|
|
30
|
+
checked: boolean;
|
|
31
|
+
value: string;
|
|
32
|
+
}>>;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* React wrapper for consent-input
|
|
36
|
+
*/
|
|
37
|
+
export declare const ConsentInputReact: import("@lit/react").ReactWebComponent<ConsentInput, {
|
|
38
|
+
onInput: EventName<Event>;
|
|
39
|
+
onChange: EventName<Event>;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* React wrapper for consent-shell
|
|
43
|
+
*/
|
|
44
|
+
export declare const ConsentShellReact: import("@lit/react").ReactWebComponent<ConsentShell, {}>;
|
|
45
|
+
/**
|
|
46
|
+
* React wrapper for consent-permissions
|
|
47
|
+
*/
|
|
48
|
+
export declare const ConsentPermissionsReact: import("@lit/react").ReactWebComponent<ConsentPermissions, {
|
|
49
|
+
onChange: EventName<CustomEvent<{
|
|
50
|
+
selected: string[];
|
|
51
|
+
}>>;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* React wrapper for consent-terms
|
|
55
|
+
*/
|
|
56
|
+
export declare const ConsentTermsReact: import("@lit/react").ReactWebComponent<ConsentTerms, {
|
|
57
|
+
onChange: EventName<CustomEvent<{
|
|
58
|
+
checked: boolean;
|
|
59
|
+
value: string;
|
|
60
|
+
}>>;
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
* OAuth click event detail
|
|
64
|
+
*/
|
|
65
|
+
export interface OAuthClickDetail {
|
|
66
|
+
provider: string;
|
|
67
|
+
url: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* React wrapper for consent-oauth-button
|
|
71
|
+
*/
|
|
72
|
+
export declare const ConsentOAuthButtonReact: import("@lit/react").ReactWebComponent<ConsentOAuthButton, {
|
|
73
|
+
onOAuthClick: EventName<CustomEvent<OAuthClickDetail>>;
|
|
74
|
+
}>;
|
|
75
|
+
/**
|
|
76
|
+
* React wrapper for consent-otp-input
|
|
77
|
+
*
|
|
78
|
+
* Events:
|
|
79
|
+
* - onComplete: Fired when all digits are entered (detail: { value: string })
|
|
80
|
+
* - onChange: Fired when value changes (detail: { value: string })
|
|
81
|
+
*/
|
|
82
|
+
export declare const ConsentOTPInputReact: import("@lit/react").ReactWebComponent<ConsentOTPInput, {
|
|
83
|
+
onComplete: EventName<CustomEvent<{
|
|
84
|
+
value: string;
|
|
85
|
+
}>>;
|
|
86
|
+
onChange: EventName<CustomEvent<{
|
|
87
|
+
value: string;
|
|
88
|
+
}>>;
|
|
89
|
+
}>;
|
|
90
|
+
/**
|
|
91
|
+
* React wrapper for mcp-consent (full consent flow)
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```tsx
|
|
95
|
+
* import { McpConsentReact } from '@kya-os/consent/react';
|
|
96
|
+
*
|
|
97
|
+
* <McpConsentReact
|
|
98
|
+
* config={{ branding: { primaryColor: '#2563eb' } }}
|
|
99
|
+
* tool="greet"
|
|
100
|
+
* scopes={['read:profile']}
|
|
101
|
+
* agentDid="did:key:z123"
|
|
102
|
+
* sessionId="sess_123"
|
|
103
|
+
* projectId="proj_123"
|
|
104
|
+
* serverUrl="https://example.com"
|
|
105
|
+
* onApprove={(e) => console.log('Approved', e.detail)}
|
|
106
|
+
* onDeny={() => console.log('Denied')}
|
|
107
|
+
* onError={(e) => console.log('Error', e.detail)}
|
|
108
|
+
* />
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
export declare const McpConsentReact: import("@lit/react").ReactWebComponent<McpConsent, {
|
|
112
|
+
onApprove: EventName<CustomEvent>;
|
|
113
|
+
onDeny: EventName<CustomEvent>;
|
|
114
|
+
onError: EventName<CustomEvent<{
|
|
115
|
+
error: string;
|
|
116
|
+
}>>;
|
|
117
|
+
}>;
|
|
118
|
+
export type { ButtonVariant } from '../components/consent-button.js';
|
|
119
|
+
export type { InputType } from '../components/consent-input.js';
|
|
120
|
+
export type { PermissionItem } from '../components/consent-permissions.js';
|
|
121
|
+
export type { OAuthProvider } from '../components/consent-oauth-button.js';
|
|
122
|
+
export type { OAuthIdentity, ConsentApproveDetail, ConsentErrorDetail, } from '../components/mcp-consent.js';
|
|
123
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAI7D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAM1D;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W,CAAC;aACpB,SAAS,CAAC,WAAW,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;EAE3E,CAAC;AAMH,YAAY,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,YAAY,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC3E,YAAY,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Wrappers for Consent Web Components
|
|
3
|
+
*
|
|
4
|
+
* Uses @lit/react to create React components from Lit web components.
|
|
5
|
+
* This enables using the same components in AgentShield (React/Next.js).
|
|
6
|
+
*
|
|
7
|
+
* @module react
|
|
8
|
+
*/
|
|
9
|
+
import { createComponent } from '@lit/react';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
// Core components
|
|
12
|
+
import { ConsentButton } from '../components/consent-button.js';
|
|
13
|
+
import { ConsentCheckbox } from '../components/consent-checkbox.js';
|
|
14
|
+
import { ConsentInput } from '../components/consent-input.js';
|
|
15
|
+
import { ConsentShell } from '../components/consent-shell.js';
|
|
16
|
+
// Extended components
|
|
17
|
+
import { ConsentPermissions } from '../components/consent-permissions.js';
|
|
18
|
+
import { ConsentTerms } from '../components/consent-terms.js';
|
|
19
|
+
import { ConsentOAuthButton } from '../components/consent-oauth-button.js';
|
|
20
|
+
import { ConsentOTPInput } from '../components/consent-otp-input.js';
|
|
21
|
+
// Composite component
|
|
22
|
+
import { McpConsent } from '../components/mcp-consent.js';
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// Core Component Wrappers
|
|
25
|
+
// ============================================================================
|
|
26
|
+
/**
|
|
27
|
+
* React wrapper for consent-button
|
|
28
|
+
*/
|
|
29
|
+
export const ConsentButtonReact = createComponent({
|
|
30
|
+
tagName: 'consent-button',
|
|
31
|
+
elementClass: ConsentButton,
|
|
32
|
+
react: React,
|
|
33
|
+
events: {
|
|
34
|
+
onClick: 'click',
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* React wrapper for consent-checkbox
|
|
39
|
+
*/
|
|
40
|
+
export const ConsentCheckboxReact = createComponent({
|
|
41
|
+
tagName: 'consent-checkbox',
|
|
42
|
+
elementClass: ConsentCheckbox,
|
|
43
|
+
react: React,
|
|
44
|
+
events: {
|
|
45
|
+
onChange: 'change',
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* React wrapper for consent-input
|
|
50
|
+
*/
|
|
51
|
+
export const ConsentInputReact = createComponent({
|
|
52
|
+
tagName: 'consent-input',
|
|
53
|
+
elementClass: ConsentInput,
|
|
54
|
+
react: React,
|
|
55
|
+
events: {
|
|
56
|
+
onInput: 'input',
|
|
57
|
+
onChange: 'change',
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* React wrapper for consent-shell
|
|
62
|
+
*/
|
|
63
|
+
export const ConsentShellReact = createComponent({
|
|
64
|
+
tagName: 'consent-shell',
|
|
65
|
+
elementClass: ConsentShell,
|
|
66
|
+
react: React,
|
|
67
|
+
});
|
|
68
|
+
// ============================================================================
|
|
69
|
+
// Extended Component Wrappers
|
|
70
|
+
// ============================================================================
|
|
71
|
+
/**
|
|
72
|
+
* React wrapper for consent-permissions
|
|
73
|
+
*/
|
|
74
|
+
export const ConsentPermissionsReact = createComponent({
|
|
75
|
+
tagName: 'consent-permissions',
|
|
76
|
+
elementClass: ConsentPermissions,
|
|
77
|
+
react: React,
|
|
78
|
+
events: {
|
|
79
|
+
onChange: 'change',
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
/**
|
|
83
|
+
* React wrapper for consent-terms
|
|
84
|
+
*/
|
|
85
|
+
export const ConsentTermsReact = createComponent({
|
|
86
|
+
tagName: 'consent-terms',
|
|
87
|
+
elementClass: ConsentTerms,
|
|
88
|
+
react: React,
|
|
89
|
+
events: {
|
|
90
|
+
onChange: 'change',
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* React wrapper for consent-oauth-button
|
|
95
|
+
*/
|
|
96
|
+
export const ConsentOAuthButtonReact = createComponent({
|
|
97
|
+
tagName: 'consent-oauth-button',
|
|
98
|
+
elementClass: ConsentOAuthButton,
|
|
99
|
+
react: React,
|
|
100
|
+
events: {
|
|
101
|
+
onOAuthClick: 'oauth-click',
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
/**
|
|
105
|
+
* React wrapper for consent-otp-input
|
|
106
|
+
*
|
|
107
|
+
* Events:
|
|
108
|
+
* - onComplete: Fired when all digits are entered (detail: { value: string })
|
|
109
|
+
* - onChange: Fired when value changes (detail: { value: string })
|
|
110
|
+
*/
|
|
111
|
+
export const ConsentOTPInputReact = createComponent({
|
|
112
|
+
tagName: 'consent-otp-input',
|
|
113
|
+
elementClass: ConsentOTPInput,
|
|
114
|
+
react: React,
|
|
115
|
+
events: {
|
|
116
|
+
onComplete: 'complete',
|
|
117
|
+
onChange: 'change',
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
// ============================================================================
|
|
121
|
+
// Composite Component Wrapper
|
|
122
|
+
// ============================================================================
|
|
123
|
+
/**
|
|
124
|
+
* React wrapper for mcp-consent (full consent flow)
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```tsx
|
|
128
|
+
* import { McpConsentReact } from '@kya-os/consent/react';
|
|
129
|
+
*
|
|
130
|
+
* <McpConsentReact
|
|
131
|
+
* config={{ branding: { primaryColor: '#2563eb' } }}
|
|
132
|
+
* tool="greet"
|
|
133
|
+
* scopes={['read:profile']}
|
|
134
|
+
* agentDid="did:key:z123"
|
|
135
|
+
* sessionId="sess_123"
|
|
136
|
+
* projectId="proj_123"
|
|
137
|
+
* serverUrl="https://example.com"
|
|
138
|
+
* onApprove={(e) => console.log('Approved', e.detail)}
|
|
139
|
+
* onDeny={() => console.log('Denied')}
|
|
140
|
+
* onError={(e) => console.log('Error', e.detail)}
|
|
141
|
+
* />
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
export const McpConsentReact = createComponent({
|
|
145
|
+
tagName: 'mcp-consent',
|
|
146
|
+
elementClass: McpConsent,
|
|
147
|
+
react: React,
|
|
148
|
+
events: {
|
|
149
|
+
onApprove: 'mcp-consent:approve',
|
|
150
|
+
onDeny: 'mcp-consent:deny',
|
|
151
|
+
onError: 'mcp-consent:error',
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAkB,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,kBAAkB;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,sBAAsB;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,sBAAsB;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E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ClF;CACF,CAAC,CAAC;AAUH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAe,CAAC;IACrD,OAAO,EAAE,sBAAsB;IAC/B,YAAY,EAAE,kBAAkB;IAChC,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,YAAY,EAAE,aAAyD;KACxE;CACF,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC;IAClD,OAAO,EAAE,mBAAmB;IAC5B,YAAY,EAAE,eAAe;IAC7B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,UAAU,EAAE,UAAuD;QACnE,QAAQ,EAAE,QAAqD;KAChE;CACF,CAAC,CAAC;AAEH,+EAA+E;AAC/E,8BAA8B;AAC9B,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;IAC7C,OAAO,EAAE,aAAa;IACtB,YAAY,EAAE,UAAU;IACxB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,SAAS,EAAE,qBAA+C;QAC1D,MAAM,EAAE,kBAA4C;QACpD,OAAO,EAAE,mBAAgE;KAC1E;CACF,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @kya-os/consent/resolution
|
|
8
8
|
*/
|
|
9
|
-
export * from "./resolve-copy";
|
|
10
|
-
export * from "./resolve-branding";
|
|
11
|
-
export * from "./resolve-config";
|
|
9
|
+
export * from "./resolve-copy.js";
|
|
10
|
+
export * from "./resolve-branding.js";
|
|
11
|
+
export * from "./resolve-config.js";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
package/dist/resolution/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* Consent Resolution Utilities
|
|
4
3
|
*
|
|
@@ -7,22 +6,7 @@
|
|
|
7
6
|
*
|
|
8
7
|
* @module @kya-os/consent/resolution
|
|
9
8
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
-
}
|
|
16
|
-
Object.defineProperty(o, k2, desc);
|
|
17
|
-
}) : (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
o[k2] = m[k];
|
|
20
|
-
}));
|
|
21
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
__exportStar(require("./resolve-copy"), exports);
|
|
26
|
-
__exportStar(require("./resolve-branding"), exports);
|
|
27
|
-
__exportStar(require("./resolve-config"), exports);
|
|
9
|
+
export * from "./resolve-copy.js";
|
|
10
|
+
export * from "./resolve-branding.js";
|
|
11
|
+
export * from "./resolve-config.js";
|
|
28
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resolution/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module @kya-os/consent/resolution/resolve-branding
|
|
7
7
|
*/
|
|
8
|
-
import type { ConsentBranding, ResolvedConsentBranding, ConsentCSSVars } from "../types/branding.types";
|
|
8
|
+
import type { ConsentBranding, ResolvedConsentBranding, ConsentCSSVars } from "../types/branding.types.js";
|
|
9
9
|
/**
|
|
10
10
|
* Validate hex color format
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-branding.d.ts","sourceRoot":"","sources":["../../src/resolution/resolve-branding.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"resolve-branding.d.ts","sourceRoot":"","sources":["../../src/resolution/resolve-branding.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAI3G;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,IAAI,MAAM,CAG1E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAKrF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,GAAG,IAAI,MAAM,CAQjE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKvE;AAoBD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,cAAc,CAOjB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,CAAC,EAAE,eAAe,GACzB,uBAAuB,CA2BzB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAWrE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,eAAe,EACrB,QAAQ,CAAC,EAAE,eAAe,GACzB,eAAe,CASjB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* Branding Resolution
|
|
4
3
|
*
|
|
@@ -6,24 +5,15 @@
|
|
|
6
5
|
*
|
|
7
6
|
* @module @kya-os/consent/resolution/resolve-branding
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.sanitizeColor = sanitizeColor;
|
|
12
|
-
exports.isValidUrl = isValidUrl;
|
|
13
|
-
exports.sanitizeUrl = sanitizeUrl;
|
|
14
|
-
exports.generateBrandingCSSVars = generateBrandingCSSVars;
|
|
15
|
-
exports.resolveConsentBranding = resolveConsentBranding;
|
|
16
|
-
exports.hasCustomBranding = hasCustomBranding;
|
|
17
|
-
exports.mergeBranding = mergeBranding;
|
|
18
|
-
const defaults_1 = require("../constants/defaults");
|
|
19
|
-
const colors_1 = require("../constants/colors");
|
|
8
|
+
import { DEFAULT_BRANDING } from "../constants/defaults.js";
|
|
9
|
+
import { DEFAULT_COLORS } from "../constants/colors.js";
|
|
20
10
|
/**
|
|
21
11
|
* Validate hex color format
|
|
22
12
|
*
|
|
23
13
|
* @param color - Color string to validate
|
|
24
14
|
* @returns True if valid hex color
|
|
25
15
|
*/
|
|
26
|
-
function isValidHexColor(color) {
|
|
16
|
+
export function isValidHexColor(color) {
|
|
27
17
|
if (!color)
|
|
28
18
|
return false;
|
|
29
19
|
return /^#[0-9A-Fa-f]{6}$/.test(color);
|
|
@@ -35,7 +25,7 @@ function isValidHexColor(color) {
|
|
|
35
25
|
* @param defaultColor - Default if invalid
|
|
36
26
|
* @returns Valid hex color
|
|
37
27
|
*/
|
|
38
|
-
function sanitizeColor(color, defaultColor) {
|
|
28
|
+
export function sanitizeColor(color, defaultColor) {
|
|
39
29
|
if (isValidHexColor(color)) {
|
|
40
30
|
return color;
|
|
41
31
|
}
|
|
@@ -47,7 +37,7 @@ function sanitizeColor(color, defaultColor) {
|
|
|
47
37
|
* @param url - URL string to validate
|
|
48
38
|
* @returns True if valid http/https URL
|
|
49
39
|
*/
|
|
50
|
-
function isValidUrl(url) {
|
|
40
|
+
export function isValidUrl(url) {
|
|
51
41
|
if (!url)
|
|
52
42
|
return false;
|
|
53
43
|
try {
|
|
@@ -64,7 +54,7 @@ function isValidUrl(url) {
|
|
|
64
54
|
* @param url - URL to sanitize
|
|
65
55
|
* @returns Valid URL or undefined
|
|
66
56
|
*/
|
|
67
|
-
function sanitizeUrl(url) {
|
|
57
|
+
export function sanitizeUrl(url) {
|
|
68
58
|
if (isValidUrl(url)) {
|
|
69
59
|
return url;
|
|
70
60
|
}
|
|
@@ -91,7 +81,7 @@ function hexToRgb(hex) {
|
|
|
91
81
|
* @param branding - Resolved branding config
|
|
92
82
|
* @returns CSS variable object
|
|
93
83
|
*/
|
|
94
|
-
function generateBrandingCSSVars(branding) {
|
|
84
|
+
export function generateBrandingCSSVars(branding) {
|
|
95
85
|
return {
|
|
96
86
|
"--consent-primary": branding.primaryColor,
|
|
97
87
|
"--consent-secondary": branding.secondaryColor,
|
|
@@ -105,10 +95,10 @@ function generateBrandingCSSVars(branding) {
|
|
|
105
95
|
* @param branding - Partial branding config
|
|
106
96
|
* @returns Fully resolved branding with CSS variables
|
|
107
97
|
*/
|
|
108
|
-
function resolveConsentBranding(branding) {
|
|
98
|
+
export function resolveConsentBranding(branding) {
|
|
109
99
|
// Sanitize and resolve colors
|
|
110
|
-
const primaryColor = sanitizeColor(branding?.primaryColor,
|
|
111
|
-
const secondaryColor = sanitizeColor(branding?.secondaryColor,
|
|
100
|
+
const primaryColor = sanitizeColor(branding?.primaryColor, DEFAULT_COLORS.PRIMARY);
|
|
101
|
+
const secondaryColor = sanitizeColor(branding?.secondaryColor, DEFAULT_COLORS.SECONDARY);
|
|
112
102
|
// Sanitize URL (only allow valid http/https)
|
|
113
103
|
const logoUrl = sanitizeUrl(branding?.logoUrl);
|
|
114
104
|
// Company name - basic sanitization (just trim, escaping happens at render)
|
|
@@ -129,13 +119,13 @@ function resolveConsentBranding(branding) {
|
|
|
129
119
|
* @param branding - Branding config
|
|
130
120
|
* @returns True if any custom values are set
|
|
131
121
|
*/
|
|
132
|
-
function hasCustomBranding(branding) {
|
|
122
|
+
export function hasCustomBranding(branding) {
|
|
133
123
|
if (!branding)
|
|
134
124
|
return false;
|
|
135
125
|
return ((branding.primaryColor !== undefined &&
|
|
136
|
-
branding.primaryColor !==
|
|
126
|
+
branding.primaryColor !== DEFAULT_BRANDING.primaryColor) ||
|
|
137
127
|
(branding.secondaryColor !== undefined &&
|
|
138
|
-
branding.secondaryColor !==
|
|
128
|
+
branding.secondaryColor !== DEFAULT_BRANDING.secondaryColor) ||
|
|
139
129
|
branding.logoUrl !== undefined ||
|
|
140
130
|
branding.companyName !== undefined);
|
|
141
131
|
}
|
|
@@ -146,7 +136,7 @@ function hasCustomBranding(branding) {
|
|
|
146
136
|
* @param override - Override values
|
|
147
137
|
* @returns Merged branding
|
|
148
138
|
*/
|
|
149
|
-
function mergeBranding(base, override) {
|
|
139
|
+
export function mergeBranding(base, override) {
|
|
150
140
|
if (!override)
|
|
151
141
|
return base;
|
|
152
142
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-branding.js","sourceRoot":"","sources":["../../src/resolution/resolve-branding.ts"],"names":[],"mappings":"
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,OAAO;QACL,YAAY;QACZ,cAAc;QACd,OAAO;QACP,WAAW;QACX,OAAO;KACR,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAA0B;IAC1D,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5B,OAAO,CACL,CAAC,QAAQ,CAAC,YAAY,KAAK,SAAS;QAClC,QAAQ,CAAC,YAAY,KAAK,gBAAgB,CAAC,YAAY,CAAC;QAC1D,CAAC,QAAQ,CAAC,cAAc,KAAK,SAAS;YACpC,QAAQ,CAAC,cAAc,KAAK,gBAAgB,CAAC,cAAc,CAAC;QAC9D,QAAQ,CAAC,OAAO,KAAK,SAAS;QAC9B,QAAQ,CAAC,WAAW,KAAK,SAAS,CACnC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC3B,IAAqB,EACrB,QAA0B;IAE1B,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAE3B,OAAO;QACL,YAAY,EAAE,QAAQ,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;QACxD,cAAc,EAAE,QAAQ,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc;QAC9D,OAAO,EAAE,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO;QACzC,WAAW,EAAE,QAAQ,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW;KACtD,CAAC;AACJ,CAAC"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module @kya-os/consent/resolution/resolve-config
|
|
7
7
|
*/
|
|
8
|
-
import type { ConsentConfig, ConsentConfigWithMeta, ResolvedConsentConfig, ConsentCustomField, ResolvedUI, ResolvedTerms, ResolvedSuccess } from "../types/config.types";
|
|
9
|
-
import type { AuthMode } from "../types/modes.types";
|
|
8
|
+
import type { ConsentConfig, ConsentConfigWithMeta, ResolvedConsentConfig, ConsentCustomField, ResolvedUI, ResolvedTerms, ResolvedSuccess } from "../types/config.types.js";
|
|
9
|
+
import type { AuthMode } from "../types/modes.types.js";
|
|
10
10
|
/**
|
|
11
11
|
* Resolve custom fields with validation
|
|
12
12
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-config.d.ts","sourceRoot":"","sources":["../../src/resolution/resolve-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"resolve-config.d.ts","sourceRoot":"","sources":["../../src/resolution/resolve-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG5K,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAMxD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,CAAC,EAAE,kBAAkB,EAAE,GAC5B,kBAAkB,EAAE,CAuBtB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAU3D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,QAAQ,CAoBlE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,qBAAqB,CAiB/D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,UAAU,CAYtE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,aAAa,CAOlF;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