"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9884],{29884:(e,t,s)=>{s.r(t),s.d(t,{execute:()=>n});var a=s(20102);let r;function n(e,t){let s=t.responseType;s?"array-buffer"!==s&&"blob"!==s&&"json"!==s&&"native"!==s&&"native-request-init"!==s&&"text"!==s&&(s="text"):s="json",t.responseType=s;const n=t.signal;return delete t.signal,globalThis.invokeStaticMessage("request",{url:e,options:t},{signal:n}).then((async o=>{let l,i,u,c,b;if(o.data)if(o.data instanceof ArrayBuffer){if(!("json"!==s&&"text"!==s&&"blob"!==s||(l=new Blob([o.data]),"json"!==s&&"text"!==s||(r||(r=new FileReaderSync),c=r.readAsText(l),"json"!==s)))){try{i=JSON.parse(c||null)}catch(s){const r={...s,url:e,requestOptions:t};throw new a.Z("request:server",s.message,r)}if(i.error){const s={...i.error,url:e,requestOptions:t};throw new a.Z("request:server",i.error.message,s)}}}else"native"===s&&(o.data.signal=n,u=await fetch(o.data.url,o.data),o.httpStatus=u.status);switch(s){case"blob":b=l;break;case"json":b=i;break;case"native":b=u;break;case"text":b=c;break;default:b=o.data}return{data:b,httpStatus:o.httpStatus,requestOptions:t,ssl:o.ssl,url:e}}))}}}]);