@isnap/sdk 2.3.0 → 2.3.1-next.43615425532.1

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 (94) hide show
  1. package/CHANGELOG.md +65 -40
  2. package/README.md +361 -167
  3. package/dist/client.d.ts +37 -49
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/client.js +47 -58
  6. package/dist/client.js.map +1 -1
  7. package/dist/config.d.ts +6 -6
  8. package/dist/config.js +6 -6
  9. package/dist/generated/openapi.d.ts +910 -91
  10. package/dist/index.d.ts +3 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +1 -0
  13. package/dist/index.js.map +1 -1
  14. package/dist/internal/sleep.d.ts +2 -2
  15. package/dist/internal/sleep.js +5 -5
  16. package/dist/internal/sleep.js.map +1 -1
  17. package/dist/resources/apps.d.ts +11 -18
  18. package/dist/resources/apps.d.ts.map +1 -1
  19. package/dist/resources/apps.js +11 -18
  20. package/dist/resources/apps.js.map +1 -1
  21. package/dist/resources/area-codes.d.ts +5 -6
  22. package/dist/resources/area-codes.d.ts.map +1 -1
  23. package/dist/resources/area-codes.js +5 -6
  24. package/dist/resources/area-codes.js.map +1 -1
  25. package/dist/resources/attachments.d.ts +51 -17
  26. package/dist/resources/attachments.d.ts.map +1 -1
  27. package/dist/resources/attachments.js +42 -22
  28. package/dist/resources/attachments.js.map +1 -1
  29. package/dist/resources/byod.d.ts +14 -4
  30. package/dist/resources/byod.d.ts.map +1 -1
  31. package/dist/resources/byod.js +14 -4
  32. package/dist/resources/byod.js.map +1 -1
  33. package/dist/resources/chats.d.ts +32 -22
  34. package/dist/resources/chats.d.ts.map +1 -1
  35. package/dist/resources/chats.js +31 -21
  36. package/dist/resources/chats.js.map +1 -1
  37. package/dist/resources/fleet.d.ts +23 -0
  38. package/dist/resources/fleet.d.ts.map +1 -0
  39. package/dist/resources/fleet.js +20 -0
  40. package/dist/resources/fleet.js.map +1 -0
  41. package/dist/resources/lines.d.ts +258 -268
  42. package/dist/resources/lines.d.ts.map +1 -1
  43. package/dist/resources/lines.js +251 -266
  44. package/dist/resources/lines.js.map +1 -1
  45. package/dist/resources/lookup.d.ts +10 -13
  46. package/dist/resources/lookup.d.ts.map +1 -1
  47. package/dist/resources/lookup.js +10 -13
  48. package/dist/resources/lookup.js.map +1 -1
  49. package/dist/resources/macos-sessions.d.ts +42 -36
  50. package/dist/resources/macos-sessions.d.ts.map +1 -1
  51. package/dist/resources/macos-sessions.js +24 -22
  52. package/dist/resources/macos-sessions.js.map +1 -1
  53. package/dist/resources/messages.d.ts +35 -25
  54. package/dist/resources/messages.d.ts.map +1 -1
  55. package/dist/resources/messages.js +30 -19
  56. package/dist/resources/messages.js.map +1 -1
  57. package/dist/resources/preorders.d.ts +42 -47
  58. package/dist/resources/preorders.d.ts.map +1 -1
  59. package/dist/resources/preorders.js +42 -47
  60. package/dist/resources/preorders.js.map +1 -1
  61. package/dist/resources/trial.d.ts +30 -21
  62. package/dist/resources/trial.d.ts.map +1 -1
  63. package/dist/resources/trial.js +30 -21
  64. package/dist/resources/trial.js.map +1 -1
  65. package/dist/resources/webhooks.d.ts +39 -22
  66. package/dist/resources/webhooks.d.ts.map +1 -1
  67. package/dist/resources/webhooks.js +39 -22
  68. package/dist/resources/webhooks.js.map +1 -1
  69. package/dist/retry.d.ts +9 -10
  70. package/dist/retry.d.ts.map +1 -1
  71. package/dist/retry.js +11 -12
  72. package/dist/retry.js.map +1 -1
  73. package/dist/types.d.ts +10 -0
  74. package/dist/types.d.ts.map +1 -1
  75. package/dist/version.d.ts +1 -1
  76. package/dist/version.d.ts.map +1 -1
  77. package/dist/version.js +13 -37
  78. package/dist/version.js.map +1 -1
  79. package/dist/webhooks/parse.d.ts +10 -9
  80. package/dist/webhooks/parse.d.ts.map +1 -1
  81. package/dist/webhooks/parse.js +14 -13
  82. package/dist/webhooks/parse.js.map +1 -1
  83. package/dist/webhooks/types.d.ts +75 -111
  84. package/dist/webhooks/types.d.ts.map +1 -1
  85. package/dist/webhooks/types.js.map +1 -1
  86. package/dist/webhooks/verify.d.ts +27 -29
  87. package/dist/webhooks/verify.d.ts.map +1 -1
  88. package/dist/webhooks/verify.js +29 -35
  89. package/dist/webhooks/verify.js.map +1 -1
  90. package/examples/handle-webhook.ts +146 -0
  91. package/examples/paginate-messages.ts +54 -0
  92. package/examples/send-message.ts +37 -0
  93. package/examples/upload-attachment.ts +91 -0
  94. package/package.json +4 -8
@@ -1,7 +1,7 @@
1
1
  import type { components, paths } from '../generated/openapi.js';
2
2
  import type { RequestOptions } from '../types.js';
3
3
  import { BaseResource } from './base.js';
4
- /** Conversation shape returned by list/get (contract §2.3), incl. `outbound_number`. */
4
+ /** A chat, as `list` and `get` return it. */
5
5
  export type Chat = components['schemas']['Chat'];
6
6
  export type ChatTypingStart = components['schemas']['ChatTypingStart'];
7
7
  export type ChatTypingStop = components['schemas']['ChatTypingStop'];
@@ -13,38 +13,48 @@ export type MarkReadBody = NonNullable<paths['/v1/chats/{chat_id}/read']['post']
13
13
  export type ShareContactCardBody = NonNullable<paths['/v1/chats/{chat_id}/share-contact-card']['post']['requestBody']>['content']['application/json'];
14
14
  export declare class ChatsResource extends BaseResource {
15
15
  /**
16
- * `GET /v1/chats/{chat_id}` — fetch a single conversation by its
17
- * `chat_<base62>` id. Same shape as the list items, including
18
- * `outbound_number` for shared-plan lines (§2.3). Cross-account and
19
- * out-of-scope ids resolve 404.
16
+ * `GET /v1/chats/{chat_id}`: one chat, by its `chat_` id. An unknown id, a
17
+ * chat of another account and a chat outside the lines of a line-scoped key
18
+ * all return `404`.
20
19
  */
21
20
  get(chatId: string, opts?: RequestOptions): Promise<Chat>;
22
21
  /**
23
- * `GET /v1/chats` — cursor-paginated list of the caller's conversations,
24
- * newest activity first, as an AsyncIterable. The iterator threads
25
- * `next_cursor` across pages so the consumer can
26
- * `for await (const chat of client.chats.list({...}))` and get every
27
- * matching chat. Filter by `line_id`, bound the activity window with
28
- * `since` / `until` (ISO-8601, inclusive), and tune the page size with
29
- * `limit` (1–100). On shared-plan lines each chat carries
30
- * `outbound_number` — the physical number currently serving that
31
- * contact; `null` on non-shared lines or once the binding is released.
22
+ * `GET /v1/chats`: your chats, most recent activity first, as an
23
+ * `AsyncIterable`. A `for await` loop receives every matching chat; the SDK
24
+ * fetches the next page when the current one is consumed. Filter by
25
+ * `line_id`, bound the last activity time with `since` and `until` (ISO 8601,
26
+ * inclusive), keep the chats of some health statuses with `health` (a
27
+ * comma-separated list, for example `'at_risk,critical'`), and set the page
28
+ * size with `limit` (1 to 100, default 20).
29
+ *
30
+ * On a shared line, `outbound_number` is the number that serves the contact,
31
+ * or `null` when none is assigned. On every other line it is `null`.
32
32
  */
33
33
  list(filters?: Omit<ListChatsQuery, 'cursor'>, opts?: RequestOptions): AsyncIterable<Chat>;
34
34
  /**
35
- * `POST /v1/chats/{chat_id}/typing` — start an explicit typing indicator
36
- * on a chat. The dots stay visible until `typingStop` is called or a
37
- * message is sent (see contract §2.3 — explicit overrides
38
- * `use_typing_indicator`).
35
+ * `POST /v1/chats/{chat_id}/typing`: ask the line's device to show the typing
36
+ * indicator to the chat's contact. Resolves with `chat_id`, `started_at` and
37
+ * `expires_at`, which is 15 seconds after `started_at`. Call it again to keep
38
+ * the indicator, or call `typingStop` to clear it.
39
39
  */
40
40
  typingStart(chatId: string, body: TypingStartBody, opts?: RequestOptions): Promise<ChatTypingStart>;
41
- /** `DELETE /v1/chats/{chat_id}/typing` — stop the explicit typing indicator. */
41
+ /** `DELETE /v1/chats/{chat_id}/typing`: ask the line's device to clear the typing indicator. */
42
42
  typingStop(chatId: string, opts?: RequestOptions): Promise<ChatTypingStop>;
43
- /** `POST /v1/chats/{chat_id}/read` — mark messages up to a given message as read. */
43
+ /**
44
+ * `POST /v1/chats/{chat_id}/read`: mark every unread inbound message of the
45
+ * chat as read and ask the line's device to send read receipts. Resolves with
46
+ * `chat_id`, `read_at` and `marked_count`.
47
+ */
44
48
  markRead(chatId: string, body: MarkReadBody, opts?: RequestOptions): Promise<ChatMarkRead>;
45
49
  /**
46
- * `POST /v1/chats/{chat_id}/share-contact-card` — share an Apple
47
- * contact-card vCard attachment with the recipient.
50
+ * `POST /v1/chats/{chat_id}/share-contact-card`: send a contact card (a
51
+ * vCard file) to the chat's contact, as a message with one attachment.
52
+ *
53
+ * Once a call has queued the card, a repeat with the same idempotency key
54
+ * returns `409 idempotency_conflict` instead of the first result. The
55
+ * automatic retries of the SDK reuse the key: call this method with
56
+ * `{ maxRetries: 0 }`, and after an error read the messages of the chat's
57
+ * line before you send the card again.
48
58
  */
49
59
  shareContactCard(chatId: string, body: ShareContactCardBody, opts?: RequestOptions): Promise<ShareContactCardResult>;
50
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chats.d.ts","sourceRoot":"","sources":["../../src/resources/chats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,wFAAwF;AACxF,MAAM,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAA;AACtE,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAA;AACpE,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAA;AAChE,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,wBAAwB,CAAC,CAAA;AAEpF,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAA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AW,CAC5C,KAAK,CAAC,wCAAwC,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CACvE,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAEhC,qBAAa,aAAc,SAAQ,YAAY;IAC7C;;;;OAIG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IASzD;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAO,GAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC,IAAI,CAAC;IAW9F;;;;;OAKG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,eAAe,EACrB,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,eAAe,CAAC;IAS3B,gGAAgG;IAChG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAS1E;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAS1F;;;;;;;;;OASG;IACH,gBAAgB,CACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,oBAAoB,EAC1B,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,sBAAsB,CAAC;CAQnC"}
@@ -2,24 +2,24 @@ import { paginate } from '../pagination.js';
2
2
  import { BaseResource } from './base.js';
3
3
  export class ChatsResource extends BaseResource {
4
4
  /**
5
- * `GET /v1/chats/{chat_id}` — fetch a single conversation by its
6
- * `chat_<base62>` id. Same shape as the list items, including
7
- * `outbound_number` for shared-plan lines (§2.3). Cross-account and
8
- * out-of-scope ids resolve 404.
5
+ * `GET /v1/chats/{chat_id}`: one chat, by its `chat_` id. An unknown id, a
6
+ * chat of another account and a chat outside the lines of a line-scoped key
7
+ * all return `404`.
9
8
  */
10
9
  get(chatId, opts) {
11
10
  return this.client.request('GET', `/v1/chats/${encodeURIComponent(chatId)}`, undefined, opts);
12
11
  }
13
12
  /**
14
- * `GET /v1/chats` — cursor-paginated list of the caller's conversations,
15
- * newest activity first, as an AsyncIterable. The iterator threads
16
- * `next_cursor` across pages so the consumer can
17
- * `for await (const chat of client.chats.list({...}))` and get every
18
- * matching chat. Filter by `line_id`, bound the activity window with
19
- * `since` / `until` (ISO-8601, inclusive), and tune the page size with
20
- * `limit` (1–100). On shared-plan lines each chat carries
21
- * `outbound_number` — the physical number currently serving that
22
- * contact; `null` on non-shared lines or once the binding is released.
13
+ * `GET /v1/chats`: your chats, most recent activity first, as an
14
+ * `AsyncIterable`. A `for await` loop receives every matching chat; the SDK
15
+ * fetches the next page when the current one is consumed. Filter by
16
+ * `line_id`, bound the last activity time with `since` and `until` (ISO 8601,
17
+ * inclusive), keep the chats of some health statuses with `health` (a
18
+ * comma-separated list, for example `'at_risk,critical'`), and set the page
19
+ * size with `limit` (1 to 100, default 20).
20
+ *
21
+ * On a shared line, `outbound_number` is the number that serves the contact,
22
+ * or `null` when none is assigned. On every other line it is `null`.
23
23
  */
24
24
  list(filters = {}, opts) {
25
25
  return paginate((cursor) => this.client.request('GET', '/v1/chats', undefined, {
@@ -28,25 +28,35 @@ export class ChatsResource extends BaseResource {
28
28
  }), { signal: opts?.signal });
29
29
  }
30
30
  /**
31
- * `POST /v1/chats/{chat_id}/typing` — start an explicit typing indicator
32
- * on a chat. The dots stay visible until `typingStop` is called or a
33
- * message is sent (see contract §2.3 — explicit overrides
34
- * `use_typing_indicator`).
31
+ * `POST /v1/chats/{chat_id}/typing`: ask the line's device to show the typing
32
+ * indicator to the chat's contact. Resolves with `chat_id`, `started_at` and
33
+ * `expires_at`, which is 15 seconds after `started_at`. Call it again to keep
34
+ * the indicator, or call `typingStop` to clear it.
35
35
  */
36
36
  typingStart(chatId, body, opts) {
37
37
  return this.client.request('POST', `/v1/chats/${encodeURIComponent(chatId)}/typing`, body, opts);
38
38
  }
39
- /** `DELETE /v1/chats/{chat_id}/typing` — stop the explicit typing indicator. */
39
+ /** `DELETE /v1/chats/{chat_id}/typing`: ask the line's device to clear the typing indicator. */
40
40
  typingStop(chatId, opts) {
41
41
  return this.client.request('DELETE', `/v1/chats/${encodeURIComponent(chatId)}/typing`, undefined, opts);
42
42
  }
43
- /** `POST /v1/chats/{chat_id}/read` — mark messages up to a given message as read. */
43
+ /**
44
+ * `POST /v1/chats/{chat_id}/read`: mark every unread inbound message of the
45
+ * chat as read and ask the line's device to send read receipts. Resolves with
46
+ * `chat_id`, `read_at` and `marked_count`.
47
+ */
44
48
  markRead(chatId, body, opts) {
45
49
  return this.client.request('POST', `/v1/chats/${encodeURIComponent(chatId)}/read`, body, opts);
46
50
  }
47
51
  /**
48
- * `POST /v1/chats/{chat_id}/share-contact-card` — share an Apple
49
- * contact-card vCard attachment with the recipient.
52
+ * `POST /v1/chats/{chat_id}/share-contact-card`: send a contact card (a
53
+ * vCard file) to the chat's contact, as a message with one attachment.
54
+ *
55
+ * Once a call has queued the card, a repeat with the same idempotency key
56
+ * returns `409 idempotency_conflict` instead of the first result. The
57
+ * automatic retries of the SDK reuse the key: call this method with
58
+ * `{ maxRetries: 0 }`, and after an error read the messages of the chat's
59
+ * line before you send the card again.
50
60
  */
51
61
  shareContactCard(chatId, body, opts) {
52
62
  return this.client.request('POST', `/v1/chats/${encodeURIComponent(chatId)}/share-contact-card`, body, opts);
@@ -1 +1 @@
1
- {"version":3,"file":"chats.js","sourceRoot":"","sources":["../../src/resources/chats.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAoBxC,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C;;;;;OAKG;IACH,GAAG,CAAC,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I,CACL,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,MAAc,EAAE,IAAkB,EAAE,IAAqB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,MAAM,EACN,aAAa,kBAAkB,CAAC,MAAM,CAAC,OAAO,EAC9C,IAAI,EACJ,IAAI,CACL,CAAA;IACH,CAAC;IAED;;;;;;;;;OASG;IACH,gBAAgB,CACd,MAAc,EACd,IAA0B,EAC1B,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,MAAM,EACN,aAAa,kBAAkB,CAAC,MAAM,CAAC,qBAAqB,EAC5D,IAAI,EACJ,IAAI,CACL,CAAA;IACH,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ import type { components } from '../generated/openapi.js';
2
+ import type { RequestOptions } from '../types.js';
3
+ import { BaseResource } from './base.js';
4
+ export type FleetHealthReport = components['schemas']['FleetHealthReport'];
5
+ export type FleetHealthLine = components['schemas']['FleetHealthLine'];
6
+ export type FleetHealthSummary = components['schemas']['FleetHealthSummary'];
7
+ export declare class FleetResource extends BaseResource {
8
+ /**
9
+ * `GET /v1/fleet/health`: the latest daily two-way rate report of the iSnap
10
+ * fleet (`two-way-rate/1`). The operation needs no credential.
11
+ *
12
+ * The report holds figures for the whole rated fleet (`summary`) and one
13
+ * anonymous row per rated line (`lines`). A row names no line, phone number,
14
+ * customer or area code, and the rows come in an order that carries nothing:
15
+ * do not read a line's identity or rank from its position.
16
+ *
17
+ * `as_of` is `null` and `lines` is empty until the first report is
18
+ * published: that is a report, not an error. The API keeps the answer for 5
19
+ * minutes, so read it again after 5 minutes, not sooner.
20
+ */
21
+ health(opts?: RequestOptions): Promise<FleetHealthReport>;
22
+ }
23
+ //# sourceMappingURL=fleet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fleet.d.ts","sourceRoot":"","sources":["../../src/resources/fleet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAA;AAC1E,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAA;AACtE,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAA;AAE5E,qBAAa,aAAc,SAAQ,YAAY;IAC7C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAG1D"}
@@ -0,0 +1,20 @@
1
+ import { BaseResource } from './base.js';
2
+ export class FleetResource extends BaseResource {
3
+ /**
4
+ * `GET /v1/fleet/health`: the latest daily two-way rate report of the iSnap
5
+ * fleet (`two-way-rate/1`). The operation needs no credential.
6
+ *
7
+ * The report holds figures for the whole rated fleet (`summary`) and one
8
+ * anonymous row per rated line (`lines`). A row names no line, phone number,
9
+ * customer or area code, and the rows come in an order that carries nothing:
10
+ * do not read a line's identity or rank from its position.
11
+ *
12
+ * `as_of` is `null` and `lines` is empty until the first report is
13
+ * published: that is a report, not an error. The API keeps the answer for 5
14
+ * minutes, so read it again after 5 minutes, not sooner.
15
+ */
16
+ health(opts) {
17
+ return this.client.request('GET', '/v1/fleet/health', undefined, opts);
18
+ }
19
+ }
20
+ //# sourceMappingURL=fleet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fleet.js","sourceRoot":"","sources":["../../src/resources/fleet.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAMxC,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAqB;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAoB,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;IAC3F,CAAC;CACF"}