@capgo/capacitor-contacts 7.0.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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PermissionState } from '@capacitor/core';\n\n/**\n * Permission state for contacts access, including the 'limited' state for iOS 18+.\n *\n * @since 1.0.0\n */\nexport type ContactsPermissionState = PermissionState | 'limited';\n\n/**\n * Type of contacts permission to request.\n *\n * @since 1.0.0\n */\nexport type ContactsPermissionType = 'readContacts' | 'writeContacts';\n\n/**\n * Status of contacts permissions.\n *\n * @since 1.0.0\n */\nexport interface PermissionStatus {\n /**\n * Permission state for reading contacts.\n *\n * @since 1.0.0\n */\n readContacts: ContactsPermissionState;\n\n /**\n * Permission state for writing contacts.\n *\n * @since 1.0.0\n */\n writeContacts: ContactsPermissionState;\n}\n\n/**\n * Options for requesting contacts permissions.\n *\n * @since 1.0.0\n */\nexport interface RequestPermissionsOptions {\n /**\n * Specific permissions to request. If not provided, all permissions will be requested.\n *\n * @since 1.0.0\n */\n permissions?: ContactsPermissionType[];\n}\n\n/**\n * Account information for a contact.\n *\n * @since 1.0.0\n */\nexport interface Account {\n /**\n * The name of the account.\n *\n * @since 1.0.0\n */\n name: string;\n\n /**\n * The type of the account.\n *\n * @since 1.0.0\n */\n type?: string;\n}\n\n/**\n * Birthday information for a contact.\n *\n * @since 1.0.0\n */\nexport interface Birthday {\n /**\n * The day of the month (1-31).\n *\n * @since 1.0.0\n */\n day?: number;\n\n /**\n * The month (1-12).\n *\n * @since 1.0.0\n */\n month?: number;\n\n /**\n * The year.\n *\n * @since 1.0.0\n */\n year?: number;\n}\n\n/**\n * Type of email address.\n *\n * @since 1.0.0\n */\nexport type EmailAddressType = 'CUSTOM' | 'HOME' | 'ICLOUD' | 'OTHER' | 'WORK';\n\n/**\n * Email address information for a contact.\n *\n * @since 1.0.0\n */\nexport interface EmailAddress {\n /**\n * The email address value.\n *\n * @since 1.0.0\n */\n value: string;\n\n /**\n * The type of email address.\n *\n * @since 1.0.0\n */\n type?: EmailAddressType;\n\n /**\n * Custom label for the email address.\n *\n * @since 1.0.0\n */\n label?: string;\n\n /**\n * Whether this is the primary email address.\n *\n * @since 1.0.0\n */\n isPrimary?: boolean;\n}\n\n/**\n * Type of phone number.\n *\n * @since 1.0.0\n */\nexport type PhoneNumberType =\n | 'ASSISTANT'\n | 'CALLBACK'\n | 'CAR'\n | 'COMPANY_MAIN'\n | 'CUSTOM'\n | 'FAX_HOME'\n | 'FAX_WORK'\n | 'HOME'\n | 'HOME_FAX'\n | 'ISDN'\n | 'MAIN'\n | 'MMS'\n | 'MOBILE'\n | 'OTHER'\n | 'OTHER_FAX'\n | 'PAGER'\n | 'RADIO'\n | 'TELEX'\n | 'TTY_TDD'\n | 'WORK'\n | 'WORK_MOBILE'\n | 'WORK_PAGER';\n\n/**\n * Phone number information for a contact.\n *\n * @since 1.0.0\n */\nexport interface PhoneNumber {\n /**\n * The phone number value.\n *\n * @since 1.0.0\n */\n value: string;\n\n /**\n * The type of phone number.\n *\n * @since 1.0.0\n */\n type?: PhoneNumberType;\n\n /**\n * Custom label for the phone number.\n *\n * @since 1.0.0\n */\n label?: string;\n\n /**\n * Whether this is the primary phone number.\n *\n * @since 1.0.0\n */\n isPrimary?: boolean;\n}\n\n/**\n * Type of postal address.\n *\n * @since 1.0.0\n */\nexport type PostalAddressType = 'CUSTOM' | 'HOME' | 'OTHER' | 'WORK';\n\n/**\n * Postal address information for a contact.\n *\n * @since 1.0.0\n */\nexport interface PostalAddress {\n /**\n * The city name.\n *\n * @since 1.0.0\n */\n city?: string;\n\n /**\n * The country name.\n *\n * @since 1.0.0\n */\n country?: string;\n\n /**\n * The formatted address string.\n *\n * @since 1.0.0\n */\n formatted?: string;\n\n /**\n * The ISO country code.\n *\n * @since 1.0.0\n */\n isoCountryCode?: string;\n\n /**\n * Whether this is the primary postal address.\n *\n * @since 1.0.0\n */\n isPrimary?: boolean;\n\n /**\n * Custom label for the postal address.\n *\n * @since 1.0.0\n */\n label?: string;\n\n /**\n * The neighborhood name.\n *\n * @since 1.0.0\n */\n neighborhood?: string;\n\n /**\n * The postal code.\n *\n * @since 1.0.0\n */\n postalCode?: string;\n\n /**\n * The state or province name.\n *\n * @since 1.0.0\n */\n state?: string;\n\n /**\n * The street address.\n *\n * @since 1.0.0\n */\n street?: string;\n\n /**\n * The type of postal address.\n *\n * @since 1.0.0\n */\n type?: PostalAddressType;\n}\n\n/**\n * Type of URL address.\n *\n * @since 1.0.0\n */\nexport type UrlAddressType = 'BLOG' | 'CUSTOM' | 'FTP' | 'HOME' | 'HOMEPAGE' | 'OTHER' | 'PROFILE' | 'SCHOOL' | 'WORK';\n\n/**\n * URL address information for a contact.\n *\n * @since 1.0.0\n */\nexport interface UrlAddress {\n /**\n * The URL value.\n *\n * @since 1.0.0\n */\n value: string;\n\n /**\n * The type of URL.\n *\n * @since 1.0.0\n */\n type?: UrlAddressType;\n\n /**\n * Custom label for the URL.\n *\n * @since 1.0.0\n */\n label?: string;\n}\n\n/**\n * Contact information.\n *\n * @since 1.0.0\n */\nexport interface Contact {\n /**\n * Unique identifier for the contact.\n *\n * @since 1.0.0\n */\n id?: string;\n\n /**\n * Account information for the contact.\n *\n * @since 1.0.0\n */\n account?: Account;\n\n /**\n * Birthday information for the contact.\n *\n * @since 1.0.0\n */\n birthday?: Birthday;\n\n /**\n * Email addresses for the contact.\n *\n * @since 1.0.0\n */\n emailAddresses?: EmailAddress[];\n\n /**\n * Family name (last name) of the contact.\n *\n * @since 1.0.0\n */\n familyName?: string;\n\n /**\n * Full name of the contact.\n *\n * @since 1.0.0\n */\n fullName?: string;\n\n /**\n * Given name (first name) of the contact.\n *\n * @since 1.0.0\n */\n givenName?: string;\n\n /**\n * Group IDs the contact belongs to.\n *\n * @since 1.0.0\n */\n groupIds?: string[];\n\n /**\n * Job title of the contact.\n *\n * @since 1.0.0\n */\n jobTitle?: string;\n\n /**\n * Middle name of the contact.\n *\n * @since 1.0.0\n */\n middleName?: string;\n\n /**\n * Name prefix (e.g., \"Dr.\", \"Mr.\", \"Ms.\") of the contact.\n *\n * @since 1.0.0\n */\n namePrefix?: string;\n\n /**\n * Name suffix (e.g., \"Jr.\", \"Sr.\", \"III\") of the contact.\n *\n * @since 1.0.0\n */\n nameSuffix?: string;\n\n /**\n * Notes about the contact.\n *\n * @since 1.0.0\n */\n note?: string;\n\n /**\n * Organization name of the contact.\n *\n * @since 1.0.0\n */\n organizationName?: string;\n\n /**\n * Phone numbers for the contact.\n *\n * @since 1.0.0\n */\n phoneNumbers?: PhoneNumber[];\n\n /**\n * Base64-encoded photo of the contact.\n *\n * @since 1.0.0\n */\n photo?: string;\n\n /**\n * Postal addresses for the contact.\n *\n * @since 1.0.0\n */\n postalAddresses?: PostalAddress[];\n\n /**\n * URL addresses for the contact.\n *\n * @since 1.0.0\n */\n urlAddresses?: UrlAddress[];\n}\n\n/**\n * Field names available in a Contact object.\n *\n * @since 1.0.0\n */\nexport type ContactField = keyof Contact;\n\n/**\n * Result from counting contacts.\n *\n * @since 1.0.0\n */\nexport interface CountContactsResult {\n /**\n * Total number of contacts.\n *\n * @since 1.0.0\n */\n count: number;\n}\n\n/**\n * Options for creating a contact.\n *\n * @since 1.0.0\n */\nexport interface CreateContactOptions {\n /**\n * Contact information to create. The 'id' field will be generated automatically.\n *\n * @since 1.0.0\n */\n contact: Omit<Contact, 'id'>;\n}\n\n/**\n * Result from creating a contact.\n *\n * @since 1.0.0\n */\nexport interface CreateContactResult {\n /**\n * The ID of the newly created contact.\n *\n * @since 1.0.0\n */\n id: string;\n}\n\n/**\n * Options for displaying the native create contact UI.\n *\n * @since 1.0.0\n */\nexport interface DisplayCreateContactOptions {\n /**\n * Optional pre-filled contact information for the create UI.\n *\n * @since 1.0.0\n */\n contact?: Omit<Contact, 'id'>;\n}\n\n/**\n * Result from displaying the native create contact UI.\n *\n * @since 1.0.0\n */\nexport interface DisplayCreateContactResult {\n /**\n * The ID of the created contact, if one was created. Undefined if the user cancelled.\n *\n * @since 1.0.0\n */\n id?: string;\n}\n\n/**\n * Options for displaying a contact by ID.\n *\n * @since 1.0.0\n */\nexport interface DisplayContactByIdOptions {\n /**\n * The ID of the contact to display.\n *\n * @since 1.0.0\n */\n id: string;\n}\n\n/**\n * Options for displaying the native update contact UI.\n *\n * @since 1.0.0\n */\nexport interface DisplayUpdateContactByIdOptions {\n /**\n * The ID of the contact to update.\n *\n * @since 1.0.0\n */\n id: string;\n}\n\n/**\n * Result from getting accounts.\n *\n * @since 1.0.0\n */\nexport interface GetAccountsResult {\n /**\n * List of accounts available on the device.\n *\n * @since 1.0.0\n */\n accounts: Account[];\n}\n\n/**\n * Options for getting a contact by ID.\n *\n * @since 1.0.0\n */\nexport interface GetContactByIdOptions {\n /**\n * The ID of the contact to retrieve.\n *\n * @since 1.0.0\n */\n id: string;\n\n /**\n * Optional list of specific fields to retrieve. If not specified, all fields are returned.\n *\n * @since 1.0.0\n */\n fields?: ContactField[];\n}\n\n/**\n * Result from getting a contact by ID.\n *\n * @since 1.0.0\n */\nexport interface GetContactByIdResult {\n /**\n * The contact, or null if not found.\n *\n * @since 1.0.0\n */\n contact: Contact | null;\n}\n\n/**\n * Options for getting contacts.\n *\n * @since 1.0.0\n */\nexport interface GetContactsOptions {\n /**\n * Optional list of specific fields to retrieve. If not specified, all fields are returned.\n *\n * @since 1.0.0\n */\n fields?: ContactField[];\n\n /**\n * Maximum number of contacts to return.\n *\n * @since 1.0.0\n */\n limit?: number;\n\n /**\n * Number of contacts to skip before starting to return results.\n *\n * @since 1.0.0\n */\n offset?: number;\n}\n\n/**\n * Result from getting contacts.\n *\n * @since 1.0.0\n */\nexport interface GetContactsResult {\n /**\n * List of contacts.\n *\n * @since 1.0.0\n */\n contacts: Contact[];\n}\n\n/**\n * Options for getting a group by ID.\n *\n * @since 1.0.0\n */\nexport interface GetGroupByIdOptions {\n /**\n * The ID of the group to retrieve.\n *\n * @since 1.0.0\n */\n id: string;\n}\n\n/**\n * Result from getting a group by ID.\n *\n * @since 1.0.0\n */\nexport interface GetGroupByIdResult {\n /**\n * The group, or null if not found.\n *\n * @since 1.0.0\n */\n group: Group | null;\n}\n\n/**\n * Result from getting groups.\n *\n * @since 1.0.0\n */\nexport interface GetGroupsResult {\n /**\n * List of groups.\n *\n * @since 1.0.0\n */\n groups: Group[];\n}\n\n/**\n * Contact group information.\n *\n * @since 1.0.0\n */\nexport interface Group {\n /**\n * Unique identifier for the group.\n *\n * @since 1.0.0\n */\n id: string;\n\n /**\n * Name of the group.\n *\n * @since 1.0.0\n */\n name: string;\n}\n\n/**\n * Options for creating a group.\n *\n * @since 1.0.0\n */\nexport interface CreateGroupOptions {\n /**\n * Group information to create. The 'id' field will be generated automatically.\n *\n * @since 1.0.0\n */\n group: Omit<Group, 'id'>;\n}\n\n/**\n * Result from creating a group.\n *\n * @since 1.0.0\n */\nexport interface CreateGroupResult {\n /**\n * The ID of the newly created group.\n *\n * @since 1.0.0\n */\n id: string;\n}\n\n/**\n * Options for deleting a contact by ID.\n *\n * @since 1.0.0\n */\nexport interface DeleteContactByIdOptions {\n /**\n * The ID of the contact to delete.\n *\n * @since 1.0.0\n */\n id: string;\n}\n\n/**\n * Options for deleting a group by ID.\n *\n * @since 1.0.0\n */\nexport interface DeleteGroupByIdOptions {\n /**\n * The ID of the group to delete.\n *\n * @since 1.0.0\n */\n id: string;\n}\n\n/**\n * Options for picking contacts using the native contact picker.\n *\n * @since 1.0.0\n */\nexport interface PickContactsOptions {\n /**\n * Optional list of specific fields to retrieve. If not specified, all fields are returned.\n *\n * @since 1.0.0\n */\n fields?: ContactField[];\n\n /**\n * Whether to allow selecting multiple contacts. Default is false.\n *\n * @since 1.0.0\n */\n multiple?: boolean;\n}\n\n/**\n * Result from picking contacts.\n *\n * @since 1.0.0\n */\nexport interface PickContactsResult {\n /**\n * List of selected contacts.\n *\n * @since 1.0.0\n */\n contacts: Contact[];\n}\n\n/**\n * Alias for PickContactsOptions.\n *\n * @since 1.0.0\n */\nexport type PickContactOptions = PickContactsOptions;\n\n/**\n * Alias for PickContactsResult.\n *\n * @since 1.0.0\n */\nexport type PickContactResult = PickContactsResult;\n\n/**\n * Options for updating a contact by ID.\n *\n * @since 1.0.0\n */\nexport interface UpdateContactByIdOptions {\n /**\n * The ID of the contact to update.\n *\n * @since 1.0.0\n */\n id: string;\n\n /**\n * Updated contact information.\n *\n * @since 1.0.0\n */\n contact: Omit<Contact, 'id'>;\n}\n\n/**\n * Result from checking if the plugin is supported on the platform.\n *\n * @since 1.0.0\n */\nexport interface IsSupportedResult {\n /**\n * Whether the plugin is supported on this platform.\n *\n * @since 1.0.0\n */\n isSupported: boolean;\n}\n\n/**\n * Result from checking if contacts are available on the device.\n *\n * @since 1.0.0\n */\nexport interface IsAvailableResult {\n /**\n * Whether contacts are available on this device.\n *\n * @since 1.0.0\n */\n isAvailable: boolean;\n}\n\n/**\n * Capacitor Contacts Plugin interface for managing device contacts.\n *\n * @since 1.0.0\n */\nexport interface CapacitorContactsPlugin {\n /**\n * Count the total number of contacts on the device.\n *\n * @returns Promise that resolves with the total count of contacts\n * @since 1.0.0\n */\n countContacts(): Promise<CountContactsResult>;\n\n /**\n * Create a new contact programmatically.\n *\n * @param options - The contact information to create\n * @returns Promise that resolves with the ID of the newly created contact\n * @since 1.0.0\n */\n createContact(options: CreateContactOptions): Promise<CreateContactResult>;\n\n /**\n * Create a new contact group.\n *\n * @param options - The group information to create\n * @returns Promise that resolves with the ID of the newly created group\n * @since 1.0.0\n */\n createGroup(options: CreateGroupOptions): Promise<CreateGroupResult>;\n\n /**\n * Delete a contact by ID.\n *\n * @param options - The ID of the contact to delete\n * @returns Promise that resolves when the contact is deleted\n * @since 1.0.0\n */\n deleteContactById(options: DeleteContactByIdOptions): Promise<void>;\n\n /**\n * Delete a group by ID.\n *\n * @param options - The ID of the group to delete\n * @returns Promise that resolves when the group is deleted\n * @since 1.0.0\n */\n deleteGroupById(options: DeleteGroupByIdOptions): Promise<void>;\n\n /**\n * Display a contact using the native contact viewer.\n *\n * @param options - The ID of the contact to display\n * @returns Promise that resolves when the viewer is closed\n * @since 1.0.0\n */\n displayContactById(options: DisplayContactByIdOptions): Promise<void>;\n\n /**\n * Display the native create contact UI.\n *\n * @param options - Optional pre-filled contact information\n * @returns Promise that resolves with the ID of the created contact, or undefined if cancelled\n * @since 1.0.0\n */\n displayCreateContact(options?: DisplayCreateContactOptions): Promise<DisplayCreateContactResult>;\n\n /**\n * Display the native update contact UI for a specific contact.\n *\n * @param options - The ID of the contact to update\n * @returns Promise that resolves when the update UI is closed\n * @since 1.0.0\n */\n displayUpdateContactById(options: DisplayUpdateContactByIdOptions): Promise<void>;\n\n /**\n * Get all accounts available on the device.\n *\n * @returns Promise that resolves with the list of accounts\n * @since 1.0.0\n */\n getAccounts(): Promise<GetAccountsResult>;\n\n /**\n * Get a specific contact by ID.\n *\n * @param options - The ID and optional fields to retrieve\n * @returns Promise that resolves with the contact, or null if not found\n * @since 1.0.0\n */\n getContactById(options: GetContactByIdOptions): Promise<GetContactByIdResult>;\n\n /**\n * Get all contacts from the device.\n *\n * @param options - Optional filters and pagination options\n * @returns Promise that resolves with the list of contacts\n * @since 1.0.0\n */\n getContacts(options?: GetContactsOptions): Promise<GetContactsResult>;\n\n /**\n * Get a specific group by ID.\n *\n * @param options - The ID of the group to retrieve\n * @returns Promise that resolves with the group, or null if not found\n * @since 1.0.0\n */\n getGroupById(options: GetGroupByIdOptions): Promise<GetGroupByIdResult>;\n\n /**\n * Get all contact groups.\n *\n * @returns Promise that resolves with the list of groups\n * @since 1.0.0\n */\n getGroups(): Promise<GetGroupsResult>;\n\n /**\n * Check if contacts are available on the device.\n *\n * @returns Promise that resolves with availability status\n * @since 1.0.0\n */\n isAvailable(): Promise<IsAvailableResult>;\n\n /**\n * Check if the plugin is supported on the current platform.\n *\n * @returns Promise that resolves with support status\n * @since 1.0.0\n */\n isSupported(): Promise<IsSupportedResult>;\n\n /**\n * Open the device's contacts settings.\n *\n * @returns Promise that resolves when the settings are opened\n * @since 1.0.0\n */\n openSettings(): Promise<void>;\n\n /**\n * Pick a single contact using the native contact picker.\n *\n * @param options - Optional fields to retrieve and picker configuration\n * @returns Promise that resolves with the selected contact(s)\n * @since 1.0.0\n */\n pickContact(options?: PickContactOptions): Promise<PickContactResult>;\n\n /**\n * Pick one or more contacts using the native contact picker.\n *\n * @param options - Optional fields to retrieve and picker configuration\n * @returns Promise that resolves with the selected contacts\n * @since 1.0.0\n */\n pickContacts(options?: PickContactsOptions): Promise<PickContactsResult>;\n\n /**\n * Update an existing contact by ID.\n *\n * @param options - The ID and updated contact information\n * @returns Promise that resolves when the contact is updated\n * @since 1.0.0\n */\n updateContactById(options: UpdateContactByIdOptions): Promise<void>;\n\n /**\n * Check the current permission status for contacts.\n *\n * @returns Promise that resolves with the current permission status\n * @since 1.0.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request permissions to access contacts.\n *\n * @param options - Optional specific permissions to request\n * @returns Promise that resolves with the updated permission status\n * @since 1.0.0\n */\n requestPermissions(options?: RequestPermissionsOptions): Promise<PermissionStatus>;\n\n /**\n * Get the native Capacitor plugin version.\n *\n * @returns Promise that resolves with the plugin version\n * @since 1.0.0\n */\n getPluginVersion(): Promise<{ version: string }>;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { CapacitorContactsPlugin } from './definitions';
2
+ declare const CapacitorContacts: CapacitorContactsPlugin;
3
+ export * from './definitions';
4
+ export { CapacitorContacts };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const CapacitorContacts = registerPlugin('CapacitorContacts', {
3
+ web: () => import('./web').then((m) => new m.CapacitorContactsWeb()),
4
+ });
5
+ export * from './definitions';
6
+ export { CapacitorContacts };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,iBAAiB,GAAG,cAAc,CAA0B,mBAAmB,EAAE;IACrF,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;CACrE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { CapacitorContactsPlugin } from './definitions';\n\nconst CapacitorContacts = registerPlugin<CapacitorContactsPlugin>('CapacitorContacts', {\n web: () => import('./web').then((m) => new m.CapacitorContactsWeb()),\n});\n\nexport * from './definitions';\nexport { CapacitorContacts };\n"]}
@@ -0,0 +1,28 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { CapacitorContactsPlugin, CountContactsResult, CreateContactOptions, CreateContactResult, CreateGroupOptions, CreateGroupResult, DeleteContactByIdOptions, DeleteGroupByIdOptions, DisplayContactByIdOptions, DisplayCreateContactOptions, DisplayCreateContactResult, DisplayUpdateContactByIdOptions, GetAccountsResult, GetContactByIdOptions, GetContactByIdResult, GetContactsOptions, GetContactsResult, GetGroupByIdOptions, GetGroupByIdResult, GetGroupsResult, IsAvailableResult, IsSupportedResult, PermissionStatus, PickContactOptions, PickContactResult, PickContactsOptions, PickContactsResult, RequestPermissionsOptions, UpdateContactByIdOptions } from './definitions';
3
+ export declare class CapacitorContactsWeb extends WebPlugin implements CapacitorContactsPlugin {
4
+ countContacts(): Promise<CountContactsResult>;
5
+ createContact(_options: CreateContactOptions): Promise<CreateContactResult>;
6
+ createGroup(_options: CreateGroupOptions): Promise<CreateGroupResult>;
7
+ deleteContactById(_options: DeleteContactByIdOptions): Promise<void>;
8
+ deleteGroupById(_options: DeleteGroupByIdOptions): Promise<void>;
9
+ displayContactById(_options: DisplayContactByIdOptions): Promise<void>;
10
+ displayCreateContact(_options?: DisplayCreateContactOptions): Promise<DisplayCreateContactResult>;
11
+ displayUpdateContactById(_options: DisplayUpdateContactByIdOptions): Promise<void>;
12
+ getAccounts(): Promise<GetAccountsResult>;
13
+ getContactById(_options: GetContactByIdOptions): Promise<GetContactByIdResult>;
14
+ getContacts(_options?: GetContactsOptions): Promise<GetContactsResult>;
15
+ getGroupById(_options: GetGroupByIdOptions): Promise<GetGroupByIdResult>;
16
+ getGroups(): Promise<GetGroupsResult>;
17
+ isAvailable(): Promise<IsAvailableResult>;
18
+ isSupported(): Promise<IsSupportedResult>;
19
+ openSettings(): Promise<void>;
20
+ pickContact(_options?: PickContactOptions): Promise<PickContactResult>;
21
+ pickContacts(_options?: PickContactsOptions): Promise<PickContactsResult>;
22
+ updateContactById(_options: UpdateContactByIdOptions): Promise<void>;
23
+ checkPermissions(): Promise<PermissionStatus>;
24
+ requestPermissions(_options?: RequestPermissionsOptions): Promise<PermissionStatus>;
25
+ getPluginVersion(): Promise<{
26
+ version: string;
27
+ }>;
28
+ }
@@ -0,0 +1,70 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ export class CapacitorContactsWeb extends WebPlugin {
3
+ async countContacts() {
4
+ throw this.unavailable('Contacts API not available on the web implementation.');
5
+ }
6
+ async createContact(_options) {
7
+ throw this.unavailable('Contacts API not available on the web implementation.');
8
+ }
9
+ async createGroup(_options) {
10
+ throw this.unavailable('Contacts API not available on the web implementation.');
11
+ }
12
+ async deleteContactById(_options) {
13
+ throw this.unavailable('Contacts API not available on the web implementation.');
14
+ }
15
+ async deleteGroupById(_options) {
16
+ throw this.unavailable('Contacts API not available on the web implementation.');
17
+ }
18
+ async displayContactById(_options) {
19
+ throw this.unavailable('Contacts API not available on the web implementation.');
20
+ }
21
+ async displayCreateContact(_options) {
22
+ throw this.unavailable('Contacts API not available on the web implementation.');
23
+ }
24
+ async displayUpdateContactById(_options) {
25
+ throw this.unavailable('Contacts API not available on the web implementation.');
26
+ }
27
+ async getAccounts() {
28
+ throw this.unavailable('Contacts API not available on the web implementation.');
29
+ }
30
+ async getContactById(_options) {
31
+ throw this.unavailable('Contacts API not available on the web implementation.');
32
+ }
33
+ async getContacts(_options) {
34
+ throw this.unavailable('Contacts API not available on the web implementation.');
35
+ }
36
+ async getGroupById(_options) {
37
+ throw this.unavailable('Contacts API not available on the web implementation.');
38
+ }
39
+ async getGroups() {
40
+ throw this.unavailable('Contacts API not available on the web implementation.');
41
+ }
42
+ async isAvailable() {
43
+ return { isAvailable: false };
44
+ }
45
+ async isSupported() {
46
+ return { isSupported: false };
47
+ }
48
+ async openSettings() {
49
+ throw this.unavailable('Contacts API not available on the web implementation.');
50
+ }
51
+ async pickContact(_options) {
52
+ throw this.unavailable('Contacts API not available on the web implementation.');
53
+ }
54
+ async pickContacts(_options) {
55
+ throw this.unavailable('Contacts API not available on the web implementation.');
56
+ }
57
+ async updateContactById(_options) {
58
+ throw this.unavailable('Contacts API not available on the web implementation.');
59
+ }
60
+ async checkPermissions() {
61
+ return { readContacts: 'denied', writeContacts: 'denied' };
62
+ }
63
+ async requestPermissions(_options) {
64
+ return { readContacts: 'denied', writeContacts: 'denied' };
65
+ }
66
+ async getPluginVersion() {
67
+ return { version: 'web' };
68
+ }
69
+ }
70
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAkC5C,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IACjD,KAAK,CAAC,aAAa;QACjB,MAAM,IAAI,CAAC,WAAW,CAAC,uDAAuD,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,QAA8B;QAChD,MAAM,IAAI,CAAC,WA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KAAK,EAAE,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,WAAW;QACf,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;IAChC,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,WAAW,CAAC,uDAAuD,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,QAA6B;QAC7C,MAAM,IAAI,CAAC,WAAW,CAAC,uDAAuD,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAA8B;QAC/C,MAAM,IAAI,CAAC,WAAW,CAAC,uDAAuD,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,QAAkC;QACxD,MAAM,IAAI,CAAC,WAAW,CAAC,uDAAuD,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,QAAoC;QAC3D,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n CapacitorContactsPlugin,\n CountContactsResult,\n CreateContactOptions,\n CreateContactResult,\n CreateGroupOptions,\n CreateGroupResult,\n DeleteContactByIdOptions,\n DeleteGroupByIdOptions,\n DisplayContactByIdOptions,\n DisplayCreateContactOptions,\n DisplayCreateContactResult,\n DisplayUpdateContactByIdOptions,\n GetAccountsResult,\n GetContactByIdOptions,\n GetContactByIdResult,\n GetContactsOptions,\n GetContactsResult,\n GetGroupByIdOptions,\n GetGroupByIdResult,\n GetGroupsResult,\n IsAvailableResult,\n IsSupportedResult,\n PermissionStatus,\n PickContactOptions,\n PickContactResult,\n PickContactsOptions,\n PickContactsResult,\n RequestPermissionsOptions,\n UpdateContactByIdOptions,\n} from './definitions';\n\nexport class CapacitorContactsWeb extends WebPlugin implements CapacitorContactsPlugin {\n async countContacts(): Promise<CountContactsResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async createContact(_options: CreateContactOptions): Promise<CreateContactResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async createGroup(_options: CreateGroupOptions): Promise<CreateGroupResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async deleteContactById(_options: DeleteContactByIdOptions): Promise<void> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async deleteGroupById(_options: DeleteGroupByIdOptions): Promise<void> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async displayContactById(_options: DisplayContactByIdOptions): Promise<void> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async displayCreateContact(_options?: DisplayCreateContactOptions): Promise<DisplayCreateContactResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async displayUpdateContactById(_options: DisplayUpdateContactByIdOptions): Promise<void> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async getAccounts(): Promise<GetAccountsResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async getContactById(_options: GetContactByIdOptions): Promise<GetContactByIdResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async getContacts(_options?: GetContactsOptions): Promise<GetContactsResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async getGroupById(_options: GetGroupByIdOptions): Promise<GetGroupByIdResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async getGroups(): Promise<GetGroupsResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async isAvailable(): Promise<IsAvailableResult> {\n return { isAvailable: false };\n }\n\n async isSupported(): Promise<IsSupportedResult> {\n return { isSupported: false };\n }\n\n async openSettings(): Promise<void> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async pickContact(_options?: PickContactOptions): Promise<PickContactResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async pickContacts(_options?: PickContactsOptions): Promise<PickContactsResult> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async updateContactById(_options: UpdateContactByIdOptions): Promise<void> {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n\n async checkPermissions(): Promise<PermissionStatus> {\n return { readContacts: 'denied', writeContacts: 'denied' };\n }\n\n async requestPermissions(_options?: RequestPermissionsOptions): Promise<PermissionStatus> {\n return { readContacts: 'denied', writeContacts: 'denied' };\n }\n\n async getPluginVersion(): Promise<{ version: string }> {\n return { version: 'web' };\n }\n}\n"]}
@@ -0,0 +1,84 @@
1
+ 'use strict';
2
+
3
+ var core = require('@capacitor/core');
4
+
5
+ const CapacitorContacts = core.registerPlugin('CapacitorContacts', {
6
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorContactsWeb()),
7
+ });
8
+
9
+ class CapacitorContactsWeb extends core.WebPlugin {
10
+ async countContacts() {
11
+ throw this.unavailable('Contacts API not available on the web implementation.');
12
+ }
13
+ async createContact(_options) {
14
+ throw this.unavailable('Contacts API not available on the web implementation.');
15
+ }
16
+ async createGroup(_options) {
17
+ throw this.unavailable('Contacts API not available on the web implementation.');
18
+ }
19
+ async deleteContactById(_options) {
20
+ throw this.unavailable('Contacts API not available on the web implementation.');
21
+ }
22
+ async deleteGroupById(_options) {
23
+ throw this.unavailable('Contacts API not available on the web implementation.');
24
+ }
25
+ async displayContactById(_options) {
26
+ throw this.unavailable('Contacts API not available on the web implementation.');
27
+ }
28
+ async displayCreateContact(_options) {
29
+ throw this.unavailable('Contacts API not available on the web implementation.');
30
+ }
31
+ async displayUpdateContactById(_options) {
32
+ throw this.unavailable('Contacts API not available on the web implementation.');
33
+ }
34
+ async getAccounts() {
35
+ throw this.unavailable('Contacts API not available on the web implementation.');
36
+ }
37
+ async getContactById(_options) {
38
+ throw this.unavailable('Contacts API not available on the web implementation.');
39
+ }
40
+ async getContacts(_options) {
41
+ throw this.unavailable('Contacts API not available on the web implementation.');
42
+ }
43
+ async getGroupById(_options) {
44
+ throw this.unavailable('Contacts API not available on the web implementation.');
45
+ }
46
+ async getGroups() {
47
+ throw this.unavailable('Contacts API not available on the web implementation.');
48
+ }
49
+ async isAvailable() {
50
+ return { isAvailable: false };
51
+ }
52
+ async isSupported() {
53
+ return { isSupported: false };
54
+ }
55
+ async openSettings() {
56
+ throw this.unavailable('Contacts API not available on the web implementation.');
57
+ }
58
+ async pickContact(_options) {
59
+ throw this.unavailable('Contacts API not available on the web implementation.');
60
+ }
61
+ async pickContacts(_options) {
62
+ throw this.unavailable('Contacts API not available on the web implementation.');
63
+ }
64
+ async updateContactById(_options) {
65
+ throw this.unavailable('Contacts API not available on the web implementation.');
66
+ }
67
+ async checkPermissions() {
68
+ return { readContacts: 'denied', writeContacts: 'denied' };
69
+ }
70
+ async requestPermissions(_options) {
71
+ return { readContacts: 'denied', writeContacts: 'denied' };
72
+ }
73
+ async getPluginVersion() {
74
+ return { version: 'web' };
75
+ }
76
+ }
77
+
78
+ var web = /*#__PURE__*/Object.freeze({
79
+ __proto__: null,
80
+ CapacitorContactsWeb: CapacitorContactsWeb
81
+ });
82
+
83
+ exports.CapacitorContacts = CapacitorContacts;
84
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorContacts = registerPlugin('CapacitorContacts', {\n web: () => import('./web').then((m) => new m.CapacitorContactsWeb()),\n});\nexport * from './definitions';\nexport { CapacitorContacts };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorContactsWeb extends WebPlugin {\n async countContacts() {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async createContact(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async createGroup(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async deleteContactById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async deleteGroupById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async displayContactById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async displayCreateContact(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async displayUpdateContactById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async getAccounts() {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async getContactById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async getContacts(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async getGroupById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async getGroups() {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async isAvailable() {\n return { isAvailable: false };\n }\n async isSupported() {\n return { isSupported: false };\n }\n async openSettings() {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async pickContact(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async pickContacts(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async updateContactById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async checkPermissions() {\n return { readContacts: 'denied', writeContacts: 'denied' };\n }\n async requestPermissions(_options) {\n return { readContacts: 'denied', writeContacts: 'denied' };\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,iBAAiB,GAAGA,mBAAc,CAAC,mBAAmB,EAAE;AAC9D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,oB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AAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,87 @@
1
+ var capacitorCapacitorContacts = (function (exports, core) {
2
+ 'use strict';
3
+
4
+ const CapacitorContacts = core.registerPlugin('CapacitorContacts', {
5
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorContactsWeb()),
6
+ });
7
+
8
+ class CapacitorContactsWeb extends core.WebPlugin {
9
+ async countContacts() {
10
+ throw this.unavailable('Contacts API not available on the web implementation.');
11
+ }
12
+ async createContact(_options) {
13
+ throw this.unavailable('Contacts API not available on the web implementation.');
14
+ }
15
+ async createGroup(_options) {
16
+ throw this.unavailable('Contacts API not available on the web implementation.');
17
+ }
18
+ async deleteContactById(_options) {
19
+ throw this.unavailable('Contacts API not available on the web implementation.');
20
+ }
21
+ async deleteGroupById(_options) {
22
+ throw this.unavailable('Contacts API not available on the web implementation.');
23
+ }
24
+ async displayContactById(_options) {
25
+ throw this.unavailable('Contacts API not available on the web implementation.');
26
+ }
27
+ async displayCreateContact(_options) {
28
+ throw this.unavailable('Contacts API not available on the web implementation.');
29
+ }
30
+ async displayUpdateContactById(_options) {
31
+ throw this.unavailable('Contacts API not available on the web implementation.');
32
+ }
33
+ async getAccounts() {
34
+ throw this.unavailable('Contacts API not available on the web implementation.');
35
+ }
36
+ async getContactById(_options) {
37
+ throw this.unavailable('Contacts API not available on the web implementation.');
38
+ }
39
+ async getContacts(_options) {
40
+ throw this.unavailable('Contacts API not available on the web implementation.');
41
+ }
42
+ async getGroupById(_options) {
43
+ throw this.unavailable('Contacts API not available on the web implementation.');
44
+ }
45
+ async getGroups() {
46
+ throw this.unavailable('Contacts API not available on the web implementation.');
47
+ }
48
+ async isAvailable() {
49
+ return { isAvailable: false };
50
+ }
51
+ async isSupported() {
52
+ return { isSupported: false };
53
+ }
54
+ async openSettings() {
55
+ throw this.unavailable('Contacts API not available on the web implementation.');
56
+ }
57
+ async pickContact(_options) {
58
+ throw this.unavailable('Contacts API not available on the web implementation.');
59
+ }
60
+ async pickContacts(_options) {
61
+ throw this.unavailable('Contacts API not available on the web implementation.');
62
+ }
63
+ async updateContactById(_options) {
64
+ throw this.unavailable('Contacts API not available on the web implementation.');
65
+ }
66
+ async checkPermissions() {
67
+ return { readContacts: 'denied', writeContacts: 'denied' };
68
+ }
69
+ async requestPermissions(_options) {
70
+ return { readContacts: 'denied', writeContacts: 'denied' };
71
+ }
72
+ async getPluginVersion() {
73
+ return { version: 'web' };
74
+ }
75
+ }
76
+
77
+ var web = /*#__PURE__*/Object.freeze({
78
+ __proto__: null,
79
+ CapacitorContactsWeb: CapacitorContactsWeb
80
+ });
81
+
82
+ exports.CapacitorContacts = CapacitorContacts;
83
+
84
+ return exports;
85
+
86
+ })({}, capacitorExports);
87
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorContacts = registerPlugin('CapacitorContacts', {\n web: () => import('./web').then((m) => new m.CapacitorContactsWeb()),\n});\nexport * from './definitions';\nexport { CapacitorContacts };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorContactsWeb extends WebPlugin {\n async countContacts() {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async createContact(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async createGroup(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async deleteContactById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async deleteGroupById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async displayContactById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async displayCreateContact(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async displayUpdateContactById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async getAccounts() {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async getContactById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async getContacts(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async getGroupById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async getGroups() {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async isAvailable() {\n return { isAvailable: false };\n }\n async isSupported() {\n return { isSupported: false };\n }\n async openSettings() {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async pickContact(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async pickContacts(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async updateContactById(_options) {\n throw this.unavailable('Contacts API not available on the web implementation.');\n }\n async checkPermissions() {\n return { readContacts: 'denied', writeContacts: 'denied' };\n }\n async requestPermissions(_options) {\n return { readContacts: 'denied', writeContacts: 'denied' };\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,iBAAiB,GAAGA,mBAAc,CAAC,mBAAmB,EAAE;IAC9D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;IACxE,CAAC;;ICFM,MAAM,oBAAoB,SAASC,cAAS,CAAC;IACpD,IAAI,MAAM,aAAa,GAAG;IAC1B,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,uDAAuD,CAAC;IACvF,IAAI;IACJ,IAAI,MAAM,aAAa,CAAC,QAAQ,EAAE;IAClC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,uDAAuD,CAAC;IACvF,IAAI;IACJ,IAAI,MAAM,WAAW,CAAC,QAAQ,EAAE;IAChC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,uDAAuD,CAAC;IACvF,IAAI;IACJ,IAAI,MAAM,iBAAiB,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