shared-ritm 1.3.91 → 1.3.93

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.
@@ -16983,7 +16983,7 @@ class gn {
16983
16983
  async (t) => {
16984
16984
  var r;
16985
16985
  const n = t.config;
16986
- if (((r = t.response) == null ? void 0 : r.status) !== 401 || n.url === "/v2/auth/refresh" || n.url === "/v2/login" || n.url === "/v2/auth/refresh" || n._retry)
16986
+ if (((r = t.response) == null ? void 0 : r.status) !== 401 || n.url === "/v2/auth/refresh" || n.url === "/v2/login" || n._retry)
16987
16987
  return Promise.reject(t);
16988
16988
  if (n._retry = !0, Ji)
16989
16989
  return new Promise((o) => {
@@ -16992,9 +16992,9 @@ class gn {
16992
16992
  Ji = !0;
16993
16993
  try {
16994
16994
  const a = (await this.refresh()).accessToken;
16995
- return a ? (this.setAccessToken(a), this.onRefreshed(), Ji = !1, this.axiosInstance(n)) : (await this.logoutUser(), Promise.reject(t));
16995
+ return a ? (this.setAccessToken(a), this.onRefreshed(), Ji = !1, this.axiosInstance(n)) : (this.logoutUser(), Promise.reject(t));
16996
16996
  } catch (o) {
16997
- return await this.logoutUser(), Promise.reject(o);
16997
+ return this.logoutUser(), Promise.reject(o);
16998
16998
  }
16999
16999
  }
17000
17000
  );
@@ -4,7 +4,7 @@
4
4
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(B){return B instanceof this?B:new this(B)}static concat(B,...g){const Q=new this(B);return g.forEach(w=>Q.set(w)),Q}static accessor(B){const Q=(this[kY]=this[kY]={accessors:{}}).accessors,w=this.prototype;function C(E){const e=TC(E);Q[e]||(cH(w,E),Q[e]=!0)}return O.isArray(B)?B.forEach(C):C(B),this}};Dg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),O.reduceDescriptors(Dg.prototype,({value:A},B)=>{let g=B[0].toUpperCase()+B.slice(1);return{get:()=>A,set(Q){this[g]=Q}}}),O.freezeMethods(Dg);function fo(A,B){const g=this||kC,Q=B||g,w=Dg.from(Q.headers);let C=Q.data;return O.forEach(A,function(e){C=e.call(g,C,w.normalize(),B?B.status:void 0)}),w.normalize(),C}function TY(A){return!!(A&&A.__CANCEL__)}function Sw(A,B,g){ZA.call(this,A??"canceled",ZA.ERR_CANCELED,B,g),this.name="CanceledError"}O.inherits(Sw,ZA,{__CANCEL__:!0});function jY(A,B,g){const Q=g.config.validateStatus;!g.status||!Q||Q(g.status)?A(g):B(new ZA("Request failed with status code "+g.status,[ZA.ERR_BAD_REQUEST,ZA.ERR_BAD_RESPONSE][Math.floor(g.status/100)-4],g.config,g.request,g))}function YH(A){const B=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return B&&B[1]||""}function MH(A,B){A=A||10;const g=new Array(A),Q=new Array(A);let w=0,C=0,E;return B=B!==void 0?B:1e3,function(t){const I=Date.now(),n=Q[C];E||(E=I),g[w]=t,Q[w]=I;let i=C,c=0;for(;i!==w;)c+=g[i++],i=i%A;if(w=(w+1)%A,w===C&&(C=(C+1)%A),I-E<B)return;const Y=n&&I-n;return Y?Math.round(c*1e3/Y):void 0}}function rH(A,B){let g=0,Q=1e3/B,w,C;const E=(I,n=Date.now())=>{g=n,w=null,C&&(clearTimeout(C),C=null),A(...I)};return[(...I)=>{const n=Date.now(),i=n-g;i>=Q?E(I,n):(w=I,C||(C=setTimeout(()=>{C=null,E(w)},Q-i)))},()=>w&&E(w)]}const Be=(A,B,g=3)=>{let Q=0;const w=MH(50,250);return rH(C=>{const E=C.loaded,e=C.lengthComputable?C.total:void 0,t=E-Q,I=w(t),n=E<=e;Q=E;const i={loaded:E,total:e,progress:e?E/e:void 0,bytes:t,rate:I||void 0,estimated:I&&e&&n?(e-E)/I:void 0,event:C,lengthComputable:e!=null,[B?"download":"upload"]:!0};A(i)},g)},yY=(A,B)=>{const g=A!=null;return[Q=>B[0]({lengthComputable:g,total:A,loaded:Q}),B[1]]},pY=A=>(...B)=>O.asap(()=>A(...B)),DH=Eg.hasStandardBrowserEnv?((A,B)=>g=>(g=new URL(g,Eg.origin),A.protocol===g.protocol&&A.host===g.host&&(B||A.port===g.port)))(new URL(Eg.origin),Eg.navigator&&/(msie|trident)/i.test(Eg.navigator.userAgent)):()=>!0,aH=Eg.hasStandardBrowserEnv?{write(A,B,g,Q,w,C,E){if(typeof document>"u")return;const e=[`${A}=${encodeURIComponent(B)}`];O.isNumber(g)&&e.push(`expires=${new Date(g).toUTCString()}`),O.isString(Q)&&e.push(`path=${Q}`),O.isString(w)&&e.push(`domain=${w}`),C===!0&&e.push("secure"),O.isString(E)&&e.push(`SameSite=${E}`),document.cookie=e.join("; ")},read(A){if(typeof document>"u")return null;const B=document.cookie.match(new RegExp("(?:^|; )"+A+"=([^;]*)"));return B?decodeURIComponent(B[1]):null},remove(A){this.write(A,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function FH(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function sH(A,B){return B?A.replace(/\/?\/$/,"")+"/"+B.replace(/^\/+/,""):A}function zY(A,B,g){let Q=!FH(B);return A&&(Q||g==!1)?sH(A,B):B}const WY=A=>A instanceof Dg?{...A}:A;function gw(A,B){B=B||{};const g={};function Q(I,n,i,c){return O.isPlainObject(I)&&O.isPlainObject(n)?O.merge.call({caseless:c},I,n):O.isPlainObject(n)?O.merge({},n):O.isArray(n)?n.slice():n}function w(I,n,i,c){if(O.isUndefined(n)){if(!O.isUndefined(I))return Q(void 0,I,i,c)}else return Q(I,n,i,c)}function C(I,n){if(!O.isUndefined(n))return Q(void 0,n)}function E(I,n){if(O.isUndefined(n)){if(!O.isUndefined(I))return Q(void 0,I)}else return Q(void 0,n)}function e(I,n,i){if(i in B)return Q(I,n);if(i in A)return Q(void 0,I)}const t={url:C,method:C,data:C,baseURL:E,transformRequest:E,transformResponse:E,paramsSerializer:E,timeout:E,timeoutMessage:E,withCredentials:E,withXSRFToken:E,adapter:E,responseType:E,xsrfCookieName:E,xsrfHeaderName:E,onUploadProgress:E,onDownloadProgress:E,decompress:E,maxContentLength:E,maxBodyLength:E,beforeRedirect:E,transport:E,httpAgent:E,httpsAgent:E,cancelToken:E,socketPath:E,responseEncoding:E,validateStatus:e,headers:(I,n,i)=>w(WY(I),WY(n),i,!0)};return O.forEach(Object.keys({...A,...B}),function(n){const i=t[n]||w,c=i(A[n],B[n],n);O.isUndefined(c)&&i!==e||(g[n]=c)}),g}const bY=A=>{const B=gw({},A);let{data:g,withXSRFToken:Q,xsrfHeaderName:w,xsrfCookieName:C,headers:E,auth:e}=B;if(B.headers=E=Dg.from(E),B.url=NY(zY(B.baseURL,B.url,B.allowAbsoluteUrls),A.params,A.paramsSerializer),e&&E.set("Authorization","Basic "+btoa((e.username||"")+":"+(e.password?unescape(encodeURIComponent(e.password)):""))),O.isFormData(g)){if(Eg.hasStandardBrowserEnv||Eg.hasStandardBrowserWebWorkerEnv)E.setContentType(void 0);else if(O.isFunction(g.getHeaders)){const t=g.getHeaders(),I=["content-type","content-length"];Object.entries(t).forEach(([n,i])=>{I.includes(n.toLowerCase())&&E.set(n,i)})}}if(Eg.hasStandardBrowserEnv&&(Q&&O.isFunction(Q)&&(Q=Q(B)),Q||Q!==!1&&DH(B.url))){const t=w&&C&&aH.read(C);t&&E.set(w,t)}return B},uH=typeof XMLHttpRequest<"u"&&function(A){return new Promise(function(g,Q){const w=bY(A);let C=w.data;const E=Dg.from(w.headers).normalize();let{responseType:e,onUploadProgress:t,onDownloadProgress:I}=w,n,i,c,Y,M;function D(){Y&&Y(),M&&M(),w.cancelToken&&w.cancelToken.unsubscribe(n),w.signal&&w.signal.removeEventListener("abort",n)}let r=new XMLHttpRequest;r.open(w.method.toUpperCase(),w.url,!0),r.timeout=w.timeout;function F(){if(!r)return;const s=Dg.from("getAllResponseHeaders"in r&&r.getAllResponseHeaders()),l={data:!e||e==="text"||e==="json"?r.responseText:r.response,status:r.status,statusText:r.statusText,headers:s,config:A,request:r};jY(function(G){g(G),D()},function(G){Q(G),D()},l),r=null}"onloadend"in r?r.onloadend=F:r.onreadystatechange=function(){!r||r.readyState!==4||r.status===0&&!(r.responseURL&&r.responseURL.indexOf("file:")===0)||setTimeout(F)},r.onabort=function(){r&&(Q(new ZA("Request aborted",ZA.ECONNABORTED,A,r)),r=null)},r.onerror=function(a){const l=a&&a.message?a.message:"Network Error",U=new ZA(l,ZA.ERR_NETWORK,A,r);U.event=a||null,Q(U),r=null},r.ontimeout=function(){let a=w.timeout?"timeout of "+w.timeout+"ms exceeded":"timeout exceeded";const l=w.transitional||PY;w.timeoutErrorMessage&&(a=w.timeoutErrorMessage),Q(new ZA(a,l.clarifyTimeoutError?ZA.ETIMEDOUT:ZA.ECONNABORTED,A,r)),r=null},C===void 0&&E.setContentType(null),"setRequestHeader"in r&&O.forEach(E.toJSON(),function(a,l){r.setRequestHeader(l,a)}),O.isUndefined(w.withCredentials)||(r.withCredentials=!!w.withCredentials),e&&e!=="json"&&(r.responseType=w.responseType),I&&([c,M]=Be(I,!0),r.addEventListener("progress",c)),t&&r.upload&&([i,Y]=Be(t),r.upload.addEventListener("progress",i),r.upload.addEventListener("loadend",Y)),(w.cancelToken||w.signal)&&(n=s=>{r&&(Q(!s||s.type?new Sw(null,A,r):s),r.abort(),r=null)},w.cancelToken&&w.cancelToken.subscribe(n),w.signal&&(w.signal.aborted?n():w.signal.addEventListener("abort",n)));const u=YH(w.url);if(u&&Eg.protocols.indexOf(u)===-1){Q(new ZA("Unsupported protocol "+u+":",ZA.ERR_BAD_REQUEST,A));return}r.send(C||null)})},lH=(A,B)=>{const{length:g}=A=A?A.filter(Boolean):[];if(B||g){let Q=new AbortController,w;const C=function(I){if(!w){w=!0,e();const n=I instanceof Error?I:this.reason;Q.abort(n instanceof ZA?n:new Sw(n instanceof Error?n.message:n))}};let E=B&&setTimeout(()=>{E=null,C(new ZA(`timeout ${B} of ms exceeded`,ZA.ETIMEDOUT))},B);const e=()=>{A&&(E&&clearTimeout(E),E=null,A.forEach(I=>{I.unsubscribe?I.unsubscribe(C):I.removeEventListener("abort",C)}),A=null)};A.forEach(I=>I.addEventListener("abort",C));const{signal:t}=Q;return t.unsubscribe=()=>O.asap(e),t}},UH=function*(A,B){let g=A.byteLength;if(g<B){yield A;return}let Q=0,w;for(;Q<g;)w=Q+B,yield A.slice(Q,w),Q=w},hH=async function*(A,B){for await(const g of GH(A))yield*UH(g,B)},GH=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}const B=A.getReader();try{for(;;){const{done:g,value:Q}=await B.read();if(g)break;yield Q}}finally{await B.cancel()}},SY=(A,B,g,Q)=>{const w=hH(A,B);let C=0,E,e=t=>{E||(E=!0,Q&&Q(t))};return new ReadableStream({async pull(t){try{const{done:I,value:n}=await w.next();if(I){e(),t.close();return}let i=n.byteLength;if(g){let c=C+=i;g(c)}t.enqueue(new Uint8Array(n))}catch(I){throw e(I),I}},cancel(t){return e(t),w.return()}},{highWaterMark:2})},LY=64*1024,{isFunction:ge}=O,dH=(({Request:A,Response:B})=>({Request:A,Response:B}))(O.global),{ReadableStream:VY,TextEncoder:KY}=O.global,xY=(A,...B)=>{try{return!!A(...B)}catch{return!1}},HH=A=>{A=O.merge.call({skipUndefined:!0},dH,A);const{fetch:B,Request:g,Response:Q}=A,w=B?ge(B):typeof fetch=="function",C=ge(g),E=ge(Q);if(!w)return!1;const e=w&&ge(VY),t=w&&(typeof KY=="function"?(M=>D=>M.encode(D))(new KY):async M=>new Uint8Array(await new g(M).arrayBuffer())),I=C&&e&&xY(()=>{let M=!1;const D=new g(Eg.origin,{body:new VY,method:"POST",get duplex(){return M=!0,"half"}}).headers.has("Content-Type");return M&&!D}),n=E&&e&&xY(()=>O.isReadableStream(new Q("").body)),i={stream:n&&(M=>M.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(M=>{!i[M]&&(i[M]=(D,r)=>{let F=D&&D[M];if(F)return F.call(D);throw new ZA(`Response type '${M}' is not supported`,ZA.ERR_NOT_SUPPORT,r)})});const c=async M=>{if(M==null)return 0;if(O.isBlob(M))return M.size;if(O.isSpecCompliantForm(M))return(await new g(Eg.origin,{method:"POST",body:M}).arrayBuffer()).byteLength;if(O.isArrayBufferView(M)||O.isArrayBuffer(M))return M.byteLength;if(O.isURLSearchParams(M)&&(M=M+""),O.isString(M))return(await t(M)).byteLength},Y=async(M,D)=>{const r=O.toFiniteNumber(M.getContentLength());return r??c(D)};return async M=>{let{url:D,method:r,data:F,signal:u,cancelToken:s,timeout:a,onDownloadProgress:l,onUploadProgress:U,responseType:G,headers:d,withCredentials:H="same-origin",fetchOptions:h}=bY(M),f=B||fetch;G=G?(G+"").toLowerCase():"text";let J=lH([u,s&&s.toAbortSignal()],a),y=null;const m=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let k;try{if(U&&I&&r!=="get"&&r!=="head"&&(k=await Y(d,F))!==0){let j=new g(D,{method:"POST",body:F,duplex:"half"}),p;if(O.isFormData(F)&&(p=j.headers.get("content-type"))&&d.setContentType(p),j.body){const[K,$]=yY(k,Be(pY(U)));F=SY(j.body,LY,K,$)}}O.isString(H)||(H=H?"include":"omit");const z=C&&"credentials"in g.prototype,R={...h,signal:J,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:F,duplex:"half",credentials:z?H:void 0};y=C&&new g(D,R);let v=await(C?f(y,h):f(D,R));const S=n&&(G==="stream"||G==="response");if(n&&(l||S&&m)){const j={};["status","statusText","headers"].forEach(CA=>{j[CA]=v[CA]});const p=O.toFiniteNumber(v.headers.get("content-length")),[K,$]=l&&yY(p,Be(pY(l),!0))||[];v=new Q(SY(v.body,LY,K,()=>{$&&$(),m&&m()}),j)}G=G||"text";let x=await i[O.findKey(i,G)||"text"](v,M);return!S&&m&&m(),await new Promise((j,p)=>{jY(j,p,{data:x,headers:Dg.from(v.headers),status:v.status,statusText:v.statusText,config:M,request:y})})}catch(z){throw m&&m(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new ZA("Network Error",ZA.ERR_NETWORK,M,y),{cause:z.cause||z}):ZA.from(z,z&&z.code,M,y)}}},fH=new Map,XY=A=>{let B=A&&A.env||{};const{fetch:g,Request:Q,Response:w}=B,C=[Q,w,g];let E=C.length,e=E,t,I,n=fH;for(;e--;)t=C[e],I=n.get(t),I===void 0&&n.set(t,I=e?new Map:HH(B)),n=I;return I};XY();const Jo={http:Zd,xhr:uH,fetch:{get:XY}};O.forEach(Jo,(A,B)=>{if(A){try{Object.defineProperty(A,"name",{value:B})}catch{}Object.defineProperty(A,"adapterName",{value:B})}});const OY=A=>`- ${A}`,JH=A=>O.isFunction(A)||A===null||A===!1;function mH(A,B){A=O.isArray(A)?A:[A];const{length:g}=A;let Q,w;const C={};for(let E=0;E<g;E++){Q=A[E];let e;if(w=Q,!JH(Q)&&(w=Jo[(e=String(Q)).toLowerCase()],w===void 0))throw new ZA(`Unknown adapter '${e}'`);if(w&&(O.isFunction(w)||(w=w.get(B))))break;C[e||"#"+E]=w}if(!w){const E=Object.entries(C).map(([t,I])=>`adapter ${t} `+(I===!1?"is not supported by the environment":"is not available in the build"));let e=g?E.length>1?`since :
5
5
  `+E.map(OY).join(`
6
6
  `):" "+OY(E[0]):"as no adapter specified";throw new ZA("There is no suitable adapter to dispatch the request "+e,"ERR_NOT_SUPPORT")}return w}const ZY={getAdapter:mH,adapters:Jo};function mo(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new Sw(null,A)}function qY(A){return mo(A),A.headers=Dg.from(A.headers),A.data=fo.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),ZY.getAdapter(A.adapter||kC.adapter,A)(A).then(function(Q){return mo(A),Q.data=fo.call(A,A.transformResponse,Q),Q.headers=Dg.from(Q.headers),Q},function(Q){return TY(Q)||(mo(A),Q&&Q.response&&(Q.response.data=fo.call(A,A.transformResponse,Q.response),Q.response.headers=Dg.from(Q.response.headers))),Promise.reject(Q)})}const _Y="1.13.2",Qe={};["object","boolean","number","function","string","symbol"].forEach((A,B)=>{Qe[A]=function(Q){return typeof Q===A||"a"+(B<1?"n ":" ")+A}});const $Y={};Qe.transitional=function(B,g,Q){function w(C,E){return"[Axios v"+_Y+"] Transitional option '"+C+"'"+E+(Q?". "+Q:"")}return(C,E,e)=>{if(B===!1)throw new ZA(w(E," has been removed"+(g?" in "+g:"")),ZA.ERR_DEPRECATED);return g&&!$Y[E]&&($Y[E]=!0,console.warn(w(E," has been deprecated since v"+g+" and will be removed in the near future"))),B?B(C,E,e):!0}},Qe.spelling=function(B){return(g,Q)=>(console.warn(`${Q} is likely a misspelling of ${B}`),!0)};function NH(A,B,g){if(typeof A!="object")throw new ZA("options must be an object",ZA.ERR_BAD_OPTION_VALUE);const Q=Object.keys(A);let w=Q.length;for(;w-- >0;){const C=Q[w],E=B[C];if(E){const e=A[C],t=e===void 0||E(e,C,A);if(t!==!0)throw new ZA("option "+C+" must be "+t,ZA.ERR_BAD_OPTION_VALUE);continue}if(g!==!0)throw new ZA("Unknown option "+C,ZA.ERR_BAD_OPTION)}}const we={assertOptions:NH,validators:Qe},Xg=we.validators;let Qw=class{constructor(B){this.defaults=B||{},this.interceptors={request:new RY,response:new RY}}async request(B,g){try{return await this._request(B,g)}catch(Q){if(Q instanceof Error){let w={};Error.captureStackTrace?Error.captureStackTrace(w):w=new Error;const C=w.stack?w.stack.replace(/^.+\n/,""):"";try{Q.stack?C&&!String(Q.stack).endsWith(C.replace(/^.+\n.+\n/,""))&&(Q.stack+=`
7
- `+C):Q.stack=C}catch{}}throw Q}}_request(B,g){typeof B=="string"?(g=g||{},g.url=B):g=B||{},g=gw(this.defaults,g);const{transitional:Q,paramsSerializer:w,headers:C}=g;Q!==void 0&&we.assertOptions(Q,{silentJSONParsing:Xg.transitional(Xg.boolean),forcedJSONParsing:Xg.transitional(Xg.boolean),clarifyTimeoutError:Xg.transitional(Xg.boolean)},!1),w!=null&&(O.isFunction(w)?g.paramsSerializer={serialize:w}:we.assertOptions(w,{encode:Xg.function,serialize:Xg.function},!0)),g.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?g.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:g.allowAbsoluteUrls=!0),we.assertOptions(g,{baseUrl:Xg.spelling("baseURL"),withXsrfToken:Xg.spelling("withXSRFToken")},!0),g.method=(g.method||this.defaults.method||"get").toLowerCase();let E=C&&O.merge(C.common,C[g.method]);C&&O.forEach(["delete","get","head","post","put","patch","common"],M=>{delete C[M]}),g.headers=Dg.concat(E,C);const e=[];let t=!0;this.interceptors.request.forEach(function(D){typeof D.runWhen=="function"&&D.runWhen(g)===!1||(t=t&&D.synchronous,e.unshift(D.fulfilled,D.rejected))});const I=[];this.interceptors.response.forEach(function(D){I.push(D.fulfilled,D.rejected)});let n,i=0,c;if(!t){const M=[qY.bind(this),void 0];for(M.unshift(...e),M.push(...I),c=M.length,n=Promise.resolve(g);i<c;)n=n.then(M[i++],M[i++]);return n}c=e.length;let Y=g;for(;i<c;){const M=e[i++],D=e[i++];try{Y=M(Y)}catch(r){D.call(this,r);break}}try{n=qY.call(this,Y)}catch(M){return Promise.reject(M)}for(i=0,c=I.length;i<c;)n=n.then(I[i++],I[i++]);return n}getUri(B){B=gw(this.defaults,B);const g=zY(B.baseURL,B.url,B.allowAbsoluteUrls);return NY(g,B.params,B.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(B){Qw.prototype[B]=function(g,Q){return this.request(gw(Q||{},{method:B,url:g,data:(Q||{}).data}))}}),O.forEach(["post","put","patch"],function(B){function g(Q){return function(C,E,e){return this.request(gw(e||{},{method:B,headers:Q?{"Content-Type":"multipart/form-data"}:{},url:C,data:E}))}}Qw.prototype[B]=g(),Qw.prototype[B+"Form"]=g(!0)});let RH=class Ga{constructor(B){if(typeof B!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(C){g=C});const Q=this;this.promise.then(w=>{if(!Q._listeners)return;let C=Q._listeners.length;for(;C-- >0;)Q._listeners[C](w);Q._listeners=null}),this.promise.then=w=>{let C;const E=new Promise(e=>{Q.subscribe(e),C=e}).then(w);return E.cancel=function(){Q.unsubscribe(C)},E},B(function(C,E,e){Q.reason||(Q.reason=new Sw(C,E,e),g(Q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(B){if(this.reason){B(this.reason);return}this._listeners?this._listeners.push(B):this._listeners=[B]}unsubscribe(B){if(!this._listeners)return;const g=this._listeners.indexOf(B);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const B=new AbortController,g=Q=>{B.abort(Q)};return this.subscribe(g),B.signal.unsubscribe=()=>this.unsubscribe(g),B.signal}static source(){let B;return{token:new Ga(function(w){B=w}),cancel:B}}};function PH(A){return function(g){return A.apply(null,g)}}function vH(A){return O.isObject(A)&&A.isAxiosError===!0}const No={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(No).forEach(([A,B])=>{No[B]=A});function AM(A){const B=new Qw(A),g=rY(Qw.prototype.request,B);return O.extend(g,Qw.prototype,B,{allOwnKeys:!0}),O.extend(g,B,null,{allOwnKeys:!0}),g.create=function(w){return AM(gw(A,w))},g}const PB=AM(kC);PB.Axios=Qw,PB.CanceledError=Sw,PB.CancelToken=RH,PB.isCancel=TY,PB.VERSION=_Y,PB.toFormData=$E,PB.AxiosError=ZA,PB.Cancel=PB.CanceledError,PB.all=function(B){return Promise.all(B)},PB.spread=PH,PB.isAxiosError=vH,PB.mergeConfig=gw,PB.AxiosHeaders=Dg,PB.formToJSON=A=>vY(O.isHTMLForm(A)?new FormData(A):A),PB.getAdapter=ZY.getAdapter,PB.HttpStatusCode=No,PB.default=PB;const{Axios:f8,AxiosError:J8,CanceledError:m8,isCancel:N8,CancelToken:R8,VERSION:P8,all:v8,Cancel:k8,isAxiosError:T8,spread:j8,toFormData:y8,AxiosHeaders:p8,HttpStatusCode:z8,formToJSON:W8,getAdapter:b8,mergeConfig:S8}=PB;var Ce=!1,Ro=[];class zB{constructor(){ha(this,"axiosInstance");this.axiosInstance=PB.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"},withCredentials:!0}),this.axiosInstance.interceptors.request.use(B=>(B.headers.Authorization=`Bearer ${this.getAccessToken()}`,B),B=>Promise.reject(B)),this.axiosInstance.interceptors.response.use(B=>B.data,async B=>{var Q;const g=B.config;if(((Q=B.response)==null?void 0:Q.status)!==401||g.url==="/v2/auth/refresh"||g.url==="/v2/login"||g.url==="/v2/auth/refresh"||g._retry)return Promise.reject(B);if(g._retry=!0,Ce)return new Promise(w=>{this.subscribeTokenRefresh(()=>w(this.axiosInstance(g)))});Ce=!0;try{const C=(await this.refresh()).accessToken;return C?(this.setAccessToken(C),this.onRefreshed(),Ce=!1,this.axiosInstance(g)):(await this.logoutUser(),Promise.reject(B))}catch(w){return await this.logoutUser(),Promise.reject(w)}})}setAccessToken(B){localStorage.setItem("token",B)}getAccessToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}subscribeTokenRefresh(B){Ro.push(B)}refresh(){return this.post("/v2/auth/refresh",null)}onRefreshed(){Ro.forEach(B=>B()),Ro=[]}async logoutUser(){Ce=!1,await this.post("/v2/logout",null),this.removeToken(),window.location.href="/sign-in"}handleError(B){B.response?console.error("API Error:",B.response.status,B.response.data):B.request?console.error("No response received:",B.request):console.error("Error during request setup:",B.message)}async get(B,g){try{const Q=await this.axiosInstance.get(B,g);return(Q==null?void 0:Q.data)===!1?!1:(Q==null?void 0:Q.data)??Q}catch(Q){const w=Q;throw this.handleError(w),Q}}async delete(B,g){try{return await this.axiosInstance.delete(B,g)}catch(Q){const w=Q;throw this.handleError(w),Q}}async post(B,g,Q){try{const w=await this.axiosInstance.post(B,g,Q);return(w==null?void 0:w.data)===!1?!1:(w==null?void 0:w.data)||w}catch(w){const C=w;throw this.handleError(C),w}}async patch(B,g,Q){try{return(await this.axiosInstance.patch(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}async put(B,g,Q){try{return(await this.axiosInstance.put(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}}class kH extends zB{async fetchCriticalPathTasks(B){return await this.get(`gantt/get_list_task_on_critical_path?${B}`)}async fetchGanttList(B){return await this.get(`/list/tasks/search?${B}&gantt=1`)}async setFixPlan(B){const g=new URLSearchParams;return g.append("projects[0]",B),g.append("filter[state]","1"),await this.post(`/gantt/set-planned-date?${g.toString()}`,null)}getLinksByProject(B){return this.get(`gantt/${B}/links/list`)}createLink(B){return this.post("gantt/task/link",B)}deleteLink(B){return this.delete(`gantt/task/link/${B}`)}}let Po;function TH(){return Po||(Po=new kH),Po}class jH extends zB{async fetchPieProjects(B){return await this.get("repairs/pie/projects?"+B)}async fetchPieTasks(B){return await this.get("repairs/pie/tasks?"+B)}async fetchPiePersonnel(B){return await this.get("repairs/metrics/get_list_position?"+B)}async fetchPersonnelData(B){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfo(B){return await this.get(`repairs/metrics/list_position_intersection_details?${B}`)}async fetchPersonnelDataNew(B){return await this.get("repairs/metrics/v2/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfoNew(B){return await this.get(`repairs/metrics/v2/list_position_intersection_details?${B}`)}async fetchPersonnelUnused(B){return await this.get("repairs/metrics/v2/unused_brigade_personnel",{params:B})}async fetchPiePersonnelInfo(B){return await this.get(`repairs/metrics/get_list_user_by_position?${B}`)}async fetchPieCriticalPath(B){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+B)}async fetchPieCriticalPathInfo(B){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${B}`)}async fetchPieTmc(B){return await this.get("repairs/metrics/get_list_instrument_type?"+B)}async fetchPieTmcInfo(B){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${B}`)}async fetchPieUntimelyClosedTask(B){return await this.get("repairs/metrics/get_list_comment_type?"+B)}async fetchPieUntimelyClosedTaskInfo(B){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${B}`)}async fetchPieAdditionalTasks(B){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+B)}async fetchPieAdditionalTasksInfo(B){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${B}`)}async fetchPersonnel(B){return await this.get("repairs/statistic/personnel?"+B)}async fetchPieExpired(B){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+B)}async fetchPieExpiredInfo(B){return await this.get(`repairs/metrics/get_list_task_expired?${B}`)}async fetchEconomicsPerformance(B){return await this.get(`repairs/metrics/get_economic_performance?${B}`)}async fetchEconomicsInfo(B){return await this.get(`repairs/metrics/get_list_task_economic_performance?${B}`)}async fetchQualityMetrics(B){return await this.get(`repairs/metrics/get_quality_metrics?${B}`)}async fetchQualityInfo(B){return await this.get(`repairs/metrics/get_list_task_by_quality?${B}`)}async fetchPieWorkZone(B){return await this.get("repairs/metrics/get_statistics_on_controller_zones?"+B)}async fetchWorkZoneInfo(B){return await this.get("exposed_equipment_zones/list?"+B)}async fetchPieAllTasks(B){return await this.get("repairs/metrics/get_list_task_group_by_status?"+B)}async fetchPieAllTasksInfo(B){return await this.get("repairs/metrics/get_list_task_by_status?"+B)}fetchPersonnelPlan(B){return this.get("repairs/metrics/personnel_plan",{params:B})}fetchPersonnelPlanProjects(B){return this.post("repairs/metrics/projects_with_personnel_plan",B)}fetchInstrumentsPlan(B){return this.get("repairs/metrics/instruments_plan",{params:B})}}let vo;function yH(){return vo||(vo=new jH),vo}class pH extends zB{async fetchProjectById(B){return this.get(`/projects/${B}`)}createProject(B){return this.post("/projects",B)}editProject(B,g){return this.put(`/projects/${B}`,g)}fetchProjects(B){return this.get("/search/projects",{params:B})}cloneProject(B){return this.post(`projects/${B.id}/clone`,B)}archiveProject(B,g){return this.put(`/projects/${B}`,g)}unArchiveProject(B,g){return this.put(`/projects/${B}`,g)}moveAprProject(B){return this.post("repairs/move_plan_to_real",{repairs:[B]})}restoreProject(B){return this.post("/restore_project",{projects_ids:[B]})}importTasks(B){return this.post("tasks/import",B)}importKtd(B){return this.post("/parse_ktd",B,{headers:{"Content-Type":"multipart/form-data"}})}checkStatusParser(B){return this.post("/check_parse_ktd",B)}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}getDynamicProgressWidget(B){return this.get(`repairs/get_repair_list_dynamics_performance?repair_id_list[]=${B}`)}removeRootIntervals(){return this.post("/delete/fake/projects",null)}addRootIntervals(B,g){return this.post(`/set/fake/projects/${B}`,g)}}let ko;function zH(){return ko||(ko=new pH),ko}class WH extends zB{fetchFilters(B){return this.get(`get_list_repair?smart=1&${B}`)}fetchRepairs(B,g,Q,w,C){return this.get("get_list_repair"+(B?`${g}&per_page=100000${C?"&"+C:""}&${Q?"":w}`:`?per_page=100000${C?"&"+C:""}&${w}`))}fetchRepairTemplates(B){return this.get("repairs/get_repair_template_list",{params:B})}createRepair(B){return this.post("/repairs/equipments",B)}createRepairFromTemplate(B){return this.post("/repairs/create_repair_from_repair_template",B)}startRepair(B){return this.post(`/repairs/${B}/start`,null)}finishRepair(B){return this.post("/repairs/complete_repair_list",{repairIdList:[B]})}finishPreparationProject(B){return this.post(`/repairs/${B}/finish_preparation`,null)}moveRepairToCurrent(B){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[B]})}moveArchiveToCurrent(B){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[B]})}moveRepairToApr(B){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[B]})}moveRepairToArchive(B){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[B]})}restoreRepair(B){return this.post("/restore_repair",{repairs_ids:[B]})}updateRepair(B,g){return this.put(`/repairs/${g}`,B)}copyRepair(B){return this.post(`/repairs/${B}/clone`,null)}deleteRepair(B){return this.delete(`/repairs/${B}`)}fetchIntersection(B){return this.get(`v3/repairs/${B}/personnel/intersection`)}}let To;function bH(){return To||(To=new WH),To}class SH extends zB{fetchTaskById(B){return this.get(`/tasks/${B}`)}fetchTasksList(B){return this.get("/list/tasks/search",{params:B})}fetchSubtasksList(B){return this.get(`/task/${B}/subtasks/list`)}fetchIntersectionsList(B){return this.get(`/tasks/${B}/intersections`)}fetchTaskBranch(B){return this.get(`/get_list_task_branch?task_id=${B}`)}fetchInstrumentsList(B){return this.get("admin/instruments",{params:B})}fetchInstrumentTypeListWithPreparedWarehouse(B){return this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:B})}fetchInstrumentsEquivalentList(B){return this.get("tasks/instrument/list",{params:B})}fetchDiffInstruments(B){return this.get(`tasks/${B.taskId}/fill/module`,{params:B})}replaceInstruments(B){return this.post("/instruments/equivalent/attach",B)}fetchTaskUsagePersonal(B){return this.get(`tasks/${B}/usage/users`)}fetchTaskUsageInstrument(B){return this.get(`tasks/${B}/usage/instruments`)}fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}fetchTaskVideoSources(B){return this.get("work_zone/get_list_video_source",{params:B})}fetchTaskVideoSourcesStream(B){return this.get("horizon/video-source",{params:B})}createWorkZone(B){return this.post("admin/work-zones",B)}createTask(B){return this.post("tasks",B)}editTask(B,g){return this.put(`tasks/${B}`,g)}mergeTask(B){return this.post("tasks/merge",B)}cloneTask(B,g){return this.post(`gantt/${B}/clone`,g)}deleteTask(B){return this.delete(`tasks/${B}`)}changeStatus(B,g){return this.put(`task/${B}/change-status`,{status_id:g})}saveMetrics(B){return this.put("/update_quality_metrics",B)}checkReasonForStatus(B){return this.post("/tasks/check_reason_for_task",{task_id:B})}verifyTaskStatus(B,g){return this.get(`/task/${B}/change-status/verification`,{params:{status_id:g}})}checkBranchBeforeCloseTask(B){return this.post("/check_branch_before_close_task",{task_id:B})}}let jo;function LH(){return jo||(jo=new SH),jo}class VH extends zB{login(B,g){return this.post("/v2/login",{email:B,password:g})}loginPhoto(B){return this.post("/login/from_photo",{photo:B})}loginVideo(B){return this.post("/login/video",B,{transformRequest:g=>g})}logout(){return this.logoutUser()}userInfo(){return this.get("/users/auth")}configs(){return this.get("/v2/configs")}changePassword(B,g,Q){return this.put(`/v2/auth/users/${B}/password`,{password:g,password_confirmation:Q})}changePasswordAndActivate(B,g,Q,w){return this.post("/v2/auth/users/activate",{email:B,currentPassword:g,password:Q,passwordConfirmation:w})}}let yo;function KH(){return yo||(yo=new VH),yo}class xH extends zB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let po;function XH(){return po||(po=new xH),po}class OH extends zB{async startVideoAnalytics(){return await this.post("/statanly/start",null)}reloadVideoAnalytics(B){return this.post("/horizon/video-source/reload",{video_source_ids:B})}hardReloadStream(){return this.post("horizon/video-source/streams/add",null)}async fetchWorkZones(B){return await this.get("/search/work_zones",{params:B})}async fetchWorkZone(B){return await this.get(`/work_zone/get_work_zone/${B}`)}async editWorkZone(B,g){return await this.put(`/admin/work-zones/${B}`,g)}async deleteWorkZone(B){return await this.delete(`/admin/work-zones/${B}`)}async fetchVideoSources(B){return await this.get("/search/video_sources/list",{params:B})}async fetchVideoSourceEconomics(B){return await this.get("horizon/video-source/economics",{params:B})}async createVideoSource(B){return await this.post("horizon/video-source",B)}async editVideoSource(B,g){return await this.put(`/horizon/video-source/${B}`,g)}async deleteVideoSource(B){await this.delete(`/horizon/video-source/${B}`)}async fetchListRepairsVideoSource(B){return await this.get("work_zone/get_list_video_source_by_repair",{params:B})}async sendCombination(B){return await this.post("horizon/video-source/training",B)}async saveCombination(B){return await this.post("horizon/video-source/bind",B)}async fetchCombination(B){return await this.get("horizon/video-source/bind/show",{params:B})}async startTraining(B){return await this.post("horizon/video-source/training/start",B)}async stopTraining(B){return await this.post("horizon/video-source/training/stop",B)}async fetchTrainingInfo(B){return await this.get("horizon/video-source/training/info",{params:B})}async fetchTrainingStatus(B){return await this.get("horizon/video-source/training/status",{params:B})}async fetchVisualizationDataLink(B){return await this.get("horizon/video-source/link/video/training",{params:B})}async updateVisualizationData(B){return await this.get("horizon/video-source/download/video/training",{params:B})}async deleteFrameFromVideo(B){await this.delete(`horizon/video-source/delete/fragment/video/training/${B}`)}async sendEvent(B){return await this.post("alerts_callback_url",B)}}let zo;function ZH(){return zo||(zo=new OH),zo}class qH extends zB{async editUser({id:B,model:g}){return await this.put(`/admin/users/${B}`,g)}async getUser(B){return await this.get(`/admin/users/${B}`)}async changeUserPassword(B){return await this.patch("/v2/auth/users/password",B)}async getUserWarehouses(B){return await this.get("users/get_warehouse_list_by_user",{params:B})}async createUser(B){return await this.post("/admin/users",B)}async deleteUser({user_id:B,archive_reason:g}){return await this.post("/users/archive_user",{user_id:B,archive_reason:g})}async deleteUserPhotos({user_id:B,photos:g}){return await this.post("/users/photos/delete",{user_id:B,photos:g})}async restoreUser(B){return await this.post("/users/restore_user",{user_id:B})}async getRoles(B){return await this.get("/search/roles",{params:B})}async getPositions(B){return await this.get("/search/positions",{params:B})}async createPosition(B){return await this.post("/admin/positions",B)}async editPosition(B,g){return await this.put(`/admin/positions/${B}`,g)}async deletePosition(B){return await this.delete(`/admin/positions/${B}`)}async getTeams(B){return await this.get("/search/teams",{params:B})}async createTeam(B){return await this.post("/teams",B)}async editTeam(B,g){return await this.patch(`/teams/${B}`,g)}async deleteTeam(B){return await this.delete(`/teams/${B}`)}async checkUserVectors(B){return await this.get(`/user/get-vectors/${B}`)}async checkArchiveUserVectors(B){return await this.get(`/users/get_vector_count_by_user?user_id=${B}`)}async addUserVectors(B){return await this.post("/user/add-vector",B,{headers:{"Content-Type":"multipart/form-data"}})}async removeUserVectors(B){return await this.delete(`/user/delete-vectors/${B}`)}async deleteUserPasses(B){return await this.post("admin/delete/passes",B)}async checkUserBeforeArchive(B){return await this.post("users/check_user_before_archive",B)}}let Wo;function _H(){return Wo||(Wo=new qH),Wo}class $H extends zB{async fetchUserInstrumentsHistory(B,g){const Q={status:"issued",page:g,desc:"desc",column:"issued_in"};return await this.get(`users/${B}/instruments`,{params:Q})}async fetchWarehouses(B){return await this.get("search/warehouses",{params:B})}async fetchWarehouse(B){return await this.get(`admin/warehouses/${B}`)}async fetchStatusHistory(B){return await this.get(`warehouses/${B}/history/status`)}async createWarehouse(B){return await this.post("admin/warehouses",B)}async editWarehouse({id:B,model:g}){return await this.put(`admin/warehouses/${B}`,g)}deleteWarehouse(B){return this.delete(`admin/warehouses/${B}`)}async unsetWarehouseRfid(B){return await this.post("warehouses/unset-rfid",B)}async searchInstruments(B){return await this.get("search/instruments",{params:B})}}let bo;function Af(){return bo||(bo=new $H),bo}class Bf extends zB{fetchControlZones(B){return this.get("/frame/list",{params:B})}async fetchControlZone(B){return this.get(`/frame/${B}`)}createControlZone(B){return this.post("/frame",B)}editControlZone(B,g){return this.put(`/frame/${B}`,g)}deleteControlZone(B){return this.delete(`/frame/${B}`)}fetchControlLogs(B){return this.get("/exposed_equipment_zones/list_for_controller",{params:B})}fetchControllers(B){return this.get("/frame/controllers/list",{params:B})}fetchUsersWithPasses(){return this.get("inspector/users-with-passes")}fetchWarehousesList(){return this.get("tasks/warehouse/list?only_outside_exposed_equipment_zone=1")}manualEntry(B){return this.post("exposed_equipment_zones/hand/enter",B)}manualExit(B){return this.post("exposed_equipment_zones/hand/exit",B)}deleteControlLogs(B){return this.delete("exposed_equipment_zones",B)}fetchInstrumentTypeList(B){return this.get("search/instrument_types",{params:B})}fetchInstrumentCategoryList(B={}){return this.get("instrument_category/list",{params:B})}createInstrumentType(B){return this.post("admin/instruments",B)}editInstrumentType(B,g){return this.put(`admin/instruments/${B}`,g)}deleteInstrumentType(B){return this.delete(`admin/instruments/${B}`)}fetchRpdzLogList(B){return this.get("exposed_equipment_zones_history/list",{params:B})}exportRpdzLogList(B){return this.get("exposed_equipment_zones_history/list/export",{params:B,responseType:"blob"})}editControlLog(B,g){return this.put(`exposed_equipment_zones/${B}`,g)}}let So;function gf(){return So||(So=new Bf),So}class Qf extends zB{fetchSearchUsers(B){return this.get("search/users",{params:B})}fetchSearchInstruments(B){return this.get("search/instrument_type",{params:B})}fetchSearchModules(B){return this.get("search/modules",{params:B})}}let Lo;function wf(){return Lo||(Lo=new Qf),Lo}class Cf extends zB{async detectModule(B){return await this.get(`module/${B}/detect`)}async createModule(B){return await this.post("admin/modules",B)}async editModule({id:B,model:g}){return await this.put(`admin/modules/${B}`,g)}deleteModule(B){return this.delete(`admin/modules/${B}`)}}let Vo;function Ef(){return Vo||(Vo=new Cf),Vo}class ef extends zB{async uploadComment(B){return await this.post("comments",B)}async deleteComment(B){return await this.delete(`comments/${B}`)}async editComment(B,g){return await this.put(`comments/${B}`,g)}}let Ko;function tf(){return Ko||(Ko=new ef),Ko}class of extends zB{fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}createEquipment(B){return this.post("repairs/equipment",B)}editEquipment(B,g){return this.put(`repairs/equipment/${B}`,g)}deleteEquipment(B){return this.delete(`repairs/equipment/${B}`)}fetchEquipmentTypeList(B){return this.get("repairs/equipments/get_equipment_type_list",{params:B})}fetchEquipmentType(B){return this.get(`repairs/equipments/get_equipment_type/${B}`)}createEquipmentType(B){return this.post("repairs/equipments/create_equipment_type",B)}editEquipmentType(B,g){return this.put(`repairs/equipments/update_equipment_type/${B}`,g)}deleteEquipmentType(B){return this.delete(`repairs/equipments/delete_equipment_type/${B}`)}}let xo;function If(){return xo||(xo=new of),xo}class nf extends zB{fetchBrigades(B){return this.get("/search/brigades",{params:B})}editBrigade({id:B,model:g}){return this.put(`/brigades/${B}`,g)}getBrigade(B){return this.get(`/brigades/${B}`)}createBrigade(B){return this.post("/brigades",B)}deleteBrigade(B){return this.delete(`/brigades/${B}`)}}let Xo;function cf(){return Xo||(Xo=new nf),Xo}class Yf extends zB{fetchScheduleConfig(){return this.get("schedule/config")}fetchSchedule(B){return this.get(`schedule/${B}`)}fetchScheduleTable(B){return this.get(`schedule/${B}/get_brigades_table`)}fetchBrigadesToSwap(B,g){return this.get(`schedule/${B}/selection_brigades_for_swap_shift_template`,{params:g})}completeBrigadeSchedule(B,g){return this.post(`schedule/${B}/complete_brigade_schedule`,g)}autocompleteBrigadesSchedule(B,g){return this.post(`schedule/${B}/autocomplete`,g)}addBrigadeShift(B,g){return this.post(`schedule/${B}/shifts`,g)}swapBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts/switch_shift_templates`,g)}editBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts`,g)}deleteBrigadeShifts(B,g){return this.delete(`schedule/${B}/shifts`,{data:{shift_ids:g}})}deleteBrigadesFromSchedule(B,g){return this.patch(`schedule/${B}/delete_brigades`,{brigade_ids:g})}}let Oo;function Mf(){return Oo||(Oo=new Yf),Oo}class rf extends zB{createUserIssue(B){return this.post("user_issue",B,{headers:{"Content-Type":"multipart/form-data"}})}getUserIssue(B){return this.get(`user_issue/${B}`)}getUserIssueList(B){return this.get("user_issue/list",{params:B})}getProperties(){return this.get("user_issue/properties")}deleteUserIssue(B){return this.delete(`user_issue/${B}`)}}let Zo;function Df(){return Zo||(Zo=new rf),Zo}/**
7
+ `+C):Q.stack=C}catch{}}throw Q}}_request(B,g){typeof B=="string"?(g=g||{},g.url=B):g=B||{},g=gw(this.defaults,g);const{transitional:Q,paramsSerializer:w,headers:C}=g;Q!==void 0&&we.assertOptions(Q,{silentJSONParsing:Xg.transitional(Xg.boolean),forcedJSONParsing:Xg.transitional(Xg.boolean),clarifyTimeoutError:Xg.transitional(Xg.boolean)},!1),w!=null&&(O.isFunction(w)?g.paramsSerializer={serialize:w}:we.assertOptions(w,{encode:Xg.function,serialize:Xg.function},!0)),g.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?g.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:g.allowAbsoluteUrls=!0),we.assertOptions(g,{baseUrl:Xg.spelling("baseURL"),withXsrfToken:Xg.spelling("withXSRFToken")},!0),g.method=(g.method||this.defaults.method||"get").toLowerCase();let E=C&&O.merge(C.common,C[g.method]);C&&O.forEach(["delete","get","head","post","put","patch","common"],M=>{delete C[M]}),g.headers=Dg.concat(E,C);const e=[];let t=!0;this.interceptors.request.forEach(function(D){typeof D.runWhen=="function"&&D.runWhen(g)===!1||(t=t&&D.synchronous,e.unshift(D.fulfilled,D.rejected))});const I=[];this.interceptors.response.forEach(function(D){I.push(D.fulfilled,D.rejected)});let n,i=0,c;if(!t){const M=[qY.bind(this),void 0];for(M.unshift(...e),M.push(...I),c=M.length,n=Promise.resolve(g);i<c;)n=n.then(M[i++],M[i++]);return n}c=e.length;let Y=g;for(;i<c;){const M=e[i++],D=e[i++];try{Y=M(Y)}catch(r){D.call(this,r);break}}try{n=qY.call(this,Y)}catch(M){return Promise.reject(M)}for(i=0,c=I.length;i<c;)n=n.then(I[i++],I[i++]);return n}getUri(B){B=gw(this.defaults,B);const g=zY(B.baseURL,B.url,B.allowAbsoluteUrls);return NY(g,B.params,B.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(B){Qw.prototype[B]=function(g,Q){return this.request(gw(Q||{},{method:B,url:g,data:(Q||{}).data}))}}),O.forEach(["post","put","patch"],function(B){function g(Q){return function(C,E,e){return this.request(gw(e||{},{method:B,headers:Q?{"Content-Type":"multipart/form-data"}:{},url:C,data:E}))}}Qw.prototype[B]=g(),Qw.prototype[B+"Form"]=g(!0)});let RH=class Ga{constructor(B){if(typeof B!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(C){g=C});const Q=this;this.promise.then(w=>{if(!Q._listeners)return;let C=Q._listeners.length;for(;C-- >0;)Q._listeners[C](w);Q._listeners=null}),this.promise.then=w=>{let C;const E=new Promise(e=>{Q.subscribe(e),C=e}).then(w);return E.cancel=function(){Q.unsubscribe(C)},E},B(function(C,E,e){Q.reason||(Q.reason=new Sw(C,E,e),g(Q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(B){if(this.reason){B(this.reason);return}this._listeners?this._listeners.push(B):this._listeners=[B]}unsubscribe(B){if(!this._listeners)return;const g=this._listeners.indexOf(B);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const B=new AbortController,g=Q=>{B.abort(Q)};return this.subscribe(g),B.signal.unsubscribe=()=>this.unsubscribe(g),B.signal}static source(){let B;return{token:new Ga(function(w){B=w}),cancel:B}}};function PH(A){return function(g){return A.apply(null,g)}}function vH(A){return O.isObject(A)&&A.isAxiosError===!0}const No={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(No).forEach(([A,B])=>{No[B]=A});function AM(A){const B=new Qw(A),g=rY(Qw.prototype.request,B);return O.extend(g,Qw.prototype,B,{allOwnKeys:!0}),O.extend(g,B,null,{allOwnKeys:!0}),g.create=function(w){return AM(gw(A,w))},g}const PB=AM(kC);PB.Axios=Qw,PB.CanceledError=Sw,PB.CancelToken=RH,PB.isCancel=TY,PB.VERSION=_Y,PB.toFormData=$E,PB.AxiosError=ZA,PB.Cancel=PB.CanceledError,PB.all=function(B){return Promise.all(B)},PB.spread=PH,PB.isAxiosError=vH,PB.mergeConfig=gw,PB.AxiosHeaders=Dg,PB.formToJSON=A=>vY(O.isHTMLForm(A)?new FormData(A):A),PB.getAdapter=ZY.getAdapter,PB.HttpStatusCode=No,PB.default=PB;const{Axios:f8,AxiosError:J8,CanceledError:m8,isCancel:N8,CancelToken:R8,VERSION:P8,all:v8,Cancel:k8,isAxiosError:T8,spread:j8,toFormData:y8,AxiosHeaders:p8,HttpStatusCode:z8,formToJSON:W8,getAdapter:b8,mergeConfig:S8}=PB;var Ce=!1,Ro=[];class zB{constructor(){ha(this,"axiosInstance");this.axiosInstance=PB.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"},withCredentials:!0}),this.axiosInstance.interceptors.request.use(B=>(B.headers.Authorization=`Bearer ${this.getAccessToken()}`,B),B=>Promise.reject(B)),this.axiosInstance.interceptors.response.use(B=>B.data,async B=>{var Q;const g=B.config;if(((Q=B.response)==null?void 0:Q.status)!==401||g.url==="/v2/auth/refresh"||g.url==="/v2/login"||g._retry)return Promise.reject(B);if(g._retry=!0,Ce)return new Promise(w=>{this.subscribeTokenRefresh(()=>w(this.axiosInstance(g)))});Ce=!0;try{const C=(await this.refresh()).accessToken;return C?(this.setAccessToken(C),this.onRefreshed(),Ce=!1,this.axiosInstance(g)):(this.logoutUser(),Promise.reject(B))}catch(w){return this.logoutUser(),Promise.reject(w)}})}setAccessToken(B){localStorage.setItem("token",B)}getAccessToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}subscribeTokenRefresh(B){Ro.push(B)}refresh(){return this.post("/v2/auth/refresh",null)}onRefreshed(){Ro.forEach(B=>B()),Ro=[]}async logoutUser(){Ce=!1,await this.post("/v2/logout",null),this.removeToken(),window.location.href="/sign-in"}handleError(B){B.response?console.error("API Error:",B.response.status,B.response.data):B.request?console.error("No response received:",B.request):console.error("Error during request setup:",B.message)}async get(B,g){try{const Q=await this.axiosInstance.get(B,g);return(Q==null?void 0:Q.data)===!1?!1:(Q==null?void 0:Q.data)??Q}catch(Q){const w=Q;throw this.handleError(w),Q}}async delete(B,g){try{return await this.axiosInstance.delete(B,g)}catch(Q){const w=Q;throw this.handleError(w),Q}}async post(B,g,Q){try{const w=await this.axiosInstance.post(B,g,Q);return(w==null?void 0:w.data)===!1?!1:(w==null?void 0:w.data)||w}catch(w){const C=w;throw this.handleError(C),w}}async patch(B,g,Q){try{return(await this.axiosInstance.patch(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}async put(B,g,Q){try{return(await this.axiosInstance.put(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}}class kH extends zB{async fetchCriticalPathTasks(B){return await this.get(`gantt/get_list_task_on_critical_path?${B}`)}async fetchGanttList(B){return await this.get(`/list/tasks/search?${B}&gantt=1`)}async setFixPlan(B){const g=new URLSearchParams;return g.append("projects[0]",B),g.append("filter[state]","1"),await this.post(`/gantt/set-planned-date?${g.toString()}`,null)}getLinksByProject(B){return this.get(`gantt/${B}/links/list`)}createLink(B){return this.post("gantt/task/link",B)}deleteLink(B){return this.delete(`gantt/task/link/${B}`)}}let Po;function TH(){return Po||(Po=new kH),Po}class jH extends zB{async fetchPieProjects(B){return await this.get("repairs/pie/projects?"+B)}async fetchPieTasks(B){return await this.get("repairs/pie/tasks?"+B)}async fetchPiePersonnel(B){return await this.get("repairs/metrics/get_list_position?"+B)}async fetchPersonnelData(B){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfo(B){return await this.get(`repairs/metrics/list_position_intersection_details?${B}`)}async fetchPersonnelDataNew(B){return await this.get("repairs/metrics/v2/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfoNew(B){return await this.get(`repairs/metrics/v2/list_position_intersection_details?${B}`)}async fetchPersonnelUnused(B){return await this.get("repairs/metrics/v2/unused_brigade_personnel",{params:B})}async fetchPiePersonnelInfo(B){return await this.get(`repairs/metrics/get_list_user_by_position?${B}`)}async fetchPieCriticalPath(B){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+B)}async fetchPieCriticalPathInfo(B){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${B}`)}async fetchPieTmc(B){return await this.get("repairs/metrics/get_list_instrument_type?"+B)}async fetchPieTmcInfo(B){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${B}`)}async fetchPieUntimelyClosedTask(B){return await this.get("repairs/metrics/get_list_comment_type?"+B)}async fetchPieUntimelyClosedTaskInfo(B){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${B}`)}async fetchPieAdditionalTasks(B){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+B)}async fetchPieAdditionalTasksInfo(B){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${B}`)}async fetchPersonnel(B){return await this.get("repairs/statistic/personnel?"+B)}async fetchPieExpired(B){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+B)}async fetchPieExpiredInfo(B){return await this.get(`repairs/metrics/get_list_task_expired?${B}`)}async fetchEconomicsPerformance(B){return await this.get(`repairs/metrics/get_economic_performance?${B}`)}async fetchEconomicsInfo(B){return await this.get(`repairs/metrics/get_list_task_economic_performance?${B}`)}async fetchQualityMetrics(B){return await this.get(`repairs/metrics/get_quality_metrics?${B}`)}async fetchQualityInfo(B){return await this.get(`repairs/metrics/get_list_task_by_quality?${B}`)}async fetchPieWorkZone(B){return await this.get("repairs/metrics/get_statistics_on_controller_zones?"+B)}async fetchWorkZoneInfo(B){return await this.get("exposed_equipment_zones/list?"+B)}async fetchPieAllTasks(B){return await this.get("repairs/metrics/get_list_task_group_by_status?"+B)}async fetchPieAllTasksInfo(B){return await this.get("repairs/metrics/get_list_task_by_status?"+B)}fetchPersonnelPlan(B){return this.get("repairs/metrics/personnel_plan",{params:B})}fetchPersonnelPlanProjects(B){return this.post("repairs/metrics/projects_with_personnel_plan",B)}fetchInstrumentsPlan(B){return this.get("repairs/metrics/instruments_plan",{params:B})}}let vo;function yH(){return vo||(vo=new jH),vo}class pH extends zB{async fetchProjectById(B){return this.get(`/projects/${B}`)}createProject(B){return this.post("/projects",B)}editProject(B,g){return this.put(`/projects/${B}`,g)}fetchProjects(B){return this.get("/search/projects",{params:B})}cloneProject(B){return this.post(`projects/${B.id}/clone`,B)}archiveProject(B,g){return this.put(`/projects/${B}`,g)}unArchiveProject(B,g){return this.put(`/projects/${B}`,g)}moveAprProject(B){return this.post("repairs/move_plan_to_real",{repairs:[B]})}restoreProject(B){return this.post("/restore_project",{projects_ids:[B]})}importTasks(B){return this.post("tasks/import",B)}importKtd(B){return this.post("/parse_ktd",B,{headers:{"Content-Type":"multipart/form-data"}})}checkStatusParser(B){return this.post("/check_parse_ktd",B)}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}getDynamicProgressWidget(B){return this.get(`repairs/get_repair_list_dynamics_performance?repair_id_list[]=${B}`)}removeRootIntervals(){return this.post("/delete/fake/projects",null)}addRootIntervals(B,g){return this.post(`/set/fake/projects/${B}`,g)}}let ko;function zH(){return ko||(ko=new pH),ko}class WH extends zB{fetchFilters(B){return this.get(`get_list_repair?smart=1&${B}`)}fetchRepairs(B,g,Q,w,C){return this.get("get_list_repair"+(B?`${g}&per_page=100000${C?"&"+C:""}&${Q?"":w}`:`?per_page=100000${C?"&"+C:""}&${w}`))}fetchRepairTemplates(B){return this.get("repairs/get_repair_template_list",{params:B})}createRepair(B){return this.post("/repairs/equipments",B)}createRepairFromTemplate(B){return this.post("/repairs/create_repair_from_repair_template",B)}startRepair(B){return this.post(`/repairs/${B}/start`,null)}finishRepair(B){return this.post("/repairs/complete_repair_list",{repairIdList:[B]})}finishPreparationProject(B){return this.post(`/repairs/${B}/finish_preparation`,null)}moveRepairToCurrent(B){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[B]})}moveArchiveToCurrent(B){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[B]})}moveRepairToApr(B){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[B]})}moveRepairToArchive(B){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[B]})}restoreRepair(B){return this.post("/restore_repair",{repairs_ids:[B]})}updateRepair(B,g){return this.put(`/repairs/${g}`,B)}copyRepair(B){return this.post(`/repairs/${B}/clone`,null)}deleteRepair(B){return this.delete(`/repairs/${B}`)}fetchIntersection(B){return this.get(`v3/repairs/${B}/personnel/intersection`)}}let To;function bH(){return To||(To=new WH),To}class SH extends zB{fetchTaskById(B){return this.get(`/tasks/${B}`)}fetchTasksList(B){return this.get("/list/tasks/search",{params:B})}fetchSubtasksList(B){return this.get(`/task/${B}/subtasks/list`)}fetchIntersectionsList(B){return this.get(`/tasks/${B}/intersections`)}fetchTaskBranch(B){return this.get(`/get_list_task_branch?task_id=${B}`)}fetchInstrumentsList(B){return this.get("admin/instruments",{params:B})}fetchInstrumentTypeListWithPreparedWarehouse(B){return this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:B})}fetchInstrumentsEquivalentList(B){return this.get("tasks/instrument/list",{params:B})}fetchDiffInstruments(B){return this.get(`tasks/${B.taskId}/fill/module`,{params:B})}replaceInstruments(B){return this.post("/instruments/equivalent/attach",B)}fetchTaskUsagePersonal(B){return this.get(`tasks/${B}/usage/users`)}fetchTaskUsageInstrument(B){return this.get(`tasks/${B}/usage/instruments`)}fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}fetchTaskVideoSources(B){return this.get("work_zone/get_list_video_source",{params:B})}fetchTaskVideoSourcesStream(B){return this.get("horizon/video-source",{params:B})}createWorkZone(B){return this.post("admin/work-zones",B)}createTask(B){return this.post("tasks",B)}editTask(B,g){return this.put(`tasks/${B}`,g)}mergeTask(B){return this.post("tasks/merge",B)}cloneTask(B,g){return this.post(`gantt/${B}/clone`,g)}deleteTask(B){return this.delete(`tasks/${B}`)}changeStatus(B,g){return this.put(`task/${B}/change-status`,{status_id:g})}saveMetrics(B){return this.put("/update_quality_metrics",B)}checkReasonForStatus(B){return this.post("/tasks/check_reason_for_task",{task_id:B})}verifyTaskStatus(B,g){return this.get(`/task/${B}/change-status/verification`,{params:{status_id:g}})}checkBranchBeforeCloseTask(B){return this.post("/check_branch_before_close_task",{task_id:B})}}let jo;function LH(){return jo||(jo=new SH),jo}class VH extends zB{login(B,g){return this.post("/v2/login",{email:B,password:g})}loginPhoto(B){return this.post("/login/from_photo",{photo:B})}loginVideo(B){return this.post("/login/video",B,{transformRequest:g=>g})}logout(){return this.logoutUser()}userInfo(){return this.get("/users/auth")}configs(){return this.get("/v2/configs")}changePassword(B,g,Q){return this.put(`/v2/auth/users/${B}/password`,{password:g,password_confirmation:Q})}changePasswordAndActivate(B,g,Q,w){return this.post("/v2/auth/users/activate",{email:B,currentPassword:g,password:Q,passwordConfirmation:w})}}let yo;function KH(){return yo||(yo=new VH),yo}class xH extends zB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let po;function XH(){return po||(po=new xH),po}class OH extends zB{async startVideoAnalytics(){return await this.post("/statanly/start",null)}reloadVideoAnalytics(B){return this.post("/horizon/video-source/reload",{video_source_ids:B})}hardReloadStream(){return this.post("horizon/video-source/streams/add",null)}async fetchWorkZones(B){return await this.get("/search/work_zones",{params:B})}async fetchWorkZone(B){return await this.get(`/work_zone/get_work_zone/${B}`)}async editWorkZone(B,g){return await this.put(`/admin/work-zones/${B}`,g)}async deleteWorkZone(B){return await this.delete(`/admin/work-zones/${B}`)}async fetchVideoSources(B){return await this.get("/search/video_sources/list",{params:B})}async fetchVideoSourceEconomics(B){return await this.get("horizon/video-source/economics",{params:B})}async createVideoSource(B){return await this.post("horizon/video-source",B)}async editVideoSource(B,g){return await this.put(`/horizon/video-source/${B}`,g)}async deleteVideoSource(B){await this.delete(`/horizon/video-source/${B}`)}async fetchListRepairsVideoSource(B){return await this.get("work_zone/get_list_video_source_by_repair",{params:B})}async sendCombination(B){return await this.post("horizon/video-source/training",B)}async saveCombination(B){return await this.post("horizon/video-source/bind",B)}async fetchCombination(B){return await this.get("horizon/video-source/bind/show",{params:B})}async startTraining(B){return await this.post("horizon/video-source/training/start",B)}async stopTraining(B){return await this.post("horizon/video-source/training/stop",B)}async fetchTrainingInfo(B){return await this.get("horizon/video-source/training/info",{params:B})}async fetchTrainingStatus(B){return await this.get("horizon/video-source/training/status",{params:B})}async fetchVisualizationDataLink(B){return await this.get("horizon/video-source/link/video/training",{params:B})}async updateVisualizationData(B){return await this.get("horizon/video-source/download/video/training",{params:B})}async deleteFrameFromVideo(B){await this.delete(`horizon/video-source/delete/fragment/video/training/${B}`)}async sendEvent(B){return await this.post("alerts_callback_url",B)}}let zo;function ZH(){return zo||(zo=new OH),zo}class qH extends zB{async editUser({id:B,model:g}){return await this.put(`/admin/users/${B}`,g)}async getUser(B){return await this.get(`/admin/users/${B}`)}async changeUserPassword(B){return await this.patch("/v2/auth/users/password",B)}async getUserWarehouses(B){return await this.get("users/get_warehouse_list_by_user",{params:B})}async createUser(B){return await this.post("/admin/users",B)}async deleteUser({user_id:B,archive_reason:g}){return await this.post("/users/archive_user",{user_id:B,archive_reason:g})}async deleteUserPhotos({user_id:B,photos:g}){return await this.post("/users/photos/delete",{user_id:B,photos:g})}async restoreUser(B){return await this.post("/users/restore_user",{user_id:B})}async getRoles(B){return await this.get("/search/roles",{params:B})}async getPositions(B){return await this.get("/search/positions",{params:B})}async createPosition(B){return await this.post("/admin/positions",B)}async editPosition(B,g){return await this.put(`/admin/positions/${B}`,g)}async deletePosition(B){return await this.delete(`/admin/positions/${B}`)}async getTeams(B){return await this.get("/search/teams",{params:B})}async createTeam(B){return await this.post("/teams",B)}async editTeam(B,g){return await this.patch(`/teams/${B}`,g)}async deleteTeam(B){return await this.delete(`/teams/${B}`)}async checkUserVectors(B){return await this.get(`/user/get-vectors/${B}`)}async checkArchiveUserVectors(B){return await this.get(`/users/get_vector_count_by_user?user_id=${B}`)}async addUserVectors(B){return await this.post("/user/add-vector",B,{headers:{"Content-Type":"multipart/form-data"}})}async removeUserVectors(B){return await this.delete(`/user/delete-vectors/${B}`)}async deleteUserPasses(B){return await this.post("admin/delete/passes",B)}async checkUserBeforeArchive(B){return await this.post("users/check_user_before_archive",B)}}let Wo;function _H(){return Wo||(Wo=new qH),Wo}class $H extends zB{async fetchUserInstrumentsHistory(B,g){const Q={status:"issued",page:g,desc:"desc",column:"issued_in"};return await this.get(`users/${B}/instruments`,{params:Q})}async fetchWarehouses(B){return await this.get("search/warehouses",{params:B})}async fetchWarehouse(B){return await this.get(`admin/warehouses/${B}`)}async fetchStatusHistory(B){return await this.get(`warehouses/${B}/history/status`)}async createWarehouse(B){return await this.post("admin/warehouses",B)}async editWarehouse({id:B,model:g}){return await this.put(`admin/warehouses/${B}`,g)}deleteWarehouse(B){return this.delete(`admin/warehouses/${B}`)}async unsetWarehouseRfid(B){return await this.post("warehouses/unset-rfid",B)}async searchInstruments(B){return await this.get("search/instruments",{params:B})}}let bo;function Af(){return bo||(bo=new $H),bo}class Bf extends zB{fetchControlZones(B){return this.get("/frame/list",{params:B})}async fetchControlZone(B){return this.get(`/frame/${B}`)}createControlZone(B){return this.post("/frame",B)}editControlZone(B,g){return this.put(`/frame/${B}`,g)}deleteControlZone(B){return this.delete(`/frame/${B}`)}fetchControlLogs(B){return this.get("/exposed_equipment_zones/list_for_controller",{params:B})}fetchControllers(B){return this.get("/frame/controllers/list",{params:B})}fetchUsersWithPasses(){return this.get("inspector/users-with-passes")}fetchWarehousesList(){return this.get("tasks/warehouse/list?only_outside_exposed_equipment_zone=1")}manualEntry(B){return this.post("exposed_equipment_zones/hand/enter",B)}manualExit(B){return this.post("exposed_equipment_zones/hand/exit",B)}deleteControlLogs(B){return this.delete("exposed_equipment_zones",B)}fetchInstrumentTypeList(B){return this.get("search/instrument_types",{params:B})}fetchInstrumentCategoryList(B={}){return this.get("instrument_category/list",{params:B})}createInstrumentType(B){return this.post("admin/instruments",B)}editInstrumentType(B,g){return this.put(`admin/instruments/${B}`,g)}deleteInstrumentType(B){return this.delete(`admin/instruments/${B}`)}fetchRpdzLogList(B){return this.get("exposed_equipment_zones_history/list",{params:B})}exportRpdzLogList(B){return this.get("exposed_equipment_zones_history/list/export",{params:B,responseType:"blob"})}editControlLog(B,g){return this.put(`exposed_equipment_zones/${B}`,g)}}let So;function gf(){return So||(So=new Bf),So}class Qf extends zB{fetchSearchUsers(B){return this.get("search/users",{params:B})}fetchSearchInstruments(B){return this.get("search/instrument_type",{params:B})}fetchSearchModules(B){return this.get("search/modules",{params:B})}}let Lo;function wf(){return Lo||(Lo=new Qf),Lo}class Cf extends zB{async detectModule(B){return await this.get(`module/${B}/detect`)}async createModule(B){return await this.post("admin/modules",B)}async editModule({id:B,model:g}){return await this.put(`admin/modules/${B}`,g)}deleteModule(B){return this.delete(`admin/modules/${B}`)}}let Vo;function Ef(){return Vo||(Vo=new Cf),Vo}class ef extends zB{async uploadComment(B){return await this.post("comments",B)}async deleteComment(B){return await this.delete(`comments/${B}`)}async editComment(B,g){return await this.put(`comments/${B}`,g)}}let Ko;function tf(){return Ko||(Ko=new ef),Ko}class of extends zB{fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}createEquipment(B){return this.post("repairs/equipment",B)}editEquipment(B,g){return this.put(`repairs/equipment/${B}`,g)}deleteEquipment(B){return this.delete(`repairs/equipment/${B}`)}fetchEquipmentTypeList(B){return this.get("repairs/equipments/get_equipment_type_list",{params:B})}fetchEquipmentType(B){return this.get(`repairs/equipments/get_equipment_type/${B}`)}createEquipmentType(B){return this.post("repairs/equipments/create_equipment_type",B)}editEquipmentType(B,g){return this.put(`repairs/equipments/update_equipment_type/${B}`,g)}deleteEquipmentType(B){return this.delete(`repairs/equipments/delete_equipment_type/${B}`)}}let xo;function If(){return xo||(xo=new of),xo}class nf extends zB{fetchBrigades(B){return this.get("/search/brigades",{params:B})}editBrigade({id:B,model:g}){return this.put(`/brigades/${B}`,g)}getBrigade(B){return this.get(`/brigades/${B}`)}createBrigade(B){return this.post("/brigades",B)}deleteBrigade(B){return this.delete(`/brigades/${B}`)}}let Xo;function cf(){return Xo||(Xo=new nf),Xo}class Yf extends zB{fetchScheduleConfig(){return this.get("schedule/config")}fetchSchedule(B){return this.get(`schedule/${B}`)}fetchScheduleTable(B){return this.get(`schedule/${B}/get_brigades_table`)}fetchBrigadesToSwap(B,g){return this.get(`schedule/${B}/selection_brigades_for_swap_shift_template`,{params:g})}completeBrigadeSchedule(B,g){return this.post(`schedule/${B}/complete_brigade_schedule`,g)}autocompleteBrigadesSchedule(B,g){return this.post(`schedule/${B}/autocomplete`,g)}addBrigadeShift(B,g){return this.post(`schedule/${B}/shifts`,g)}swapBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts/switch_shift_templates`,g)}editBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts`,g)}deleteBrigadeShifts(B,g){return this.delete(`schedule/${B}/shifts`,{data:{shift_ids:g}})}deleteBrigadesFromSchedule(B,g){return this.patch(`schedule/${B}/delete_brigades`,{brigade_ids:g})}}let Oo;function Mf(){return Oo||(Oo=new Yf),Oo}class rf extends zB{createUserIssue(B){return this.post("user_issue",B,{headers:{"Content-Type":"multipart/form-data"}})}getUserIssue(B){return this.get(`user_issue/${B}`)}getUserIssueList(B){return this.get("user_issue/list",{params:B})}getProperties(){return this.get("user_issue/properties")}deleteUserIssue(B){return this.delete(`user_issue/${B}`)}}let Zo;function Df(){return Zo||(Zo=new rf),Zo}/**
8
8
  * @license
9
9
  * Copyright 2020 Google LLC. All Rights Reserved.
10
10
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -66,6 +66,7 @@ export type Api_ControlLogs_Dto = {
66
66
  user: Api_User_Dto[];
67
67
  frame: Api_ControlZones_Dto[];
68
68
  warehouse: Api_Warehouse_Dto[];
69
+ description: string | null;
69
70
  };
70
71
  export type Api_New_Items = {
71
72
  title: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.3.91",
3
+ "version": "1.3.93",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,185 +1,184 @@
1
- import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios'
2
- import { Api_Auth_Login } from '@/api/types/Api_Auth'
3
-
4
- // eslint-disable-next-line
5
- var isRefreshing = false
6
- // eslint-disable-next-line
7
- var refreshSubscribers: any[] = []
8
-
9
- interface Api_Auth_Refresh {
10
- accessToken: string
11
- }
12
-
13
- export enum ApiServiceType {
14
- SERVICE_AUTH = 'SERVICE_AUTH',
15
- }
16
-
17
- export default class ApiService {
18
- private axiosInstance: AxiosInstance
19
-
20
- constructor() {
21
- this.axiosInstance = axios.create({
22
- baseURL: process.env.VUE_APP_BACKEND,
23
- headers: {
24
- 'Content-Type': 'application/json',
25
- Accept: 'application/json',
26
- },
27
- withCredentials: true,
28
- })
29
-
30
- this.axiosInstance.interceptors.request.use(
31
- (config: InternalAxiosRequestConfig) => {
32
- config.headers.Authorization = `Bearer ${this.getAccessToken()}`
33
- return config
34
- },
35
- (error: AxiosError) => {
36
- return Promise.reject(error)
37
- },
38
- )
39
-
40
- this.axiosInstance.interceptors.response.use(
41
- (response: AxiosResponse) => {
42
- return response.data
43
- },
44
- async error => {
45
- const originalRequest = error.config
46
-
47
- if (
48
- error.response?.status !== 401 ||
49
- originalRequest.url === '/v2/auth/refresh' ||
50
- originalRequest.url === '/v2/login' ||
51
- originalRequest.url === '/v2/auth/refresh' ||
52
- originalRequest._retry
53
- ) {
54
- return Promise.reject(error)
55
- }
56
-
57
- originalRequest._retry = true
58
-
59
- if (isRefreshing) {
60
- return new Promise(resolve => {
61
- this.subscribeTokenRefresh(() => resolve(this.axiosInstance(originalRequest)))
62
- })
63
- }
64
-
65
- isRefreshing = true
66
-
67
- try {
68
- const response = await this.refresh()
69
-
70
- const newToken = response.accessToken
71
- if (!newToken) {
72
- await this.logoutUser()
73
- return Promise.reject(error)
74
- }
75
-
76
- this.setAccessToken(newToken)
77
- this.onRefreshed()
78
- isRefreshing = false
79
- return this.axiosInstance(originalRequest)
80
- } catch (e) {
81
- await this.logoutUser()
82
- return Promise.reject(e)
83
- }
84
- },
85
- )
86
- }
87
-
88
- private setAccessToken(token: string) {
89
- localStorage.setItem('token', token)
90
- }
91
- private getAccessToken() {
92
- return localStorage.getItem('token')
93
- }
94
-
95
- private removeToken() {
96
- localStorage.removeItem('token')
97
- }
98
-
99
- private subscribeTokenRefresh(cb: any) {
100
- refreshSubscribers.push(cb)
101
- }
102
-
103
- private refresh(): Promise<Api_Auth_Refresh> {
104
- return this.post<null, Api_Auth_Login>(`/v2/auth/refresh`, null)
105
- }
106
-
107
- private onRefreshed() {
108
- refreshSubscribers.forEach(cb => cb())
109
- refreshSubscribers = []
110
- }
111
-
112
- public async logoutUser(): Promise<any> {
113
- isRefreshing = false
114
- await this.post<any, any>(`/v2/logout`, null)
115
- this.removeToken()
116
- window.location.href = '/sign-in'
117
- }
118
-
119
- private handleError(error: AxiosError): void {
120
- if (error.response) {
121
- console.error('API Error:', error.response.status, error.response.data)
122
- } else if (error.request) {
123
- console.error('No response received:', error.request)
124
- } else {
125
- console.error('Error during request setup:', error.message)
126
- }
127
- }
128
-
129
- protected async get<T>(url: string, options?: AxiosRequestConfig) {
130
- try {
131
- const response: AxiosResponse<T> = await this.axiosInstance.get<T>(url, options)
132
- if (response?.data === false) return false as unknown as T
133
-
134
- return response?.data ?? (response as unknown as T)
135
- } catch (error) {
136
- const axiosError = error as AxiosError
137
- this.handleError(axiosError)
138
- throw error
139
- }
140
- }
141
-
142
- protected async delete<T>(url: string, options?: AxiosRequestConfig) {
143
- try {
144
- return await this.axiosInstance.delete<T>(url, options)
145
- } catch (error) {
146
- const axiosError = error as AxiosError
147
- this.handleError(axiosError)
148
- throw error
149
- }
150
- }
151
-
152
- protected async post<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig) {
153
- try {
154
- const response: AxiosResponse<T2> = await this.axiosInstance.post<T1, AxiosResponse<T2>>(url, payload, options)
155
- if (response?.data === false) return false
156
- return response?.data || (response as any)
157
- } catch (error) {
158
- const axiosError = error as AxiosError
159
- this.handleError(axiosError)
160
- throw error
161
- }
162
- }
163
-
164
- protected async patch<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig): Promise<T2> {
165
- try {
166
- const response: AxiosResponse<T2> = await this.axiosInstance.patch<T1, AxiosResponse<T2>>(url, payload, options)
167
- return response.data
168
- } catch (error) {
169
- const axiosError = error as AxiosError
170
- this.handleError(axiosError)
171
- throw error
172
- }
173
- }
174
-
175
- protected async put<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig) {
176
- try {
177
- const response: AxiosResponse<T2> = await this.axiosInstance.put<T1, AxiosResponse<T2>>(url, payload, options)
178
- return response.data
179
- } catch (error) {
180
- const axiosError = error as AxiosError
181
- this.handleError(axiosError)
182
- throw error
183
- }
184
- }
185
- }
1
+ import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios'
2
+ import { Api_Auth_Login } from '@/api/types/Api_Auth'
3
+
4
+ // eslint-disable-next-line
5
+ var isRefreshing = false
6
+ // eslint-disable-next-line
7
+ var refreshSubscribers: any[] = []
8
+
9
+ interface Api_Auth_Refresh {
10
+ accessToken: string
11
+ }
12
+
13
+ export enum ApiServiceType {
14
+ SERVICE_AUTH = 'SERVICE_AUTH',
15
+ }
16
+
17
+ export default class ApiService {
18
+ private axiosInstance: AxiosInstance
19
+
20
+ constructor() {
21
+ this.axiosInstance = axios.create({
22
+ baseURL: process.env.VUE_APP_BACKEND,
23
+ headers: {
24
+ 'Content-Type': 'application/json',
25
+ Accept: 'application/json',
26
+ },
27
+ withCredentials: true,
28
+ })
29
+
30
+ this.axiosInstance.interceptors.request.use(
31
+ (config: InternalAxiosRequestConfig) => {
32
+ config.headers.Authorization = `Bearer ${this.getAccessToken()}`
33
+ return config
34
+ },
35
+ (error: AxiosError) => {
36
+ return Promise.reject(error)
37
+ },
38
+ )
39
+
40
+ this.axiosInstance.interceptors.response.use(
41
+ (response: AxiosResponse) => {
42
+ return response.data
43
+ },
44
+ async error => {
45
+ const originalRequest = error.config
46
+
47
+ if (
48
+ error.response?.status !== 401 ||
49
+ originalRequest.url === '/v2/auth/refresh' ||
50
+ originalRequest.url === '/v2/login' ||
51
+ originalRequest._retry
52
+ ) {
53
+ return Promise.reject(error)
54
+ }
55
+
56
+ originalRequest._retry = true
57
+
58
+ if (isRefreshing) {
59
+ return new Promise(resolve => {
60
+ this.subscribeTokenRefresh(() => resolve(this.axiosInstance(originalRequest)))
61
+ })
62
+ }
63
+
64
+ isRefreshing = true
65
+
66
+ try {
67
+ const response = await this.refresh()
68
+
69
+ const newToken = response.accessToken
70
+ if (!newToken) {
71
+ this.logoutUser()
72
+ return Promise.reject(error)
73
+ }
74
+
75
+ this.setAccessToken(newToken)
76
+ this.onRefreshed()
77
+ isRefreshing = false
78
+ return this.axiosInstance(originalRequest)
79
+ } catch (e) {
80
+ this.logoutUser()
81
+ return Promise.reject(e)
82
+ }
83
+ },
84
+ )
85
+ }
86
+
87
+ private setAccessToken(token: string) {
88
+ localStorage.setItem('token', token)
89
+ }
90
+ private getAccessToken() {
91
+ return localStorage.getItem('token')
92
+ }
93
+
94
+ private removeToken() {
95
+ localStorage.removeItem('token')
96
+ }
97
+
98
+ private subscribeTokenRefresh(cb: any) {
99
+ refreshSubscribers.push(cb)
100
+ }
101
+
102
+ private refresh(): Promise<Api_Auth_Refresh> {
103
+ return this.post<null, Api_Auth_Login>(`/v2/auth/refresh`, null)
104
+ }
105
+
106
+ private onRefreshed() {
107
+ refreshSubscribers.forEach(cb => cb())
108
+ refreshSubscribers = []
109
+ }
110
+
111
+ public async logoutUser(): Promise<any> {
112
+ isRefreshing = false
113
+ await this.post<any, any>(`/v2/logout`, null)
114
+ this.removeToken()
115
+ window.location.href = '/sign-in'
116
+ }
117
+
118
+ private handleError(error: AxiosError): void {
119
+ if (error.response) {
120
+ console.error('API Error:', error.response.status, error.response.data)
121
+ } else if (error.request) {
122
+ console.error('No response received:', error.request)
123
+ } else {
124
+ console.error('Error during request setup:', error.message)
125
+ }
126
+ }
127
+
128
+ protected async get<T>(url: string, options?: AxiosRequestConfig) {
129
+ try {
130
+ const response: AxiosResponse<T> = await this.axiosInstance.get<T>(url, options)
131
+ if (response?.data === false) return false as unknown as T
132
+
133
+ return response?.data ?? (response as unknown as T)
134
+ } catch (error) {
135
+ const axiosError = error as AxiosError
136
+ this.handleError(axiosError)
137
+ throw error
138
+ }
139
+ }
140
+
141
+ protected async delete<T>(url: string, options?: AxiosRequestConfig) {
142
+ try {
143
+ return await this.axiosInstance.delete<T>(url, options)
144
+ } catch (error) {
145
+ const axiosError = error as AxiosError
146
+ this.handleError(axiosError)
147
+ throw error
148
+ }
149
+ }
150
+
151
+ protected async post<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig) {
152
+ try {
153
+ const response: AxiosResponse<T2> = await this.axiosInstance.post<T1, AxiosResponse<T2>>(url, payload, options)
154
+ if (response?.data === false) return false
155
+ return response?.data || (response as any)
156
+ } catch (error) {
157
+ const axiosError = error as AxiosError
158
+ this.handleError(axiosError)
159
+ throw error
160
+ }
161
+ }
162
+
163
+ protected async patch<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig): Promise<T2> {
164
+ try {
165
+ const response: AxiosResponse<T2> = await this.axiosInstance.patch<T1, AxiosResponse<T2>>(url, payload, options)
166
+ return response.data
167
+ } catch (error) {
168
+ const axiosError = error as AxiosError
169
+ this.handleError(axiosError)
170
+ throw error
171
+ }
172
+ }
173
+
174
+ protected async put<T1, T2>(url: string, payload: T1, options?: AxiosRequestConfig) {
175
+ try {
176
+ const response: AxiosResponse<T2> = await this.axiosInstance.put<T1, AxiosResponse<T2>>(url, payload, options)
177
+ return response.data
178
+ } catch (error) {
179
+ const axiosError = error as AxiosError
180
+ this.handleError(axiosError)
181
+ throw error
182
+ }
183
+ }
184
+ }
@@ -1,111 +1,112 @@
1
- export type Api_User_Dto = {
2
- id: string
3
- full_name: string
4
- }
5
- export type Api_ControlsZone_Dto = {
6
- id: string
7
- name: string
8
- }
9
- export type Api_ControlZones_Dto = {
10
- id: string
11
- name: string
12
- inventory_number: string
13
- uuid: string
14
- controller_zone: string
15
- users?: Api_User_Dto[]
16
- }
17
- export type ControlsParams = {
18
- search?: string
19
- page?: number
20
- filter?: Record<string, string[]>
21
- }
22
-
23
- export interface ControlMeta {
24
- total: number
25
- perPage: number
26
- totalPages: number
27
- currentPage: number
28
- }
29
-
30
- export type FiltersValue = {
31
- users?: {
32
- users: Api_User_Dto[]
33
- }
34
- controller?: {
35
- controller: Api_User_Dto[]
36
- }
37
- controllers?: {
38
- controllers: Api_User_Dto[]
39
- }
40
- responsible?: {
41
- responsible: Api_User_Dto[]
42
- }
43
- controller_zones?: {
44
- controller_zones: Api_ControlsZone_Dto[]
45
- }
46
- status?: {
47
- status: boolean
48
- }
49
- }
50
- export type Api_Instrument_Dto = {
51
- id: string
52
- name: string
53
- storage_id?: string
54
- }
55
- export type Api_Warehouse_Dto = {
56
- id: string
57
- invoice_ref_key: string
58
- inventory_number: string
59
- instrument: Api_Instrument_Dto[]
60
- }
61
-
62
- export type Api_ControlLogs_Dto = {
63
- id: string
64
- automatically: string
65
- in_zone: string
66
- uuid: string
67
- controller_zone: string
68
- controller: Api_User_Dto[]
69
- user: Api_User_Dto[]
70
- frame: Api_ControlZones_Dto[]
71
- warehouse: Api_Warehouse_Dto[]
72
- }
73
- export type Api_New_Items = {
74
- title: string
75
- inventory_numbers: string
76
- storage_id: string
77
- }
78
- export type Api_ManualEntry_Dto = {
79
- user: string
80
- items?: string[]
81
- new_items?: Api_New_Items[]
82
- }
83
-
84
- export type Api_Instrument_Type_Search = {
85
- id: string
86
- icon: string
87
- name: string
88
- storages: {
89
- id: string
90
- title: string
91
- }[]
92
- warehouse_statuses: boolean
93
- }
94
-
95
- export type Api_Instrument_Category = {
96
- id: string
97
- title: string[]
98
- }
99
-
100
- export type Api_instrument_Type_Create = {
101
- name: string
102
- storage_id: string
103
- }
104
-
105
- export type Api_instrument_Type = {
106
- id: string
107
- name: string
108
- storage_id: string
109
- created_at: string
110
- updated_at: string
111
- }
1
+ export type Api_User_Dto = {
2
+ id: string
3
+ full_name: string
4
+ }
5
+ export type Api_ControlsZone_Dto = {
6
+ id: string
7
+ name: string
8
+ }
9
+ export type Api_ControlZones_Dto = {
10
+ id: string
11
+ name: string
12
+ inventory_number: string
13
+ uuid: string
14
+ controller_zone: string
15
+ users?: Api_User_Dto[]
16
+ }
17
+ export type ControlsParams = {
18
+ search?: string
19
+ page?: number
20
+ filter?: Record<string, string[]>
21
+ }
22
+
23
+ export interface ControlMeta {
24
+ total: number
25
+ perPage: number
26
+ totalPages: number
27
+ currentPage: number
28
+ }
29
+
30
+ export type FiltersValue = {
31
+ users?: {
32
+ users: Api_User_Dto[]
33
+ }
34
+ controller?: {
35
+ controller: Api_User_Dto[]
36
+ }
37
+ controllers?: {
38
+ controllers: Api_User_Dto[]
39
+ }
40
+ responsible?: {
41
+ responsible: Api_User_Dto[]
42
+ }
43
+ controller_zones?: {
44
+ controller_zones: Api_ControlsZone_Dto[]
45
+ }
46
+ status?: {
47
+ status: boolean
48
+ }
49
+ }
50
+ export type Api_Instrument_Dto = {
51
+ id: string
52
+ name: string
53
+ storage_id?: string
54
+ }
55
+ export type Api_Warehouse_Dto = {
56
+ id: string
57
+ invoice_ref_key: string
58
+ inventory_number: string
59
+ instrument: Api_Instrument_Dto[]
60
+ }
61
+
62
+ export type Api_ControlLogs_Dto = {
63
+ id: string
64
+ automatically: string
65
+ in_zone: string
66
+ uuid: string
67
+ controller_zone: string
68
+ controller: Api_User_Dto[]
69
+ user: Api_User_Dto[]
70
+ frame: Api_ControlZones_Dto[]
71
+ warehouse: Api_Warehouse_Dto[]
72
+ description: string | null
73
+ }
74
+ export type Api_New_Items = {
75
+ title: string
76
+ inventory_numbers: string
77
+ storage_id: string
78
+ }
79
+ export type Api_ManualEntry_Dto = {
80
+ user: string
81
+ items?: string[]
82
+ new_items?: Api_New_Items[]
83
+ }
84
+
85
+ export type Api_Instrument_Type_Search = {
86
+ id: string
87
+ icon: string
88
+ name: string
89
+ storages: {
90
+ id: string
91
+ title: string
92
+ }[]
93
+ warehouse_statuses: boolean
94
+ }
95
+
96
+ export type Api_Instrument_Category = {
97
+ id: string
98
+ title: string[]
99
+ }
100
+
101
+ export type Api_instrument_Type_Create = {
102
+ name: string
103
+ storage_id: string
104
+ }
105
+
106
+ export type Api_instrument_Type = {
107
+ id: string
108
+ name: string
109
+ storage_id: string
110
+ created_at: string
111
+ updated_at: string
112
+ }