@hpcc-js/comms 3.7.3 → 3.7.4
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/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.umd.cjs +1 -1
- package/dist/browser/index.umd.cjs.map +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +4 -4
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
package/dist/node/index.js
CHANGED
|
@@ -968,7 +968,7 @@ AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsC
|
|
|
968
968
|
MGclCrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVu
|
|
969
969
|
Sw==
|
|
970
970
|
-----END CERTIFICATE-----
|
|
971
|
-
`;var Qd=sn(b0(),1);var sj="@hpcc-js/comms",ij="3.7.3",oj="3.8.3";var R0=kt("comms/connection.ts");function uj(t){return"baseUrl"in t}var hq={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function cj(t){return typeof t.opts=="function"&&typeof t.send=="function"&&typeof t.clone=="function"}function On(t,e){return e===void 0||e===!0?encodeURIComponent(t):""+t}function Xi(t,e=!0,r=""){if(r&&(r+="."),typeof t!="object")return On(t,e);let n=[];for(let s in t)if(t.hasOwnProperty(s))if(t[s]instanceof Array){let i=!1;t[s].forEach((A,u)=>{typeof A=="object"?(i=!0,n.push(Xi(A,e,r+On(`${s}.${u}`,e)))):n.push(r+On(`${s}_i${u}`,e)+"="+Xi(A,e))}),i&&n.push(r+On(`${s}.itemcount`,e)+"="+t[s].length)}else typeof t[s]=="object"?t[s]&&t[s].Item instanceof Array?(n.push(Xi(t[s].Item,e,r+On(s,e))),n.push(r+On(`${s}.itemcount`,e)+"="+t[s].Item.length)):n.push(Xi(t[s],e,r+On(s,e))):t[s]!==void 0?n.push(r+On(s,e)+"="+On(t[s],e)):n.push(r+On(s,e));return n.join("&")}function dq(t){return JSON.parse(t)}function pq(t,e,r={},n="json",s){return s&&console.warn("Header attributes ignored for JSONP connections"),new Promise((i,A)=>{let u=t.timeoutSecs*1e3,c=5e3,g="jsonp_callback_"+Math.round(Math.random()*999999);window[g]=function(E){u=0,B(),i(n==="json"&&typeof E=="string"?dq(E):E)};let l=document.createElement("script"),d=ns(t.baseUrl,e);d+=d.indexOf("?")>=0?"&":"?",l.src=d+"jsonp="+g+"&"+Xi(r,t.encodeRequest),document.body.appendChild(l);let p=setInterval(function(){u<=0?clearInterval(p):(u-=c,u<=0?(clearInterval(p),R0.error("Request timeout: "+l.src),B(),A(Error("Request timeout: "+l.src))):R0.debug("Request pending ("+u/1e3+" sec): "+l.src))},c);function B(){delete window[g],document.body.removeChild(l)}})}function fq(t){return t.userID?{Authorization:`Basic ${btoa(`${t.userID}:${t.password}`)}`}:{}}var yh={};function F0(t,e,r,n,s){n={...fq(t),...n},r={credentials:yh[t.baseUrl]?"omit":"include",...r,headers:n},fetch.__setGlobalDispatcher&&fetch.__setGlobalDispatcher(fetch.__defaultAgent),t.baseUrl.indexOf("https:")===0&&(t.rejectUnauthorized===!1&&fetch.__rejectUnauthorizedAgent?fetch.__setGlobalDispatcher?fetch.__setGlobalDispatcher(fetch.__rejectUnauthorizedAgent):r.agent=fetch.__rejectUnauthorizedAgent:fetch.__trustwaveAgent&&(r.agent=fetch.__trustwaveAgent));function i(A){if(A.ok)return s==="json"?A.json():A.text();throw new Error(A.statusText)}return UI(t.timeoutSecs*1e3,fetch(ns(t.baseUrl,e),r).then(i).catch(A=>(r.credentials=yh[t.baseUrl]?"include":"omit",fetch(ns(t.baseUrl,e),r).then(i).then(u=>(yh[t.baseUrl]=!yh[t.baseUrl],u)))))}function Eq(t,e,r,n="json",s){r.upload_&&(delete r.upload_,e+="?upload_");let i;return r.abortSignal_&&(i=r.abortSignal_,delete r.abortSignal_),F0(t,e,{method:"post",body:Xi(r,t.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...s},n)}function Cq(t,e,r,n="json",s){let i;return r.abortSignal_&&(i=r.abortSignal_,delete r.abortSignal_),F0(t,`${e}?${Xi(r,t.encodeRequest)}`,{method:"get",signal:i},{...s},n)}function Bq(t,e,r,n="json",s){let i;switch(t.type){case"jsonp":i=pq(t,e,r,n,s);break;case"get":i=Cq(t,e,r,n,s);break;case"post":default:i=Eq(t,e,r,n,s);break}return i}var wh=Bq;function lj(t){let e=wh;return t&&(wh=t),e}var $C=class t{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return arguments.length===0?this._opts:(this._opts={...hq,...e},this)}send(e,r,n="json",s){return this._opts.hookSend?this._opts.hookSend(this._opts,e,r,n,wh,s):wh(this._opts,e,r,n,s)}clone(){return new t(this.opts())}},Sh=function(t){return new $C(t)};function gj(t){let e=Sh;return Sh=t,e}function Iq(t){return Object.prototype.toString.call(t)==="[object Array]"}var Zi=class extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,r,n){super("ESPException: "+n.Source),this.action=e,this.request=r,this.Source=n.Source,this.Exception=n.Exception,n.Exception.length?this.message=`${n.Exception[0].Code}: ${n.Exception[0].Message}`:this.message=""}};function Bj(t){return t instanceof Zi||t.isESPExceptions&&Array.isArray(t.Exception)}function Qq(t){return t.send!==void 0}var Ku=class t{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,r,n){this._connection=Qq(e)?e:Sh(e),this._service=r,this._version=n}service(e){return e===void 0?this._service:(this._service=e,this)}version(e){return e===void 0?this._version:(this._version=e,this)}toESPStringArray(e,r){if(Iq(e[r])){for(let n=0;n<e[r].length;++n)e[r+"_i"+n]=e[r][n];delete e[r]}return e}opts(e){return e===void 0?this._connection.opts():(this._connection.opts(e),this)}send(e,r={},n="json",s=!1,i,A){let u={...r,ver_:this._version};s&&(u.upload_=!0),i&&(u.abortSignal_=i);let c,g="json";switch(n){case"text":c=ns(this._service,e),g="text";break;case"xsd":c=ns(this._service,e+".xsd"),g="text";break;case"json2":c=ns(this._service,e+"/json"),n="json",e=e.split("/").pop();break;default:c=ns(this._service,e+".json")}return this._connection.send(c,u,g).then(l=>{if(n==="json"){let d;if(l&&l.Exceptions)throw new Zi(e,u,l.Exceptions);if(l&&(d=l[A||e+"Response"]),!d)throw new Zi(e,u,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return d}return l})}clone(){return new t(this._connection.clone(),this._service,this._version)}},Re=class{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,r,n){this._connection=new Ku(e,r,n)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};var $u;(e=>{let t;(c=>(c.Delete="Delete",c.Protect="Protect",c.Unprotect="Unprotect",c.Restore="Restore",c.SetToFailed="SetToFailed",c.Archive="Archive"))(t=e.DFUWUActions||={})})($u||={});var bh=class extends Re{constructor(e){super(e,"FileSpray","1.26")}AbortDFUWorkunit(e){return this._connection.send("AbortDFUWorkunit",e,"json",!1,void 0,"AbortDFUWorkunitResponse")}Copy(e){return this._connection.send("Copy",e,"json",!1,void 0,"CopyResponse")}CreateDFUPublisherWorkunit(e){return this._connection.send("CreateDFUPublisherWorkunit",e,"json",!1,void 0,"CreateDFUPublisherWorkunitResponse")}CreateDFUWorkunit(e){return this._connection.send("CreateDFUWorkunit",e,"json",!1,void 0,"CreateDFUWorkunitResponse")}DFUWUFile(e){return this._connection.send("DFUWUFile",e,"json",!1,void 0,"DFUWUFileResponse")}DFUWUSearch(e){return this._connection.send("DFUWUSearch",e,"json",!1,void 0,"DFUWUSearchResponse")}DFUWorkunitsAction(e){return this._connection.send("DFUWorkunitsAction",e,"json",!1,void 0,"DFUWorkunitsActionResponse")}DeleteDFUWorkunit(e){return this._connection.send("DeleteDFUWorkunit",e,"json",!1,void 0,"DeleteDFUWorkunitResponse")}DeleteDFUWorkunits(e){return this._connection.send("DeleteDFUWorkunits",e,"json",!1,void 0,"DeleteDFUWorkunitsResponse")}DeleteDropZoneFiles(e){return this._connection.send("DeleteDropZoneFiles",e,"json",!1,void 0,"DFUWorkunitsActionResponse")}Despray(e){return this._connection.send("Despray",e,"json",!1,void 0,"DesprayResponse")}DfuMonitor(e){return this._connection.send("DfuMonitor",e,"json",!1,void 0,"DfuMonitorResponse")}DropZoneFileSearch(e){return this._connection.send("DropZoneFileSearch",e,"json",!1,void 0,"DropZoneFileSearchResponse")}DropZoneFiles(e){return this._connection.send("DropZoneFiles",e,"json",!1,void 0,"DropZoneFilesResponse")}EchoDateTime(e){return this._connection.send("EchoDateTime",e,"json",!1,void 0,"EchoDateTimeResponse")}FileList(e){return this._connection.send("FileList",e,"json",!1,void 0,"FileListResponse")}GetDFUExceptions(e){return this._connection.send("GetDFUExceptions",e,"json",!1,void 0,"GetDFUExceptionsResponse")}GetDFUProgress(e){return this._connection.send("GetDFUProgress",e,"json",!1,void 0,"ProgressResponse")}GetDFUServerQueues(e){return this._connection.send("GetDFUServerQueues",e,"json",!1,void 0,"GetDFUServerQueuesResponse")}GetDFUWorkunit(e){return this._connection.send("GetDFUWorkunit",e,"json",!1,void 0,"GetDFUWorkunitResponse")}GetDFUWorkunits(e){return this._connection.send("GetDFUWorkunits",e,"json",!1,void 0,"GetDFUWorkunitsResponse")}GetRemoteTargets(e){return this._connection.send("GetRemoteTargets",e,"json",!1,void 0,"GetRemoteTargetsResponse")}GetSprayTargets(e){return this._connection.send("GetSprayTargets",e,"json",!1,void 0,"GetSprayTargetsResponse")}OpenSave(e){return this._connection.send("OpenSave",e,"json",!1,void 0,"OpenSaveResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"FileSprayPingResponse")}Rename(e){return this._connection.send("Rename",e,"json",!1,void 0,"RenameResponse")}Replicate(e){return this._connection.send("Replicate",e,"json",!1,void 0,"ReplicateResponse")}ShowResult(e){return this._connection.send("ShowResult",e,"json",!1,void 0,"ShowResultResponse")}SprayFixed(e){return this._connection.send("SprayFixed",e,"json",!1,void 0,"SprayFixedResponse")}SprayVariable(e){return this._connection.send("SprayVariable",e,"json",!1,void 0,"SprayResponse")}SubmitDFUWorkunit(e){return this._connection.send("SubmitDFUWorkunit",e,"json",!1,void 0,"SubmitDFUWorkunitResponse")}UpdateDFUWorkunit(e){return this._connection.send("UpdateDFUWorkunit",e,"json",!1,void 0,"UpdateDFUWorkunitResponse")}};var mq=(l=>(l[l.unknown=0]="unknown",l[l.scheduled=1]="scheduled",l[l.queued=2]="queued",l[l.started=3]="started",l[l.aborted=4]="aborted",l[l.failed=5]="failed",l[l.finished=6]="finished",l[l.monitoring=7]="monitoring",l[l.aborting=8]="aborting",l[l.notfound=999]="notfound",l))(mq||{}),Ki=class extends bh{DFUWUFileEx(e){return this._connection.send("DFUWUFile",e,"text")}SprayFixedEx(e){return this._connection.send("SprayFixed",e)}SprayVariableEx(e){return this._connection.send("SprayVariable",e,"json",!1,null,"SprayResponse")}DesprayEx(e){return this._connection.send("Despray",e)}UpdateDFUWorkunitEx(e){return this._connection.send("UpdateDFUWorkunit",e,"json",!1,void 0,"UpdateDFUWorkunitResponse")}};var U0;(A=>{let t;(g=>(g.User="User",g.Group="Group"))(t=A.ViewMemberType||={});let e;(p=>(p.username="username",p.fullname="fullname",p.passwordexpiration="passwordexpiration",p.employeeID="employeeID",p.employeeNumber="employeeNumber"))(e=A.UserSortBy||={});let r;(g=>(g.Name="Name",g.ManagedBy="ManagedBy"))(r=A.GroupSortBy||={});let n;(l=>(l.Any="Any",l.User="User",l.Group="Group"))(n=A.AccountTypeReq||={});let s;(g=>(g.Name="Name",g.Type="Type"))(s=A.ResourcePermissionSortBy||={});let i;(c=>c.Name="Name")(i=A.ResourceSortBy||={})})(U0||={});var Rh=class extends Re{constructor(e){super(e,"ws_access","1.17")}AccountPermissions(e){return this._connection.send("AccountPermissions",e,"json",!1,void 0,"AccountPermissionsResponse")}AccountPermissionsV2(e){return this._connection.send("AccountPermissionsV2",e,"json",!1,void 0,"AccountPermissionsV2Response")}AddUser(e){return this._connection.send("AddUser",e,"json",!1,void 0,"AddUserResponse")}AddView(e){return this._connection.send("AddView",e,"json",!1,void 0,"AddViewResponse")}AddViewColumn(e){return this._connection.send("AddViewColumn",e,"json",!1,void 0,"AddViewColumnResponse")}AddViewMember(e){return this._connection.send("AddViewMember",e,"json",!1,void 0,"AddViewMemberResponse")}ClearPermissionsCache(e){return this._connection.send("ClearPermissionsCache",e,"json",!1,void 0,"ClearPermissionsCacheResponse")}DeleteView(e){return this._connection.send("DeleteView",e,"json",!1,void 0,"DeleteViewResponse")}DeleteViewColumn(e){return this._connection.send("DeleteViewColumn",e,"json",!1,void 0,"DeleteViewColumnResponse")}DeleteViewMember(e){return this._connection.send("DeleteViewMember",e,"json",!1,void 0,"DeleteViewMemberResponse")}DisableScopeScans(e){return this._connection.send("DisableScopeScans",e,"json",!1,void 0,"DisableScopeScansResponse")}EnableScopeScans(e){return this._connection.send("EnableScopeScans",e,"json",!1,void 0,"EnableScopeScansResponse")}FilePermission(e){return this._connection.send("FilePermission",e,"json",!1,void 0,"FilePermissionResponse")}GroupAction(e){return this._connection.send("GroupAction",e,"json",!1,void 0,"GroupActionResponse")}GroupAdd(e){return this._connection.send("GroupAdd",e,"json",!1,void 0,"GroupAddResponse")}GroupEdit(e){return this._connection.send("GroupEdit",e,"json",!1,void 0,"GroupEditResponse")}GroupMemberEdit(e){return this._connection.send("GroupMemberEdit",e,"json",!1,void 0,"GroupMemberEditResponse")}GroupMemberEditInput(e){return this._connection.send("GroupMemberEditInput",e,"json",!1,void 0,"GroupMemberEditInputResponse")}GroupMemberQuery(e){return this._connection.send("GroupMemberQuery",e,"json",!1,void 0,"GroupMemberQueryResponse")}GroupQuery(e){return this._connection.send("GroupQuery",e,"json",!1,void 0,"GroupQueryResponse")}Groups(e){return this._connection.send("Groups",e,"json",!1,void 0,"GroupResponse")}PermissionAction(e){return this._connection.send("PermissionAction",e,"json",!1,void 0,"PermissionActionResponse")}Permissions(e){return this._connection.send("Permissions",e,"json",!1,void 0,"BasednsResponse")}PermissionsReset(e){return this._connection.send("PermissionsReset",e,"json",!1,void 0,"PermissionsResetResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_accessPingResponse")}QueryScopeScansEnabled(e){return this._connection.send("QueryScopeScansEnabled",e,"json",!1,void 0,"QueryScopeScansEnabledResponse")}QueryUserViewColumns(e){return this._connection.send("QueryUserViewColumns",e,"json",!1,void 0,"QueryUserViewColumnsResponse")}QueryViewColumns(e){return this._connection.send("QueryViewColumns",e,"json",!1,void 0,"QueryViewColumnsResponse")}QueryViewMembers(e){return this._connection.send("QueryViewMembers",e,"json",!1,void 0,"QueryViewMembersResponse")}QueryViews(e){return this._connection.send("QueryViews",e,"json",!1,void 0,"QueryViewsResponse")}ResourceAdd(e){return this._connection.send("ResourceAdd",e,"json",!1,void 0,"ResourceAddResponse")}ResourceDelete(e){return this._connection.send("ResourceDelete",e,"json",!1,void 0,"ResourceDeleteResponse")}ResourcePermissionQuery(e){return this._connection.send("ResourcePermissionQuery",e,"json",!1,void 0,"ResourcePermissionQueryResponse")}ResourcePermissions(e){return this._connection.send("ResourcePermissions",e,"json",!1,void 0,"ResourcePermissionsResponse")}ResourceQuery(e){return this._connection.send("ResourceQuery",e,"json",!1,void 0,"ResourceQueryResponse")}Resources(e){return this._connection.send("Resources",e,"json",!1,void 0,"ResourcesResponse")}UserAccountExport(e){return this._connection.send("UserAccountExport",e,"json",!1,void 0,"UserAccountExportResponse")}UserAction(e){return this._connection.send("UserAction",e,"json",!1,void 0,"UserActionResponse")}UserEdit(e){return this._connection.send("UserEdit",e,"json",!1,void 0,"UserEditResponse")}UserGroupEdit(e){return this._connection.send("UserGroupEdit",e,"json",!1,void 0,"UserGroupEditResponse")}UserGroupEditInput(e){return this._connection.send("UserGroupEditInput",e,"json",!1,void 0,"UserGroupEditInputResponse")}UserInfoEdit(e){return this._connection.send("UserInfoEdit",e,"json",!1,void 0,"UserInfoEditResponse")}UserInfoEditInput(e){return this._connection.send("UserInfoEditInput",e,"json",!1,void 0,"UserInfoEditInputResponse")}UserPosix(e){return this._connection.send("UserPosix",e,"json",!1,void 0,"UserPosixResponse")}UserPosixInput(e){return this._connection.send("UserPosixInput",e,"json",!1,void 0,"UserPosixInputResponse")}UserQuery(e){return this._connection.send("UserQuery",e,"json",!1,void 0,"UserQueryResponse")}UserResetPass(e){return this._connection.send("UserResetPass",e,"json",!1,void 0,"UserResetPassResponse")}UserResetPassInput(e){return this._connection.send("UserResetPassInput",e,"json",!1,void 0,"UserResetPassInputResponse")}UserSudoers(e){return this._connection.send("UserSudoers",e,"json",!1,void 0,"UserSudoersResponse")}UserSudoersInput(e){return this._connection.send("UserSudoersInput",e,"json",!1,void 0,"UserSudoersInputResponse")}Users(e){return this._connection.send("Users",e,"json",!1,void 0,"UserResponse")}};var N0=class extends Rh{};var Fh=class extends Re{constructor(e){super(e,"ws_account","1.07")}MyAccount(e){return this._connection.send("MyAccount",e,"json",!1,void 0,"MyAccountResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_accountPingResponse")}UpdateUser(e){return this._connection.send("UpdateUser",e,"json",!1,void 0,"UpdateUserResponse")}UpdateUserInput(e){return this._connection.send("UpdateUserInput",e,"json",!1,void 0,"UpdateUserInputResponse")}VerifyUser(e){return this._connection.send("VerifyUser",e,"json",!1,void 0,"VerifyUserResponse")}};var T0=class extends Fh{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(r=>{if(r.isESPExceptions&&r.Exception.some(n=>n.Code===20043))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:r.Exception}};throw r})}};var Uh=class extends Re{constructor(e){super(e,"WsCloud","1.02")}GetPODs(e){return this._connection.send("GetPODs",e,"json",!1,void 0,"GetPODsResponse")}GetServices(e){return this._connection.send("GetServices",e,"json",!1,void 0,"GetServicesResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsCloudPingResponse")}};var Dq=kt("@hpcc-js/comms/services/wsCloud.ts");function yq(t){return t?.Pods!==void 0}function wq(t){return t.spec?.containers?.reduce((e,r)=>(r.ports?.forEach(n=>{e.push({ContainerPort:n.containerPort,Name:n.name,Protocol:n.protocol})}),e),[])??[]}function Sq(t){return t.filter(e=>{let r=e?.metadata?.labels??{};return r.hasOwnProperty("app.kubernetes.io/part-of")&&r["app.kubernetes.io/part-of"]==="HPCC-Platform"}).map(e=>{let r=new Date(e.metadata?.creationTimestamp);return{Name:e.metadata.name,Status:e.status?.phase,CreationTimestamp:r.toISOString(),ContainerName:e.status?.containerStatuses?.reduce((n,s)=>(s.name&&n.push(s.name),n),[]).join(", ")??"",ContainerCount:e.spec?.containers?.length??0,ContainerReadyCount:e.status?.containerStatuses?.reduce((n,s)=>n+(s.ready?1:0),0),ContainerRestartCount:e.status?.containerStatuses?.reduce((n,s)=>n+s.restartCount,0),Ports:{Port:wq(e)}}})}var M0=class extends Uh{getPODs(){return super.GetPODs({}).then(e=>{if(yq(e))return e.Pods?.Pod??[];try{let r=typeof e.Result=="string"?JSON.parse(e.Result):e.Result;return Sq(r?.items??[])}catch(r){return Dq.error(`Error parsing V1Pods json '${r instanceof Error?r.message:String(r)}'`),[]}})}};var x0=class{_connection;constructor(e){this._connection=new Ku(e,"ws_codesign","1.1")}connectionOptions(){return this._connection.opts()}ListUserIDs(e){return this._connection.send("ListUserIDs",e).then(r=>r.UserIDs.Item).catch(r=>[])}Sign(e){return this._connection.send("Sign",{SigningMethod:"gpg",...e})}Verify(e){return this._connection.send("Verify",e)}};var Nh=class extends Re{constructor(e){super(e,"WSDali","1.07")}Add(e){return this._connection.send("Add",e,"json",!1,void 0,"ResultResponse")}ClearTraceTransactions(e){return this._connection.send("ClearTraceTransactions",e,"json",!1,void 0,"ResultResponse")}Count(e){return this._connection.send("Count",e,"json",!1,void 0,"CountResponse")}DFSCheck(e){return this._connection.send("DFSCheck",e,"json",!1,void 0,"ResultResponse")}DFSExists(e){return this._connection.send("DFSExists",e,"json",!1,void 0,"BooleanResponse")}DFSLS(e){return this._connection.send("DFSLS",e,"json",!1,void 0,"ResultResponse")}Delete(e){return this._connection.send("Delete",e,"json",!1,void 0,"ResultResponse")}DisconnectClientConnection(e){return this._connection.send("DisconnectClientConnection",e,"json",!1,void 0,"ResultResponse")}GetClients(e){return this._connection.send("GetClients",e,"json",!1,void 0,"ResultResponse")}GetConnections(e){return this._connection.send("GetConnections",e,"json",!1,void 0,"ResultResponse")}GetDFSCSV(e){return this._connection.send("GetDFSCSV",e,"json",!1,void 0,"ResultResponse")}GetDFSMap(e){return this._connection.send("GetDFSMap",e,"json",!1,void 0,"ResultResponse")}GetDFSParents(e){return this._connection.send("GetDFSParents",e,"json",!1,void 0,"ResultResponse")}GetLogicalFile(e){return this._connection.send("GetLogicalFile",e,"json",!1,void 0,"ResultResponse")}GetLogicalFilePart(e){return this._connection.send("GetLogicalFilePart",e,"json",!1,void 0,"ResultResponse")}GetProtectedList(e){return this._connection.send("GetProtectedList",e,"json",!1,void 0,"ResultResponse")}GetSDSStats(e){return this._connection.send("GetSDSStats",e,"json",!1,void 0,"ResultResponse")}GetSDSSubscribers(e){return this._connection.send("GetSDSSubscribers",e,"json",!1,void 0,"ResultResponse")}GetValue(e){return this._connection.send("GetValue",e,"json",!1,void 0,"ResultResponse")}Import(e){return this._connection.send("Import",e,"json",!1,void 0,"ResultResponse")}ListSDSLocks(e){return this._connection.send("ListSDSLocks",e,"json",!1,void 0,"ResultResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WSDaliPingResponse")}SaveSDSStore(e){return this._connection.send("SaveSDSStore",e,"json",!1,void 0,"ResultResponse")}SetLogicalFilePartAttr(e){return this._connection.send("SetLogicalFilePartAttr",e,"json",!1,void 0,"ResultResponse")}SetProtected(e){return this._connection.send("SetProtected",e,"json",!1,void 0,"ResultResponse")}SetTraceSlowTransactions(e){return this._connection.send("SetTraceSlowTransactions",e,"json",!1,void 0,"ResultResponse")}SetTraceTransactions(e){return this._connection.send("SetTraceTransactions",e,"json",!1,void 0,"ResultResponse")}SetUnprotected(e){return this._connection.send("SetUnprotected",e,"json",!1,void 0,"ResultResponse")}SetValue(e){return this._connection.send("SetValue",e,"json",!1,void 0,"ResultResponse")}UnlockSDSLock(e){return this._connection.send("UnlockSDSLock",e,"json",!1,void 0,"ResultResponse")}};var k0=class extends Nh{};var OA;(u=>{let t;(p=>(p.Delete="Delete",p.AddToSuperfile="Add To Superfile",p.ChangeProtection="Change Protection",p.ChangeRestriction="Change Restriction"))(t=u.DFUArrayActions||={});let e;(p=>(p[p.NoChange=0]="NoChange",p[p.Protect=1]="Protect",p[p.Unprotect=2]="Unprotect",p[p.UnprotectAll=3]="UnprotectAll"))(e=u.DFUChangeProtection||={});let r;(d=>(d[d.NoChange=0]="NoChange",d[d.Restrict=1]="Restrict",d[d.Unrestricted=2]="Unrestricted"))(r=u.DFUChangeRestriction||={});let n;(l=>(l.xml="xml",l.def="def"))(n=u.DFUDefFileFormat||={});let s;(d=>(d.Token="Token",d.Engine="Engine",d.External="External"))(s=u.FileAccessRole||={});let i;(B=>(B.None="None",B.Access="Access",B.Read="Read",B.Write="Write",B.Full="Full"))(i=u.SecAccessType||={});let A;(D=>(D.Flat="Flat",D.Index="Index",D.Xml="Xml",D.Csv="Csv",D.Json="Json",D.IndexLocal="IndexLocal",D.IndexPartitioned="IndexPartitioned",D.Unset="Unset"))(A=u.DFUFileType||={})})(OA||={});var Th=class extends Re{constructor(e){super(e,"WsDfu","1.65")}Add(e){return this._connection.send("Add",e,"json",!1,void 0,"AddResponse")}AddRemote(e){return this._connection.send("AddRemote",e,"json",!1,void 0,"AddRemoteResponse")}AddtoSuperfile(e){return this._connection.send("AddtoSuperfile",e,"json",!1,void 0,"AddtoSuperfileResponse")}DFUArrayAction(e){return this._connection.send("DFUArrayAction",e,"json",!1,void 0,"DFUArrayActionResponse")}DFUBrowseData(e){return this._connection.send("DFUBrowseData",e,"json",!1,void 0,"DFUBrowseDataResponse")}DFUDefFile(e){return this._connection.send("DFUDefFile",e,"json",!1,void 0,"DFUDefFileResponse")}DFUFileAccess(e){return this._connection.send("DFUFileAccess",e,"json",!1,void 0,"DFUFileAccessResponse")}DFUFileAccessV2(e){return this._connection.send("DFUFileAccessV2",e,"json",!1,void 0,"DFUFileAccessResponse")}DFUFileCreate(e){return this._connection.send("DFUFileCreate",e,"json",!1,void 0,"DFUFileCreateResponse")}DFUFileCreateV2(e){return this._connection.send("DFUFileCreateV2",e,"json",!1,void 0,"DFUFileCreateResponse")}DFUFilePublish(e){return this._connection.send("DFUFilePublish",e,"json",!1,void 0,"DFUFilePublishResponse")}DFUFileView(e){return this._connection.send("DFUFileView",e,"json",!1,void 0,"DFUFileViewResponse")}DFUGetDataColumns(e){return this._connection.send("DFUGetDataColumns",e,"json",!1,void 0,"DFUGetDataColumnsResponse")}DFUGetFileMetaData(e){return this._connection.send("DFUGetFileMetaData",e,"json",!1,void 0,"DFUGetFileMetaDataResponse")}DFUInfo(e){return this._connection.send("DFUInfo",e,"json",!1,void 0,"DFUInfoResponse")}DFUQuery(e){return this._connection.send("DFUQuery",e,"json",!1,void 0,"DFUQueryResponse")}DFURecordTypeInfo(e){return this._connection.send("DFURecordTypeInfo",e,"json",!1,void 0,"DFURecordTypeInfoResponse")}DFUSearch(e){return this._connection.send("DFUSearch",e,"json",!1,void 0,"DFUSearchResponse")}DFUSearchData(e){return this._connection.send("DFUSearchData",e,"json",!1,void 0,"DFUSearchDataResponse")}DFUSpace(e){return this._connection.send("DFUSpace",e,"json",!1,void 0,"DFUSpaceResponse")}EclRecordTypeInfo(e){return this._connection.send("EclRecordTypeInfo",e,"json",!1,void 0,"EclRecordTypeInfoResponse")}EraseHistory(e){return this._connection.send("EraseHistory",e,"json",!1,void 0,"EraseHistoryResponse")}ListHistory(e){return this._connection.send("ListHistory",e,"json",!1,void 0,"ListHistoryResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsDfuPingResponse")}Savexml(e){return this._connection.send("Savexml",e,"json",!1,void 0,"SavexmlResponse")}SuperfileAction(e){return this._connection.send("SuperfileAction",e,"json",!1,void 0,"SuperfileActionResponse")}SuperfileList(e){return this._connection.send("SuperfileList",e,"json",!1,void 0,"SuperfileListResponse")}};var Xj=OA.DFUArrayActions,Zj=OA.DFUDefFileFormat,Kj=OA.DFUChangeProtection,$j=OA.DFUChangeRestriction,ec=class extends Th{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}async recursiveFetchLogicalFiles(e){let r=[],n=[];return await Promise.all(e.map(s=>this.DFUInfo({Cluster:s.NodeGroup,Name:s.Name,IncludeJsonTypeInfo:!1,IncludeBinTypeInfo:!1,ForceIndexInfo:!1}).then(i=>{for(let A of i?.FileDetail?.Superfiles?.DFULogicalFile??[])r.push(A);for(let A of i?.FileDetail?.subfiles?.Item??[])n.push(A)}))),n.concat(r.length?await this.recursiveFetchLogicalFiles(r):[])}};var W0=class extends Re{constructor(e){super(e,"WsDFUXRef","1.01")}DFUXRefArrayAction(e){return this._connection.send("DFUXRefArrayAction",e)}DFUXRefBuild(e){return this._connection.send("DFUXRefBuild",e)}DFUXRefBuildCancel(e){return this._connection.send("DFUXRefBuildCancel",e)}DFUXRefCleanDirectories(e){return this._connection.send("DFUXRefCleanDirectories",e)}DFUXRefDirectories(e){return this._connection.send("DFUXRefDirectories",e,void 0,void 0,void 0,"DFUXRefDirectoriesQueryResponse")}DFUXRefFoundFiles(e){return this._connection.send("DFUXRefFoundFiles",e,void 0,void 0,void 0,"DFUXRefFoundFilesQueryResponse")}DFUXRefList(e={}){return this._connection.send("DFUXRefList",e)}DFUXRefLostFiles(e){return this._connection.send("DFUXRefLostFiles",e,void 0,void 0,void 0,"DFUXRefLostFilesQueryResponse")}DFUXRefMessages(e){return this._connection.send("DFUXRefMessages",e,void 0,void 0,void 0,"DFUXRefMessagesQueryResponse")}DFUXRefOrphanFiles(e){return this._connection.send("DFUXRefOrphanFiles",e,void 0,void 0,void 0,"DFUXRefOrphanFilesQueryResponse")}DFUXRefUnusedFiles(e){return this._connection.send("DFUXRefUnusedFiles",e)}};function L0(t,e){let r=typeof e;switch(r){case"boolean":case"number":case"string":return{id:t,type:r};case"object":if(e.Row instanceof Array&&(e=e.Row),e instanceof Array)return{id:t,type:"dataset",children:eB(e[0])};if(e instanceof Object){if(e.Item&&e.Item instanceof Array&&e.Item.length===1){let n=typeof e.Item[0];if(n==="string"||n==="number")return{id:t,type:"set",fieldType:n};throw new Error("Unknown field type")}return{id:t,type:"object",fields:bq(e)}}default:throw new Error("Unknown field type")}}function eB(t){t.Row&&t.Row instanceof Array&&(t=t.Row[0]);let e=[];for(let r in t)e.push(L0(r,t[r]));return e}function bq(t){let e={};for(let r in t)e[r]=L0(r,t[r]);return e}var Mh=class extends Re{constructor(e){super(e,"WsEcl","0")}opts(){return this._connection.opts()}requestJson(e,r){return this._connection.send(`example/request/query/${e}/${r}/json`,{},"text").then(n=>{let s=JSON.parse(n);for(let i in s)return s[i];return{}}).then(eB)}responseJson(e,r){return this._connection.send(`example/response/query/${e}/${r}/json`,{},"text").then(n=>{let s=JSON.parse(n);for(let i in s)return s[i].Results;return{}}).then(n=>{let s={};for(let i in n)s[i]=eB(n[i]);return s})}submit(e,r,n){let s=`submit/query/${e}/${r}`;return this._connection.send(s,n,"json2").then(i=>{if(i.Results&&i.Results.Exception)throw new Zi(s,n,{Source:"wsEcl.submit",Exception:i.Results.Exception});return i.Results})}};var xh=class extends Re{constructor(e){super(e,"ws_elk","1")}GetConfigDetails(e){return this._connection.send("GetConfigDetails",e)}Ping(e){return this._connection.send("Ping",e)}};var v0=class extends xh{};var Ct;(c=>{let t;(J=>(J.global="global",J.workunits="workunits",J.components="components",J.audience="audience",J.class="class",J.instance="instance",J.node="node",J.message="message",J.logid="logid",J.processid="processid",J.threadid="threadid",J.timestamp="timestamp",J.pod="pod",J.traceid="traceid",J.spanid="spanid"))(t=c.LogColumnType||={});let e;(E=>(E.string="string",E.numeric="numeric",E.datetime="datetime",E.enum="enum",E.epoch="epoch"))(e=c.LogColumnValueType||={});let r;(y=>(y[y.All=0]="All",y[y.ByJobID=1]="ByJobID",y[y.ByComponent=2]="ByComponent",y[y.ByLogType=3]="ByLogType",y[y.ByTargetAudience=4]="ByTargetAudience",y[y.BySourceInstance=5]="BySourceInstance",y[y.BySourceNode=6]="BySourceNode",y[y.ByFieldName=7]="ByFieldName",y[y.ByPod=8]="ByPod",y[y.ByTraceID=9]="ByTraceID",y[y.BySpanID=10]="BySpanID"))(r=c.LogAccessType||={});let n;(p=>(p[p.Success=0]="Success",p[p.Warning=1]="Warning",p[p.Fail=2]="Fail"))(n=c.LogAccessStatusCode||={});let s;(p=>(p[p.NONE=0]="NONE",p[p.AND=1]="AND",p[p.OR=2]="OR"))(s=c.LogAccessFilterOperator||={});let i;(B=>(B[B.MIN=0]="MIN",B[B.DEFAULT=1]="DEFAULT",B[B.ALL=2]="ALL",B[B.CUSTOM=3]="CUSTOM"))(i=c.LogSelectColumnMode||={});let A;(y=>(y[y.ByDate=0]="ByDate",y[y.ByJobID=1]="ByJobID",y[y.ByComponent=2]="ByComponent",y[y.ByLogType=3]="ByLogType",y[y.ByTargetAudience=4]="ByTargetAudience",y[y.BySourceInstance=5]="BySourceInstance",y[y.BySourceNode=6]="BySourceNode",y[y.ByFieldName=7]="ByFieldName",y[y.ByPod=8]="ByPod",y[y.ByTraceID=9]="ByTraceID",y[y.BySpanID=10]="BySpanID"))(A=c.SortColumType||={});let u;(d=>(d[d.ASC=0]="ASC",d[d.DSC=1]="DSC"))(u=c.SortDirection||={})})(Ct||={});var kh=class extends Re{constructor(e){super(e,"ws_logaccess","1.08")}GetHealthReport(e){return this._connection.send("GetHealthReport",e,"json",!1,void 0,"GetHealthReportResponse")}GetLogAccessInfo(e){return this._connection.send("GetLogAccessInfo",e,"json",!1,void 0,"GetLogAccessInfoResponse")}GetLogs(e){return this._connection.send("GetLogs",e,"json",!1,void 0,"GetLogsResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_logaccessPingResponse")}};var P0=kt("@hpcc-js/comms/services/wsLogaccess.ts");var Rq=(A=>(A.Disaster="DIS",A.Error="ERR",A.Warning="WRN",A.Information="INF",A.Progress="PRO",A.Metric="MET",A))(Rq||{}),Fq=(s=>(s.Operator="OPR",s.User="USR",s.Programmer="PRO",s.Audit="ADT",s))(Fq||{}),G0=class extends kh{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}async GetLogsEx(e){let r=await this.GetLogAccessInfo(),n={};r.Columns.Column.forEach(u=>n[u.LogType]=u.Name);let s=u=>{let c={};for(let g in n)u?.fields?c[g]=Object.assign({},...u.fields)[n[g]]??"":c[g]="";return c},i={Filter:{leftBinaryFilter:{BinaryLogFilter:[{leftFilter:{LogCategory:Ct.LogAccessType.All}}]}},Range:{StartDate:new Date(0).toISOString()},LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:Ct.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:Ct.SortColumType.ByDate,ColumnName:"",Direction:0}]}},A=[];for(let u in e){let c;u in n&&(Object.values(Ct.LogColumnType).includes(u)?c=u:c=n[u]);let g;if(c){switch(c){case Ct.LogColumnType.workunits:case"hpcc.log.jobid":g=Ct.LogAccessType.ByJobID;break;case Ct.LogColumnType.audience:case"hpcc.log.audience":g=Ct.LogAccessType.ByTargetAudience;break;case Ct.LogColumnType.class:case"hpcc.log.class":g=Ct.LogAccessType.ByLogType;break;case Ct.LogColumnType.components:case"kubernetes.container.name":g=Ct.LogAccessType.ByComponent;break;default:g=Ct.LogAccessType.ByFieldName,c=n[u]}if(Array.isArray(e[u]))e[u].forEach(l=>{g===Ct.LogAccessType.ByComponent&&(l+="*"),A.push({LogCategory:g,SearchField:c,SearchByValue:l})});else{let l=e[u];g===Ct.LogAccessType.ByComponent&&(l+="*"),A.push({LogCategory:g,SearchField:c,SearchByValue:l})}}}if(A.length>2){let u=i.Filter.leftBinaryFilter.BinaryLogFilter[0];A.forEach((c,g)=>{let l=Ct.LogAccessFilterOperator.AND;g>0?(A[g-1].SearchField===c.SearchField&&(l=Ct.LogAccessFilterOperator.OR),g===A.length-1?(u.Operator=l,u.rightFilter=c):(u.Operator=l,u.rightBinaryFilter={BinaryLogFilter:[{leftFilter:c}]},u=u.rightBinaryFilter.BinaryLogFilter[0])):u.leftFilter=c})}else delete i.Filter.leftBinaryFilter,i.Filter.leftFilter={LogCategory:Ct.LogAccessType.All},A[0]?.SearchField&&(i.Filter.leftFilter={LogCategory:A[0]?.LogCategory,SearchField:A[0]?.SearchField,SearchByValue:A[0]?.SearchByValue}),A[1]?.SearchField&&(i.Filter.Operator=Ct.LogAccessFilterOperator.AND,A[0].SearchField===A[1].SearchField&&(i.Filter.Operator=Ct.LogAccessFilterOperator.OR),i.Filter.rightFilter={LogCategory:A[1]?.LogCategory,SearchField:A[1]?.SearchField,SearchByValue:A[1]?.SearchByValue});return e.StartDate&&(i.Range.StartDate=e.StartDate.toISOString()),e.EndDate&&(i.Range.EndDate=e.EndDate.toISOString()),this.GetLogs(i).then(u=>{try{let c=JSON.parse(u.LogLines),g=[];switch(r.RemoteLogManagerType){case"azureloganalyticscurl":case"elasticstack":case"grafanacurl":g=c.lines?.map(s)??[];break;default:P0.warning(`Unknown RemoteLogManagerType: ${r.RemoteLogManagerType}`),g=[]}return{lines:g,total:u.TotalLogLinesAvailable??1e4}}catch(c){P0.error(c.message??c)}return{lines:[],total:0}})}};var ti=sn(_0(),1);var Lh=class extends Re{constructor(e){super(e,"ws_machine","1.17")}GetComponentStatus(e){return this._connection.send("GetComponentStatus",e)}GetComponentUsage(e){return this._connection.send("GetComponentUsage",e)}GetMachineInfo(e){return this._connection.send("GetMachineInfo",e)}GetMachineInfoEx(e){return this._connection.send("GetMachineInfoEx",e)}GetMetrics(e){return this._connection.send("GetMetrics",e)}GetNodeGroupUsage(e){return this._connection.send("GetNodeGroupUsage",e)}GetTargetClusterInfo(e){return this._connection.send("GetTargetClusterInfo",e)}GetTargetClusterUsage(e){return this._connection.send("GetTargetClusterUsage",e)}Ping(e){return this._connection.send("Ping",e)}UpdateComponentStatus(e){return this._connection.send("UpdateComponentStatus",e)}};var ri=class extends Lh{GetTargetClusterUsageEx(e,r=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:r}).then(n=>An("TargetClusterUsages.TargetClusterUsage",n)?n.TargetClusterUsages.TargetClusterUsage:[]).then(n=>n.filter(s=>!!s.ComponentUsages).map(s=>{let i=s.ComponentUsages.ComponentUsage.map(A=>{let u=(A.MachineUsages&&A.MachineUsages.MachineUsage?A.MachineUsages.MachineUsage:[]).map(c=>{let g=c.DiskUsages&&c.DiskUsages.DiskUsage?c.DiskUsages.DiskUsage.map(l=>({...l,InUse:l.InUse*1024,Total:(l.InUse+l.Available)*1024,PercentUsed:100-l.PercentAvailable})):[];return{Name:c.Name,NetAddress:c.NetAddress,Description:c.Description,DiskUsages:g,mean:(0,ti.mean)(g.filter(l=>!isNaN(l.PercentUsed)),l=>l.PercentUsed),max:(0,ti.max)(g.filter(l=>!isNaN(l.PercentUsed)),l=>l.PercentUsed)}});return{Type:A.Type,Name:A.Name,Description:A.Description,MachineUsages:u,MachineUsagesDescription:u.reduce((c,g)=>c+(g.Description||""),""),mean:(0,ti.mean)(u.filter(c=>!isNaN(c.mean)),c=>c.mean),max:(0,ti.max)(u.filter(c=>!isNaN(c.max)),c=>c.max)}});return{Name:s.Name,Description:s.Description,ComponentUsages:i,ComponentUsagesDescription:i.reduce((A,u)=>A+(u.MachineUsagesDescription||""),""),mean:(0,ti.mean)(i.filter(A=>!isNaN(A.mean)),A=>A.mean),max:(0,ti.max)(i.filter(A=>!isNaN(A.max)),A=>A.max)}}))}};var vh=class extends Re{constructor(e){super(e,"WsPackageProcess","1.04")}ActivatePackage(e){return this._connection.send("ActivatePackage",e)}AddPackage(e){return this._connection.send("AddPackage",e)}AddPartToPackageMap(e){return this._connection.send("AddPartToPackageMap",e)}CopyPackageMap(e){return this._connection.send("CopyPackageMap",e)}DeActivatePackage(e){return this._connection.send("DeActivatePackage",e)}DeletePackage(e){return this._connection.send("DeletePackage",e)}Echo(e){return this._connection.send("Echo",e)}GetPackage(e){return this._connection.send("GetPackage",e)}GetPackageMapById(e){return this._connection.send("GetPackageMapById",e)}GetPackageMapSelectOptions(e){return this._connection.send("GetPackageMapSelectOptions",e)}GetPartFromPackageMap(e){return this._connection.send("GetPartFromPackageMap",e)}GetQueryFileMapping(e){return this._connection.send("GetQueryFileMapping",e)}ListPackage(e){return this._connection.send("ListPackage",e)}ListPackages(e){return this._connection.send("ListPackages",e)}Ping(e){return this._connection.send("Ping",e)}RemovePartFromPackageMap(e){return this._connection.send("RemovePartFromPackageMap",e)}ValidatePackage(e){return this._connection.send("ValidatePackage",e)}};var Y0=class extends vh{};var Ph=class extends Re{constructor(e){super(e,"WsResources","1.01")}Ping(e){return this._connection.send("Ping",e)}ServiceQuery(e){return this._connection.send("ServiceQuery",e)}WebLinksQuery(e){return this._connection.send("WebLinksQuery",e)}};var H0=class extends Ph{};var O0;(e=>{let t;(s=>(s.ECL="ECL",s.DFU="DFU"))(t=e.WUTypes||={})})(O0||={});var Gh=class extends Re{constructor(e){super(e,"WSSasha","1.01")}ArchiveWU(e){return this._connection.send("ArchiveWU",e,"json",!1,void 0,"ResultResponse")}GetVersion(e){return this._connection.send("GetVersion",e,"json",!1,void 0,"ResultResponse")}ListWU(e){return this._connection.send("ListWU",e,"json",!1,void 0,"ResultResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WSSashaPingResponse")}RestoreWU(e){return this._connection.send("RestoreWU",e,"json",!1,void 0,"ResultResponse")}};var q0=class extends Gh{};var J0;(r=>{let t;(c=>(c.ALL="ALL",c.READ="READ",c.WRITE="WRITE",c.HOLD="HOLD",c.SUB="SUB"))(t=r.LockModes||={});let e;(d=>(d.Attach="Attach",d.Detach="Detach",d.State="State",d.Reload="Reload",d.ReloadRetry="ReloadRetry",d.MemLock="MemLock",d.MemUnlock="MemUnlock",d.GetMemLocked="GetMemLocked"))(e=r.RoxieControlCmdType||={})})(J0||={});var Vh=class extends Re{constructor(e){super(e,"WsSMC","1.27")}Activity(e){return this._connection.send("Activity",e,"json",!1,void 0,"ActivityResponse")}BrowseResources(e){return this._connection.send("BrowseResources",e,"json",!1,void 0,"BrowseResourcesResponse")}ClearQueue(e){return this._connection.send("ClearQueue",e,"json",!1,void 0,"SMCQueueResponse")}GetBuildInfo(e){return this._connection.send("GetBuildInfo",e,"json",!1,void 0,"GetBuildInfoResponse")}GetStatusServerInfo(e){return this._connection.send("GetStatusServerInfo",e,"json",!1,void 0,"GetStatusServerInfoResponse")}GetThorQueueAvailability(e){return this._connection.send("GetThorQueueAvailability",e,"json",!1,void 0,"GetThorQueueAvailabilityResponse")}Index(e){return this._connection.send("Index",e,"json",!1,void 0,"SMCIndexResponse")}LockQuery(e){return this._connection.send("LockQuery",e,"json",!1,void 0,"LockQueryResponse")}MoveJobBack(e){return this._connection.send("MoveJobBack",e,"json",!1,void 0,"SMCJobResponse")}MoveJobDown(e){return this._connection.send("MoveJobDown",e,"json",!1,void 0,"SMCJobResponse")}MoveJobFront(e){return this._connection.send("MoveJobFront",e,"json",!1,void 0,"SMCJobResponse")}MoveJobUp(e){return this._connection.send("MoveJobUp",e,"json",!1,void 0,"SMCJobResponse")}NotInCommunityEdition(e){return this._connection.send("NotInCommunityEdition",e,"json",!1,void 0,"NotInCommunityEditionResponse")}PauseQueue(e){return this._connection.send("PauseQueue",e,"json",!1,void 0,"SMCQueueResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsSMCPingResponse")}RemoveJob(e){return this._connection.send("RemoveJob",e,"json",!1,void 0,"SMCJobResponse")}ResumeQueue(e){return this._connection.send("ResumeQueue",e,"json",!1,void 0,"SMCQueueResponse")}RoxieControlCmd(e){return this._connection.send("RoxieControlCmd",e,"json",!1,void 0,"RoxieControlCmdResponse")}RoxieXrefCmd(e){return this._connection.send("RoxieXrefCmd",e,"json",!1,void 0,"RoxieXrefCmdResponse")}SetBanner(e){return this._connection.send("SetBanner",e,"json",!1,void 0,"SetBannerResponse")}SetJobPriority(e){return this._connection.send("SetJobPriority",e,"json",!1,void 0,"SMCPriorityResponse")}StopQueue(e){return this._connection.send("StopQueue",e,"json",!1,void 0,"SMCQueueResponse")}};var tc=class extends Vh{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(r=>({Running:{ActiveWorkunit:[]},...r}))}};var rc=class extends Re{constructor(e){super(e,"WsStore","1")}CreateStore(e){return this._connection.send("Fetch",e)}Delete(e){return this._connection.send("Delete",e).catch(r=>{if(r.isESPExceptions&&r.Exception.some(n=>n.Code===-1))return{Exceptions:void 0,Success:!0};throw r})}DeleteNamespace(e){return this._connection.send("DeleteNamespace",e)}Fetch(e){return this._connection.send("Fetch",e).catch(r=>{if(r.isESPExceptions&&r.Exception.some(n=>n.Code===-1))return{Exceptions:void 0,Value:void 0};throw r})}FetchAll(e){return this._connection.send("FetchAll",e)}FetchKeyMD(e){return this._connection.send("FetchKeyMD",e)}ListKeys(e){return this._connection.send("ListKeys",e)}ListNamespaces(e){return this._connection.send("ListNamespaces",e)}Set(e){return this._connection.send("Set",e)}};var j0;(e=>{let t;(i=>(i.All="All",i.QueriesOnly="QueriesOnly",i.WorkunitsOnly="WorkunitsOnly"))(t=e.RoxieQueueFilter||={})})(j0||={});var _h=class extends Re{constructor(e){super(e,"WsTopology","1.32")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsTopologyPingResponse")}SystemLog(e){return this._connection.send("SystemLog",e,"json",!1,void 0,"SystemLogResponse")}TpClusterInfo(e){return this._connection.send("TpClusterInfo",e,"json",!1,void 0,"TpClusterInfoResponse")}TpClusterQuery(e){return this._connection.send("TpClusterQuery",e,"json",!1,void 0,"TpClusterQueryResponse")}TpDropZoneQuery(e){return this._connection.send("TpDropZoneQuery",e,"json",!1,void 0,"TpDropZoneQueryResponse")}TpGetComponentFile(e){return this._connection.send("TpGetComponentFile",e,"json",!1,void 0,"TpGetComponentFileResponse")}TpGetServicePlugins(e){return this._connection.send("TpGetServicePlugins",e,"json",!1,void 0,"TpGetServicePluginsResponse")}TpGroupQuery(e){return this._connection.send("TpGroupQuery",e,"json",!1,void 0,"TpGroupQueryResponse")}TpListLogFiles(e){return this._connection.send("TpListLogFiles",e,"json",!1,void 0,"TpListLogFilesResponse")}TpListTargetClusters(e){return this._connection.send("TpListTargetClusters",e,"json",!1,void 0,"TpListTargetClustersResponse")}TpLogFile(e){return this._connection.send("TpLogFile",e,"json",!1,void 0,"TpLogFileResponse")}TpLogFileDisplay(e){return this._connection.send("TpLogFileDisplay",e,"json",!1,void 0,"TpLogFileResponse")}TpLogicalClusterQuery(e){return this._connection.send("TpLogicalClusterQuery",e,"json",!1,void 0,"TpLogicalClusterQueryResponse")}TpMachineInfo(e){return this._connection.send("TpMachineInfo",e,"json",!1,void 0,"TpMachineInfoResponse")}TpMachineQuery(e){return this._connection.send("TpMachineQuery",e,"json",!1,void 0,"TpMachineQueryResponse")}TpServiceQuery(e){return this._connection.send("TpServiceQuery",e,"json",!1,void 0,"TpServiceQueryResponse")}TpSetMachineStatus(e){return this._connection.send("TpSetMachineStatus",e,"json",!1,void 0,"TpSetMachineStatusResponse")}TpSwapNode(e){return this._connection.send("TpSwapNode",e,"json",!1,void 0,"TpSwapNodeResponse")}TpTargetClusterQuery(e){return this._connection.send("TpTargetClusterQuery",e,"json",!1,void 0,"TpTargetClusterQueryResponse")}TpThorStatus(e){return this._connection.send("TpThorStatus",e,"json",!1,void 0,"TpThorStatusResponse")}TpXMLFile(e){return this._connection.send("TpXMLFile",e,"json",!1,void 0,"TpXMLFileResponse")}};var Xt=class extends _h{connectionOptions(){return this._connection.opts()}protocol(){return this._connection.opts().baseUrl.split("//")[0]}ip(){return this._connection.opts().baseUrl.split("//")[1].split(":")[0]}DefaultTpLogicalClusterQuery(e={}){return this.TpLogicalClusterQuery(e).then(r=>{if(r.default)return r.default;let n,s;return r.TpLogicalClusters.TpLogicalCluster.some((i,A)=>(A===0&&(s=i),i.Type==="hthor"?(n=i,!0):!1)),n||s})}};var sr;(D=>{let t;(ie=>(ie.Abort="Abort",ie.Delete="Delete",ie.Deschedule="Deschedule",ie.Reschedule="Reschedule",ie.Pause="Pause",ie.PauseNow="PauseNow",ie.Protect="Protect",ie.Unprotect="Unprotect",ie.Restore="Restore",ie.Resume="Resume",ie.SetToFailed="SetToFailed",ie.Archive="Archive"))(t=D.ECLWUActions||={});let e;(V=>(V[V.MIN=0]="MIN",V[V.DEFAULT=1]="DEFAULT",V[V.ALL=2]="ALL",V[V.CUSTOM=3]="CUSTOM"))(e=D.LogSelectColumnMode||={});let r;(F=>(F[F.ASC=0]="ASC",F[F.DSC=1]="DSC"))(r=D.SortDirection||={});let n;(X=>(X.ALL="ALL",X.DIS="DIS",X.ERR="ERR",X.WRN="WRN",X.INF="INF",X.PRO="PRO",X.MET="MET",X.EVT="EVT"))(n=D.LogEventClass||={});let s;(y=>(y.Single="Single",y.List="List",y.Multi="Multi"))(s=D.WUDetailsAttrValueType||={});let i;(y=>(y.SyntaxCheck="SyntaxCheck",y.Deploy="Deploy",y.Publish="Publish"))(i=D.EclDefinitionActions||={});let A;(y=>(y.xml="xml",y.json="json",y.text="text"))(A=D.ErrorMessageFormat||={});let u;(y=>(y[y.XML=0]="XML",y[y.JSON=1]="JSON",y[y.CSV=2]="CSV"))(u=D.LogAccessLogFormat||={});let c;(V=>(V.info="info",V.warning="warning",V.error="error",V.alert="alert"))(c=D.WUExceptionSeverity||={});let g;(w=>(w.Allqueries="All queries",w.Notsuspended="Not suspended",w.Suspended="Suspended",w.Suspendedbyuser="Suspended by user",w.Suspendedbyfirstnode="Suspended by first node",w.Suspendedbyanynode="Suspended by any node"))(g=D.WUQueryFilterSuspendedType||={});let l;(K=>(K.All="All",K.Id="Id",K.Name="Name",K.Alias="Alias",K.Status="Status"))(l=D.WUQuerySetFilterType||={});let d;(y=>(y.All="All",y.Protected="Protected",y.NotProtected="NotProtected"))(d=D.WUProtectFilter||={});let p;(x=>x.Deactivate="Deactivate")(p=D.QuerySetAliasActionTypes||={});let B;(F=>(F.None="None",F.ActivateImportedActive="ActivateImportedActive"))(B=D.QuerysetImportActivation||={});let E;(X=>(X.Suspend="Suspend",X.Unsuspend="Unsuspend",X.ToggleSuspend="ToggleSuspend",X.Activate="Activate",X.Delete="Delete",X.DeleteQueriesAndWUs="DeleteQueriesAndWUs",X.RemoveAllAliases="RemoveAllAliases",X.ResetQueryStats="ResetQueryStats"))(E=D.QuerySetQueryActionTypes||={});let b;(V=>(V[V.DoNotActivateQuery=0]="DoNotActivateQuery",V[V.ActivateQuery=1]="ActivateQuery",V[V.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",V[V.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious"))(b=D.WUQueryActivationMode||={})})(sr||={});var nc=class extends Re{constructor(e){super(e,"WsWorkunits","2.02")}GVCAjaxGraph(e){return this._connection.send("GVCAjaxGraph",e,"json",!1,void 0,"GVCAjaxGraphResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsWorkunitsPingResponse")}WUAbort(e){return this._connection.send("WUAbort",e,"json",!1,void 0,"WUAbortResponse")}WUAction(e){return this._connection.send("WUAction",e,"json",!1,void 0,"WUActionResponse")}WUAddLocalFileToWorkunit(e){return this._connection.send("WUAddLocalFileToWorkunit",e,"json",!1,void 0,"WUAddLocalFileToWorkunitResponse")}WUAnalyseHotspot(e){return this._connection.send("WUAnalyseHotspot",e,"json",!1,void 0,"WUAnalyseHotspotResponse")}WUCDebug(e){return this._connection.send("WUCDebug",e,"json",!1,void 0,"WUDebugResponse")}WUCheckFeatures(e){return this._connection.send("WUCheckFeatures",e,"json",!1,void 0,"WUCheckFeaturesResponse")}WUClusterJobQueueLOG(e){return this._connection.send("WUClusterJobQueueLOG",e,"json",!1,void 0,"WUClusterJobQueueLOGResponse")}WUClusterJobQueueXLS(e){return this._connection.send("WUClusterJobQueueXLS",e,"json",!1,void 0,"WUClusterJobQueueXLSResponse")}WUClusterJobSummaryXLS(e){return this._connection.send("WUClusterJobSummaryXLS",e,"json",!1,void 0,"WUClusterJobSummaryXLSResponse")}WUClusterJobXLS(e){return this._connection.send("WUClusterJobXLS",e,"json",!1,void 0,"WUClusterJobXLSResponse")}WUCompileECL(e){return this._connection.send("WUCompileECL",e,"json",!1,void 0,"WUCompileECLResponse")}WUCopyLogicalFiles(e){return this._connection.send("WUCopyLogicalFiles",e,"json",!1,void 0,"WUCopyLogicalFilesResponse")}WUCopyQuerySet(e){return this._connection.send("WUCopyQuerySet",e,"json",!1,void 0,"WUCopyQuerySetResponse")}WUCreate(e){return this._connection.send("WUCreate",e,"json",!1,void 0,"WUCreateResponse")}WUCreateAndUpdate(e){return this._connection.send("WUCreateAndUpdate",e,"json",!1,void 0,"WUUpdateResponse")}WUCreateZAPInfo(e){return this._connection.send("WUCreateZAPInfo",e,"json",!1,void 0,"WUCreateZAPInfoResponse")}WUDelete(e){return this._connection.send("WUDelete",e,"json",!1,void 0,"WUDeleteResponse")}WUDeployWorkunit(e){return this._connection.send("WUDeployWorkunit",e,"json",!1,void 0,"WUDeployWorkunitResponse")}WUDetails(e){return this._connection.send("WUDetails",e,"json",!1,void 0,"WUDetailsResponse")}WUDetailsMeta(e){return this._connection.send("WUDetailsMeta",e,"json",!1,void 0,"WUDetailsMetaResponse")}WUEclDefinitionAction(e){return this._connection.send("WUEclDefinitionAction",e,"json",!1,void 0,"WUEclDefinitionActionResponse")}WUExport(e){return this._connection.send("WUExport",e,"json",!1,void 0,"WUExportResponse")}WUFile(e){return this._connection.send("WUFile",e,"json",!1,void 0,"WULogFileResponse")}WUFullResult(e){return this._connection.send("WUFullResult",e,"json",!1,void 0,"WUFullResultResponse")}WUGVCGraphInfo(e){return this._connection.send("WUGVCGraphInfo",e,"json",!1,void 0,"WUGVCGraphInfoResponse")}WUGetArchiveFile(e){return this._connection.send("WUGetArchiveFile",e,"json",!1,void 0,"WUGetArchiveFileResponse")}WUGetDependancyTrees(e){return this._connection.send("WUGetDependancyTrees",e,"json",!1,void 0,"WUGetDependancyTreesResponse")}WUGetGraph(e){return this._connection.send("WUGetGraph",e,"json",!1,void 0,"WUGetGraphResponse")}WUGetGraphNameAndTypes(e){return this._connection.send("WUGetGraphNameAndTypes",e,"json",!1,void 0,"WUGetGraphNameAndTypesResponse")}WUGetNumFileToCopy(e){return this._connection.send("WUGetNumFileToCopy",e,"json",!1,void 0,"WUGetNumFileToCopyResponse")}WUGetPlugins(e){return this._connection.send("WUGetPlugins",e,"json",!1,void 0,"WUGetPluginsResponse")}WUGetStats(e){return this._connection.send("WUGetStats",e,"json",!1,void 0,"WUGetStatsResponse")}WUGetThorJobList(e){return this._connection.send("WUGetThorJobList",e,"json",!1,void 0,"WUGetThorJobListResponse")}WUGetThorJobQueue(e){return this._connection.send("WUGetThorJobQueue",e,"json",!1,void 0,"WUGetThorJobQueueResponse")}WUGetZAPInfo(e){return this._connection.send("WUGetZAPInfo",e,"json",!1,void 0,"WUGetZAPInfoResponse")}WUGraphInfo(e){return this._connection.send("WUGraphInfo",e,"json",!1,void 0,"WUGraphInfoResponse")}WUGraphTiming(e){return this._connection.send("WUGraphTiming",e,"json",!1,void 0,"WUGraphTimingResponse")}WUInfo(e){return this._connection.send("WUInfo",e,"json",!1,void 0,"WUInfoResponse")}WUInfoDetails(e){return this._connection.send("WUInfoDetails",e,"json",!1,void 0,"WUInfoResponse")}WUJobList(e){return this._connection.send("WUJobList",e,"json",!1,void 0,"WUJobListResponse")}WULightWeightQuery(e){return this._connection.send("WULightWeightQuery",e,"json",!1,void 0,"WULightWeightQueryResponse")}WUListArchiveFiles(e){return this._connection.send("WUListArchiveFiles",e,"json",!1,void 0,"WUListArchiveFilesResponse")}WUListLocalFileRequired(e){return this._connection.send("WUListLocalFileRequired",e,"json",!1,void 0,"WUListLocalFileRequiredResponse")}WUListQueries(e){return this._connection.send("WUListQueries",e,"json",!1,void 0,"WUListQueriesResponse")}WUListQueriesUsingFile(e){return this._connection.send("WUListQueriesUsingFile",e,"json",!1,void 0,"WUListQueriesUsingFileResponse")}WUMultiQuerysetDetails(e){return this._connection.send("WUMultiQuerysetDetails",e,"json",!1,void 0,"WUMultiQuerySetDetailsResponse")}WUProcessGraph(e){return this._connection.send("WUProcessGraph",e,"json",!1,void 0,"WUProcessGraphResponse")}WUProtect(e){return this._connection.send("WUProtect",e,"json",!1,void 0,"WUProtectResponse")}WUPublishWorkunit(e){return this._connection.send("WUPublishWorkunit",e,"json",!1,void 0,"WUPublishWorkunitResponse")}WUPushEvent(e){return this._connection.send("WUPushEvent",e,"json",!1,void 0,"WUPushEventResponse")}WUQuery(e){return this._connection.send("WUQuery",e,"json",!1,void 0,"WUQueryResponse")}WUQueryConfig(e){return this._connection.send("WUQueryConfig",e,"json",!1,void 0,"WUQueryConfigResponse")}WUQueryDetails(e){return this._connection.send("WUQueryDetails",e,"json",!1,void 0,"WUQueryDetailsResponse")}WUQueryDetailsLightWeight(e){return this._connection.send("WUQueryDetailsLightWeight",e,"json",!1,void 0,"WUQueryDetailsResponse")}WUQueryFiles(e){return this._connection.send("WUQueryFiles",e,"json",!1,void 0,"WUQueryFilesResponse")}WUQueryGetGraph(e){return this._connection.send("WUQueryGetGraph",e,"json",!1,void 0,"WUQueryGetGraphResponse")}WUQueryGetSummaryStats(e){return this._connection.send("WUQueryGetSummaryStats",e,"json",!1,void 0,"WUQueryGetSummaryStatsResponse")}WUQuerysetAliasAction(e){return this._connection.send("WUQuerysetAliasAction",e,"json",!1,void 0,"WUQuerySetAliasActionResponse")}WUQuerysetCopyQuery(e){return this._connection.send("WUQuerysetCopyQuery",e,"json",!1,void 0,"WUQuerySetCopyQueryResponse")}WUQuerysetDetails(e){return this._connection.send("WUQuerysetDetails",e,"json",!1,void 0,"WUQuerySetDetailsResponse")}WUQuerysetExport(e){return this._connection.send("WUQuerysetExport",e,"json",!1,void 0,"WUQuerysetExportResponse")}WUQuerysetImport(e){return this._connection.send("WUQuerysetImport",e,"json",!1,void 0,"WUQuerysetImportResponse")}WUQuerysetQueryAction(e){return this._connection.send("WUQuerysetQueryAction",e,"json",!1,void 0,"WUQuerySetQueryActionResponse")}WUQuerysets(e){return this._connection.send("WUQuerysets",e,"json",!1,void 0,"WUQuerysetsResponse")}WURecreateQuery(e){return this._connection.send("WURecreateQuery",e,"json",!1,void 0,"WURecreateQueryResponse")}WUResubmit(e){return this._connection.send("WUResubmit",e,"json",!1,void 0,"WUResubmitResponse")}WUResult(e){return this._connection.send("WUResult",e,"json",!1,void 0,"WUResultResponse")}WUResultBin(e){return this._connection.send("WUResultBin",e,"json",!1,void 0,"WUResultBinResponse")}WUResultSummary(e){return this._connection.send("WUResultSummary",e,"json",!1,void 0,"WUResultSummaryResponse")}WUResultView(e){return this._connection.send("WUResultView",e,"json",!1,void 0,"WUResultViewResponse")}WURun(e){return this._connection.send("WURun",e,"json",!1,void 0,"WURunResponse")}WUSchedule(e){return this._connection.send("WUSchedule",e,"json",!1,void 0,"WUScheduleResponse")}WUShowScheduled(e){return this._connection.send("WUShowScheduled",e,"json",!1,void 0,"WUShowScheduledResponse")}WUSubmit(e){return this._connection.send("WUSubmit",e,"json",!1,void 0,"WUSubmitResponse")}WUSyntaxCheckECL(e){return this._connection.send("WUSyntaxCheckECL",e,"json",!1,void 0,"WUSyntaxCheckResponse")}WUUpdate(e){return this._connection.send("WUUpdate",e,"json",!1,void 0,"WUUpdateResponse")}WUUpdateQueryEntry(e){return this._connection.send("WUUpdateQueryEntry",e,"json",!1,void 0,"WUUpdateQueryEntryResponse")}WUWaitCompiled(e){return this._connection.send("WUWaitCompiled",e,"json",!1,void 0,"WUWaitResponse")}WUWaitComplete(e){return this._connection.send("WUWaitComplete",e,"json",!1,void 0,"WUWaitResponse")}};var tB=(F=>(F[F.Unknown=0]="Unknown",F[F.Compiled=1]="Compiled",F[F.Running=2]="Running",F[F.Completed=3]="Completed",F[F.Failed=4]="Failed",F[F.Archived=5]="Archived",F[F.Aborting=6]="Aborting",F[F.Aborted=7]="Aborted",F[F.Blocked=8]="Blocked",F[F.Submitted=9]="Submitted",F[F.Scheduled=10]="Scheduled",F[F.Compiling=11]="Compiling",F[F.Wait=12]="Wait",F[F.UploadingFiled=13]="UploadingFiled",F[F.DebugPaused=14]="DebugPaused",F[F.DebugRunning=15]="DebugRunning",F[F.Paused=16]="Paused",F[F.LAST=17]="LAST",F[F.NotFound=999]="NotFound",F))(tB||{}),$i;(e=>{let t;(p=>(p[p.Unknown=0]="Unknown",p[p.Compile=1]="Compile",p[p.Check=2]="Check",p[p.Run=3]="Run",p[p.ExecuteExisting=4]="ExecuteExisting",p[p.Pause=5]="Pause",p[p.PauseNow=6]="PauseNow",p[p.Resume=7]="Resume",p[p.Debug=8]="Debug",p[p.__size=9]="__size"))(t=e.Action||={})})($i||={});function X0(t){return typeof t.Name=="string"}function zz(t){return t.TotalClusterTime!==void 0}function Xz(t){return t.StateEx!==void 0}var _t=class extends nc{constructor(e){super(e)}Ping(){return this._connection.send("Ping",{},"json",!1,void 0,"WsWorkunitsPingResponse").then(()=>({result:!0}))}WUQuery(e={},r){return this._connection.send("WUQuery",e,"json",!1,r).then(n=>qc({Workunits:{ECLWorkunit:[]}},n))}WUInfo(e){let r={Wuid:"",TruncateEclTo64k:!0,IncludeExceptions:!1,IncludeGraphs:!1,IncludeSourceFiles:!1,IncludeResults:!1,IncludeResultsViewNames:!1,IncludeVariables:!1,IncludeTimers:!1,IncludeDebugValues:!1,IncludeApplicationValues:!1,IncludeWorkflows:!1,IncludeXmlSchemas:!1,IncludeResourceURLs:!1,IncludeECL:!1,IncludeHelpers:!1,IncludeAllowedClusters:!1,IncludeTotalClusterTime:!1,IncludeServiceNames:!1,SuppressResultSchemas:!0,...e};return super.WUInfo(r)}WUCreate(){return super.WUCreate({})}WUUpdate(e){return this._connection.send("WUUpdate",e,"json",!0)}WUResubmit(e){return this._connection.toESPStringArray(e,"Wuids"),super.WUResubmit(e)}WUAction(e){return e.ActionType=e.WUActionType,super.WUAction(e)}WUResult(e,r){return this._connection.send("WUResult",e,"json",!1,r)}WUFileEx(e){return this._connection.send("WUFile",e,"text")}_WUDetailsMetaPromise;WUDetailsMeta(e){return this._WUDetailsMetaPromise||(this._WUDetailsMetaPromise=super.WUDetailsMeta(e)),this._WUDetailsMetaPromise}WUCDebugEx(e){return this._connection.send("WUCDebug",e,void 0,void 0,void 0,"WUDebug").then(r=>{let s=jc(r.Result).children();return s.length?s[0]:null})}},Yh=class extends nc{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};var gU=sn(rB(),1),ld=sn(tU(),1);var Jh=class extends Ve{wu;get properties(){return this.get()}get Name(){return this.get("Name")}get Label(){return this.get("Label")}get Type(){return this.get("Type")}get Complete(){return this.get("Complete")}get WhenStarted(){return this.get("WhenStarted")}get WhenFinished(){return this.get("WhenFinished")}get Time(){return this.get("Time")}get Running(){return this.get("Running")}get RunningId(){return this.get("RunningId")}get Failed(){return this.get("Failed")}constructor(e,r,n){super(),this.wu=e;let s=0;for(let i of n)if(i.GraphName===r.Name&&!i.HasSubGraphId){s=Math.round(i.Seconds*1e3)/1e3;break}this.set({Time:s,...r})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(r=>Xh(r)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(r=>Xh(r))}},jh=class extends Ke{constructor(){super(e=>Ke.hash([e.Name]))}};function aU(t,e,r){r=r||[],r.push(t),e(t.name,t.$,t.children(),r),t.children().forEach(n=>{aU(n,e,r)}),r.pop()}function nB(t){let e={};return t.forEach(r=>{r.name==="att"&&(e[r.$.name]=r.$.value)}),e}var sB=class extends pa{},rU=class extends Ro{},nU=class extends Uo{},sU=class extends da{};function uU(t,e){let r={},n={},s={},i=new sB(u=>u._.id),A=[i.root];return aU(e,(u,c,g,l)=>{let d=A[A.length-1];switch(u){case"graph":break;case"node":if(g.length&&g[0].children().length&&g[0].children()[0].name==="graph"){let E=d.createSubgraph(nB(g));A.push(E),r[c.id]=E}let p=d.createVertex(nB(g));n[c.id]=p;break;case"edge":let B=d.createEdge(n[c.source],n[c.target],nB(g));s[c.id]=B;break;default:}}),i}var zh=class extends pa{},iU=class extends Ro{},oU=class extends Uo{},AU=class extends da{};function Xh(t){let e={},r={},n={},s;for(let i of t)switch(i.ScopeType){case"graph":s=new zh(l=>l._.Id,i),e[i.ScopeName]=s.root;break;case"subgraph":s||(s=new zh(l=>l._.Id,i),e[i.ScopeName]=s.root);let A=i.parentScope().split(":"),u=e[i.parentScope()];for(;A.length&&!u;)u=e[A.join(":")],A.pop();if(!u)console.warn(`Missing SG:Parent (${i.Id}): ${i.parentScope()}`);else{let l=u;e[i.ScopeName]=l.createSubgraph(i)}break;case"activity":let c=e[i.parentScope()];c?n[i.ScopeName]=c.createVertex(i):console.warn(`Missing A:Parent (${i.Id}): ${i.parentScope()}`);break;case"edge":r[i.ScopeName]=i;break;case"function":let g=n[i.parentScope()];g?g._.children().push(i):console.warn(`Missing F:Parent (${i.Id}): ${i.parentScope()}`);break}for(let i in r){let A=r[i],u=e[A.parentScope()];if(!u)console.warn(`Missing E:Parent (${A.Id}): ${A.parentScope()}`);else{let c=u;try{let g=s.vertex(A.attr("IdSource").RawValue),l=s.vertex(A.attr("IdTarget").RawValue);c.createEdge(g,l,A)}catch{console.warn(`Invalid Edge: ${i}`)}}}return s}var Zh=class extends Ve{wu;get properties(){return this.get()}get URL(){return this.get("URL")}get DisplayName(){return this.get("DisplayName")}get DisplayPath(){return this.get("DisplayPath")}constructor(e,r){super(),this.wu=e;let n=r.split("\\").join("/"),s=n.split("/"),i="res/"+this.wu.Wuid+"/",A="",u="";n.indexOf(i)===0&&(A=n.substr(i.length),u=s[s.length-1]),this.set({URL:r,DisplayName:u,DisplayPath:A})}};var Kh=class{e;constructor(e){this.e=e}fix(){delete this.e}},$h=class extends Kh{name;type;isSet=!1;attrs={};_children=[];constructor(e){super(e)}append(e){this._children.push(e),this.type||(this.type="hpcc:childDataset")}fix(){this.name=this.e.$.name,this.type=this.e.$.type;for(let r=this._children.length-1;r>=0;--r){let n=this._children[r];n.name==="Row"&&n.type===void 0&&(this._children.push(...n._children),this._children.splice(r,1))}let e=this.setOfType();e&&(this.type=e,this.isSet=!0,this._children=[])}children(){return this._children}isAll(e){return e.name==="All"&&e.type===void 0}setOfType(){let e=this.children();if(this.type===void 0&&e.length===2){if(this.isAll(e[0]))return e[1].type;if(this.isAll(e[1]))return e[0].type}}charWidth(){let e=-1;switch(this.type){case"xs:boolean":e=5;break;case"xs:integer":e=8;break;case"xs:nonNegativeInteger":e=8;break;case"xs:double":e=8;break;case"xs:string":e=32;break;default:let r="0123456789",n=this.type.lastIndexOf("_"),s=n>0?n:this.type.length,i=s-1;for(;i>=0&&r.indexOf(this.type.charAt(i))!==-1;--i);i+1<s&&(e=parseInt(this.type.substring(i+1,s),10)),this.type.indexOf("data")===0&&(e*=2);break}return e<this.name.length&&(e=this.name.length),e}},ed=class extends Kh{name;type;maxLength;_restricition;_maxLength;constructor(e){super(e)}append(e){switch(e.name){case"xs:restriction":this._restricition=e;break;case"xs:maxLength":this._maxLength=e;break;default:}}fix(){this.name=this.e.$.name,this.type=this._restricition.$.base,this.maxLength=this._maxLength?+this._maxLength.$.value:void 0,delete this._restricition,delete this._maxLength,super.fix()}},td=class{root;simpleTypes={};fields(){return this.root.children()}},rd=class extends fi{schema=new td;simpleType;simpleTypes={};xsdStack=new pi;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":let r=new $h(e);this.schema.root?this.xsdStack.depth()&&this.xsdStack.top().append(r):this.schema.root=r,this.xsdStack.push(r);break;case"xs:simpleType":this.simpleType=new ed(e);break;default:break}}endXMLNode(e){switch(e.name){case"xs:element":this.xsdStack.pop().fix();break;case"xs:simpleType":this.simpleType.fix(),this.simpleTypes[this.simpleType.name]=this.simpleType,delete this.simpleType;break;case"xs:appinfo":let n=this.xsdStack.top();for(let s in e.$)n.attrs[s]=e.$[s];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};function oB(t){let e=new rd;return e.parse(t),e.schema}var iB=class extends rd{_rootName;schema=new td;simpleTypes={};xsdStack=new pi;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":let r=new $h(e);!this.schema.root&&this._rootName===e.$.name&&(this.schema.root=r),this.xsdStack.depth()&&this.xsdStack.top().append(r),this.xsdStack.push(r);break;case"xsd:simpleType":this.simpleType=new ed(e);break;default:break}}endXMLNode(e){switch(e.name){case"xsd:element":this.xsdStack.pop().fix();break;case"xsd:simpleType":break;default:break}super.endXMLNode(e)}};function o5(t,e){let r=new iB(e);return r.parse(t),r.schema}var AB=class extends Ke{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}},nd=new AB,sd=class t extends Ve{connection;get BaseUrl(){return this.connection.baseUrl}xsdSchema;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get ResultName(){return this.get("ResultName")}get ResultSequence(){return this.get("ResultSequence")}get LogicalFileName(){return this.get("LogicalFileName")}get Name(){return this.get("Name")}get Sequence(){return this.get("Sequence")}get Value(){return this.get("Value")}get Link(){return this.get("Link")}get FileName(){return this.get("FileName")}get IsSupplied(){return this.get("IsSupplied")}get ShowFileContent(){return this.get("ShowFileContent")}get Total(){return this.get("Total")}get ECLSchemas(){return this.get("ECLSchemas")}get NodeGroup(){return this.get("NodeGroup")}get ResultViews(){return this.get("ResultViews")}get XmlSchema(){return this.get("XmlSchema")}static attach(e,r,n,s){let i;return Array.isArray(s)?(i=nd.get({BaseUrl:e.baseUrl,Wuid:r,ResultName:n.Name},()=>new t(e,r,n,s)),i.set(n)):typeof s>"u"&&(typeof n=="number"?i=nd.get({BaseUrl:e.baseUrl,Wuid:r,ResultName:"Sequence_"+n},()=>new t(e,r,n)):typeof n=="string"&&(i=nd.get({BaseUrl:e.baseUrl,Wuid:r,ResultName:n},()=>new t(e,r,n)))),i}static attachLogicalFile(e,r,n){return nd.get({BaseUrl:e.baseUrl,Wuid:r,ResultName:n},()=>new t(e,r,n,!0))}constructor(e,r,n,s){super(),e instanceof _t?this.connection=e:this.connection=new _t(e),typeof s=="boolean"&&s===!0?this.set({NodeGroup:r,LogicalFileName:n}):X0(n)&&Array.isArray(s)?this.set({...n,Wuid:r,ResultName:n.Name,ResultViews:s}):typeof s>"u"?typeof n=="number"?this.set({Wuid:r,ResultSequence:n}):typeof n=="string"?this.set({Wuid:r,ResultName:n}):console.warn("Unknown Result.attach (1)"):console.warn("Unknown Result.attach (2)")}isComplete(){return this.Total!==-1}_fetchXMLSchemaPromise;fetchXMLSchema(e=!1){return(!this._fetchXMLSchemaPromise||e)&&(this._fetchXMLSchemaPromise=this.WUResult().then(r=>r.Result?.XmlSchema?.xml?(this.xsdSchema=oB(r.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,r=-1,n=!1,s={},i){return this.WUResult(e,r,!n,s,i).then(A=>{let u=A.Result;return delete A.Result,this.set({...A}),An("XmlSchema.xml",u)&&(this.xsdSchema=oB(u.XmlSchema.xml)),An("Row",u)?u.Row:this.ResultName&&An(this.ResultName,u)?u[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,r=1,n=!1,s={},i){let A={NamedValue:{itemcount:0}};for(let c in s)A.NamedValue[A.NamedValue.itemcount++]={Name:c,Value:s[c]};let u={FilterBy:A};return this.Wuid&&this.ResultName!==void 0?(u.Wuid=this.Wuid,u.ResultName=this.ResultName):this.Wuid&&this.ResultSequence!==void 0?(u.Wuid=this.Wuid,u.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(u.LogicalName=this.LogicalFileName,u.Cluster=this.NodeGroup):this.LogicalFileName&&(u.LogicalName=this.LogicalFileName),u.Start=e,u.Count=r,u.SuppressXmlSchema=n,this.connection.WUResult(u,i).then(c=>c)}},id=class extends Ke{constructor(){super(e=>Ke.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};var eo=class extends Ve{scope;get properties(){return this.get()}get Name(){return this.get("Name")}get RawValue(){return this.get("RawValue")}get Formatted(){return this.get("Formatted")}get FormattedEnd(){return this.get("FormattedEnd")}get Measure(){return this.get("Measure")}get Creator(){return this.get("Creator")}get CreatorType(){return this.get("CreatorType")}constructor(e,r){super(),this.scope=e,this.set(r)}},aB=class extends Ve{_attributeMap={};_children=[];get properties(){return this.get()}get ScopeName(){return this.get("ScopeName")}get Id(){return this.get("Id")}get ScopeType(){return this.get("ScopeType")}get Properties(){return this.get("Properties",{Property:[]})}get Notes(){return this.get("Notes",{Note:[]})}get SinkActivity(){return this.get("SinkActivity")}get CAttributes(){let e=[],r={start:null,end:null};return this.Properties.Property.forEach(n=>{n.Measure==="ts"&&n.Name.indexOf("Started")>=0?r.start=n:this.ScopeName&&n.Measure==="ts"&&n.Name.indexOf("Finished")>=0?r.end=n:e.push(new eo(this,n))}),r.start&&r.end?(r.start.FormattedEnd=r.end.Formatted,e.push(new eo(this,r.start))):r.start?e.push(new eo(this,r.start)):r.end&&e.push(new eo(this,r.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(r=>{this._attributeMap[r.Name]=r}),this.Properties.Property=[];for(let r in this._attributeMap)this._attributeMap.hasOwnProperty(r)&&this.Properties.Property.push(this._attributeMap[r].properties)}parentScope(){let e=this.ScopeName.split(":");return e.pop(),e.join(":")}children(e){return arguments.length?(this._children=e,this):this._children}walk(e){if(e.start(this))return!0;for(let r of this.children())if(r.walk(e))return!0;return e.end(this)}formattedAttrs(){let e={};for(let r in this._attributeMap)e[r]=this._attributeMap[r].Formatted||this._attributeMap[r].RawValue;return e}rawAttrs(){let e={};for(let r in this._attributeMap)e[r]=this._attributeMap[r].RawValue;return e}hasAttr(e){return this._attributeMap[e]!==void 0}attr(e){return this._attributeMap[e]||new eo(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let r="",n=[];r=this.Id,n.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&n.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),n.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);let s=this.formattedAttrs();for(let i in s)i==="Label"?r=s[i]:n.push(`<tr><td class="key">${i}</td><td class="value">${s[i]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">
|
|
971
|
+
`;var Qd=sn(b0(),1);var sj="@hpcc-js/comms",ij="3.7.4",oj="3.8.4";var R0=kt("comms/connection.ts");function uj(t){return"baseUrl"in t}var hq={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function cj(t){return typeof t.opts=="function"&&typeof t.send=="function"&&typeof t.clone=="function"}function On(t,e){return e===void 0||e===!0?encodeURIComponent(t):""+t}function Xi(t,e=!0,r=""){if(r&&(r+="."),typeof t!="object")return On(t,e);let n=[];for(let s in t)if(t.hasOwnProperty(s))if(t[s]instanceof Array){let i=!1;t[s].forEach((A,u)=>{typeof A=="object"?(i=!0,n.push(Xi(A,e,r+On(`${s}.${u}`,e)))):n.push(r+On(`${s}_i${u}`,e)+"="+Xi(A,e))}),i&&n.push(r+On(`${s}.itemcount`,e)+"="+t[s].length)}else typeof t[s]=="object"?t[s]&&t[s].Item instanceof Array?(n.push(Xi(t[s].Item,e,r+On(s,e))),n.push(r+On(`${s}.itemcount`,e)+"="+t[s].Item.length)):n.push(Xi(t[s],e,r+On(s,e))):t[s]!==void 0?n.push(r+On(s,e)+"="+On(t[s],e)):n.push(r+On(s,e));return n.join("&")}function dq(t){return JSON.parse(t)}function pq(t,e,r={},n="json",s){return s&&console.warn("Header attributes ignored for JSONP connections"),new Promise((i,A)=>{let u=t.timeoutSecs*1e3,c=5e3,g="jsonp_callback_"+Math.round(Math.random()*999999);window[g]=function(E){u=0,B(),i(n==="json"&&typeof E=="string"?dq(E):E)};let l=document.createElement("script"),d=ns(t.baseUrl,e);d+=d.indexOf("?")>=0?"&":"?",l.src=d+"jsonp="+g+"&"+Xi(r,t.encodeRequest),document.body.appendChild(l);let p=setInterval(function(){u<=0?clearInterval(p):(u-=c,u<=0?(clearInterval(p),R0.error("Request timeout: "+l.src),B(),A(Error("Request timeout: "+l.src))):R0.debug("Request pending ("+u/1e3+" sec): "+l.src))},c);function B(){delete window[g],document.body.removeChild(l)}})}function fq(t){return t.userID?{Authorization:`Basic ${btoa(`${t.userID}:${t.password}`)}`}:{}}var yh={};function F0(t,e,r,n,s){n={...fq(t),...n},r={credentials:yh[t.baseUrl]?"omit":"include",...r,headers:n},fetch.__setGlobalDispatcher&&fetch.__setGlobalDispatcher(fetch.__defaultAgent),t.baseUrl.indexOf("https:")===0&&(t.rejectUnauthorized===!1&&fetch.__rejectUnauthorizedAgent?fetch.__setGlobalDispatcher?fetch.__setGlobalDispatcher(fetch.__rejectUnauthorizedAgent):r.agent=fetch.__rejectUnauthorizedAgent:fetch.__trustwaveAgent&&(r.agent=fetch.__trustwaveAgent));function i(A){if(A.ok)return s==="json"?A.json():A.text();throw new Error(A.statusText)}return UI(t.timeoutSecs*1e3,fetch(ns(t.baseUrl,e),r).then(i).catch(A=>(r.credentials=yh[t.baseUrl]?"include":"omit",fetch(ns(t.baseUrl,e),r).then(i).then(u=>(yh[t.baseUrl]=!yh[t.baseUrl],u)))))}function Eq(t,e,r,n="json",s){r.upload_&&(delete r.upload_,e+="?upload_");let i;return r.abortSignal_&&(i=r.abortSignal_,delete r.abortSignal_),F0(t,e,{method:"post",body:Xi(r,t.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...s},n)}function Cq(t,e,r,n="json",s){let i;return r.abortSignal_&&(i=r.abortSignal_,delete r.abortSignal_),F0(t,`${e}?${Xi(r,t.encodeRequest)}`,{method:"get",signal:i},{...s},n)}function Bq(t,e,r,n="json",s){let i;switch(t.type){case"jsonp":i=pq(t,e,r,n,s);break;case"get":i=Cq(t,e,r,n,s);break;case"post":default:i=Eq(t,e,r,n,s);break}return i}var wh=Bq;function lj(t){let e=wh;return t&&(wh=t),e}var $C=class t{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return arguments.length===0?this._opts:(this._opts={...hq,...e},this)}send(e,r,n="json",s){return this._opts.hookSend?this._opts.hookSend(this._opts,e,r,n,wh,s):wh(this._opts,e,r,n,s)}clone(){return new t(this.opts())}},Sh=function(t){return new $C(t)};function gj(t){let e=Sh;return Sh=t,e}function Iq(t){return Object.prototype.toString.call(t)==="[object Array]"}var Zi=class extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,r,n){super("ESPException: "+n.Source),this.action=e,this.request=r,this.Source=n.Source,this.Exception=n.Exception,n.Exception.length?this.message=`${n.Exception[0].Code}: ${n.Exception[0].Message}`:this.message=""}};function Bj(t){return t instanceof Zi||t.isESPExceptions&&Array.isArray(t.Exception)}function Qq(t){return t.send!==void 0}var Ku=class t{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,r,n){this._connection=Qq(e)?e:Sh(e),this._service=r,this._version=n}service(e){return e===void 0?this._service:(this._service=e,this)}version(e){return e===void 0?this._version:(this._version=e,this)}toESPStringArray(e,r){if(Iq(e[r])){for(let n=0;n<e[r].length;++n)e[r+"_i"+n]=e[r][n];delete e[r]}return e}opts(e){return e===void 0?this._connection.opts():(this._connection.opts(e),this)}send(e,r={},n="json",s=!1,i,A){let u={...r,ver_:this._version};s&&(u.upload_=!0),i&&(u.abortSignal_=i);let c,g="json";switch(n){case"text":c=ns(this._service,e),g="text";break;case"xsd":c=ns(this._service,e+".xsd"),g="text";break;case"json2":c=ns(this._service,e+"/json"),n="json",e=e.split("/").pop();break;default:c=ns(this._service,e+".json")}return this._connection.send(c,u,g).then(l=>{if(n==="json"){let d;if(l&&l.Exceptions)throw new Zi(e,u,l.Exceptions);if(l&&(d=l[A||e+"Response"]),!d)throw new Zi(e,u,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return d}return l})}clone(){return new t(this._connection.clone(),this._service,this._version)}},Re=class{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,r,n){this._connection=new Ku(e,r,n)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};var $u;(e=>{let t;(c=>(c.Delete="Delete",c.Protect="Protect",c.Unprotect="Unprotect",c.Restore="Restore",c.SetToFailed="SetToFailed",c.Archive="Archive"))(t=e.DFUWUActions||={})})($u||={});var bh=class extends Re{constructor(e){super(e,"FileSpray","1.26")}AbortDFUWorkunit(e){return this._connection.send("AbortDFUWorkunit",e,"json",!1,void 0,"AbortDFUWorkunitResponse")}Copy(e){return this._connection.send("Copy",e,"json",!1,void 0,"CopyResponse")}CreateDFUPublisherWorkunit(e){return this._connection.send("CreateDFUPublisherWorkunit",e,"json",!1,void 0,"CreateDFUPublisherWorkunitResponse")}CreateDFUWorkunit(e){return this._connection.send("CreateDFUWorkunit",e,"json",!1,void 0,"CreateDFUWorkunitResponse")}DFUWUFile(e){return this._connection.send("DFUWUFile",e,"json",!1,void 0,"DFUWUFileResponse")}DFUWUSearch(e){return this._connection.send("DFUWUSearch",e,"json",!1,void 0,"DFUWUSearchResponse")}DFUWorkunitsAction(e){return this._connection.send("DFUWorkunitsAction",e,"json",!1,void 0,"DFUWorkunitsActionResponse")}DeleteDFUWorkunit(e){return this._connection.send("DeleteDFUWorkunit",e,"json",!1,void 0,"DeleteDFUWorkunitResponse")}DeleteDFUWorkunits(e){return this._connection.send("DeleteDFUWorkunits",e,"json",!1,void 0,"DeleteDFUWorkunitsResponse")}DeleteDropZoneFiles(e){return this._connection.send("DeleteDropZoneFiles",e,"json",!1,void 0,"DFUWorkunitsActionResponse")}Despray(e){return this._connection.send("Despray",e,"json",!1,void 0,"DesprayResponse")}DfuMonitor(e){return this._connection.send("DfuMonitor",e,"json",!1,void 0,"DfuMonitorResponse")}DropZoneFileSearch(e){return this._connection.send("DropZoneFileSearch",e,"json",!1,void 0,"DropZoneFileSearchResponse")}DropZoneFiles(e){return this._connection.send("DropZoneFiles",e,"json",!1,void 0,"DropZoneFilesResponse")}EchoDateTime(e){return this._connection.send("EchoDateTime",e,"json",!1,void 0,"EchoDateTimeResponse")}FileList(e){return this._connection.send("FileList",e,"json",!1,void 0,"FileListResponse")}GetDFUExceptions(e){return this._connection.send("GetDFUExceptions",e,"json",!1,void 0,"GetDFUExceptionsResponse")}GetDFUProgress(e){return this._connection.send("GetDFUProgress",e,"json",!1,void 0,"ProgressResponse")}GetDFUServerQueues(e){return this._connection.send("GetDFUServerQueues",e,"json",!1,void 0,"GetDFUServerQueuesResponse")}GetDFUWorkunit(e){return this._connection.send("GetDFUWorkunit",e,"json",!1,void 0,"GetDFUWorkunitResponse")}GetDFUWorkunits(e){return this._connection.send("GetDFUWorkunits",e,"json",!1,void 0,"GetDFUWorkunitsResponse")}GetRemoteTargets(e){return this._connection.send("GetRemoteTargets",e,"json",!1,void 0,"GetRemoteTargetsResponse")}GetSprayTargets(e){return this._connection.send("GetSprayTargets",e,"json",!1,void 0,"GetSprayTargetsResponse")}OpenSave(e){return this._connection.send("OpenSave",e,"json",!1,void 0,"OpenSaveResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"FileSprayPingResponse")}Rename(e){return this._connection.send("Rename",e,"json",!1,void 0,"RenameResponse")}Replicate(e){return this._connection.send("Replicate",e,"json",!1,void 0,"ReplicateResponse")}ShowResult(e){return this._connection.send("ShowResult",e,"json",!1,void 0,"ShowResultResponse")}SprayFixed(e){return this._connection.send("SprayFixed",e,"json",!1,void 0,"SprayFixedResponse")}SprayVariable(e){return this._connection.send("SprayVariable",e,"json",!1,void 0,"SprayResponse")}SubmitDFUWorkunit(e){return this._connection.send("SubmitDFUWorkunit",e,"json",!1,void 0,"SubmitDFUWorkunitResponse")}UpdateDFUWorkunit(e){return this._connection.send("UpdateDFUWorkunit",e,"json",!1,void 0,"UpdateDFUWorkunitResponse")}};var mq=(l=>(l[l.unknown=0]="unknown",l[l.scheduled=1]="scheduled",l[l.queued=2]="queued",l[l.started=3]="started",l[l.aborted=4]="aborted",l[l.failed=5]="failed",l[l.finished=6]="finished",l[l.monitoring=7]="monitoring",l[l.aborting=8]="aborting",l[l.notfound=999]="notfound",l))(mq||{}),Ki=class extends bh{DFUWUFileEx(e){return this._connection.send("DFUWUFile",e,"text")}SprayFixedEx(e){return this._connection.send("SprayFixed",e)}SprayVariableEx(e){return this._connection.send("SprayVariable",e,"json",!1,null,"SprayResponse")}DesprayEx(e){return this._connection.send("Despray",e)}UpdateDFUWorkunitEx(e){return this._connection.send("UpdateDFUWorkunit",e,"json",!1,void 0,"UpdateDFUWorkunitResponse")}};var U0;(A=>{let t;(g=>(g.User="User",g.Group="Group"))(t=A.ViewMemberType||={});let e;(p=>(p.username="username",p.fullname="fullname",p.passwordexpiration="passwordexpiration",p.employeeID="employeeID",p.employeeNumber="employeeNumber"))(e=A.UserSortBy||={});let r;(g=>(g.Name="Name",g.ManagedBy="ManagedBy"))(r=A.GroupSortBy||={});let n;(l=>(l.Any="Any",l.User="User",l.Group="Group"))(n=A.AccountTypeReq||={});let s;(g=>(g.Name="Name",g.Type="Type"))(s=A.ResourcePermissionSortBy||={});let i;(c=>c.Name="Name")(i=A.ResourceSortBy||={})})(U0||={});var Rh=class extends Re{constructor(e){super(e,"ws_access","1.17")}AccountPermissions(e){return this._connection.send("AccountPermissions",e,"json",!1,void 0,"AccountPermissionsResponse")}AccountPermissionsV2(e){return this._connection.send("AccountPermissionsV2",e,"json",!1,void 0,"AccountPermissionsV2Response")}AddUser(e){return this._connection.send("AddUser",e,"json",!1,void 0,"AddUserResponse")}AddView(e){return this._connection.send("AddView",e,"json",!1,void 0,"AddViewResponse")}AddViewColumn(e){return this._connection.send("AddViewColumn",e,"json",!1,void 0,"AddViewColumnResponse")}AddViewMember(e){return this._connection.send("AddViewMember",e,"json",!1,void 0,"AddViewMemberResponse")}ClearPermissionsCache(e){return this._connection.send("ClearPermissionsCache",e,"json",!1,void 0,"ClearPermissionsCacheResponse")}DeleteView(e){return this._connection.send("DeleteView",e,"json",!1,void 0,"DeleteViewResponse")}DeleteViewColumn(e){return this._connection.send("DeleteViewColumn",e,"json",!1,void 0,"DeleteViewColumnResponse")}DeleteViewMember(e){return this._connection.send("DeleteViewMember",e,"json",!1,void 0,"DeleteViewMemberResponse")}DisableScopeScans(e){return this._connection.send("DisableScopeScans",e,"json",!1,void 0,"DisableScopeScansResponse")}EnableScopeScans(e){return this._connection.send("EnableScopeScans",e,"json",!1,void 0,"EnableScopeScansResponse")}FilePermission(e){return this._connection.send("FilePermission",e,"json",!1,void 0,"FilePermissionResponse")}GroupAction(e){return this._connection.send("GroupAction",e,"json",!1,void 0,"GroupActionResponse")}GroupAdd(e){return this._connection.send("GroupAdd",e,"json",!1,void 0,"GroupAddResponse")}GroupEdit(e){return this._connection.send("GroupEdit",e,"json",!1,void 0,"GroupEditResponse")}GroupMemberEdit(e){return this._connection.send("GroupMemberEdit",e,"json",!1,void 0,"GroupMemberEditResponse")}GroupMemberEditInput(e){return this._connection.send("GroupMemberEditInput",e,"json",!1,void 0,"GroupMemberEditInputResponse")}GroupMemberQuery(e){return this._connection.send("GroupMemberQuery",e,"json",!1,void 0,"GroupMemberQueryResponse")}GroupQuery(e){return this._connection.send("GroupQuery",e,"json",!1,void 0,"GroupQueryResponse")}Groups(e){return this._connection.send("Groups",e,"json",!1,void 0,"GroupResponse")}PermissionAction(e){return this._connection.send("PermissionAction",e,"json",!1,void 0,"PermissionActionResponse")}Permissions(e){return this._connection.send("Permissions",e,"json",!1,void 0,"BasednsResponse")}PermissionsReset(e){return this._connection.send("PermissionsReset",e,"json",!1,void 0,"PermissionsResetResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_accessPingResponse")}QueryScopeScansEnabled(e){return this._connection.send("QueryScopeScansEnabled",e,"json",!1,void 0,"QueryScopeScansEnabledResponse")}QueryUserViewColumns(e){return this._connection.send("QueryUserViewColumns",e,"json",!1,void 0,"QueryUserViewColumnsResponse")}QueryViewColumns(e){return this._connection.send("QueryViewColumns",e,"json",!1,void 0,"QueryViewColumnsResponse")}QueryViewMembers(e){return this._connection.send("QueryViewMembers",e,"json",!1,void 0,"QueryViewMembersResponse")}QueryViews(e){return this._connection.send("QueryViews",e,"json",!1,void 0,"QueryViewsResponse")}ResourceAdd(e){return this._connection.send("ResourceAdd",e,"json",!1,void 0,"ResourceAddResponse")}ResourceDelete(e){return this._connection.send("ResourceDelete",e,"json",!1,void 0,"ResourceDeleteResponse")}ResourcePermissionQuery(e){return this._connection.send("ResourcePermissionQuery",e,"json",!1,void 0,"ResourcePermissionQueryResponse")}ResourcePermissions(e){return this._connection.send("ResourcePermissions",e,"json",!1,void 0,"ResourcePermissionsResponse")}ResourceQuery(e){return this._connection.send("ResourceQuery",e,"json",!1,void 0,"ResourceQueryResponse")}Resources(e){return this._connection.send("Resources",e,"json",!1,void 0,"ResourcesResponse")}UserAccountExport(e){return this._connection.send("UserAccountExport",e,"json",!1,void 0,"UserAccountExportResponse")}UserAction(e){return this._connection.send("UserAction",e,"json",!1,void 0,"UserActionResponse")}UserEdit(e){return this._connection.send("UserEdit",e,"json",!1,void 0,"UserEditResponse")}UserGroupEdit(e){return this._connection.send("UserGroupEdit",e,"json",!1,void 0,"UserGroupEditResponse")}UserGroupEditInput(e){return this._connection.send("UserGroupEditInput",e,"json",!1,void 0,"UserGroupEditInputResponse")}UserInfoEdit(e){return this._connection.send("UserInfoEdit",e,"json",!1,void 0,"UserInfoEditResponse")}UserInfoEditInput(e){return this._connection.send("UserInfoEditInput",e,"json",!1,void 0,"UserInfoEditInputResponse")}UserPosix(e){return this._connection.send("UserPosix",e,"json",!1,void 0,"UserPosixResponse")}UserPosixInput(e){return this._connection.send("UserPosixInput",e,"json",!1,void 0,"UserPosixInputResponse")}UserQuery(e){return this._connection.send("UserQuery",e,"json",!1,void 0,"UserQueryResponse")}UserResetPass(e){return this._connection.send("UserResetPass",e,"json",!1,void 0,"UserResetPassResponse")}UserResetPassInput(e){return this._connection.send("UserResetPassInput",e,"json",!1,void 0,"UserResetPassInputResponse")}UserSudoers(e){return this._connection.send("UserSudoers",e,"json",!1,void 0,"UserSudoersResponse")}UserSudoersInput(e){return this._connection.send("UserSudoersInput",e,"json",!1,void 0,"UserSudoersInputResponse")}Users(e){return this._connection.send("Users",e,"json",!1,void 0,"UserResponse")}};var N0=class extends Rh{};var Fh=class extends Re{constructor(e){super(e,"ws_account","1.07")}MyAccount(e){return this._connection.send("MyAccount",e,"json",!1,void 0,"MyAccountResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_accountPingResponse")}UpdateUser(e){return this._connection.send("UpdateUser",e,"json",!1,void 0,"UpdateUserResponse")}UpdateUserInput(e){return this._connection.send("UpdateUserInput",e,"json",!1,void 0,"UpdateUserInputResponse")}VerifyUser(e){return this._connection.send("VerifyUser",e,"json",!1,void 0,"VerifyUserResponse")}};var T0=class extends Fh{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(r=>{if(r.isESPExceptions&&r.Exception.some(n=>n.Code===20043))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:r.Exception}};throw r})}};var Uh=class extends Re{constructor(e){super(e,"WsCloud","1.02")}GetPODs(e){return this._connection.send("GetPODs",e,"json",!1,void 0,"GetPODsResponse")}GetServices(e){return this._connection.send("GetServices",e,"json",!1,void 0,"GetServicesResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsCloudPingResponse")}};var Dq=kt("@hpcc-js/comms/services/wsCloud.ts");function yq(t){return t?.Pods!==void 0}function wq(t){return t.spec?.containers?.reduce((e,r)=>(r.ports?.forEach(n=>{e.push({ContainerPort:n.containerPort,Name:n.name,Protocol:n.protocol})}),e),[])??[]}function Sq(t){return t.filter(e=>{let r=e?.metadata?.labels??{};return r.hasOwnProperty("app.kubernetes.io/part-of")&&r["app.kubernetes.io/part-of"]==="HPCC-Platform"}).map(e=>{let r=new Date(e.metadata?.creationTimestamp);return{Name:e.metadata.name,Status:e.status?.phase,CreationTimestamp:r.toISOString(),ContainerName:e.status?.containerStatuses?.reduce((n,s)=>(s.name&&n.push(s.name),n),[]).join(", ")??"",ContainerCount:e.spec?.containers?.length??0,ContainerReadyCount:e.status?.containerStatuses?.reduce((n,s)=>n+(s.ready?1:0),0),ContainerRestartCount:e.status?.containerStatuses?.reduce((n,s)=>n+s.restartCount,0),Ports:{Port:wq(e)}}})}var M0=class extends Uh{getPODs(){return super.GetPODs({}).then(e=>{if(yq(e))return e.Pods?.Pod??[];try{let r=typeof e.Result=="string"?JSON.parse(e.Result):e.Result;return Sq(r?.items??[])}catch(r){return Dq.error(`Error parsing V1Pods json '${r instanceof Error?r.message:String(r)}'`),[]}})}};var x0=class{_connection;constructor(e){this._connection=new Ku(e,"ws_codesign","1.1")}connectionOptions(){return this._connection.opts()}ListUserIDs(e){return this._connection.send("ListUserIDs",e).then(r=>r.UserIDs.Item).catch(r=>[])}Sign(e){return this._connection.send("Sign",{SigningMethod:"gpg",...e})}Verify(e){return this._connection.send("Verify",e)}};var Nh=class extends Re{constructor(e){super(e,"WSDali","1.07")}Add(e){return this._connection.send("Add",e,"json",!1,void 0,"ResultResponse")}ClearTraceTransactions(e){return this._connection.send("ClearTraceTransactions",e,"json",!1,void 0,"ResultResponse")}Count(e){return this._connection.send("Count",e,"json",!1,void 0,"CountResponse")}DFSCheck(e){return this._connection.send("DFSCheck",e,"json",!1,void 0,"ResultResponse")}DFSExists(e){return this._connection.send("DFSExists",e,"json",!1,void 0,"BooleanResponse")}DFSLS(e){return this._connection.send("DFSLS",e,"json",!1,void 0,"ResultResponse")}Delete(e){return this._connection.send("Delete",e,"json",!1,void 0,"ResultResponse")}DisconnectClientConnection(e){return this._connection.send("DisconnectClientConnection",e,"json",!1,void 0,"ResultResponse")}GetClients(e){return this._connection.send("GetClients",e,"json",!1,void 0,"ResultResponse")}GetConnections(e){return this._connection.send("GetConnections",e,"json",!1,void 0,"ResultResponse")}GetDFSCSV(e){return this._connection.send("GetDFSCSV",e,"json",!1,void 0,"ResultResponse")}GetDFSMap(e){return this._connection.send("GetDFSMap",e,"json",!1,void 0,"ResultResponse")}GetDFSParents(e){return this._connection.send("GetDFSParents",e,"json",!1,void 0,"ResultResponse")}GetLogicalFile(e){return this._connection.send("GetLogicalFile",e,"json",!1,void 0,"ResultResponse")}GetLogicalFilePart(e){return this._connection.send("GetLogicalFilePart",e,"json",!1,void 0,"ResultResponse")}GetProtectedList(e){return this._connection.send("GetProtectedList",e,"json",!1,void 0,"ResultResponse")}GetSDSStats(e){return this._connection.send("GetSDSStats",e,"json",!1,void 0,"ResultResponse")}GetSDSSubscribers(e){return this._connection.send("GetSDSSubscribers",e,"json",!1,void 0,"ResultResponse")}GetValue(e){return this._connection.send("GetValue",e,"json",!1,void 0,"ResultResponse")}Import(e){return this._connection.send("Import",e,"json",!1,void 0,"ResultResponse")}ListSDSLocks(e){return this._connection.send("ListSDSLocks",e,"json",!1,void 0,"ResultResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WSDaliPingResponse")}SaveSDSStore(e){return this._connection.send("SaveSDSStore",e,"json",!1,void 0,"ResultResponse")}SetLogicalFilePartAttr(e){return this._connection.send("SetLogicalFilePartAttr",e,"json",!1,void 0,"ResultResponse")}SetProtected(e){return this._connection.send("SetProtected",e,"json",!1,void 0,"ResultResponse")}SetTraceSlowTransactions(e){return this._connection.send("SetTraceSlowTransactions",e,"json",!1,void 0,"ResultResponse")}SetTraceTransactions(e){return this._connection.send("SetTraceTransactions",e,"json",!1,void 0,"ResultResponse")}SetUnprotected(e){return this._connection.send("SetUnprotected",e,"json",!1,void 0,"ResultResponse")}SetValue(e){return this._connection.send("SetValue",e,"json",!1,void 0,"ResultResponse")}UnlockSDSLock(e){return this._connection.send("UnlockSDSLock",e,"json",!1,void 0,"ResultResponse")}};var k0=class extends Nh{};var OA;(u=>{let t;(p=>(p.Delete="Delete",p.AddToSuperfile="Add To Superfile",p.ChangeProtection="Change Protection",p.ChangeRestriction="Change Restriction"))(t=u.DFUArrayActions||={});let e;(p=>(p[p.NoChange=0]="NoChange",p[p.Protect=1]="Protect",p[p.Unprotect=2]="Unprotect",p[p.UnprotectAll=3]="UnprotectAll"))(e=u.DFUChangeProtection||={});let r;(d=>(d[d.NoChange=0]="NoChange",d[d.Restrict=1]="Restrict",d[d.Unrestricted=2]="Unrestricted"))(r=u.DFUChangeRestriction||={});let n;(l=>(l.xml="xml",l.def="def"))(n=u.DFUDefFileFormat||={});let s;(d=>(d.Token="Token",d.Engine="Engine",d.External="External"))(s=u.FileAccessRole||={});let i;(B=>(B.None="None",B.Access="Access",B.Read="Read",B.Write="Write",B.Full="Full"))(i=u.SecAccessType||={});let A;(D=>(D.Flat="Flat",D.Index="Index",D.Xml="Xml",D.Csv="Csv",D.Json="Json",D.IndexLocal="IndexLocal",D.IndexPartitioned="IndexPartitioned",D.Unset="Unset"))(A=u.DFUFileType||={})})(OA||={});var Th=class extends Re{constructor(e){super(e,"WsDfu","1.65")}Add(e){return this._connection.send("Add",e,"json",!1,void 0,"AddResponse")}AddRemote(e){return this._connection.send("AddRemote",e,"json",!1,void 0,"AddRemoteResponse")}AddtoSuperfile(e){return this._connection.send("AddtoSuperfile",e,"json",!1,void 0,"AddtoSuperfileResponse")}DFUArrayAction(e){return this._connection.send("DFUArrayAction",e,"json",!1,void 0,"DFUArrayActionResponse")}DFUBrowseData(e){return this._connection.send("DFUBrowseData",e,"json",!1,void 0,"DFUBrowseDataResponse")}DFUDefFile(e){return this._connection.send("DFUDefFile",e,"json",!1,void 0,"DFUDefFileResponse")}DFUFileAccess(e){return this._connection.send("DFUFileAccess",e,"json",!1,void 0,"DFUFileAccessResponse")}DFUFileAccessV2(e){return this._connection.send("DFUFileAccessV2",e,"json",!1,void 0,"DFUFileAccessResponse")}DFUFileCreate(e){return this._connection.send("DFUFileCreate",e,"json",!1,void 0,"DFUFileCreateResponse")}DFUFileCreateV2(e){return this._connection.send("DFUFileCreateV2",e,"json",!1,void 0,"DFUFileCreateResponse")}DFUFilePublish(e){return this._connection.send("DFUFilePublish",e,"json",!1,void 0,"DFUFilePublishResponse")}DFUFileView(e){return this._connection.send("DFUFileView",e,"json",!1,void 0,"DFUFileViewResponse")}DFUGetDataColumns(e){return this._connection.send("DFUGetDataColumns",e,"json",!1,void 0,"DFUGetDataColumnsResponse")}DFUGetFileMetaData(e){return this._connection.send("DFUGetFileMetaData",e,"json",!1,void 0,"DFUGetFileMetaDataResponse")}DFUInfo(e){return this._connection.send("DFUInfo",e,"json",!1,void 0,"DFUInfoResponse")}DFUQuery(e){return this._connection.send("DFUQuery",e,"json",!1,void 0,"DFUQueryResponse")}DFURecordTypeInfo(e){return this._connection.send("DFURecordTypeInfo",e,"json",!1,void 0,"DFURecordTypeInfoResponse")}DFUSearch(e){return this._connection.send("DFUSearch",e,"json",!1,void 0,"DFUSearchResponse")}DFUSearchData(e){return this._connection.send("DFUSearchData",e,"json",!1,void 0,"DFUSearchDataResponse")}DFUSpace(e){return this._connection.send("DFUSpace",e,"json",!1,void 0,"DFUSpaceResponse")}EclRecordTypeInfo(e){return this._connection.send("EclRecordTypeInfo",e,"json",!1,void 0,"EclRecordTypeInfoResponse")}EraseHistory(e){return this._connection.send("EraseHistory",e,"json",!1,void 0,"EraseHistoryResponse")}ListHistory(e){return this._connection.send("ListHistory",e,"json",!1,void 0,"ListHistoryResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsDfuPingResponse")}Savexml(e){return this._connection.send("Savexml",e,"json",!1,void 0,"SavexmlResponse")}SuperfileAction(e){return this._connection.send("SuperfileAction",e,"json",!1,void 0,"SuperfileActionResponse")}SuperfileList(e){return this._connection.send("SuperfileList",e,"json",!1,void 0,"SuperfileListResponse")}};var Xj=OA.DFUArrayActions,Zj=OA.DFUDefFileFormat,Kj=OA.DFUChangeProtection,$j=OA.DFUChangeRestriction,ec=class extends Th{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}async recursiveFetchLogicalFiles(e){let r=[],n=[];return await Promise.all(e.map(s=>this.DFUInfo({Cluster:s.NodeGroup,Name:s.Name,IncludeJsonTypeInfo:!1,IncludeBinTypeInfo:!1,ForceIndexInfo:!1}).then(i=>{for(let A of i?.FileDetail?.Superfiles?.DFULogicalFile??[])r.push(A);for(let A of i?.FileDetail?.subfiles?.Item??[])n.push(A)}))),n.concat(r.length?await this.recursiveFetchLogicalFiles(r):[])}};var W0=class extends Re{constructor(e){super(e,"WsDFUXRef","1.01")}DFUXRefArrayAction(e){return this._connection.send("DFUXRefArrayAction",e)}DFUXRefBuild(e){return this._connection.send("DFUXRefBuild",e)}DFUXRefBuildCancel(e){return this._connection.send("DFUXRefBuildCancel",e)}DFUXRefCleanDirectories(e){return this._connection.send("DFUXRefCleanDirectories",e)}DFUXRefDirectories(e){return this._connection.send("DFUXRefDirectories",e,void 0,void 0,void 0,"DFUXRefDirectoriesQueryResponse")}DFUXRefFoundFiles(e){return this._connection.send("DFUXRefFoundFiles",e,void 0,void 0,void 0,"DFUXRefFoundFilesQueryResponse")}DFUXRefList(e={}){return this._connection.send("DFUXRefList",e)}DFUXRefLostFiles(e){return this._connection.send("DFUXRefLostFiles",e,void 0,void 0,void 0,"DFUXRefLostFilesQueryResponse")}DFUXRefMessages(e){return this._connection.send("DFUXRefMessages",e,void 0,void 0,void 0,"DFUXRefMessagesQueryResponse")}DFUXRefOrphanFiles(e){return this._connection.send("DFUXRefOrphanFiles",e,void 0,void 0,void 0,"DFUXRefOrphanFilesQueryResponse")}DFUXRefUnusedFiles(e){return this._connection.send("DFUXRefUnusedFiles",e)}};function L0(t,e){let r=typeof e;switch(r){case"boolean":case"number":case"string":return{id:t,type:r};case"object":if(e.Row instanceof Array&&(e=e.Row),e instanceof Array)return{id:t,type:"dataset",children:eB(e[0])};if(e instanceof Object){if(e.Item&&e.Item instanceof Array&&e.Item.length===1){let n=typeof e.Item[0];if(n==="string"||n==="number")return{id:t,type:"set",fieldType:n};throw new Error("Unknown field type")}return{id:t,type:"object",fields:bq(e)}}default:throw new Error("Unknown field type")}}function eB(t){t.Row&&t.Row instanceof Array&&(t=t.Row[0]);let e=[];for(let r in t)e.push(L0(r,t[r]));return e}function bq(t){let e={};for(let r in t)e[r]=L0(r,t[r]);return e}var Mh=class extends Re{constructor(e){super(e,"WsEcl","0")}opts(){return this._connection.opts()}requestJson(e,r){return this._connection.send(`example/request/query/${e}/${r}/json`,{},"text").then(n=>{let s=JSON.parse(n);for(let i in s)return s[i];return{}}).then(eB)}responseJson(e,r){return this._connection.send(`example/response/query/${e}/${r}/json`,{},"text").then(n=>{let s=JSON.parse(n);for(let i in s)return s[i].Results;return{}}).then(n=>{let s={};for(let i in n)s[i]=eB(n[i]);return s})}submit(e,r,n){let s=`submit/query/${e}/${r}`;return this._connection.send(s,n,"json2").then(i=>{if(i.Results&&i.Results.Exception)throw new Zi(s,n,{Source:"wsEcl.submit",Exception:i.Results.Exception});return i.Results})}};var xh=class extends Re{constructor(e){super(e,"ws_elk","1")}GetConfigDetails(e){return this._connection.send("GetConfigDetails",e)}Ping(e){return this._connection.send("Ping",e)}};var v0=class extends xh{};var Ct;(c=>{let t;(J=>(J.global="global",J.workunits="workunits",J.components="components",J.audience="audience",J.class="class",J.instance="instance",J.node="node",J.message="message",J.logid="logid",J.processid="processid",J.threadid="threadid",J.timestamp="timestamp",J.pod="pod",J.traceid="traceid",J.spanid="spanid"))(t=c.LogColumnType||={});let e;(E=>(E.string="string",E.numeric="numeric",E.datetime="datetime",E.enum="enum",E.epoch="epoch"))(e=c.LogColumnValueType||={});let r;(y=>(y[y.All=0]="All",y[y.ByJobID=1]="ByJobID",y[y.ByComponent=2]="ByComponent",y[y.ByLogType=3]="ByLogType",y[y.ByTargetAudience=4]="ByTargetAudience",y[y.BySourceInstance=5]="BySourceInstance",y[y.BySourceNode=6]="BySourceNode",y[y.ByFieldName=7]="ByFieldName",y[y.ByPod=8]="ByPod",y[y.ByTraceID=9]="ByTraceID",y[y.BySpanID=10]="BySpanID"))(r=c.LogAccessType||={});let n;(p=>(p[p.Success=0]="Success",p[p.Warning=1]="Warning",p[p.Fail=2]="Fail"))(n=c.LogAccessStatusCode||={});let s;(p=>(p[p.NONE=0]="NONE",p[p.AND=1]="AND",p[p.OR=2]="OR"))(s=c.LogAccessFilterOperator||={});let i;(B=>(B[B.MIN=0]="MIN",B[B.DEFAULT=1]="DEFAULT",B[B.ALL=2]="ALL",B[B.CUSTOM=3]="CUSTOM"))(i=c.LogSelectColumnMode||={});let A;(y=>(y[y.ByDate=0]="ByDate",y[y.ByJobID=1]="ByJobID",y[y.ByComponent=2]="ByComponent",y[y.ByLogType=3]="ByLogType",y[y.ByTargetAudience=4]="ByTargetAudience",y[y.BySourceInstance=5]="BySourceInstance",y[y.BySourceNode=6]="BySourceNode",y[y.ByFieldName=7]="ByFieldName",y[y.ByPod=8]="ByPod",y[y.ByTraceID=9]="ByTraceID",y[y.BySpanID=10]="BySpanID"))(A=c.SortColumType||={});let u;(d=>(d[d.ASC=0]="ASC",d[d.DSC=1]="DSC"))(u=c.SortDirection||={})})(Ct||={});var kh=class extends Re{constructor(e){super(e,"ws_logaccess","1.08")}GetHealthReport(e){return this._connection.send("GetHealthReport",e,"json",!1,void 0,"GetHealthReportResponse")}GetLogAccessInfo(e){return this._connection.send("GetLogAccessInfo",e,"json",!1,void 0,"GetLogAccessInfoResponse")}GetLogs(e){return this._connection.send("GetLogs",e,"json",!1,void 0,"GetLogsResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_logaccessPingResponse")}};var P0=kt("@hpcc-js/comms/services/wsLogaccess.ts");var Rq=(A=>(A.Disaster="DIS",A.Error="ERR",A.Warning="WRN",A.Information="INF",A.Progress="PRO",A.Metric="MET",A))(Rq||{}),Fq=(s=>(s.Operator="OPR",s.User="USR",s.Programmer="PRO",s.Audit="ADT",s))(Fq||{}),G0=class extends kh{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}async GetLogsEx(e){let r=await this.GetLogAccessInfo(),n={};r.Columns.Column.forEach(u=>n[u.LogType]=u.Name);let s=u=>{let c={};for(let g in n)u?.fields?c[g]=Object.assign({},...u.fields)[n[g]]??"":c[g]="";return c},i={Filter:{leftBinaryFilter:{BinaryLogFilter:[{leftFilter:{LogCategory:Ct.LogAccessType.All}}]}},Range:{StartDate:new Date(0).toISOString()},LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:Ct.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:Ct.SortColumType.ByDate,ColumnName:"",Direction:0}]}},A=[];for(let u in e){let c;u in n&&(Object.values(Ct.LogColumnType).includes(u)?c=u:c=n[u]);let g;if(c){switch(c){case Ct.LogColumnType.workunits:case"hpcc.log.jobid":g=Ct.LogAccessType.ByJobID;break;case Ct.LogColumnType.audience:case"hpcc.log.audience":g=Ct.LogAccessType.ByTargetAudience;break;case Ct.LogColumnType.class:case"hpcc.log.class":g=Ct.LogAccessType.ByLogType;break;case Ct.LogColumnType.components:case"kubernetes.container.name":g=Ct.LogAccessType.ByComponent;break;default:g=Ct.LogAccessType.ByFieldName,c=n[u]}if(Array.isArray(e[u]))e[u].forEach(l=>{g===Ct.LogAccessType.ByComponent&&(l+="*"),A.push({LogCategory:g,SearchField:c,SearchByValue:l})});else{let l=e[u];g===Ct.LogAccessType.ByComponent&&(l+="*"),A.push({LogCategory:g,SearchField:c,SearchByValue:l})}}}if(A.length>2){let u=i.Filter.leftBinaryFilter.BinaryLogFilter[0];A.forEach((c,g)=>{let l=Ct.LogAccessFilterOperator.AND;g>0?(A[g-1].SearchField===c.SearchField&&(l=Ct.LogAccessFilterOperator.OR),g===A.length-1?(u.Operator=l,u.rightFilter=c):(u.Operator=l,u.rightBinaryFilter={BinaryLogFilter:[{leftFilter:c}]},u=u.rightBinaryFilter.BinaryLogFilter[0])):u.leftFilter=c})}else delete i.Filter.leftBinaryFilter,i.Filter.leftFilter={LogCategory:Ct.LogAccessType.All},A[0]?.SearchField&&(i.Filter.leftFilter={LogCategory:A[0]?.LogCategory,SearchField:A[0]?.SearchField,SearchByValue:A[0]?.SearchByValue}),A[1]?.SearchField&&(i.Filter.Operator=Ct.LogAccessFilterOperator.AND,A[0].SearchField===A[1].SearchField&&(i.Filter.Operator=Ct.LogAccessFilterOperator.OR),i.Filter.rightFilter={LogCategory:A[1]?.LogCategory,SearchField:A[1]?.SearchField,SearchByValue:A[1]?.SearchByValue});return e.StartDate&&(i.Range.StartDate=e.StartDate.toISOString()),e.EndDate&&(i.Range.EndDate=e.EndDate.toISOString()),this.GetLogs(i).then(u=>{try{let c=JSON.parse(u.LogLines),g=[];switch(r.RemoteLogManagerType){case"azureloganalyticscurl":case"elasticstack":case"grafanacurl":g=c.lines?.map(s)??[];break;default:P0.warning(`Unknown RemoteLogManagerType: ${r.RemoteLogManagerType}`),g=[]}return{lines:g,total:u.TotalLogLinesAvailable??1e4}}catch(c){P0.error(c.message??c)}return{lines:[],total:0}})}};var ti=sn(_0(),1);var Lh=class extends Re{constructor(e){super(e,"ws_machine","1.17")}GetComponentStatus(e){return this._connection.send("GetComponentStatus",e)}GetComponentUsage(e){return this._connection.send("GetComponentUsage",e)}GetMachineInfo(e){return this._connection.send("GetMachineInfo",e)}GetMachineInfoEx(e){return this._connection.send("GetMachineInfoEx",e)}GetMetrics(e){return this._connection.send("GetMetrics",e)}GetNodeGroupUsage(e){return this._connection.send("GetNodeGroupUsage",e)}GetTargetClusterInfo(e){return this._connection.send("GetTargetClusterInfo",e)}GetTargetClusterUsage(e){return this._connection.send("GetTargetClusterUsage",e)}Ping(e){return this._connection.send("Ping",e)}UpdateComponentStatus(e){return this._connection.send("UpdateComponentStatus",e)}};var ri=class extends Lh{GetTargetClusterUsageEx(e,r=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:r}).then(n=>An("TargetClusterUsages.TargetClusterUsage",n)?n.TargetClusterUsages.TargetClusterUsage:[]).then(n=>n.filter(s=>!!s.ComponentUsages).map(s=>{let i=s.ComponentUsages.ComponentUsage.map(A=>{let u=(A.MachineUsages&&A.MachineUsages.MachineUsage?A.MachineUsages.MachineUsage:[]).map(c=>{let g=c.DiskUsages&&c.DiskUsages.DiskUsage?c.DiskUsages.DiskUsage.map(l=>({...l,InUse:l.InUse*1024,Total:(l.InUse+l.Available)*1024,PercentUsed:100-l.PercentAvailable})):[];return{Name:c.Name,NetAddress:c.NetAddress,Description:c.Description,DiskUsages:g,mean:(0,ti.mean)(g.filter(l=>!isNaN(l.PercentUsed)),l=>l.PercentUsed),max:(0,ti.max)(g.filter(l=>!isNaN(l.PercentUsed)),l=>l.PercentUsed)}});return{Type:A.Type,Name:A.Name,Description:A.Description,MachineUsages:u,MachineUsagesDescription:u.reduce((c,g)=>c+(g.Description||""),""),mean:(0,ti.mean)(u.filter(c=>!isNaN(c.mean)),c=>c.mean),max:(0,ti.max)(u.filter(c=>!isNaN(c.max)),c=>c.max)}});return{Name:s.Name,Description:s.Description,ComponentUsages:i,ComponentUsagesDescription:i.reduce((A,u)=>A+(u.MachineUsagesDescription||""),""),mean:(0,ti.mean)(i.filter(A=>!isNaN(A.mean)),A=>A.mean),max:(0,ti.max)(i.filter(A=>!isNaN(A.max)),A=>A.max)}}))}};var vh=class extends Re{constructor(e){super(e,"WsPackageProcess","1.04")}ActivatePackage(e){return this._connection.send("ActivatePackage",e)}AddPackage(e){return this._connection.send("AddPackage",e)}AddPartToPackageMap(e){return this._connection.send("AddPartToPackageMap",e)}CopyPackageMap(e){return this._connection.send("CopyPackageMap",e)}DeActivatePackage(e){return this._connection.send("DeActivatePackage",e)}DeletePackage(e){return this._connection.send("DeletePackage",e)}Echo(e){return this._connection.send("Echo",e)}GetPackage(e){return this._connection.send("GetPackage",e)}GetPackageMapById(e){return this._connection.send("GetPackageMapById",e)}GetPackageMapSelectOptions(e){return this._connection.send("GetPackageMapSelectOptions",e)}GetPartFromPackageMap(e){return this._connection.send("GetPartFromPackageMap",e)}GetQueryFileMapping(e){return this._connection.send("GetQueryFileMapping",e)}ListPackage(e){return this._connection.send("ListPackage",e)}ListPackages(e){return this._connection.send("ListPackages",e)}Ping(e){return this._connection.send("Ping",e)}RemovePartFromPackageMap(e){return this._connection.send("RemovePartFromPackageMap",e)}ValidatePackage(e){return this._connection.send("ValidatePackage",e)}};var Y0=class extends vh{};var Ph=class extends Re{constructor(e){super(e,"WsResources","1.01")}Ping(e){return this._connection.send("Ping",e)}ServiceQuery(e){return this._connection.send("ServiceQuery",e)}WebLinksQuery(e){return this._connection.send("WebLinksQuery",e)}};var H0=class extends Ph{};var O0;(e=>{let t;(s=>(s.ECL="ECL",s.DFU="DFU"))(t=e.WUTypes||={})})(O0||={});var Gh=class extends Re{constructor(e){super(e,"WSSasha","1.01")}ArchiveWU(e){return this._connection.send("ArchiveWU",e,"json",!1,void 0,"ResultResponse")}GetVersion(e){return this._connection.send("GetVersion",e,"json",!1,void 0,"ResultResponse")}ListWU(e){return this._connection.send("ListWU",e,"json",!1,void 0,"ResultResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WSSashaPingResponse")}RestoreWU(e){return this._connection.send("RestoreWU",e,"json",!1,void 0,"ResultResponse")}};var q0=class extends Gh{};var J0;(r=>{let t;(c=>(c.ALL="ALL",c.READ="READ",c.WRITE="WRITE",c.HOLD="HOLD",c.SUB="SUB"))(t=r.LockModes||={});let e;(d=>(d.Attach="Attach",d.Detach="Detach",d.State="State",d.Reload="Reload",d.ReloadRetry="ReloadRetry",d.MemLock="MemLock",d.MemUnlock="MemUnlock",d.GetMemLocked="GetMemLocked"))(e=r.RoxieControlCmdType||={})})(J0||={});var Vh=class extends Re{constructor(e){super(e,"WsSMC","1.27")}Activity(e){return this._connection.send("Activity",e,"json",!1,void 0,"ActivityResponse")}BrowseResources(e){return this._connection.send("BrowseResources",e,"json",!1,void 0,"BrowseResourcesResponse")}ClearQueue(e){return this._connection.send("ClearQueue",e,"json",!1,void 0,"SMCQueueResponse")}GetBuildInfo(e){return this._connection.send("GetBuildInfo",e,"json",!1,void 0,"GetBuildInfoResponse")}GetStatusServerInfo(e){return this._connection.send("GetStatusServerInfo",e,"json",!1,void 0,"GetStatusServerInfoResponse")}GetThorQueueAvailability(e){return this._connection.send("GetThorQueueAvailability",e,"json",!1,void 0,"GetThorQueueAvailabilityResponse")}Index(e){return this._connection.send("Index",e,"json",!1,void 0,"SMCIndexResponse")}LockQuery(e){return this._connection.send("LockQuery",e,"json",!1,void 0,"LockQueryResponse")}MoveJobBack(e){return this._connection.send("MoveJobBack",e,"json",!1,void 0,"SMCJobResponse")}MoveJobDown(e){return this._connection.send("MoveJobDown",e,"json",!1,void 0,"SMCJobResponse")}MoveJobFront(e){return this._connection.send("MoveJobFront",e,"json",!1,void 0,"SMCJobResponse")}MoveJobUp(e){return this._connection.send("MoveJobUp",e,"json",!1,void 0,"SMCJobResponse")}NotInCommunityEdition(e){return this._connection.send("NotInCommunityEdition",e,"json",!1,void 0,"NotInCommunityEditionResponse")}PauseQueue(e){return this._connection.send("PauseQueue",e,"json",!1,void 0,"SMCQueueResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsSMCPingResponse")}RemoveJob(e){return this._connection.send("RemoveJob",e,"json",!1,void 0,"SMCJobResponse")}ResumeQueue(e){return this._connection.send("ResumeQueue",e,"json",!1,void 0,"SMCQueueResponse")}RoxieControlCmd(e){return this._connection.send("RoxieControlCmd",e,"json",!1,void 0,"RoxieControlCmdResponse")}RoxieXrefCmd(e){return this._connection.send("RoxieXrefCmd",e,"json",!1,void 0,"RoxieXrefCmdResponse")}SetBanner(e){return this._connection.send("SetBanner",e,"json",!1,void 0,"SetBannerResponse")}SetJobPriority(e){return this._connection.send("SetJobPriority",e,"json",!1,void 0,"SMCPriorityResponse")}StopQueue(e){return this._connection.send("StopQueue",e,"json",!1,void 0,"SMCQueueResponse")}};var tc=class extends Vh{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(r=>({Running:{ActiveWorkunit:[]},...r}))}};var rc=class extends Re{constructor(e){super(e,"WsStore","1")}CreateStore(e){return this._connection.send("Fetch",e)}Delete(e){return this._connection.send("Delete",e).catch(r=>{if(r.isESPExceptions&&r.Exception.some(n=>n.Code===-1))return{Exceptions:void 0,Success:!0};throw r})}DeleteNamespace(e){return this._connection.send("DeleteNamespace",e)}Fetch(e){return this._connection.send("Fetch",e).catch(r=>{if(r.isESPExceptions&&r.Exception.some(n=>n.Code===-1))return{Exceptions:void 0,Value:void 0};throw r})}FetchAll(e){return this._connection.send("FetchAll",e)}FetchKeyMD(e){return this._connection.send("FetchKeyMD",e)}ListKeys(e){return this._connection.send("ListKeys",e)}ListNamespaces(e){return this._connection.send("ListNamespaces",e)}Set(e){return this._connection.send("Set",e)}};var j0;(e=>{let t;(i=>(i.All="All",i.QueriesOnly="QueriesOnly",i.WorkunitsOnly="WorkunitsOnly"))(t=e.RoxieQueueFilter||={})})(j0||={});var _h=class extends Re{constructor(e){super(e,"WsTopology","1.32")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsTopologyPingResponse")}SystemLog(e){return this._connection.send("SystemLog",e,"json",!1,void 0,"SystemLogResponse")}TpClusterInfo(e){return this._connection.send("TpClusterInfo",e,"json",!1,void 0,"TpClusterInfoResponse")}TpClusterQuery(e){return this._connection.send("TpClusterQuery",e,"json",!1,void 0,"TpClusterQueryResponse")}TpDropZoneQuery(e){return this._connection.send("TpDropZoneQuery",e,"json",!1,void 0,"TpDropZoneQueryResponse")}TpGetComponentFile(e){return this._connection.send("TpGetComponentFile",e,"json",!1,void 0,"TpGetComponentFileResponse")}TpGetServicePlugins(e){return this._connection.send("TpGetServicePlugins",e,"json",!1,void 0,"TpGetServicePluginsResponse")}TpGroupQuery(e){return this._connection.send("TpGroupQuery",e,"json",!1,void 0,"TpGroupQueryResponse")}TpListLogFiles(e){return this._connection.send("TpListLogFiles",e,"json",!1,void 0,"TpListLogFilesResponse")}TpListTargetClusters(e){return this._connection.send("TpListTargetClusters",e,"json",!1,void 0,"TpListTargetClustersResponse")}TpLogFile(e){return this._connection.send("TpLogFile",e,"json",!1,void 0,"TpLogFileResponse")}TpLogFileDisplay(e){return this._connection.send("TpLogFileDisplay",e,"json",!1,void 0,"TpLogFileResponse")}TpLogicalClusterQuery(e){return this._connection.send("TpLogicalClusterQuery",e,"json",!1,void 0,"TpLogicalClusterQueryResponse")}TpMachineInfo(e){return this._connection.send("TpMachineInfo",e,"json",!1,void 0,"TpMachineInfoResponse")}TpMachineQuery(e){return this._connection.send("TpMachineQuery",e,"json",!1,void 0,"TpMachineQueryResponse")}TpServiceQuery(e){return this._connection.send("TpServiceQuery",e,"json",!1,void 0,"TpServiceQueryResponse")}TpSetMachineStatus(e){return this._connection.send("TpSetMachineStatus",e,"json",!1,void 0,"TpSetMachineStatusResponse")}TpSwapNode(e){return this._connection.send("TpSwapNode",e,"json",!1,void 0,"TpSwapNodeResponse")}TpTargetClusterQuery(e){return this._connection.send("TpTargetClusterQuery",e,"json",!1,void 0,"TpTargetClusterQueryResponse")}TpThorStatus(e){return this._connection.send("TpThorStatus",e,"json",!1,void 0,"TpThorStatusResponse")}TpXMLFile(e){return this._connection.send("TpXMLFile",e,"json",!1,void 0,"TpXMLFileResponse")}};var Xt=class extends _h{connectionOptions(){return this._connection.opts()}protocol(){return this._connection.opts().baseUrl.split("//")[0]}ip(){return this._connection.opts().baseUrl.split("//")[1].split(":")[0]}DefaultTpLogicalClusterQuery(e={}){return this.TpLogicalClusterQuery(e).then(r=>{if(r.default)return r.default;let n,s;return r.TpLogicalClusters.TpLogicalCluster.some((i,A)=>(A===0&&(s=i),i.Type==="hthor"?(n=i,!0):!1)),n||s})}};var sr;(D=>{let t;(ie=>(ie.Abort="Abort",ie.Delete="Delete",ie.Deschedule="Deschedule",ie.Reschedule="Reschedule",ie.Pause="Pause",ie.PauseNow="PauseNow",ie.Protect="Protect",ie.Unprotect="Unprotect",ie.Restore="Restore",ie.Resume="Resume",ie.SetToFailed="SetToFailed",ie.Archive="Archive"))(t=D.ECLWUActions||={});let e;(V=>(V[V.MIN=0]="MIN",V[V.DEFAULT=1]="DEFAULT",V[V.ALL=2]="ALL",V[V.CUSTOM=3]="CUSTOM"))(e=D.LogSelectColumnMode||={});let r;(F=>(F[F.ASC=0]="ASC",F[F.DSC=1]="DSC"))(r=D.SortDirection||={});let n;(X=>(X.ALL="ALL",X.DIS="DIS",X.ERR="ERR",X.WRN="WRN",X.INF="INF",X.PRO="PRO",X.MET="MET",X.EVT="EVT"))(n=D.LogEventClass||={});let s;(y=>(y.Single="Single",y.List="List",y.Multi="Multi"))(s=D.WUDetailsAttrValueType||={});let i;(y=>(y.SyntaxCheck="SyntaxCheck",y.Deploy="Deploy",y.Publish="Publish"))(i=D.EclDefinitionActions||={});let A;(y=>(y.xml="xml",y.json="json",y.text="text"))(A=D.ErrorMessageFormat||={});let u;(y=>(y[y.XML=0]="XML",y[y.JSON=1]="JSON",y[y.CSV=2]="CSV"))(u=D.LogAccessLogFormat||={});let c;(V=>(V.info="info",V.warning="warning",V.error="error",V.alert="alert"))(c=D.WUExceptionSeverity||={});let g;(w=>(w.Allqueries="All queries",w.Notsuspended="Not suspended",w.Suspended="Suspended",w.Suspendedbyuser="Suspended by user",w.Suspendedbyfirstnode="Suspended by first node",w.Suspendedbyanynode="Suspended by any node"))(g=D.WUQueryFilterSuspendedType||={});let l;(K=>(K.All="All",K.Id="Id",K.Name="Name",K.Alias="Alias",K.Status="Status"))(l=D.WUQuerySetFilterType||={});let d;(y=>(y.All="All",y.Protected="Protected",y.NotProtected="NotProtected"))(d=D.WUProtectFilter||={});let p;(x=>x.Deactivate="Deactivate")(p=D.QuerySetAliasActionTypes||={});let B;(F=>(F.None="None",F.ActivateImportedActive="ActivateImportedActive"))(B=D.QuerysetImportActivation||={});let E;(X=>(X.Suspend="Suspend",X.Unsuspend="Unsuspend",X.ToggleSuspend="ToggleSuspend",X.Activate="Activate",X.Delete="Delete",X.DeleteQueriesAndWUs="DeleteQueriesAndWUs",X.RemoveAllAliases="RemoveAllAliases",X.ResetQueryStats="ResetQueryStats"))(E=D.QuerySetQueryActionTypes||={});let b;(V=>(V[V.DoNotActivateQuery=0]="DoNotActivateQuery",V[V.ActivateQuery=1]="ActivateQuery",V[V.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",V[V.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious"))(b=D.WUQueryActivationMode||={})})(sr||={});var nc=class extends Re{constructor(e){super(e,"WsWorkunits","2.02")}GVCAjaxGraph(e){return this._connection.send("GVCAjaxGraph",e,"json",!1,void 0,"GVCAjaxGraphResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsWorkunitsPingResponse")}WUAbort(e){return this._connection.send("WUAbort",e,"json",!1,void 0,"WUAbortResponse")}WUAction(e){return this._connection.send("WUAction",e,"json",!1,void 0,"WUActionResponse")}WUAddLocalFileToWorkunit(e){return this._connection.send("WUAddLocalFileToWorkunit",e,"json",!1,void 0,"WUAddLocalFileToWorkunitResponse")}WUAnalyseHotspot(e){return this._connection.send("WUAnalyseHotspot",e,"json",!1,void 0,"WUAnalyseHotspotResponse")}WUCDebug(e){return this._connection.send("WUCDebug",e,"json",!1,void 0,"WUDebugResponse")}WUCheckFeatures(e){return this._connection.send("WUCheckFeatures",e,"json",!1,void 0,"WUCheckFeaturesResponse")}WUClusterJobQueueLOG(e){return this._connection.send("WUClusterJobQueueLOG",e,"json",!1,void 0,"WUClusterJobQueueLOGResponse")}WUClusterJobQueueXLS(e){return this._connection.send("WUClusterJobQueueXLS",e,"json",!1,void 0,"WUClusterJobQueueXLSResponse")}WUClusterJobSummaryXLS(e){return this._connection.send("WUClusterJobSummaryXLS",e,"json",!1,void 0,"WUClusterJobSummaryXLSResponse")}WUClusterJobXLS(e){return this._connection.send("WUClusterJobXLS",e,"json",!1,void 0,"WUClusterJobXLSResponse")}WUCompileECL(e){return this._connection.send("WUCompileECL",e,"json",!1,void 0,"WUCompileECLResponse")}WUCopyLogicalFiles(e){return this._connection.send("WUCopyLogicalFiles",e,"json",!1,void 0,"WUCopyLogicalFilesResponse")}WUCopyQuerySet(e){return this._connection.send("WUCopyQuerySet",e,"json",!1,void 0,"WUCopyQuerySetResponse")}WUCreate(e){return this._connection.send("WUCreate",e,"json",!1,void 0,"WUCreateResponse")}WUCreateAndUpdate(e){return this._connection.send("WUCreateAndUpdate",e,"json",!1,void 0,"WUUpdateResponse")}WUCreateZAPInfo(e){return this._connection.send("WUCreateZAPInfo",e,"json",!1,void 0,"WUCreateZAPInfoResponse")}WUDelete(e){return this._connection.send("WUDelete",e,"json",!1,void 0,"WUDeleteResponse")}WUDeployWorkunit(e){return this._connection.send("WUDeployWorkunit",e,"json",!1,void 0,"WUDeployWorkunitResponse")}WUDetails(e){return this._connection.send("WUDetails",e,"json",!1,void 0,"WUDetailsResponse")}WUDetailsMeta(e){return this._connection.send("WUDetailsMeta",e,"json",!1,void 0,"WUDetailsMetaResponse")}WUEclDefinitionAction(e){return this._connection.send("WUEclDefinitionAction",e,"json",!1,void 0,"WUEclDefinitionActionResponse")}WUExport(e){return this._connection.send("WUExport",e,"json",!1,void 0,"WUExportResponse")}WUFile(e){return this._connection.send("WUFile",e,"json",!1,void 0,"WULogFileResponse")}WUFullResult(e){return this._connection.send("WUFullResult",e,"json",!1,void 0,"WUFullResultResponse")}WUGVCGraphInfo(e){return this._connection.send("WUGVCGraphInfo",e,"json",!1,void 0,"WUGVCGraphInfoResponse")}WUGetArchiveFile(e){return this._connection.send("WUGetArchiveFile",e,"json",!1,void 0,"WUGetArchiveFileResponse")}WUGetDependancyTrees(e){return this._connection.send("WUGetDependancyTrees",e,"json",!1,void 0,"WUGetDependancyTreesResponse")}WUGetGraph(e){return this._connection.send("WUGetGraph",e,"json",!1,void 0,"WUGetGraphResponse")}WUGetGraphNameAndTypes(e){return this._connection.send("WUGetGraphNameAndTypes",e,"json",!1,void 0,"WUGetGraphNameAndTypesResponse")}WUGetNumFileToCopy(e){return this._connection.send("WUGetNumFileToCopy",e,"json",!1,void 0,"WUGetNumFileToCopyResponse")}WUGetPlugins(e){return this._connection.send("WUGetPlugins",e,"json",!1,void 0,"WUGetPluginsResponse")}WUGetStats(e){return this._connection.send("WUGetStats",e,"json",!1,void 0,"WUGetStatsResponse")}WUGetThorJobList(e){return this._connection.send("WUGetThorJobList",e,"json",!1,void 0,"WUGetThorJobListResponse")}WUGetThorJobQueue(e){return this._connection.send("WUGetThorJobQueue",e,"json",!1,void 0,"WUGetThorJobQueueResponse")}WUGetZAPInfo(e){return this._connection.send("WUGetZAPInfo",e,"json",!1,void 0,"WUGetZAPInfoResponse")}WUGraphInfo(e){return this._connection.send("WUGraphInfo",e,"json",!1,void 0,"WUGraphInfoResponse")}WUGraphTiming(e){return this._connection.send("WUGraphTiming",e,"json",!1,void 0,"WUGraphTimingResponse")}WUInfo(e){return this._connection.send("WUInfo",e,"json",!1,void 0,"WUInfoResponse")}WUInfoDetails(e){return this._connection.send("WUInfoDetails",e,"json",!1,void 0,"WUInfoResponse")}WUJobList(e){return this._connection.send("WUJobList",e,"json",!1,void 0,"WUJobListResponse")}WULightWeightQuery(e){return this._connection.send("WULightWeightQuery",e,"json",!1,void 0,"WULightWeightQueryResponse")}WUListArchiveFiles(e){return this._connection.send("WUListArchiveFiles",e,"json",!1,void 0,"WUListArchiveFilesResponse")}WUListLocalFileRequired(e){return this._connection.send("WUListLocalFileRequired",e,"json",!1,void 0,"WUListLocalFileRequiredResponse")}WUListQueries(e){return this._connection.send("WUListQueries",e,"json",!1,void 0,"WUListQueriesResponse")}WUListQueriesUsingFile(e){return this._connection.send("WUListQueriesUsingFile",e,"json",!1,void 0,"WUListQueriesUsingFileResponse")}WUMultiQuerysetDetails(e){return this._connection.send("WUMultiQuerysetDetails",e,"json",!1,void 0,"WUMultiQuerySetDetailsResponse")}WUProcessGraph(e){return this._connection.send("WUProcessGraph",e,"json",!1,void 0,"WUProcessGraphResponse")}WUProtect(e){return this._connection.send("WUProtect",e,"json",!1,void 0,"WUProtectResponse")}WUPublishWorkunit(e){return this._connection.send("WUPublishWorkunit",e,"json",!1,void 0,"WUPublishWorkunitResponse")}WUPushEvent(e){return this._connection.send("WUPushEvent",e,"json",!1,void 0,"WUPushEventResponse")}WUQuery(e){return this._connection.send("WUQuery",e,"json",!1,void 0,"WUQueryResponse")}WUQueryConfig(e){return this._connection.send("WUQueryConfig",e,"json",!1,void 0,"WUQueryConfigResponse")}WUQueryDetails(e){return this._connection.send("WUQueryDetails",e,"json",!1,void 0,"WUQueryDetailsResponse")}WUQueryDetailsLightWeight(e){return this._connection.send("WUQueryDetailsLightWeight",e,"json",!1,void 0,"WUQueryDetailsResponse")}WUQueryFiles(e){return this._connection.send("WUQueryFiles",e,"json",!1,void 0,"WUQueryFilesResponse")}WUQueryGetGraph(e){return this._connection.send("WUQueryGetGraph",e,"json",!1,void 0,"WUQueryGetGraphResponse")}WUQueryGetSummaryStats(e){return this._connection.send("WUQueryGetSummaryStats",e,"json",!1,void 0,"WUQueryGetSummaryStatsResponse")}WUQuerysetAliasAction(e){return this._connection.send("WUQuerysetAliasAction",e,"json",!1,void 0,"WUQuerySetAliasActionResponse")}WUQuerysetCopyQuery(e){return this._connection.send("WUQuerysetCopyQuery",e,"json",!1,void 0,"WUQuerySetCopyQueryResponse")}WUQuerysetDetails(e){return this._connection.send("WUQuerysetDetails",e,"json",!1,void 0,"WUQuerySetDetailsResponse")}WUQuerysetExport(e){return this._connection.send("WUQuerysetExport",e,"json",!1,void 0,"WUQuerysetExportResponse")}WUQuerysetImport(e){return this._connection.send("WUQuerysetImport",e,"json",!1,void 0,"WUQuerysetImportResponse")}WUQuerysetQueryAction(e){return this._connection.send("WUQuerysetQueryAction",e,"json",!1,void 0,"WUQuerySetQueryActionResponse")}WUQuerysets(e){return this._connection.send("WUQuerysets",e,"json",!1,void 0,"WUQuerysetsResponse")}WURecreateQuery(e){return this._connection.send("WURecreateQuery",e,"json",!1,void 0,"WURecreateQueryResponse")}WUResubmit(e){return this._connection.send("WUResubmit",e,"json",!1,void 0,"WUResubmitResponse")}WUResult(e){return this._connection.send("WUResult",e,"json",!1,void 0,"WUResultResponse")}WUResultBin(e){return this._connection.send("WUResultBin",e,"json",!1,void 0,"WUResultBinResponse")}WUResultSummary(e){return this._connection.send("WUResultSummary",e,"json",!1,void 0,"WUResultSummaryResponse")}WUResultView(e){return this._connection.send("WUResultView",e,"json",!1,void 0,"WUResultViewResponse")}WURun(e){return this._connection.send("WURun",e,"json",!1,void 0,"WURunResponse")}WUSchedule(e){return this._connection.send("WUSchedule",e,"json",!1,void 0,"WUScheduleResponse")}WUShowScheduled(e){return this._connection.send("WUShowScheduled",e,"json",!1,void 0,"WUShowScheduledResponse")}WUSubmit(e){return this._connection.send("WUSubmit",e,"json",!1,void 0,"WUSubmitResponse")}WUSyntaxCheckECL(e){return this._connection.send("WUSyntaxCheckECL",e,"json",!1,void 0,"WUSyntaxCheckResponse")}WUUpdate(e){return this._connection.send("WUUpdate",e,"json",!1,void 0,"WUUpdateResponse")}WUUpdateQueryEntry(e){return this._connection.send("WUUpdateQueryEntry",e,"json",!1,void 0,"WUUpdateQueryEntryResponse")}WUWaitCompiled(e){return this._connection.send("WUWaitCompiled",e,"json",!1,void 0,"WUWaitResponse")}WUWaitComplete(e){return this._connection.send("WUWaitComplete",e,"json",!1,void 0,"WUWaitResponse")}};var tB=(F=>(F[F.Unknown=0]="Unknown",F[F.Compiled=1]="Compiled",F[F.Running=2]="Running",F[F.Completed=3]="Completed",F[F.Failed=4]="Failed",F[F.Archived=5]="Archived",F[F.Aborting=6]="Aborting",F[F.Aborted=7]="Aborted",F[F.Blocked=8]="Blocked",F[F.Submitted=9]="Submitted",F[F.Scheduled=10]="Scheduled",F[F.Compiling=11]="Compiling",F[F.Wait=12]="Wait",F[F.UploadingFiled=13]="UploadingFiled",F[F.DebugPaused=14]="DebugPaused",F[F.DebugRunning=15]="DebugRunning",F[F.Paused=16]="Paused",F[F.LAST=17]="LAST",F[F.NotFound=999]="NotFound",F))(tB||{}),$i;(e=>{let t;(p=>(p[p.Unknown=0]="Unknown",p[p.Compile=1]="Compile",p[p.Check=2]="Check",p[p.Run=3]="Run",p[p.ExecuteExisting=4]="ExecuteExisting",p[p.Pause=5]="Pause",p[p.PauseNow=6]="PauseNow",p[p.Resume=7]="Resume",p[p.Debug=8]="Debug",p[p.__size=9]="__size"))(t=e.Action||={})})($i||={});function X0(t){return typeof t.Name=="string"}function zz(t){return t.TotalClusterTime!==void 0}function Xz(t){return t.StateEx!==void 0}var _t=class extends nc{constructor(e){super(e)}Ping(){return this._connection.send("Ping",{},"json",!1,void 0,"WsWorkunitsPingResponse").then(()=>({result:!0}))}WUQuery(e={},r){return this._connection.send("WUQuery",e,"json",!1,r).then(n=>qc({Workunits:{ECLWorkunit:[]}},n))}WUInfo(e){let r={Wuid:"",TruncateEclTo64k:!0,IncludeExceptions:!1,IncludeGraphs:!1,IncludeSourceFiles:!1,IncludeResults:!1,IncludeResultsViewNames:!1,IncludeVariables:!1,IncludeTimers:!1,IncludeDebugValues:!1,IncludeApplicationValues:!1,IncludeWorkflows:!1,IncludeXmlSchemas:!1,IncludeResourceURLs:!1,IncludeECL:!1,IncludeHelpers:!1,IncludeAllowedClusters:!1,IncludeTotalClusterTime:!1,IncludeServiceNames:!1,SuppressResultSchemas:!0,...e};return super.WUInfo(r)}WUCreate(){return super.WUCreate({})}WUUpdate(e){return this._connection.send("WUUpdate",e,"json",!0)}WUResubmit(e){return this._connection.toESPStringArray(e,"Wuids"),super.WUResubmit(e)}WUAction(e){return e.ActionType=e.WUActionType,super.WUAction(e)}WUResult(e,r){return this._connection.send("WUResult",e,"json",!1,r)}WUFileEx(e){return this._connection.send("WUFile",e,"text")}_WUDetailsMetaPromise;WUDetailsMeta(e){return this._WUDetailsMetaPromise||(this._WUDetailsMetaPromise=super.WUDetailsMeta(e)),this._WUDetailsMetaPromise}WUCDebugEx(e){return this._connection.send("WUCDebug",e,void 0,void 0,void 0,"WUDebug").then(r=>{let s=jc(r.Result).children();return s.length?s[0]:null})}},Yh=class extends nc{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};var gU=sn(rB(),1),ld=sn(tU(),1);var Jh=class extends Ve{wu;get properties(){return this.get()}get Name(){return this.get("Name")}get Label(){return this.get("Label")}get Type(){return this.get("Type")}get Complete(){return this.get("Complete")}get WhenStarted(){return this.get("WhenStarted")}get WhenFinished(){return this.get("WhenFinished")}get Time(){return this.get("Time")}get Running(){return this.get("Running")}get RunningId(){return this.get("RunningId")}get Failed(){return this.get("Failed")}constructor(e,r,n){super(),this.wu=e;let s=0;for(let i of n)if(i.GraphName===r.Name&&!i.HasSubGraphId){s=Math.round(i.Seconds*1e3)/1e3;break}this.set({Time:s,...r})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(r=>Xh(r)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(r=>Xh(r))}},jh=class extends Ke{constructor(){super(e=>Ke.hash([e.Name]))}};function aU(t,e,r){r=r||[],r.push(t),e(t.name,t.$,t.children(),r),t.children().forEach(n=>{aU(n,e,r)}),r.pop()}function nB(t){let e={};return t.forEach(r=>{r.name==="att"&&(e[r.$.name]=r.$.value)}),e}var sB=class extends pa{},rU=class extends Ro{},nU=class extends Uo{},sU=class extends da{};function uU(t,e){let r={},n={},s={},i=new sB(u=>u._.id),A=[i.root];return aU(e,(u,c,g,l)=>{let d=A[A.length-1];switch(u){case"graph":break;case"node":if(g.length&&g[0].children().length&&g[0].children()[0].name==="graph"){let E=d.createSubgraph(nB(g));A.push(E),r[c.id]=E}let p=d.createVertex(nB(g));n[c.id]=p;break;case"edge":let B=d.createEdge(n[c.source],n[c.target],nB(g));s[c.id]=B;break;default:}}),i}var zh=class extends pa{},iU=class extends Ro{},oU=class extends Uo{},AU=class extends da{};function Xh(t){let e={},r={},n={},s;for(let i of t)switch(i.ScopeType){case"graph":s=new zh(l=>l._.Id,i),e[i.ScopeName]=s.root;break;case"subgraph":s||(s=new zh(l=>l._.Id,i),e[i.ScopeName]=s.root);let A=i.parentScope().split(":"),u=e[i.parentScope()];for(;A.length&&!u;)u=e[A.join(":")],A.pop();if(!u)console.warn(`Missing SG:Parent (${i.Id}): ${i.parentScope()}`);else{let l=u;e[i.ScopeName]=l.createSubgraph(i)}break;case"activity":let c=e[i.parentScope()];c?n[i.ScopeName]=c.createVertex(i):console.warn(`Missing A:Parent (${i.Id}): ${i.parentScope()}`);break;case"edge":r[i.ScopeName]=i;break;case"function":let g=n[i.parentScope()];g?g._.children().push(i):console.warn(`Missing F:Parent (${i.Id}): ${i.parentScope()}`);break}for(let i in r){let A=r[i],u=e[A.parentScope()];if(!u)console.warn(`Missing E:Parent (${A.Id}): ${A.parentScope()}`);else{let c=u;try{let g=s.vertex(A.attr("IdSource").RawValue),l=s.vertex(A.attr("IdTarget").RawValue);c.createEdge(g,l,A)}catch{console.warn(`Invalid Edge: ${i}`)}}}return s}var Zh=class extends Ve{wu;get properties(){return this.get()}get URL(){return this.get("URL")}get DisplayName(){return this.get("DisplayName")}get DisplayPath(){return this.get("DisplayPath")}constructor(e,r){super(),this.wu=e;let n=r.split("\\").join("/"),s=n.split("/"),i="res/"+this.wu.Wuid+"/",A="",u="";n.indexOf(i)===0&&(A=n.substr(i.length),u=s[s.length-1]),this.set({URL:r,DisplayName:u,DisplayPath:A})}};var Kh=class{e;constructor(e){this.e=e}fix(){delete this.e}},$h=class extends Kh{name;type;isSet=!1;attrs={};_children=[];constructor(e){super(e)}append(e){this._children.push(e),this.type||(this.type="hpcc:childDataset")}fix(){this.name=this.e.$.name,this.type=this.e.$.type;for(let r=this._children.length-1;r>=0;--r){let n=this._children[r];n.name==="Row"&&n.type===void 0&&(this._children.push(...n._children),this._children.splice(r,1))}let e=this.setOfType();e&&(this.type=e,this.isSet=!0,this._children=[])}children(){return this._children}isAll(e){return e.name==="All"&&e.type===void 0}setOfType(){let e=this.children();if(this.type===void 0&&e.length===2){if(this.isAll(e[0]))return e[1].type;if(this.isAll(e[1]))return e[0].type}}charWidth(){let e=-1;switch(this.type){case"xs:boolean":e=5;break;case"xs:integer":e=8;break;case"xs:nonNegativeInteger":e=8;break;case"xs:double":e=8;break;case"xs:string":e=32;break;default:let r="0123456789",n=this.type.lastIndexOf("_"),s=n>0?n:this.type.length,i=s-1;for(;i>=0&&r.indexOf(this.type.charAt(i))!==-1;--i);i+1<s&&(e=parseInt(this.type.substring(i+1,s),10)),this.type.indexOf("data")===0&&(e*=2);break}return e<this.name.length&&(e=this.name.length),e}},ed=class extends Kh{name;type;maxLength;_restricition;_maxLength;constructor(e){super(e)}append(e){switch(e.name){case"xs:restriction":this._restricition=e;break;case"xs:maxLength":this._maxLength=e;break;default:}}fix(){this.name=this.e.$.name,this.type=this._restricition.$.base,this.maxLength=this._maxLength?+this._maxLength.$.value:void 0,delete this._restricition,delete this._maxLength,super.fix()}},td=class{root;simpleTypes={};fields(){return this.root.children()}},rd=class extends fi{schema=new td;simpleType;simpleTypes={};xsdStack=new pi;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":let r=new $h(e);this.schema.root?this.xsdStack.depth()&&this.xsdStack.top().append(r):this.schema.root=r,this.xsdStack.push(r);break;case"xs:simpleType":this.simpleType=new ed(e);break;default:break}}endXMLNode(e){switch(e.name){case"xs:element":this.xsdStack.pop().fix();break;case"xs:simpleType":this.simpleType.fix(),this.simpleTypes[this.simpleType.name]=this.simpleType,delete this.simpleType;break;case"xs:appinfo":let n=this.xsdStack.top();for(let s in e.$)n.attrs[s]=e.$[s];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};function oB(t){let e=new rd;return e.parse(t),e.schema}var iB=class extends rd{_rootName;schema=new td;simpleTypes={};xsdStack=new pi;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":let r=new $h(e);!this.schema.root&&this._rootName===e.$.name&&(this.schema.root=r),this.xsdStack.depth()&&this.xsdStack.top().append(r),this.xsdStack.push(r);break;case"xsd:simpleType":this.simpleType=new ed(e);break;default:break}}endXMLNode(e){switch(e.name){case"xsd:element":this.xsdStack.pop().fix();break;case"xsd:simpleType":break;default:break}super.endXMLNode(e)}};function o5(t,e){let r=new iB(e);return r.parse(t),r.schema}var AB=class extends Ke{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}},nd=new AB,sd=class t extends Ve{connection;get BaseUrl(){return this.connection.baseUrl}xsdSchema;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get ResultName(){return this.get("ResultName")}get ResultSequence(){return this.get("ResultSequence")}get LogicalFileName(){return this.get("LogicalFileName")}get Name(){return this.get("Name")}get Sequence(){return this.get("Sequence")}get Value(){return this.get("Value")}get Link(){return this.get("Link")}get FileName(){return this.get("FileName")}get IsSupplied(){return this.get("IsSupplied")}get ShowFileContent(){return this.get("ShowFileContent")}get Total(){return this.get("Total")}get ECLSchemas(){return this.get("ECLSchemas")}get NodeGroup(){return this.get("NodeGroup")}get ResultViews(){return this.get("ResultViews")}get XmlSchema(){return this.get("XmlSchema")}static attach(e,r,n,s){let i;return Array.isArray(s)?(i=nd.get({BaseUrl:e.baseUrl,Wuid:r,ResultName:n.Name},()=>new t(e,r,n,s)),i.set(n)):typeof s>"u"&&(typeof n=="number"?i=nd.get({BaseUrl:e.baseUrl,Wuid:r,ResultName:"Sequence_"+n},()=>new t(e,r,n)):typeof n=="string"&&(i=nd.get({BaseUrl:e.baseUrl,Wuid:r,ResultName:n},()=>new t(e,r,n)))),i}static attachLogicalFile(e,r,n){return nd.get({BaseUrl:e.baseUrl,Wuid:r,ResultName:n},()=>new t(e,r,n,!0))}constructor(e,r,n,s){super(),e instanceof _t?this.connection=e:this.connection=new _t(e),typeof s=="boolean"&&s===!0?this.set({NodeGroup:r,LogicalFileName:n}):X0(n)&&Array.isArray(s)?this.set({...n,Wuid:r,ResultName:n.Name,ResultViews:s}):typeof s>"u"?typeof n=="number"?this.set({Wuid:r,ResultSequence:n}):typeof n=="string"?this.set({Wuid:r,ResultName:n}):console.warn("Unknown Result.attach (1)"):console.warn("Unknown Result.attach (2)")}isComplete(){return this.Total!==-1}_fetchXMLSchemaPromise;fetchXMLSchema(e=!1){return(!this._fetchXMLSchemaPromise||e)&&(this._fetchXMLSchemaPromise=this.WUResult().then(r=>r.Result?.XmlSchema?.xml?(this.xsdSchema=oB(r.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,r=-1,n=!1,s={},i){return this.WUResult(e,r,!n,s,i).then(A=>{let u=A.Result;return delete A.Result,this.set({...A}),An("XmlSchema.xml",u)&&(this.xsdSchema=oB(u.XmlSchema.xml)),An("Row",u)?u.Row:this.ResultName&&An(this.ResultName,u)?u[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,r=1,n=!1,s={},i){let A={NamedValue:{itemcount:0}};for(let c in s)A.NamedValue[A.NamedValue.itemcount++]={Name:c,Value:s[c]};let u={FilterBy:A};return this.Wuid&&this.ResultName!==void 0?(u.Wuid=this.Wuid,u.ResultName=this.ResultName):this.Wuid&&this.ResultSequence!==void 0?(u.Wuid=this.Wuid,u.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(u.LogicalName=this.LogicalFileName,u.Cluster=this.NodeGroup):this.LogicalFileName&&(u.LogicalName=this.LogicalFileName),u.Start=e,u.Count=r,u.SuppressXmlSchema=n,this.connection.WUResult(u,i).then(c=>c)}},id=class extends Ke{constructor(){super(e=>Ke.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};var eo=class extends Ve{scope;get properties(){return this.get()}get Name(){return this.get("Name")}get RawValue(){return this.get("RawValue")}get Formatted(){return this.get("Formatted")}get FormattedEnd(){return this.get("FormattedEnd")}get Measure(){return this.get("Measure")}get Creator(){return this.get("Creator")}get CreatorType(){return this.get("CreatorType")}constructor(e,r){super(),this.scope=e,this.set(r)}},aB=class extends Ve{_attributeMap={};_children=[];get properties(){return this.get()}get ScopeName(){return this.get("ScopeName")}get Id(){return this.get("Id")}get ScopeType(){return this.get("ScopeType")}get Properties(){return this.get("Properties",{Property:[]})}get Notes(){return this.get("Notes",{Note:[]})}get SinkActivity(){return this.get("SinkActivity")}get CAttributes(){let e=[],r={start:null,end:null};return this.Properties.Property.forEach(n=>{n.Measure==="ts"&&n.Name.indexOf("Started")>=0?r.start=n:this.ScopeName&&n.Measure==="ts"&&n.Name.indexOf("Finished")>=0?r.end=n:e.push(new eo(this,n))}),r.start&&r.end?(r.start.FormattedEnd=r.end.Formatted,e.push(new eo(this,r.start))):r.start?e.push(new eo(this,r.start)):r.end&&e.push(new eo(this,r.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(r=>{this._attributeMap[r.Name]=r}),this.Properties.Property=[];for(let r in this._attributeMap)this._attributeMap.hasOwnProperty(r)&&this.Properties.Property.push(this._attributeMap[r].properties)}parentScope(){let e=this.ScopeName.split(":");return e.pop(),e.join(":")}children(e){return arguments.length?(this._children=e,this):this._children}walk(e){if(e.start(this))return!0;for(let r of this.children())if(r.walk(e))return!0;return e.end(this)}formattedAttrs(){let e={};for(let r in this._attributeMap)e[r]=this._attributeMap[r].Formatted||this._attributeMap[r].RawValue;return e}rawAttrs(){let e={};for(let r in this._attributeMap)e[r]=this._attributeMap[r].RawValue;return e}hasAttr(e){return this._attributeMap[e]!==void 0}attr(e){return this._attributeMap[e]||new eo(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let r="",n=[];r=this.Id,n.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&n.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),n.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);let s=this.formattedAttrs();for(let i in s)i==="Label"?r=s[i]:n.push(`<tr><td class="key">${i}</td><td class="value">${s[i]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">
|
|
972
972
|
<h4 align="center">${r}</h4>
|
|
973
973
|
<table>
|
|
974
974
|
${n.join("")}
|