@distilled.cloud/core 1.0.0-rc.2 → 1.0.0-rc.21
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/LICENSE +201 -0
- package/README.md +33 -0
- package/lib/_bundle/aws.js +2 -0
- package/lib/_bundle/aws.js.map +1 -0
- package/lib/_bundle/base.js +5 -0
- package/lib/_bundle/base.js.map +1 -0
- package/lib/_bundle/graphql.js +3 -0
- package/lib/_bundle/graphql.js.map +1 -0
- package/lib/_bundle/grpc.js +3 -0
- package/lib/_bundle/grpc.js.map +1 -0
- package/lib/_bundle/rest.js +2 -0
- package/lib/_bundle/rest.js.map +1 -0
- package/lib/_bundle/xml.js +4 -0
- package/lib/_bundle/xml.js.map +1 -0
- package/lib/annotations.d.ts +17 -0
- package/lib/annotations.d.ts.map +1 -0
- package/lib/annotations.js +2 -0
- package/lib/annotations.js.map +1 -0
- package/lib/api.d.ts +220 -51
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js +1 -178
- package/lib/category.d.ts +19 -16
- package/lib/category.d.ts.map +1 -1
- package/lib/category.js +1 -280
- package/lib/chunks.d.ts +3 -0
- package/lib/chunks.d.ts.map +1 -0
- package/lib/chunks.js +1 -0
- package/lib/config.d.ts +81 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +1 -0
- package/lib/crypto.d.ts +76 -0
- package/lib/crypto.d.ts.map +1 -0
- package/lib/crypto.js +1 -0
- package/lib/error-category.d.ts +1 -1
- package/lib/error-category.d.ts.map +1 -1
- package/lib/error-category.js +1 -46
- package/lib/errors.d.ts +99 -74
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -186
- package/lib/graphql.d.ts +420 -0
- package/lib/graphql.d.ts.map +1 -0
- package/lib/graphql.js +1 -0
- package/lib/graphql.types.d.ts +11 -0
- package/lib/graphql.types.d.ts.map +1 -0
- package/lib/graphql.types.js +1 -0
- package/lib/grpc-transport-cloudflare-http2.d.ts +7 -0
- package/lib/grpc-transport-cloudflare-http2.d.ts.map +1 -0
- package/lib/grpc-transport-cloudflare-http2.js +6 -0
- package/lib/grpc-transport-cloudflare-http2.js.map +1 -0
- package/lib/grpc-transport-cloudflare-sockets.d.ts +7 -0
- package/lib/grpc-transport-cloudflare-sockets.d.ts.map +1 -0
- package/lib/grpc-transport-cloudflare-sockets.js +5 -0
- package/lib/grpc-transport-cloudflare-sockets.js.map +1 -0
- package/lib/grpc-transport-node-http2.d.ts +19 -0
- package/lib/grpc-transport-node-http2.d.ts.map +1 -0
- package/lib/grpc-transport-node-http2.js +2 -0
- package/lib/grpc-transport-node-http2.js.map +1 -0
- package/lib/grpc-transport.d.ts +111 -0
- package/lib/grpc-transport.d.ts.map +1 -0
- package/lib/grpc-transport.js +1 -0
- package/lib/hpack.d.ts +34 -0
- package/lib/hpack.d.ts.map +1 -0
- package/lib/hpack.js +2 -0
- package/lib/hpack.js.map +1 -0
- package/lib/index.d.ts +32 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +17 -0
- package/lib/max-message-bytes.d.ts +42 -0
- package/lib/max-message-bytes.d.ts.map +1 -0
- package/lib/max-message-bytes.js +2 -0
- package/lib/max-message-bytes.js.map +1 -0
- package/lib/ndjson.d.ts +3 -0
- package/lib/ndjson.d.ts.map +1 -0
- package/lib/ndjson.js +2 -0
- package/lib/ndjson.js.map +1 -0
- package/lib/pagination.d.ts +105 -25
- package/lib/pagination.d.ts.map +1 -1
- package/lib/pagination.js +1 -182
- package/lib/plain-values.d.ts +21 -0
- package/lib/plain-values.d.ts.map +1 -0
- package/lib/plain-values.js +2 -0
- package/lib/plain-values.js.map +1 -0
- package/lib/protobuf.d.ts +85 -0
- package/lib/protobuf.d.ts.map +1 -0
- package/lib/protobuf.js +1 -0
- package/lib/protocol-grpc.d.ts +123 -0
- package/lib/protocol-grpc.d.ts.map +1 -0
- package/lib/protocol-grpc.js +1 -0
- package/lib/protocol-http.d.ts +206 -25
- package/lib/protocol-http.d.ts.map +1 -1
- package/lib/protocol-http.js +1 -554
- package/lib/protocol-rest.d.ts +258 -64
- package/lib/protocol-rest.d.ts.map +1 -1
- package/lib/protocol-rest.js +1 -242
- package/lib/protocol.d.ts +113 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +0 -0
- package/lib/query.d.ts +29 -0
- package/lib/query.d.ts.map +1 -0
- package/lib/query.js +1 -0
- package/lib/response-validation-strict.d.ts +48 -0
- package/lib/response-validation-strict.d.ts.map +1 -0
- package/lib/response-validation-strict.js +1 -0
- package/lib/response-validation.d.ts +86 -0
- package/lib/response-validation.d.ts.map +1 -0
- package/lib/response-validation.js +1 -0
- package/lib/retry-after.d.ts +4 -4
- package/lib/retry-after.d.ts.map +1 -1
- package/lib/retry-after.js +1 -112
- package/lib/retry-state.d.ts +26 -0
- package/lib/retry-state.d.ts.map +1 -0
- package/lib/retry-state.js +2 -0
- package/lib/retry-state.js.map +1 -0
- package/lib/retry.d.ts +141 -42
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -210
- package/lib/schema-lite-impl.d.ts +179 -0
- package/lib/schema-lite-impl.d.ts.map +1 -0
- package/lib/schema-lite-impl.js +1 -0
- package/lib/schema-lite-typed.d.ts +41 -0
- package/lib/schema-lite-typed.d.ts.map +1 -0
- package/lib/schema-lite-typed.js +1 -0
- package/lib/schema-lite.d.ts +41 -0
- package/lib/schema-lite.d.ts.map +1 -0
- package/lib/schema-lite.js +1 -0
- package/lib/schema.d.ts +21 -7
- package/lib/schema.d.ts.map +1 -1
- package/lib/schema.js +1 -48
- package/lib/sdk-error.d.ts +31 -0
- package/lib/sdk-error.d.ts.map +1 -0
- package/lib/sdk-error.js +1 -0
- package/lib/send.d.ts +37 -0
- package/lib/send.d.ts.map +1 -0
- package/lib/send.js +2 -0
- package/lib/send.js.map +1 -0
- package/lib/sensitive.d.ts +28 -0
- package/lib/sensitive.d.ts.map +1 -0
- package/lib/sensitive.js +2 -0
- package/lib/sensitive.js.map +1 -0
- package/lib/telemetry-debug.d.ts +6 -0
- package/lib/telemetry-debug.d.ts.map +1 -0
- package/lib/telemetry-debug.js +2 -0
- package/lib/telemetry-debug.js.map +1 -0
- package/lib/telemetry-hooks.d.ts +32 -0
- package/lib/telemetry-hooks.d.ts.map +1 -0
- package/lib/telemetry-hooks.js +2 -0
- package/lib/telemetry-hooks.js.map +1 -0
- package/lib/telemetry-host-rules.d.ts +23 -0
- package/lib/telemetry-host-rules.d.ts.map +1 -0
- package/lib/telemetry-host-rules.js +2 -0
- package/lib/telemetry-host-rules.js.map +1 -0
- package/lib/telemetry-lambda-context.d.ts +17 -0
- package/lib/telemetry-lambda-context.d.ts.map +1 -0
- package/lib/telemetry-lambda-context.js +2 -0
- package/lib/telemetry-lambda-context.js.map +1 -0
- package/lib/telemetry-message-context.d.ts +52 -0
- package/lib/telemetry-message-context.d.ts.map +1 -0
- package/lib/telemetry-message-context.js +2 -0
- package/lib/telemetry-message-context.js.map +1 -0
- package/lib/telemetry-metrics.d.ts +6 -0
- package/lib/telemetry-metrics.d.ts.map +1 -0
- package/lib/telemetry-metrics.js +2 -0
- package/lib/telemetry-metrics.js.map +1 -0
- package/lib/telemetry-name-template.d.ts +13 -0
- package/lib/telemetry-name-template.d.ts.map +1 -0
- package/lib/telemetry-name-template.js +2 -0
- package/lib/telemetry-name-template.js.map +1 -0
- package/lib/telemetry-stream.d.ts +11 -0
- package/lib/telemetry-stream.d.ts.map +1 -0
- package/lib/telemetry-stream.js +2 -0
- package/lib/telemetry-stream.js.map +1 -0
- package/lib/telemetry-xray.d.ts +28 -0
- package/lib/telemetry-xray.d.ts.map +1 -0
- package/lib/telemetry-xray.js +2 -0
- package/lib/telemetry-xray.js.map +1 -0
- package/lib/telemetry.d.ts +317 -0
- package/lib/telemetry.d.ts.map +1 -0
- package/lib/telemetry.js +3 -0
- package/lib/telemetry.js.map +1 -0
- package/lib/token-cache.d.ts +31 -0
- package/lib/token-cache.d.ts.map +1 -0
- package/lib/token-cache.js +2 -0
- package/lib/token-cache.js.map +1 -0
- package/lib/trait.d.ts +94 -20
- package/lib/trait.d.ts.map +1 -1
- package/lib/trait.js +1 -107
- package/lib/unknown-error.d.ts +18 -0
- package/lib/unknown-error.d.ts.map +1 -0
- package/lib/unknown-error.js +1 -0
- package/lib/xml.d.ts +44 -0
- package/lib/xml.d.ts.map +1 -0
- package/lib/xml.js +1 -0
- package/package.json +13 -13
- package/src/annotations.ts +53 -0
- package/src/api.ts +1597 -234
- package/src/category.ts +97 -134
- package/src/chunks.ts +30 -0
- package/src/config.ts +261 -0
- package/src/crypto.ts +202 -0
- package/src/error-category.ts +16 -29
- package/src/errors.ts +99 -77
- package/src/graphql.ts +1817 -0
- package/src/graphql.types.ts +120 -0
- package/src/grpc-transport-cloudflare-http2.ts +569 -0
- package/src/grpc-transport-cloudflare-sockets.ts +368 -0
- package/src/grpc-transport-node-http2.ts +307 -0
- package/src/grpc-transport.ts +287 -0
- package/src/hpack.ts +331 -0
- package/src/index.ts +31 -0
- package/src/max-message-bytes.ts +58 -0
- package/src/ndjson.ts +55 -0
- package/src/pagination.ts +379 -94
- package/src/plain-values.ts +70 -0
- package/src/protobuf.ts +1367 -0
- package/src/protocol-grpc.ts +811 -0
- package/src/protocol-http.ts +1045 -371
- package/src/protocol-rest.ts +908 -255
- package/src/protocol.ts +150 -0
- package/src/query.ts +39 -0
- package/src/response-validation-strict.ts +333 -0
- package/src/response-validation.ts +161 -0
- package/src/retry-after.ts +8 -14
- package/src/retry-state.ts +105 -0
- package/src/retry.ts +260 -145
- package/src/schema-lite-impl.ts +621 -0
- package/src/schema-lite-typed.ts +44 -0
- package/src/schema-lite.ts +45 -0
- package/src/schema.ts +259 -15
- package/src/sdk-error.ts +37 -0
- package/src/send.ts +156 -0
- package/src/sensitive.ts +188 -0
- package/src/telemetry-debug.ts +179 -0
- package/src/telemetry-hooks.ts +33 -0
- package/src/telemetry-host-rules.ts +39 -0
- package/src/telemetry-lambda-context.ts +46 -0
- package/src/telemetry-message-context.ts +170 -0
- package/src/telemetry-metrics.ts +69 -0
- package/src/telemetry-name-template.ts +26 -0
- package/src/telemetry-stream.ts +100 -0
- package/src/telemetry-xray.ts +66 -0
- package/src/telemetry.ts +800 -0
- package/src/token-cache.ts +117 -0
- package/src/trait.ts +139 -67
- package/src/unknown-error.ts +38 -0
- package/src/xml.ts +346 -0
- package/lib/api.js.map +0 -1
- package/lib/category.js.map +0 -1
- package/lib/codegen/cli.d.ts +0 -29
- package/lib/codegen/cli.d.ts.map +0 -1
- package/lib/codegen/cli.js +0 -165
- package/lib/codegen/cli.js.map +0 -1
- package/lib/codegen/emit.d.ts +0 -129
- package/lib/codegen/emit.d.ts.map +0 -1
- package/lib/codegen/emit.js +0 -105
- package/lib/codegen/emit.js.map +0 -1
- package/lib/codegen/format.d.ts +0 -23
- package/lib/codegen/format.d.ts.map +0 -1
- package/lib/codegen/format.js +0 -28
- package/lib/codegen/format.js.map +0 -1
- package/lib/codegen/generator.d.ts +0 -334
- package/lib/codegen/generator.d.ts.map +0 -1
- package/lib/codegen/generator.js +0 -691
- package/lib/codegen/generator.js.map +0 -1
- package/lib/codegen/graph.d.ts +0 -36
- package/lib/codegen/graph.d.ts.map +0 -1
- package/lib/codegen/graph.js +0 -136
- package/lib/codegen/graph.js.map +0 -1
- package/lib/codegen/members.d.ts +0 -25
- package/lib/codegen/members.d.ts.map +0 -1
- package/lib/codegen/members.js +0 -55
- package/lib/codegen/members.js.map +0 -1
- package/lib/codegen/naming.d.ts +0 -29
- package/lib/codegen/naming.d.ts.map +0 -1
- package/lib/codegen/naming.js +0 -74
- package/lib/codegen/naming.js.map +0 -1
- package/lib/codegen/openapi-cli.d.ts +0 -38
- package/lib/codegen/openapi-cli.d.ts.map +0 -1
- package/lib/codegen/openapi-cli.js +0 -107
- package/lib/codegen/openapi-cli.js.map +0 -1
- package/lib/codegen/openapi.d.ts +0 -115
- package/lib/codegen/openapi.d.ts.map +0 -1
- package/lib/codegen/openapi.js +0 -1220
- package/lib/codegen/openapi.js.map +0 -1
- package/lib/codegen/operations.d.ts +0 -24
- package/lib/codegen/operations.d.ts.map +0 -1
- package/lib/codegen/operations.js +0 -56
- package/lib/codegen/operations.js.map +0 -1
- package/lib/codegen/pagination.d.ts +0 -39
- package/lib/codegen/pagination.d.ts.map +0 -1
- package/lib/codegen/pagination.js +0 -33
- package/lib/codegen/pagination.js.map +0 -1
- package/lib/codegen/prelude.d.ts +0 -15
- package/lib/codegen/prelude.d.ts.map +0 -1
- package/lib/codegen/prelude.js +0 -60
- package/lib/codegen/prelude.js.map +0 -1
- package/lib/error-category.js.map +0 -1
- package/lib/errors.js.map +0 -1
- package/lib/json-patch.d.ts +0 -44
- package/lib/json-patch.d.ts.map +0 -1
- package/lib/json-patch.js +0 -174
- package/lib/json-patch.js.map +0 -1
- package/lib/pagination.js.map +0 -1
- package/lib/protocol-http.js.map +0 -1
- package/lib/protocol-rest.js.map +0 -1
- package/lib/retry-after.js.map +0 -1
- package/lib/retry.js.map +0 -1
- package/lib/schema.js.map +0 -1
- package/lib/trait.js.map +0 -1
- package/src/codegen/cli.ts +0 -268
- package/src/codegen/emit.ts +0 -207
- package/src/codegen/format.ts +0 -47
- package/src/codegen/generator.ts +0 -1153
- package/src/codegen/graph.ts +0 -151
- package/src/codegen/members.ts +0 -71
- package/src/codegen/naming.ts +0 -86
- package/src/codegen/openapi-cli.ts +0 -166
- package/src/codegen/openapi.ts +0 -1450
- package/src/codegen/operations.ts +0 -76
- package/src/codegen/pagination.ts +0 -71
- package/src/codegen/prelude.ts +0 -70
- package/src/json-patch.ts +0 -222
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @distilled.cloud/core
|
|
2
|
+
|
|
3
|
+
The shared runtime behind every [distilled](https://distilled.cloud) SDK. It
|
|
4
|
+
sends the requests, decodes the responses, retries, paginates and turns
|
|
5
|
+
provider errors into typed Effect failures.
|
|
6
|
+
|
|
7
|
+
You do not need to install it yourself. Each SDK, for example
|
|
8
|
+
`@distilled.cloud/aws` or `@distilled.cloud/cloudflare`, depends on it. To get
|
|
9
|
+
started, read the [root README](https://github.com/alchemy-run/distilled#readme)
|
|
10
|
+
and the README of the SDK you use.
|
|
11
|
+
|
|
12
|
+
## What it holds
|
|
13
|
+
|
|
14
|
+
Each module is its own import path, `@distilled.cloud/core/<module>`.
|
|
15
|
+
|
|
16
|
+
| Module | What it does |
|
|
17
|
+
|---|---|
|
|
18
|
+
| `retry` | Retry policies and backoff. Each SDK re-exports them as its own `Retry` |
|
|
19
|
+
| `category` | Error categories (`AuthError`, `ThrottlingError`, `NotFoundError` and the rest) with `is*` and `catch*` helpers |
|
|
20
|
+
| `errors` | Shared HTTP errors such as `Unauthorized`, `NotFound` and `TooManyRequests` |
|
|
21
|
+
| `sdk-error` | `SdkError`, the failure for a call this SDK cannot make |
|
|
22
|
+
| `sensitive` | Redaction of fields the spec marks as secrets |
|
|
23
|
+
| `pagination` | Paginated operations as a `Stream` |
|
|
24
|
+
| `telemetry`, `telemetry-metrics` | A span for each call, and opt-in call metrics |
|
|
25
|
+
| `crypto` | HMAC and hashing for request signing |
|
|
26
|
+
| `protocol-rest`, `protocol-http`, `protocol-grpc`, `xml`, `query`, `protobuf`, `graphql` | The wire protocols the generated SDKs use |
|
|
27
|
+
|
|
28
|
+
The generated SDKs call these modules. Most programs use them only through an
|
|
29
|
+
SDK.
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
[Apache-2.0](https://github.com/alchemy-run/distilled/blob/main/LICENSE)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from"effect/Context";import*as t from"effect/Effect";import{pipeArguments as n}from"effect/Pipeable";import*as r from"effect/Schema";import{Duration as i,Redacted as a,declare as o,instanceOf as s}from"effect/Schema";import*as c from"effect/Data";import*as l from"effect/Layer";const u=r.optional;const d=r.Struct;const f=r.StructWithRest;const suspend=e=>lazySuspend(e);const Array$1=e=>lazyArray(e);const Record=(e,t)=>lazyRecord(e,t);const p=r.Union;const m=r.Literal;const h=r.Literals;const g=r.NullOr;const _=r.Tuple;const v=r.encodeKeys;const y=r.String;const b=r.Number;const x=r.Boolean;const S=r.Date;const C=r.Unknown;const w=r.Null;const T=r.Void;const E=r.Any;const D=/*@__PURE__*/ Object.getPrototypeOf(r.String);const O=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/schema/build`);const k=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/schema/annotations`);const A=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/schema/data`);const force=e=>{const t=e[O];if(!t)return;const n=e[k];const r=typeof t===`function`?t():t.build(e[A]);const i=n?r.annotate(n):r;delete e[O];delete e[A];delete e[k];Object.defineProperties(e,Object.getOwnPropertyDescriptors(i))};const forwarded=e=>({configurable:true,get(){if(!this[O])return void 0;force(this);return this[e]}});const j=/*@__PURE__*/ Object.create(D,{ast:/*@__PURE__*/ forwarded(`ast`),value:/*@__PURE__*/ forwarded(`value`),key:/*@__PURE__*/ forwarded(`key`),annotate:{configurable:true,writable:true,value(e){const t=this[O];if(!t)return D.annotate.call(this,e);const n=this[k];return lazy(t,n?{...n,...e}:e,this[A])}}});const M=D[`~effect/Schema/Schema`]!==void 0;const lazy=(e,t,n)=>{if(!M){const r=typeof e===`function`?e():e.build(n);return t?r.annotate(t):r}const r=Object.create(j);r[O]=e;if(n!==void 0)r[A]=n;if(t)r[k]=t;return r};const lazyFrom=(e,t)=>lazy(e,void 0,t);const lazySuspend=e=>lazy(()=>r.suspend(e));const lazyArray=e=>lazy(()=>r.Array(e));const lazyRecord=(e,t)=>lazy(()=>r.Record(e,t));const N=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/schema/lazyError`);const P=`~effect/Schema/Schema`;let F;const ErrorBase=()=>F??=Object.getPrototypeOf(r.TaggedError()(`Probe`,{}));const realErrorClass=e=>{const t=e[N];if(!t.real){const e=r.TaggedError(t.identifier)(...t.args);t.real=e;Object.setPrototypeOf(t.lazy.prototype,e.prototype)}return t.real};const I=[`ast`,`fields`,`make`,`makeOption`,`makeEffect`,`annotate`,`annotateKey`,`check`,`rebuild`,`extend`,`mapFields`];let L;const LazyErrorStatics=()=>L??=Object.create(ErrorBase(),{[P]:{value:P,configurable:true},identifier:{configurable:true,get(){const e=this[N];return e.identifier??e.args[0]}},pipe:{configurable:true,writable:true,value(){return n(this,arguments)}},...Object.fromEntries(I.map(e=>[e,{configurable:true,get(){let t=realErrorClass(this);let n;while(t&&!(n=Object.getOwnPropertyDescriptor(t,e)))t=Object.getPrototypeOf(t);if(!n)return void 0;if(n.get)return n.get.call(this);return typeof n.value===`function`?n.value.bind(this):n.value}}]))});const lazyTaggedError=e=>(...t)=>{function LazyTaggedError(e,t){if(!new.target)throw new TypeError(`Class constructor cannot be invoked without 'new'`);return Reflect.construct(realErrorClass(new.target),[e,t],new.target)}Object.setPrototypeOf(LazyTaggedError,LazyErrorStatics());LazyTaggedError.prototype=Object.create(ErrorBase().prototype,{constructor:{value:LazyTaggedError,writable:true,configurable:true}});Object.defineProperty(LazyTaggedError,N,{value:{identifier:e,args:t,lazy:LazyTaggedError}});return LazyTaggedError};const R=lazyTaggedError;const z=/*@__PURE__*/ new WeakMap;const at=(e,t)=>{let n=z.get(e);if(!n)z.set(e,n={build:t=>e(t)});return lazyFrom(n,t)};var CryptoError=class extends (/*@__PURE__*/ c.TaggedError(`CryptoError`)){};const nodeModule=()=>{try{return globalThis.process?.getBuiltinModule?.(`node:crypto`)}catch{return}};const B=/*@__PURE__*/ new TextEncoder;const toBytes=e=>typeof e===`string`?B.encode(e):e;const makeNodeCrypto=()=>{const e=nodeModule();if(!e)return void 0;return{name:`node:crypto`,sync:{sha256:t=>e.createHash(`sha256`).update(t).digest(),importHmacKey:t=>e.createSecretKey(toBytes(t)),hmacSha256:(t,n)=>e.createHmac(`sha256`,t).update(n).digest(),sha256Hex:e.hash?t=>e.hash(`sha256`,t,`hex`):t=>e.createHash(`sha256`).update(t).digest(`hex`),hmacSha256Hex:(t,n)=>e.createHmac(`sha256`,t).update(n).digest(`hex`)},sha256:n=>t.try({try:()=>e.createHash(`sha256`).update(n).digest(),catch:e=>new CryptoError({operation:`sha256`,cause:e})}),importHmacKey:n=>t.try({try:()=>e.createSecretKey(toBytes(n)),catch:e=>new CryptoError({operation:`importKey`,cause:e})}),hmacSha256:(n,r)=>t.try({try:()=>e.createHmac(`sha256`,n).update(r).digest(),catch:e=>new CryptoError({operation:`hmac`,cause:e})})}};const buffer=e=>{const t=toBytes(e);return t.buffer instanceof ArrayBuffer?t:new Uint8Array(t)};const makeWebCrypto=()=>({name:`webcrypto`,sha256:e=>t.tryPromise({try:async()=>new Uint8Array(await crypto.subtle.digest(`SHA-256`,buffer(e))),catch:e=>new CryptoError({operation:`sha256`,cause:e})}),importHmacKey:e=>t.tryPromise({try:()=>crypto.subtle.importKey(`raw`,buffer(e),{name:`HMAC`,hash:`SHA-256`},false,[`sign`]),catch:e=>new CryptoError({operation:`importKey`,cause:e})}),hmacSha256:(e,n)=>t.tryPromise({try:async()=>new Uint8Array(await crypto.subtle.sign(`HMAC`,e,buffer(n))),catch:e=>new CryptoError({operation:`hmac`,cause:e})})});const V=/*@__PURE__*/ e.Reference(`@distilled.cloud/core/Crypto`,{defaultValue:()=>makeNodeCrypto()??makeWebCrypto()});const layer=e=>l.succeed(V,e);const H=/*@__PURE__*/ l.sync(V,makeWebCrypto);const U=/*@__PURE__*/ l.effect(V,/*@__PURE__*/ t.suspend(()=>{const e=makeNodeCrypto();return e?t.succeed(e):t.fail(new CryptoError({operation:`importKey`,cause:`node:crypto is not available`}))}));const W=/*@__PURE__*/ Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));const hex=e=>{let t=``;for(let n=0;n<e.length;n++)t+=W[e[n]];return t};export{at as chunks$at,V as crypto$Crypto,CryptoError as crypto$CryptoError,hex as crypto$hex,layer as crypto$layer,makeNodeCrypto as crypto$makeNodeCrypto,makeWebCrypto as crypto$makeWebCrypto,U as crypto$nodeCrypto,H as crypto$webCrypto,E as schema$Any,Array$1 as schema$Array,x as schema$Boolean,S as schema$Date,i as schema$Duration,m as schema$Literal,h as schema$Literals,w as schema$Null,g as schema$NullOr,b as schema$Number,Record as schema$Record,a as schema$Redacted,y as schema$String,d as schema$Struct,f as schema$StructWithRest,R as schema$TaggedError,_ as schema$Tuple,p as schema$Union,C as schema$Unknown,T as schema$Void,o as schema$declare,v as schema$encodeKeys,s as schema$instanceOf,lazyFrom as schema$lazyFrom,u as schema$optional,suspend as schema$suspend};
|
|
2
|
+
//# sourceMappingURL=aws.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws.js","names":["Array","Context","Effect","S","Data","Layer","optional","Struct","StructWithRest","f","item","key","value","Union","Literal","Literals","NullOr","Tuple","encodeKeys","String","Number","Boolean","Date","Unknown","Null","Void","Any","SchemaProto","buildKey","annotationsKey","dataKey","build","self","annotations","built","real","name","LazyProto","previous","supported","data","builder","lazyErrorKey","SchemaTypeId","errorBase","state","cls","FORWARDED_STATICS","lazyErrorStatics","pipeArguments","owner","descriptor","args","input","options","TaggedError","builders","j","encoder","c","b","Crypto","impl","webCrypto","nodeCrypto","HEX","i","out","bytes","Duration","Redacted","declare","instanceOf"],"sources":["../../src/schema.ts","../../src/chunks.ts","../../src/crypto.ts"],"mappings":"kSAkCA,MAAaM,EAAkBH,EAAE,SACjC,MAAaI,EAAgBJ,EAAE,OAC/B,MAAaK,EAAwBL,EAAE,eACvC,MAAa,QAAkB,GAAmB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AAY,CAAE,UAAW,YAAa,OAAM,CAAC,CACrE,CAAC,EACH,YAAa,EAAK,IAChBT,EAAO,WAAW,CAChB,IAAK,SACH,IAAI,WAAW,MAAM,OAAO,OAAO,KAAK,OAAQS,EAA6B,OAAO6B,CAAI,CAAC,CAAC,EAC5F,MAAQ,GAAU,IAAI,YAAY,CAAE,UAAW,OAAQ,OAAM,CAAC,CAChE,CAAC,CACL,GAKA,MAAaqB,EAAuB,gBAAQ,UAAsB,+BAAgC,CAChG,iBAAoB,eAAe,GAAK,cAAc,CACxD,CAAC,EAGD,MAAa,MAAS,GAAyCxD,EAAM,QAAQwD,EAAQC,CAAI,EAGzF,MAAaC,EAA8C,gBAAM,KAAKF,EAAQ,aAAa,EAG3F,MAAaG,EAA4D,gBAAM,OAC7EH,EACc,gBAAO,YAAc,CACjC,MAAMC,EAAO,eAAe,EAC5B,OAAOA,EACH5D,EAAO,QAAQ4D,CAAI,EACnB5D,EAAO,KACL,IAAI,YAAY,CAAE,UAAW,YAAa,MAAO,8BAA+B,CAAC,CACnF,CACN,CAAC,CACH,EAEA,MAAM+D,EAAoB,oBAAM,KAAK,CAAE,OAAQ,GAAI,GAAI,EAAG,IAAMC,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAG,GAAG,CAAC,EAE/F,MAAa,IAAO,GAA8B,CAChD,IAAIC,EAAM,GACV,IAAK,IAAID,EAAI,EAAGA,EAAIE,EAAM,OAAQ,IAAK,GAAOH,EAAIG,EAAMF,IACxD,OAAOC,CACT"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{getAnn as e,getProps as t,rawResponseRootSymbol as n}from"../annotations.js";import{successesOf as r,takeLastRequest as i}from"../retry-state.js";import{Debug as a,captureCallSite as o,operationInfo as s,operationSpan as c,phase as l,retried as u}from"../telemetry.js";import{send as d}from"../send.js";import*as f from"effect/Cause";import*as p from"effect/Context";import*as m from"effect/Duration";import*as h from"effect/Effect";import*as ee from"effect/Exit";import*as te from"effect/http/HttpClient";import*as g from"effect/Option";import{pipeArguments as _}from"effect/Pipeable";import*as ne from"effect/Ref";import*as re from"effect/References";import"effect/Schema";import*as v from"effect/Stream";import{SingleShotGen as ie}from"effect/Utils";import*as ae from"effect/http/HttpClientError";import*as y from"effect/Predicate";import*as oe from"effect/Data";import*as se from"effect/Layer";import*as ce from"effect/Schedule";import*as le from"effect/Redacted";const b=`AuthError`;const x=`BadRequestError`;const S=`ConflictError`;const w=`NotFoundError`;const T=`QuotaError`;const E=`ServerError`;const D=`ThrottlingError`;const O=`NetworkError`;const k=`ParseError`;const A=`ConfigurationError`;const j=`TimeoutError`;const M=`RetryableError`;const N=`LockedError`;const P=`AbortedError`;const F=`AlreadyExistsError`;const I=`DependencyViolationError`;const L=`@distilled.cloud/error/categories`;const ue=`@distilled.cloud/error/retryable`;const withCategory=(...e)=>t=>{for(const n of e){if(!(`@distilled.cloud/error/categories`in t.prototype))t.prototype[L]={};t.prototype[L][n]=true}return t};const withRetryable=(e={})=>t=>{t.prototype[ue]=e;return t};const de=/*@__PURE__*/ withCategory(b);const fe=/*@__PURE__*/ withCategory(x);const pe=/*@__PURE__*/ withCategory(S);const me=/*@__PURE__*/ withCategory(w);const he=/*@__PURE__*/ withCategory(T);const ge=/*@__PURE__*/ withCategory(E);const _e=/*@__PURE__*/ withCategory(D);const ve=/*@__PURE__*/ withCategory(O);const ye=/*@__PURE__*/ withCategory(k);const be=/*@__PURE__*/ withCategory(A);const xe=/*@__PURE__*/ withCategory(j);const Se=/*@__PURE__*/ withCategory(M);const Ce=/*@__PURE__*/ withCategory(N);const we=/*@__PURE__*/ withCategory(P);const Te=/*@__PURE__*/ withCategory(F);const Ee=/*@__PURE__*/ withCategory(I);const hasCategory=(e,t)=>{if(y.isObject(e)&&y.hasProperty(`@distilled.cloud/error/categories`)(e))return t in e[L];return false};const isAuthError=e=>hasCategory(e,b);const isBadRequestError=e=>hasCategory(e,x);const isConflictError=e=>hasCategory(e,S);const isNotFoundError=e=>hasCategory(e,w);const isQuotaError=e=>hasCategory(e,T);const isServerError=e=>hasCategory(e,E);const isThrottlingError=e=>hasCategory(e,D);const isNetworkError=e=>hasCategory(e,O);const isParseError=e=>hasCategory(e,k);const isConfigurationError=e=>hasCategory(e,A);const isTimeoutError=e=>hasCategory(e,j);const isRetryableError=e=>hasCategory(e,M);const isLockedError=e=>hasCategory(e,N);const isAbortedError=e=>hasCategory(e,P);const isAlreadyExistsError=e=>hasCategory(e,F);const isDependencyViolationError=e=>hasCategory(e,I);const isRetryable=e=>{if(y.isObject(e)&&y.hasProperty(`@distilled.cloud/error/retryable`)(e))return true;return false};const isThrottling=e=>{if(y.isObject(e)&&y.hasProperty(`@distilled.cloud/error/retryable`)(e))return e[ue]?.throttling===true;return hasCategory(e,D)};const isHttpTransportError=e=>ae.isHttpClientError(e)&&e.reason._tag===`TransportError`;const isTransientError=e=>isRetryable(e)||hasCategory(e,`RetryableError`)||hasCategory(e,`ThrottlingError`)||hasCategory(e,`NetworkError`)||isHttpTransportError(e);const makeCatcher=e=>t=>n=>h.catchIf(n,t=>hasCategory(t,e),t);const catchErrors=(...e)=>{const t=e[e.length-1];const n=e.slice(0,-1);return e=>h.catchIf(e,e=>n.some(t=>hasCategory(e,t)),t)};const De=/*@__PURE__*/ makeCatcher(b);const Oe=/*@__PURE__*/ makeCatcher(x);const ke=/*@__PURE__*/ makeCatcher(S);const Ae=/*@__PURE__*/ makeCatcher(w);const je=/*@__PURE__*/ makeCatcher(T);const Me=/*@__PURE__*/ makeCatcher(E);const Ne=/*@__PURE__*/ makeCatcher(D);const Pe=/*@__PURE__*/ makeCatcher(O);const Fe=/*@__PURE__*/ makeCatcher(k);const Ie=/*@__PURE__*/ makeCatcher(A);const Le=/*@__PURE__*/ makeCatcher(j);const Re=/*@__PURE__*/ makeCatcher(M);const ze=/*@__PURE__*/ makeCatcher(N);const Be=/*@__PURE__*/ makeCatcher(P);const Ve=/*@__PURE__*/ makeCatcher(F);const He=/*@__PURE__*/ makeCatcher(I);const catchCategory=(...e)=>{const t=e[e.length-1];const n=e.slice(0,-1);return e=>h.catchIf(e,e=>{if(y.isObject(e)&&y.hasProperty(`@distilled.cloud/error/categories`)(e)){for(const t of n)if(t in e[`@distilled.cloud/error/categories`])return true}return false},e=>t(e))};const Ue=`~lite`;const node$1=e=>Object.assign(e,{[Ue]:true});const We={"~lite":true,pipe(){return _(this,arguments)},annotate(e){return make$1({...this.ast,annotations:{...this.ast.annotations,...e}},this)}};const make$1=(e,t)=>{const n=Object.create(We);n.ast=e;if(t){for(const e of[`fields`,`key`,`value`])if(e in t)n[e]=t[e]}return n};const fromNode=e=>make$1(node$1(e));const isLite=e=>(typeof e===`object`||typeof e===`function`)&&e!==null&&e[`~lite`]===true;const astOf=e=>e.ast;const Ge=/*@__PURE__*/ make$1(node$1({_tag:`String`}));const R=/*@__PURE__*/ make$1(node$1({_tag:`Number`}));const Ke=/*@__PURE__*/ make$1(node$1({_tag:`Boolean`}));const qe=/*@__PURE__*/ make$1(node$1({_tag:`Unknown`}));const Je=/*@__PURE__*/ make$1(node$1({_tag:`Any`}));const Ye=/*@__PURE__*/ make$1(node$1({_tag:`Null`}));const Xe=/*@__PURE__*/ make$1(node$1({_tag:`Void`}));const Ze=/*@__PURE__*/ make$1(node$1({_tag:`Undefined`}));const Literal=e=>make$1(node$1({_tag:`Literal`,literal:e}));const Literals=e=>make$1(node$1({_tag:`Union`,types:e.map(e=>node$1({_tag:`Literal`,literal:e}))}));const optional=e=>{const t=astOf(e);return make$1(node$1({_tag:`Union`,types:[t,node$1({_tag:`Undefined`})],context:{isOptional:true}}))};const NullOr=e=>make$1(node$1({_tag:`Union`,types:[astOf(e),node$1({_tag:`Null`})]}));const Union=e=>make$1(node$1({_tag:`Union`,types:e.map(astOf)}));const Array$1=e=>make$1(node$1({_tag:`Arrays`,elements:[],rest:[astOf(e)]}));const Tuple=e=>make$1(node$1({_tag:`Arrays`,elements:e.map(astOf),rest:[]}));const Record=(e,t)=>{const n=make$1(node$1({_tag:`Objects`,propertySignatures:[],indexSignatures:[{parameter:astOf(e),type:astOf(t)}]}));n.key=e;n.value=t;return n};const Struct=e=>{const t=make$1(node$1({_tag:`Objects`,propertySignatures:Object.keys(e).map(t=>{return{name:t,type:astOf(e[t])}}),indexSignatures:[]}));t.fields=e;return t};const StructWithRest=(e,t)=>{const n=resolveObjects(astOf(e));const r=make$1(node$1({_tag:`Objects`,propertySignatures:n.propertySignatures??[],indexSignatures:[...n.indexSignatures??[],...t.flatMap(e=>resolveObjects(astOf(e)).indexSignatures??[])]}));r.fields=e.fields;return r};const resolveObjects=e=>e._tag===`Suspend`?resolveObjects(e.thunk()):e;const Extend=(e,t)=>{const n=resolveObjects(astOf(t));const r=new Set((n.propertySignatures??[]).map(e=>e.name));const i=resolveObjects(astOf(e)).propertySignatures??[];return make$1(node$1({_tag:`Objects`,propertySignatures:[...n.propertySignatures??[],...i.filter(e=>!r.has(e.name))],indexSignatures:n.indexSignatures??[]}))};const suspend=e=>{let t;return make$1(node$1({_tag:`Suspend`,thunk:()=>t??=astOf(e())}))};const encodeKeys=e=>t=>t.annotate({[Qe]:e});const Qe=`@distilled.cloud/core/schema-lite/encodeKeys`;const representation=e=>({id:e,payload:null});const declaration=e=>make$1(node$1({_tag:`Declaration`,typeParameters:[],annotations:{identifier:e,representation:representation(`effect/schema/${e}`)}}));const $e=/*@__PURE__*/ declaration(`Date`);const et=/*@__PURE__*/ declaration(`Duration`);const Redacted$1=e=>make$1(node$1({_tag:`Declaration`,typeParameters:[astOf(e)],annotations:{identifier:`Redacted`,representation:representation(`effect/schema/Redacted`)}}));const instanceOf=(e,t)=>make$1(node$1({_tag:`Declaration`,typeParameters:[],annotations:{identifier:e.name,...e===globalThis.Uint8Array&&{representation:representation(`effect/schema/Uint8Array`)},...t}}));const declare=(e,t)=>make$1(node$1({_tag:`Declaration`,typeParameters:[],annotations:{...t}}));const z=`~distilled/tag`;const tt=`~distilled/keys`;const B=`~distilled/ast`;const nt=`~distilled/annotations`;const rt=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/annotation-meta`);const ownAnnotations=e=>{const t={};for(const n of Reflect.ownKeys(e))if(n!==rt&&Object.prototype.propertyIsEnumerable.call(e,n))t[n]=e[n];return t};let it;const LiteErrorBase=()=>it??=class LiteError extends oe.Error{constructor(e){const t=new.target[tt];const n={};if(e){for(const r of t)if(e[r]!==void 0)n[r]=e[r]}super(n);this._tag=new.target[z]}static get ast(){const e=this;if(Object.hasOwn(e,B))return e[B];const t=e.fields;return e[B]=node$1({_tag:`Objects`,propertySignatures:Object.keys(t).map(e=>({name:e,type:astOf(t[e])})),indexSignatures:[],annotations:{identifier:e[z],...e[nt]}})}static pipe(){return _(this,arguments)}static make(e){return new this(e)}static is(e){return typeof e===`object`&&e!==null&&e._tag===this[z]}};const TaggedError=e=>(e,t={},n)=>{const C=class extends LiteErrorBase(){};C[z]=e;C[tt]=Object.keys(t);if(n)C[nt]=ownAnnotations(n);C.fields=t;C.identifier=e;C.prototype.name=e;return C};const at=(e,t)=>{const n=Object.create(ot);n.b=e;n.j=t;return n};const resolveAt=e=>e.s??=e.b(e.j);const ot=/*@__PURE__*/ Object.create(We,{ast:{get(){return resolveAt(this).ast}},fields:{get(){return resolveAt(this).fields}},key:{get(){return resolveAt(this).key}},value:{get(){return resolveAt(this).value}}});const toEffect=(e,t)=>{const n=/* @__PURE__ */ new Map;const r=/* @__PURE__ */ new Map;const hasLite=e=>{const t=r.get(e);if(t!==void 0)return t;r.set(e,false);const n=[...e.types??[],...e.elements??[],...e.rest??[],...e.typeParameters??[],...(e.propertySignatures??[]).map(e=>e.type),...(e.indexSignatures??[]).flatMap(e=>[e.parameter,e.type]),...(e.encoding??[]).map(e=>e.to),...e._tag===`Suspend`&&e.thunk?[e.thunk()]:[]];const i=!!e[`~lite`]||n.some(hasLite);r.set(e,i);return i};const builtIn=t=>{switch((t.annotations?.representation)?.id){case`effect/schema/Date`:return e.Date;case`effect/schema/Duration`:return e.Duration;case`effect/schema/Uint8Array`:return e.Uint8Array;case`effect/schema/Redacted`:{const n=t.typeParameters?.[0];return n&&e.Redacted?.(build(n))}}};const build=t=>{const r=n.get(t);if(r)return r;if(!t[`~lite`]&&!hasLite(t)){const r=e.make(t);n.set(t,r);return r}let i;switch(t._tag){case`String`:i=e.String;break;case`Number`:i=e.Number;break;case`Boolean`:i=e.Boolean;break;case`Null`:i=e.Null;break;case`Undefined`:i=e.Undefined;break;case`Void`:i=e.Void;break;case`Any`:i=e.Any;break;case`Literal`:i=e.Literal(t.literal);break;case`Union`:i=t.context?.isOptional?e.optional(build(t.types[0])):e.Union(t.types.map(build));break;case`Arrays`:i=t.rest.length?e.Array(build(t.rest[0])):e.Tuple(t.elements.map(build));break;case`Objects`:{const n=t.propertySignatures??[];const r=(t.indexSignatures??[]).map(t=>e.Record(build(t.parameter),t.type._tag===`Union`&&t.type.context?.isOptional?e.Union([build(t.type.types[0]),e.Undefined]):build(t.type)));if(n.length===0&&r.length===1){i=r[0];break}const a=e.Struct(Object.fromEntries(n.map(e=>[e.name,build(e.type)])));i=r.length?e.StructWithRest(a,r):a;break}case`Suspend`:{const n=t.thunk;i=e.suspend(()=>build(n()));break}case`Declaration`:i=builtIn(t)??(t.check?e.declare(t.check):e.Unknown);break;case`Unknown`:i=e.Unknown;break;default:i=t[`~lite`]?e.Unknown:e.make(t)}n.set(t,i);return i};return build(t)};const V=optional;const st=Struct;const ct=StructWithRest;const lt=suspend;const ut=Array$1;const dt=Record;const ft=Union;const pt=Literal;const mt=Literals;const ht=NullOr;const gt=Tuple;const _t=declare;const vt=instanceOf;const yt=Redacted$1;const H=Ge;const bt=R;const xt=R;const St=Ke;const Ct=$e;const wt=et;const Tt=qe;const Et=Ye;const Dt=Xe;const Ot=Je;const kt=TaggedError;var SdkError=class extends (/*@__PURE__*/ kt()(`SdkError`,{message:H})){};const loadModule=e=>h.tryPromise({try:()=>e(),catch:e=>new SdkError({message:`an SDK module failed to load: ${e instanceof Error?e.message:String(e)}`})});const getPath=(e,t)=>{const n=t.split(`.`);let r=e;for(const e of n){if(r==null||typeof r!==`object`)return;r=r[e]}return r};const getItems=(e,t)=>{let n=[e];for(const e of t.split(`.`)){const t=[];for(const r of n){if(r==null||typeof r!==`object`)continue;const n=r[e];if(Array.isArray(n))for(const e of n)t.push(e);else if(n!=null)t.push(n)}n=t}return n};const missingPaginationConfig=e=>v.fail(new SdkError({message:e}));const isTerminalToken=e=>e===void 0||e===null||e===``;const paginateSingle=(e,t)=>v.fromEffect(h.suspend(()=>e(t)));const paginatePageNumber=(e,t,n)=>{const r=n.inputToken;const i=n.outputToken;if(!r||!i)return missingPaginationConfig(`Page-number pagination requires inputToken and outputToken`);const a=typeof t[r]===`number`?t[r]:1;return v.unfold({page:a,done:false},a=>h.gen(function*(){if(a.done)return void 0;const o=yield*e({...t,[r]:a.page});const s=getPath(o,i);const c=n.items?getPath(o,n.items):void 0;return[o,{page:typeof s===`number`&&s>a.page?s:a.page+1,done:s===null||s===void 0||c===null||c!==void 0&&c.length===0}]}))};const paginateCursor=(e,t,n)=>{const r=n.inputToken;const i=n.outputToken;if(!r||!i)return missingPaginationConfig(`Cursor pagination requires inputToken and outputToken`);const a=typeof t[r]===`string`?t[r]:void 0;return v.suspend(()=>{const n=/* @__PURE__ */ new Set;return v.unfold({cursor:a,done:false},a=>h.gen(function*(){if(a.done)return void 0;if(a.cursor!==void 0)n.add(a.cursor);const o=yield*e({...t,...a.cursor?{[r]:a.cursor}:{}});const s=getPath(o,i);return[o,{cursor:s??void 0,done:isTerminalToken(s)||s!=null&&n.has(s)}]}))})};const paginateToken=(e,t,n)=>{const r=n.inputToken;const i=n.outputToken;if(!r||!i)return missingPaginationConfig(`Token pagination requires inputToken and outputToken`);const a=t[r];return v.suspend(()=>{const n=/* @__PURE__ */ new Set;return v.unfold({token:a,done:false},a=>h.gen(function*(){if(a.done)return void 0;if(typeof a.token===`string`)n.add(a.token);const o=yield*e(a.token!==void 0?{...t,[r]:a.token}:t);const s=getPath(o,i);return[o,{token:s,done:isTerminalToken(s)||typeof s===`string`&&n.has(s)}]}))})};const setPath=(e,t,n)=>{const[r,...i]=t.split(`.`);const a=r;if(i.length===0)return{...e,[a]:n};const o=e[a];return{...e,[a]:setPath(o!==null&&typeof o===`object`?o:{},i.join(`.`),n)}};const paginateKeyset=(e,t,n)=>{const{inputToken:r,outputToken:i,items:a}=n;if(!r||!i||!a)return missingPaginationConfig(`Keyset pagination requires inputToken, outputToken and items`);const o=n.pageSize?getPath(t,n.pageSize):void 0;return v.unfold({request:t,key:getPath(t,r)},t=>t===void 0?h.succeed(void 0):h.map(e(t.request),e=>{const n=getItems(e,a);const s=n.length>0?getPath(n[n.length-1],i):void 0;return[e,n.length===0||isTerminalToken(s)||s===t.key||typeof o===`number`&&n.length<o?void 0:{request:setPath(t.request,r,s),key:s}]}))};const paginateRelay=(e,t,n)=>{const r=n.inputToken;const i=n.outputToken;if(!r||!i)return missingPaginationConfig(`Relay pagination requires inputToken and outputToken`);const a=n.hasNextPage??`${i.split(`.`).slice(0,-1).concat(`hasNextPage`).join(`.`)}`;const o=typeof t[r]===`string`?t[r]:void 0;return v.unfold({cursor:o,done:false},o=>h.gen(function*(){if(o.done)return void 0;const s=yield*e({...t,...o.cursor?{[r]:o.cursor}:{}});const c=getPath(s,i);const l=getPath(s,a)===true;const u=n.items!==void 0&&getItems(s,n.items).length===0;const d=o.cursor!==void 0&&c!==void 0&&c!==null&&c===o.cursor;return[s,{cursor:c??void 0,done:!l||isTerminalToken(c)||u||d}]}))};const At=/*@__PURE__*/ p.Reference(`@distilled.cloud/core/Pagination/PageHeaders`,{defaultValue:()=>void 0});const recordPageHeaders=(e,t)=>{const n=p.get(e,At);if(n!==void 0)n.headers=t};const nextLink=e=>{if(e===void 0)return void 0;for(const t of e.split(/,\s*(?=<)/)){const e=/^\s*<([^>]*)>(.*)$/.exec(t);const n=e&&/;\s*rel\s*=\s*"?([^";]*)"?/i.exec(e[2]);if(n&&n[1].toLowerCase().split(/\s+/).includes(`next`))return e[1]}};const paginateLink=(e,t,n)=>{const r=n.inputToken;if(!r)return missingPaginationConfig(`Link pagination requires inputToken`);return v.unfold({token:t[r],done:false},n=>h.gen(function*(){if(n.done)return void 0;const i=n.token!==void 0?{...t,[r]:n.token}:t;const a={headers:void 0};const o=yield*h.provideService(e(i),At,a);const s=nextLink(a.headers?.[`link`]);const c=s===void 0?void 0:new URL(s,`http://_`).searchParams.get(r)??void 0;return[o,{token:c,done:isTerminalToken(c)||n.token!==void 0&&c===String(n.token)}]}))};const paginateWithDefaults=(e,t,n)=>{switch(n.mode??`token`){case`page`:return paginatePageNumber(e,t,n);case`cursor`:return paginateCursor(e,t,n);case`relay`:return paginateRelay(e,t,n);case`link`:return paginateLink(e,t,n);case`keyset`:return paginateKeyset(e,t,n);case`single`:return paginateSingle(e,t,n);default:return paginateToken(e,t,n)}};const extractItems=(e,t)=>flattenPages(e,e=>getItems(e,t));const extractArrayItems=e=>flattenPages(e,e=>Array.isArray(e)?e:[]);const flattenPages=(e,t)=>v.transformPull(e,e=>{const n=h.flatMap(e,e=>{const r=[];for(const n of e)for(const e of t(n))r.push(e);return r.length>0?h.succeed(r):n});return h.succeed(n)});const jt=5e3;const makeBudget=(e={})=>{const t=e.initial??100;const n=e.max??500;const i=e.transientCost??14;const a=e.throttlingCost??5;const o=/* @__PURE__ */ new Map;const bucket=e=>{const i=r(e);let a=o.get(e);if(a===void 0){a={tokens:t,seen:i};o.set(e,a)}else if(i!==a.seen){a.tokens=Math.min(n,a.tokens+(i-a.seen));a.seen=i}return a};return{withdraw:(e,t)=>{const n=bucket(e);const r=t?a:i;if(n.tokens<r)return void 0;n.tokens-=r;return r},refund:(e,t)=>{const r=bucket(e);r.tokens=Math.min(n,r.tokens+t-1)},tokens:e=>bucket(e).tokens,reset:()=>o.clear()}};const Mt=/*@__PURE__*/ makeBudget();const makeRetryService=e=>p.Service()(e);const Nt=/*@__PURE__*/ ce.addDelay(()=>h.succeed(m.millis(Math.random()*50)));const capped=e=>ce.modifyDelay(({duration:t})=>h.succeed(m.isGreaterThan(t,e)?e:t));const Pt=6e4;const Ft=`DISTILLED_SERVER_RETRY_HINT_CAP_MS`;const It=/*@__PURE__*/ p.Service(`@distilled.cloud/core/ServerRetryHintCapMs`);const serverRetryHintCapLayer=e=>se.succeed(It,e);const readServerRetryHintCapMsFromEnv=()=>parseCapMs(globalThis.process?.env?.[Ft]);const parseCapMs=e=>{if(e===void 0||e===``)return Pt;const t=Number(e);return Number.isFinite(t)&&t>=0?Math.trunc(t):Pt};const Lt=`effect/ConfigProvider`;const resolveServerRetryHintCapMs=()=>h.gen(function*(){const e=yield*h.serviceOption(It);if(g.isSome(e)){const t=e.value;if(Number.isFinite(t)&&t>=0)return Math.trunc(t)}const t=(yield*h.context()).mapUnsafe.get(Lt);if(!t)return readServerRetryHintCapMsFromEnv();const n=yield*t.load([Ft]).pipe(h.orElseSucceed(()=>void 0));return parseCapMs(n?._tag===`Value`?n.value:void 0)});const serverHintMillis=(e,t)=>{const n=e?.retryAfter;if(!m.isDuration(n))return void 0;return Math.min(m.toMillis(n),t)};const U={while:e=>isTransientError(e),backoff:{baseMs:50,throttlingBaseMs:1e3,factor:2,capMs:2e4,maxRetries:2,fullJitter:true,serverHint:true,budget:Mt}};const makeDefault=()=>U;const Rt=/* @__PURE__ */ new WeakMap;const defaultWith=e=>{const t=Rt.get(e);if(t!==void 0)return t;const n=U.backoff;const r={...U,backoff:{...n,...e.maxAttempts!==void 0?{maxRetries:e.maxAttempts-1}:{},...e.baseMs!==void 0?{baseMs:e.baseMs}:{},...e.throttlingBaseMs!==void 0?{throttlingBaseMs:e.throttlingBaseMs}:{},...e.capMs!==void 0?{capMs:e.capMs}:{},...e.factor!==void 0?{factor:e.factor}:{},...e.longPoll!==void 0?{longPoll:e.longPoll}:{}}};Rt.set(e,r);return r};const zt={baseMs:1e3,factor:2,capMs:5e3,jitterMs:50,serverHint:true};const Bt={baseMs:1e3,factor:2,capMs:5e3,jitterMs:50};const throttlingFactory=()=>Vt;const Vt={while:e=>isThrottling(e),backoff:zt};const Ht={while:e=>isThrottling(e),backoff:Bt};const transientFactory=()=>Ut;const Ut={while:isTransientError,backoff:zt};const Wt={while:isTransientError,backoff:Bt};const W=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/annotation-meta`);function makeAnnotation(e,t){const fn=n=>n.annotate({[e]:t});fn[W]=[{symbol:e,value:t}];fn[e]=t;return fn}function all$1(...e){const t=[];const n={};for(const r of e)for(const e of r[W]){t.push(e);n[e.symbol]=e.value}const fn=e=>e.annotate(n);fn[W]=t;for(const{symbol:e,value:n}of t)fn[e]=n;return fn}const Gt=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http`);const Http=e=>makeAnnotation(Gt,e);const Kt=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http/label`);const Label=e=>makeAnnotation(Kt,e??true);const qt=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http/label-encoding`);const LabelEncoding=e=>{if(!/^[!$&'()*+,;=:@]*$/.test(e.preserve))throw new TypeError(`LabelEncoding can preserve only URI path-segment delimiters`);return makeAnnotation(qt,e.preserve)};const Jt=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http/response-code`);const ResponseCode=()=>makeAnnotation(Jt,true);const Yt=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http/header`);const Header=e=>makeAnnotation(Yt,e??true);const Xt=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http/body`);const Body=e=>makeAnnotation(Xt,e??true);const Zt=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http/query`);const Query=e=>makeAnnotation(Zt,e??true);const Qt=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/idempotency-token`);const IdempotencyToken=e=>makeAnnotation(Qt,e??true);const $t=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http/comma-delimited`);const CommaDelimited=e=>makeAnnotation($t,true);const en=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http/deep-query`);const DeepQuery=e=>makeAnnotation(en,e??true);const tn=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http-body`);const HttpBody=()=>makeAnnotation(tn,true);const nn=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/http/string-encoded`);const StringEncoded=()=>makeAnnotation(nn,true);const rn=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/form-data-file`);const FormDataFile=()=>makeAnnotation(rn,true);const an=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/key-dictionary`);const KeyDictionary=e=>makeAnnotation(an,e);const on=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/union-cases`);const UnionCases=(e,t,n)=>makeAnnotation(on,{cases:e,...t?{discriminator:t}:{},...n?{dictionaries:n}:{}});const sn=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/error-matchers`);const applyErrorMatchers=(e,t)=>{e[sn]=t;return e};const getErrorMatchers=e=>e?.[sn];const withValue=(e,t)=>ee.isExit(e)?ee.isSuccess(e)?t(e.value):e:h.flatMap(e,t);const protocolOf=e=>h.succeed(e.service=e.cfg.protocol);const backoffDelay=(e,t,n,r)=>{const i=isThrottling(n);let a;if(e.fullJitter){const n=i&&e.throttlingBaseMs!==void 0?e.throttlingBaseMs:e.baseMs;a=Math.random()*Math.min(n*e.factor**t,e.capMs)}else{const n=Math.min(e.baseMs*e.factor**t,e.capMs);a=(e.minThrottleMs!==void 0&&n<e.minThrottleMs&&i?e.minThrottleMs:n)+Math.random()*(e.jitterMs??0)}if(!e.serverHint)return h.succeed(a);if(r!==void 0)return h.succeed(Math.min(Math.max(r,a),a+jt));const o=n?.retryAfter;if(!m.isDuration(o))return h.succeed(a);const s=m.toMillis(o);return h.map(resolveServerRetryHintCapMs(),e=>s>e?void 0:Math.max(a,s))};const cn={baseMs:0,factor:1,capMs:0};const backoffSleep=(e,t,n)=>h.withFiber(r=>{const i=r.context;const a=typeof e===`number`?e:0;u(i,t,n,a);return l(i,`distilled.retry.backoff`,h.sleep(e),{"distilled.retry.attempt":t,"distilled.retry.delay_ms":Math.round(a),"distilled.retry.reason":n?._tag})});const applyRetry=(e,t,n)=>{const r=t.retry;const i=n===void 0?e:n.attempt(e,1);return r===void 0?i:h.catch(i,i=>h.flatMap(h.serviceOption(r),r=>{if(g.isNone(r)){const r=t.retryPolicy===void 0?U:defaultWith(t.retryPolicy);return retryWith(e,r,i,n)}const a=r.value;if(typeof a!==`function`)return retryWith(e,a,i,n);return h.flatMap(ne.make(i),t=>retryWith(h.tapError(e,e=>ne.set(t,e)),a(t),i,n))}))};const retryWith=(e,t,n,r)=>{const a=t.while;if(!a||!a(n))return h.fail(n);const again=t=>r===void 0?e:r.attempt(e,t);if(t.schedule){const e=t.schedule;return h.flatMap(e.step,e=>{let t=0;const loop=n=>!a(n)||i().oneShot?h.fail(n):h.clockWith(r=>h.matchEffect(e(r.currentTimeMillisUnsafe(),n),{onFailure:()=>h.fail(n),onSuccess:([,e])=>h.flatMap(backoffSleep(e,++t,n),()=>h.catch(again(t+1),loop))}));return loop(n)})}const o=t.backoff??cn;const s=o.budget;const step=(e,t)=>{if(!a(e)||o.maxRetries!==void 0&&t>=o.maxRetries)return h.fail(e);const n=i();if(n.oneShot)return h.fail(e);return h.flatMap(backoffDelay(o,t,e,n.hintMs),r=>{if(r===void 0)return h.fail(e);const i=s!==void 0&&n.host!==``;const a=i?s.withdraw(n.host,isThrottling(e)):void 0;if(i&&a===void 0)return o.longPoll?h.flatMap(h.sleep(r),()=>h.fail(e)):h.fail(e);const c=a===void 0?again(t+2):h.map(again(t+2),e=>{s.refund(n.host,a);return e});return h.flatMap(backoffSleep(r,t+1,e),()=>h.catch(c,e=>step(e,t+1)))})};return step(n,0)};const uuidv7=()=>{const e=globalThis.crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16));const t=Date.now();const n=Math.floor(t/2**32);const r=t%2**32;e[0]=n>>>8;e[1]=n&255;e[2]=r>>>24;e[3]=r>>>16&255;e[4]=r>>>8&255;e[5]=r&255;e[6]=e[6]&15|112;e[8]=e[8]&63|128;let i=``;for(const t of e)i+=t.toString(16).padStart(2,`0`);return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`};const withIdempotencyTokens=(n,r)=>{const i=n.idempotencyTokens??=t(n.inputAst).flatMap(t=>{const n=e(t.type,Qt);return typeof t.name===`string`&&n!==void 0?[[t.name,n]]:[]});if(i.length===0||r===null||typeof r!==`object`)return r;let a;for(const[e,t]of i)if(r[e]===void 0){a??={...r};a[e]=t===`uuidv7`?uuidv7():globalThis.crypto.randomUUID()}return a??r};const G=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/api/OperationState`);const prepare=e=>{if(e.prepared)return e.prepared;const t=e.configFn();const n=t.input.ast;return e.prepared={cfg:t,config:t,inputAst:n,info:s(t.telemetry,t.span,t.operationName,n),outputAst:t.output.ast,errors:t.serviceErrors===void 0?t.errors??[]:[...t.errors??[],...t.serviceErrors],compiled:void 0,service:void 0}};const prepareOr=e=>{if(e.prepared)return e.prepared;try{return prepare(e)}catch(e){return new SdkError({message:`the operation could not be loaded: ${e instanceof Error?e.message:String(e)}`})}};const stateOf=e=>e[G];const failed=(e,t,n)=>{const r=e.prepared;if(r===void 0)return h.failCause(t);const i=r.info.name;const a=t.reasons.find(f.isDieReason);if(a!==void 0){const e=new SdkError({message:`${i} threw: ${String(a.defect)}`});e.cause=a.defect;t=f.fail(e)}if(n===void 0)return h.failCause(t);return h.withFiber(e=>h.failCause(f.annotate(t,p.make(f.StackTrace,{name:i,stack:n,parent:p.getOrUndefined(f.annotations(t),f.StackTrace)??e.getRef(re.CurrentStackFrame)}),{overwrite:true})))};const describeOperation=e=>prepare(stateOf(e)).info;const encodeRequest=(e,t)=>h.suspend(()=>{const n=stateOf(e);if(n===void 0)return h.fail(new SdkError({message:`not an operation`}));const r=prepareOr(n);if(r instanceof SdkError)return h.fail(r);const encode=e=>h.catchCause(h.suspend(()=>e.encode({input:withIdempotencyTokens(r,t),inputAst:r.inputAst,config:r.cfg})),e=>failed(n,e));if(r.service!==void 0)return encode(r.service);return h.flatMap(protocolOf(r),encode)});const defineState=(e,t)=>{Object.defineProperty(e,G,{value:t});return t};const runWith=(e,t,n)=>{if(t.call!==void 0)return t.call(e,n);const{cfg:r,inputAst:i,outputAst:a,errors:o}=e;return h.withFiber(e=>{const s=e.context;const c=p.get(s,te.HttpClient);return h.flatMap(t.encode({input:n,inputAst:i,config:r}),e=>h.flatMap(d(s,c,e),e=>t.decode({response:e,outputAst:a,errors:o,config:r})))})};const callUntraced=(e,t,n)=>{if(e.service!==void 0)return applyRetry(runWith(e,e.service,withIdempotencyTokens(e,t)),e.cfg,n);return h.suspend(()=>{const r=withIdempotencyTokens(e,t);return h.flatMap(n===void 0?protocolOf(e):n.phase(`distilled.setup`,protocolOf(e),{"distilled.setup.first_call":true}),t=>applyRetry(runWith(e,t,r),e.cfg,n))})};const callOperation=(e,t,n)=>{const r=o(n);return h.catchCause(h.withFiber(n=>{const i=n.getRef(a);const o=prepareOr(e);if(o instanceof SdkError)return h.fail(o);return c(n,i,o.info,r,t,e=>callUntraced(o,e,i),i===void 0?void 0:{input:o.inputAst,output:o.outputAst})}),t=>failed(e,t,r))};const bindContext=e=>h.map(h.context(),t=>n=>h.updateContext(e(n),e=>p.merge(t,e)));const K=/*@__PURE__*/ Object.setPrototypeOf({[Symbol.iterator](){return new ie(this.asEffect())},pipe(){return _(this.asEffect(),arguments)},asEffect(){return bindContext(this)},get input(){return prepare(stateOf(this)).cfg.input},get output(){return prepare(stateOf(this)).cfg.output},get errors(){return prepare(stateOf(this)).cfg.errors??[]},get operationName(){return prepare(stateOf(this)).cfg.operationName},get pagination(){return prepare(stateOf(this)).cfg.pagination}},Function.prototype);const makeOperation=(e,t)=>{const fn=t=>callOperation(e,t,fn);defineState(fn,e);return Object.setPrototypeOf(fn,t)};function make(e){return makeOperation({configFn:e},K)}const streamsOf=(t,r)=>{const guarded=e=>v.transformPull(v.suspend(e),e=>h.succeed(h.catchCause(e,e=>failed(t,e))));const pagesOf=(e,n)=>{const i=e.cfg;return(t.strategy??i.strategy??paginateWithDefaults)(r,n,i.pagination)};const pages=e=>guarded(()=>{const n=prepareOr(t);return n instanceof SdkError?v.fail(n):pagesOf(n,e)});const items=r=>guarded(()=>{const i=prepareOr(t);if(i instanceof SdkError)return v.fail(i);const a=i.cfg.pagination;if(!a.items)return pagesOf(i,r);return e(i.outputAst,n)!==void 0?extractArrayItems(pagesOf(i,r)):extractItems(pagesOf(i,r),a.items)});return{pages,items}};const streamGetter=e=>function(){const t=streamsOf(stateOf(this),this);Object.defineProperties(this,{pages:{value:t.pages,configurable:true},items:{value:t.items,configurable:true}});return t[e]};const ln=/*@__PURE__*/ Object.create(K,{pages:{get:/*@__PURE__*/ streamGetter(`pages`),configurable:true},items:{get:/*@__PURE__*/ streamGetter(`items`),configurable:true},asEffect:{value(){const e=stateOf(this);return h.map(bindContext(this),t=>Object.assign(t,streamsOf(e,t)))},configurable:true,writable:true}});function makePaginated(e,t){return makeOperation(t?{configFn:e,strategy:t}:{configFn:e},ln)}const cannotStream=e=>v.fail(new SdkError({message:`${e.config.operationName??`this operation`}: its protocol can't stream`}));const streamCall=e=>t=>v.catchCause(v.unwrap(h.suspend(()=>{const n=prepareOr(e);if(n instanceof SdkError)return h.succeed(v.fail(n));const r=n.cfg.streamInput;const i=r===void 0?t:{...t,...r};const run=e=>e.stream===void 0?cannotStream(n):e.stream(n,i);return n.service!==void 0?h.succeed(run(n.service)):h.map(protocolOf(n),run)})),t=>v.fromEffect(failed(e,t)));const un=/*@__PURE__*/ Object.create(K,{stream:{get(){const e=streamCall(stateOf(this));Object.defineProperty(this,"stream",{value:e,configurable:true});return e},configurable:true},asEffect:{value(){const e=stateOf(this);return h.map(h.context(),t=>{const merge=e=>p.merge(t,e);const call=e=>h.updateContext(this(e),merge);return Object.assign(call,{stream:t=>v.updateContext(streamCall(e)(t),merge)})})},configurable:true,writable:true}});function makeStreaming(e){return makeOperation({configFn:e},un)}const q=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/api/D`);const J=/*@__PURE__*/ new WeakMap;const sourceOf=e=>{let t=J.get(e);if(!t)J.set(e,t={fn:e,c:[]});if(!t.e){const[n,r]=e.call(e,q);t.e=n.split(`;`);t.r=r}return t};const schemaOf=(e,t)=>e.c[t]??=e.r[0](e.b??=t=>evalEntry(e,t),t);const schema=(e,t)=>schemaOf(sourceOf(e),t);const dn=/"(?:[^"\\]|\\.)*"|[\w$.+-]*/y;const pn=/[\w$]*/y;const evalEntry=(e,t)=>{const n=e.e[t];const r=e.r;let i=0;const tok=(e=pn)=>{e.lastIndex=i;const t=e.exec(n)[0];i+=t.length;return t};const list=e=>{const t=[];if(n[i]===e)i++;else do t.push(expr());while(n[i++]!==e);return t};const expr=()=>{let t;const a=n[i++];if(a===`{`){t={};if(n[i]===`}`)i++;else do{const e=tok(dn);i++;t[e[0]===`"`?JSON.parse(e):e]=expr()}while(n[i++]!==`}`)}else if(a===`[`)t=list(`]`);else if(`$#~>`.includes(a)){let o=e;let s=+tok();if(n[i]===`:`){i++;o=sourceOf(r[s]);s=+tok()}t=a===`$`?r[s]:a===`>`?()=>evalEntry(e,s):a===`#`?schemaOf(o,s):o.c[s]??=evalEntry(o,s)}else{i--;const e=tok(dn);t=e===`u`?void 0:JSON.parse(e)}for(;;){const e=n[i++];if(e===`(`)t=t(...list(`)`));else if(e===`@`)t=t.annotate({identifier:JSON.parse(tok(dn))});else if(e===`.`){const e=tok();t=n[i]===`(`?(i++,t[e](...list(`)`))):t[e]}else return i--,t}};return expr()};const dataState=function(){return defineState(this,{configFn:()=>evalEntry(sourceOf(this),0)})};let mn;let hn;let gn;let Y;const defining=(e,t)=>{const n=Y;Y=e;try{t()}finally{Y=n}};const named=(e,t,n)=>[t.replaceAll(`%`,e),n];const asOp=e=>Object.setPrototypeOf(e,mn??=Object.create(K,{[G]:{get:dataState,configurable:true}}));const asOpPaginated=e=>Object.setPrototypeOf(e,hn??=Object.create(ln,{[G]:{get:dataState,configurable:true}}));const asOpStreaming=e=>Object.setPrototypeOf(e,gn??=Object.create(un,{[G]:{get:dataState,configurable:true}}));const op=e=>Y?Y(e,0):asOp(e);const opPaginated=e=>Y?Y(e,1):asOpPaginated(e);const opStreaming=e=>Y?Y(e,3):asOpStreaming(e);const call=(e,t)=>callOperation(stateOf(e),t,e);const errorBase=e=>{while(e&&Object.getPrototypeOf(e)!==_n&&!J.get(e)?.k)e=Object.getPrototypeOf(e);if(!e)return void 0;const t=sourceOf(e);if(!t.k){const n=evalEntry(t,0);t.k=n;Object.setPrototypeOf(e,n);Object.setPrototypeOf(e.prototype,n.prototype)}return t.k};let _n;const LazyErrorStatics=()=>_n??=new Proxy(Object.create(Function.prototype),{get:(e,t,n)=>t in e||!errorBase(n)?Reflect.get(e,t,n):Reflect.get(n,t,n)});const asError=e=>Object.setPrototypeOf(e,LazyErrorStatics());const error=e=>Y?Y(e,2):asError(e);const newError=(e,t,n)=>t?Reflect.construct(errorBase(t),[e],t):n;const vn=[`o`,`p`,``,`s`];const define=(e,t,n)=>{if(n===2){const n=e.ei++;if(n>=e.e.length)throw new Error(`distilled: ${e.spec}: error ${n} has no stub`);e.ed[n]=t;return e.e[n]}const r=e.oi++;if(r>=e.o.length||e.kinds[r]!==vn[n])throw new Error(`distilled: ${e.spec}: operation ${r} does not match its stub`);e.od[r]=t;return e.o[r]};const load=e=>{if(e.od)return;e.od=[];e.ed=[];try{defining((t,n)=>define(e,t,n),()=>globalThis.process.getBuiltinModule(`node:module`).createRequire(e.url)(e.spec))}catch(t){e.od=e.ed=void 0;e.oi=e.ei=0;throw t}if(e.oi!==e.o.length||e.ei!==e.e.length)throw new Error(`distilled: ${e.spec} defined ${e.oi} of ${e.o.length} operations and ${e.ei} of ${e.e.length} errors (was it imported directly before?)`)};const yn={};const node=e=>globalThis.process?.getBuiltinModule?.(e);const read=(e,t,n)=>{const r=node(`node:fs`);if(e.fd===void 0){e.fd=r.openSync(e.file,`r`);queueMicrotask(()=>{r.closeSync(e.fd);e.fd=void 0})}const i=globalThis.Buffer.allocUnsafe(n);r.readSync(e.fd,i,0,n,t);return i.toString(`utf8`,0,n)};const indexOf=(e,t)=>{const n=t.indexOf(`
|
|
2
|
+
`)+1;const r=t.indexOf(`
|
|
3
|
+
`,n)+1;return{file:e,raw:t,imports:parseInt(t),importsAt:n,tableAt:r,linesAt:t.indexOf(`
|
|
4
|
+
`,r)+1,importValues:[],v:[]}};const fileOf=e=>/^file:\/\/\/[^%?#]*$/.test(e.url)&&globalThis.process.platform!==`win32`?e.url.slice(7,e.url.lastIndexOf(`/`)+1)+e.spec:node(`node:url`).fileURLToPath(new URL(e.spec,e.url));const sliced=e=>{if(e.ix!==void 0)return e.ix;e.ix=false;if(e.at===void 0||e.od)return false;try{Function(``);const t=fileOf(e);e.ix=indexOf(t,read({file:t},e.at,e.len));e.od=[];e.ed=[]}catch{e.ix=false}return e.ix};let bn=false;const prime=e=>{bn=true;queueMicrotask(()=>{const t=sliced(e);if(t&&t.imports>0)importOf(e,t,0)})};const lineOf=(e,t)=>{const n=e.tableAt+5*t;return e.raw.slice(e.linesAt+parseInt(e.raw.slice(n,n+5),36),e.linesAt+parseInt(e.raw.slice(n+5,n+10),36)-1)};const nameOf=(e,t)=>lineOf(e,t).split(`|`)[0].split(` `)[3];const importSpec=(e,t)=>(e.specs??=e.raw.slice(e.importsAt,e.tableAt-1).split(` `))[t].split(`:`);const importOf=(e,t,n)=>{if(n in t.importValues)return t.importValues[n];const[,r,i]=importSpec(t,n);return t.importValues[n]=e.ns[+r][i]};const refOf=(e,t,n)=>n<t.imports?importOf(e,t,n):valueOf(e,t,n-t.imports);const evaluate=(e,t,n)=>{const[r,i,a]=lineOf(t,n).split(`|`);const o=a?a.split(` `).map(e=>parseInt(e,36)):[];const s=o.map(e=>e<t.imports?importSpec(t,e)[0]:nameOf(t,e-t.imports));const c=o.map(n=>refOf(e,t,n));const l=`\n//# sourceURL=${t.file}#${nameOf(t,n)}`;if(i&&i[0]!==`(`){const[e,n]=i.split(`;`);const[r,a,o]=n.split(` `).map(e=>parseInt(e,36));return compileBody(t,s,c,e?e.split(`,`):[],r,a,o,l)}const[,u,d]=r.split(` `).map(e=>parseInt(e,36));let f;if(i?.[0]===`(`){const e=i.slice(1).split(`,`);const n={names:s.slice(),values:c.slice()};f=``;let r=u;e.forEach((e,i)=>{const[a,o,u,d,p]=e.split(` `).map(e=>parseInt(e,36));const m=e.split(` `)[5];let h;s.push(`$lazy${i}`);c.push(function(){h??=compileBody(t,n.names,n.values,m?m.split(`+`):[],u,d,p,l);return h.apply(this,arguments)});f+=`${read(t,r,a-r)}$lazy${i}`;r=o});f+=read(t,r,d-r)}else f=read(t,u,d-u);return Function(...s,`"use strict";return(${f}\n)${l}`)(...c)};const compileBody=(e,t,n,r,i,a,o,s)=>{const c=read(e,i,a-i);const l=t.map(e=>!r.includes(e));return Function(...t.filter((e,t)=>l[t]),...r,`"use strict";${o?`return(${c}\n)`:`{${c}\n}`}${s}`).bind(void 0,...n.filter((e,t)=>l[t]))};const dataFn=(e,t,n)=>{const[r,i,a]=n.slice(1).split(`;`);const o=i.indexOf(` `);const s=parseInt(i,36);const c=read(t,s,parseInt(i.slice(o+1),36)-s);const l=[];if(a)for(const n of a.split(`,`)){const r=parseInt(n,36);l.push(r<t.imports?importOf(e,t,r):slot(e,t,r-t.imports,false))}return[r?c.replaceAll(`%`,r):c,l]};const slot=(e,t,n,r)=>{if(!r){if(n in t.v)return t.v[n]===yn?void 0:t.v[n];const r=e.o.length;if(n<r)return t.v[n]=e.o[n];if(n<r+e.e.length)return t.v[n]=e.e[n-r]}const i=t.tableAt+5*n;const a=t.raw.slice(t.linesAt+parseInt(t.raw.slice(i,i+5),36),t.linesAt+parseInt(t.raw.slice(i+5,i+10),36)-1);const o=a.indexOf(`|`);if(a[o+1]===`=`){const i=dataFn.bind(void 0,e,t,a.slice(o+1));return r?i:t.v[n]=i}if(r)return evaluate(e,t,n);if(a[0]===`1`){let r;return t.v[n]=function(){return(r??=evaluate(e,t,n)).apply(this,arguments)}}t.v[n]=yn;return t.v[n]=evaluate(e,t,n)};const valueOf=(e,t,n)=>slot(e,t,n,false);const dataOf=(e,t,n)=>{const r=t===0?e.od:e.ed;if(r?.[n])return r[n];const i=sliced(e);if(!i){load(e);return(t===0?e.od:e.ed)[n]}return(t===0?e.od:e.ed)[n]=slot(e,i,t===0?n:e.o.length+n,true)};const lazyService=(e,t,n,r,i,a)=>{const o={url:e,spec:t,kinds:n,ns:r,at:i,len:a,o:[],e:[],oi:0,ei:0};if(!bn&&i!==void 0)prime(o);return{o:()=>{const e=n[o.o.length];const t=function op(e){return e===q?dataOf(o,0,o.o.indexOf(op))(q):call(op,e)};o.o.push(e===`p`?asOpPaginated(t):e===`s`?asOpStreaming(t):asOp(t));return t},e:e=>{const t={[e]:function(e){return new.target?newError(e,new.target,void 0):dataOf(o,1,o.e.indexOf(this))(e)}}[e];o.e.push(asError(t));return t},get E(){const e=this.e;return new Proxy({},{get:(t,n)=>e(n)})}}};const namespaceOf=e=>e.ns??=globalThis.process.getBuiltinModule(`node:module`).createRequire(e.url)(e.spec);let xn;const lazyNamespace=(e,t)=>new Proxy({url:e,spec:t},xn??={get:(e,t)=>namespaceOf(e)[t],has:(e,t)=>t in namespaceOf(e),ownKeys:e=>Reflect.ownKeys(namespaceOf(e)),getOwnPropertyDescriptor:(e,t)=>{const n=Reflect.getOwnPropertyDescriptor(namespaceOf(e),t);return n&&{...n,configurable:true}},getPrototypeOf:()=>null,set:()=>false,defineProperty:()=>false,deleteProperty:()=>false});var ConfigError=class extends (/*@__PURE__*/ kt()(`ConfigError`,{message:H,key:/*@__PURE__*/ V(H)}).pipe(be)){};const Sn=`effect/ConfigProvider`;const fromEnv=e=>globalThis.process?.env?.[e];var Missing=class{name;constructor(e){this.name=e}};const X=/*@__PURE__*/ Symbol(`defer`);const Cn=/*@__PURE__*/ Symbol.for(`@distilled.cloud/core/config/read`);const readerOf=e=>e[Cn];const wn={key:Sn};const hasProvider=e=>p.getOrUndefined(e,wn)!==void 0;const missingError=e=>new ConfigError({key:e.name,message:`Expected ${e.name} to be set`});const fromReader=e=>{const t=h.withFiber(t=>{if(hasProvider(t.context))return e.viaEffect();const n=e.read();if(n===X)return e.viaEffect();return n instanceof Missing?h.fail(missingError(n)):h.succeed(n)});t[Cn]=e;return t};const lookup=e=>h.flatMap(h.context(),t=>{const n=t.mapUnsafe.get(Sn);if(!n)return h.succeed(fromEnv(e));return h.map(n.load([e]),e=>e?._tag===`Value`?e.value:void 0)});const required=e=>fromReader({read:()=>fromEnv(e)??new Missing(e),viaEffect:()=>h.flatMap(lookup(e),t=>t===void 0?h.fail(missingError(new Missing(e))):h.succeed(t))});const String$1=e=>required(e);const Redacted=e=>map(e=>le.make(e))(required(e));const isMissed=e=>typeof e===`object`&&e!==null&&e._tag===`ConfigError`;const catchMissed=(e,t)=>h.catchIf(e,isMissed,t);const option=e=>{const viaEffect=()=>catchMissed(h.map(e,g.some),()=>h.succeed(g.none()));const t=readerOf(e);if(!t)return viaEffect();return fromReader({read:()=>{const e=t.read();if(e===X)return X;return e instanceof Missing?g.none():g.some(e)},viaEffect})};const withDefault=e=>t=>{const viaEffect=()=>catchMissed(t,()=>h.succeed(e));const n=readerOf(t);if(!n)return viaEffect();return fromReader({read:()=>{const t=n.read();return t instanceof Missing?e:t},viaEffect})};const orElse=e=>t=>{const viaEffect=()=>catchMissed(t,e);const n=readerOf(t);if(!n)return viaEffect();return fromReader({read:()=>{const t=n.read();if(!(t instanceof Missing))return t;const r=readerOf(e());return r?r.read():X},viaEffect})};const map=e=>t=>{const n=readerOf(t);if(!n)return h.map(t,e);return fromReader({read:()=>{const t=n.read();return t===X||t instanceof Missing?t:e(t)},viaEffect:()=>h.map(n.viaEffect(),e)})};const all=e=>{const viaEffect=()=>h.all(e);const t=Object.keys(e);const n=t.map(t=>readerOf(e[t]));if(n.some(e=>e===void 0))return viaEffect();return fromReader({read:()=>{const e={};for(let r=0;r<t.length;r++){const i=n[r].read();if(i===X||i instanceof Missing)return i;e[t[r]]=i}return e},viaEffect})};const Tn={status:bt,code:/*@__PURE__*/ V(H),message:/*@__PURE__*/ V(H),body:Tt};var SchemaMismatch=class extends Error{name=`SchemaError`;path;expected;actual;constructor(e,t,n){super(`Expected ${t}, got ${show(n)}${e.length?` at ${JSON.stringify(e.map(e=>typeof e===`symbol`?String(e):e))}`:``}`);this.path=e;this.expected=t;this.actual=n}};const withholdActual=e=>new SchemaMismatch(e.path,e.expected,`[REDACTED]`);const show=e=>{if(e===Z)return`nothing (missing key)`;if(e===void 0)return`undefined`;if(typeof e===`string`)return JSON.stringify(e.length>40?`${e.slice(0,40)}...`:e);if(Array.isArray(e))return`an array`;if(e!==null&&typeof e===`object`)return`an object`;return String(e)};const Z=Symbol(`missing`);const makeCompile=e=>{const fail=(e,t)=>({path:[],expected:e,actual:t});const ok=()=>void 0;const t=new Set(Reflect.ownKeys(Object.prototype)).add(`__proto__`);const ownOnly=e=>t.has(typeof e===`number`?String(e):e);const typeOf=e=>t=>typeof t===e?void 0:fail(e,t);const n=/* @__PURE__ */ new WeakMap;const compile=e=>{let t=n.get(e);if(t===void 0){let r;n.set(e,e=>r(e));r=t=withChecks(e,build(e));n.set(e,t)}return t};const withChecks=(e,t)=>{const n=e.checks;if(!n?.length||isLite(e))return t;const r=[];const add=e=>e._tag===`FilterGroup`?e.checks.forEach(add):r.push(e);n.forEach(add);return n=>{const i=t(n);if(i)return i;for(const t of r){const r=t.run(n,e,{});if(r!==void 0&&r!==true)return fail(String(t.annotations?.expected??`a valid value`),n)}}};const isLite=e=>e[`~lite`]===true;const isOptional=e=>e.context?.isOptional===true;const build=e=>{const t=e.encoding;if(t?.length&&!isLite(e))return compile(t[t.length-1].to);switch(e._tag){case`String`:case`TemplateLiteral`:return typeOf(`string`);case`Number`:return typeOf(`number`);case`Boolean`:return typeOf(`boolean`);case`BigInt`:return typeOf(`bigint`);case`Symbol`:return typeOf(`symbol`);case`Null`:return e=>e===null?void 0:fail(`null`,e);case`Undefined`:return e=>e===void 0?void 0:fail(`undefined`,e);case`Never`:return e=>fail(`never`,e);case`Literal`:case`UniqueSymbol`:{const t=e._tag===`Literal`?e.literal:e.symbol;return e=>e===t?void 0:fail(show(t),e)}case`Enum`:{const t=e.enums.map(e=>e[1]);return e=>t.includes(e)?void 0:fail(`an enum value`,e)}case`ObjectKeyword`:return e=>typeof e===`object`&&e!==null||typeof e===`function`?void 0:fail(`object | function`,e);case`Union`:return union(e);case`Arrays`:return arrays(e);case`Objects`:return objects(e);case`Suspend`:{let t;return n=>(t??=compile(e.thunk()))(n)}case`Declaration`:if(isLite(e)){const t=e.check;const n=String(e.annotations?.identifier??`a valid value`);return t?e=>t(e)?void 0:fail(n,e):ok}return declaration(e);default:return ok}};const declaration=e=>{const t=e.run;if(!t||e.typeParameters?.length)return ok;let n;return r=>{return(n??=t([]))(r,e,{})?._tag===`Failure`?fail(String(e.annotations?.identifier??e.annotations?.expected??`a valid value`),r):void 0}};const union=e=>{const t=e.types.map(compile);return e=>{let n;for(let r=0;r<t.length;r++){const i=t[r](e);if(i===void 0)return void 0;n??=i}return t.length===1?n:fail(`a union member`,e)}};const arrays=e=>{const t=(e.elements??[]).map(e=>[compile(e),isOptional(e)]);const n=(e.rest??[]).map(compile);const r=n[0];const i=n.slice(1);return e=>{if(!Array.isArray(e))return fail(`array`,e);const n=e.length;for(let r=0;r<t.length;r++){const[i,a]=t[r];if(r>=n){if(a)continue;return at(fail(`an element`,Z),r)}const o=i(e[r]);if(o)return at(o,r)}if(r===void 0)return n>t.length?at(fail(`never`,e[t.length]),t.length):void 0;const a=n-i.length;if(a<t.length)return at(fail(`an element`,Z),n);for(let n=t.length;n<a;n++){const t=r(e[n]);if(t)return at(t,n)}for(let t=0;t<i.length;t++){const n=i[t](e[a+t]);if(n)return at(n,a+t)}}};const at=(e,t)=>{e.path.push(t);return e};const objects=t=>{const n=(t.propertySignatures??[]).map(e=>[e.name,compile(e.type),isOptional(e.type),ownOnly(e.name)]);const r=(t.indexSignatures??[]).map(e=>[compile(e.parameter),compile(e.type)]);const i=new Set(n.map(e=>e[0]));if(n.length===0&&r.length===0)return e=>e===null||e===void 0?fail(`{}`,e):void 0;return t=>{if(typeof t!==`object`||t===null||Array.isArray(t))return fail(`object`,t);const a=t;for(let e=0;e<n.length;e++){const[t,r,i,o]=n[e];if(!(Object.hasOwn(a,t)||!o&&t in a)){if(i)continue;return at(fail(`a value`,Z),t)}const s=r(a[t]);if(s)return at(s,t)}if(r.length||e)for(const t of Object.keys(a)){if(i.has(t))continue;let n=false;for(const[e,i]of r){if(e(t)!==void 0)continue;n=true;const r=i(a[t]);if(r)return at(r,t)}if(e&&!n)return at(fail(`no value (the schema does not model this key)`,a[t]),t)}}};return compile};let En;let Dn;const decoderFor=(e,t=false)=>{const n=t?kn:On;let decode=n.get(e);if(decode===void 0){const r=t?(Dn??=makeCompile(true))(e):(En??=makeCompile(false))(e);decode=e=>{const t=r(e);return t===void 0?void 0:new SchemaMismatch(t.path.reverse(),t.expected,t.actual)};n.set(e,decode)}return decode};const On=/*@__PURE__*/ new WeakMap;const kn=/*@__PURE__*/ new WeakMap;const Q=/*@__PURE__*/ p.Reference(`@distilled.cloud/core/ResponseValidation`,{defaultValue:()=>`lenient`});const $=/*@__PURE__*/ p.Reference(`@distilled.cloud/core/ResponseValidation/StrictDecoder`,{defaultValue:()=>void 0});const layerOfContext=e=>{const t=se.succeedContext(e);const n=Object.create(e);const r=Object.getPrototypeOf(t);for(const e of Reflect.ownKeys(r))if(e!==`pipe`)n[e]=r[e];n.build=t.build;return n};const An=/*@__PURE__*/ layerOfContext(/*@__PURE__*/ p.add(/*@__PURE__*/ p.make(Q,`strict`),$,decoderFor));const jn=/*@__PURE__*/ layerOfContext(/*@__PURE__*/ p.add(/*@__PURE__*/ p.make(Q,`additionalProperties`),$,decoderFor));const Mn=/*@__PURE__*/ layerOfContext(/*@__PURE__*/ p.make(Q,`lenient`));const Nn=/*@__PURE__*/ h.map(Q,e=>e!==`lenient`);const failUnlessLenient=(e,t)=>h.flatMap(Q,n=>n===`lenient`?h.succeed(t):h.fail(e));const checkResponse=(e,t,n)=>{const r=p.get(e,Q);if(r===`lenient`)return void 0;const i=p.get(e,$);if(!i)return new SchemaMismatch([],`the ResponseValidation.${r} layer`,r);return i(t,r===`strict`)(n)};const validateResponse=(e,t,n)=>h.withFiber(r=>{const i=checkResponse(r.context,e,t);return i===void 0?h.succeed(t):h.fail(n(i))});export{q as api$D,call as api$call,cannotStream as api$cannotStream,describeOperation as api$describeOperation,encodeRequest as api$encodeRequest,error as api$error,lazyNamespace as api$lazyNamespace,lazyService as api$lazyService,make as api$make,makePaginated as api$makePaginated,makeStreaming as api$makeStreaming,named as api$named,newError as api$newError,op as api$op,opPaginated as api$opPaginated,opStreaming as api$opStreaming,schema as api$schema,withValue as api$withValue,P as category$AbortedError,F as category$AlreadyExistsError,b as category$AuthError,x as category$BadRequestError,A as category$ConfigurationError,S as category$ConflictError,I as category$DependencyViolationError,N as category$LockedError,O as category$NetworkError,w as category$NotFoundError,k as category$ParseError,T as category$QuotaError,M as category$RetryableError,E as category$ServerError,D as category$ThrottlingError,j as category$TimeoutError,catchErrors as category$catch,catchErrors as category$catchErrors,Be as category$catchAbortedError,Ve as category$catchAlreadyExistsError,De as category$catchAuthError,Oe as category$catchBadRequestError,catchCategory as category$catchCategory,Ie as category$catchConfigurationError,ke as category$catchConflictError,He as category$catchDependencyViolationError,ze as category$catchLockedError,Pe as category$catchNetworkError,Ae as category$catchNotFoundError,Fe as category$catchParseError,je as category$catchQuotaError,Re as category$catchRetryableError,Me as category$catchServerError,Ne as category$catchThrottlingError,Le as category$catchTimeoutError,L as category$categoriesKey,hasCategory as category$hasCategory,isAbortedError as category$isAbortedError,isAlreadyExistsError as category$isAlreadyExistsError,isAuthError as category$isAuthError,isBadRequestError as category$isBadRequestError,isConfigurationError as category$isConfigurationError,isConflictError as category$isConflictError,isDependencyViolationError as category$isDependencyViolationError,isLockedError as category$isLockedError,isNetworkError as category$isNetworkError,isNotFoundError as category$isNotFoundError,isParseError as category$isParseError,isQuotaError as category$isQuotaError,isRetryable as category$isRetryable,isRetryableError as category$isRetryableError,isServerError as category$isServerError,isThrottling as category$isThrottling,isThrottlingError as category$isThrottlingError,isTimeoutError as category$isTimeoutError,isTransientError as category$isTransientError,ue as category$retryableKey,we as category$withAbortedError,Te as category$withAlreadyExistsError,de as category$withAuthError,fe as category$withBadRequestError,withCategory as category$withCategory,be as category$withConfigurationError,pe as category$withConflictError,Ee as category$withDependencyViolationError,Ce as category$withLockedError,ve as category$withNetworkError,me as category$withNotFoundError,ye as category$withParseError,he as category$withQuotaError,withRetryable as category$withRetryable,Se as category$withRetryableError,ge as category$withServerError,_e as category$withThrottlingError,xe as category$withTimeoutError,ConfigError as config$ConfigError,Redacted as config$Redacted,String$1 as config$String,all as config$all,map as config$map,option as config$option,orElse as config$orElse,withDefault as config$withDefault,extractArrayItems as pagination$extractArrayItems,extractItems as pagination$extractItems,getItems as pagination$getItems,getPath as pagination$getPath,isTerminalToken as pagination$isTerminalToken,missingPaginationConfig as pagination$missingPaginationConfig,nextLink as pagination$nextLink,paginateCursor as pagination$paginateCursor,paginateKeyset as pagination$paginateKeyset,paginateLink as pagination$paginateLink,paginatePageNumber as pagination$paginatePageNumber,paginateRelay as pagination$paginateRelay,paginateSingle as pagination$paginateSingle,paginateToken as pagination$paginateToken,paginateWithDefaults as pagination$paginateWithDefaults,recordPageHeaders as pagination$recordPageHeaders,Q as response_validation$ResponseValidation,SchemaMismatch as response_validation$SchemaMismatch,SchemaMismatch as response_validation_strict$SchemaMismatch,$ as response_validation$StrictDecoder,jn as response_validation$additionalProperties,checkResponse as response_validation$checkResponse,failUnlessLenient as response_validation$failUnlessLenient,Nn as response_validation$isValidating,Mn as response_validation$lenient,An as response_validation$strict,validateResponse as response_validation$validateResponse,withholdActual as response_validation$withholdActual,withholdActual as response_validation_strict$withholdActual,decoderFor as response_validation_strict$decoderFor,jt as retry$BOUNDED_HINT_MAX_EXTRA_MS,Pt as retry$DEFAULT_SERVER_RETRY_HINT_CAP_MS,It as retry$ServerRetryHintCapMs,capped as retry$capped,Mt as retry$defaultBudget,U as retry$defaultOptions,defaultWith as retry$defaultWith,Nt as retry$jittered,makeBudget as retry$makeBudget,makeDefault as retry$makeDefault,makeRetryService as retry$makeRetryService,readServerRetryHintCapMsFromEnv as retry$readServerRetryHintCapMsFromEnv,resolveServerRetryHintCapMs as retry$resolveServerRetryHintCapMs,serverHintMillis as retry$serverHintMillis,serverRetryHintCapLayer as retry$serverRetryHintCapLayer,throttlingFactory as retry$throttlingFactory,Ht as retry$throttlingOptions,transientFactory as retry$transientFactory,Wt as retry$transientOptions,Je as schema_lite_impl$Any,Array$1 as schema_lite_impl$Array,Ke as schema_lite_impl$Boolean,$e as schema_lite_impl$Date,et as schema_lite_impl$Duration,Extend as schema_lite_impl$Extend,Literal as schema_lite_impl$Literal,Literals as schema_lite_impl$Literals,Ye as schema_lite_impl$Null,NullOr as schema_lite_impl$NullOr,R as schema_lite_impl$Number,Record as schema_lite_impl$Record,Redacted$1 as schema_lite_impl$Redacted,Ge as schema_lite_impl$String,Struct as schema_lite_impl$Struct,StructWithRest as schema_lite_impl$StructWithRest,TaggedError as schema_lite_impl$TaggedError,Tuple as schema_lite_impl$Tuple,Ze as schema_lite_impl$Undefined,Union as schema_lite_impl$Union,qe as schema_lite_impl$Unknown,Xe as schema_lite_impl$Void,at as schema_lite_impl$at,declare as schema_lite_impl$declare,encodeKeys as schema_lite_impl$encodeKeys,Qe as schema_lite_impl$encodeKeysKey,fromNode as schema_lite_impl$fromNode,instanceOf as schema_lite_impl$instanceOf,isLite as schema_lite_impl$isLite,Ue as schema_lite_impl$liteKey,optional as schema_lite_impl$optional,representation as schema_lite_impl$representation,suspend as schema_lite_impl$suspend,toEffect as schema_lite_impl$toEffect,Ot as schema_lite_typed$Any,ut as schema_lite_typed$Array,St as schema_lite_typed$Boolean,Ct as schema_lite_typed$Date,wt as schema_lite_typed$Duration,xt as schema_lite_typed$Int,pt as schema_lite_typed$Literal,mt as schema_lite_typed$Literals,Et as schema_lite_typed$Null,ht as schema_lite_typed$NullOr,bt as schema_lite_typed$Number,dt as schema_lite_typed$Record,yt as schema_lite_typed$Redacted,H as schema_lite_typed$String,st as schema_lite_typed$Struct,ct as schema_lite_typed$StructWithRest,kt as schema_lite_typed$TaggedError,gt as schema_lite_typed$Tuple,ft as schema_lite_typed$Union,Tt as schema_lite_typed$Unknown,Dt as schema_lite_typed$Void,_t as schema_lite_typed$declare,vt as schema_lite_typed$instanceOf,V as schema_lite_typed$optional,lt as schema_lite_typed$suspend,SdkError as sdk_error$SdkError,loadModule as sdk_error$loadModule,Body as trait$Body,CommaDelimited as trait$CommaDelimited,DeepQuery as trait$DeepQuery,FormDataFile as trait$FormDataFile,Header as trait$Header,Http as trait$Http,HttpBody as trait$HttpBody,IdempotencyToken as trait$IdempotencyToken,KeyDictionary as trait$KeyDictionary,Label as trait$Label,LabelEncoding as trait$LabelEncoding,Query as trait$Query,ResponseCode as trait$ResponseCode,StringEncoded as trait$StringEncoded,UnionCases as trait$UnionCases,all$1 as trait$all,W as trait$annotationMetaSymbol,applyErrorMatchers as trait$applyErrorMatchers,Xt as trait$bodySymbol,$t as trait$commaDelimitedSymbol,en as trait$deepQuerySymbol,sn as trait$errorMatchersSymbol,rn as trait$formDataFileSymbol,getErrorMatchers as trait$getErrorMatchers,Yt as trait$headerSymbol,tn as trait$httpBodySymbol,Gt as trait$httpSymbol,Qt as trait$idempotencyTokenSymbol,an as trait$keyDictionarySymbol,qt as trait$labelEncodingSymbol,Kt as trait$labelSymbol,makeAnnotation as trait$makeAnnotation,Zt as trait$querySymbol,Jt as trait$responseCodeSymbol,nn as trait$stringEncodedSymbol,on as trait$unionCasesSymbol,Tn as unknown_error$UnknownErrorFields};
|
|
5
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","names":["node","make","String","Number","Array","Date","Redacted","optional","L.optional","Struct","L.Struct","StructWithRest","L.StructWithRest","suspend","L.suspend","Array","L.Array","Record","L.Record","Union","L.Union","Literal","L.Literal","Literals","L.Literals","NullOr","L.NullOr","Tuple","L.Tuple","declare","L.declare","instanceOf","L.instanceOf","Redacted","L.Redacted","String","L.String","Number","L.Number","Boolean","L.Boolean","Date","L.Date","Duration","L.Duration","Unknown","L.Unknown","Null","L.Null","Void","L.Void","Any","L.Any","TaggedError","L.TaggedError","Schema.String","Duration","CONFIG_PROVIDER_KEY","all","Duration","Telemetry.phase","Telemetry.operationInfo","Send.send","Telemetry.captureCallSite","Telemetry.Debug","Telemetry.operationSpan","Pagination.paginateWithDefaults","Pagination.extractArrayItems","Pagination.extractItems","Schema.String","Category.withConfigurationError","String","Schema.Number","Schema.String","Schema.Unknown","Cause","Context","Duration$2","Effect","Exit","HttpClient","Option","Ref","References","Stream","HttpClientError","Predicate","Data","Layer","Schedule","Redact","AuthError","BadRequestError","ConflictError","NotFoundError","QuotaError","ServerError","ThrottlingError","NetworkError","ParseError","ConfigurationError","TimeoutError","RetryableError","LockedError","AbortedError","AlreadyExistsError","DependencyViolationError","categoriesKey","retryableKey","categories","category","C","info","withAuthError","withBadRequestError","withConflictError","withNotFoundError","withQuotaError","withServerError","withThrottlingError","withNetworkError","withParseError","withConfigurationError","withTimeoutError","withRetryableError","withLockedError","withAbortedError","withAlreadyExistsError","withDependencyViolationError","error","effect","e","f","args","handler","cat","catchAuthError","catchBadRequestError","catchConflictError","catchNotFoundError","catchQuotaError","catchServerError","catchThrottlingError","catchNetworkError","catchParseError","catchConfigurationError","catchTimeoutError","catchRetryableError","catchLockedError","catchAbortedError","catchAlreadyExistsError","catchDependencyViolationError","liteKey","n","Proto","pipeArguments","annotations","self","ast","from","k","u","s","String$2","Number$1","Boolean","Unknown","Any","Null","Void","Undefined","value","values","v","inner","members","item","elements","key","fields","name","base","struct","records","r","own","names","p","inherited","resolved","encodeKeysKey","mapping","identifier","Date$1","Duration","cls","tagKey","keysKey","astKey","annotationsKey","annotationMetaKey","out","liteErrorBase","keys","picked","props","tag","AtProto","build","j","memo","liteBelow","known","kids","i","l","S","hit","real","thunk","optional$1","Struct$1","StructWithRest$1","suspend$1","Array$2","Record$1","Union$1","Literal$1","Literals$1","NullOr$1","Tuple$1","declare$1","instanceOf$1","Redacted$2","String$3","Number$2","Int","Boolean$1","Date$2","Duration$1","Unknown$1","Null$1","Void$1","Any$1","TaggedError$1","load","cause","parts","path","current","obj","part","next","child","token","operation","input","inputToken","pagination","outputToken","startPage","state","response","nextPage","items","startCursor","requestedCursors","nextCursor","startToken","requestedTokens","nextToken","head","rest","limit","page","hasNextPath","hasNext","emptyPage","stuckCursor","PageHeaders","slot","context","headers","header","link","match","rel","requestPayload","pages","itemsPath","pull","chunk","itemsOf","BOUNDED_HINT_MAX_EXTRA_MS","initial","options","max","transientCost","throttlingCost","buckets","seen","successesOf","b","cost","throttling","defaultBudget","jittered","duration","DEFAULT_SERVER_RETRY_HINT_CAP_MS","ENV_SERVER_RETRY_HINT_CAP_MS","ServerRetryHintCapMs","capMs","raw","CONFIG_PROVIDER_KEY$1","fromLayer","provider","node","hint","defaultOptions","overridden","cached","override","backoff","result","slowBackoff","slowBackoffNoHint","throttlingFactoryOptions","throttlingOptions","transientFactoryOptions","transientOptions","annotationMetaSymbol","schema","sym","entries","a","entry","httpSymbol","trait","labelSymbol","labelEncodingSymbol","responseCodeSymbol","headerSymbol","bodySymbol","querySymbol","idempotencyTokenSymbol","format","commaDelimitedSymbol","deepQuerySymbol","httpBodySymbol","stringEncodedSymbol","formDataFileSymbol","keyDictionarySymbol","dict","unionCasesSymbol","discriminator","dictionaries","errorMatchersSymbol","matchers","prepared","t","attempt","boundedHintMs","hintMs","NO_BACKOFF","fiber","delayMs","delay","retried","phase","retryKey","cfg","first","debug","opt","policy","lastError","keepGoing","opts","schedule","takeLastRequest","clock","budget","last","ms","budgeted","failed","high","low","hex","x","tokens","getProps","getAnn","prop","filled","stateKey","inputAst","operationInfo","op","die","callSite","service","protocol","client","send","request","callInput","captureCallSite","Debug","operationSpan","sent","OperationProto","SingleShotGen","proto","make","call","rawResponseRootSymbol","fns","PaginatedOperationProto","strategy","fixed","StreamingOperationProto","fn","D","sources","src","TOKEN","NAME","re","close","c","h","d","dataProto","dataPaginatedProto","dataStreamingProto","definer","outer","data","stem","refs","lazyErrorStatics","target","receiver","newTarget","KIND_LETTERS","kind","svc","busy","m","fs","ix","buf","length","position","importsAt","tableAt","file","primed","at","source","depText","deps","url","params","range","start","end","expr","text","bs","be","arg","compiled","keep","sp","ops","line","bar","loaded","kinds","lazyNamespaceHandler","CONFIG_PROVIDER_KEY","DEFER","readSymbol","providerKey","reader","that","fallback","readers","UnknownErrorFields","expected","actual","mismatch","MISSING","prototypeKeys","checks","flat","encoding","lit","check","run","parse","tail","len","optional","index","o","exact","covered","param","compileNode","compileExact","decoders","exactDecoders","openDecoders","ResponseValidation","StrictDecoder","layer","both","layerProto","strict","additionalProperties","lenient","isValidating","mode","asRead","decoderOf","outputAst","onError"],"sources":["../../src/category.ts","../../src/schema-lite-impl.ts","../../src/schema-lite-typed.ts","../../src/sdk-error.ts","../../src/pagination.ts","../../src/retry.ts","../../src/trait.ts","../../src/api.ts","../../src/config.ts","../../src/unknown-error.ts","../../src/response-validation-strict.ts","../../src/response-validation.ts"],"mappings":"+8BA4BA,MAAa2F,EAAY,YACzB,MAAaC,EAAkB,kBAC/B,MAAaC,EAAgB,gBAC7B,MAAaC,EAAgB,gBAC7B,MAAaC,EAAa,aAC1B,MAAaC,EAAc,cAC3B,MAAaC,EAAkB,kBAC/B,MAAaC,EAAe,eAC5B,MAAaC,EAAa,aAC1B,MAAaC,EAAqB,qBAClC,MAAaC,EAAe,eAC5B,MAAaC,EAAiB,iBAC9B,MAAaC,EAAc,cAC3B,MAAaC,EAAe,eAC5B,MAAaC,EAAqB,qBAClC,MAAaC,EAA2B,2BA4BxC,MAAaC,EAAgB,oCAM7B,MA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