@hpcc-js/comms 3.4.0 → 3.5.0

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.
@@ -907,7 +907,7 @@ AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsC
907
907
  MGclCrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVu
908
908
  Sw==
909
909
  -----END CERTIFICATE-----
910
- `;import{Buffer as Kt}from"safe-buffer";var Zr="@hpcc-js/comms",$r="3.4.0",ei="3.4.0";import{join as Se}from"@hpcc-js/util";import{join as lt,promiseTimeout as on,scopedLogger as an}from"@hpcc-js/util";var $t=an("comms/connection.ts");function ni(r){return"baseUrl"in r}var cn={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function ri(r){return typeof r.opts=="function"&&typeof r.send=="function"&&typeof r.clone=="function"}function M(r,e){return e===void 0||e===!0?encodeURIComponent(r):""+r}function G(r,e=!0,t=""){if(t&&(t+="."),typeof r!="object")return M(r,e);let s=[];for(let n in r)if(r.hasOwnProperty(n))if(r[n]instanceof Array){let i=!1;r[n].forEach((o,a)=>{typeof o=="object"?(i=!0,s.push(G(o,e,t+M(`${n}.${a}`,e)))):s.push(t+M(`${n}_i${a}`,e)+"="+G(o,e))}),i&&s.push(t+M(`${n}.itemcount`,e)+"="+r[n].length)}else typeof r[n]=="object"?r[n]&&r[n].Item instanceof Array?(s.push(G(r[n].Item,e,t+M(n,e))),s.push(t+M(`${n}.itemcount`,e)+"="+r[n].Item.length)):s.push(G(r[n],e,t+M(n,e))):r[n]!==void 0?s.push(t+M(n,e)+"="+M(r[n],e)):s.push(t+M(n,e));return s.join("&")}function un(r){return JSON.parse(r)}function ln(r,e,t={},s="json",n){return n&&console.warn("Header attributes ignored for JSONP connections"),new Promise((i,o)=>{let a=r.timeoutSecs*1e3,u=5e3,p="jsonp_callback_"+Math.round(Math.random()*999999);window[p]=function(T){a=0,C(),i(s==="json"&&typeof T=="string"?un(T):T)};let c=document.createElement("script"),l=lt(r.baseUrl,e);l+=l.indexOf("?")>=0?"&":"?",c.src=l+"jsonp="+p+"&"+G(t,r.encodeRequest),document.body.appendChild(c);let g=setInterval(function(){a<=0?clearInterval(g):(a-=u,a<=0?(clearInterval(g),$t.error("Request timeout: "+c.src),C(),o(Error("Request timeout: "+c.src))):$t.debug("Request pending ("+a/1e3+" sec): "+c.src))},u);function C(){delete window[p],document.body.removeChild(c)}})}function pn(r){return r.userID?{Authorization:`Basic ${btoa(`${r.userID}:${r.password}`)}`}:{}}var fe={};function es(r,e,t,s,n){s={...pn(r),...s},t={credentials:fe[r.baseUrl]?"omit":"include",...t,headers:s},fetch.__setGlobalDispatcher&&fetch.__setGlobalDispatcher(fetch.__defaultAgent),r.baseUrl.indexOf("https:")===0&&(r.rejectUnauthorized===!1&&fetch.__rejectUnauthorizedAgent?fetch.__setGlobalDispatcher?fetch.__setGlobalDispatcher(fetch.__rejectUnauthorizedAgent):t.agent=fetch.__rejectUnauthorizedAgent:fetch.__trustwaveAgent&&(t.agent=fetch.__trustwaveAgent));function i(o){if(o.ok)return n==="json"?o.json():o.text();throw new Error(o.statusText)}return on(r.timeoutSecs*1e3,fetch(lt(r.baseUrl,e),t).then(i).catch(o=>(t.credentials=fe[r.baseUrl]?"include":"omit",fetch(lt(r.baseUrl,e),t).then(i).then(a=>(fe[r.baseUrl]=!fe[r.baseUrl],a)))))}function gn(r,e,t,s="json",n){t.upload_&&(delete t.upload_,e+="?upload_");let i;return t.abortSignal_&&(i=t.abortSignal_,delete t.abortSignal_),es(r,e,{method:"post",body:G(t,r.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...n},s)}function dn(r,e,t,s="json",n){let i;return t.abortSignal_&&(i=t.abortSignal_,delete t.abortSignal_),es(r,`${e}?${G(t,r.encodeRequest)}`,{method:"get",signal:i},{...n},s)}function mn(r,e,t,s="json",n){let i;switch(r.type){case"jsonp":i=ln(r,e,t,s,n);break;case"get":i=dn(r,e,t,s,n);break;case"post":default:i=gn(r,e,t,s,n);break}return i}var De=mn;function ii(r){let e=De;return r&&(De=r),e}var pt=class r{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return arguments.length===0?this._opts:(this._opts={...cn,...e},this)}send(e,t,s="json",n){return this._opts.hookSend?this._opts.hookSend(this._opts,e,t,s,De,n):De(this._opts,e,t,s,n)}clone(){return new r(this.opts())}},Ce=function(r){return new pt(r)};function oi(r){let e=Ce;return Ce=r,e}function hn(r){return Object.prototype.toString.call(r)==="[object Array]"}var k=class extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,t,s){super("ESPException: "+s.Source),this.action=e,this.request=t,this.Source=s.Source,this.Exception=s.Exception,s.Exception.length?this.message=`${s.Exception[0].Code}: ${s.Exception[0].Message}`:this.message=""}};function di(r){return r instanceof k||r.isESPExceptions&&Array.isArray(r.Exception)}function fn(r){return r.send!==void 0}var ne=class r{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,t,s){this._connection=fn(e)?e:Ce(e),this._service=t,this._version=s}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,t){if(hn(e[t])){for(let s=0;s<e[t].length;++s)e[t+"_i"+s]=e[t][s];delete e[t]}return e}opts(e){return e===void 0?this._connection.opts():(this._connection.opts(e),this)}send(e,t={},s="json",n=!1,i,o){let a={...t,ver_:this._version};n&&(a.upload_=!0),i&&(a.abortSignal_=i);let u,p="json";switch(s){case"text":u=Se(this._service,e),p="text";break;case"xsd":u=Se(this._service,e+".xsd"),p="text";break;case"json2":u=Se(this._service,e+"/json"),s="json",e=e.split("/").pop();break;default:u=Se(this._service,e+".json")}return this._connection.send(u,a,p).then(c=>{if(s==="json"){let l;if(c&&c.Exceptions)throw new k(e,a,c.Exceptions);if(c&&(l=c[o||e+"Response"]),!l)throw new k(e,a,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return l}return c})}clone(){return new r(this._connection.clone(),this._service,this._version)}},m=class{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,t,s){this._connection=new ne(e,t,s)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};var re;(e=>{let r;(u=>(u.Delete="Delete",u.Protect="Protect",u.Unprotect="Unprotect",u.Restore="Restore",u.SetToFailed="SetToFailed",u.Archive="Archive"))(r=e.DFUWUActions||={})})(re||={});var Re=class extends m{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 Dn=(c=>(c[c.unknown=0]="unknown",c[c.scheduled=1]="scheduled",c[c.queued=2]="queued",c[c.started=3]="started",c[c.aborted=4]="aborted",c[c.failed=5]="failed",c[c.finished=6]="finished",c[c.monitoring=7]="monitoring",c[c.aborting=8]="aborting",c[c.notfound=999]="notfound",c))(Dn||{}),v=class extends Re{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 ts;(o=>{let r;(p=>(p.User="User",p.Group="Group"))(r=o.ViewMemberType||={});let e;(g=>(g.username="username",g.fullname="fullname",g.passwordexpiration="passwordexpiration",g.employeeID="employeeID",g.employeeNumber="employeeNumber"))(e=o.UserSortBy||={});let t;(p=>(p.Name="Name",p.ManagedBy="ManagedBy"))(t=o.GroupSortBy||={});let s;(c=>(c.Any="Any",c.User="User",c.Group="Group"))(s=o.AccountTypeReq||={});let n;(p=>(p.Name="Name",p.Type="Type"))(n=o.ResourcePermissionSortBy||={});let i;(u=>u.Name="Name")(i=o.ResourceSortBy||={})})(ts||={});var xe=class extends m{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 ss=class extends xe{};var Ae=class extends m{constructor(e){super(e,"ws_account","1.06")}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 ns=class extends Ae{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===20043))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:t.Exception}};throw t})}};var We=class extends m{constructor(e){super(e,"WsCloud","1")}GetPODs(e){return this._connection.send("GetPODs",e)}Ping(e){return this._connection.send("Ping",e)}};var rs=class extends We{getPODs(){return super.GetPODs({}).then(e=>{try{return(typeof e.Result=="string"?JSON.parse(e.Result):e.Result)?.items??[]}catch{return[]}})}};var is=class{_connection;constructor(e){this._connection=new ne(e,"ws_codesign","1.1")}connectionOptions(){return this._connection.opts()}ListUserIDs(e){return this._connection.send("ListUserIDs",e).then(t=>t.UserIDs.Item).catch(t=>[])}Sign(e){return this._connection.send("Sign",{SigningMethod:"gpg",...e})}Verify(e){return this._connection.send("Verify",e)}};var ye=class extends m{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 os=class extends ye{};var z;(a=>{let r;(g=>(g.Delete="Delete",g.AddToSuperfile="Add To Superfile",g.ChangeProtection="Change Protection",g.ChangeRestriction="Change Restriction"))(r=a.DFUArrayActions||={});let e;(g=>(g[g.NoChange=0]="NoChange",g[g.Protect=1]="Protect",g[g.Unprotect=2]="Unprotect",g[g.UnprotectAll=3]="UnprotectAll"))(e=a.DFUChangeProtection||={});let t;(l=>(l[l.NoChange=0]="NoChange",l[l.Restrict=1]="Restrict",l[l.Unrestricted=2]="Unrestricted"))(t=a.DFUChangeRestriction||={});let s;(c=>(c.xml="xml",c.def="def"))(s=a.DFUDefFileFormat||={});let n;(l=>(l.Token="Token",l.Engine="Engine",l.External="External"))(n=a.FileAccessRole||={});let i;(C=>(C.None="None",C.Access="Access",C.Read="Read",C.Write="Write",C.Full="Full"))(i=a.SecAccessType||={});let o;(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"))(o=a.DFUFileType||={})})(z||={});var Ue=class extends m{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 Hi=z.DFUArrayActions,ji=z.DFUDefFileFormat,Oi=z.DFUChangeProtection,Yi=z.DFUChangeRestriction,ie=class extends Ue{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}};var as=class extends m{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 cs(r,e){let t=typeof e;switch(t){case"boolean":case"number":case"string":return{id:r,type:t};case"object":if(e.Row instanceof Array&&(e=e.Row),e instanceof Array)return{id:r,type:"dataset",children:gt(e[0])};if(e instanceof Object){if(e.Item&&e.Item instanceof Array&&e.Item.length===1){let s=typeof e.Item[0];if(s==="string"||s==="number")return{id:r,type:"set",fieldType:s};throw new Error("Unknown field type")}return{id:r,type:"object",fields:Cn(e)}}default:throw new Error("Unknown field type")}}function gt(r){r.Row&&r.Row instanceof Array&&(r=r.Row[0]);let e=[];for(let t in r)e.push(cs(t,r[t]));return e}function Cn(r){let e={};for(let t in r)e[t]=cs(t,r[t]);return e}var Ee=class extends m{constructor(e){super(e,"WsEcl","0")}opts(){return this._connection.opts()}requestJson(e,t){return this._connection.send(`example/request/query/${e}/${t}/json`,{},"text").then(s=>{let n=JSON.parse(s);for(let i in n)return n[i];return{}}).then(gt)}responseJson(e,t){return this._connection.send(`example/response/query/${e}/${t}/json`,{},"text").then(s=>{let n=JSON.parse(s);for(let i in n)return n[i].Results;return{}}).then(s=>{let n={};for(let i in s)n[i]=gt(s[i]);return n})}submit(e,t,s){let n=`submit/query/${e}/${t}`;return this._connection.send(n,s,"json2").then(i=>{if(i.Results&&i.Results.Exception)throw new k(n,s,{Source:"wsEcl.submit",Exception:i.Results.Exception});return i.Results})}};var Fe=class extends m{constructor(e){super(e,"ws_elk","1")}GetConfigDetails(e){return this._connection.send("GetConfigDetails",e)}Ping(e){return this._connection.send("Ping",e)}};var us=class extends Fe{};import{scopedLogger as Sn}from"@hpcc-js/util";var x;(a=>{let r;(f=>(f.global="global",f.workunits="workunits",f.components="components",f.audience="audience",f.class="class",f.instance="instance",f.node="node",f.message="message",f.logid="logid",f.processid="processid",f.threadid="threadid",f.timestamp="timestamp",f.pod="pod"))(r=a.LogColumnType||={});let e;(g=>(g.string="string",g.numeric="numeric",g.datetime="datetime",g.enum="enum"))(e=a.LogColumnValueType||={});let t;(h=>(h[h.All=0]="All",h[h.ByJobID=1]="ByJobID",h[h.ByComponent=2]="ByComponent",h[h.ByLogType=3]="ByLogType",h[h.ByTargetAudience=4]="ByTargetAudience",h[h.BySourceInstance=5]="BySourceInstance",h[h.BySourceNode=6]="BySourceNode",h[h.ByFieldName=7]="ByFieldName",h[h.ByPod=8]="ByPod"))(t=a.LogAccessType||={});let s;(l=>(l[l.NONE=0]="NONE",l[l.AND=1]="AND",l[l.OR=2]="OR"))(s=a.LogAccessFilterOperator||={});let n;(g=>(g[g.MIN=0]="MIN",g[g.DEFAULT=1]="DEFAULT",g[g.ALL=2]="ALL",g[g.CUSTOM=3]="CUSTOM"))(n=a.LogSelectColumnMode||={});let i;(h=>(h[h.ByDate=0]="ByDate",h[h.ByJobID=1]="ByJobID",h[h.ByComponent=2]="ByComponent",h[h.ByLogType=3]="ByLogType",h[h.ByTargetAudience=4]="ByTargetAudience",h[h.BySourceInstance=5]="BySourceInstance",h[h.BySourceNode=6]="BySourceNode",h[h.ByFieldName=7]="ByFieldName",h[h.ByPod=8]="ByPod"))(i=a.SortColumType||={});let o;(c=>(c[c.ASC=0]="ASC",c[c.DSC=1]="DSC"))(o=a.SortDirection||={})})(x||={});var be=class extends m{constructor(e){super(e,"ws_logaccess","1.05")}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 ls=Sn("@hpcc-js/comms/services/wsLogaccess.ts");var Rn=(o=>(o.Disaster="DIS",o.Error="ERR",o.Warning="WRN",o.Information="INF",o.Progress="PRO",o.Metric="MET",o))(Rn||{}),xn=(n=>(n.Operator="OPR",n.User="USR",n.Programmer="PRO",n.Audit="ADT",n))(xn||{}),ps=class extends be{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}async GetLogsEx(e){let t=await this.GetLogAccessInfo(),s={};t.Columns.Column.forEach(a=>s[a.LogType]=a.Name);let n=a=>{let u={};for(let p in s)a?.fields?u[p]=Object.assign({},...a.fields)[s[p]]??"":u[p]="";return u},i={Filter:{leftBinaryFilter:{BinaryLogFilter:[{leftFilter:{LogCategory:x.LogAccessType.All}}]}},Range:{StartDate:new Date(0).toISOString()},LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:x.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:x.SortColumType.ByDate,ColumnName:"",Direction:0}]}},o=[];for(let a in e){let u;a in s&&(Object.values(x.LogColumnType).includes(a)?u=a:u=s[a]);let p;if(u){switch(u){case x.LogColumnType.workunits:case"hpcc.log.jobid":p=x.LogAccessType.ByJobID;break;case x.LogColumnType.audience:case"hpcc.log.audience":p=x.LogAccessType.ByTargetAudience;break;case x.LogColumnType.class:case"hpcc.log.class":p=x.LogAccessType.ByLogType;break;case x.LogColumnType.components:case"kubernetes.container.name":p=x.LogAccessType.ByComponent;break;default:p=x.LogAccessType.ByFieldName,u=s[a]}if(Array.isArray(e[a]))e[a].forEach(c=>{p===x.LogAccessType.ByComponent&&(c+="*"),o.push({LogCategory:p,SearchField:u,SearchByValue:c})});else{let c=e[a];p===x.LogAccessType.ByComponent&&(c+="*"),o.push({LogCategory:p,SearchField:u,SearchByValue:c})}}}if(o.length>2){let a=i.Filter.leftBinaryFilter.BinaryLogFilter[0];o.forEach((u,p)=>{let c=x.LogAccessFilterOperator.AND;p>0?(o[p-1].SearchField===u.SearchField&&(c=x.LogAccessFilterOperator.OR),p===o.length-1?(a.Operator=c,a.rightFilter=u):(a.Operator=c,a.rightBinaryFilter={BinaryLogFilter:[{leftFilter:u}]},a=a.rightBinaryFilter.BinaryLogFilter[0])):a.leftFilter=u})}else delete i.Filter.leftBinaryFilter,i.Filter.leftFilter={LogCategory:x.LogAccessType.All},o[0]?.SearchField&&(i.Filter.leftFilter={LogCategory:o[0]?.LogCategory,SearchField:o[0]?.SearchField,SearchByValue:o[0]?.SearchByValue}),o[1]?.SearchField&&(i.Filter.Operator=x.LogAccessFilterOperator.AND,o[0].SearchField===o[1].SearchField&&(i.Filter.Operator=x.LogAccessFilterOperator.OR),i.Filter.rightFilter={LogCategory:o[1]?.LogCategory,SearchField:o[1]?.SearchField,SearchByValue:o[1]?.SearchByValue});return e.StartDate&&(i.Range.StartDate=e.StartDate.toISOString()),e.EndDate&&(i.Range.EndDate=e.EndDate.toISOString()),this.GetLogs(i).then(a=>{try{let u=JSON.parse(a.LogLines),p=[];switch(t.RemoteLogManagerType){case"azureloganalyticscurl":case"elasticstack":case"grafanacurl":p=u.lines?.map(n)??[];break;default:ls.warning(`Unknown RemoteLogManagerType: ${t.RemoteLogManagerType}`),p=[]}return{lines:p,total:a.TotalLogLinesAvailable??1e4}}catch(u){ls.error(u.message??u)}return{lines:[],total:0}})}};import{exists as An}from"@hpcc-js/util";import{max as dt,mean as mt}from"d3-array";var Pe=class extends m{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 w=class extends Pe{GetTargetClusterUsageEx(e,t=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:t}).then(s=>An("TargetClusterUsages.TargetClusterUsage",s)?s.TargetClusterUsages.TargetClusterUsage:[]).then(s=>s.filter(n=>!!n.ComponentUsages).map(n=>{let i=n.ComponentUsages.ComponentUsage.map(o=>{let a=(o.MachineUsages&&o.MachineUsages.MachineUsage?o.MachineUsages.MachineUsage:[]).map(u=>{let p=u.DiskUsages&&u.DiskUsages.DiskUsage?u.DiskUsages.DiskUsage.map(c=>({...c,InUse:c.InUse*1024,Total:(c.InUse+c.Available)*1024,PercentUsed:100-c.PercentAvailable})):[];return{Name:u.Name,NetAddress:u.NetAddress,Description:u.Description,DiskUsages:p,mean:mt(p.filter(c=>!isNaN(c.PercentUsed)),c=>c.PercentUsed),max:dt(p.filter(c=>!isNaN(c.PercentUsed)),c=>c.PercentUsed)}});return{Type:o.Type,Name:o.Name,Description:o.Description,MachineUsages:a,MachineUsagesDescription:a.reduce((u,p)=>u+(p.Description||""),""),mean:mt(a.filter(u=>!isNaN(u.mean)),u=>u.mean),max:dt(a.filter(u=>!isNaN(u.max)),u=>u.max)}});return{Name:n.Name,Description:n.Description,ComponentUsages:i,ComponentUsagesDescription:i.reduce((o,a)=>o+(a.MachineUsagesDescription||""),""),mean:mt(i.filter(o=>!isNaN(o.mean)),o=>o.mean),max:dt(i.filter(o=>!isNaN(o.max)),o=>o.max)}}))}};var Ie=class extends m{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 gs=class extends Ie{};var Te=class extends m{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 ds=class extends Te{};var ms;(e=>{let r;(n=>(n.ECL="ECL",n.DFU="DFU"))(r=e.WUTypes||={})})(ms||={});var Me=class extends m{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 hs=class extends Me{};var fs;(t=>{let r;(u=>(u.ALL="ALL",u.READ="READ",u.WRITE="WRITE",u.HOLD="HOLD",u.SUB="SUB"))(r=t.LockModes||={});let e;(l=>(l.Attach="Attach",l.Detach="Detach",l.State="State",l.Reload="Reload",l.ReloadRetry="ReloadRetry",l.MemLock="MemLock",l.MemUnlock="MemUnlock",l.GetMemLocked="GetMemLocked"))(e=t.RoxieControlCmdType||={})})(fs||={});var Be=class extends m{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 oe=class extends Be{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(t=>({Running:{ActiveWorkunit:[]},...t}))}};var ae=class extends m{constructor(e){super(e,"WsStore","1")}CreateStore(e){return this._connection.send("Fetch",e)}Delete(e){return this._connection.send("Delete",e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===-1))return{Exceptions:void 0,Success:!0};throw t})}DeleteNamespace(e){return this._connection.send("DeleteNamespace",e)}Fetch(e){return this._connection.send("Fetch",e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===-1))return{Exceptions:void 0,Value:void 0};throw t})}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 Ds;(e=>{let r;(i=>(i.All="All",i.QueriesOnly="QueriesOnly",i.WorkunitsOnly="WorkunitsOnly"))(r=e.RoxieQueueFilter||={})})(Ds||={});var we=class extends m{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 y=class extends we{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(t=>{if(t.default)return t.default;let s,n;return t.TpLogicalClusters.TpLogicalCluster.some((i,o)=>(o===0&&(n=i),i.Type==="hthor"?(s=i,!0):!1)),s||n})}};import{deepMixin as Wn,xml2json as yn}from"@hpcc-js/util";var E;(D=>{let r;(I=>(I.Abort="Abort",I.Delete="Delete",I.Deschedule="Deschedule",I.Reschedule="Reschedule",I.Pause="Pause",I.PauseNow="PauseNow",I.Protect="Protect",I.Unprotect="Unprotect",I.Restore="Restore",I.Resume="Resume",I.SetToFailed="SetToFailed",I.Archive="Archive"))(r=D.ECLWUActions||={});let e;(f=>(f[f.MIN=0]="MIN",f[f.DEFAULT=1]="DEFAULT",f[f.ALL=2]="ALL",f[f.CUSTOM=3]="CUSTOM"))(e=D.LogSelectColumnMode||={});let t;(d=>(d[d.ASC=0]="ASC",d[d.DSC=1]="DSC"))(t=D.SortDirection||={});let s;(A=>(A.ALL="ALL",A.DIS="DIS",A.ERR="ERR",A.WRN="WRN",A.INF="INF",A.PRO="PRO",A.MET="MET",A.EVT="EVT"))(s=D.LogEventClass||={});let n;(R=>(R.Single="Single",R.List="List",R.Multi="Multi"))(n=D.WUDetailsAttrValueType||={});let i;(R=>(R.SyntaxCheck="SyntaxCheck",R.Deploy="Deploy",R.Publish="Publish"))(i=D.EclDefinitionActions||={});let o;(R=>(R.xml="xml",R.json="json",R.text="text"))(o=D.ErrorMessageFormat||={});let a;(R=>(R[R.XML=0]="XML",R[R.JSON=1]="JSON",R[R.CSV=2]="CSV"))(a=D.LogAccessLogFormat||={});let u;(f=>(f.info="info",f.warning="warning",f.error="error",f.alert="alert"))(u=D.WUExceptionSeverity||={});let p;(J=>(J.Allqueries="All queries",J.Notsuspended="Not suspended",J.Suspended="Suspended",J.Suspendedbyuser="Suspended by user",J.Suspendedbyfirstnode="Suspended by first node",J.Suspendedbyanynode="Suspended by any node"))(p=D.WUQueryFilterSuspendedType||={});let c;(se=>(se.All="All",se.Id="Id",se.Name="Name",se.Alias="Alias",se.Status="Status"))(c=D.WUQuerySetFilterType||={});let l;(R=>(R.All="All",R.Protected="Protected",R.NotProtected="NotProtected"))(l=D.WUProtectFilter||={});let g;(rn=>rn.Deactivate="Deactivate")(g=D.QuerySetAliasActionTypes||={});let C;(d=>(d.None="None",d.ActivateImportedActive="ActivateImportedActive"))(C=D.QuerysetImportActivation||={});let T;(A=>(A.Suspend="Suspend",A.Unsuspend="Unsuspend",A.ToggleSuspend="ToggleSuspend",A.Activate="Activate",A.Delete="Delete",A.DeleteQueriesAndWUs="DeleteQueriesAndWUs",A.RemoveAllAliases="RemoveAllAliases",A.ResetQueryStats="ResetQueryStats"))(T=D.QuerySetQueryActionTypes||={});let ut;(f=>(f[f.DoNotActivateQuery=0]="DoNotActivateQuery",f[f.ActivateQuery=1]="ActivateQuery",f[f.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",f[f.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious"))(ut=D.WUQueryActivationMode||={})})(E||={});var ce=class extends m{constructor(e){super(e,"WsWorkunits","2")}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 ht=(d=>(d[d.Unknown=0]="Unknown",d[d.Compiled=1]="Compiled",d[d.Running=2]="Running",d[d.Completed=3]="Completed",d[d.Failed=4]="Failed",d[d.Archived=5]="Archived",d[d.Aborting=6]="Aborting",d[d.Aborted=7]="Aborted",d[d.Blocked=8]="Blocked",d[d.Submitted=9]="Submitted",d[d.Scheduled=10]="Scheduled",d[d.Compiling=11]="Compiling",d[d.Wait=12]="Wait",d[d.UploadingFiled=13]="UploadingFiled",d[d.DebugPaused=14]="DebugPaused",d[d.DebugRunning=15]="DebugRunning",d[d.Paused=16]="Paused",d[d.LAST=17]="LAST",d[d.NotFound=999]="NotFound",d))(ht||{}),V;(e=>{let r;(g=>(g[g.Unknown=0]="Unknown",g[g.Compile=1]="Compile",g[g.Check=2]="Check",g[g.Run=3]="Run",g[g.ExecuteExisting=4]="ExecuteExisting",g[g.Pause=5]="Pause",g[g.PauseNow=6]="PauseNow",g[g.Resume=7]="Resume",g[g.Debug=8]="Debug",g[g.__size=9]="__size"))(r=e.Action||={})})(V||={});function Ss(r){return typeof r.Name=="string"}function jo(r){return r.TotalClusterTime!==void 0}function Oo(r){return r.StateEx!==void 0}var W=class extends ce{constructor(e){super(e)}Ping(){return this._connection.send("Ping",{},"json",!1,void 0,"WsWorkunitsPingResponse").then(()=>({result:!0}))}WUQuery(e={},t){return this._connection.send("WUQuery",e,"json",!1,t).then(s=>Wn({Workunits:{ECLWorkunit:[]}},s))}WUInfo(e){let t={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(t)}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,t){return this._connection.send("WUResult",e,"json",!1,t)}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(t=>{let n=yn(t.Result).children();return n.length?n[0]:null})}},Ne=class extends ce{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};import{debounce as Zn,StateObject as $n}from"@hpcc-js/util";import{Cache as Mn,deepMixinT as yt,scopedLogger as Bn,StateObject as wn,XMLNode as Ut}from"@hpcc-js/util";import{format as Nn}from"d3-format";import{utcFormat as Qn,utcParse as Ln}from"d3-time-format";import{Cache as Rs,Edge as Fs,Graph as bs,StateObject as Un,Subgraph as Ps,Vertex as Is}from"@hpcc-js/util";var Qe=class extends Un{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,t,s){super(),this.wu=e;let n=0;for(let i of s)if(i.GraphName===t.Name&&!i.HasSubGraphId){n=Math.round(i.Seconds*1e3)/1e3;break}this.set({Time:n,...t})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(t=>ke(t)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(t=>ke(t))}},Le=class extends Rs{constructor(){super(e=>Rs.hash([e.Name]))}};function Ts(r,e,t){t=t||[],t.push(r),e(r.name,r.$,r.children(),t),r.children().forEach(s=>{Ts(s,e,t)}),t.pop()}function ft(r){let e={};return r.forEach(t=>{t.name==="att"&&(e[t.$.name]=t.$.value)}),e}var Dt=class extends bs{},xs=class extends Ps{},As=class extends Is{},Ws=class extends Fs{};function Ms(r,e){let t={},s={},n={},i=new Dt(a=>a._.id),o=[i.root];return Ts(e,(a,u,p,c)=>{let l=o[o.length-1];switch(a){case"graph":break;case"node":if(p.length&&p[0].children().length&&p[0].children()[0].name==="graph"){let T=l.createSubgraph(ft(p));o.push(T),t[u.id]=T}let g=l.createVertex(ft(p));s[u.id]=g;break;case"edge":let C=l.createEdge(s[u.source],s[u.target],ft(p));n[u.id]=C;break;default:}}),i}var Ge=class extends bs{},ys=class extends Ps{},Us=class extends Is{},Es=class extends Fs{};function ke(r){let e={},t={},s={},n;for(let i of r)switch(i.ScopeType){case"graph":n=new Ge(c=>c._.Id,i),e[i.ScopeName]=n.root;break;case"subgraph":n||(n=new Ge(c=>c._.Id,i),e[i.ScopeName]=n.root);let o=i.parentScope().split(":"),a=e[i.parentScope()];for(;o.length&&!a;)a=e[o.join(":")],o.pop();if(!a)console.warn(`Missing SG:Parent (${i.Id}): ${i.parentScope()}`);else{let c=a;e[i.ScopeName]=c.createSubgraph(i)}break;case"activity":let u=e[i.parentScope()];u?s[i.ScopeName]=u.createVertex(i):console.warn(`Missing A:Parent (${i.Id}): ${i.parentScope()}`);break;case"edge":t[i.ScopeName]=i;break;case"function":let p=s[i.parentScope()];p?p._.children().push(i):console.warn(`Missing F:Parent (${i.Id}): ${i.parentScope()}`);break}for(let i in t){let o=t[i],a=e[o.parentScope()];if(!a)console.warn(`Missing E:Parent (${o.Id}): ${o.parentScope()}`);else{let u=a;try{let p=n.vertex(o.attr("IdSource").RawValue),c=n.vertex(o.attr("IdTarget").RawValue);u.createEdge(p,c,o)}catch{console.warn(`Invalid Edge: ${i}`)}}}return n}import{StateObject as En}from"@hpcc-js/util";var ve=class extends En{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,t){super(),this.wu=e;let s=t.split("\\").join("/"),n=s.split("/"),i="res/"+this.wu.Wuid+"/",o="",a="";s.indexOf(i)===0&&(o=s.substr(i.length),a=n[n.length-1]),this.set({URL:t,DisplayName:a,DisplayPath:o})}};import{Cache as xt,exists as Rt,StateObject as bn}from"@hpcc-js/util";import{SAXStackParser as Fn,Stack as Bs}from"@hpcc-js/util";var Ve=class{e;constructor(e){this.e=e}fix(){delete this.e}},_e=class extends Ve{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 t=this._children.length-1;t>=0;--t){let s=this._children[t];s.name==="Row"&&s.type===void 0&&(this._children.push(...s._children),this._children.splice(t,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 t="0123456789",s=this.type.lastIndexOf("_"),n=s>0?s:this.type.length,i=n-1;for(;i>=0&&t.indexOf(this.type.charAt(i))!==-1;--i);i+1<n&&(e=parseInt(this.type.substring(i+1,n),10)),this.type.indexOf("data")===0&&(e*=2);break}return e<this.name.length&&(e=this.name.length),e}},He=class extends Ve{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()}},je=class{root;simpleTypes={};fields(){return this.root.children()}},Oe=class extends Fn{schema=new je;simpleType;simpleTypes={};xsdStack=new Bs;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":let t=new _e(e);this.schema.root?this.xsdStack.depth()&&this.xsdStack.top().append(t):this.schema.root=t,this.xsdStack.push(t);break;case"xs:simpleType":this.simpleType=new He(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 s=this.xsdStack.top();for(let n in e.$)s.attrs[n]=e.$[n];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};function St(r){let e=new Oe;return e.parse(r),e.schema}var Ct=class extends Oe{_rootName;schema=new je;simpleTypes={};xsdStack=new Bs;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":let t=new _e(e);!this.schema.root&&this._rootName===e.$.name&&(this.schema.root=t),this.xsdStack.depth()&&this.xsdStack.top().append(t),this.xsdStack.push(t);break;case"xsd:simpleType":this.simpleType=new He(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 ta(r,e){let t=new Ct(e);return t.parse(r),t.schema}var At=class extends xt{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}},Ye=new At,Xe=class r extends bn{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,t,s,n){let i;return Array.isArray(n)?(i=Ye.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s.Name},()=>new r(e,t,s,n)),i.set(s)):typeof n>"u"&&(typeof s=="number"?i=Ye.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:"Sequence_"+s},()=>new r(e,t,s)):typeof s=="string"&&(i=Ye.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s},()=>new r(e,t,s)))),i}static attachLogicalFile(e,t,s){return Ye.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s},()=>new r(e,t,s,!0))}constructor(e,t,s,n){super(),e instanceof W?this.connection=e:this.connection=new W(e),typeof n=="boolean"&&n===!0?this.set({NodeGroup:t,LogicalFileName:s}):Ss(s)&&Array.isArray(n)?this.set({...s,Wuid:t,ResultName:s.Name,ResultViews:n}):typeof n>"u"?typeof s=="number"?this.set({Wuid:t,ResultSequence:s}):typeof s=="string"?this.set({Wuid:t,ResultName:s}):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(t=>t.Result?.XmlSchema?.xml?(this.xsdSchema=St(t.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,t=-1,s=!1,n={},i){return this.WUResult(e,t,!s,n,i).then(o=>{let a=o.Result;return delete o.Result,this.set({...o}),Rt("XmlSchema.xml",a)&&(this.xsdSchema=St(a.XmlSchema.xml)),Rt("Row",a)?a.Row:this.ResultName&&Rt(this.ResultName,a)?a[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,t=1,s=!1,n={},i){let o={NamedValue:{itemcount:0}};for(let u in n)o.NamedValue[o.NamedValue.itemcount++]={Name:u,Value:n[u]};let a={FilterBy:o};return this.Wuid&&this.ResultName!==void 0?(a.Wuid=this.Wuid,a.ResultName=this.ResultName):this.Wuid&&this.ResultSequence!==void 0?(a.Wuid=this.Wuid,a.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(a.LogicalName=this.LogicalFileName,a.Cluster=this.NodeGroup):this.LogicalFileName&&(a.LogicalName=this.LogicalFileName),a.Start=e,a.Count=t,a.SuppressXmlSchema=s,this.connection.WUResult(a,i).then(u=>u)}},qe=class extends xt{constructor(){super(e=>xt.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};import{StateObject as ws}from"@hpcc-js/util";var _=class extends ws{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,t){super(),this.scope=e,this.set(t)}},Wt=class extends ws{_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=[],t={start:null,end:null};return this.Properties.Property.forEach(s=>{s.Measure==="ts"&&s.Name.indexOf("Started")>=0?t.start=s:this.ScopeName&&s.Measure==="ts"&&s.Name.indexOf("Finished")>=0?t.end=s:e.push(new _(this,s))}),t.start&&t.end?(t.start.FormattedEnd=t.end.Formatted,e.push(new _(this,t.start))):t.start?e.push(new _(this,t.start)):t.end&&e.push(new _(this,t.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(t=>{this._attributeMap[t.Name]=t}),this.Properties.Property=[];for(let t in this._attributeMap)this._attributeMap.hasOwnProperty(t)&&this.Properties.Property.push(this._attributeMap[t].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 t of this.children())if(t.walk(e))return!0;return e.end(this)}formattedAttrs(){let e={};for(let t in this._attributeMap)e[t]=this._attributeMap[t].Formatted||this._attributeMap[t].RawValue;return e}rawAttrs(){let e={};for(let t in this._attributeMap)e[t]=this._attributeMap[t].RawValue;return e}hasAttr(e){return this._attributeMap[e]!==void 0}attr(e){return this._attributeMap[e]||new _(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let t="",s=[];t=this.Id,s.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&s.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),s.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);let n=this.formattedAttrs();for(let i in n)i==="Label"?t=n[i]:s.push(`<tr><td class="key">${i}</td><td class="value">${n[i]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">
910
+ `;import{Buffer as Kt}from"safe-buffer";var Zr="@hpcc-js/comms",$r="3.5.0",ei="3.5.0";import{join as Se}from"@hpcc-js/util";import{join as lt,promiseTimeout as on,scopedLogger as an}from"@hpcc-js/util";var $t=an("comms/connection.ts");function ni(r){return"baseUrl"in r}var cn={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function ri(r){return typeof r.opts=="function"&&typeof r.send=="function"&&typeof r.clone=="function"}function M(r,e){return e===void 0||e===!0?encodeURIComponent(r):""+r}function G(r,e=!0,t=""){if(t&&(t+="."),typeof r!="object")return M(r,e);let s=[];for(let n in r)if(r.hasOwnProperty(n))if(r[n]instanceof Array){let i=!1;r[n].forEach((o,a)=>{typeof o=="object"?(i=!0,s.push(G(o,e,t+M(`${n}.${a}`,e)))):s.push(t+M(`${n}_i${a}`,e)+"="+G(o,e))}),i&&s.push(t+M(`${n}.itemcount`,e)+"="+r[n].length)}else typeof r[n]=="object"?r[n]&&r[n].Item instanceof Array?(s.push(G(r[n].Item,e,t+M(n,e))),s.push(t+M(`${n}.itemcount`,e)+"="+r[n].Item.length)):s.push(G(r[n],e,t+M(n,e))):r[n]!==void 0?s.push(t+M(n,e)+"="+M(r[n],e)):s.push(t+M(n,e));return s.join("&")}function un(r){return JSON.parse(r)}function ln(r,e,t={},s="json",n){return n&&console.warn("Header attributes ignored for JSONP connections"),new Promise((i,o)=>{let a=r.timeoutSecs*1e3,u=5e3,p="jsonp_callback_"+Math.round(Math.random()*999999);window[p]=function(T){a=0,C(),i(s==="json"&&typeof T=="string"?un(T):T)};let c=document.createElement("script"),l=lt(r.baseUrl,e);l+=l.indexOf("?")>=0?"&":"?",c.src=l+"jsonp="+p+"&"+G(t,r.encodeRequest),document.body.appendChild(c);let g=setInterval(function(){a<=0?clearInterval(g):(a-=u,a<=0?(clearInterval(g),$t.error("Request timeout: "+c.src),C(),o(Error("Request timeout: "+c.src))):$t.debug("Request pending ("+a/1e3+" sec): "+c.src))},u);function C(){delete window[p],document.body.removeChild(c)}})}function pn(r){return r.userID?{Authorization:`Basic ${btoa(`${r.userID}:${r.password}`)}`}:{}}var fe={};function es(r,e,t,s,n){s={...pn(r),...s},t={credentials:fe[r.baseUrl]?"omit":"include",...t,headers:s},fetch.__setGlobalDispatcher&&fetch.__setGlobalDispatcher(fetch.__defaultAgent),r.baseUrl.indexOf("https:")===0&&(r.rejectUnauthorized===!1&&fetch.__rejectUnauthorizedAgent?fetch.__setGlobalDispatcher?fetch.__setGlobalDispatcher(fetch.__rejectUnauthorizedAgent):t.agent=fetch.__rejectUnauthorizedAgent:fetch.__trustwaveAgent&&(t.agent=fetch.__trustwaveAgent));function i(o){if(o.ok)return n==="json"?o.json():o.text();throw new Error(o.statusText)}return on(r.timeoutSecs*1e3,fetch(lt(r.baseUrl,e),t).then(i).catch(o=>(t.credentials=fe[r.baseUrl]?"include":"omit",fetch(lt(r.baseUrl,e),t).then(i).then(a=>(fe[r.baseUrl]=!fe[r.baseUrl],a)))))}function gn(r,e,t,s="json",n){t.upload_&&(delete t.upload_,e+="?upload_");let i;return t.abortSignal_&&(i=t.abortSignal_,delete t.abortSignal_),es(r,e,{method:"post",body:G(t,r.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...n},s)}function dn(r,e,t,s="json",n){let i;return t.abortSignal_&&(i=t.abortSignal_,delete t.abortSignal_),es(r,`${e}?${G(t,r.encodeRequest)}`,{method:"get",signal:i},{...n},s)}function mn(r,e,t,s="json",n){let i;switch(r.type){case"jsonp":i=ln(r,e,t,s,n);break;case"get":i=dn(r,e,t,s,n);break;case"post":default:i=gn(r,e,t,s,n);break}return i}var De=mn;function ii(r){let e=De;return r&&(De=r),e}var pt=class r{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return arguments.length===0?this._opts:(this._opts={...cn,...e},this)}send(e,t,s="json",n){return this._opts.hookSend?this._opts.hookSend(this._opts,e,t,s,De,n):De(this._opts,e,t,s,n)}clone(){return new r(this.opts())}},Ce=function(r){return new pt(r)};function oi(r){let e=Ce;return Ce=r,e}function hn(r){return Object.prototype.toString.call(r)==="[object Array]"}var k=class extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,t,s){super("ESPException: "+s.Source),this.action=e,this.request=t,this.Source=s.Source,this.Exception=s.Exception,s.Exception.length?this.message=`${s.Exception[0].Code}: ${s.Exception[0].Message}`:this.message=""}};function di(r){return r instanceof k||r.isESPExceptions&&Array.isArray(r.Exception)}function fn(r){return r.send!==void 0}var ne=class r{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,t,s){this._connection=fn(e)?e:Ce(e),this._service=t,this._version=s}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,t){if(hn(e[t])){for(let s=0;s<e[t].length;++s)e[t+"_i"+s]=e[t][s];delete e[t]}return e}opts(e){return e===void 0?this._connection.opts():(this._connection.opts(e),this)}send(e,t={},s="json",n=!1,i,o){let a={...t,ver_:this._version};n&&(a.upload_=!0),i&&(a.abortSignal_=i);let u,p="json";switch(s){case"text":u=Se(this._service,e),p="text";break;case"xsd":u=Se(this._service,e+".xsd"),p="text";break;case"json2":u=Se(this._service,e+"/json"),s="json",e=e.split("/").pop();break;default:u=Se(this._service,e+".json")}return this._connection.send(u,a,p).then(c=>{if(s==="json"){let l;if(c&&c.Exceptions)throw new k(e,a,c.Exceptions);if(c&&(l=c[o||e+"Response"]),!l)throw new k(e,a,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return l}return c})}clone(){return new r(this._connection.clone(),this._service,this._version)}},m=class{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,t,s){this._connection=new ne(e,t,s)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};var re;(e=>{let r;(u=>(u.Delete="Delete",u.Protect="Protect",u.Unprotect="Unprotect",u.Restore="Restore",u.SetToFailed="SetToFailed",u.Archive="Archive"))(r=e.DFUWUActions||={})})(re||={});var Re=class extends m{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 Dn=(c=>(c[c.unknown=0]="unknown",c[c.scheduled=1]="scheduled",c[c.queued=2]="queued",c[c.started=3]="started",c[c.aborted=4]="aborted",c[c.failed=5]="failed",c[c.finished=6]="finished",c[c.monitoring=7]="monitoring",c[c.aborting=8]="aborting",c[c.notfound=999]="notfound",c))(Dn||{}),v=class extends Re{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 ts;(o=>{let r;(p=>(p.User="User",p.Group="Group"))(r=o.ViewMemberType||={});let e;(g=>(g.username="username",g.fullname="fullname",g.passwordexpiration="passwordexpiration",g.employeeID="employeeID",g.employeeNumber="employeeNumber"))(e=o.UserSortBy||={});let t;(p=>(p.Name="Name",p.ManagedBy="ManagedBy"))(t=o.GroupSortBy||={});let s;(c=>(c.Any="Any",c.User="User",c.Group="Group"))(s=o.AccountTypeReq||={});let n;(p=>(p.Name="Name",p.Type="Type"))(n=o.ResourcePermissionSortBy||={});let i;(u=>u.Name="Name")(i=o.ResourceSortBy||={})})(ts||={});var xe=class extends m{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 ss=class extends xe{};var Ae=class extends m{constructor(e){super(e,"ws_account","1.06")}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 ns=class extends Ae{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===20043))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:t.Exception}};throw t})}};var We=class extends m{constructor(e){super(e,"WsCloud","1")}GetPODs(e){return this._connection.send("GetPODs",e)}Ping(e){return this._connection.send("Ping",e)}};var rs=class extends We{getPODs(){return super.GetPODs({}).then(e=>{try{return(typeof e.Result=="string"?JSON.parse(e.Result):e.Result)?.items??[]}catch{return[]}})}};var is=class{_connection;constructor(e){this._connection=new ne(e,"ws_codesign","1.1")}connectionOptions(){return this._connection.opts()}ListUserIDs(e){return this._connection.send("ListUserIDs",e).then(t=>t.UserIDs.Item).catch(t=>[])}Sign(e){return this._connection.send("Sign",{SigningMethod:"gpg",...e})}Verify(e){return this._connection.send("Verify",e)}};var ye=class extends m{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 os=class extends ye{};var z;(a=>{let r;(g=>(g.Delete="Delete",g.AddToSuperfile="Add To Superfile",g.ChangeProtection="Change Protection",g.ChangeRestriction="Change Restriction"))(r=a.DFUArrayActions||={});let e;(g=>(g[g.NoChange=0]="NoChange",g[g.Protect=1]="Protect",g[g.Unprotect=2]="Unprotect",g[g.UnprotectAll=3]="UnprotectAll"))(e=a.DFUChangeProtection||={});let t;(l=>(l[l.NoChange=0]="NoChange",l[l.Restrict=1]="Restrict",l[l.Unrestricted=2]="Unrestricted"))(t=a.DFUChangeRestriction||={});let s;(c=>(c.xml="xml",c.def="def"))(s=a.DFUDefFileFormat||={});let n;(l=>(l.Token="Token",l.Engine="Engine",l.External="External"))(n=a.FileAccessRole||={});let i;(C=>(C.None="None",C.Access="Access",C.Read="Read",C.Write="Write",C.Full="Full"))(i=a.SecAccessType||={});let o;(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"))(o=a.DFUFileType||={})})(z||={});var Ue=class extends m{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 Hi=z.DFUArrayActions,ji=z.DFUDefFileFormat,Oi=z.DFUChangeProtection,Yi=z.DFUChangeRestriction,ie=class extends Ue{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}};var as=class extends m{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 cs(r,e){let t=typeof e;switch(t){case"boolean":case"number":case"string":return{id:r,type:t};case"object":if(e.Row instanceof Array&&(e=e.Row),e instanceof Array)return{id:r,type:"dataset",children:gt(e[0])};if(e instanceof Object){if(e.Item&&e.Item instanceof Array&&e.Item.length===1){let s=typeof e.Item[0];if(s==="string"||s==="number")return{id:r,type:"set",fieldType:s};throw new Error("Unknown field type")}return{id:r,type:"object",fields:Cn(e)}}default:throw new Error("Unknown field type")}}function gt(r){r.Row&&r.Row instanceof Array&&(r=r.Row[0]);let e=[];for(let t in r)e.push(cs(t,r[t]));return e}function Cn(r){let e={};for(let t in r)e[t]=cs(t,r[t]);return e}var Ee=class extends m{constructor(e){super(e,"WsEcl","0")}opts(){return this._connection.opts()}requestJson(e,t){return this._connection.send(`example/request/query/${e}/${t}/json`,{},"text").then(s=>{let n=JSON.parse(s);for(let i in n)return n[i];return{}}).then(gt)}responseJson(e,t){return this._connection.send(`example/response/query/${e}/${t}/json`,{},"text").then(s=>{let n=JSON.parse(s);for(let i in n)return n[i].Results;return{}}).then(s=>{let n={};for(let i in s)n[i]=gt(s[i]);return n})}submit(e,t,s){let n=`submit/query/${e}/${t}`;return this._connection.send(n,s,"json2").then(i=>{if(i.Results&&i.Results.Exception)throw new k(n,s,{Source:"wsEcl.submit",Exception:i.Results.Exception});return i.Results})}};var Fe=class extends m{constructor(e){super(e,"ws_elk","1")}GetConfigDetails(e){return this._connection.send("GetConfigDetails",e)}Ping(e){return this._connection.send("Ping",e)}};var us=class extends Fe{};import{scopedLogger as Sn}from"@hpcc-js/util";var x;(a=>{let r;(f=>(f.global="global",f.workunits="workunits",f.components="components",f.audience="audience",f.class="class",f.instance="instance",f.node="node",f.message="message",f.logid="logid",f.processid="processid",f.threadid="threadid",f.timestamp="timestamp",f.pod="pod"))(r=a.LogColumnType||={});let e;(g=>(g.string="string",g.numeric="numeric",g.datetime="datetime",g.enum="enum"))(e=a.LogColumnValueType||={});let t;(h=>(h[h.All=0]="All",h[h.ByJobID=1]="ByJobID",h[h.ByComponent=2]="ByComponent",h[h.ByLogType=3]="ByLogType",h[h.ByTargetAudience=4]="ByTargetAudience",h[h.BySourceInstance=5]="BySourceInstance",h[h.BySourceNode=6]="BySourceNode",h[h.ByFieldName=7]="ByFieldName",h[h.ByPod=8]="ByPod"))(t=a.LogAccessType||={});let s;(l=>(l[l.NONE=0]="NONE",l[l.AND=1]="AND",l[l.OR=2]="OR"))(s=a.LogAccessFilterOperator||={});let n;(g=>(g[g.MIN=0]="MIN",g[g.DEFAULT=1]="DEFAULT",g[g.ALL=2]="ALL",g[g.CUSTOM=3]="CUSTOM"))(n=a.LogSelectColumnMode||={});let i;(h=>(h[h.ByDate=0]="ByDate",h[h.ByJobID=1]="ByJobID",h[h.ByComponent=2]="ByComponent",h[h.ByLogType=3]="ByLogType",h[h.ByTargetAudience=4]="ByTargetAudience",h[h.BySourceInstance=5]="BySourceInstance",h[h.BySourceNode=6]="BySourceNode",h[h.ByFieldName=7]="ByFieldName",h[h.ByPod=8]="ByPod"))(i=a.SortColumType||={});let o;(c=>(c[c.ASC=0]="ASC",c[c.DSC=1]="DSC"))(o=a.SortDirection||={})})(x||={});var be=class extends m{constructor(e){super(e,"ws_logaccess","1.05")}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 ls=Sn("@hpcc-js/comms/services/wsLogaccess.ts");var Rn=(o=>(o.Disaster="DIS",o.Error="ERR",o.Warning="WRN",o.Information="INF",o.Progress="PRO",o.Metric="MET",o))(Rn||{}),xn=(n=>(n.Operator="OPR",n.User="USR",n.Programmer="PRO",n.Audit="ADT",n))(xn||{}),ps=class extends be{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}async GetLogsEx(e){let t=await this.GetLogAccessInfo(),s={};t.Columns.Column.forEach(a=>s[a.LogType]=a.Name);let n=a=>{let u={};for(let p in s)a?.fields?u[p]=Object.assign({},...a.fields)[s[p]]??"":u[p]="";return u},i={Filter:{leftBinaryFilter:{BinaryLogFilter:[{leftFilter:{LogCategory:x.LogAccessType.All}}]}},Range:{StartDate:new Date(0).toISOString()},LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:x.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:x.SortColumType.ByDate,ColumnName:"",Direction:0}]}},o=[];for(let a in e){let u;a in s&&(Object.values(x.LogColumnType).includes(a)?u=a:u=s[a]);let p;if(u){switch(u){case x.LogColumnType.workunits:case"hpcc.log.jobid":p=x.LogAccessType.ByJobID;break;case x.LogColumnType.audience:case"hpcc.log.audience":p=x.LogAccessType.ByTargetAudience;break;case x.LogColumnType.class:case"hpcc.log.class":p=x.LogAccessType.ByLogType;break;case x.LogColumnType.components:case"kubernetes.container.name":p=x.LogAccessType.ByComponent;break;default:p=x.LogAccessType.ByFieldName,u=s[a]}if(Array.isArray(e[a]))e[a].forEach(c=>{p===x.LogAccessType.ByComponent&&(c+="*"),o.push({LogCategory:p,SearchField:u,SearchByValue:c})});else{let c=e[a];p===x.LogAccessType.ByComponent&&(c+="*"),o.push({LogCategory:p,SearchField:u,SearchByValue:c})}}}if(o.length>2){let a=i.Filter.leftBinaryFilter.BinaryLogFilter[0];o.forEach((u,p)=>{let c=x.LogAccessFilterOperator.AND;p>0?(o[p-1].SearchField===u.SearchField&&(c=x.LogAccessFilterOperator.OR),p===o.length-1?(a.Operator=c,a.rightFilter=u):(a.Operator=c,a.rightBinaryFilter={BinaryLogFilter:[{leftFilter:u}]},a=a.rightBinaryFilter.BinaryLogFilter[0])):a.leftFilter=u})}else delete i.Filter.leftBinaryFilter,i.Filter.leftFilter={LogCategory:x.LogAccessType.All},o[0]?.SearchField&&(i.Filter.leftFilter={LogCategory:o[0]?.LogCategory,SearchField:o[0]?.SearchField,SearchByValue:o[0]?.SearchByValue}),o[1]?.SearchField&&(i.Filter.Operator=x.LogAccessFilterOperator.AND,o[0].SearchField===o[1].SearchField&&(i.Filter.Operator=x.LogAccessFilterOperator.OR),i.Filter.rightFilter={LogCategory:o[1]?.LogCategory,SearchField:o[1]?.SearchField,SearchByValue:o[1]?.SearchByValue});return e.StartDate&&(i.Range.StartDate=e.StartDate.toISOString()),e.EndDate&&(i.Range.EndDate=e.EndDate.toISOString()),this.GetLogs(i).then(a=>{try{let u=JSON.parse(a.LogLines),p=[];switch(t.RemoteLogManagerType){case"azureloganalyticscurl":case"elasticstack":case"grafanacurl":p=u.lines?.map(n)??[];break;default:ls.warning(`Unknown RemoteLogManagerType: ${t.RemoteLogManagerType}`),p=[]}return{lines:p,total:a.TotalLogLinesAvailable??1e4}}catch(u){ls.error(u.message??u)}return{lines:[],total:0}})}};import{exists as An}from"@hpcc-js/util";import{max as dt,mean as mt}from"d3-array";var Pe=class extends m{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 w=class extends Pe{GetTargetClusterUsageEx(e,t=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:t}).then(s=>An("TargetClusterUsages.TargetClusterUsage",s)?s.TargetClusterUsages.TargetClusterUsage:[]).then(s=>s.filter(n=>!!n.ComponentUsages).map(n=>{let i=n.ComponentUsages.ComponentUsage.map(o=>{let a=(o.MachineUsages&&o.MachineUsages.MachineUsage?o.MachineUsages.MachineUsage:[]).map(u=>{let p=u.DiskUsages&&u.DiskUsages.DiskUsage?u.DiskUsages.DiskUsage.map(c=>({...c,InUse:c.InUse*1024,Total:(c.InUse+c.Available)*1024,PercentUsed:100-c.PercentAvailable})):[];return{Name:u.Name,NetAddress:u.NetAddress,Description:u.Description,DiskUsages:p,mean:mt(p.filter(c=>!isNaN(c.PercentUsed)),c=>c.PercentUsed),max:dt(p.filter(c=>!isNaN(c.PercentUsed)),c=>c.PercentUsed)}});return{Type:o.Type,Name:o.Name,Description:o.Description,MachineUsages:a,MachineUsagesDescription:a.reduce((u,p)=>u+(p.Description||""),""),mean:mt(a.filter(u=>!isNaN(u.mean)),u=>u.mean),max:dt(a.filter(u=>!isNaN(u.max)),u=>u.max)}});return{Name:n.Name,Description:n.Description,ComponentUsages:i,ComponentUsagesDescription:i.reduce((o,a)=>o+(a.MachineUsagesDescription||""),""),mean:mt(i.filter(o=>!isNaN(o.mean)),o=>o.mean),max:dt(i.filter(o=>!isNaN(o.max)),o=>o.max)}}))}};var Ie=class extends m{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 gs=class extends Ie{};var Te=class extends m{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 ds=class extends Te{};var ms;(e=>{let r;(n=>(n.ECL="ECL",n.DFU="DFU"))(r=e.WUTypes||={})})(ms||={});var Me=class extends m{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 hs=class extends Me{};var fs;(t=>{let r;(u=>(u.ALL="ALL",u.READ="READ",u.WRITE="WRITE",u.HOLD="HOLD",u.SUB="SUB"))(r=t.LockModes||={});let e;(l=>(l.Attach="Attach",l.Detach="Detach",l.State="State",l.Reload="Reload",l.ReloadRetry="ReloadRetry",l.MemLock="MemLock",l.MemUnlock="MemUnlock",l.GetMemLocked="GetMemLocked"))(e=t.RoxieControlCmdType||={})})(fs||={});var Be=class extends m{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 oe=class extends Be{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(t=>({Running:{ActiveWorkunit:[]},...t}))}};var ae=class extends m{constructor(e){super(e,"WsStore","1")}CreateStore(e){return this._connection.send("Fetch",e)}Delete(e){return this._connection.send("Delete",e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===-1))return{Exceptions:void 0,Success:!0};throw t})}DeleteNamespace(e){return this._connection.send("DeleteNamespace",e)}Fetch(e){return this._connection.send("Fetch",e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===-1))return{Exceptions:void 0,Value:void 0};throw t})}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 Ds;(e=>{let r;(i=>(i.All="All",i.QueriesOnly="QueriesOnly",i.WorkunitsOnly="WorkunitsOnly"))(r=e.RoxieQueueFilter||={})})(Ds||={});var we=class extends m{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 y=class extends we{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(t=>{if(t.default)return t.default;let s,n;return t.TpLogicalClusters.TpLogicalCluster.some((i,o)=>(o===0&&(n=i),i.Type==="hthor"?(s=i,!0):!1)),s||n})}};import{deepMixin as Wn,xml2json as yn}from"@hpcc-js/util";var E;(D=>{let r;(I=>(I.Abort="Abort",I.Delete="Delete",I.Deschedule="Deschedule",I.Reschedule="Reschedule",I.Pause="Pause",I.PauseNow="PauseNow",I.Protect="Protect",I.Unprotect="Unprotect",I.Restore="Restore",I.Resume="Resume",I.SetToFailed="SetToFailed",I.Archive="Archive"))(r=D.ECLWUActions||={});let e;(f=>(f[f.MIN=0]="MIN",f[f.DEFAULT=1]="DEFAULT",f[f.ALL=2]="ALL",f[f.CUSTOM=3]="CUSTOM"))(e=D.LogSelectColumnMode||={});let t;(d=>(d[d.ASC=0]="ASC",d[d.DSC=1]="DSC"))(t=D.SortDirection||={});let s;(A=>(A.ALL="ALL",A.DIS="DIS",A.ERR="ERR",A.WRN="WRN",A.INF="INF",A.PRO="PRO",A.MET="MET",A.EVT="EVT"))(s=D.LogEventClass||={});let n;(R=>(R.Single="Single",R.List="List",R.Multi="Multi"))(n=D.WUDetailsAttrValueType||={});let i;(R=>(R.SyntaxCheck="SyntaxCheck",R.Deploy="Deploy",R.Publish="Publish"))(i=D.EclDefinitionActions||={});let o;(R=>(R.xml="xml",R.json="json",R.text="text"))(o=D.ErrorMessageFormat||={});let a;(R=>(R[R.XML=0]="XML",R[R.JSON=1]="JSON",R[R.CSV=2]="CSV"))(a=D.LogAccessLogFormat||={});let u;(f=>(f.info="info",f.warning="warning",f.error="error",f.alert="alert"))(u=D.WUExceptionSeverity||={});let p;(J=>(J.Allqueries="All queries",J.Notsuspended="Not suspended",J.Suspended="Suspended",J.Suspendedbyuser="Suspended by user",J.Suspendedbyfirstnode="Suspended by first node",J.Suspendedbyanynode="Suspended by any node"))(p=D.WUQueryFilterSuspendedType||={});let c;(se=>(se.All="All",se.Id="Id",se.Name="Name",se.Alias="Alias",se.Status="Status"))(c=D.WUQuerySetFilterType||={});let l;(R=>(R.All="All",R.Protected="Protected",R.NotProtected="NotProtected"))(l=D.WUProtectFilter||={});let g;(rn=>rn.Deactivate="Deactivate")(g=D.QuerySetAliasActionTypes||={});let C;(d=>(d.None="None",d.ActivateImportedActive="ActivateImportedActive"))(C=D.QuerysetImportActivation||={});let T;(A=>(A.Suspend="Suspend",A.Unsuspend="Unsuspend",A.ToggleSuspend="ToggleSuspend",A.Activate="Activate",A.Delete="Delete",A.DeleteQueriesAndWUs="DeleteQueriesAndWUs",A.RemoveAllAliases="RemoveAllAliases",A.ResetQueryStats="ResetQueryStats"))(T=D.QuerySetQueryActionTypes||={});let ut;(f=>(f[f.DoNotActivateQuery=0]="DoNotActivateQuery",f[f.ActivateQuery=1]="ActivateQuery",f[f.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",f[f.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious"))(ut=D.WUQueryActivationMode||={})})(E||={});var ce=class extends m{constructor(e){super(e,"WsWorkunits","2")}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 ht=(d=>(d[d.Unknown=0]="Unknown",d[d.Compiled=1]="Compiled",d[d.Running=2]="Running",d[d.Completed=3]="Completed",d[d.Failed=4]="Failed",d[d.Archived=5]="Archived",d[d.Aborting=6]="Aborting",d[d.Aborted=7]="Aborted",d[d.Blocked=8]="Blocked",d[d.Submitted=9]="Submitted",d[d.Scheduled=10]="Scheduled",d[d.Compiling=11]="Compiling",d[d.Wait=12]="Wait",d[d.UploadingFiled=13]="UploadingFiled",d[d.DebugPaused=14]="DebugPaused",d[d.DebugRunning=15]="DebugRunning",d[d.Paused=16]="Paused",d[d.LAST=17]="LAST",d[d.NotFound=999]="NotFound",d))(ht||{}),V;(e=>{let r;(g=>(g[g.Unknown=0]="Unknown",g[g.Compile=1]="Compile",g[g.Check=2]="Check",g[g.Run=3]="Run",g[g.ExecuteExisting=4]="ExecuteExisting",g[g.Pause=5]="Pause",g[g.PauseNow=6]="PauseNow",g[g.Resume=7]="Resume",g[g.Debug=8]="Debug",g[g.__size=9]="__size"))(r=e.Action||={})})(V||={});function Ss(r){return typeof r.Name=="string"}function jo(r){return r.TotalClusterTime!==void 0}function Oo(r){return r.StateEx!==void 0}var W=class extends ce{constructor(e){super(e)}Ping(){return this._connection.send("Ping",{},"json",!1,void 0,"WsWorkunitsPingResponse").then(()=>({result:!0}))}WUQuery(e={},t){return this._connection.send("WUQuery",e,"json",!1,t).then(s=>Wn({Workunits:{ECLWorkunit:[]}},s))}WUInfo(e){let t={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(t)}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,t){return this._connection.send("WUResult",e,"json",!1,t)}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(t=>{let n=yn(t.Result).children();return n.length?n[0]:null})}},Ne=class extends ce{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};import{debounce as Zn,StateObject as $n}from"@hpcc-js/util";import{Cache as Mn,deepMixinT as yt,scopedLogger as Bn,StateObject as wn,XMLNode as Ut}from"@hpcc-js/util";import{format as Nn}from"d3-format";import{utcFormat as Qn,utcParse as Ln}from"d3-time-format";import{Cache as Rs,Edge as Fs,Graph as bs,StateObject as Un,Subgraph as Ps,Vertex as Is}from"@hpcc-js/util";var Qe=class extends Un{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,t,s){super(),this.wu=e;let n=0;for(let i of s)if(i.GraphName===t.Name&&!i.HasSubGraphId){n=Math.round(i.Seconds*1e3)/1e3;break}this.set({Time:n,...t})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(t=>ke(t)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(t=>ke(t))}},Le=class extends Rs{constructor(){super(e=>Rs.hash([e.Name]))}};function Ts(r,e,t){t=t||[],t.push(r),e(r.name,r.$,r.children(),t),r.children().forEach(s=>{Ts(s,e,t)}),t.pop()}function ft(r){let e={};return r.forEach(t=>{t.name==="att"&&(e[t.$.name]=t.$.value)}),e}var Dt=class extends bs{},xs=class extends Ps{},As=class extends Is{},Ws=class extends Fs{};function Ms(r,e){let t={},s={},n={},i=new Dt(a=>a._.id),o=[i.root];return Ts(e,(a,u,p,c)=>{let l=o[o.length-1];switch(a){case"graph":break;case"node":if(p.length&&p[0].children().length&&p[0].children()[0].name==="graph"){let T=l.createSubgraph(ft(p));o.push(T),t[u.id]=T}let g=l.createVertex(ft(p));s[u.id]=g;break;case"edge":let C=l.createEdge(s[u.source],s[u.target],ft(p));n[u.id]=C;break;default:}}),i}var Ge=class extends bs{},ys=class extends Ps{},Us=class extends Is{},Es=class extends Fs{};function ke(r){let e={},t={},s={},n;for(let i of r)switch(i.ScopeType){case"graph":n=new Ge(c=>c._.Id,i),e[i.ScopeName]=n.root;break;case"subgraph":n||(n=new Ge(c=>c._.Id,i),e[i.ScopeName]=n.root);let o=i.parentScope().split(":"),a=e[i.parentScope()];for(;o.length&&!a;)a=e[o.join(":")],o.pop();if(!a)console.warn(`Missing SG:Parent (${i.Id}): ${i.parentScope()}`);else{let c=a;e[i.ScopeName]=c.createSubgraph(i)}break;case"activity":let u=e[i.parentScope()];u?s[i.ScopeName]=u.createVertex(i):console.warn(`Missing A:Parent (${i.Id}): ${i.parentScope()}`);break;case"edge":t[i.ScopeName]=i;break;case"function":let p=s[i.parentScope()];p?p._.children().push(i):console.warn(`Missing F:Parent (${i.Id}): ${i.parentScope()}`);break}for(let i in t){let o=t[i],a=e[o.parentScope()];if(!a)console.warn(`Missing E:Parent (${o.Id}): ${o.parentScope()}`);else{let u=a;try{let p=n.vertex(o.attr("IdSource").RawValue),c=n.vertex(o.attr("IdTarget").RawValue);u.createEdge(p,c,o)}catch{console.warn(`Invalid Edge: ${i}`)}}}return n}import{StateObject as En}from"@hpcc-js/util";var ve=class extends En{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,t){super(),this.wu=e;let s=t.split("\\").join("/"),n=s.split("/"),i="res/"+this.wu.Wuid+"/",o="",a="";s.indexOf(i)===0&&(o=s.substr(i.length),a=n[n.length-1]),this.set({URL:t,DisplayName:a,DisplayPath:o})}};import{Cache as xt,exists as Rt,StateObject as bn}from"@hpcc-js/util";import{SAXStackParser as Fn,Stack as Bs}from"@hpcc-js/util";var Ve=class{e;constructor(e){this.e=e}fix(){delete this.e}},_e=class extends Ve{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 t=this._children.length-1;t>=0;--t){let s=this._children[t];s.name==="Row"&&s.type===void 0&&(this._children.push(...s._children),this._children.splice(t,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 t="0123456789",s=this.type.lastIndexOf("_"),n=s>0?s:this.type.length,i=n-1;for(;i>=0&&t.indexOf(this.type.charAt(i))!==-1;--i);i+1<n&&(e=parseInt(this.type.substring(i+1,n),10)),this.type.indexOf("data")===0&&(e*=2);break}return e<this.name.length&&(e=this.name.length),e}},He=class extends Ve{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()}},je=class{root;simpleTypes={};fields(){return this.root.children()}},Oe=class extends Fn{schema=new je;simpleType;simpleTypes={};xsdStack=new Bs;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":let t=new _e(e);this.schema.root?this.xsdStack.depth()&&this.xsdStack.top().append(t):this.schema.root=t,this.xsdStack.push(t);break;case"xs:simpleType":this.simpleType=new He(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 s=this.xsdStack.top();for(let n in e.$)s.attrs[n]=e.$[n];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};function St(r){let e=new Oe;return e.parse(r),e.schema}var Ct=class extends Oe{_rootName;schema=new je;simpleTypes={};xsdStack=new Bs;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":let t=new _e(e);!this.schema.root&&this._rootName===e.$.name&&(this.schema.root=t),this.xsdStack.depth()&&this.xsdStack.top().append(t),this.xsdStack.push(t);break;case"xsd:simpleType":this.simpleType=new He(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 ta(r,e){let t=new Ct(e);return t.parse(r),t.schema}var At=class extends xt{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}},Ye=new At,Xe=class r extends bn{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,t,s,n){let i;return Array.isArray(n)?(i=Ye.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s.Name},()=>new r(e,t,s,n)),i.set(s)):typeof n>"u"&&(typeof s=="number"?i=Ye.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:"Sequence_"+s},()=>new r(e,t,s)):typeof s=="string"&&(i=Ye.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s},()=>new r(e,t,s)))),i}static attachLogicalFile(e,t,s){return Ye.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s},()=>new r(e,t,s,!0))}constructor(e,t,s,n){super(),e instanceof W?this.connection=e:this.connection=new W(e),typeof n=="boolean"&&n===!0?this.set({NodeGroup:t,LogicalFileName:s}):Ss(s)&&Array.isArray(n)?this.set({...s,Wuid:t,ResultName:s.Name,ResultViews:n}):typeof n>"u"?typeof s=="number"?this.set({Wuid:t,ResultSequence:s}):typeof s=="string"?this.set({Wuid:t,ResultName:s}):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(t=>t.Result?.XmlSchema?.xml?(this.xsdSchema=St(t.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,t=-1,s=!1,n={},i){return this.WUResult(e,t,!s,n,i).then(o=>{let a=o.Result;return delete o.Result,this.set({...o}),Rt("XmlSchema.xml",a)&&(this.xsdSchema=St(a.XmlSchema.xml)),Rt("Row",a)?a.Row:this.ResultName&&Rt(this.ResultName,a)?a[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,t=1,s=!1,n={},i){let o={NamedValue:{itemcount:0}};for(let u in n)o.NamedValue[o.NamedValue.itemcount++]={Name:u,Value:n[u]};let a={FilterBy:o};return this.Wuid&&this.ResultName!==void 0?(a.Wuid=this.Wuid,a.ResultName=this.ResultName):this.Wuid&&this.ResultSequence!==void 0?(a.Wuid=this.Wuid,a.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(a.LogicalName=this.LogicalFileName,a.Cluster=this.NodeGroup):this.LogicalFileName&&(a.LogicalName=this.LogicalFileName),a.Start=e,a.Count=t,a.SuppressXmlSchema=s,this.connection.WUResult(a,i).then(u=>u)}},qe=class extends xt{constructor(){super(e=>xt.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};import{StateObject as ws}from"@hpcc-js/util";var _=class extends ws{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,t){super(),this.scope=e,this.set(t)}},Wt=class extends ws{_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=[],t={start:null,end:null};return this.Properties.Property.forEach(s=>{s.Measure==="ts"&&s.Name.indexOf("Started")>=0?t.start=s:this.ScopeName&&s.Measure==="ts"&&s.Name.indexOf("Finished")>=0?t.end=s:e.push(new _(this,s))}),t.start&&t.end?(t.start.FormattedEnd=t.end.Formatted,e.push(new _(this,t.start))):t.start?e.push(new _(this,t.start)):t.end&&e.push(new _(this,t.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(t=>{this._attributeMap[t.Name]=t}),this.Properties.Property=[];for(let t in this._attributeMap)this._attributeMap.hasOwnProperty(t)&&this.Properties.Property.push(this._attributeMap[t].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 t of this.children())if(t.walk(e))return!0;return e.end(this)}formattedAttrs(){let e={};for(let t in this._attributeMap)e[t]=this._attributeMap[t].Formatted||this._attributeMap[t].RawValue;return e}rawAttrs(){let e={};for(let t in this._attributeMap)e[t]=this._attributeMap[t].RawValue;return e}hasAttr(e){return this._attributeMap[e]!==void 0}attr(e){return this._attributeMap[e]||new _(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let t="",s=[];t=this.Id,s.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&s.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),s.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);let n=this.formattedAttrs();for(let i in n)i==="Label"?t=n[i]:s.push(`<tr><td class="key">${i}</td><td class="value">${n[i]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">
911
911
  <h4 align="center">${t}</h4>
912
912
  <table>
913
913
  ${s.join("")}
@@ -923,4 +923,4 @@ Sw==
923
923
  `):F.globalAgent.options.ca[0]instanceof Kt&&(te=F.globalAgent.options.ca.map(r=>r.toString()).join(`
924
924
  `)):typeof F.globalAgent.options.ca=="string"?te=F.globalAgent.options.ca:F.globalAgent.options.ca instanceof Kt&&(te=F.globalAgent.options.ca.toString()),te+=`
925
925
  `);b.fetch.__trustwaveAgent=new F.Agent({ca:te+Zt});typeof b.btoa>"u"&&(b.btoa=function(r){return Kt.from(r||"","utf8").toString("base64")});export{ss as AccessService,ns as AccountService,Ls as Activity,kt as Attr,_ as Attribute,ei as BUILD_VERSION,Wt as BaseScope,he as ClientTools,rs as CloudService,is as CodesignService,pt as Connection,Hi as DFUArrayActions,Oi as DFUChangeProtection,Yi as DFUChangeRestriction,ji as DFUDefFileFormat,ie as DFUService,js as DFUWorkunit,Lt as DFUWorkunitCache,as as DFUXRefService,os as DaliService,Vt as Definition,Qe as ECLGraph,ee as ECLScope,ne as ESPConnection,k as ESPExceptions,Ee as EclService,at as EclccErrors,us as ElkService,qt as EnvchkErrors,ot as Errors,vt as Field,Ht as File,re as FileSpray,v as FileSprayService,Dn as FileSprayStates,jt as Folder,At as GlobalResultCache,Le as GraphCache,rt as Import,zt as LocalWorkunit,Rn as LogType,ps as LogaccessService,Gs as LogicalFile,bt as LogicalFileCache,tt as Machine,Pt as MachineCache,w as MachineService,Zr as PKG_NAME,$r as PKG_VERSION,gs as PackageProcessService,Hn as PropertyType,Vs as Query,nt as QueryGraph,jn as RelatedProperty,ve as Resource,ds as ResourcesService,Xe as Result,qe as ResultCache,oe as SMCService,hs as SashaService,ue as Scope,Es as ScopeEdge,Ge as ScopeGraph,ys as ScopeSubgraph,Us as ScopeVertex,m as Service,_t as Source,Je as SourceFile,_s as Store,Qt as StoreCache,ae as StoreService,xn as TargetAudience,Z as TargetCluster,Tt as TargetClusterCache,ze as Timer,st as Topology,Mt as TopologyCache,y as TopologyService,O as ValueChangedMessage,me as Version,ht as WUStateID,V as WUUpdate,Ot as Workspace,K as Workunit,Et as WorkunitCache,W as WorkunitsService,Ne as WorkunitsServiceEx,ts as WsAccess,z as WsDfu,x as WsLogaccess,fs as WsSMC,ms as WsSasha,Ds as WsTopology,E as WsWorkunits,Ws as XGMMLEdge,Dt as XGMMLGraph,xs as XGMMLSubgraph,As as XGMMLVertex,Ve as XSDNode,je as XSDSchema,He as XSDSimpleType,_e as XSDXMLNode,X as attachWorkspace,vu as clearAllClientToolsCache,Ce as createConnection,ke as createGraph,Ms as createXGMMLGraph,uc as defaultTargetCluster,un as deserializeResponse,dn as get,ii as hookSend,ri as instanceOfIConnection,ni as instanceOfIOptions,hn as isArray,Ss as isECLResult,di as isExceptions,Oo as isWUInfoWorkunit,jo as isWUQueryECLWorkunit,ln as jsonp,Hr as locateAllClientTools,Js as locateClientTools,St as parseXSD,ta as parseXSD2,gn as post,wu as qualifiedIDBoundary,mn as send,G as serializeRequest,oi as setTransportFactory,Xn as splitMetric,cc as targetClusters,Jt as walkXmlJson};
926
- //# sourceMappingURL=index.node.js.map
926
+ //# sourceMappingURL=index.js.map