@globus/sdk 6.0.1 → 6.2.0-next.9.9c8bf24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/cjs/core/authorization/index.js +1 -1
  2. package/dist/cjs/core/authorization/index.js.map +1 -1
  3. package/dist/cjs/core/info/index.js +1 -1
  4. package/dist/cjs/core/info/index.js.map +1 -1
  5. package/dist/cjs/index.js +332 -143
  6. package/dist/cjs/index.js.map +4 -4
  7. package/dist/cjs/services/globus-connect-server/client.js +1 -1
  8. package/dist/cjs/services/globus-connect-server/client.js.map +1 -1
  9. package/dist/esm/core/info/version.d.ts +1 -1
  10. package/dist/esm/core/info/version.js +1 -1
  11. package/dist/esm/open-api/types/compute.d.ts +370 -90
  12. package/dist/esm/open-api/types/compute.d.ts.map +1 -1
  13. package/dist/esm/open-api/types/flows.d.ts +210 -262
  14. package/dist/esm/open-api/types/flows.d.ts.map +1 -1
  15. package/dist/esm/open-api/types/gcs/v5.4.d.ts +2536 -2276
  16. package/dist/esm/open-api/types/gcs/v5.4.d.ts.map +1 -1
  17. package/dist/esm/open-api/types/search.d.ts +131 -65
  18. package/dist/esm/open-api/types/search.d.ts.map +1 -1
  19. package/dist/esm/open-api/types/timers.d.ts +17 -7
  20. package/dist/esm/open-api/types/timers.d.ts.map +1 -1
  21. package/dist/esm/open-api/types/transfer.d.ts +798 -0
  22. package/dist/esm/open-api/types/transfer.d.ts.map +1 -0
  23. package/dist/esm/open-api/types/transfer.js +2 -0
  24. package/dist/esm/open-api/types/transfer.js.map +1 -0
  25. package/dist/esm/package.json +1 -1
  26. package/dist/esm/services/compute/index.d.ts +1 -1
  27. package/dist/esm/services/compute/index.js +1 -1
  28. package/dist/esm/services/globus-connect-server/client.d.ts +4 -4
  29. package/dist/esm/services/globus-connect-server/client.d.ts.map +1 -1
  30. package/dist/esm/services/groups/service/groups.d.ts +38 -0
  31. package/dist/esm/services/groups/service/groups.d.ts.map +1 -1
  32. package/dist/esm/services/groups/service/groups.js +53 -5
  33. package/dist/esm/services/groups/service/groups.js.map +1 -1
  34. package/dist/esm/services/groups/service/membership.d.ts +1 -0
  35. package/dist/esm/services/groups/service/membership.d.ts.map +1 -1
  36. package/dist/esm/services/groups/service/membership.js +3 -4
  37. package/dist/esm/services/groups/service/membership.js.map +1 -1
  38. package/dist/esm/services/groups/service/policies.d.ts +12 -0
  39. package/dist/esm/services/groups/service/policies.d.ts.map +1 -1
  40. package/dist/esm/services/groups/service/policies.js +17 -3
  41. package/dist/esm/services/groups/service/policies.js.map +1 -1
  42. package/dist/esm/services/search/service/query.d.ts +15 -22
  43. package/dist/esm/services/search/service/query.d.ts.map +1 -1
  44. package/dist/esm/services/search/service/query.js.map +1 -1
  45. package/dist/esm/services/transfer/index.d.ts +2 -0
  46. package/dist/esm/services/transfer/index.d.ts.map +1 -1
  47. package/dist/esm/services/transfer/index.js +2 -0
  48. package/dist/esm/services/transfer/index.js.map +1 -1
  49. package/dist/esm/services/transfer/service/endpoint-search.d.ts +5 -3
  50. package/dist/esm/services/transfer/service/endpoint-search.d.ts.map +1 -1
  51. package/dist/esm/services/transfer/service/endpoint-search.js.map +1 -1
  52. package/dist/esm/services/transfer/service/stream-access-point.d.ts +23 -0
  53. package/dist/esm/services/transfer/service/stream-access-point.d.ts.map +1 -0
  54. package/dist/esm/services/transfer/service/stream-access-point.js +26 -0
  55. package/dist/esm/services/transfer/service/stream-access-point.js.map +1 -0
  56. package/dist/esm/services/transfer/service/tunnel.d.ts +75 -0
  57. package/dist/esm/services/transfer/service/tunnel.d.ts.map +1 -0
  58. package/dist/esm/services/transfer/service/tunnel.js +80 -0
  59. package/dist/esm/services/transfer/service/tunnel.js.map +1 -0
  60. package/dist/umd/globus.production.js +2 -2
  61. package/dist/umd/globus.production.js.map +4 -4
  62. package/package.json +2 -2
@@ -1,5 +1,6 @@
1
- import type { QueryParameters } from '../types.js';
2
- import type { EntityType } from './endpoint.js';
1
+ import type { JSONFetchResponse } from '../../../services/types.js';
2
+ import type { PaginatedResponse, QueryParameters } from '../types.js';
3
+ import type { EntityType, EndpointListDocument } from './endpoint.js';
3
4
  /**
4
5
  * @see https://docs.globus.org/api/transfer/endpoint_search/#search_scope
5
6
  */
@@ -15,12 +16,13 @@ export type EndpointSearchQuery = QueryParameters<{
15
16
  filter_host_endpoint?: string;
16
17
  filter_non_functional?: 0 | 1 | null;
17
18
  }, 'Offset'>;
19
+ export type EndpointSearchResult = PaginatedResponse<'Offset', Omit<EndpointListDocument, 'length'>>;
18
20
  /**
19
21
  * Get a list of endpoints matching the search filters in a given search scope.
20
22
  * @see https://docs.globus.org/api/transfer/endpoint_search/#endpoint_search
21
23
  */
22
24
  export declare const endpointSearch: (options?: ({
23
25
  query?: EndpointSearchQuery;
24
- } & import("../../../services/types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<Response>;
26
+ } & import("../../../services/types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<EndpointSearchResult>>;
25
27
  export default endpointSearch;
26
28
  //# sourceMappingURL=endpoint-search.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint-search.d.ts","sourceRoot":"","sources":["../../../../../src/services/transfer/service/endpoint-search.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,QAAQ,GACR,cAAc,GACd,gBAAgB,GAChB,qBAAqB,GACrB,oBAAoB,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CACtC,EACD,QAAQ,CACT,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc;YAejB,mBAAmB;8KAC3B,CAAC;AAEH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"endpoint-search.d.ts","sourceRoot":"","sources":["../../../../../src/services/transfer/service/endpoint-search.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,4BAA4B,CAAC;AACnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACtE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,KAAK,GACL,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,QAAQ,GACR,cAAc,GACd,gBAAgB,GAChB,qBAAqB,GACrB,oBAAoB,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CACtC,EACD,QAAQ,CACT,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAClD,QAAQ,EACR,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CACrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc;YAmBf,mBAAmB;6JAhB5B,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAmBjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint-search.js","sourceRoot":"","sources":["../../../../../src/services/transfer/service/endpoint-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAmC1C;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,OAAQ,EAAE,UAAW;IAC3D,MAAM,qBAAqB,mCACtB,OAAO,KACV,KAAK,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,GACtB,CAAC;IACF,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,GAAG;QACjB,IAAI,EAAE,wBAAwB;KAC/B,EACD,qBAAqB,EACrB,UAAU,CACX,CAAC;AACJ,CAEE,CAAC;AAEH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"endpoint-search.js","sourceRoot":"","sources":["../../../../../src/services/transfer/service/endpoint-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAuC1C;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAC5B,OAAQ,EACR,UAAW;IAEX,MAAM,qBAAqB,mCACtB,OAAO,KACV,KAAK,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,GACtB,CAAC;IACF,OAAO,cAAc,CACnB;QACE,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM,CAAC,GAAG;QACjB,IAAI,EAAE,wBAAwB;KAC/B,EACD,qBAAqB,EACrB,UAAU,CACX,CAAC;AACJ,CAKC,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { JSONFetchResponse } from '../../../services/types.js';
2
+ import type { operations } from '../../../open-api/types/transfer.js';
3
+ type GetAllOperation = operations['stream_access_points_list_stream_access_points_get'];
4
+ /**
5
+ * Get a list of all stream access points.
6
+ */
7
+ export declare const getAll: (options?: ({
8
+ query?: GetAllOperation["parameters"]["query"];
9
+ payload?: GetAllOperation["requestBody"];
10
+ } & import("../../../services/types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<GetAllOperation["responses"]["200"]["content"]["application/json"]>>;
11
+ type GetOperation = operations['stream_access_points_get_stream_access_points__stream_access_point_uuid__get'];
12
+ /**
13
+ * Fetch a stream-access-point by its UUID.
14
+ */
15
+ export declare const get: (stream_access_point_uuid: string, options?: ({
16
+ query?: GetOperation["parameters"]["query"];
17
+ payload?: GetOperation["requestBody"];
18
+ } & {
19
+ query?: import("../../../services/types.js").BaseServiceMethodOptions["query"];
20
+ headers?: import("../../../services/types.js").BaseServiceMethodOptions["headers"];
21
+ }) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<GetOperation["responses"]["200"]["content"]["application/json"]>>;
22
+ export {};
23
+ //# sourceMappingURL=stream-access-point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream-access-point.d.ts","sourceRoot":"","sources":["../../../../../src/services/transfer/service/stream-access-point.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAKtE,KAAK,eAAe,GAAG,UAAU,CAAC,oDAAoD,CAAC,CAAC;AACxF;;GAEG;AACH,eAAO,MAAM,MAAM;YAcT,eAAe,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;cACpC,eAAe,CAAC,aAAa,CAAC;6JAZvC,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAa9F,CAAC;AAEH,KAAK,YAAY,GACf,UAAU,CAAC,8EAA8E,CAAC,CAAC;AAC7F;;GAEG;AACH,eAAO,MAAM,GAAG;YAiBJ,YAAY,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;cACjC,YAAY,CAAC,aAAa,CAAC;;;;6FAdtC,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAgB5F,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { serviceRequest } from '../../shared.js';
2
+ import { ID as service } from '../config.js';
3
+ import { RESOURCE_SERVERS } from '../../auth/config.js';
4
+ // eslint-disable-next-line @typescript-eslint/naming-convention
5
+ const resource_server = RESOURCE_SERVERS[service];
6
+ /**
7
+ * Get a list of all stream access points.
8
+ */
9
+ export const getAll = function (options, sdkOptions) {
10
+ return serviceRequest({
11
+ service,
12
+ resource_server,
13
+ path: `/v2/stream_access_points`,
14
+ }, options, sdkOptions);
15
+ };
16
+ /**
17
+ * Fetch a stream-access-point by its UUID.
18
+ */
19
+ export const get = function (stream_access_point_uuid, options, sdkOptions) {
20
+ return serviceRequest({
21
+ service,
22
+ resource_server,
23
+ path: `/v2/stream_access_points/${stream_access_point_uuid}`,
24
+ }, options, sdkOptions);
25
+ };
26
+ //# sourceMappingURL=stream-access-point.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream-access-point.js","sourceRoot":"","sources":["../../../../../src/services/transfer/service/stream-access-point.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AASxD,gEAAgE;AAChE,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAGlD;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,OAAQ,EACR,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO;QACP,eAAe;QACf,IAAI,EAAE,0BAA0B;KACjC,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAGE,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,UACjB,wBAAwB,EACxB,OAAQ,EACR,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO;QACP,eAAe;QACf,IAAI,EAAE,4BAA4B,wBAAwB,EAAE;KAC7D,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAMC,CAAC"}
@@ -0,0 +1,75 @@
1
+ import type { JSONFetchResponse } from '../../../services/types.js';
2
+ import type { operations } from '../../../open-api/types/transfer.js';
3
+ type GetAllOperation = operations['tunnels_list_tunnels_get'];
4
+ /**
5
+ * Get a list of tunnels.
6
+ */
7
+ export declare const getAll: (options?: ({
8
+ query?: GetAllOperation["parameters"]["query"];
9
+ payload?: GetAllOperation["requestBody"];
10
+ } & import("../../../services/types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<GetAllOperation["responses"]["200"]["content"]["application/json"]>>;
11
+ type GetOperation = operations['tunnels_get_tunnels__tunnel_uuid__get'];
12
+ /**
13
+ * Get a tunnel by its UUID.
14
+ */
15
+ export declare const get: (tunnel_uuid: string, options?: ({
16
+ query?: GetOperation["parameters"]["query"];
17
+ payload?: GetOperation["requestBody"];
18
+ } & {
19
+ query?: import("../../../services/types.js").BaseServiceMethodOptions["query"];
20
+ headers?: import("../../../services/types.js").BaseServiceMethodOptions["headers"];
21
+ }) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<GetOperation["responses"]["200"]["content"]["application/json"]>>;
22
+ type CreateOperation = operations['tunnels_post_tunnels_post'];
23
+ /**
24
+ * Create a new tunnel.
25
+ */
26
+ export declare const create: (options: ({
27
+ query?: CreateOperation["parameters"]["query"];
28
+ payload: CreateOperation["requestBody"]["content"]["application/json"];
29
+ } & import("../../../services/types.js").BaseServiceMethodOptions) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<CreateOperation["responses"]["201"]["content"]["application/json"]>>;
30
+ type DeleteOperation = operations['tunnels_delete_tunnels__tunnel_uuid__delete'];
31
+ /**
32
+ * Delete a tunnel by its UUID.
33
+ */
34
+ export declare const remove: (tunnel_uuid: string, options?: ({
35
+ query?: DeleteOperation["parameters"]["query"];
36
+ payload?: DeleteOperation["requestBody"];
37
+ } & {
38
+ query?: import("../../../services/types.js").BaseServiceMethodOptions["query"];
39
+ headers?: import("../../../services/types.js").BaseServiceMethodOptions["headers"];
40
+ }) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<DeleteOperation["responses"]["200"]["content"]["application/json"]>>;
41
+ type PatchOperation = operations['tunnels_patch_tunnels__tunnel_uuid__patch'];
42
+ type PatchPayload = PatchOperation['requestBody']['content']['application/json']['data']['attributes'];
43
+ /**
44
+ * Start a tunnel that's in the `AWAITING_LISTENER` state.
45
+ */
46
+ export declare const start: (tunnel_uuid: string, options: ({
47
+ query?: PatchOperation["parameters"]["query"];
48
+ payload: NonNullable<Pick<PatchPayload, "listener_ip_address" | "listener_port">> & Pick<PatchPayload, "label">;
49
+ } & {
50
+ query?: import("../../../services/types.js").BaseServiceMethodOptions["query"];
51
+ headers?: import("../../../services/types.js").BaseServiceMethodOptions["headers"];
52
+ }) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<PatchOperation["responses"]["200"]["content"]["application/json"]>>;
53
+ /**
54
+ * Stop a tunnel that isn't already in the `STOPPED` or `STOPPING` state.
55
+ */
56
+ export declare const stop: (tunnel_uuid: string, options?: ({
57
+ query?: PatchOperation["parameters"]["query"];
58
+ payload?: Pick<PatchPayload, "label">;
59
+ } & {
60
+ query?: import("../../../services/types.js").BaseServiceMethodOptions["query"];
61
+ headers?: import("../../../services/types.js").BaseServiceMethodOptions["headers"];
62
+ }) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<PatchOperation["responses"]["200"]["content"]["application/json"]>>;
63
+ type GetEventsOperation = operations['get_tunnel_events_by_tunnel_uuid_tunnels__tunnel_uuid__events_get'];
64
+ /**
65
+ * Get all events for a given tunnel.
66
+ */
67
+ export declare const getEventList: (tunnel_uuid: string, options?: ({
68
+ query?: GetEventsOperation["parameters"]["query"];
69
+ payload?: GetEventsOperation["requestBody"];
70
+ } & {
71
+ query?: import("../../../services/types.js").BaseServiceMethodOptions["query"];
72
+ headers?: import("../../../services/types.js").BaseServiceMethodOptions["headers"];
73
+ }) | undefined, sdkOptions?: import("../../../services/types.js").SDKOptions | undefined) => Promise<JSONFetchResponse<GetEventsOperation["responses"]["200"]["content"]["application/json"]>>;
74
+ export {};
75
+ //# sourceMappingURL=tunnel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../../../../src/services/transfer/service/tunnel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAGV,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAKtE,KAAK,eAAe,GAAG,UAAU,CAAC,0BAA0B,CAAC,CAAC;AAC9D;;GAEG;AACH,eAAO,MAAM,MAAM;YAcT,eAAe,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;cACpC,eAAe,CAAC,aAAa,CAAC;6JAZvC,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAa9F,CAAC;AAEH,KAAK,YAAY,GAAG,UAAU,CAAC,uCAAuC,CAAC,CAAC;AACxE;;GAEG;AACH,eAAO,MAAM,GAAG;YAiBJ,YAAY,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;cACjC,YAAY,CAAC,aAAa,CAAC;;;;6FAdtC,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAgB5F,CAAC;AAEF,KAAK,eAAe,GAAG,UAAU,CAAC,2BAA2B,CAAC,CAAC;AAC/D;;GAEG;AACH,eAAO,MAAM,MAAM;YAeT,eAAe,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;aACrC,eAAe,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC;6JAbrE,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAc9F,CAAC;AAEH,KAAK,eAAe,GAAG,UAAU,CAAC,6CAA6C,CAAC,CAAC;AACjF;;GAEG;AACH,eAAO,MAAM,MAAM;YAkBP,eAAe,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;cACpC,eAAe,CAAC,aAAa,CAAC;;;;6FAfzC,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAiB/F,CAAC;AAEF,KAAK,cAAc,GAAG,UAAU,CAAC,2CAA2C,CAAC,CAAC;AAC9E,KAAK,YAAY,GACf,cAAc,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;AACrF;;GAEG;AACH,eAAO,MAAM,KAAK;YAkBN,cAAc,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;aACpC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,qBAAqB,GAAG,eAAe,CAAC,CAAC,GAC/E,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC;;;;6FAhB9B,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAkB9F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI;YAkBL,cAAc,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;cACnC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC;;;;6FAftC,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAiB9F,CAAC;AAEF,KAAK,kBAAkB,GACrB,UAAU,CAAC,mEAAmE,CAAC,CAAC;AAClF;;GAEG;AACH,eAAO,MAAM,YAAY;YAmBb,kBAAkB,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;cACvC,kBAAkB,CAAC,aAAa,CAAC;;;;6FAhB5C,OAAO,CACR,iBAAiB,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAiBzF,CAAC"}
@@ -0,0 +1,80 @@
1
+ import { HTTP_METHODS, serviceRequest } from '../../shared.js';
2
+ import { ID as service } from '../config.js';
3
+ import { RESOURCE_SERVERS } from '../../auth/config.js';
4
+ // eslint-disable-next-line @typescript-eslint/naming-convention
5
+ const resource_server = RESOURCE_SERVERS[service];
6
+ /**
7
+ * Get a list of tunnels.
8
+ */
9
+ export const getAll = function (options, sdkOptions) {
10
+ return serviceRequest({
11
+ service,
12
+ resource_server,
13
+ path: `/v2/tunnels`,
14
+ }, options, sdkOptions);
15
+ };
16
+ /**
17
+ * Get a tunnel by its UUID.
18
+ */
19
+ export const get = function (tunnel_uuid, options, sdkOptions) {
20
+ return serviceRequest({
21
+ service,
22
+ resource_server,
23
+ path: `/v2/tunnels/${tunnel_uuid}`,
24
+ }, options, sdkOptions);
25
+ };
26
+ /**
27
+ * Create a new tunnel.
28
+ */
29
+ export const create = function (options, sdkOptions) {
30
+ return serviceRequest({
31
+ service,
32
+ resource_server,
33
+ path: `/v2/tunnels`,
34
+ method: HTTP_METHODS.POST,
35
+ }, options, sdkOptions);
36
+ };
37
+ /**
38
+ * Delete a tunnel by its UUID.
39
+ */
40
+ export const remove = function (tunnel_uuid, options, sdkOptions) {
41
+ return serviceRequest({
42
+ service,
43
+ resource_server,
44
+ path: `/v2/tunnels/${tunnel_uuid}`,
45
+ method: HTTP_METHODS.DELETE,
46
+ }, options, sdkOptions);
47
+ };
48
+ /**
49
+ * Start a tunnel that's in the `AWAITING_LISTENER` state.
50
+ */
51
+ export const start = function (tunnel_uuid, options, sdkOptions) {
52
+ return serviceRequest({
53
+ service,
54
+ resource_server,
55
+ path: `/v2/tunnels/${tunnel_uuid}`,
56
+ method: HTTP_METHODS.PATCH,
57
+ }, { payload: { data: { attributes: Object.assign({}, options) } } }, sdkOptions);
58
+ };
59
+ /**
60
+ * Stop a tunnel that isn't already in the `STOPPED` or `STOPPING` state.
61
+ */
62
+ export const stop = function (tunnel_uuid, options = {}, sdkOptions) {
63
+ return serviceRequest({
64
+ service,
65
+ resource_server,
66
+ path: `/v2/tunnels/${tunnel_uuid}`,
67
+ method: HTTP_METHODS.PATCH,
68
+ }, { payload: { data: { attributes: Object.assign(Object.assign({}, options), { state: 'STOPPING' }) } } }, sdkOptions);
69
+ };
70
+ /**
71
+ * Get all events for a given tunnel.
72
+ */
73
+ export const getEventList = function (tunnel_uuid, options, sdkOptions) {
74
+ return serviceRequest({
75
+ service,
76
+ resource_server,
77
+ path: `/v2/tunnels/${tunnel_uuid}/events`,
78
+ }, options, sdkOptions);
79
+ };
80
+ //# sourceMappingURL=tunnel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnel.js","sourceRoot":"","sources":["../../../../../src/services/transfer/service/tunnel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,EAAE,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AASxD,gEAAgE;AAChE,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAGlD;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,OAAQ,EACR,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO;QACP,eAAe;QACf,IAAI,EAAE,aAAa;KACpB,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAGE,CAAC;AAGH;;GAEG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,UACjB,WAAW,EACX,OAAQ,EACR,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO;QACP,eAAe;QACf,IAAI,EAAE,eAAe,WAAW,EAAE;KACnC,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAMC,CAAC;AAGF;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,OAAO,EACP,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO;QACP,eAAe;QACf,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,YAAY,CAAC,IAAI;KAC1B,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAGE,CAAC;AAGH;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UACpB,WAAW,EACX,OAAQ,EACR,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO;QACP,eAAe;QACf,IAAI,EAAE,eAAe,WAAW,EAAE;QAClC,MAAM,EAAE,YAAY,CAAC,MAAM;KAC5B,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAMC,CAAC;AAKF;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,UACnB,WAAW,EACX,OAAO,EACP,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO;QACP,eAAe;QACf,IAAI,EAAE,eAAe,WAAW,EAAE;QAClC,MAAM,EAAE,YAAY,CAAC,KAAK;KAC3B,EACD,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,oBAAO,OAAO,CAAE,EAAE,EAAE,EAAE,EACrD,UAAU,CACX,CAAC;AACJ,CAOC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,UAClB,WAAW,EACX,OAAO,GAAG,EAAE,EACZ,UAAW;IAEX,OAAO,cAAc,CACnB;QACE,OAAO;QACP,eAAe;QACf,IAAI,EAAE,eAAe,WAAW,EAAE;QAClC,MAAM,EAAE,YAAY,CAAC,KAAK;KAC3B,EACD,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,kCAAO,OAAO,KAAE,KAAK,EAAE,UAAU,GAAE,EAAE,EAAE,EAAE,EACxE,UAAU,CACX,CAAC;AACJ,CAMC,CAAC;AAIF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,UAC1B,WAAW,EACX,OAAQ,EACR,UAAW;IAIX,OAAO,cAAc,CACnB;QACE,OAAO;QACP,eAAe;QACf,IAAI,EAAE,eAAe,WAAW,SAAS;KAC1C,EACD,OAAO,EACP,UAAU,CACX,CAAC;AACJ,CAMC,CAAC"}
@@ -1,3 +1,3 @@
1
- var globus=(()=>{var Ur=Object.create;var ue=Object.defineProperty;var Jr=Object.getOwnPropertyDescriptor;var $r=Object.getOwnPropertyNames;var Hr=Object.getPrototypeOf,Br=Object.prototype.hasOwnProperty;var zr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t)=>{for(var r in t)ue(e,r,{get:t[r],enumerable:!0})},tr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $r(t))!Br.call(e,i)&&i!==r&&ue(e,i,{get:()=>t[i],enumerable:!(n=Jr(t,i))||n.enumerable});return e};var Yr=(e,t,r)=>(r=e!=null?Ur(Hr(e)):{},tr(t||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e)),Vr=e=>tr(ue({},"__esModule",{value:!0}),e);var fr=zr((U,hr)=>{var Se=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,ve=(function(){function e(){this.fetch=!1,this.DOMException=Se.DOMException}return e.prototype=Se,new e})();(function(e){var t=(function(r){var n=typeof e<"u"&&e||typeof self<"u"&&self||typeof global<"u"&&global||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function d(s){return s&&DataView.prototype.isPrototypeOf(s)}if(i.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(s){return s&&h.indexOf(Object.prototype.toString.call(s))>-1};function T(s){if(typeof s!="string"&&(s=String(s)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(s)||s==="")throw new TypeError('Invalid character in header field name: "'+s+'"');return s.toLowerCase()}function L(s){return typeof s!="string"&&(s=String(s)),s}function M(s){var a={next:function(){var l=s.shift();return{done:l===void 0,value:l}}};return i.iterable&&(a[Symbol.iterator]=function(){return a}),a}function y(s){this.map={},s instanceof y?s.forEach(function(a,l){this.append(l,a)},this):Array.isArray(s)?s.forEach(function(a){if(a.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+a.length);this.append(a[0],a[1])},this):s&&Object.getOwnPropertyNames(s).forEach(function(a){this.append(a,s[a])},this)}y.prototype.append=function(s,a){s=T(s),a=L(a);var l=this.map[s];this.map[s]=l?l+", "+a:a},y.prototype.delete=function(s){delete this.map[T(s)]},y.prototype.get=function(s){return s=T(s),this.has(s)?this.map[s]:null},y.prototype.has=function(s){return this.map.hasOwnProperty(T(s))},y.prototype.set=function(s,a){this.map[T(s)]=L(a)},y.prototype.forEach=function(s,a){for(var l in this.map)this.map.hasOwnProperty(l)&&s.call(a,this.map[l],l,this)},y.prototype.keys=function(){var s=[];return this.forEach(function(a,l){s.push(l)}),M(s)},y.prototype.values=function(){var s=[];return this.forEach(function(a){s.push(a)}),M(s)},y.prototype.entries=function(){var s=[];return this.forEach(function(a,l){s.push([l,a])}),M(s)},i.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function N(s){if(!s._noBody){if(s.bodyUsed)return Promise.reject(new TypeError("Already read"));s.bodyUsed=!0}}function Y(s){return new Promise(function(a,l){s.onload=function(){a(s.result)},s.onerror=function(){l(s.error)}})}function Qt(s){var a=new FileReader,l=Y(a);return a.readAsArrayBuffer(s),l}function J(s){var a=new FileReader,l=Y(a),g=/charset=([A-Za-z0-9_-]+)/.exec(s.type),v=g?g[1]:"utf-8";return a.readAsText(s,v),l}function Lr(s){for(var a=new Uint8Array(s),l=new Array(a.length),g=0;g<a.length;g++)l[g]=String.fromCharCode(a[g]);return l.join("")}function Xt(s){if(s.slice)return s.slice(0);var a=new Uint8Array(s.byteLength);return a.set(new Uint8Array(s)),a.buffer}function Zt(){return this.bodyUsed=!1,this._initBody=function(s){this.bodyUsed=this.bodyUsed,this._bodyInit=s,s?typeof s=="string"?this._bodyText=s:i.blob&&Blob.prototype.isPrototypeOf(s)?this._bodyBlob=s:i.formData&&FormData.prototype.isPrototypeOf(s)?this._bodyFormData=s:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(s)?this._bodyText=s.toString():i.arrayBuffer&&i.blob&&d(s)?(this._bodyArrayBuffer=Xt(s.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(s)||f(s))?this._bodyArrayBuffer=Xt(s):this._bodyText=s=Object.prototype.toString.call(s):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof s=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(s)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var s=N(this);if(s)return s;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var s=N(this);return s||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(i.blob)return this.blob().then(Qt);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var s=N(this);if(s)return s;if(this._bodyBlob)return J(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Lr(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(qr)}),this.json=function(){return this.text().then(JSON.parse)},this}var Nr=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Fr(s){var a=s.toUpperCase();return Nr.indexOf(a)>-1?a:s}function q(s,a){if(!(this instanceof q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');a=a||{};var l=a.body;if(s instanceof q){if(s.bodyUsed)throw new TypeError("Already read");this.url=s.url,this.credentials=s.credentials,a.headers||(this.headers=new y(s.headers)),this.method=s.method,this.mode=s.mode,this.signal=s.signal,!l&&s._bodyInit!=null&&(l=s._bodyInit,s.bodyUsed=!0)}else this.url=String(s);if(this.credentials=a.credentials||this.credentials||"same-origin",(a.headers||!this.headers)&&(this.headers=new y(a.headers)),this.method=Fr(a.method||this.method||"GET"),this.mode=a.mode||this.mode||null,this.signal=a.signal||this.signal||(function(){if("AbortController"in n){var m=new AbortController;return m.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&l)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(l),(this.method==="GET"||this.method==="HEAD")&&(a.cache==="no-store"||a.cache==="no-cache")){var g=/([?&])_=[^&]*/;if(g.test(this.url))this.url=this.url.replace(g,"$1_="+new Date().getTime());else{var v=/\?/;this.url+=(v.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}q.prototype.clone=function(){return new q(this,{body:this._bodyInit})};function qr(s){var a=new FormData;return s.trim().split("&").forEach(function(l){if(l){var g=l.split("="),v=g.shift().replace(/\+/g," "),m=g.join("=").replace(/\+/g," ");a.append(decodeURIComponent(v),decodeURIComponent(m))}}),a}function jr(s){var a=new y,l=s.replace(/\r?\n[\t ]+/g," ");return l.split("\r").map(function(g){return g.indexOf(`
2
- `)===0?g.substr(1,g.length):g}).forEach(function(g){var v=g.split(":"),m=v.shift().trim();if(m){var ce=v.join(":").trim();try{a.append(m,ce)}catch(Ie){console.warn("Response "+Ie.message)}}}),a}Zt.call(q.prototype);function C(s,a){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(a||(a={}),this.type="default",this.status=a.status===void 0?200:a.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=a.statusText===void 0?"":""+a.statusText,this.headers=new y(a.headers),this.url=a.url||"",this._initBody(s)}Zt.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},C.error=function(){var s=new C(null,{status:200,statusText:""});return s.ok=!1,s.status=0,s.type="error",s};var Gr=[301,302,303,307,308];C.redirect=function(s,a){if(Gr.indexOf(a)===-1)throw new RangeError("Invalid status code");return new C(null,{status:a,headers:{location:s}})},r.DOMException=n.DOMException;try{new r.DOMException}catch{r.DOMException=function(a,l){this.message=a,this.name=l;var g=Error(a);this.stack=g.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function De(s,a){return new Promise(function(l,g){var v=new q(s,a);if(v.signal&&v.signal.aborted)return g(new r.DOMException("Aborted","AbortError"));var m=new XMLHttpRequest;function ce(){m.abort()}m.onload=function(){var b={statusText:m.statusText,headers:jr(m.getAllResponseHeaders()||"")};v.url.indexOf("file://")===0&&(m.status<200||m.status>599)?b.status=200:b.status=m.status,b.url="responseURL"in m?m.responseURL:b.headers.get("X-Request-URL");var $="response"in m?m.response:m.responseText;setTimeout(function(){l(new C($,b))},0)},m.onerror=function(){setTimeout(function(){g(new TypeError("Network request failed"))},0)},m.ontimeout=function(){setTimeout(function(){g(new TypeError("Network request timed out"))},0)},m.onabort=function(){setTimeout(function(){g(new r.DOMException("Aborted","AbortError"))},0)};function Ie(b){try{return b===""&&n.location.href?n.location.href:b}catch{return b}}if(m.open(v.method,Ie(v.url),!0),v.credentials==="include"?m.withCredentials=!0:v.credentials==="omit"&&(m.withCredentials=!1),"responseType"in m&&(i.blob?m.responseType="blob":i.arrayBuffer&&(m.responseType="arraybuffer")),a&&typeof a.headers=="object"&&!(a.headers instanceof y||n.Headers&&a.headers instanceof n.Headers)){var er=[];Object.getOwnPropertyNames(a.headers).forEach(function(b){er.push(T(b)),m.setRequestHeader(b,L(a.headers[b]))}),v.headers.forEach(function(b,$){er.indexOf($)===-1&&m.setRequestHeader($,b)})}else v.headers.forEach(function(b,$){m.setRequestHeader($,b)});v.signal&&(v.signal.addEventListener("abort",ce),m.onreadystatechange=function(){m.readyState===4&&v.signal.removeEventListener("abort",ce)}),m.send(typeof v._bodyInit>"u"?null:v._bodyInit)})}return De.polyfill=!0,n.fetch||(n.fetch=De,n.Headers=y,n.Request=q,n.Response=C),r.Headers=y,r.Request=q,r.Response=C,r.fetch=De,r})({})})(ve);ve.fetch.ponyfill=!0;delete ve.fetch.polyfill;var W=Se.fetch?Se:ve;U=W.fetch;U.default=W.fetch;U.fetch=W.fetch;U.Headers=W.Headers;U.Request=W.Request;U.Response=W.Response;hr.exports=U});var gi={};u(gi,{auth:()=>et,authorization:()=>nt,compute:()=>Kt,errors:()=>Be,flows:()=>Mt,gcs:()=>Ht,groups:()=>It,info:()=>Me,logger:()=>Le,request:()=>o,search:()=>Rt,timers:()=>Yt,transfer:()=>vt,webapp:()=>Wt});var Me={};u(Me,{CLIENT_INFO:()=>ar,VERSION:()=>ir,addClientInfo:()=>Xr,getClientInfo:()=>pr,getClientInfoRequestHeaders:()=>we});var rr="X-Globus-Client-Info",Kr=!0;function nr(){return Kr}var Wr=";",Qr=",";function or(e){return(Array.isArray(e)?e:[e]).map(r=>Object.entries(r).map(([n,i])=>`${n}=${i}`).join(Qr)).join(Wr)}var sr="6.0.1";var ir=sr,ar={product:"javascript-sdk",version:ir},ke=[ar];function Xr(e){ke=ke.concat(e)}function pr(){return or(ke)}function we(){return nr()?{[rr]:pr()}:{}}var Le={};u(Le,{log:()=>E,setLogLevel:()=>en,setLogger:()=>Zr});var Ce=["debug","info","warn","error"],de,cr=Ce.indexOf("error");function Zr(e){de=e}function en(e){cr=Ce.indexOf(e)}function E(e,...t){if(!de||Ce.indexOf(e)<cr)return;(de[e]??de.log)(...t)}var nt={};u(nt,{AuthorizationManager:()=>ae,create:()=>Rn});var H=class extends Error{};H.prototype.name="InvalidTokenError";function tn(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function rn(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return tn(t)}catch{return atob(t)}}function ur(e,t){if(typeof e!="string")throw new H("Invalid token specified: must be a string");t||(t={});let r=t.header===!0?0:1,n=e.split(".")[r];if(typeof n!="string")throw new H(`Invalid token specified: missing part #${r+1}`);let i;try{i=rn(n)}catch(d){throw new H(`Invalid token specified: invalid base64 for part #${r+1} (${d.message})`)}try{return JSON.parse(i)}catch(d){throw new H(`Invalid token specified: invalid json for part #${r+1} (${d.message})`)}}var et={};u(et,{CONFIG:()=>Ze,getAuthorizationEndpoint:()=>oe,getTokenEndpoint:()=>On,identities:()=>Ke,isGlobusAuthTokenResponse:()=>X,isRefreshToken:()=>re,isToken:()=>Q,oauth2:()=>F,utils:()=>Xe});var ye={};u(ye,{HOSTS:()=>Je,ID:()=>A,RESOURCE_SERVERS:()=>I,SCOPES:()=>V});var le={};u(le,{HOSTS:()=>Ne,ID:()=>p,SCOPES:()=>c});var p="TRANSFER",c={ALL:"urn:globus:auth:scope:transfer.api.globus.org:all"},Ne={sandbox:"transfer.api.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var me={};u(me,{HOSTS:()=>Fe,ID:()=>P,SCOPES:()=>x});var P="FLOWS",Fe={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"},x={MANAGE_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/manage_flows",VIEW_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/view_flows",RUN:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run",RUN_STATUS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_status",RUN_MANAGE:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_manage"};var he={};u(he,{HOSTS:()=>qe,ID:()=>O});var O="TIMERS",qe={sandbox:"sandbox.timer.automate.globus.org",production:"timer.automate.globus.org",staging:"staging.timer.automate.globus.org",integration:"integration.timer.automate.globus.org",test:"test.timer.automate.globus.org",preview:"preview.timer.automate.globus.org"};var fe={};u(fe,{HOSTS:()=>je,ID:()=>D,SCOPES:()=>j});var D="GROUPS",je={sandbox:"groups.api.sandbox.globuscs.info",production:"groups.api.globus.org",staging:"groups.api.staging.globuscs.info",integration:"groups.api.integration.globuscs.info",test:"groups.api.test.globuscs.info",preview:"groups.api.preview.globuscs.info"},j={ALL:"urn:globus:auth:scope:groups.api.globus.org:all",VIEW_MY:"urn:globus:auth:scope:groups.api.globus.org:view_my_groups_and_membership"};var ge={};u(ge,{HOSTS:()=>Ge,ID:()=>S,SCOPES:()=>R});var S="SEARCH",Ge={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},R={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var _e={};u(_e,{HOSTS:()=>Ue,ID:()=>w,SCOPES:()=>B});var w="COMPUTE",Ue={sandbox:"compute.api.sandbox.globuscs.info",production:"compute.api.globus.org",staging:"compute.api.staging.globuscs.info",integration:"compute.api.integration.globuscs.info",test:"compute.api.test.globuscs.info",preview:"compute.api.preview.globus.org"},B={ALL:"https://auth.globus.org/scopes/facd7ccc-c5f4-42aa-916b-a0e270e2c2a9/all"};var A="AUTH",Je={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"},V={VIEW_IDENTITIES:"urn:globus:auth:scope:auth.globus.org:view_identities"},I={[A]:"auth.globus.org",[p]:"transfer.api.globus.org",[P]:"flows.globus.org",[D]:"groups.api.globus.org",[S]:"search.api.globus.org",[O]:"524230d7-ea86-4a52-8312-86065a9e0417",[w]:"funcx_service"};var Be={};u(Be,{EnvironmentConfigurationError:()=>Z,isAuthorizationRequirementsError:()=>ee,isConsentRequiredError:()=>$e,isErrorWellFormed:()=>dr,toAuthorizationQueryParams:()=>He});var Z=class extends Error{name="EnvironmentConfigurationError";constructor(t,r){super(),this.message=`Invalid configuration value provided for ${t} (${r}).`}};function dr(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e}function $e(e){return dr(e)&&e.code==="ConsentRequired"&&"required_scopes"in e&&Array.isArray(e.required_scopes)}var nn=["required_scopes"];function He(e){let t={scope:e.authorization_parameters.required_scopes?.join(" "),...e.authorization_parameters};return Object.entries(t).reduce((r,[n,i])=>{if(nn.includes(n)||i===void 0||i===null)return r;let d=i;return Array.isArray(d)?d=d.join(","):typeof i=="boolean"&&(d=d?"true":"false"),{...r,[n]:d}},{})}function ee(e){return typeof e=="object"&&e!==null&&"authorization_parameters"in e&&typeof e.authorization_parameters=="object"&&e.authorization_parameters!==null}function on(){return typeof window<"u"?window:process}function sn(e){return typeof window==typeof e}function ze(e,t){let r=on(),n;return sn(r)?n=r:n=r.env,e in n?n[e]:t}var lr={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"},G={[A]:A,[p]:p,[P]:P,[D]:D,[S]:S,[O]:O,[w]:w},an={[A]:Je,[p]:Ne,[P]:Fe,[D]:je,[S]:Ge,[O]:qe,[w]:Ue};function Ye(e){let t=ze("GLOBUS_SDK_OPTIONS",{});return typeof t=="string"&&(t=JSON.parse(t)),{...t,...e,fetch:{...t?.fetch,...e?.fetch,options:{...t?.fetch?.options,...e?.fetch?.options,headers:{...t?.fetch?.options?.headers,...e?.fetch?.options?.headers}}}}}function K(){let e=Ye(),t=ze("GLOBUS_SDK_ENVIRONMENT",e?.environment??lr.PRODUCTION);if(e?.environment&&t!==e.environment&&E("debug","GLOBUS_SDK_ENVIRONMENT and GLOBUS_SDK_OPTIONS.environment are set to different values. GLOBUS_SDK_ENVIRONMENT will take precedence"),!t||!Object.values(lr).includes(t))throw new Z("GLOBUS_SDK_ENVIRONMENT",t);return t}function pn(e,t=K()){return an[e][t]}function mr(e,t=K()){let r=pn(e,t);return ze(`GLOBUS_SDK_SERVICE_URL_${e}`,r?`https://${r}`:void 0)}function cn(e){let t=new URLSearchParams;return Array.from(Object.entries(e)).forEach(([r,n])=>{Array.isArray(n)?t.set(r,n.join(",")):n!==void 0&&t.set(r,String(n))}),t.toString()}function un(e,t="",r=K()){let n=mr(e,r);return new URL(t,n)}function te(e,t,r,n){let i;return typeof e=="object"?i=new URL(t,e.host):i=un(e,t,n?.environment),r&&r.search&&(i.search=cn(r.search)),i.toString()}var Ke={};u(Ke,{consents:()=>Ve,get:()=>ln,getAll:()=>mn});var gr=Yr(fr());async function o(e,t,r){let n=Ye(r),i=n?.fetch?.options||{},d={...we(),...t?.headers,...i.headers},h=t?.manager||n?.manager,f;if(e.resource_server&&h&&(f=h.tokens.getByResourceServer(e.resource_server),f&&(d.Authorization=`Bearer ${f.access_token}`)),e.scope&&h&&(typeof e.service=="string"||"endpoint_id"in e.service)){let J=typeof e.service=="string"?I[e.service]:e.service.endpoint_id;f=h.tokens.getByResourceServer(J),f&&(d.Authorization=`Bearer ${f.access_token}`)}let T=t?.body;!T&&t?.payload&&(T=JSON.stringify(t.payload)),!d?.["Content-Type"]&&T&&(d["Content-Type"]="application/json");let L=te(e.service,e.path,{search:t?.query},n),M={method:e.method,body:T,...i,headers:d},y=gr.default;if(i?.__callable&&(y=i.__callable.bind(this),delete M.__callable),e.preventRetry||!h||!f||!re(f))return y(L,M);let N=await y(L,M);if(N.ok)return N;let Y;try{Y=ee(await N.clone().json())}catch{Y=!1}if(N.status===401&&!Y){let J=await h.refreshToken(f);return J?y(L,{...M,headers:{...M.headers,Authorization:`Bearer ${J.access_token}`}}):N}return N}var Ve={};u(Ve,{getAll:()=>dn});var dn=function(e,t={},r){return o({service:A,scope:V.VIEW_IDENTITIES,path:`/v2/api/identities/${e}/consents`},t,r)};var ln=function(e,t={},r){return o({service:A,scope:V.VIEW_IDENTITIES,path:`/v2/api/identities/${e}`},t,r)},mn=function(e={},t){return o({service:A,scope:V.VIEW_IDENTITIES,path:"/v2/api/identities"},e,t)};var F={};u(F,{token:()=>We,userinfo:()=>vn});var We={};u(We,{exchange:()=>fn,introspect:()=>gn,refresh:()=>yn,revoke:()=>_n,token:()=>_r,validate:()=>Sn});function hn(e){return new URLSearchParams(e)}function ne(e){return{...e,body:e.payload?hn(e.payload):void 0,headers:{...e?.headers||{},Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}}var _r=function(e={},t){return o({service:A,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},ne(e),t)},fn=_r,gn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for introspect");return o({service:A,scope:void 0,path:"/v2/oauth2/token/introspect",method:"POST",preventRetry:!0},ne(e),t)},_n=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return o({service:A,scope:void 0,path:"/v2/oauth2/token/revoke",method:"POST",preventRetry:!0},ne(e),t)},yn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return o({service:A,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},ne(e),t)},Sn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for validate");return o({service:A,scope:void 0,path:"/v2/oauth2/token/validate",method:"POST",preventRetry:!0},ne(e),t)};var vn=function(e,t){return o({service:A,scope:void 0,path:"/v2/oauth2/userinfo",method:"GET"},e,t)};var Xe={};u(Xe,{hasConsentForScope:()=>Pn,splitScopeString:()=>Qe,toScopeTree:()=>Sr});function Qe(e){let t=[],r="",n=0;return e.split("").forEach((i,d)=>{r+=i,i==="["&&(n+=1),i==="]"&&(n-=1),(i===" "&&n===0||d===e.length-1&&r)&&(t.push(r.trim()),r="")}),t}function yr(e){let t=e,r=t.startsWith("*");r&&(t=t.replace(/^\*\s*/,""));let n=[],i=t.indexOf("[");if(i===-1)return{scope:t,atomically_revocable:r,children:[]};let d=t.slice(0,i),h=t.slice(i+1,-1);return n=Qe(h).map(yr),{scope:d,atomically_revocable:r,children:n}}function Sr(e){return Qe(e).map(yr)}function Pn(e,t){let r=Sr(t);function n(i,d){let h=e.find(f=>f.scope_name===i.scope&&(d?f.dependency_path.join(",")===[...d,f.id].join(","):f.dependency_path.length===1));return h?i.children.length?i.children.every(f=>n(f,d?[...d,h.id]:[h.id])):h.status==="approved":!1}return r.every(i=>n(i))}var Ze=ye;function oe(){return te(A,"/v2/oauth2/authorize")}function On(){return te(A,"/v2/oauth2/token")}function Q(e){return typeof e=="object"&&e!==null&&"access_token"in e}function re(e){return Q(e)&&e!==null&&"refresh_token"in e}function X(e){return Q(e)&&e!==null&&"resource_server"in e}var se=class{constructor(t){this.name=t}#e=[];addListener(t){return this.#e.push(t),()=>this.removeListener(t)}removeListener(t){this.#e=this.#e.filter(r=>r!==t)}clearListeners(){this.#e=[]}async dispatch(t){await Promise.all(this.#e.map(r=>r(t)))}};function Oe(){return"crypto"in globalThis}function rt(){return"webcrypto"in globalThis.crypto?globalThis.crypto.webcrypto:globalThis.crypto}var An=e=>btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");async function Tn(e){let t=await rt().subtle.digest("SHA-256",new TextEncoder().encode(e));return String.fromCharCode(...new Uint8Array(t))}var tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",vr=`${tt}-._~`;function Ae(){return Array.from(rt().getRandomValues(new Uint8Array(43))).map(e=>vr[e%vr.length]).join("")}async function Te(e){let t=await Tn(e);return An(t)}function Ee(){return Array.from(rt().getRandomValues(new Uint8Array(16))).map(e=>tt[e%tt.length]).join("")}var Pe={PKCE_STATE:"pkce_state",PKCE_CODE_VERIFIER:"pkce_code_verifier"},k={getKey(e){return e==="state"?Pe.PKCE_STATE:Pe.PKCE_CODE_VERIFIER},get:e=>sessionStorage.getItem(k.getKey(e)),set:(e,t)=>sessionStorage.setItem(k.getKey(e),t),reset:()=>{sessionStorage.removeItem(Pe.PKCE_STATE),sessionStorage.removeItem(Pe.PKCE_CODE_VERIFIER)}};var Re=class e{#e;constructor(t){if(this.#e=t,e.supported===!1)throw new Error("RedirectTransport is not supported in this environment.")}static supported=Oe();async send(){let t=Ae(),r=await Te(t),n=this.#e.params?.state??Ee();k.set("code_verifier",t),k.set("state",n);let i={response_type:"code",client_id:this.#e.client,scope:this.#e.scopes||"",redirect_uri:this.#e.redirect,state:n,code_challenge:r,code_challenge_method:"S256",...this.#e.params||{}},d=new URL(oe());d.search=new URLSearchParams(i).toString(),window.location.assign(d.toString())}async getToken(t={shouldReplace:!0,includeConsentedScopes:!1}){let r=new URL(window.location.href),n=new URLSearchParams(r.search);if(n.get("error"))throw new Error(n.get("error_description")||"An error occurred during the authorization process.");let i=n.get("code");if(!i)return;let d=k.get("state"),h=k.get("code_verifier");if(k.reset(),n.get("state")!==d)throw new Error('Invalid State. The received "state" parameter does not match the expected state.');if(!h)throw new Error("Invalid Code Verifier");let f={code:i,client_id:this.#e.client,code_verifier:h,redirect_uri:this.#e.redirect,grant_type:"authorization_code"},T=await(await F.token.exchange({query:t.includeConsentedScopes?{include_consented_scopes:!0}:void 0,payload:f})).json();return t.shouldReplace&&(n.delete("code"),n.delete("state"),r.search=n.toString(),window.location.replace(r)),T}};var be=class{#e;constructor(t){this.#e=t.manager}#r(t){let r=this.#e.storage.getItem(t)||"null",n=null;try{let i=JSON.parse(r);Q(i)&&(n=i)}catch{}return n}#t(t){let r=Ze.RESOURCE_SERVERS?.[t];return this.getByResourceServer(r)}getByResourceServer(t){return this.#r(`${this.#e.storageKeyPrefix}${t}`)}get auth(){return this.#t(G.AUTH)}get transfer(){return this.#t(G.TRANSFER)}get flows(){return this.#t(G.FLOWS)}get groups(){return this.#t(G.GROUPS)}get search(){return this.#t(G.SEARCH)}get timer(){return this.#t(G.TIMERS)}get compute(){return this.#t(G.COMPUTE)}gcs(t){return this.getByResourceServer(t)}getAll(){return Object.keys(this.#e.storage).reduce((r,n)=>(n.startsWith(this.#e.storageKeyPrefix)&&r.push(this.#r(n)),r),[]).filter(Q)}add(t){let r=Date.now(),n=r+t.expires_in*1e3;this.#e.storage.setItem(`${this.#e.storageKeyPrefix}${t.resource_server}`,JSON.stringify({...t,__metadata:{created:r,expires:n}})),"other_tokens"in t&&t.other_tokens?.forEach(i=>{this.add(i)})}remove(t){this.#e.storage.removeItem(`${this.#e.storageKeyPrefix}${t.resource_server}`)}static isTokenExpired(t,r=0){if(!(!t||!t.__metadata||typeof t.__metadata.expires!="number"))return Date.now()+r>=t.__metadata.expires}};var ie=class{#e={};getItem(t){return this.#e[t]!==void 0?this.#e[t]:null}setItem(t,r){this.#e[t]=r}removeItem(t){delete this.#e[t]}key(t){return Object.keys(this.#e)[t]}clear(){this.#e={}}get length(){return Object.keys(this.#e).length}};var Pr="globus-sdk",xe=class e{#e;#r=null;constructor(t){if(this.#e=t,e.supported===!1)throw new Error("PopupTransport is not supported in this environment.")}static supported=Oe()&&"window"in globalThis&&typeof globalThis.window.open=="function";async send(){let t=Ae(),r=await Te(t),n=this.#e.params?.state??Ee();k.set("code_verifier",t),k.set("state",n);let i={response_type:"code",client_id:this.#e.client,scope:this.#e.scopes||"",redirect_uri:this.#e.redirect,state:n,code_challenge:r,code_challenge_method:"S256",...this.#e.params||{}},d=new URL(oe());d.search=new URLSearchParams(i).toString();let h=new Promise(f=>{window.addEventListener("message",async T=>{let{data:L}=T;if(T.origin!==window.location.origin||L?.source!==Pr)return;this.#r?.close();let M=await this.#t(L.url);f(M)},!1)});if(this.#r=window.open(d.toString(),"_blank","width=800,height=600"),!this.#r)throw new Error("Unable to open window for PopupTransport.");return this.#r.focus(),h}async#t(t){let r=new URL(t),n=new URLSearchParams(r.search);if(n.get("error"))throw new Error(n.get("error_description")||"An error occurred during the authorization process.");let i=n.get("code");if(!i)return;let d=k.get("state"),h=k.get("code_verifier");if(k.reset(),n.get("state")!==d)throw new Error('Invalid State. The received "state" parameter does not match the expected state.');if(!h)throw new Error("Invalid Code Verifier");let f={code:i,client_id:this.#e.client,code_verifier:h,redirect_uri:this.#e.redirect,grant_type:"authorization_code"};return await(await F.token.exchange({payload:f})).json()}getToken(){window.opener&&window.opener.postMessage({source:Pr,url:window.location.href},window.location.origin)}};var En={redirect:Re,popup:xe},Or={useRefreshTokens:!1,defaultScopes:"openid profile email",transport:"redirect"},Ar={execute:!0,additionalParams:void 0},ae=class{#e;configuration;storage;#r=!1;get authenticated(){return this.#r}set authenticated(t){t!==this.#r&&(this.#r=t,this.#s())}tokens;events={authenticated:new se("authenticated"),revoke:new se("revoke")};constructor(t){if(!t.client)throw new Error("You must provide a `client` for your application.");let r=t.defaultScopes===!1?"":t.defaultScopes??Or.defaultScopes;this.configuration={...Or,...t,scopes:[t.scopes?t.scopes:"",r].filter(n=>n.length).join(" ")},this.storage=t.storage||new ie,this.configuration.events&&Object.entries(this.configuration.events).forEach(([n,i])=>{n in this.events&&this.events[n].addListener(i)}),this.tokens=new be({manager:this}),this.#t()}get storageKeyPrefix(){return`${this.configuration.client}:`}get user(){let t=this.getGlobusAuthToken();return t&&t.id_token?ur(t.id_token):null}async refreshTokens(){E("debug","AuthorizationManager.refreshTokens");let t=await Promise.allSettled(this.tokens.getAll().map(r=>re(r)?this.refreshToken(r):Promise.resolve(null)));return this.#t(),t}async refreshToken(t){E("debug",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`);try{let r=await(await F.token.refresh({payload:{client_id:this.configuration.client,refresh_token:t.refresh_token,grant_type:"refresh_token"}})).json();if(X(r))return this.addTokenResponse(r),r}catch{E("error",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`)}return null}hasGlobusAuthToken(){return this.getGlobusAuthToken()!==null}getGlobusAuthToken(){let t=this.storage.getItem(`${this.storageKeyPrefix}${I.AUTH}`);return t?JSON.parse(t):null}#t(){E("debug","AuthorizationManager.#checkAuthorizationState"),this.hasGlobusAuthToken()&&(this.authenticated=!0)}async#s(){let t=this.authenticated,r=this.getGlobusAuthToken()??void 0;await this.events.authenticated.dispatch({isAuthenticated:t,token:r})}reset(){Object.keys(this.storage).forEach(t=>{t.startsWith(this.storageKeyPrefix)&&this.storage.removeItem(t)}),this.authenticated=!1}#o(t){return`${t}${this.configuration.useRefreshTokens?" offline_access":""}`}#n(t){let{scopes:r,...n}=t??{},i=En[this.configuration.transport||"redirect"],d=this.#o(r??(this.configuration.scopes||""));return this.storage instanceof ie&&(d=[...new Set(d.split(" ").concat((this.configuration?.scopes||"").split(" ")))].join(" ")),new i({client:this.configuration.client,redirect:this.configuration.redirect,scopes:d,...n,params:{...n?.params}})}async login(t={additionalParams:{}}){E("debug","AuthorizationManager.login"),this.reset();let n=await this.#n({params:t?.additionalParams}).send();return X(n)&&this.addTokenResponse(n),n}async prompt(t){E("debug","AuthorizationManager.prompt");let n=await this.#n(t).send();return X(n)&&this.addTokenResponse(n),n}async handleCodeRedirect(t={shouldReplace:!0,additionalParams:{}}){E("debug","AuthorizationManager.handleCodeRedirect");let r=await this.#n({params:t?.additionalParams}).getToken({shouldReplace:t?.shouldReplace,includeConsentedScopes:t?.includeConsentedScopes});return X(r)&&(E("debug",`AuthorizationManager.handleCodeRedirect | response=${JSON.stringify(r)}`),this.addTokenResponse(r)),r}async handleErrorResponse(t,r){let n=typeof r=="boolean"?{...Ar,execute:r}:{...Ar,...r};E("debug",`AuthorizationManager.handleErrorResponse | response=${JSON.stringify(t)} execute=${n.execute}`);let i=async()=>{};return ee(t)&&(E("debug","AuthorizationManager.handleErrorResponse | error=AuthorizationRequirementsError"),i=async()=>{await this.handleAuthorizationRequirementsError(t,{additionalParams:n.additionalParams})}),$e(t)&&(E("debug","AuthorizationManager.handleErrorResponse | error=ConsentRequiredError"),i=async()=>{await this.handleConsentRequiredError(t,{additionalParams:n.additionalParams})}),"code"in t&&t.code==="AuthenticationFailed"&&(E("debug","AuthorizationManager.handleErrorResponse | error=AuthenticationFailed"),i=async()=>{await this.revoke()}),n.execute===!0?await i():i}async handleAuthorizationRequirementsError(t,r){this.#e=this.#n({params:{prompt:"login",...He(t),...r?.additionalParams}}),await this.#e.send()}async handleConsentRequiredError(t,r){this.#e=this.#n({scopes:this.#o(t.required_scopes.join(" ")),params:{...r?.additionalParams}}),await this.#e.send()}addTokenResponse=t=>{this.tokens.add(t),this.#t()};async revoke(){E("debug","AuthorizationManager.revoke");let t=Promise.all(this.tokens.getAll().map(this.#i.bind(this)));this.reset(),await t,await this.events.revoke.dispatch()}#i(t){return E("debug",`AuthorizationManager.revokeToken | resource_server=${t.resource_server}`),F.token.revoke({payload:{client_id:this.configuration.client,token:t.access_token}})}};function Rn(e){return new ae(e)}var vt={};u(vt,{CONFIG:()=>ko,access:()=>pt,collectionBookmarks:()=>ut,endpoint:()=>it,endpointManager:()=>ht,endpointSearch:()=>Tr,fileOperations:()=>ot,roles:()=>ct,task:()=>at,taskSubmission:()=>st,utils:()=>St});var Tr=function(e,t){let r={...e,query:e?.query};return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_search"},r,t)};var ot={};u(ot,{ls:()=>bn,mkdir:()=>xn,rename:()=>Dn,stat:()=>kn,symlink:()=>In});function z(e){return e==="GET"?{}:{"Content-Type":"application/json"}}var bn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/ls`},t,r)},xn=function(e,t,r){let n={payload:{DATA_TYPE:"mkdir",...t?.payload},headers:{...z("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/mkdir`,method:"POST"},n,r)},Dn=function(e,t,r){let n={payload:{DATA_TYPE:"rename",...t?.payload},headers:{...z("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/rename`,method:"POST"},n,r)},In=function(e,t,r){let n={payload:{DATA_TYPE:"symlink",...t?.payload},headers:{...z("POST"),...t?.headers}};return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/symlink`,method:"POST"},n,r)},kn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/stat`},t,r)};var st={};u(st,{submissionId:()=>Cn,submitDelete:()=>wn,submitTransfer:()=>Mn});var wn=function(e,t){let r={payload:{DATA_TYPE:"delete",...e?.payload},headers:{...z("POST"),...e?.headers}};return o({service:p,scope:c.ALL,path:"/v0.10/delete",method:"POST"},r,t)},Mn=function(e,t){let r={payload:{DATA_TYPE:"transfer",...e?.payload},headers:{...z("POST"),...e?.headers}};return o({service:p,scope:c.ALL,path:"/v0.10/transfer",method:"POST"},r,t)},Cn=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/submission_id"},e,t)};var it={};u(it,{create:()=>Nn,get:()=>Ln,remove:()=>qn,update:()=>Fn});var Ln=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`},t,r)},Nn=function(e,t){return e?.payload&&Object.assign(e.payload,{DATA_TYPE:"shared_endpoint"}),o({service:p,scope:c.ALL,path:"/v0.10/shared_endpoint",method:"POST"},e,t)},Fn=function(e,t,r){return t?.payload&&Object.assign(t.payload,{DATA_TYPE:"endpoint"}),o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"PUT"},t,r)},qn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"DELETE"},t,r)};var at={};u(at,{cancel:()=>Jn,get:()=>Gn,getAll:()=>jn,getEventList:()=>Hn,getPauseInfo:()=>Yn,getSkippedErrors:()=>zn,getSuccessfulTransfers:()=>Bn,remove:()=>$n,update:()=>Un});var jn=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},Gn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}`},t,r)},Un=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}`,method:"PUT"},t,r)},Jn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/cancel`,method:"POST"},t,r)},$n=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/remove`,method:"POST"},t,r)},Hn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/event_list`},t,r)},Bn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/successful_transfers`},t,r)},zn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/skipped_errors`},t,r)},Yn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/task/${e}/pause_info`},t,r)};var pt={};u(pt,{create:()=>Kn,get:()=>Wn,getAll:()=>Vn,remove:()=>Xn,update:()=>Qn});var Vn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access_list`},t,r)},Kn=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access`,method:"POST"},t,r)},Wn=function({endpoint_xid:e,id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`},r,n)},Qn=function({endpoint_xid:e,id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"PUT"},r,n)},Xn=function({endpoint_xid:e,id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"DELETE"},r,n)};var ct={};u(ct,{create:()=>to,get:()=>eo,getAll:()=>Zn,remove:()=>ro});var Zn=function(e,t={},r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role_list`},t,r)},eo=function({endpoint_id:e,role_id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role/${t}`},r,n)},to=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role`,method:"POST"},t,r)},ro=function({collection_id:e,role_id:t},r,n){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role/${t}`,method:"DELETE"},r,n)};var ut={};u(ut,{create:()=>oo,get:()=>so,getAll:()=>no,remove:()=>ao,update:()=>io});var no=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/bookmark_list"},e,t)},oo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/bookmark",method:"POST"},e,t)},so=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`},t,r)},io=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"PUT"},t,r)},ao=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"DELETE"},t,r)};var ht={};u(ht,{endpoint:()=>dt,pauseRule:()=>lt,task:()=>mt});var dt={};u(dt,{get:()=>po,getAccessList:()=>uo,getHostedEndpoints:()=>co,getMonitoredEndpoints:()=>lo});var po=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}`},t,r)},co=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/hosted_endpoint_list`},t,r)},uo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/access_list`},t,r)},lo=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/monitored_endpoints"},e,t)};var lt={};u(lt,{create:()=>ho,get:()=>fo,getAll:()=>mo,remove:()=>_o,update:()=>go});var mo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule_list"},e,t)},ho=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule",method:"POST"},e,t)},fo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`},t,r)},go=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"PUT"},t,r)},_o=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"DELETE"},t,r)};var mt={};u(mt,{cancel:()=>vo,get:()=>So,getAdminCancel:()=>Po,getAll:()=>yo,getEventList:()=>Oo,getPauseInfo:()=>bo,getSkippedErrors:()=>To,getSuccessfulTransfers:()=>Ao,pause:()=>Eo,resume:()=>Ro});var yo=function(e={},t){return o({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},So=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}`},t,r)},vo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_cancel",method:"POST"},e,t)},Po=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/admin_cancel/${e}`,method:"POST"},t,r)},Oo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/event_list`},t,r)},Ao=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/successful_transfers`},t,r)},To=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/skipped_errors`},t,r)},Eo=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_pause",method:"POST"},e,t)},Ro=function(e,t){return o({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_resume",method:"POST"},e,t)},bo=function(e,t,r){return o({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/pause_info`},t,r)};var St={};u(St,{GLOBUS_DNS_DOMAINS:()=>br,getDomainFromEndpoint:()=>Io,isDirectory:()=>xo,isFileDocument:()=>Rr,isGlobusHostname:()=>xr,readableBytes:()=>Do});function Rr(e){return typeof e=="object"&&e!==null&&"DATA_TYPE"in e&&e.DATA_TYPE==="file"}function xo(e){return Rr(e)&&e.type==="dir"}var ft=1e3,gt=ft*1e3,_t=gt*1e3,yt=_t*1e3,Er=yt*1e3;function Do(e,t=2){let r="B",n=1;if(e<ft)return`${e} ${r}`;e<gt?(r="KB",n=ft):e<_t?(r="MB",n=gt):e<yt?(r="GB",n=_t):e<Er?(r="TB",n=yt):(r="PB",n=Er);let i=e/n,[d,h]=`${i}`.split("."),f=`${d}`;if(h&&h.length){let T=h.slice(0,t);T.length&&(f=`${d}.${T}`)}return`${f} ${r}`}var br=["dnsteam.globuscs.info","data.globus.org","dn.glob.us","gaccess.io"];function xr(e){return!!br.find(t=>e.endsWith(`.${t}`))}function Io(e){let{tlsftp_server:t}=e;if(!t||typeof t!="string")return null;let{hostname:r}=new URL(t.replace("tlsftp","https"));return!xr(r)&&/(?:[gm]-\w{6}.)?([\w-]+(\.[\w-]+)+)$/.exec(r)?.[1]||r||null}var ko=le;var Rt={};u(Rt,{CONFIG:()=>Bo,entry:()=>At,index:()=>Et,query:()=>Pt,subject:()=>Ot});var Pt={};u(Pt,{get:()=>wo,post:()=>Mo});var wo=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/search`},t,r)},Mo=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/search`,method:"POST"},t,r)};var Ot={};u(Ot,{get:()=>Co});var Co=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/subject`},t,r)};var At={};u(At,{get:()=>Lo});var Lo=function(e,t,r){return o({service:S,scope:R.SEARCH,path:`/v1/index/${e}/entry`},t,r)};var Et={};u(Et,{create:()=>Uo,get:()=>jo,getAll:()=>Go,ingest:()=>Ho,remove:()=>Jo,reopen:()=>$o,roles:()=>Tt});var Tt={};u(Tt,{create:()=>Fo,getAll:()=>No,remove:()=>qo});var No=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/role_list`},t,r)},Fo=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/role`,method:"POST"},t,r)},qo=function({index_id:e,role_id:t},r,n){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/role/${t}`,method:"DELETE"},r,n)};var jo=function(e,t,r){return o({service:S,path:`/v1/index/${e}`},t,r)},Go=function(e,t){return o({service:S,scope:R.ALL,path:"/v1/index_list"},e,t)},Uo=function(e,t){return o({service:S,scope:R.ALL,path:"/v1/index",method:"POST"},e,t)},Jo=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}`,method:"DELETE"},t,r)},$o=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/reopen`,method:"POST"},t,r)},Ho=function(e,t,r){return o({service:S,scope:R.ALL,path:`/v1/index/${e}/ingest`,method:"POST"},t,r)};var Bo=ge;var It={};u(It,{CONFIG:()=>Wo,groups:()=>bt,membership:()=>Dt,policies:()=>xt});var bt={};u(bt,{get:()=>Yo,getMyGroups:()=>zo});var zo=function(e,t){return o({scope:j.ALL,path:"/v2/groups/my_groups",service:D},e,t)},Yo=function(e,t,r){return o({service:D,scope:j.ALL,path:`/v2/groups/${e}`},t,r)};var xt={};u(xt,{get:()=>Vo});var Vo=function(e,t,r){return o({scope:j.ALL,path:`/v2/groups/${e}/policies`,service:D},t,r)};var Dt={};u(Dt,{act:()=>Ko});var Ko=function(e,t,r){if(!t?.payload)throw new Error("payload is required.");return o({service:D,scope:j.ALL,path:`/v2/groups/${e}`,method:"POST"},t,r)};var Wo=fe;var Mt={};u(Mt,{CONFIG:()=>ds,flows:()=>kt,runs:()=>wt});var kt={};u(kt,{create:()=>Dr,deploy:()=>rs,get:()=>Xo,getAll:()=>Qo,remove:()=>Zo,run:()=>es,update:()=>ns,validate:()=>ts});var Qo=function(e,t){return o({service:P,scope:x.VIEW_FLOWS,path:"/flows"},e,t)},Xo=function(e,t,r){return o({service:P,scope:x.VIEW_FLOWS,path:`/flows/${e}`},t,r)},Zo=function(e,t,r){return o({scope:x.MANAGE_FLOWS,service:P,path:`/flows/${e}`,method:"DELETE"},t,r)},es=function(e,t,r){return o({service:P,scope:x.VIEW_FLOWS,path:`/flows/${e}/run`,method:"POST"},t,r)},ts=function(e,t){return o({service:P,scope:x.MANAGE_FLOWS,path:"/flows/validate",method:"POST"},e,t)},Dr=function(e,t){return o({service:P,scope:x.MANAGE_FLOWS,path:"/flows",method:"POST"},e,t)},rs=Dr,ns=function(e,t,r){return o({service:P,scope:x.MANAGE_FLOWS,path:`/flows/${e}`,method:"PUT"},t,r)};var wt={};u(wt,{cancel:()=>is,get:()=>ss,getAll:()=>os,getDefinition:()=>us,getLog:()=>as,remove:()=>cs,update:()=>ps});var os=function(e={},t){return o({service:P,scope:x.RUN_MANAGE,path:"/runs"},e,t)},ss=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}`},t,r)},is=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/cancel`,method:"POST"},t,r)},as=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/log`},t,r)},ps=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}`,method:"PUT"},t,r)},cs=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/release`,method:"POST"},t,r)},us=function(e,t,r){return o({service:P,scope:x.RUN_MANAGE,path:`/runs/${e}/definition`,method:"GET"},t,r)};var ds=me;var Ht={};u(Ht,{collections:()=>Ct,endpoint:()=>Lt,getScopes:()=>Zs,https:()=>Nt,nodes:()=>Ft,roles:()=>qt,storageGateways:()=>jt,userCredentials:()=>Gt,utils:()=>$t,versioning:()=>Jt});var Ct={};u(Ct,{create:()=>fs,get:()=>ms,getAll:()=>ls,patch:()=>_s,remove:()=>hs,resetOwnerString:()=>Ss,update:()=>gs,updateOwnerString:()=>ys});var ls=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/collections"},t,r)},ms=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`},r,n)},hs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"DELETE"},r,n)},fs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/collections",method:"POST"},t,r)},gs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PUT"},r,n)},_s=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PATCH"},r,n)},ys=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"PUT"},r,n)},Ss=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"DELETE"},r,n)};var Lt={};u(Lt,{get:()=>vs,patch:()=>Os,resetOwnerString:()=>Rs,update:()=>Ps,updateOwner:()=>Ts,updateOwnerString:()=>Es,updateSubscriptionId:()=>As});var vs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint"},t,r)},Ps=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PUT"},t,r)},Os=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PATCH"},t,r)},As=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/subscription_id",method:"PUT"},t,r)},Ts=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner",method:"PUT"},t,r)},Es=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"PUT"},t,r)},Rs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"DELETE"},t,r)};var Nt={};u(Nt,{get:()=>bs,remove:()=>xs,update:()=>Ds});var bs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:t},r,n)},xs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:t,method:"DELETE"},r,n)},Ds=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:t,method:"PUT"},r,n)};var Ft={};u(Ft,{create:()=>Ms,get:()=>ks,getAll:()=>Is,patch:()=>Ls,remove:()=>ws,update:()=>Cs});var Is=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/nodes"},t,r)},ks=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`},r,n)},ws=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"DELETE"},r,n)},Ms=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/nodes",method:"POST"},t,r)},Cs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PUT"},r,n)},Ls=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PATCH"},r,n)};var qt={};u(qt,{create:()=>js,get:()=>Fs,getAll:()=>Ns,remove:()=>qs});var Ns=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/roles"},t,r)},Fs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`},r,n)},qs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`,method:"DELETE"},r,n)},js=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/roles",method:"POST"},t,r)};var jt={};u(jt,{create:()=>$s,get:()=>Us,getAll:()=>Gs,patch:()=>Bs,remove:()=>Js,update:()=>Hs});var Gs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways"},t,r)},Us=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`},r,n)},Js=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"DELETE"},r,n)},$s=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways",method:"POST"},t,r)},Hs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PUT"},r,n)},Bs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PATCH"},r,n)};var Gt={};u(Gt,{create:()=>Ks,get:()=>Ys,getAll:()=>zs,patch:()=>Qs,remove:()=>Vs,update:()=>Ws});var zs=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials"},t,r)},Ys=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`},r,n)},Vs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"DELETE"},r,n)},Ks=function(e,t,r){return o({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials",method:"POST"},t,r)},Ws=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PUT"},r,n)},Qs=function(e,t,r,n){return o({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PATCH"},r,n)};var Jt={};u(Jt,{info:()=>Ut});var Ut=function(e,t,r){return o({service:e,path:"/api/info"},t,r)};var $t={};u($t,{getEndpointIdFromURL:()=>Xs,getGCSDomainFromURL:()=>Ir});var pe="data.globus.org";function Ir(e){let{host:t}=typeof e=="string"?new URL(e):e;if(!t.endsWith(pe))return t;let[r]=t.split(`.${pe}`),n=r.split(".");return(n.length===2?[...n,pe]:[n[1],n[2],pe]).join(".")}async function Xs(e){let t=typeof e=="string"?new URL(e):e;if(!t.host.endsWith(pe))return null;let i=(await(await Ut({host:`https://${Ir(t)}`})).json()).data?.filter(d=>d.DATA_TYPE.startsWith("info#"))[0];return i&&"endpoint_id"in i?i.endpoint_id:null}var kr={HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections",NON_HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections[*https://auth.globus.org/scopes/<MAPPED_COLLECTION_ID>/data_access]"};function Zs(e,t){let{endpoint_id:r}=e;if(!r)throw new Error("An 'endpoint_id' is required to determine the required scopes");return t?kr[t].replace("<ENDPOINT_ID>",r):Object.entries(kr).reduce((n,[i,d])=>({...n,[i]:d.replace("<ENDPOINT_ID>",r)}),{})}var Yt={};u(Yt,{CONFIG:()=>ai,jobs:()=>zt,timer:()=>Bt});var Bt={};u(Bt,{create:()=>ei});var ei=function(e,t){return o({service:O,resource_server:I.TIMERS,path:"/v2/timer",method:"POST"},e,t)};var zt={};u(zt,{get:()=>ri,getAll:()=>ti,patch:()=>ni,pause:()=>oi,remove:()=>ii,resume:()=>si});var ti=function(e,t){return o({service:O,resource_server:I[O],path:"/jobs",method:"GET"},e,t)},ri=function(e,t,r){return o({service:O,resource_server:I[O],path:`/jobs/${e}`,method:"GET"},t,r)},ni=function(e,t,r){return o({service:O,resource_server:I[O],path:`/jobs/${e}`,method:"PATCH"},t,r)},oi=function(e,t,r){return o({service:O,resource_server:I[O],path:`/jobs/${e}/pause`,method:"POST"},t,r)},si=function(e,t,r){return o({service:O,resource_server:I[O],path:`/jobs/${e}/resume`,method:"POST"},t,r)},ii=function(e,t,r){return o({service:O,resource_server:I[O],path:`/jobs/${e}`,method:"DELETE"},t,r)};var ai=he;var Kt={};u(Kt,{CONFIG:()=>mi,endpoints:()=>Vt});var Vt={};u(Vt,{get:()=>ci,getAll:()=>pi,getStatus:()=>ui,remove:()=>li,update:()=>di});var pi=function(e,t){return o({service:w,scope:B.ALL,path:"/v2/endpoints",method:"GET"},e,t)},ci=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v2/endpoints/${e}`,method:"GET"},t,r)},ui=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v2/endpoints/${e}/status`},t,r)},di=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v3/endpoints/${e}`,method:"PUT"},t,r)},li=function(e,t,r){return o({service:w,scope:B.ALL,path:`/v2/endpoints/${e}`,method:"DELETE"},t,r)};var mi=_e;var Wt={};u(Wt,{HOSTS:()=>wr,host:()=>Mr,url:()=>Cr,urlFor:()=>fi});var wr={integration:"app.integration.globuscs.info",sandbox:"app.sandbox.globuscs.info",test:"app.test.globuscs.info",staging:"app.staging.globuscs.info",preview:"app.preview.globus.org",production:"app.globus.org"};function Mr(e=K()){return wr[e]}function Cr(e,t){return new URL(e||"",`https://${Mr(t?.environment)}`)}var hi={TASK:"/activity/%s/overview",COLLECTION:"/file-manager/collections/%s/overview",ENDPOINT:"/file-manager/collections/%s/overview"};function fi(e,t,r){let n=hi[e].replace(/%s/g,t?.join("/")||"");return Cr(n,r)}return Vr(gi);})();
1
+ var globus=(()=>{var Hr=Object.create;var ue=Object.defineProperty;var Br=Object.getOwnPropertyDescriptor;var zr=Object.getOwnPropertyNames;var Vr=Object.getPrototypeOf,Yr=Object.prototype.hasOwnProperty;var Kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t)=>{for(var r in t)ue(e,r,{get:t[r],enumerable:!0})},nr=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zr(t))!Yr.call(e,i)&&i!==r&&ue(e,i,{get:()=>t[i],enumerable:!(o=Br(t,i))||o.enumerable});return e};var Wr=(e,t,r)=>(r=e!=null?Hr(Vr(e)):{},nr(t||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e)),Qr=e=>nr(ue({},"__esModule",{value:!0}),e);var gr=Kr((G,fr)=>{var Se=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,ve=(function(){function e(){this.fetch=!1,this.DOMException=Se.DOMException}return e.prototype=Se,new e})();(function(e){var t=(function(r){var o=typeof e<"u"&&e||typeof self<"u"&&self||typeof global<"u"&&global||{},i={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function d(s){return s&&DataView.prototype.isPrototypeOf(s)}if(i.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=ArrayBuffer.isView||function(s){return s&&f.indexOf(Object.prototype.toString.call(s))>-1};function R(s){if(typeof s!="string"&&(s=String(s)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(s)||s==="")throw new TypeError('Invalid character in header field name: "'+s+'"');return s.toLowerCase()}function L(s){return typeof s!="string"&&(s=String(s)),s}function C(s){var a={next:function(){var l=s.shift();return{done:l===void 0,value:l}}};return i.iterable&&(a[Symbol.iterator]=function(){return a}),a}function S(s){this.map={},s instanceof S?s.forEach(function(a,l){this.append(l,a)},this):Array.isArray(s)?s.forEach(function(a){if(a.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+a.length);this.append(a[0],a[1])},this):s&&Object.getOwnPropertyNames(s).forEach(function(a){this.append(a,s[a])},this)}S.prototype.append=function(s,a){s=R(s),a=L(a);var l=this.map[s];this.map[s]=l?l+", "+a:a},S.prototype.delete=function(s){delete this.map[R(s)]},S.prototype.get=function(s){return s=R(s),this.has(s)?this.map[s]:null},S.prototype.has=function(s){return this.map.hasOwnProperty(R(s))},S.prototype.set=function(s,a){this.map[R(s)]=L(a)},S.prototype.forEach=function(s,a){for(var l in this.map)this.map.hasOwnProperty(l)&&s.call(a,this.map[l],l,this)},S.prototype.keys=function(){var s=[];return this.forEach(function(a,l){s.push(l)}),C(s)},S.prototype.values=function(){var s=[];return this.forEach(function(a){s.push(a)}),C(s)},S.prototype.entries=function(){var s=[];return this.forEach(function(a,l){s.push([l,a])}),C(s)},i.iterable&&(S.prototype[Symbol.iterator]=S.prototype.entries);function N(s){if(!s._noBody){if(s.bodyUsed)return Promise.reject(new TypeError("Already read"));s.bodyUsed=!0}}function V(s){return new Promise(function(a,l){s.onload=function(){a(s.result)},s.onerror=function(){l(s.error)}})}function Zt(s){var a=new FileReader,l=V(a);return a.readAsArrayBuffer(s),l}function U(s){var a=new FileReader,l=V(a),y=/charset=([A-Za-z0-9_-]+)/.exec(s.type),O=y?y[1]:"utf-8";return a.readAsText(s,O),l}function Fr(s){for(var a=new Uint8Array(s),l=new Array(a.length),y=0;y<a.length;y++)l[y]=String.fromCharCode(a[y]);return l.join("")}function er(s){if(s.slice)return s.slice(0);var a=new Uint8Array(s.byteLength);return a.set(new Uint8Array(s)),a.buffer}function tr(){return this.bodyUsed=!1,this._initBody=function(s){this.bodyUsed=this.bodyUsed,this._bodyInit=s,s?typeof s=="string"?this._bodyText=s:i.blob&&Blob.prototype.isPrototypeOf(s)?this._bodyBlob=s:i.formData&&FormData.prototype.isPrototypeOf(s)?this._bodyFormData=s:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(s)?this._bodyText=s.toString():i.arrayBuffer&&i.blob&&d(s)?(this._bodyArrayBuffer=er(s.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(s)||g(s))?this._bodyArrayBuffer=er(s):this._bodyText=s=Object.prototype.toString.call(s):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof s=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(s)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var s=N(this);if(s)return s;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var s=N(this);return s||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(i.blob)return this.blob().then(Zt);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var s=N(this);if(s)return s;if(this._bodyBlob)return U(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Fr(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(Ur)}),this.json=function(){return this.text().then(JSON.parse)},this}var jr=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Gr(s){var a=s.toUpperCase();return jr.indexOf(a)>-1?a:s}function F(s,a){if(!(this instanceof F))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');a=a||{};var l=a.body;if(s instanceof F){if(s.bodyUsed)throw new TypeError("Already read");this.url=s.url,this.credentials=s.credentials,a.headers||(this.headers=new S(s.headers)),this.method=s.method,this.mode=s.mode,this.signal=s.signal,!l&&s._bodyInit!=null&&(l=s._bodyInit,s.bodyUsed=!0)}else this.url=String(s);if(this.credentials=a.credentials||this.credentials||"same-origin",(a.headers||!this.headers)&&(this.headers=new S(a.headers)),this.method=Gr(a.method||this.method||"GET"),this.mode=a.mode||this.mode||null,this.signal=a.signal||this.signal||(function(){if("AbortController"in o){var m=new AbortController;return m.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&l)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(l),(this.method==="GET"||this.method==="HEAD")&&(a.cache==="no-store"||a.cache==="no-cache")){var y=/([?&])_=[^&]*/;if(y.test(this.url))this.url=this.url.replace(y,"$1_="+new Date().getTime());else{var O=/\?/;this.url+=(O.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}F.prototype.clone=function(){return new F(this,{body:this._bodyInit})};function Ur(s){var a=new FormData;return s.trim().split("&").forEach(function(l){if(l){var y=l.split("="),O=y.shift().replace(/\+/g," "),m=y.join("=").replace(/\+/g," ");a.append(decodeURIComponent(O),decodeURIComponent(m))}}),a}function Jr(s){var a=new S,l=s.replace(/\r?\n[\t ]+/g," ");return l.split("\r").map(function(y){return y.indexOf(`
2
+ `)===0?y.substr(1,y.length):y}).forEach(function(y){var O=y.split(":"),m=O.shift().trim();if(m){var ce=O.join(":").trim();try{a.append(m,ce)}catch(Ie){console.warn("Response "+Ie.message)}}}),a}tr.call(F.prototype);function M(s,a){if(!(this instanceof M))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(a||(a={}),this.type="default",this.status=a.status===void 0?200:a.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=a.statusText===void 0?"":""+a.statusText,this.headers=new S(a.headers),this.url=a.url||"",this._initBody(s)}tr.call(M.prototype),M.prototype.clone=function(){return new M(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new S(this.headers),url:this.url})},M.error=function(){var s=new M(null,{status:200,statusText:""});return s.ok=!1,s.status=0,s.type="error",s};var $r=[301,302,303,307,308];M.redirect=function(s,a){if($r.indexOf(a)===-1)throw new RangeError("Invalid status code");return new M(null,{status:a,headers:{location:s}})},r.DOMException=o.DOMException;try{new r.DOMException}catch{r.DOMException=function(a,l){this.message=a,this.name=l;var y=Error(a);this.stack=y.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function De(s,a){return new Promise(function(l,y){var O=new F(s,a);if(O.signal&&O.signal.aborted)return y(new r.DOMException("Aborted","AbortError"));var m=new XMLHttpRequest;function ce(){m.abort()}m.onload=function(){var D={statusText:m.statusText,headers:Jr(m.getAllResponseHeaders()||"")};O.url.indexOf("file://")===0&&(m.status<200||m.status>599)?D.status=200:D.status=m.status,D.url="responseURL"in m?m.responseURL:D.headers.get("X-Request-URL");var J="response"in m?m.response:m.responseText;setTimeout(function(){l(new M(J,D))},0)},m.onerror=function(){setTimeout(function(){y(new TypeError("Network request failed"))},0)},m.ontimeout=function(){setTimeout(function(){y(new TypeError("Network request timed out"))},0)},m.onabort=function(){setTimeout(function(){y(new r.DOMException("Aborted","AbortError"))},0)};function Ie(D){try{return D===""&&o.location.href?o.location.href:D}catch{return D}}if(m.open(O.method,Ie(O.url),!0),O.credentials==="include"?m.withCredentials=!0:O.credentials==="omit"&&(m.withCredentials=!1),"responseType"in m&&(i.blob?m.responseType="blob":i.arrayBuffer&&(m.responseType="arraybuffer")),a&&typeof a.headers=="object"&&!(a.headers instanceof S||o.Headers&&a.headers instanceof o.Headers)){var rr=[];Object.getOwnPropertyNames(a.headers).forEach(function(D){rr.push(R(D)),m.setRequestHeader(D,L(a.headers[D]))}),O.headers.forEach(function(D,J){rr.indexOf(J)===-1&&m.setRequestHeader(J,D)})}else O.headers.forEach(function(D,J){m.setRequestHeader(J,D)});O.signal&&(O.signal.addEventListener("abort",ce),m.onreadystatechange=function(){m.readyState===4&&O.signal.removeEventListener("abort",ce)}),m.send(typeof O._bodyInit>"u"?null:O._bodyInit)})}return De.polyfill=!0,o.fetch||(o.fetch=De,o.Headers=S,o.Request=F,o.Response=M),r.Headers=S,r.Request=F,r.Response=M,r.fetch=De,r})({})})(ve);ve.fetch.ponyfill=!0;delete ve.fetch.polyfill;var W=Se.fetch?Se:ve;G=W.fetch;G.default=W.fetch;G.fetch=W.fetch;G.Headers=W.Headers;G.Request=W.Request;G.Response=W.Response;fr.exports=G});var Mi={};u(Mi,{auth:()=>et,authorization:()=>nt,compute:()=>Qt,errors:()=>Be,flows:()=>Lt,gcs:()=>zt,groups:()=>wt,info:()=>Ce,logger:()=>Le,request:()=>n,search:()=>xt,timers:()=>Kt,transfer:()=>Pt,webapp:()=>Xt});var Ce={};u(Ce,{CLIENT_INFO:()=>cr,VERSION:()=>pr,addClientInfo:()=>tn,getClientInfo:()=>ur,getClientInfoRequestHeaders:()=>we});var or="X-Globus-Client-Info",Xr=!0;function sr(){return Xr}var Zr=";",en=",";function ir(e){return(Array.isArray(e)?e:[e]).map(r=>Object.entries(r).map(([o,i])=>`${o}=${i}`).join(en)).join(Zr)}var ar="6.2.0";var pr=ar,cr={product:"javascript-sdk",version:pr},ke=[cr];function tn(e){ke=ke.concat(e)}function ur(){return ir(ke)}function we(){return sr()?{[or]:ur()}:{}}var Le={};u(Le,{log:()=>b,setLogLevel:()=>nn,setLogger:()=>rn});var Me=["debug","info","warn","error"],de,dr=Me.indexOf("error");function rn(e){de=e}function nn(e){dr=Me.indexOf(e)}function b(e,...t){if(!de||Me.indexOf(e)<dr)return;(de[e]??de.log)(...t)}var nt={};u(nt,{AuthorizationManager:()=>ae,create:()=>In});var $=class extends Error{};$.prototype.name="InvalidTokenError";function on(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let o=r.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function sn(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return on(t)}catch{return atob(t)}}function lr(e,t){if(typeof e!="string")throw new $("Invalid token specified: must be a string");t||(t={});let r=t.header===!0?0:1,o=e.split(".")[r];if(typeof o!="string")throw new $(`Invalid token specified: missing part #${r+1}`);let i;try{i=sn(o)}catch(d){throw new $(`Invalid token specified: invalid base64 for part #${r+1} (${d.message})`)}try{return JSON.parse(i)}catch(d){throw new $(`Invalid token specified: invalid json for part #${r+1} (${d.message})`)}}var et={};u(et,{CONFIG:()=>Ze,getAuthorizationEndpoint:()=>oe,getTokenEndpoint:()=>En,identities:()=>Ke,isGlobusAuthTokenResponse:()=>X,isRefreshToken:()=>re,isToken:()=>Q,oauth2:()=>q,utils:()=>Xe});var ye={};u(ye,{HOSTS:()=>Je,ID:()=>T,RESOURCE_SERVERS:()=>h,SCOPES:()=>Y});var le={};u(le,{HOSTS:()=>Ne,ID:()=>p,SCOPES:()=>c});var p="TRANSFER",c={ALL:"urn:globus:auth:scope:transfer.api.globus.org:all"},Ne={sandbox:"transfer.api.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var me={};u(me,{HOSTS:()=>qe,ID:()=>P,SCOPES:()=>I});var P="FLOWS",qe={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"},I={MANAGE_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/manage_flows",VIEW_FLOWS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/view_flows",RUN:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run",RUN_STATUS:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_status",RUN_MANAGE:"https://auth.globus.org/scopes/eec9b274-0c81-4334-bdc2-54e90e689b9a/run_manage"};var he={};u(he,{HOSTS:()=>Fe,ID:()=>A});var A="TIMERS",Fe={sandbox:"sandbox.timer.automate.globus.org",production:"timer.automate.globus.org",staging:"staging.timer.automate.globus.org",integration:"integration.timer.automate.globus.org",test:"test.timer.automate.globus.org",preview:"preview.timer.automate.globus.org"};var _e={};u(_e,{HOSTS:()=>je,ID:()=>E,SCOPES:()=>an});var E="GROUPS",je={sandbox:"groups.api.sandbox.globuscs.info",production:"groups.api.globus.org",staging:"groups.api.staging.globuscs.info",integration:"groups.api.integration.globuscs.info",test:"groups.api.test.globuscs.info",preview:"groups.api.preview.globuscs.info"},an={ALL:"urn:globus:auth:scope:groups.api.globus.org:all",VIEW_MY:"urn:globus:auth:scope:groups.api.globus.org:view_my_groups_and_membership"};var fe={};u(fe,{HOSTS:()=>Ge,ID:()=>v,SCOPES:()=>x});var v="SEARCH",Ge={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},x={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var ge={};u(ge,{HOSTS:()=>Ue,ID:()=>w,SCOPES:()=>H});var w="COMPUTE",Ue={sandbox:"compute.api.sandbox.globuscs.info",production:"compute.api.globus.org",staging:"compute.api.staging.globuscs.info",integration:"compute.api.integration.globuscs.info",test:"compute.api.test.globuscs.info",preview:"compute.api.preview.globus.org"},H={ALL:"https://auth.globus.org/scopes/facd7ccc-c5f4-42aa-916b-a0e270e2c2a9/all"};var T="AUTH",Je={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"},Y={VIEW_IDENTITIES:"urn:globus:auth:scope:auth.globus.org:view_identities"},h={[T]:"auth.globus.org",[p]:"transfer.api.globus.org",[P]:"flows.globus.org",[E]:"groups.api.globus.org",[v]:"search.api.globus.org",[A]:"524230d7-ea86-4a52-8312-86065a9e0417",[w]:"funcx_service"};var Be={};u(Be,{EnvironmentConfigurationError:()=>Z,isAuthorizationRequirementsError:()=>ee,isConsentRequiredError:()=>$e,isErrorWellFormed:()=>mr,toAuthorizationQueryParams:()=>He});var Z=class extends Error{name="EnvironmentConfigurationError";constructor(t,r){super(),this.message=`Invalid configuration value provided for ${t} (${r}).`}};function mr(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e}function $e(e){return mr(e)&&e.code==="ConsentRequired"&&"required_scopes"in e&&Array.isArray(e.required_scopes)}var pn=["required_scopes"];function He(e){let t={scope:e.authorization_parameters.required_scopes?.join(" "),...e.authorization_parameters};return Object.entries(t).reduce((r,[o,i])=>{if(pn.includes(o)||i===void 0||i===null)return r;let d=i;return Array.isArray(d)?d=d.join(","):typeof i=="boolean"&&(d=d?"true":"false"),{...r,[o]:d}},{})}function ee(e){return typeof e=="object"&&e!==null&&"authorization_parameters"in e&&typeof e.authorization_parameters=="object"&&e.authorization_parameters!==null}function cn(){return typeof window<"u"?window:process}function un(e){return typeof window==typeof e}function ze(e,t){let r=cn(),o;return un(r)?o=r:o=r.env,e in o?o[e]:t}var hr={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"},j={[T]:T,[p]:p,[P]:P,[E]:E,[v]:v,[A]:A,[w]:w},dn={[T]:Je,[p]:Ne,[P]:qe,[E]:je,[v]:Ge,[A]:Fe,[w]:Ue};function Ve(e){let t=ze("GLOBUS_SDK_OPTIONS",{});return typeof t=="string"&&(t=JSON.parse(t)),{...t,...e,fetch:{...t?.fetch,...e?.fetch,options:{...t?.fetch?.options,...e?.fetch?.options,headers:{...t?.fetch?.options?.headers,...e?.fetch?.options?.headers}}}}}function K(){let e=Ve(),t=ze("GLOBUS_SDK_ENVIRONMENT",e?.environment??hr.PRODUCTION);if(e?.environment&&t!==e.environment&&b("debug","GLOBUS_SDK_ENVIRONMENT and GLOBUS_SDK_OPTIONS.environment are set to different values. GLOBUS_SDK_ENVIRONMENT will take precedence"),!t||!Object.values(hr).includes(t))throw new Z("GLOBUS_SDK_ENVIRONMENT",t);return t}function ln(e,t=K()){return dn[e][t]}function _r(e,t=K()){let r=ln(e,t);return ze(`GLOBUS_SDK_SERVICE_URL_${e}`,r?`https://${r}`:void 0)}function mn(e){let t=new URLSearchParams;return Array.from(Object.entries(e)).forEach(([r,o])=>{Array.isArray(o)?t.set(r,o.join(",")):o!==void 0&&t.set(r,String(o))}),t.toString()}function hn(e,t="",r=K()){let o=_r(e,r);return new URL(t,o)}function te(e,t,r,o){let i;return typeof e=="object"?i=new URL(t,e.host):i=hn(e,t,o?.environment),r&&r.search&&(i.search=mn(r.search)),i.toString()}var Ke={};u(Ke,{consents:()=>Ye,get:()=>fn,getAll:()=>gn});var yr=Wr(gr());async function n(e,t,r){let o=Ve(r),i=o?.fetch?.options||{},d={...we(),...t?.headers,...i.headers},f=t?.manager||o?.manager,g;if(e.resource_server&&f&&(g=f.tokens.getByResourceServer(e.resource_server),g&&(d.Authorization=`Bearer ${g.access_token}`)),e.scope&&f&&(typeof e.service=="string"||"endpoint_id"in e.service)){let U=typeof e.service=="string"?h[e.service]:e.service.endpoint_id;g=f.tokens.getByResourceServer(U),g&&(d.Authorization=`Bearer ${g.access_token}`)}let R=t?.body;!R&&t?.payload&&(R=JSON.stringify(t.payload)),!d?.["Content-Type"]&&R&&(d["Content-Type"]="application/json");let L=te(e.service,e.path,{search:t?.query},o),C={method:e.method,body:R,...i,headers:d},S=yr.default;if(i?.__callable&&(S=i.__callable.bind(this),delete C.__callable),e.preventRetry||!f||!g||!re(g))return S(L,C);let N=await S(L,C);if(N.ok)return N;let V;try{V=ee(await N.clone().json())}catch{V=!1}if(N.status===401&&!V){let U=await f.refreshToken(g);return U?S(L,{...C,headers:{...C.headers,Authorization:`Bearer ${U.access_token}`}}):N}return N}var Ye={};u(Ye,{getAll:()=>_n});var _n=function(e,t={},r){return n({service:T,scope:Y.VIEW_IDENTITIES,path:`/v2/api/identities/${e}/consents`},t,r)};var fn=function(e,t={},r){return n({service:T,scope:Y.VIEW_IDENTITIES,path:`/v2/api/identities/${e}`},t,r)},gn=function(e={},t){return n({service:T,scope:Y.VIEW_IDENTITIES,path:"/v2/api/identities"},e,t)};var q={};u(q,{token:()=>We,userinfo:()=>Tn});var We={};u(We,{exchange:()=>Sn,introspect:()=>vn,refresh:()=>Pn,revoke:()=>On,token:()=>Sr,validate:()=>An});function yn(e){return new URLSearchParams(e)}function ne(e){return{...e,body:e.payload?yn(e.payload):void 0,headers:{...e?.headers||{},Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}}var Sr=function(e={},t){return n({service:T,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},ne(e),t)},Sn=Sr,vn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for introspect");return n({service:T,scope:void 0,path:"/v2/oauth2/token/introspect",method:"POST",preventRetry:!0},ne(e),t)},On=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return n({service:T,scope:void 0,path:"/v2/oauth2/token/revoke",method:"POST",preventRetry:!0},ne(e),t)},Pn=function(e,t){if(!e?.payload)throw new Error("'payload' is required for revoke");return n({service:T,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},ne(e),t)},An=function(e,t){if(!e?.payload)throw new Error("'payload' is required for validate");return n({service:T,scope:void 0,path:"/v2/oauth2/token/validate",method:"POST",preventRetry:!0},ne(e),t)};var Tn=function(e,t){return n({service:T,scope:void 0,path:"/v2/oauth2/userinfo",method:"GET"},e,t)};var Xe={};u(Xe,{hasConsentForScope:()=>Rn,splitScopeString:()=>Qe,toScopeTree:()=>Or});function Qe(e){let t=[],r="",o=0;return e.split("").forEach((i,d)=>{r+=i,i==="["&&(o+=1),i==="]"&&(o-=1),(i===" "&&o===0||d===e.length-1&&r)&&(t.push(r.trim()),r="")}),t}function vr(e){let t=e,r=t.startsWith("*");r&&(t=t.replace(/^\*\s*/,""));let o=[],i=t.indexOf("[");if(i===-1)return{scope:t,atomically_revocable:r,children:[]};let d=t.slice(0,i),f=t.slice(i+1,-1);return o=Qe(f).map(vr),{scope:d,atomically_revocable:r,children:o}}function Or(e){return Qe(e).map(vr)}function Rn(e,t){let r=Or(t);function o(i,d){let f=e.find(g=>g.scope_name===i.scope&&(d?g.dependency_path.join(",")===[...d,g.id].join(","):g.dependency_path.length===1));return f?i.children.length?i.children.every(g=>o(g,d?[...d,f.id]:[f.id])):f.status==="approved":!1}return r.every(i=>o(i))}var Ze=ye;function oe(){return te(T,"/v2/oauth2/authorize")}function En(){return te(T,"/v2/oauth2/token")}function Q(e){return typeof e=="object"&&e!==null&&"access_token"in e}function re(e){return Q(e)&&e!==null&&"refresh_token"in e}function X(e){return Q(e)&&e!==null&&"resource_server"in e}var se=class{constructor(t){this.name=t}#e=[];addListener(t){return this.#e.push(t),()=>this.removeListener(t)}removeListener(t){this.#e=this.#e.filter(r=>r!==t)}clearListeners(){this.#e=[]}async dispatch(t){await Promise.all(this.#e.map(r=>r(t)))}};function Pe(){return"crypto"in globalThis}function rt(){return"webcrypto"in globalThis.crypto?globalThis.crypto.webcrypto:globalThis.crypto}var bn=e=>btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");async function xn(e){let t=await rt().subtle.digest("SHA-256",new TextEncoder().encode(e));return String.fromCharCode(...new Uint8Array(t))}var tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Pr=`${tt}-._~`;function Ae(){return Array.from(rt().getRandomValues(new Uint8Array(43))).map(e=>Pr[e%Pr.length]).join("")}async function Te(e){let t=await xn(e);return bn(t)}function Re(){return Array.from(rt().getRandomValues(new Uint8Array(16))).map(e=>tt[e%tt.length]).join("")}var Oe={PKCE_STATE:"pkce_state",PKCE_CODE_VERIFIER:"pkce_code_verifier"},k={getKey(e){return e==="state"?Oe.PKCE_STATE:Oe.PKCE_CODE_VERIFIER},get:e=>sessionStorage.getItem(k.getKey(e)),set:(e,t)=>sessionStorage.setItem(k.getKey(e),t),reset:()=>{sessionStorage.removeItem(Oe.PKCE_STATE),sessionStorage.removeItem(Oe.PKCE_CODE_VERIFIER)}};var Ee=class e{#e;constructor(t){if(this.#e=t,e.supported===!1)throw new Error("RedirectTransport is not supported in this environment.")}static supported=Pe();async send(){let t=Ae(),r=await Te(t),o=this.#e.params?.state??Re();k.set("code_verifier",t),k.set("state",o);let i={response_type:"code",client_id:this.#e.client,scope:this.#e.scopes||"",redirect_uri:this.#e.redirect,state:o,code_challenge:r,code_challenge_method:"S256",...this.#e.params||{}},d=new URL(oe());d.search=new URLSearchParams(i).toString(),window.location.assign(d.toString())}async getToken(t={shouldReplace:!0,includeConsentedScopes:!1}){let r=new URL(window.location.href),o=new URLSearchParams(r.search);if(o.get("error"))throw new Error(o.get("error_description")||"An error occurred during the authorization process.");let i=o.get("code");if(!i)return;let d=k.get("state"),f=k.get("code_verifier");if(k.reset(),o.get("state")!==d)throw new Error('Invalid State. The received "state" parameter does not match the expected state.');if(!f)throw new Error("Invalid Code Verifier");let g={code:i,client_id:this.#e.client,code_verifier:f,redirect_uri:this.#e.redirect,grant_type:"authorization_code"},R=await(await q.token.exchange({query:t.includeConsentedScopes?{include_consented_scopes:!0}:void 0,payload:g})).json();return t.shouldReplace&&(o.delete("code"),o.delete("state"),r.search=o.toString(),window.location.replace(r)),R}};var be=class{#e;constructor(t){this.#e=t.manager}#r(t){let r=this.#e.storage.getItem(t)||"null",o=null;try{let i=JSON.parse(r);Q(i)&&(o=i)}catch{}return o}#t(t){let r=Ze.RESOURCE_SERVERS?.[t];return this.getByResourceServer(r)}getByResourceServer(t){return this.#r(`${this.#e.storageKeyPrefix}${t}`)}get auth(){return this.#t(j.AUTH)}get transfer(){return this.#t(j.TRANSFER)}get flows(){return this.#t(j.FLOWS)}get groups(){return this.#t(j.GROUPS)}get search(){return this.#t(j.SEARCH)}get timer(){return this.#t(j.TIMERS)}get compute(){return this.#t(j.COMPUTE)}gcs(t){return this.getByResourceServer(t)}getAll(){return Object.keys(this.#e.storage).reduce((r,o)=>(o.startsWith(this.#e.storageKeyPrefix)&&r.push(this.#r(o)),r),[]).filter(Q)}add(t){let r=Date.now(),o=r+t.expires_in*1e3;this.#e.storage.setItem(`${this.#e.storageKeyPrefix}${t.resource_server}`,JSON.stringify({...t,__metadata:{created:r,expires:o}})),"other_tokens"in t&&t.other_tokens?.forEach(i=>{this.add(i)})}remove(t){this.#e.storage.removeItem(`${this.#e.storageKeyPrefix}${t.resource_server}`)}static isTokenExpired(t,r=0){if(!(!t||!t.__metadata||typeof t.__metadata.expires!="number"))return Date.now()+r>=t.__metadata.expires}};var ie=class{#e={};getItem(t){return this.#e[t]!==void 0?this.#e[t]:null}setItem(t,r){this.#e[t]=r}removeItem(t){delete this.#e[t]}key(t){return Object.keys(this.#e)[t]}clear(){this.#e={}}get length(){return Object.keys(this.#e).length}};var Ar="globus-sdk",xe=class e{#e;#r=null;constructor(t){if(this.#e=t,e.supported===!1)throw new Error("PopupTransport is not supported in this environment.")}static supported=Pe()&&"window"in globalThis&&typeof globalThis.window.open=="function";async send(){let t=Ae(),r=await Te(t),o=this.#e.params?.state??Re();k.set("code_verifier",t),k.set("state",o);let i={response_type:"code",client_id:this.#e.client,scope:this.#e.scopes||"",redirect_uri:this.#e.redirect,state:o,code_challenge:r,code_challenge_method:"S256",...this.#e.params||{}},d=new URL(oe());d.search=new URLSearchParams(i).toString();let f=new Promise(g=>{window.addEventListener("message",async R=>{let{data:L}=R;if(R.origin!==window.location.origin||L?.source!==Ar)return;this.#r?.close();let C=await this.#t(L.url);g(C)},!1)});if(this.#r=window.open(d.toString(),"_blank","width=800,height=600"),!this.#r)throw new Error("Unable to open window for PopupTransport.");return this.#r.focus(),f}async#t(t){let r=new URL(t),o=new URLSearchParams(r.search);if(o.get("error"))throw new Error(o.get("error_description")||"An error occurred during the authorization process.");let i=o.get("code");if(!i)return;let d=k.get("state"),f=k.get("code_verifier");if(k.reset(),o.get("state")!==d)throw new Error('Invalid State. The received "state" parameter does not match the expected state.');if(!f)throw new Error("Invalid Code Verifier");let g={code:i,client_id:this.#e.client,code_verifier:f,redirect_uri:this.#e.redirect,grant_type:"authorization_code"};return await(await q.token.exchange({payload:g})).json()}getToken(){window.opener&&window.opener.postMessage({source:Ar,url:window.location.href},window.location.origin)}};var Dn={redirect:Ee,popup:xe},Tr={useRefreshTokens:!1,defaultScopes:"openid profile email",transport:"redirect"},Rr={execute:!0,additionalParams:void 0},ae=class{#e;configuration;storage;#r=!1;get authenticated(){return this.#r}set authenticated(t){t!==this.#r&&(this.#r=t,this.#s())}tokens;events={authenticated:new se("authenticated"),revoke:new se("revoke")};constructor(t){if(!t.client)throw new Error("You must provide a `client` for your application.");let r=t.defaultScopes===!1?"":t.defaultScopes??Tr.defaultScopes;this.configuration={...Tr,...t,scopes:[t.scopes?t.scopes:"",r].filter(o=>o.length).join(" ")},this.storage=t.storage||new ie,this.configuration.events&&Object.entries(this.configuration.events).forEach(([o,i])=>{o in this.events&&this.events[o].addListener(i)}),this.tokens=new be({manager:this}),this.#t()}get storageKeyPrefix(){return`${this.configuration.client}:`}get user(){let t=this.getGlobusAuthToken();return t&&t.id_token?lr(t.id_token):null}async refreshTokens(){b("debug","AuthorizationManager.refreshTokens");let t=await Promise.allSettled(this.tokens.getAll().map(r=>re(r)?this.refreshToken(r):Promise.resolve(null)));return this.#t(),t}async refreshToken(t){b("debug",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`);try{let r=await(await q.token.refresh({payload:{client_id:this.configuration.client,refresh_token:t.refresh_token,grant_type:"refresh_token"}})).json();if(X(r))return this.addTokenResponse(r),r}catch{b("error",`AuthorizationManager.refreshToken | resource_server=${t.resource_server}`)}return null}hasGlobusAuthToken(){return this.getGlobusAuthToken()!==null}getGlobusAuthToken(){let t=this.storage.getItem(`${this.storageKeyPrefix}${h.AUTH}`);return t?JSON.parse(t):null}#t(){b("debug","AuthorizationManager.#checkAuthorizationState"),this.hasGlobusAuthToken()&&(this.authenticated=!0)}async#s(){let t=this.authenticated,r=this.getGlobusAuthToken()??void 0;await this.events.authenticated.dispatch({isAuthenticated:t,token:r})}reset(){Object.keys(this.storage).forEach(t=>{t.startsWith(this.storageKeyPrefix)&&this.storage.removeItem(t)}),this.authenticated=!1}#o(t){return`${t}${this.configuration.useRefreshTokens?" offline_access":""}`}#n(t){let{scopes:r,...o}=t??{},i=Dn[this.configuration.transport||"redirect"],d=this.#o(r??(this.configuration.scopes||""));return this.storage instanceof ie&&(d=[...new Set(d.split(" ").concat((this.configuration?.scopes||"").split(" ")))].join(" ")),new i({client:this.configuration.client,redirect:this.configuration.redirect,scopes:d,...o,params:{...o?.params}})}async login(t={additionalParams:{}}){b("debug","AuthorizationManager.login"),this.reset();let o=await this.#n({params:t?.additionalParams}).send();return X(o)&&this.addTokenResponse(o),o}async prompt(t){b("debug","AuthorizationManager.prompt");let o=await this.#n(t).send();return X(o)&&this.addTokenResponse(o),o}async handleCodeRedirect(t={shouldReplace:!0,additionalParams:{}}){b("debug","AuthorizationManager.handleCodeRedirect");let r=await this.#n({params:t?.additionalParams}).getToken({shouldReplace:t?.shouldReplace,includeConsentedScopes:t?.includeConsentedScopes});return X(r)&&(b("debug",`AuthorizationManager.handleCodeRedirect | response=${JSON.stringify(r)}`),this.addTokenResponse(r)),r}async handleErrorResponse(t,r){let o=typeof r=="boolean"?{...Rr,execute:r}:{...Rr,...r};b("debug",`AuthorizationManager.handleErrorResponse | response=${JSON.stringify(t)} execute=${o.execute}`);let i=async()=>{};return ee(t)&&(b("debug","AuthorizationManager.handleErrorResponse | error=AuthorizationRequirementsError"),i=async()=>{await this.handleAuthorizationRequirementsError(t,{additionalParams:o.additionalParams})}),$e(t)&&(b("debug","AuthorizationManager.handleErrorResponse | error=ConsentRequiredError"),i=async()=>{await this.handleConsentRequiredError(t,{additionalParams:o.additionalParams})}),"code"in t&&t.code==="AuthenticationFailed"&&(b("debug","AuthorizationManager.handleErrorResponse | error=AuthenticationFailed"),i=async()=>{await this.revoke()}),o.execute===!0?await i():i}async handleAuthorizationRequirementsError(t,r){this.#e=this.#n({params:{prompt:"login",...He(t),...r?.additionalParams}}),await this.#e.send()}async handleConsentRequiredError(t,r){this.#e=this.#n({scopes:this.#o(t.required_scopes.join(" ")),params:{...r?.additionalParams}}),await this.#e.send()}addTokenResponse=t=>{this.tokens.add(t),this.#t()};async revoke(){b("debug","AuthorizationManager.revoke");let t=Promise.all(this.tokens.getAll().map(this.#i.bind(this)));this.reset(),await t,await this.events.revoke.dispatch()}#i(t){return b("debug",`AuthorizationManager.revokeToken | resource_server=${t.resource_server}`),q.token.revoke({payload:{client_id:this.configuration.client,token:t.access_token}})}};function In(e){return new ae(e)}var Pt={};u(Pt,{CONFIG:()=>Ho,access:()=>pt,collectionBookmarks:()=>ut,endpoint:()=>it,endpointManager:()=>ft,endpointSearch:()=>Er,fileOperations:()=>ot,roles:()=>ct,streamAccessPoint:()=>lt,task:()=>at,taskSubmission:()=>st,tunnel:()=>dt,utils:()=>Ot});var Er=function(e,t){let r={...e,query:e?.query};return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_search"},r,t)};var ot={};u(ot,{ls:()=>kn,mkdir:()=>wn,rename:()=>Cn,stat:()=>Ln,symlink:()=>Mn});function B(e){return e==="GET"?{}:{"Content-Type":"application/json"}}var kn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/ls`},t,r)},wn=function(e,t,r){let o={payload:{DATA_TYPE:"mkdir",...t?.payload},headers:{...B("POST"),...t?.headers}};return n({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/mkdir`,method:"POST"},o,r)},Cn=function(e,t,r){let o={payload:{DATA_TYPE:"rename",...t?.payload},headers:{...B("POST"),...t?.headers}};return n({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/rename`,method:"POST"},o,r)},Mn=function(e,t,r){let o={payload:{DATA_TYPE:"symlink",...t?.payload},headers:{...B("POST"),...t?.headers}};return n({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/symlink`,method:"POST"},o,r)},Ln=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/stat`},t,r)};var st={};u(st,{submissionId:()=>Fn,submitDelete:()=>Nn,submitTransfer:()=>qn});var Nn=function(e,t){let r={payload:{DATA_TYPE:"delete",...e?.payload},headers:{...B("POST"),...e?.headers}};return n({service:p,scope:c.ALL,path:"/v0.10/delete",method:"POST"},r,t)},qn=function(e,t){let r={payload:{DATA_TYPE:"transfer",...e?.payload},headers:{...B("POST"),...e?.headers}};return n({service:p,scope:c.ALL,path:"/v0.10/transfer",method:"POST"},r,t)},Fn=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/submission_id"},e,t)};var it={};u(it,{create:()=>Gn,get:()=>jn,remove:()=>Jn,update:()=>Un});var jn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`},t,r)},Gn=function(e,t){return e?.payload&&Object.assign(e.payload,{DATA_TYPE:"shared_endpoint"}),n({service:p,scope:c.ALL,path:"/v0.10/shared_endpoint",method:"POST"},e,t)},Un=function(e,t,r){return t?.payload&&Object.assign(t.payload,{DATA_TYPE:"endpoint"}),n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"PUT"},t,r)},Jn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"DELETE"},t,r)};var at={};u(at,{cancel:()=>zn,get:()=>Hn,getAll:()=>$n,getEventList:()=>Yn,getPauseInfo:()=>Qn,getSkippedErrors:()=>Wn,getSuccessfulTransfers:()=>Kn,remove:()=>Vn,update:()=>Bn});var $n=function(e={},t){return n({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},Hn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}`},t,r)},Bn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}`,method:"PUT"},t,r)},zn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/cancel`,method:"POST"},t,r)},Vn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/remove`,method:"POST"},t,r)},Yn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/event_list`},t,r)},Kn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/successful_transfers`},t,r)},Wn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/skipped_errors`},t,r)},Qn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/pause_info`},t,r)};var pt={};u(pt,{create:()=>Zn,get:()=>eo,getAll:()=>Xn,remove:()=>ro,update:()=>to});var Xn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access_list`},t,r)},Zn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access`,method:"POST"},t,r)},eo=function({endpoint_xid:e,id:t},r,o){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`},r,o)},to=function({endpoint_xid:e,id:t},r,o){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"PUT"},r,o)},ro=function({endpoint_xid:e,id:t},r,o){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`,method:"DELETE"},r,o)};var ct={};u(ct,{create:()=>so,get:()=>oo,getAll:()=>no,remove:()=>io});var no=function(e,t={},r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role_list`},t,r)},oo=function({endpoint_id:e,role_id:t},r,o){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role/${t}`},r,o)},so=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role`,method:"POST"},t,r)},io=function({collection_id:e,role_id:t},r,o){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role/${t}`,method:"DELETE"},r,o)};var ut={};u(ut,{create:()=>po,get:()=>co,getAll:()=>ao,remove:()=>lo,update:()=>uo});var ao=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/bookmark_list"},e,t)},po=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/bookmark",method:"POST"},e,t)},co=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`},t,r)},uo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"PUT"},t,r)},lo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"DELETE"},t,r)};var dt={};u(dt,{create:()=>_o,get:()=>ho,getAll:()=>mo,getEventList:()=>So,remove:()=>fo,start:()=>go,stop:()=>yo});var z=h[p],mo=function(e,t){return n({service:p,resource_server:z,path:"/v2/tunnels"},e,t)},ho=function(e,t,r){return n({service:p,resource_server:z,path:`/v2/tunnels/${e}`},t,r)},_o=function(e,t){return n({service:p,resource_server:z,path:"/v2/tunnels",method:"POST"},e,t)},fo=function(e,t,r){return n({service:p,resource_server:z,path:`/v2/tunnels/${e}`,method:"DELETE"},t,r)},go=function(e,t,r){return n({service:p,resource_server:z,path:`/v2/tunnels/${e}`,method:"PATCH"},{payload:{data:{attributes:{...t}}}},r)},yo=function(e,t={},r){return n({service:p,resource_server:z,path:`/v2/tunnels/${e}`,method:"PATCH"},{payload:{data:{attributes:{...t,state:"STOPPING"}}}},r)},So=function(e,t,r){return n({service:p,resource_server:z,path:`/v2/tunnels/${e}/events`},t,r)};var lt={};u(lt,{get:()=>Oo,getAll:()=>vo});var br=h[p],vo=function(e,t){return n({service:p,resource_server:br,path:"/v2/stream_access_points"},e,t)},Oo=function(e,t,r){return n({service:p,resource_server:br,path:`/v2/stream_access_points/${e}`},t,r)};var ft={};u(ft,{endpoint:()=>mt,pauseRule:()=>ht,task:()=>_t});var mt={};u(mt,{get:()=>Po,getAccessList:()=>To,getHostedEndpoints:()=>Ao,getMonitoredEndpoints:()=>Ro});var Po=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}`},t,r)},Ao=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/hosted_endpoint_list`},t,r)},To=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/access_list`},t,r)},Ro=function(e={},t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/monitored_endpoints"},e,t)};var ht={};u(ht,{create:()=>bo,get:()=>xo,getAll:()=>Eo,remove:()=>Io,update:()=>Do});var Eo=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule_list"},e,t)},bo=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule",method:"POST"},e,t)},xo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`},t,r)},Do=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"PUT"},t,r)},Io=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"DELETE"},t,r)};var _t={};u(_t,{cancel:()=>Co,get:()=>wo,getAdminCancel:()=>Mo,getAll:()=>ko,getEventList:()=>Lo,getPauseInfo:()=>Go,getSkippedErrors:()=>qo,getSuccessfulTransfers:()=>No,pause:()=>Fo,resume:()=>jo});var ko=function(e={},t){return n({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},wo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}`},t,r)},Co=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_cancel",method:"POST"},e,t)},Mo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/admin_cancel/${e}`,method:"POST"},t,r)},Lo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/event_list`},t,r)},No=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/successful_transfers`},t,r)},qo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/skipped_errors`},t,r)},Fo=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_pause",method:"POST"},e,t)},jo=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_resume",method:"POST"},e,t)},Go=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/pause_info`},t,r)};var Ot={};u(Ot,{GLOBUS_DNS_DOMAINS:()=>Ir,getDomainFromEndpoint:()=>$o,isDirectory:()=>Uo,isFileDocument:()=>Dr,isGlobusHostname:()=>kr,readableBytes:()=>Jo});function Dr(e){return typeof e=="object"&&e!==null&&"DATA_TYPE"in e&&e.DATA_TYPE==="file"}function Uo(e){return Dr(e)&&e.type==="dir"}var gt=1e3,yt=gt*1e3,St=yt*1e3,vt=St*1e3,xr=vt*1e3;function Jo(e,t=2){let r="B",o=1;if(e<gt)return`${e} ${r}`;e<yt?(r="KB",o=gt):e<St?(r="MB",o=yt):e<vt?(r="GB",o=St):e<xr?(r="TB",o=vt):(r="PB",o=xr);let i=e/o,[d,f]=`${i}`.split("."),g=`${d}`;if(f&&f.length){let R=f.slice(0,t);R.length&&(g=`${d}.${R}`)}return`${g} ${r}`}var Ir=["dnsteam.globuscs.info","data.globus.org","dn.glob.us","gaccess.io"];function kr(e){return!!Ir.find(t=>e.endsWith(`.${t}`))}function $o(e){let{tlsftp_server:t}=e;if(!t||typeof t!="string")return null;let{hostname:r}=new URL(t.replace("tlsftp","https"));return!kr(r)&&/(?:[gm]-\w{6}.)?([\w-]+(\.[\w-]+)+)$/.exec(r)?.[1]||r||null}var Ho=le;var xt={};u(xt,{CONFIG:()=>os,entry:()=>Rt,index:()=>bt,query:()=>At,subject:()=>Tt});var At={};u(At,{get:()=>Bo,post:()=>zo});var Bo=function(e,t,r){return n({service:v,scope:x.SEARCH,path:`/v1/index/${e}/search`},t,r)},zo=function(e,t,r){return n({service:v,scope:x.SEARCH,path:`/v1/index/${e}/search`,method:"POST"},t,r)};var Tt={};u(Tt,{get:()=>Vo});var Vo=function(e,t,r){return n({service:v,scope:x.SEARCH,path:`/v1/index/${e}/subject`},t,r)};var Rt={};u(Rt,{get:()=>Yo});var Yo=function(e,t,r){return n({service:v,scope:x.SEARCH,path:`/v1/index/${e}/entry`},t,r)};var bt={};u(bt,{create:()=>es,get:()=>Xo,getAll:()=>Zo,ingest:()=>ns,remove:()=>ts,reopen:()=>rs,roles:()=>Et});var Et={};u(Et,{create:()=>Wo,getAll:()=>Ko,remove:()=>Qo});var Ko=function(e,t,r){return n({service:v,scope:x.ALL,path:`/v1/index/${e}/role_list`},t,r)},Wo=function(e,t,r){return n({service:v,scope:x.ALL,path:`/v1/index/${e}/role`,method:"POST"},t,r)},Qo=function({index_id:e,role_id:t},r,o){return n({service:v,scope:x.ALL,path:`/v1/index/${e}/role/${t}`,method:"DELETE"},r,o)};var Xo=function(e,t,r){return n({service:v,path:`/v1/index/${e}`},t,r)},Zo=function(e,t){return n({service:v,scope:x.ALL,path:"/v1/index_list"},e,t)},es=function(e,t){return n({service:v,scope:x.ALL,path:"/v1/index",method:"POST"},e,t)},ts=function(e,t,r){return n({service:v,scope:x.ALL,path:`/v1/index/${e}`,method:"DELETE"},t,r)},rs=function(e,t,r){return n({service:v,scope:x.ALL,path:`/v1/index/${e}/reopen`,method:"POST"},t,r)},ns=function(e,t,r){return n({service:v,scope:x.ALL,path:`/v1/index/${e}/ingest`,method:"POST"},t,r)};var os=fe;var wt={};u(wt,{CONFIG:()=>hs,groups:()=>Dt,membership:()=>kt,policies:()=>It});var Dt={};u(Dt,{create:()=>as,get:()=>is,getMyGroups:()=>ss,getStatuses:()=>us,remove:()=>ps,update:()=>cs});var ss=function(e,t){return n({service:E,resource_server:h.GROUPS,path:"/v2/groups/my_groups"},e,t)},is=function(e,t,r){return n({service:E,resource_server:h.GROUPS,path:`/v2/groups/${e}`},t,r)},as=function(e,t){return n({service:E,resource_server:h.GROUPS,path:"/v2/groups",method:"POST"},e,t)},ps=function(e,t,r){return n({service:E,resource_server:h.GROUPS,path:`/v2/groups/${e}`,method:"DELETE"},t,r)},cs=function(e,t,r){return n({service:E,resource_server:h.GROUPS,path:`/v2/groups/${e}`,method:"PUT"},t,r)},us=function(e,t){return n({service:E,resource_server:h.GROUPS,path:"/v2/groups/statuses"},e,t)};var It={};u(It,{get:()=>ds,update:()=>ls});var ds=function(e,t,r){return n({service:E,resource_server:h.GROUPS,path:`/v2/groups/${e}/policies`},t,r)},ls=function(e,t,r){return n({service:E,resource_server:h.GROUPS,path:`/v2/groups/${e}/policies`,method:"PUT"},t,r)};var kt={};u(kt,{act:()=>ms});var ms=function(e,t,r){return n({service:E,resource_server:h.GROUPS,path:`/v2/groups/${e}`,method:"POST"},t,r)};var hs=_e;var Lt={};u(Lt,{CONFIG:()=>Ds,flows:()=>Ct,runs:()=>Mt});var Ct={};u(Ct,{create:()=>wr,deploy:()=>vs,get:()=>fs,getAll:()=>_s,remove:()=>gs,run:()=>ys,update:()=>Os,validate:()=>Ss});var _s=function(e,t){return n({service:P,scope:I.VIEW_FLOWS,path:"/flows"},e,t)},fs=function(e,t,r){return n({service:P,scope:I.VIEW_FLOWS,path:`/flows/${e}`},t,r)},gs=function(e,t,r){return n({scope:I.MANAGE_FLOWS,service:P,path:`/flows/${e}`,method:"DELETE"},t,r)},ys=function(e,t,r){return n({service:P,scope:I.VIEW_FLOWS,path:`/flows/${e}/run`,method:"POST"},t,r)},Ss=function(e,t){return n({service:P,scope:I.MANAGE_FLOWS,path:"/flows/validate",method:"POST"},e,t)},wr=function(e,t){return n({service:P,scope:I.MANAGE_FLOWS,path:"/flows",method:"POST"},e,t)},vs=wr,Os=function(e,t,r){return n({service:P,scope:I.MANAGE_FLOWS,path:`/flows/${e}`,method:"PUT"},t,r)};var Mt={};u(Mt,{cancel:()=>Ts,get:()=>As,getAll:()=>Ps,getDefinition:()=>xs,getLog:()=>Rs,remove:()=>bs,update:()=>Es});var Ps=function(e={},t){return n({service:P,scope:I.RUN_MANAGE,path:"/runs"},e,t)},As=function(e,t,r){return n({service:P,scope:I.RUN_MANAGE,path:`/runs/${e}`},t,r)},Ts=function(e,t,r){return n({service:P,scope:I.RUN_MANAGE,path:`/runs/${e}/cancel`,method:"POST"},t,r)},Rs=function(e,t,r){return n({service:P,scope:I.RUN_MANAGE,path:`/runs/${e}/log`},t,r)},Es=function(e,t,r){return n({service:P,scope:I.RUN_MANAGE,path:`/runs/${e}`,method:"PUT"},t,r)},bs=function(e,t,r){return n({service:P,scope:I.RUN_MANAGE,path:`/runs/${e}/release`,method:"POST"},t,r)},xs=function(e,t,r){return n({service:P,scope:I.RUN_MANAGE,path:`/runs/${e}/definition`,method:"GET"},t,r)};var Ds=me;var zt={};u(zt,{collections:()=>Nt,endpoint:()=>qt,getScopes:()=>gi,https:()=>Ft,nodes:()=>jt,roles:()=>Gt,storageGateways:()=>Ut,userCredentials:()=>Jt,utils:()=>Bt,versioning:()=>Ht});var Nt={};u(Nt,{create:()=>Cs,get:()=>ks,getAll:()=>Is,patch:()=>Ls,remove:()=>ws,resetOwnerString:()=>qs,update:()=>Ms,updateOwnerString:()=>Ns});var Is=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/collections"},t,r)},ks=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`},r,o)},ws=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"DELETE"},r,o)},Cs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/collections",method:"POST"},t,r)},Ms=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PUT"},r,o)},Ls=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PATCH"},r,o)},Ns=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"PUT"},r,o)},qs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"DELETE"},r,o)};var qt={};u(qt,{get:()=>Fs,patch:()=>Gs,resetOwnerString:()=>Hs,update:()=>js,updateOwner:()=>Js,updateOwnerString:()=>$s,updateSubscriptionId:()=>Us});var Fs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint"},t,r)},js=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PUT"},t,r)},Gs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PATCH"},t,r)},Us=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/subscription_id",method:"PUT"},t,r)},Js=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner",method:"PUT"},t,r)},$s=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"PUT"},t,r)},Hs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"DELETE"},t,r)};var Ft={};u(Ft,{get:()=>Bs,remove:()=>zs,update:()=>Vs});var Bs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:t},r,o)},zs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:t,method:"DELETE"},r,o)},Vs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:t,method:"PUT"},r,o)};var jt={};u(jt,{create:()=>Qs,get:()=>Ks,getAll:()=>Ys,patch:()=>Zs,remove:()=>Ws,update:()=>Xs});var Ys=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/nodes"},t,r)},Ks=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`},r,o)},Ws=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"DELETE"},r,o)},Qs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/nodes",method:"POST"},t,r)},Xs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PUT"},r,o)},Zs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PATCH"},r,o)};var Gt={};u(Gt,{create:()=>ni,get:()=>ti,getAll:()=>ei,remove:()=>ri});var ei=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/roles"},t,r)},ti=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`},r,o)},ri=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`,method:"DELETE"},r,o)},ni=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/roles",method:"POST"},t,r)};var Ut={};u(Ut,{create:()=>ai,get:()=>si,getAll:()=>oi,patch:()=>ci,remove:()=>ii,update:()=>pi});var oi=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways"},t,r)},si=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`},r,o)},ii=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"DELETE"},r,o)},ai=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways",method:"POST"},t,r)},pi=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PUT"},r,o)},ci=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PATCH"},r,o)};var Jt={};u(Jt,{create:()=>mi,get:()=>di,getAll:()=>ui,patch:()=>_i,remove:()=>li,update:()=>hi});var ui=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials"},t,r)},di=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`},r,o)},li=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"DELETE"},r,o)},mi=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials",method:"POST"},t,r)},hi=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PUT"},r,o)},_i=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PATCH"},r,o)};var Ht={};u(Ht,{info:()=>$t});var $t=function(e,t,r){return n({service:e,path:"/api/info"},t,r)};var Bt={};u(Bt,{getEndpointIdFromURL:()=>fi,getGCSDomainFromURL:()=>Cr});var pe="data.globus.org";function Cr(e){let{host:t}=typeof e=="string"?new URL(e):e;if(!t.endsWith(pe))return t;let[r]=t.split(`.${pe}`),o=r.split(".");return(o.length===2?[...o,pe]:[o[1],o[2],pe]).join(".")}async function fi(e){let t=typeof e=="string"?new URL(e):e;if(!t.host.endsWith(pe))return null;let i=(await(await $t({host:`https://${Cr(t)}`})).json()).data?.filter(d=>d.DATA_TYPE.startsWith("info#"))[0];return i&&"endpoint_id"in i?i.endpoint_id:null}var Mr={HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections",NON_HIGH_ASSURANCE:"urn:globus:auth:scope:<ENDPOINT_ID>:manage_collections[*https://auth.globus.org/scopes/<MAPPED_COLLECTION_ID>/data_access]"};function gi(e,t){let{endpoint_id:r}=e;if(!r)throw new Error("An 'endpoint_id' is required to determine the required scopes");return t?Mr[t].replace("<ENDPOINT_ID>",r):Object.entries(Mr).reduce((o,[i,d])=>({...o,[i]:d.replace("<ENDPOINT_ID>",r)}),{})}var Kt={};u(Kt,{CONFIG:()=>Ri,jobs:()=>Yt,timer:()=>Vt});var Vt={};u(Vt,{create:()=>yi});var yi=function(e,t){return n({service:A,resource_server:h.TIMERS,path:"/v2/timer",method:"POST"},e,t)};var Yt={};u(Yt,{get:()=>vi,getAll:()=>Si,patch:()=>Oi,pause:()=>Pi,remove:()=>Ti,resume:()=>Ai});var Si=function(e,t){return n({service:A,resource_server:h[A],path:"/jobs",method:"GET"},e,t)},vi=function(e,t,r){return n({service:A,resource_server:h[A],path:`/jobs/${e}`,method:"GET"},t,r)},Oi=function(e,t,r){return n({service:A,resource_server:h[A],path:`/jobs/${e}`,method:"PATCH"},t,r)},Pi=function(e,t,r){return n({service:A,resource_server:h[A],path:`/jobs/${e}/pause`,method:"POST"},t,r)},Ai=function(e,t,r){return n({service:A,resource_server:h[A],path:`/jobs/${e}/resume`,method:"POST"},t,r)},Ti=function(e,t,r){return n({service:A,resource_server:h[A],path:`/jobs/${e}`,method:"DELETE"},t,r)};var Ri=he;var Qt={};u(Qt,{CONFIG:()=>ki,endpoints:()=>Wt});var Wt={};u(Wt,{get:()=>bi,getAll:()=>Ei,getStatus:()=>xi,remove:()=>Ii,update:()=>Di});var Ei=function(e,t){return n({service:w,scope:H.ALL,path:"/v2/endpoints",method:"GET"},e,t)},bi=function(e,t,r){return n({service:w,scope:H.ALL,path:`/v2/endpoints/${e}`,method:"GET"},t,r)},xi=function(e,t,r){return n({service:w,scope:H.ALL,path:`/v2/endpoints/${e}/status`},t,r)},Di=function(e,t,r){return n({service:w,scope:H.ALL,path:`/v3/endpoints/${e}`,method:"PUT"},t,r)},Ii=function(e,t,r){return n({service:w,scope:H.ALL,path:`/v2/endpoints/${e}`,method:"DELETE"},t,r)};var ki=ge;var Xt={};u(Xt,{HOSTS:()=>Lr,host:()=>Nr,url:()=>qr,urlFor:()=>Ci});var Lr={integration:"app.integration.globuscs.info",sandbox:"app.sandbox.globuscs.info",test:"app.test.globuscs.info",staging:"app.staging.globuscs.info",preview:"app.preview.globus.org",production:"app.globus.org"};function Nr(e=K()){return Lr[e]}function qr(e,t){return new URL(e||"",`https://${Nr(t?.environment)}`)}var wi={TASK:"/activity/%s/overview",COLLECTION:"/file-manager/collections/%s/overview",ENDPOINT:"/file-manager/collections/%s/overview"};function Ci(e,t,r){let o=wi[e].replace(/%s/g,t?.join("/")||"");return qr(o,r)}return Qr(Mi);})();
3
3
  //# sourceMappingURL=globus.production.js.map