@globus/sdk 6.1.0 → 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.
- package/dist/cjs/core/authorization/index.js +1 -1
- package/dist/cjs/core/authorization/index.js.map +1 -1
- package/dist/cjs/core/info/index.js +1 -1
- package/dist/cjs/core/info/index.js.map +1 -1
- package/dist/cjs/index.js +246 -120
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/services/globus-connect-server/client.js +1 -1
- package/dist/cjs/services/globus-connect-server/client.js.map +1 -1
- package/dist/esm/core/info/version.d.ts +1 -1
- package/dist/esm/core/info/version.js +1 -1
- package/dist/esm/open-api/types/compute.d.ts +356 -88
- package/dist/esm/open-api/types/compute.d.ts.map +1 -1
- package/dist/esm/open-api/types/flows.d.ts +210 -262
- package/dist/esm/open-api/types/flows.d.ts.map +1 -1
- package/dist/esm/open-api/types/gcs/v5.4.d.ts +2536 -2276
- package/dist/esm/open-api/types/gcs/v5.4.d.ts.map +1 -1
- package/dist/esm/open-api/types/search.d.ts +131 -65
- package/dist/esm/open-api/types/search.d.ts.map +1 -1
- package/dist/esm/open-api/types/timers.d.ts +12 -6
- package/dist/esm/open-api/types/timers.d.ts.map +1 -1
- package/dist/esm/open-api/types/transfer.d.ts +798 -0
- package/dist/esm/open-api/types/transfer.d.ts.map +1 -0
- package/dist/esm/open-api/types/transfer.js +2 -0
- package/dist/esm/open-api/types/transfer.js.map +1 -0
- package/dist/esm/package.json +1 -1
- package/dist/esm/services/compute/index.d.ts +1 -1
- package/dist/esm/services/compute/index.js +1 -1
- package/dist/esm/services/globus-connect-server/client.d.ts +4 -4
- package/dist/esm/services/globus-connect-server/client.d.ts.map +1 -1
- package/dist/esm/services/search/service/query.d.ts +2 -5
- package/dist/esm/services/search/service/query.d.ts.map +1 -1
- package/dist/esm/services/search/service/query.js.map +1 -1
- package/dist/esm/services/transfer/index.d.ts +2 -0
- package/dist/esm/services/transfer/index.d.ts.map +1 -1
- package/dist/esm/services/transfer/index.js +2 -0
- package/dist/esm/services/transfer/index.js.map +1 -1
- package/dist/esm/services/transfer/service/endpoint-search.d.ts +5 -3
- package/dist/esm/services/transfer/service/endpoint-search.d.ts.map +1 -1
- package/dist/esm/services/transfer/service/endpoint-search.js.map +1 -1
- package/dist/esm/services/transfer/service/stream-access-point.d.ts +23 -0
- package/dist/esm/services/transfer/service/stream-access-point.d.ts.map +1 -0
- package/dist/esm/services/transfer/service/stream-access-point.js +26 -0
- package/dist/esm/services/transfer/service/stream-access-point.js.map +1 -0
- package/dist/esm/services/transfer/service/tunnel.d.ts +75 -0
- package/dist/esm/services/transfer/service/tunnel.d.ts.map +1 -0
- package/dist/esm/services/transfer/service/tunnel.js +80 -0
- package/dist/esm/services/transfer/service/tunnel.js.map +1 -0
- package/dist/umd/globus.production.js +2 -2
- package/dist/umd/globus.production.js.map +4 -4
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var globus=(()=>{var
|
|
2
|
-
`)===0?g.substr(1,g.length):g}).forEach(function(g){var P=g.split(":"),m=P.shift().trim();if(m){var pe=P.join(":").trim();try{a.append(m,pe)}catch(De){console.warn("Response "+De.message)}}}),a}Xt.call(q.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)}Xt.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 jr=[301,302,303,307,308];M.redirect=function(s,a){if(jr.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 g=Error(a);this.stack=g.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function xe(s,a){return new Promise(function(l,g){var P=new q(s,a);if(P.signal&&P.signal.aborted)return g(new r.DOMException("Aborted","AbortError"));var m=new XMLHttpRequest;function pe(){m.abort()}m.onload=function(){var D={statusText:m.statusText,headers:qr(m.getAllResponseHeaders()||"")};P.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(){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 De(D){try{return D===""&&o.location.href?o.location.href:D}catch{return D}}if(m.open(P.method,De(P.url),!0),P.credentials==="include"?m.withCredentials=!0:P.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 Zt=[];Object.getOwnPropertyNames(a.headers).forEach(function(D){Zt.push(R(D)),m.setRequestHeader(D,L(a.headers[D]))}),P.headers.forEach(function(D,J){Zt.indexOf(J)===-1&&m.setRequestHeader(J,D)})}else P.headers.forEach(function(D,J){m.setRequestHeader(J,D)});P.signal&&(P.signal.addEventListener("abort",pe),m.onreadystatechange=function(){m.readyState===4&&P.signal.removeEventListener("abort",pe)}),m.send(typeof P._bodyInit>"u"?null:P._bodyInit)})}return xe.polyfill=!0,o.fetch||(o.fetch=xe,o.Headers=S,o.Request=q,o.Response=M),r.Headers=S,r.Request=q,r.Response=M,r.fetch=xe,r})({})})(Se);Se.fetch.ponyfill=!0;delete Se.fetch.polyfill;var K=ye.fetch?ye:Se;G=K.fetch;G.default=K.fetch;G.fetch=K.fetch;G.Headers=K.Headers;G.Request=K.Request;G.Response=K.Response;mr.exports=G});var Pi={};u(Pi,{auth:()=>Ze,authorization:()=>rt,compute:()=>Vt,errors:()=>He,flows:()=>wt,gcs:()=>$t,groups:()=>Dt,info:()=>we,logger:()=>Me,request:()=>n,search:()=>Rt,timers:()=>zt,transfer:()=>St,webapp:()=>Kt});var we={};u(we,{CLIENT_INFO:()=>ir,VERSION:()=>sr,addClientInfo:()=>Qr,getClientInfo:()=>ar,getClientInfoRequestHeaders:()=>ke});var tr="X-Globus-Client-Info",Vr=!0;function rr(){return Vr}var Kr=";",Wr=",";function or(e){return(Array.isArray(e)?e:[e]).map(r=>Object.entries(r).map(([o,i])=>`${o}=${i}`).join(Wr)).join(Kr)}var nr="6.1.0";var sr=nr,ir={product:"javascript-sdk",version:sr},Ie=[ir];function Qr(e){Ie=Ie.concat(e)}function ar(){return or(Ie)}function ke(){return rr()?{[tr]:ar()}:{}}var Me={};u(Me,{log:()=>b,setLogLevel:()=>Zr,setLogger:()=>Xr});var Ce=["debug","info","warn","error"],ue,pr=Ce.indexOf("error");function Xr(e){ue=e}function Zr(e){pr=Ce.indexOf(e)}function b(e,...t){if(!ue||Ce.indexOf(e)<pr)return;(ue[e]??ue.log)(...t)}var rt={};u(rt,{AuthorizationManager:()=>ie,create:()=>Eo});var $=class extends Error{};$.prototype.name="InvalidTokenError";function eo(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 to(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 eo(t)}catch{return atob(t)}}function cr(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=to(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 Ze={};u(Ze,{CONFIG:()=>Xe,getAuthorizationEndpoint:()=>oe,getTokenEndpoint:()=>Oo,identities:()=>Ve,isGlobusAuthTokenResponse:()=>Q,isRefreshToken:()=>te,isToken:()=>W,oauth2:()=>F,utils:()=>Qe});var ge={};u(ge,{HOSTS:()=>Ue,ID:()=>T,RESOURCE_SERVERS:()=>y,SCOPES:()=>Y});var de={};u(de,{HOSTS:()=>Le,ID:()=>p,SCOPES:()=>c});var p="TRANSFER",c={ALL:"urn:globus:auth:scope:transfer.api.globus.org:all"},Le={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 le={};u(le,{HOSTS:()=>Ne,ID:()=>O,SCOPES:()=>I});var O="FLOWS",Ne={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 me={};u(me,{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 he={};u(he,{HOSTS:()=>qe,ID:()=>E,SCOPES:()=>ro});var E="GROUPS",qe={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"},ro={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 _e={};u(_e,{HOSTS:()=>je,ID:()=>v,SCOPES:()=>x});var v="SEARCH",je={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 fe={};u(fe,{HOSTS:()=>Ge,ID:()=>w,SCOPES:()=>H});var w="COMPUTE",Ge={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",Ue={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"},y={[T]:"auth.globus.org",[p]:"transfer.api.globus.org",[O]:"flows.globus.org",[E]:"groups.api.globus.org",[v]:"search.api.globus.org",[A]:"524230d7-ea86-4a52-8312-86065a9e0417",[w]:"funcx_service"};var He={};u(He,{EnvironmentConfigurationError:()=>X,isAuthorizationRequirementsError:()=>Z,isConsentRequiredError:()=>Je,isErrorWellFormed:()=>ur,toAuthorizationQueryParams:()=>$e});var X=class extends Error{name="EnvironmentConfigurationError";constructor(t,r){super(),this.message=`Invalid configuration value provided for ${t} (${r}).`}};function ur(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e}function Je(e){return ur(e)&&e.code==="ConsentRequired"&&"required_scopes"in e&&Array.isArray(e.required_scopes)}var oo=["required_scopes"];function $e(e){let t={scope:e.authorization_parameters.required_scopes?.join(" "),...e.authorization_parameters};return Object.entries(t).reduce((r,[o,i])=>{if(oo.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 Z(e){return typeof e=="object"&&e!==null&&"authorization_parameters"in e&&typeof e.authorization_parameters=="object"&&e.authorization_parameters!==null}function no(){return typeof window<"u"?window:process}function so(e){return typeof window==typeof e}function Be(e,t){let r=no(),o;return so(r)?o=r:o=r.env,e in o?o[e]:t}var dr={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"},j={[T]:T,[p]:p,[O]:O,[E]:E,[v]:v,[A]:A,[w]:w},io={[T]:Ue,[p]:Le,[O]:Ne,[E]:qe,[v]:je,[A]:Fe,[w]:Ge};function ze(e){let t=Be("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 V(){let e=ze(),t=Be("GLOBUS_SDK_ENVIRONMENT",e?.environment??dr.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(dr).includes(t))throw new X("GLOBUS_SDK_ENVIRONMENT",t);return t}function ao(e,t=V()){return io[e][t]}function lr(e,t=V()){let r=ao(e,t);return Be(`GLOBUS_SDK_SERVICE_URL_${e}`,r?`https://${r}`:void 0)}function po(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 co(e,t="",r=V()){let o=lr(e,r);return new URL(t,o)}function ee(e,t,r,o){let i;return typeof e=="object"?i=new URL(t,e.host):i=co(e,t,o?.environment),r&&r.search&&(i.search=po(r.search)),i.toString()}var Ve={};u(Ve,{consents:()=>Ye,get:()=>lo,getAll:()=>mo});var _r=zr(hr());async function n(e,t,r){let o=ze(r),i=o?.fetch?.options||{},d={...ke(),...t?.headers,...i.headers},_=t?.manager||o?.manager,f;if(e.resource_server&&_&&(f=_.tokens.getByResourceServer(e.resource_server),f&&(d.Authorization=`Bearer ${f.access_token}`)),e.scope&&_&&(typeof e.service=="string"||"endpoint_id"in e.service)){let U=typeof e.service=="string"?y[e.service]:e.service.endpoint_id;f=_.tokens.getByResourceServer(U),f&&(d.Authorization=`Bearer ${f.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=ee(e.service,e.path,{search:t?.query},o),C={method:e.method,body:R,...i,headers:d},S=_r.default;if(i?.__callable&&(S=i.__callable.bind(this),delete C.__callable),e.preventRetry||!_||!f||!te(f))return S(L,C);let N=await S(L,C);if(N.ok)return N;let z;try{z=Z(await N.clone().json())}catch{z=!1}if(N.status===401&&!z){let U=await _.refreshToken(f);return U?S(L,{...C,headers:{...C.headers,Authorization:`Bearer ${U.access_token}`}}):N}return N}var Ye={};u(Ye,{getAll:()=>uo});var uo=function(e,t={},r){return n({service:T,scope:Y.VIEW_IDENTITIES,path:`/v2/api/identities/${e}/consents`},t,r)};var lo=function(e,t={},r){return n({service:T,scope:Y.VIEW_IDENTITIES,path:`/v2/api/identities/${e}`},t,r)},mo=function(e={},t){return n({service:T,scope:Y.VIEW_IDENTITIES,path:"/v2/api/identities"},e,t)};var F={};u(F,{token:()=>Ke,userinfo:()=>vo});var Ke={};u(Ke,{exchange:()=>_o,introspect:()=>fo,refresh:()=>yo,revoke:()=>go,token:()=>fr,validate:()=>So});function ho(e){return new URLSearchParams(e)}function re(e){return{...e,body:e.payload?ho(e.payload):void 0,headers:{...e?.headers||{},Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}}var fr=function(e={},t){return n({service:T,scope:void 0,path:"/v2/oauth2/token",method:"POST",preventRetry:!0},re(e),t)},_o=fr,fo=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},re(e),t)},go=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},re(e),t)},yo=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},re(e),t)},So=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},re(e),t)};var vo=function(e,t){return n({service:T,scope:void 0,path:"/v2/oauth2/userinfo",method:"GET"},e,t)};var Qe={};u(Qe,{hasConsentForScope:()=>Po,splitScopeString:()=>We,toScopeTree:()=>yr});function We(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 gr(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),_=t.slice(i+1,-1);return o=We(_).map(gr),{scope:d,atomically_revocable:r,children:o}}function yr(e){return We(e).map(gr)}function Po(e,t){let r=yr(t);function o(i,d){let _=e.find(f=>f.scope_name===i.scope&&(d?f.dependency_path.join(",")===[...d,f.id].join(","):f.dependency_path.length===1));return _?i.children.length?i.children.every(f=>o(f,d?[...d,_.id]:[_.id])):_.status==="approved":!1}return r.every(i=>o(i))}var Xe=ge;function oe(){return ee(T,"/v2/oauth2/authorize")}function Oo(){return ee(T,"/v2/oauth2/token")}function W(e){return typeof e=="object"&&e!==null&&"access_token"in e}function te(e){return W(e)&&e!==null&&"refresh_token"in e}function Q(e){return W(e)&&e!==null&&"resource_server"in e}var ne=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 tt(){return"webcrypto"in globalThis.crypto?globalThis.crypto.webcrypto:globalThis.crypto}var Ao=e=>btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");async function To(e){let t=await tt().subtle.digest("SHA-256",new TextEncoder().encode(e));return String.fromCharCode(...new Uint8Array(t))}var et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Sr=`${et}-._~`;function Oe(){return Array.from(tt().getRandomValues(new Uint8Array(43))).map(e=>Sr[e%Sr.length]).join("")}async function Ae(e){let t=await To(e);return Ao(t)}function Te(){return Array.from(tt().getRandomValues(new Uint8Array(16))).map(e=>et[e%et.length]).join("")}var ve={PKCE_STATE:"pkce_state",PKCE_CODE_VERIFIER:"pkce_code_verifier"},k={getKey(e){return e==="state"?ve.PKCE_STATE:ve.PKCE_CODE_VERIFIER},get:e=>sessionStorage.getItem(k.getKey(e)),set:(e,t)=>sessionStorage.setItem(k.getKey(e),t),reset:()=>{sessionStorage.removeItem(ve.PKCE_STATE),sessionStorage.removeItem(ve.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=Pe();async send(){let t=Oe(),r=await Ae(t),o=this.#e.params?.state??Te();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"),_=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(!_)throw new Error("Invalid Code Verifier");let f={code:i,client_id:this.#e.client,code_verifier:_,redirect_uri:this.#e.redirect,grant_type:"authorization_code"},R=await(await F.token.exchange({query:t.includeConsentedScopes?{include_consented_scopes:!0}:void 0,payload:f})).json();return t.shouldReplace&&(o.delete("code"),o.delete("state"),r.search=o.toString(),window.location.replace(r)),R}};var Ee=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);W(i)&&(o=i)}catch{}return o}#t(t){let r=Xe.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(W)}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 se=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 vr="globus-sdk",be=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=Oe(),r=await Ae(t),o=this.#e.params?.state??Te();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 _=new Promise(f=>{window.addEventListener("message",async R=>{let{data:L}=R;if(R.origin!==window.location.origin||L?.source!==vr)return;this.#r?.close();let C=await this.#t(L.url);f(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(),_}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"),_=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(!_)throw new Error("Invalid Code Verifier");let f={code:i,client_id:this.#e.client,code_verifier:_,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:vr,url:window.location.href},window.location.origin)}};var Ro={redirect:Re,popup:be},Pr={useRefreshTokens:!1,defaultScopes:"openid profile email",transport:"redirect"},Or={execute:!0,additionalParams:void 0},ie=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 ne("authenticated"),revoke:new ne("revoke")};constructor(t){if(!t.client)throw new Error("You must provide a `client` for your application.");let r=t.defaultScopes===!1?"":t.defaultScopes??Pr.defaultScopes;this.configuration={...Pr,...t,scopes:[t.scopes?t.scopes:"",r].filter(o=>o.length).join(" ")},this.storage=t.storage||new se,this.configuration.events&&Object.entries(this.configuration.events).forEach(([o,i])=>{o in this.events&&this.events[o].addListener(i)}),this.tokens=new Ee({manager:this}),this.#t()}get storageKeyPrefix(){return`${this.configuration.client}:`}get user(){let t=this.getGlobusAuthToken();return t&&t.id_token?cr(t.id_token):null}async refreshTokens(){b("debug","AuthorizationManager.refreshTokens");let t=await Promise.allSettled(this.tokens.getAll().map(r=>te(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 F.token.refresh({payload:{client_id:this.configuration.client,refresh_token:t.refresh_token,grant_type:"refresh_token"}})).json();if(Q(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}${y.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}#n(t){return`${t}${this.configuration.useRefreshTokens?" offline_access":""}`}#o(t){let{scopes:r,...o}=t??{},i=Ro[this.configuration.transport||"redirect"],d=this.#n(r??(this.configuration.scopes||""));return this.storage instanceof se&&(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.#o({params:t?.additionalParams}).send();return Q(o)&&this.addTokenResponse(o),o}async prompt(t){b("debug","AuthorizationManager.prompt");let o=await this.#o(t).send();return Q(o)&&this.addTokenResponse(o),o}async handleCodeRedirect(t={shouldReplace:!0,additionalParams:{}}){b("debug","AuthorizationManager.handleCodeRedirect");let r=await this.#o({params:t?.additionalParams}).getToken({shouldReplace:t?.shouldReplace,includeConsentedScopes:t?.includeConsentedScopes});return Q(r)&&(b("debug",`AuthorizationManager.handleCodeRedirect | response=${JSON.stringify(r)}`),this.addTokenResponse(r)),r}async handleErrorResponse(t,r){let o=typeof r=="boolean"?{...Or,execute:r}:{...Or,...r};b("debug",`AuthorizationManager.handleErrorResponse | response=${JSON.stringify(t)} execute=${o.execute}`);let i=async()=>{};return Z(t)&&(b("debug","AuthorizationManager.handleErrorResponse | error=AuthorizationRequirementsError"),i=async()=>{await this.handleAuthorizationRequirementsError(t,{additionalParams:o.additionalParams})}),Je(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.#o({params:{prompt:"login",...$e(t),...r?.additionalParams}}),await this.#e.send()}async handleConsentRequiredError(t,r){this.#e=this.#o({scopes:this.#n(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}`),F.token.revoke({payload:{client_id:this.configuration.client,token:t.access_token}})}};function Eo(e){return new ie(e)}var St={};u(St,{CONFIG:()=>kn,access:()=>at,collectionBookmarks:()=>ct,endpoint:()=>st,endpointManager:()=>mt,endpointSearch:()=>Ar,fileOperations:()=>ot,roles:()=>pt,task:()=>it,taskSubmission:()=>nt,utils:()=>yt});var Ar=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:()=>bo,mkdir:()=>xo,rename:()=>Do,stat:()=>ko,symlink:()=>Io});function B(e){return e==="GET"?{}:{"Content-Type":"application/json"}}var bo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/ls`},t,r)},xo=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)},Do=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)},Io=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)},ko=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/operation/endpoint/${e}/stat`},t,r)};var nt={};u(nt,{submissionId:()=>Mo,submitDelete:()=>wo,submitTransfer:()=>Co});var wo=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)},Co=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)},Mo=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/submission_id"},e,t)};var st={};u(st,{create:()=>No,get:()=>Lo,remove:()=>qo,update:()=>Fo});var Lo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`},t,r)},No=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)},Fo=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)},qo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}`,method:"DELETE"},t,r)};var it={};u(it,{cancel:()=>Jo,get:()=>Go,getAll:()=>jo,getEventList:()=>Ho,getPauseInfo:()=>Yo,getSkippedErrors:()=>zo,getSuccessfulTransfers:()=>Bo,remove:()=>$o,update:()=>Uo});var jo=function(e={},t){return n({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},Go=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}`},t,r)},Uo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}`,method:"PUT"},t,r)},Jo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/cancel`,method:"POST"},t,r)},$o=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/remove`,method:"POST"},t,r)},Ho=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/event_list`},t,r)},Bo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/successful_transfers`},t,r)},zo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/skipped_errors`},t,r)},Yo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/task/${e}/pause_info`},t,r)};var at={};u(at,{create:()=>Ko,get:()=>Wo,getAll:()=>Vo,remove:()=>Xo,update:()=>Qo});var Vo=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access_list`},t,r)},Ko=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access`,method:"POST"},t,r)},Wo=function({endpoint_xid:e,id:t},r,o){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/access/${t}`},r,o)},Qo=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)},Xo=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 pt={};u(pt,{create:()=>tn,get:()=>en,getAll:()=>Zo,remove:()=>rn});var Zo=function(e,t={},r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role_list`},t,r)},en=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)},tn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint/${e}/role`,method:"POST"},t,r)},rn=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 ct={};u(ct,{create:()=>nn,get:()=>sn,getAll:()=>on,remove:()=>pn,update:()=>an});var on=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/bookmark_list"},e,t)},nn=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/bookmark",method:"POST"},e,t)},sn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`},t,r)},an=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"PUT"},t,r)},pn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/bookmark/${e}`,method:"DELETE"},t,r)};var mt={};u(mt,{endpoint:()=>ut,pauseRule:()=>dt,task:()=>lt});var ut={};u(ut,{get:()=>cn,getAccessList:()=>dn,getHostedEndpoints:()=>un,getMonitoredEndpoints:()=>ln});var cn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}`},t,r)},un=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/hosted_endpoint_list`},t,r)},dn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/endpoint/${e}/access_list`},t,r)},ln=function(e={},t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/monitored_endpoints"},e,t)};var dt={};u(dt,{create:()=>hn,get:()=>_n,getAll:()=>mn,remove:()=>gn,update:()=>fn});var mn=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule_list"},e,t)},hn=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/pause_rule",method:"POST"},e,t)},_n=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`},t,r)},fn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"PUT"},t,r)},gn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/pause_rule/${e}`,method:"DELETE"},t,r)};var lt={};u(lt,{cancel:()=>vn,get:()=>Sn,getAdminCancel:()=>Pn,getAll:()=>yn,getEventList:()=>On,getPauseInfo:()=>bn,getSkippedErrors:()=>Tn,getSuccessfulTransfers:()=>An,pause:()=>Rn,resume:()=>En});var yn=function(e={},t){return n({service:p,scope:c.ALL,path:"/v0.10/task_list"},e,t)},Sn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}`},t,r)},vn=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_cancel",method:"POST"},e,t)},Pn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/admin_cancel/${e}`,method:"POST"},t,r)},On=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/event_list`},t,r)},An=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/successful_transfers`},t,r)},Tn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/skipped_errors`},t,r)},Rn=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_pause",method:"POST"},e,t)},En=function(e,t){return n({service:p,scope:c.ALL,path:"/v0.10/endpoint_manager/admin_resume",method:"POST"},e,t)},bn=function(e,t,r){return n({service:p,scope:c.ALL,path:`/v0.10/endpoint_manager/task/${e}/pause_info`},t,r)};var yt={};u(yt,{GLOBUS_DNS_DOMAINS:()=>Er,getDomainFromEndpoint:()=>In,isDirectory:()=>xn,isFileDocument:()=>Rr,isGlobusHostname:()=>br,readableBytes:()=>Dn});function Rr(e){return typeof e=="object"&&e!==null&&"DATA_TYPE"in e&&e.DATA_TYPE==="file"}function xn(e){return Rr(e)&&e.type==="dir"}var ht=1e3,_t=ht*1e3,ft=_t*1e3,gt=ft*1e3,Tr=gt*1e3;function Dn(e,t=2){let r="B",o=1;if(e<ht)return`${e} ${r}`;e<_t?(r="KB",o=ht):e<ft?(r="MB",o=_t):e<gt?(r="GB",o=ft):e<Tr?(r="TB",o=gt):(r="PB",o=Tr);let i=e/o,[d,_]=`${i}`.split("."),f=`${d}`;if(_&&_.length){let R=_.slice(0,t);R.length&&(f=`${d}.${R}`)}return`${f} ${r}`}var Er=["dnsteam.globuscs.info","data.globus.org","dn.glob.us","gaccess.io"];function br(e){return!!Er.find(t=>e.endsWith(`.${t}`))}function In(e){let{tlsftp_server:t}=e;if(!t||typeof t!="string")return null;let{hostname:r}=new URL(t.replace("tlsftp","https"));return!br(r)&&/(?:[gm]-\w{6}.)?([\w-]+(\.[\w-]+)+)$/.exec(r)?.[1]||r||null}var kn=de;var Rt={};u(Rt,{CONFIG:()=>Bn,entry:()=>Ot,index:()=>Tt,query:()=>vt,subject:()=>Pt});var vt={};u(vt,{get:()=>wn,post:()=>Cn});var wn=function(e,t,r){return n({service:v,scope:x.SEARCH,path:`/v1/index/${e}/search`},t,r)},Cn=function(e,t,r){return n({service:v,scope:x.SEARCH,path:`/v1/index/${e}/search`,method:"POST"},t,r)};var Pt={};u(Pt,{get:()=>Mn});var Mn=function(e,t,r){return n({service:v,scope:x.SEARCH,path:`/v1/index/${e}/subject`},t,r)};var Ot={};u(Ot,{get:()=>Ln});var Ln=function(e,t,r){return n({service:v,scope:x.SEARCH,path:`/v1/index/${e}/entry`},t,r)};var Tt={};u(Tt,{create:()=>Un,get:()=>jn,getAll:()=>Gn,ingest:()=>Hn,remove:()=>Jn,reopen:()=>$n,roles:()=>At});var At={};u(At,{create:()=>Fn,getAll:()=>Nn,remove:()=>qn});var Nn=function(e,t,r){return n({service:v,scope:x.ALL,path:`/v1/index/${e}/role_list`},t,r)},Fn=function(e,t,r){return n({service:v,scope:x.ALL,path:`/v1/index/${e}/role`,method:"POST"},t,r)},qn=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 jn=function(e,t,r){return n({service:v,path:`/v1/index/${e}`},t,r)},Gn=function(e,t){return n({service:v,scope:x.ALL,path:"/v1/index_list"},e,t)},Un=function(e,t){return n({service:v,scope:x.ALL,path:"/v1/index",method:"POST"},e,t)},Jn=function(e,t,r){return n({service:v,scope:x.ALL,path:`/v1/index/${e}`,method:"DELETE"},t,r)},$n=function(e,t,r){return n({service:v,scope:x.ALL,path:`/v1/index/${e}/reopen`,method:"POST"},t,r)},Hn=function(e,t,r){return n({service:v,scope:x.ALL,path:`/v1/index/${e}/ingest`,method:"POST"},t,r)};var Bn=_e;var Dt={};u(Dt,{CONFIG:()=>ts,groups:()=>Et,membership:()=>xt,policies:()=>bt});var Et={};u(Et,{create:()=>Vn,get:()=>Yn,getMyGroups:()=>zn,getStatuses:()=>Qn,remove:()=>Kn,update:()=>Wn});var zn=function(e,t){return n({service:E,resource_server:y.GROUPS,path:"/v2/groups/my_groups"},e,t)},Yn=function(e,t,r){return n({service:E,resource_server:y.GROUPS,path:`/v2/groups/${e}`},t,r)},Vn=function(e,t){return n({service:E,resource_server:y.GROUPS,path:"/v2/groups",method:"POST"},e,t)},Kn=function(e,t,r){return n({service:E,resource_server:y.GROUPS,path:`/v2/groups/${e}`,method:"DELETE"},t,r)},Wn=function(e,t,r){return n({service:E,resource_server:y.GROUPS,path:`/v2/groups/${e}`,method:"PUT"},t,r)},Qn=function(e,t){return n({service:E,resource_server:y.GROUPS,path:"/v2/groups/statuses"},e,t)};var bt={};u(bt,{get:()=>Xn,update:()=>Zn});var Xn=function(e,t,r){return n({service:E,resource_server:y.GROUPS,path:`/v2/groups/${e}/policies`},t,r)},Zn=function(e,t,r){return n({service:E,resource_server:y.GROUPS,path:`/v2/groups/${e}/policies`,method:"PUT"},t,r)};var xt={};u(xt,{act:()=>es});var es=function(e,t,r){return n({service:E,resource_server:y.GROUPS,path:`/v2/groups/${e}`,method:"POST"},t,r)};var ts=he;var wt={};u(wt,{CONFIG:()=>fs,flows:()=>It,runs:()=>kt});var It={};u(It,{create:()=>xr,deploy:()=>as,get:()=>os,getAll:()=>rs,remove:()=>ns,run:()=>ss,update:()=>ps,validate:()=>is});var rs=function(e,t){return n({service:O,scope:I.VIEW_FLOWS,path:"/flows"},e,t)},os=function(e,t,r){return n({service:O,scope:I.VIEW_FLOWS,path:`/flows/${e}`},t,r)},ns=function(e,t,r){return n({scope:I.MANAGE_FLOWS,service:O,path:`/flows/${e}`,method:"DELETE"},t,r)},ss=function(e,t,r){return n({service:O,scope:I.VIEW_FLOWS,path:`/flows/${e}/run`,method:"POST"},t,r)},is=function(e,t){return n({service:O,scope:I.MANAGE_FLOWS,path:"/flows/validate",method:"POST"},e,t)},xr=function(e,t){return n({service:O,scope:I.MANAGE_FLOWS,path:"/flows",method:"POST"},e,t)},as=xr,ps=function(e,t,r){return n({service:O,scope:I.MANAGE_FLOWS,path:`/flows/${e}`,method:"PUT"},t,r)};var kt={};u(kt,{cancel:()=>ds,get:()=>us,getAll:()=>cs,getDefinition:()=>_s,getLog:()=>ls,remove:()=>hs,update:()=>ms});var cs=function(e={},t){return n({service:O,scope:I.RUN_MANAGE,path:"/runs"},e,t)},us=function(e,t,r){return n({service:O,scope:I.RUN_MANAGE,path:`/runs/${e}`},t,r)},ds=function(e,t,r){return n({service:O,scope:I.RUN_MANAGE,path:`/runs/${e}/cancel`,method:"POST"},t,r)},ls=function(e,t,r){return n({service:O,scope:I.RUN_MANAGE,path:`/runs/${e}/log`},t,r)},ms=function(e,t,r){return n({service:O,scope:I.RUN_MANAGE,path:`/runs/${e}`,method:"PUT"},t,r)},hs=function(e,t,r){return n({service:O,scope:I.RUN_MANAGE,path:`/runs/${e}/release`,method:"POST"},t,r)},_s=function(e,t,r){return n({service:O,scope:I.RUN_MANAGE,path:`/runs/${e}/definition`,method:"GET"},t,r)};var fs=le;var $t={};u($t,{collections:()=>Ct,endpoint:()=>Mt,getScopes:()=>ni,https:()=>Lt,nodes:()=>Nt,roles:()=>Ft,storageGateways:()=>qt,userCredentials:()=>jt,utils:()=>Jt,versioning:()=>Ut});var Ct={};u(Ct,{create:()=>vs,get:()=>ys,getAll:()=>gs,patch:()=>Os,remove:()=>Ss,resetOwnerString:()=>Ts,update:()=>Ps,updateOwnerString:()=>As});var gs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/collections"},t,r)},ys=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`},r,o)},Ss=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"DELETE"},r,o)},vs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/collections",method:"POST"},t,r)},Ps=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PUT"},r,o)},Os=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}`,method:"PATCH"},r,o)},As=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/collections/${t}/owner_string`,method:"PUT"},r,o)},Ts=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 Mt={};u(Mt,{get:()=>Rs,patch:()=>bs,resetOwnerString:()=>ks,update:()=>Es,updateOwner:()=>Ds,updateOwnerString:()=>Is,updateSubscriptionId:()=>xs});var Rs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint"},t,r)},Es=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PUT"},t,r)},bs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint",method:"PATCH"},t,r)},xs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/subscription_id",method:"PUT"},t,r)},Ds=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner",method:"PUT"},t,r)},Is=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"PUT"},t,r)},ks=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/endpoint/owner_string",method:"DELETE"},t,r)};var Lt={};u(Lt,{get:()=>ws,remove:()=>Cs,update:()=>Ms});var ws=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:t},r,o)},Cs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:t,method:"DELETE"},r,o)},Ms=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:t,method:"PUT"},r,o)};var Nt={};u(Nt,{create:()=>qs,get:()=>Ns,getAll:()=>Ls,patch:()=>Gs,remove:()=>Fs,update:()=>js});var Ls=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/nodes"},t,r)},Ns=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`},r,o)},Fs=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)},js=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PUT"},r,o)},Gs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/nodes/${t}`,method:"PATCH"},r,o)};var Ft={};u(Ft,{create:()=>Hs,get:()=>Js,getAll:()=>Us,remove:()=>$s});var Us=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/roles"},t,r)},Js=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`},r,o)},$s=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/roles/${t}`,method:"DELETE"},r,o)},Hs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/roles",method:"POST"},t,r)};var qt={};u(qt,{create:()=>Vs,get:()=>zs,getAll:()=>Bs,patch:()=>Ws,remove:()=>Ys,update:()=>Ks});var Bs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways"},t,r)},zs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`},r,o)},Ys=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"DELETE"},r,o)},Vs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/storage_gateways",method:"POST"},t,r)},Ks=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/storage_gateways/${t}`,method:"PUT"},r,o)},Ws=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:()=>ei,get:()=>Xs,getAll:()=>Qs,patch:()=>ri,remove:()=>Zs,update:()=>ti});var Qs=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials"},t,r)},Xs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`},r,o)},Zs=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"DELETE"},r,o)},ei=function(e,t,r){return n({service:e,resource_server:e.endpoint_id,path:"/api/user_credentials",method:"POST"},t,r)},ti=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PUT"},r,o)},ri=function(e,t,r,o){return n({service:e,resource_server:e.endpoint_id,path:`/api/user_credentials/${t}`,method:"PATCH"},r,o)};var Ut={};u(Ut,{info:()=>Gt});var Gt=function(e,t,r){return n({service:e,path:"/api/info"},t,r)};var Jt={};u(Jt,{getEndpointIdFromURL:()=>oi,getGCSDomainFromURL:()=>Dr});var ae="data.globus.org";function Dr(e){let{host:t}=typeof e=="string"?new URL(e):e;if(!t.endsWith(ae))return t;let[r]=t.split(`.${ae}`),o=r.split(".");return(o.length===2?[...o,ae]:[o[1],o[2],ae]).join(".")}async function oi(e){let t=typeof e=="string"?new URL(e):e;if(!t.host.endsWith(ae))return null;let i=(await(await Gt({host:`https://${Dr(t)}`})).json()).data?.filter(d=>d.DATA_TYPE.startsWith("info#"))[0];return i&&"endpoint_id"in i?i.endpoint_id:null}var Ir={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 ni(e,t){let{endpoint_id:r}=e;if(!r)throw new Error("An 'endpoint_id' is required to determine the required scopes");return t?Ir[t].replace("<ENDPOINT_ID>",r):Object.entries(Ir).reduce((o,[i,d])=>({...o,[i]:d.replace("<ENDPOINT_ID>",r)}),{})}var zt={};u(zt,{CONFIG:()=>li,jobs:()=>Bt,timer:()=>Ht});var Ht={};u(Ht,{create:()=>si});var si=function(e,t){return n({service:A,resource_server:y.TIMERS,path:"/v2/timer",method:"POST"},e,t)};var Bt={};u(Bt,{get:()=>ai,getAll:()=>ii,patch:()=>pi,pause:()=>ci,remove:()=>di,resume:()=>ui});var ii=function(e,t){return n({service:A,resource_server:y[A],path:"/jobs",method:"GET"},e,t)},ai=function(e,t,r){return n({service:A,resource_server:y[A],path:`/jobs/${e}`,method:"GET"},t,r)},pi=function(e,t,r){return n({service:A,resource_server:y[A],path:`/jobs/${e}`,method:"PATCH"},t,r)},ci=function(e,t,r){return n({service:A,resource_server:y[A],path:`/jobs/${e}/pause`,method:"POST"},t,r)},ui=function(e,t,r){return n({service:A,resource_server:y[A],path:`/jobs/${e}/resume`,method:"POST"},t,r)},di=function(e,t,r){return n({service:A,resource_server:y[A],path:`/jobs/${e}`,method:"DELETE"},t,r)};var li=me;var Vt={};u(Vt,{CONFIG:()=>yi,endpoints:()=>Yt});var Yt={};u(Yt,{get:()=>hi,getAll:()=>mi,getStatus:()=>_i,remove:()=>gi,update:()=>fi});var mi=function(e,t){return n({service:w,scope:H.ALL,path:"/v2/endpoints",method:"GET"},e,t)},hi=function(e,t,r){return n({service:w,scope:H.ALL,path:`/v2/endpoints/${e}`,method:"GET"},t,r)},_i=function(e,t,r){return n({service:w,scope:H.ALL,path:`/v2/endpoints/${e}/status`},t,r)},fi=function(e,t,r){return n({service:w,scope:H.ALL,path:`/v3/endpoints/${e}`,method:"PUT"},t,r)},gi=function(e,t,r){return n({service:w,scope:H.ALL,path:`/v2/endpoints/${e}`,method:"DELETE"},t,r)};var yi=fe;var Kt={};u(Kt,{HOSTS:()=>kr,host:()=>wr,url:()=>Cr,urlFor:()=>vi});var kr={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 wr(e=V()){return kr[e]}function Cr(e,t){return new URL(e||"",`https://${wr(t?.environment)}`)}var Si={TASK:"/activity/%s/overview",COLLECTION:"/file-manager/collections/%s/overview",ENDPOINT:"/file-manager/collections/%s/overview"};function vi(e,t,r){let o=Si[e].replace(/%s/g,t?.join("/")||"");return Cr(o,r)}return Yr(Pi);})();
|
|
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
|