shared-ritm 1.2.50 → 1.2.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shared-ritm.umd.js
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(g){return g instanceof this?g:new this(g)}static concat(g,...Q){const C=new this(g);return Q.forEach(w=>C.set(w)),C}static accessor(g){const C=(this[jI]=this[jI]={accessors:{}}).accessors,w=this.prototype;function E(I){const e=Tg(I);C[e]||(xi(w,I),C[e]=!0)}return z.isArray(g)?g.forEach(E):E(g),this}};gB.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.reduceDescriptors(gB.prototype,({value:A},g)=>{let Q=g[0].toUpperCase()+g.slice(1);return{get:()=>A,set(C){this[Q]=C}}}),z.freezeMethods(gB);function ZC(A,g){const Q=this||Rg,C=g||Q,w=gB.from(C.headers);let E=C.data;return z.forEach(A,function(e){E=e.call(Q,E,w.normalize(),g?g.status:void 0)}),w.normalize(),E}function yI(A){return!!(A&&A.__CANCEL__)}function Dg(A,g,Q){cA.call(this,A??"canceled",cA.ERR_CANCELED,g,Q),this.name="CanceledError"}z.inherits(Dg,cA,{__CANCEL__:!0});function WI(A,g,Q){const C=Q.config.validateStatus;!Q.status||!C||C(Q.status)?A(Q):g(new cA("Request failed with status code "+Q.status,[cA.ERR_BAD_REQUEST,cA.ERR_BAD_RESPONSE][Math.floor(Q.status/100)-4],Q.config,Q.request,Q))}function Vi(A){const g=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return g&&g[1]||""}function bi(A,g){A=A||10;const Q=new Array(A),C=new Array(A);let w=0,E=0,I;return g=g!==void 0?g:1e3,function(M){const o=Date.now(),D=C[E];I||(I=o),Q[w]=M,C[w]=o;let Y=E,n=0;for(;Y!==w;)n+=Q[Y++],Y=Y%A;if(w=(w+1)%A,w===E&&(E=(E+1)%A),o-I<g)return;const t=D&&o-D;return t?Math.round(n*1e3/t):void 0}}function pi(A,g){let Q=0,C=1e3/g,w,E;const I=(o,D=Date.now())=>{Q=D,w=null,E&&(clearTimeout(E),E=null),A.apply(null,o)};return[(...o)=>{const D=Date.now(),Y=D-Q;Y>=C?I(o,D):(w=o,E||(E=setTimeout(()=>{E=null,I(w)},C-Y)))},()=>w&&I(w)]}const PQ=(A,g,Q=3)=>{let C=0;const w=bi(50,250);return pi(E=>{const I=E.loaded,e=E.lengthComputable?E.total:void 0,M=I-C,o=w(M),D=I<=e;C=I;const Y={loaded:I,total:e,progress:e?I/e:void 0,bytes:M,rate:o||void 0,estimated:o&&e&&D?(e-I)/o:void 0,event:E,lengthComputable:e!=null,[g?"download":"upload"]:!0};A(Y)},Q)},SI=(A,g)=>{const Q=A!=null;return[C=>g[0]({lengthComputable:Q,total:A,loaded:C}),g[1]]},KI=A=>(...g)=>z.asap(()=>A(...g)),Oi=bA.hasStandardBrowserEnv?((A,g)=>Q=>(Q=new URL(Q,bA.origin),A.protocol===Q.protocol&&A.host===Q.host&&(g||A.port===Q.port)))(new URL(bA.origin),bA.navigator&&/(msie|trident)/i.test(bA.navigator.userAgent)):()=>!0,Xi=bA.hasStandardBrowserEnv?{write(A,g,Q,C,w,E){const I=[A+"="+encodeURIComponent(g)];z.isNumber(Q)&&I.push("expires="+new Date(Q).toGMTString()),z.isString(C)&&I.push("path="+C),z.isString(w)&&I.push("domain="+w),E===!0&&I.push("secure"),document.cookie=I.join("; ")},read(A){const g=document.cookie.match(new RegExp("(^|;\\s*)("+A+")=([^;]*)"));return g?decodeURIComponent(g[3]):null},remove(A){this.write(A,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Zi(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function qi(A,g){return g?A.replace(/\/?\/$/,"")+"/"+g.replace(/^\/+/,""):A}function xI(A,g,Q){let C=!Zi(g);return A&&(C||Q==!1)?qi(A,g):g}const VI=A=>A instanceof gB?{...A}:A;function KB(A,g){g=g||{};const Q={};function C(o,D,Y,n){return z.isPlainObject(o)&&z.isPlainObject(D)?z.merge.call({caseless:n},o,D):z.isPlainObject(D)?z.merge({},D):z.isArray(D)?D.slice():D}function w(o,D,Y,n){if(z.isUndefined(D)){if(!z.isUndefined(o))return C(void 0,o,Y,n)}else return C(o,D,Y,n)}function E(o,D){if(!z.isUndefined(D))return C(void 0,D)}function I(o,D){if(z.isUndefined(D)){if(!z.isUndefined(o))return C(void 0,o)}else return C(void 0,D)}function e(o,D,Y){if(Y in g)return C(o,D);if(Y in A)return C(void 0,o)}const M={url:E,method:E,data:E,baseURL:I,transformRequest:I,transformResponse:I,paramsSerializer:I,timeout:I,timeoutMessage:I,withCredentials:I,withXSRFToken:I,adapter:I,responseType:I,xsrfCookieName:I,xsrfHeaderName:I,onUploadProgress:I,onDownloadProgress:I,decompress:I,maxContentLength:I,maxBodyLength:I,beforeRedirect:I,transport:I,httpAgent:I,httpsAgent:I,cancelToken:I,socketPath:I,responseEncoding:I,validateStatus:e,headers:(o,D,Y)=>w(VI(o),VI(D),Y,!0)};return z.forEach(Object.keys(Object.assign({},A,g)),function(D){const Y=M[D]||w,n=Y(A[D],g[D],D);z.isUndefined(n)&&Y!==e||(Q[D]=n)}),Q}const bI=A=>{const g=KB({},A);let{data:Q,withXSRFToken:C,xsrfHeaderName:w,xsrfCookieName:E,headers:I,auth:e}=g;g.headers=I=gB.from(I),g.url=mI(xI(g.baseURL,g.url,g.allowAbsoluteUrls),A.params,A.paramsSerializer),e&&I.set("Authorization","Basic "+btoa((e.username||"")+":"+(e.password?unescape(encodeURIComponent(e.password)):"")));let M;if(z.isFormData(Q)){if(bA.hasStandardBrowserEnv||bA.hasStandardBrowserWebWorkerEnv)I.setContentType(void 0);else if((M=I.getContentType())!==!1){const[o,...D]=M?M.split(";").map(Y=>Y.trim()).filter(Boolean):[];I.setContentType([o||"multipart/form-data",...D].join("; "))}}if(bA.hasStandardBrowserEnv&&(C&&z.isFunction(C)&&(C=C(g)),C||C!==!1&&Oi(g.url))){const o=w&&E&&Xi.read(E);o&&I.set(w,o)}return g},_i=typeof XMLHttpRequest<"u"&&function(A){return new Promise(function(Q,C){const w=bI(A);let E=w.data;const I=gB.from(w.headers).normalize();let{responseType:e,onUploadProgress:M,onDownloadProgress:o}=w,D,Y,n,t,i;function s(){t&&t(),i&&i(),w.cancelToken&&w.cancelToken.unsubscribe(D),w.signal&&w.signal.removeEventListener("abort",D)}let c=new XMLHttpRequest;c.open(w.method.toUpperCase(),w.url,!0),c.timeout=w.timeout;function h(){if(!c)return;const H=gB.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),G={data:!e||e==="text"||e==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:H,config:A,request:c};WI(function(R){Q(R),s()},function(R){C(R),s()},G),c=null}"onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(h)},c.onabort=function(){c&&(C(new cA("Request aborted",cA.ECONNABORTED,A,c)),c=null)},c.onerror=function(){C(new cA("Network Error",cA.ERR_NETWORK,A,c)),c=null},c.ontimeout=function(){let a=w.timeout?"timeout of "+w.timeout+"ms exceeded":"timeout exceeded";const G=w.transitional||RI;w.timeoutErrorMessage&&(a=w.timeoutErrorMessage),C(new cA(a,G.clarifyTimeoutError?cA.ETIMEDOUT:cA.ECONNABORTED,A,c)),c=null},E===void 0&&I.setContentType(null),"setRequestHeader"in c&&z.forEach(I.toJSON(),function(a,G){c.setRequestHeader(G,a)}),z.isUndefined(w.withCredentials)||(c.withCredentials=!!w.withCredentials),e&&e!=="json"&&(c.responseType=w.responseType),o&&([n,i]=PQ(o,!0),c.addEventListener("progress",n)),M&&c.upload&&([Y,t]=PQ(M),c.upload.addEventListener("progress",Y),c.upload.addEventListener("loadend",t)),(w.cancelToken||w.signal)&&(D=H=>{c&&(C(!H||H.type?new Dg(null,A,c):H),c.abort(),c=null)},w.cancelToken&&w.cancelToken.subscribe(D),w.signal&&(w.signal.aborted?D():w.signal.addEventListener("abort",D)));const l=Vi(w.url);if(l&&bA.protocols.indexOf(l)===-1){C(new cA("Unsupported protocol "+l+":",cA.ERR_BAD_REQUEST,A));return}c.send(E||null)})},$i=(A,g)=>{const{length:Q}=A=A?A.filter(Boolean):[];if(g||Q){let C=new AbortController,w;const E=function(o){if(!w){w=!0,e();const D=o instanceof Error?o:this.reason;C.abort(D instanceof cA?D:new Dg(D instanceof Error?D.message:D))}};let I=g&&setTimeout(()=>{I=null,E(new cA(`timeout ${g} of ms exceeded`,cA.ETIMEDOUT))},g);const e=()=>{A&&(I&&clearTimeout(I),I=null,A.forEach(o=>{o.unsubscribe?o.unsubscribe(E):o.removeEventListener("abort",E)}),A=null)};A.forEach(o=>o.addEventListener("abort",E));const{signal:M}=C;return M.unsubscribe=()=>z.asap(e),M}},An=function*(A,g){let Q=A.byteLength;if(Q<g){yield A;return}let C=0,w;for(;C<Q;)w=C+g,yield A.slice(C,w),C=w},Bn=async function*(A,g){for await(const Q of gn(A))yield*An(Q,g)},gn=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}const g=A.getReader();try{for(;;){const{done:Q,value:C}=await g.read();if(Q)break;yield C}}finally{await g.cancel()}},pI=(A,g,Q,C)=>{const w=Bn(A,g);let E=0,I,e=M=>{I||(I=!0,C&&C(M))};return new ReadableStream({async pull(M){try{const{done:o,value:D}=await w.next();if(o){e(),M.close();return}let Y=D.byteLength;if(Q){let n=E+=Y;Q(n)}M.enqueue(new Uint8Array(D))}catch(o){throw e(o),o}},cancel(M){return e(M),w.return()}},{highWaterMark:2})},HQ=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",OI=HQ&&typeof ReadableStream=="function",Qn=HQ&&(typeof TextEncoder=="function"?(A=>g=>A.encode(g))(new TextEncoder):async A=>new Uint8Array(await new Response(A).arrayBuffer())),XI=(A,...g)=>{try{return!!A(...g)}catch{return!1}},Cn=OI&&XI(()=>{let A=!1;const g=new Request(bA.origin,{body:new ReadableStream,method:"POST",get duplex(){return A=!0,"half"}}).headers.has("Content-Type");return A&&!g}),ZI=64*1024,qC=OI&&XI(()=>z.isReadableStream(new Response("").body)),uQ={stream:qC&&(A=>A.body)};HQ&&(A=>{["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!uQ[g]&&(uQ[g]=z.isFunction(A[g])?Q=>Q[g]():(Q,C)=>{throw new cA(`Response type '${g}' is not supported`,cA.ERR_NOT_SUPPORT,C)})})})(new Response);const wn=async A=>{if(A==null)return 0;if(z.isBlob(A))return A.size;if(z.isSpecCompliantForm(A))return(await new Request(bA.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(z.isArrayBufferView(A)||z.isArrayBuffer(A))return A.byteLength;if(z.isURLSearchParams(A)&&(A=A+""),z.isString(A))return(await Qn(A)).byteLength},En=async(A,g)=>{const Q=z.toFiniteNumber(A.getContentLength());return Q??wn(g)},_C={http:ui,xhr:_i,fetch:HQ&&(async A=>{let{url:g,method:Q,data:C,signal:w,cancelToken:E,timeout:I,onDownloadProgress:e,onUploadProgress:M,responseType:o,headers:D,withCredentials:Y="same-origin",fetchOptions:n}=bI(A);o=o?(o+"").toLowerCase():"text";let t=$i([w,E&&E.toAbortSignal()],I),i;const s=t&&t.unsubscribe&&(()=>{t.unsubscribe()});let c;try{if(M&&Cn&&Q!=="get"&&Q!=="head"&&(c=await En(D,C))!==0){let G=new Request(g,{method:"POST",body:C,duplex:"half"}),m;if(z.isFormData(C)&&(m=G.headers.get("content-type"))&&D.setContentType(m),G.body){const[R,K]=SI(c,PQ(KI(M)));C=pI(G.body,ZI,R,K)}}z.isString(Y)||(Y=Y?"include":"omit");const h="credentials"in Request.prototype;i=new Request(g,{...n,signal:t,method:Q.toUpperCase(),headers:D.normalize().toJSON(),body:C,duplex:"half",credentials:h?Y:void 0});let l=await fetch(i);const H=qC&&(o==="stream"||o==="response");if(qC&&(e||H&&s)){const G={};["status","statusText","headers"].forEach(J=>{G[J]=l[J]});const m=z.toFiniteNumber(l.headers.get("content-length")),[R,K]=e&&SI(m,PQ(KI(e),!0))||[];l=new Response(pI(l.body,ZI,R,()=>{K&&K(),s&&s()}),G)}o=o||"text";let a=await uQ[z.findKey(uQ,o)||"text"](l,A);return!H&&s&&s(),await new Promise((G,m)=>{WI(G,m,{data:a,headers:gB.from(l.headers),status:l.status,statusText:l.statusText,config:A,request:i})})}catch(h){throw s&&s(),h&&h.name==="TypeError"&&/Load failed|fetch/i.test(h.message)?Object.assign(new cA("Network Error",cA.ERR_NETWORK,A,i),{cause:h.cause||h}):cA.from(h,h&&h.code,A,i)}})};z.forEach(_C,(A,g)=>{if(A){try{Object.defineProperty(A,"name",{value:g})}catch{}Object.defineProperty(A,"adapterName",{value:g})}});const qI=A=>`- ${A}`,In=A=>z.isFunction(A)||A===null||A===!1,_I={getAdapter:A=>{A=z.isArray(A)?A:[A];const{length:g}=A;let Q,C;const w={};for(let E=0;E<g;E++){Q=A[E];let I;if(C=Q,!In(Q)&&(C=_C[(I=String(Q)).toLowerCase()],C===void 0))throw new cA(`Unknown adapter '${I}'`);if(C)break;w[I||"#"+E]=C}if(!C){const E=Object.entries(w).map(([e,M])=>`adapter ${e} `+(M===!1?"is not supported by the environment":"is not available in the build"));let I=g?E.length>1?`since :
|
|
5
5
|
`+E.map(qI).join(`
|
|
6
6
|
`):" "+qI(E[0]):"as no adapter specified";throw new cA("There is no suitable adapter to dispatch the request "+I,"ERR_NOT_SUPPORT")}return C},adapters:_C};function $C(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new Dg(null,A)}function $I(A){return $C(A),A.headers=gB.from(A.headers),A.data=ZC.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),_I.getAdapter(A.adapter||Rg.adapter)(A).then(function(C){return $C(A),C.data=ZC.call(A,A.transformResponse,C),C.headers=gB.from(C.headers),C},function(C){return yI(C)||($C(A),C&&C.response&&(C.response.data=ZC.call(A,A.transformResponse,C.response),C.response.headers=gB.from(C.response.headers))),Promise.reject(C)})}const Ae="1.9.0",fQ={};["object","boolean","number","function","string","symbol"].forEach((A,g)=>{fQ[A]=function(C){return typeof C===A||"a"+(g<1?"n ":" ")+A}});const Be={};fQ.transitional=function(g,Q,C){function w(E,I){return"[Axios v"+Ae+"] Transitional option '"+E+"'"+I+(C?". "+C:"")}return(E,I,e)=>{if(g===!1)throw new cA(w(I," has been removed"+(Q?" in "+Q:"")),cA.ERR_DEPRECATED);return Q&&!Be[I]&&(Be[I]=!0,console.warn(w(I," has been deprecated since v"+Q+" and will be removed in the near future"))),g?g(E,I,e):!0}},fQ.spelling=function(g){return(Q,C)=>(console.warn(`${C} is likely a misspelling of ${g}`),!0)};function en(A,g,Q){if(typeof A!="object")throw new cA("options must be an object",cA.ERR_BAD_OPTION_VALUE);const C=Object.keys(A);let w=C.length;for(;w-- >0;){const E=C[w],I=g[E];if(I){const e=A[E],M=e===void 0||I(e,E,A);if(M!==!0)throw new cA("option "+E+" must be "+M,cA.ERR_BAD_OPTION_VALUE);continue}if(Q!==!0)throw new cA("Unknown option "+E,cA.ERR_BAD_OPTION)}}const dQ={assertOptions:en,validators:fQ},nB=dQ.validators;let xB=class{constructor(g){this.defaults=g||{},this.interceptors={request:new LI,response:new LI}}async request(g,Q){try{return await this._request(g,Q)}catch(C){if(C instanceof Error){let w={};Error.captureStackTrace?Error.captureStackTrace(w):w=new Error;const E=w.stack?w.stack.replace(/^.+\n/,""):"";try{C.stack?E&&!String(C.stack).endsWith(E.replace(/^.+\n.+\n/,""))&&(C.stack+=`
|
|
7
|
-
`+E):C.stack=E}catch{}}throw C}}_request(g,Q){typeof g=="string"?(Q=Q||{},Q.url=g):Q=g||{},Q=KB(this.defaults,Q);const{transitional:C,paramsSerializer:w,headers:E}=Q;C!==void 0&&dQ.assertOptions(C,{silentJSONParsing:nB.transitional(nB.boolean),forcedJSONParsing:nB.transitional(nB.boolean),clarifyTimeoutError:nB.transitional(nB.boolean)},!1),w!=null&&(z.isFunction(w)?Q.paramsSerializer={serialize:w}:dQ.assertOptions(w,{encode:nB.function,serialize:nB.function},!0)),Q.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?Q.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:Q.allowAbsoluteUrls=!0),dQ.assertOptions(Q,{baseUrl:nB.spelling("baseURL"),withXsrfToken:nB.spelling("withXSRFToken")},!0),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let I=E&&z.merge(E.common,E[Q.method]);E&&z.forEach(["delete","get","head","post","put","patch","common"],i=>{delete E[i]}),Q.headers=gB.concat(I,E);const e=[];let M=!0;this.interceptors.request.forEach(function(s){typeof s.runWhen=="function"&&s.runWhen(Q)===!1||(M=M&&s.synchronous,e.unshift(s.fulfilled,s.rejected))});const o=[];this.interceptors.response.forEach(function(s){o.push(s.fulfilled,s.rejected)});let D,Y=0,n;if(!M){const i=[$I.bind(this),void 0];for(i.unshift.apply(i,e),i.push.apply(i,o),n=i.length,D=Promise.resolve(Q);Y<n;)D=D.then(i[Y++],i[Y++]);return D}n=e.length;let t=Q;for(Y=0;Y<n;){const i=e[Y++],s=e[Y++];try{t=i(t)}catch(c){s.call(this,c);break}}try{D=$I.call(this,t)}catch(i){return Promise.reject(i)}for(Y=0,n=o.length;Y<n;)D=D.then(o[Y++],o[Y++]);return D}getUri(g){g=KB(this.defaults,g);const Q=xI(g.baseURL,g.url,g.allowAbsoluteUrls);return mI(Q,g.params,g.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(g){xB.prototype[g]=function(Q,C){return this.request(KB(C||{},{method:g,url:Q,data:(C||{}).data}))}}),z.forEach(["post","put","patch"],function(g){function Q(C){return function(E,I,e){return this.request(KB(e||{},{method:g,headers:C?{"Content-Type":"multipart/form-data"}:{},url:E,data:I}))}}xB.prototype[g]=Q(),xB.prototype[g+"Form"]=Q(!0)});let Dn=class ee{constructor(g){if(typeof g!="function")throw new TypeError("executor must be a function.");let Q;this.promise=new Promise(function(E){Q=E});const C=this;this.promise.then(w=>{if(!C._listeners)return;let E=C._listeners.length;for(;E-- >0;)C._listeners[E](w);C._listeners=null}),this.promise.then=w=>{let E;const I=new Promise(e=>{C.subscribe(e),E=e}).then(w);return I.cancel=function(){C.unsubscribe(E)},I},g(function(E,I,e){C.reason||(C.reason=new Dg(E,I,e),Q(C.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(g){if(this.reason){g(this.reason);return}this._listeners?this._listeners.push(g):this._listeners=[g]}unsubscribe(g){if(!this._listeners)return;const Q=this._listeners.indexOf(g);Q!==-1&&this._listeners.splice(Q,1)}toAbortSignal(){const g=new AbortController,Q=C=>{g.abort(C)};return this.subscribe(Q),g.signal.unsubscribe=()=>this.unsubscribe(Q),g.signal}static source(){let g;return{token:new ee(function(w){g=w}),cancel:g}}};function on(A){return function(Q){return A.apply(null,Q)}}function Mn(A){return z.isObject(A)&&A.isAxiosError===!0}const Aw={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};Object.entries(Aw).forEach(([A,g])=>{Aw[g]=A});function ge(A){const g=new xB(A),Q=lI(xB.prototype.request,g);return z.extend(Q,xB.prototype,g,{allOwnKeys:!0}),z.extend(Q,g,null,{allOwnKeys:!0}),Q.create=function(w){return ge(KB(A,w))},Q}const mA=ge(Rg);mA.Axios=xB,mA.CanceledError=Dg,mA.CancelToken=Dn,mA.isCancel=yI,mA.VERSION=Ae,mA.toFormData=GQ,mA.AxiosError=cA,mA.Cancel=mA.CanceledError,mA.all=function(g){return Promise.all(g)},mA.spread=on,mA.isAxiosError=Mn,mA.mergeConfig=KB,mA.AxiosHeaders=gB,mA.formToJSON=A=>TI(z.isHTMLForm(A)?new FormData(A):A),mA.getAdapter=_I.getAdapter,mA.HttpStatusCode=Aw,mA.default=mA;const{Axios:Bs,AxiosError:gs,CanceledError:Qs,isCancel:Cs,CancelToken:ws,VERSION:Es,all:Is,Cancel:es,isAxiosError:Ds,spread:os,toFormData:Ms,AxiosHeaders:Ys,HttpStatusCode:ts,formToJSON:cs,getAdapter:is,mergeConfig:ns}=mA;class GB{constructor(){Ie(this,"axiosInstance");this.axiosInstance=mA.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"}}),this.axiosInstance.interceptors.request.use(g=>{const Q=this.getToken();return Q&&g.headers&&(g.headers.Authorization=`Bearer ${Q}`),g},g=>Promise.reject(g)),this.axiosInstance.interceptors.response.use(g=>g.data,g=>{var Q,C;return(((Q=g.response)==null?void 0:Q.status)===401||((C=g.response)==null?void 0:C.status)===403)&&this.logout(),Promise.reject(g)})}getToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}logout(){this.removeToken(),window.location.href="/sign-in"}handleError(g){g.response?console.error("API Error:",g.response.status,g.response.data):g.request?console.error("No response received:",g.request):console.error("Error during request setup:",g.message)}async get(g,Q){try{const C=await this.axiosInstance.get(g,Q);return(C==null?void 0:C.data)===!1?!1:(C==null?void 0:C.data)??C}catch(C){const w=C;throw this.handleError(w),C}}async delete(g,Q){try{return await this.axiosInstance.delete(g,Q)}catch(C){const w=C;throw this.handleError(w),C}}async post(g,Q,C){try{const w=await this.axiosInstance.post(g,Q,C);return(w==null?void 0:w.data)===!1?!1:(w==null?void 0:w.data)||w}catch(w){const E=w;throw this.handleError(E),w}}async put(g,Q,C){try{return(await this.axiosInstance.put(g,Q,C)).data}catch(w){const E=w;throw this.handleError(E),w}}}class Yn extends GB{async fetchCriticalPathTasks(g){return await this.get(`gantt/get_list_task_on_critical_path?${g}`)}async fetchGanttList(g){return await this.get(`/list/tasks/search?${g}&gantt=1`)}}let Bw;function tn(){return Bw||(Bw=new Yn),Bw}class cn extends GB{async fetchPieProjects(g){return await this.get("repairs/pie/projects?"+g)}async fetchPieTasks(g){return await this.get("repairs/pie/tasks?"+g)}async fetchPiePersonnel(g){return await this.get("repairs/metrics/get_list_position?"+g)}async fetchPersonnelData(g){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+g)}async fetchPersonnelInfo(g){return await this.get(`repairs/metrics/list_position_intersection_details?${g}`)}async fetchPiePersonnelInfo(g){return await this.get(`repairs/metrics/get_list_user_by_position?${g}`)}async fetchPieCriticalPath(g){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+g)}async fetchPieCriticalPathInfo(g){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${g}`)}async fetchPieTmc(g){return await this.get("repairs/metrics/get_list_instrument_type?"+g)}async fetchPieTmcInfo(g){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${g}`)}async fetchPieUntimelyClosedTask(g){return await this.get("repairs/metrics/get_list_comment_type?"+g)}async fetchPieUntimelyClosedTaskInfo(g){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${g}`)}async fetchPieAdditionalTasks(g){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+g)}async fetchPieAdditionalTasksInfo(g){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${g}`)}async fetchPersonnel(g){return await this.get("repairs/statistic/personnel?"+g)}async fetchPieExpired(g){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+g)}async fetchPieExpiredInfo(g){return await this.get(`repairs/metrics/get_list_task_expired?${g}`)}async fetchEconomicsPerformance(g){return await this.get(`repairs/metrics/get_economic_performance?${g}`)}async fetchEconomicsInfo(g){return await this.get(`repairs/metrics/get_list_task_economic_performance?${g}`)}async fetchQualityMetrics(g){return await this.get(`repairs/metrics/get_quality_metrics?${g}`)}async fetchQualityInfo(g){return await this.get(`repairs/metrics/get_list_task_by_quality?${g}`)}async fetchPieWorkZone(g){return await this.get("repairs/metrics/get_list_work_zone_instrument?"+g)}async fetchWorkZoneInfo(g){return await this.get("repairs/metrics/get_list_work_zone_instrument_by_status?"+g)}async fetchPieAllTasks(g){return await this.get("repairs/metrics/get_list_task_group_by_status?"+g)}async fetchPieAllTasksInfo(g){return await this.get("repairs/metrics/get_list_task_by_status?"+g)}}let gw;function nn(){return gw||(gw=new cn),gw}class Fn extends GB{async fetchProjectById(g){return this.get(`/projects/${g}`)}createProject(g){return this.post("/projects",g)}editProject(g,Q){return this.put(`/projects/${g}`,Q)}fetchProjects(g){return this.get("/search/projects",{params:g})}cloneProject(g){return this.post(`projects/${g.id}/clone`,g)}archiveProject(g,Q){return this.put(`/projects/${g}`,Q)}unArchiveProject(g,Q){return this.put(`/projects/${g}`,Q)}moveAprProject(g){return this.post("repairs/move_plan_to_real",{repairs:[g]})}restoreProject(g){return this.post("/restore_project",{projects_ids:[g]})}importTasks(g){return this.post("tasks/import",g)}importKtd(g){return this.post("/parse_ktd",g,{headers:{"Content-Type":"multipart/form-data"}})}fetchProjectTeamList(g){return this.put(`/projects/${g}`,null)}deleteProject(g){return this.delete(`/projects/${g}`)}}let Qw;function sn(){return Qw||(Qw=new Fn),Qw}class an extends GB{fetchFilters(g){return this.get(`get_list_repair?smart=1&${g}`)}fetchRepairs(g,Q,C,w,E){return this.get("get_list_repair"+(g?`${Q}&per_page=100000${E?"&"+E:""}&${C?"":w}`:`?per_page=100000${E?"&"+E:""}&${w}`))}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(g){return this.post("/repairs/equipments",g)}startRepair(g){return this.post(`/repairs/${g}/start`,null)}finishRepair(g){return this.post("/repairs/complete_repair_list",{repairIdList:[g]})}finishPreparationProject(g){return this.post(`/repairs/${g}/finish_preparation`,null)}moveRepairToCurrent(g){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[g]})}moveArchiveToCurrent(g){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[g]})}moveRepairToApr(g){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[g]})}moveRepairToArchive(g){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[g]})}restoreRepair(g){return this.post("/restore_repair",{repairs_ids:[g]})}updateRepair(g,Q){return this.put(`/repairs/${Q}`,g)}copyRepair(g){return this.post(`/repairs/${g}/clone`,null)}deleteRepair(g){return this.delete(`/repairs/${g}`)}}let Cw;function ln(){return Cw||(Cw=new an),Cw}class rn extends GB{async fetchTaskById(g){return await this.get(`/tasks/${g}`)}async fetchTasksList(g){return await this.get("/list/tasks/search",{params:g})}async fetchSubtasksList(g){return await this.get(`/task/${g}/subtasks/list`)}async fetchTaskBranch(g){return await this.get(`/get_list_task_branch?task_id=${g}`)}async fetchInstrumentsList(g){return await this.get("admin/instruments",{params:g})}async fetchInstrumentTypeListWithPreparedWarehouse(g){return await this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:g})}async fetchInstrumentsEquivalentList(g){return await this.get("tasks/instrument/list",{params:g})}async fetchDiffInstruments(g){return await this.get(`tasks/${g.taskId}/fill/module`,{params:g})}async replaceInstruments(g){return await this.post("/instruments/equivalent/attach",g)}async fetchTaskUsagePersonal(g){return await this.get(`tasks/${g.taskId}/usage/users`,{params:g})}async fetchTaskUsageInstrument(g){return await this.get(`tasks/${g.taskId}/usage/instruments`,{params:g})}fetchEquipment(g){return this.get("repairs/equipment/list",{params:g})}fetchTaskVideoSources(g){return this.get("work_zone/get_list_video_source",{params:g})}fetchTaskVideoSourcesStream(g){return this.get("horizon/video-source",{params:g})}createWorkZone(g){return this.post("admin/work-zones",g)}async createTask(g){return await this.post("tasks",g)}async editTask(g){return await this.put(`tasks/${g.taskId}`,g.data)}async mergeTask(g){return await this.post("tasks/merge",g)}async deleteTask(g){return await this.delete(`tasks/${g}`)}async changeStatus(g){const{taskId:Q,data:C}=g;return await this.put(`task/${Q}/change-status`,C)}async uploadComment(g){return await this.post("comments",g)}async deleteComment(g){return await this.delete(`comments/${g}`)}async editComment(g){const{commentId:Q,data:C}=g;return await this.put(`comments/${Q}`,C)}async saveMetrics(g){return await this.put("/update_quality_metrics",g)}async checkReasonForStatus(g){return await this.post("/tasks/check_reason_for_task",g)}async verifyTaskStatus(g){const{task_id:Q,data:C}=g;return await this.get(`/task/${Q}/change-status/verification`,{params:C})}async checkBranchBeforeCloseTask(g){return await this.post("/check_branch_before_close_task",g)}}let ww;function Un(){return ww||(ww=new rn),ww}class Gn extends GB{login(g,Q){return this.post("/login",{email:g,password:Q})}loginPhoto(g){return this.post("/login/from_photo",{photo:g})}logout(){return this.post("/logout",null)}userInfo(){return this.get("/users/auth")}configs(){return this.get("/configs")}changePassword(g,Q,C){return this.put(`/users/${g}/password`,{password:Q,password_confirmation:C})}}let Ew;function hn(){return Ew||(Ew=new Gn),Ew}class Pn extends GB{uploadFile(g){return this.post("/upload-file",g,{headers:{"Content-Type":"multipart/form-data"}})}}let Iw;function Hn(){return Iw||(Iw=new Pn),Iw}class un extends GB{fetchControlZones(g){return this.get("/frame/list",{params:g})}async fetchControlZone(g){return this.get(`/frame/${g}`)}createControlZone(g){return this.post("/frame",g)}editControlZone(g,Q){return this.put(`/frame/${g}`,Q)}deleteControlZone(g){return this.delete(`/frame/${g}`)}fetchControlLogs(g){return this.get("/exposed_equipment_zones/list",{params:g})}fetchControllers(g){return this.get("/frame/controllers/list",{params:g})}fetchUsersWithPasses(){return this.get("inspector/users-with-passes")}fetchWarehousesList(){return this.get("tasks/warehouse/list?only_outside_exposed_equipment_zone=1")}manualEntry(g){return this.post("exposed_equipment_zones/hand/enter",g)}manualExit(g){return this.post("exposed_equipment_zones/hand/exit",g)}deleteControlLogs(g){return this.delete("exposed_equipment_zones",g)}}let ew;function fn(){return ew||(ew=new un),ew}function dn(A){const g=B.ref(""),Q=B.ref(1),C=async(I="",e=1)=>{await A.initialize({search:I,page:e})},w=async I=>{g.value=I,Q.value=1,await C(I,Q.value)},E=async I=>{Q.value=I,await C(g.value,I)};return B.watch(()=>A.columnFilters.value,()=>C(g.value,Q.value),{deep:!0}),B.onMounted(()=>C(g.value,Q.value)),{search:g,currentPage:Q,loading:A.loading,handleSearch:w,handlePageChange:E,loadTable:C}}const Jn=A=>{const g=B.ref({}),Q=B.ref({});A.columns.forEach(({name:M,filterType:o})=>{o&&(g.value[M]=o==="multi"?[]:void 0,Q.value[M]=!1)});const C=B.computed(()=>Array.isArray(A.rows)?A.rows:A.rows.value),w=(M,o)=>{const D=A.columns.find(Y=>Y.name===M);if((D==null?void 0:D.filterType)==="multi"){const Y=g.value[M],n=Y.indexOf(o);n>-1?Y.splice(n,1):Y.push(o),g.value[M]=[...Y]}else g.value[M]=o,Q.value[M]=!1},E=B.computed(()=>{var o;const M={};for(const D of A.columns){const Y=g.value[D.name],n=((o=A.filtersOptions)==null?void 0:o.value[D.name])||[];Y&&(M[D.name]=Array.isArray(Y)?n.filter(t=>Y.includes(t.name)).map(t=>t.id):n.filter(t=>t.name===Y).map(t=>t.id))}return M}),I=M=>{const o=A.columns.find(D=>D.name===M);g.value[M]=(o==null?void 0:o.filterType)==="multi"?[]:void 0},e=(M,o)=>{Q.value[M]=o};return{rows:C,columns:B.computed(()=>A.columns),columnFilters:g,filterMenus:Q,toggleFilterValue:w,clearFilter:I,openFilterMenu:e,selectedFilters:E}};function Nn(A,g=[]){const Q=B.ref([...new Set([...g,...A.map(E=>E.name)])]),C=B.computed(()=>A.filter(E=>Q.value.includes(E.name)));function w(E){E.dialog({title:"Выберите колонки",options:{type:"checkbox",model:[...Q.value],items:A.map(I=>({label:I.label,value:I.name,disable:g.includes(I.name)}))},cancel:!0,persistent:!0}).onOk(I=>{Q.value=Array.from(new Set([...I,...g]))})}return{selectedColumnNames:Q,visibleColumns:C,openColumnSelectorDialog:w}}oA.ApiService=GB,oA.AppButton=BQ,oA.AppCheckbox=CD,oA.AppConfirmDialog=ft,oA.AppDatePicker=zD,oA.AppDropdown=vt,oA.AppInput=XD,oA.AppInputSearch=ZD,oA.AppLayout=Bo,oA.AppLayoutHeader=TY,oA.AppLayoutPage=WY,oA.AppLoader=WE,oA.AppModalSelect=II,oA.AppSelect=OY,oA.AppSheet=gt,oA.AppSidebar=Yt,oA.AppTable=aI,oA.AppTableLayout=Sc,oA.AppTableModal=Ot,oA.AppTablePagination=wI,oA.AppTableSearch=EI,oA.AppToggle=tt,oA.AppWrapper=Ft,oA.notificationSettings=eI,oA.useAuthService=hn,oA.useBaseTable=dn,oA.useColumnSelector=Nn,oA.useControlsService=fn,oA.useFileService=Hn,oA.useGanttService=tn,oA.useMetricsService=nn,oA.useProjectsService=sn,oA.useRepairsService=ln,oA.useTableModel=Jn,oA.useTasksService=Un,Object.defineProperty(oA,Symbol.toStringTag,{value:"Module"})});
|
|
7
|
+
`+E):C.stack=E}catch{}}throw C}}_request(g,Q){typeof g=="string"?(Q=Q||{},Q.url=g):Q=g||{},Q=KB(this.defaults,Q);const{transitional:C,paramsSerializer:w,headers:E}=Q;C!==void 0&&dQ.assertOptions(C,{silentJSONParsing:nB.transitional(nB.boolean),forcedJSONParsing:nB.transitional(nB.boolean),clarifyTimeoutError:nB.transitional(nB.boolean)},!1),w!=null&&(z.isFunction(w)?Q.paramsSerializer={serialize:w}:dQ.assertOptions(w,{encode:nB.function,serialize:nB.function},!0)),Q.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?Q.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:Q.allowAbsoluteUrls=!0),dQ.assertOptions(Q,{baseUrl:nB.spelling("baseURL"),withXsrfToken:nB.spelling("withXSRFToken")},!0),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let I=E&&z.merge(E.common,E[Q.method]);E&&z.forEach(["delete","get","head","post","put","patch","common"],i=>{delete E[i]}),Q.headers=gB.concat(I,E);const e=[];let M=!0;this.interceptors.request.forEach(function(s){typeof s.runWhen=="function"&&s.runWhen(Q)===!1||(M=M&&s.synchronous,e.unshift(s.fulfilled,s.rejected))});const o=[];this.interceptors.response.forEach(function(s){o.push(s.fulfilled,s.rejected)});let D,Y=0,n;if(!M){const i=[$I.bind(this),void 0];for(i.unshift.apply(i,e),i.push.apply(i,o),n=i.length,D=Promise.resolve(Q);Y<n;)D=D.then(i[Y++],i[Y++]);return D}n=e.length;let t=Q;for(Y=0;Y<n;){const i=e[Y++],s=e[Y++];try{t=i(t)}catch(c){s.call(this,c);break}}try{D=$I.call(this,t)}catch(i){return Promise.reject(i)}for(Y=0,n=o.length;Y<n;)D=D.then(o[Y++],o[Y++]);return D}getUri(g){g=KB(this.defaults,g);const Q=xI(g.baseURL,g.url,g.allowAbsoluteUrls);return mI(Q,g.params,g.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(g){xB.prototype[g]=function(Q,C){return this.request(KB(C||{},{method:g,url:Q,data:(C||{}).data}))}}),z.forEach(["post","put","patch"],function(g){function Q(C){return function(E,I,e){return this.request(KB(e||{},{method:g,headers:C?{"Content-Type":"multipart/form-data"}:{},url:E,data:I}))}}xB.prototype[g]=Q(),xB.prototype[g+"Form"]=Q(!0)});let Dn=class ee{constructor(g){if(typeof g!="function")throw new TypeError("executor must be a function.");let Q;this.promise=new Promise(function(E){Q=E});const C=this;this.promise.then(w=>{if(!C._listeners)return;let E=C._listeners.length;for(;E-- >0;)C._listeners[E](w);C._listeners=null}),this.promise.then=w=>{let E;const I=new Promise(e=>{C.subscribe(e),E=e}).then(w);return I.cancel=function(){C.unsubscribe(E)},I},g(function(E,I,e){C.reason||(C.reason=new Dg(E,I,e),Q(C.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(g){if(this.reason){g(this.reason);return}this._listeners?this._listeners.push(g):this._listeners=[g]}unsubscribe(g){if(!this._listeners)return;const Q=this._listeners.indexOf(g);Q!==-1&&this._listeners.splice(Q,1)}toAbortSignal(){const g=new AbortController,Q=C=>{g.abort(C)};return this.subscribe(Q),g.signal.unsubscribe=()=>this.unsubscribe(Q),g.signal}static source(){let g;return{token:new ee(function(w){g=w}),cancel:g}}};function on(A){return function(Q){return A.apply(null,Q)}}function Mn(A){return z.isObject(A)&&A.isAxiosError===!0}const Aw={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};Object.entries(Aw).forEach(([A,g])=>{Aw[g]=A});function ge(A){const g=new xB(A),Q=lI(xB.prototype.request,g);return z.extend(Q,xB.prototype,g,{allOwnKeys:!0}),z.extend(Q,g,null,{allOwnKeys:!0}),Q.create=function(w){return ge(KB(A,w))},Q}const mA=ge(Rg);mA.Axios=xB,mA.CanceledError=Dg,mA.CancelToken=Dn,mA.isCancel=yI,mA.VERSION=Ae,mA.toFormData=GQ,mA.AxiosError=cA,mA.Cancel=mA.CanceledError,mA.all=function(g){return Promise.all(g)},mA.spread=on,mA.isAxiosError=Mn,mA.mergeConfig=KB,mA.AxiosHeaders=gB,mA.formToJSON=A=>TI(z.isHTMLForm(A)?new FormData(A):A),mA.getAdapter=_I.getAdapter,mA.HttpStatusCode=Aw,mA.default=mA;const{Axios:Bs,AxiosError:gs,CanceledError:Qs,isCancel:Cs,CancelToken:ws,VERSION:Es,all:Is,Cancel:es,isAxiosError:Ds,spread:os,toFormData:Ms,AxiosHeaders:Ys,HttpStatusCode:ts,formToJSON:cs,getAdapter:is,mergeConfig:ns}=mA;class GB{constructor(){Ie(this,"axiosInstance");this.axiosInstance=mA.create({baseURL:process.env.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"}}),this.axiosInstance.interceptors.request.use(g=>{const Q=this.getToken();return Q&&g.headers&&(g.headers.Authorization=`Bearer ${Q}`),g},g=>Promise.reject(g)),this.axiosInstance.interceptors.response.use(g=>g.data,g=>{var Q,C;return(((Q=g.response)==null?void 0:Q.status)===401||((C=g.response)==null?void 0:C.status)===403)&&this.logout(),Promise.reject(g)})}getToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}logout(){this.removeToken(),window.location.href="/sign-in"}handleError(g){g.response?console.error("API Error:",g.response.status,g.response.data):g.request?console.error("No response received:",g.request):console.error("Error during request setup:",g.message)}async get(g,Q){try{const C=await this.axiosInstance.get(g,Q);return(C==null?void 0:C.data)===!1?!1:(C==null?void 0:C.data)??C}catch(C){const w=C;throw this.handleError(w),C}}async delete(g,Q){try{return await this.axiosInstance.delete(g,Q)}catch(C){const w=C;throw this.handleError(w),C}}async post(g,Q,C){try{const w=await this.axiosInstance.post(g,Q,C);return(w==null?void 0:w.data)===!1?!1:(w==null?void 0:w.data)||w}catch(w){const E=w;throw this.handleError(E),w}}async put(g,Q,C){try{return(await this.axiosInstance.put(g,Q,C)).data}catch(w){const E=w;throw this.handleError(E),w}}}class Yn extends GB{async fetchCriticalPathTasks(g){return await this.get(`gantt/get_list_task_on_critical_path?${g}`)}async fetchGanttList(g){return await this.get(`/list/tasks/search?${g}&gantt=1`)}}let Bw;function tn(){return Bw||(Bw=new Yn),Bw}class cn extends GB{async fetchPieProjects(g){return await this.get("repairs/pie/projects?"+g)}async fetchPieTasks(g){return await this.get("repairs/pie/tasks?"+g)}async fetchPiePersonnel(g){return await this.get("repairs/metrics/get_list_position?"+g)}async fetchPersonnelData(g){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+g)}async fetchPersonnelInfo(g){return await this.get(`repairs/metrics/list_position_intersection_details?${g}`)}async fetchPiePersonnelInfo(g){return await this.get(`repairs/metrics/get_list_user_by_position?${g}`)}async fetchPieCriticalPath(g){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+g)}async fetchPieCriticalPathInfo(g){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${g}`)}async fetchPieTmc(g){return await this.get("repairs/metrics/get_list_instrument_type?"+g)}async fetchPieTmcInfo(g){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${g}`)}async fetchPieUntimelyClosedTask(g){return await this.get("repairs/metrics/get_list_comment_type?"+g)}async fetchPieUntimelyClosedTaskInfo(g){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${g}`)}async fetchPieAdditionalTasks(g){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+g)}async fetchPieAdditionalTasksInfo(g){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${g}`)}async fetchPersonnel(g){return await this.get("repairs/statistic/personnel?"+g)}async fetchPieExpired(g){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+g)}async fetchPieExpiredInfo(g){return await this.get(`repairs/metrics/get_list_task_expired?${g}`)}async fetchEconomicsPerformance(g){return await this.get(`repairs/metrics/get_economic_performance?${g}`)}async fetchEconomicsInfo(g){return await this.get(`repairs/metrics/get_list_task_economic_performance?${g}`)}async fetchQualityMetrics(g){return await this.get(`repairs/metrics/get_quality_metrics?${g}`)}async fetchQualityInfo(g){return await this.get(`repairs/metrics/get_list_task_by_quality?${g}`)}async fetchPieWorkZone(g){return await this.get("repairs/metrics/get_list_work_zone_instrument?"+g)}async fetchWorkZoneInfo(g){return await this.get("repairs/metrics/get_list_work_zone_instrument_by_status?"+g)}async fetchPieAllTasks(g){return await this.get("repairs/metrics/get_list_task_group_by_status?"+g)}async fetchPieAllTasksInfo(g){return await this.get("repairs/metrics/get_list_task_by_status?"+g)}}let gw;function nn(){return gw||(gw=new cn),gw}class Fn extends GB{async fetchProjectById(g){return this.get(`/projects/${g}`)}createProject(g){return this.post("/projects",g)}editProject(g,Q){return this.put(`/projects/${g}`,Q)}fetchProjects(g){return this.get("/search/projects",{params:g})}cloneProject(g){return this.post(`projects/${g.id}/clone`,g)}archiveProject(g,Q){return this.put(`/projects/${g}`,Q)}unArchiveProject(g,Q){return this.put(`/projects/${g}`,Q)}moveAprProject(g){return this.post("repairs/move_plan_to_real",{repairs:[g]})}restoreProject(g){return this.post("/restore_project",{projects_ids:[g]})}importTasks(g){return this.post("tasks/import",g)}importKtd(g){return this.post("/parse_ktd",g,{headers:{"Content-Type":"multipart/form-data"}})}fetchProjectTeamList(g){return this.put(`/projects/${g}`,null)}deleteProject(g){return this.delete(`/projects/${g}`)}}let Qw;function sn(){return Qw||(Qw=new Fn),Qw}class an extends GB{fetchFilters(g){return this.get(`get_list_repair?smart=1&${g}`)}fetchRepairs(g,Q,C,w,E){return this.get("get_list_repair"+(g?`${Q}&per_page=100000${E?"&"+E:""}&${C?"":w}`:`?per_page=100000${E?"&"+E:""}&${w}`))}fetchEquipment(){return this.get("repairs/equipment/list?per_page=100000")}createRepair(g){return this.post("/repairs/equipments",g)}startRepair(g){return this.post(`/repairs/${g}/start`,null)}finishRepair(g){return this.post("/repairs/complete_repair_list",{repairIdList:[g]})}finishPreparationProject(g){return this.post(`/repairs/${g}/finish_preparation`,null)}moveRepairToCurrent(g){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[g]})}moveArchiveToCurrent(g){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[g]})}moveRepairToApr(g){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[g]})}moveRepairToArchive(g){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[g]})}restoreRepair(g){return this.post("/restore_repair",{repairs_ids:[g]})}updateRepair(g,Q){return this.put(`/repairs/${Q}`,g)}copyRepair(g){return this.post(`/repairs/${g}/clone`,null)}deleteRepair(g){return this.delete(`/repairs/${g}`)}}let Cw;function ln(){return Cw||(Cw=new an),Cw}class rn extends GB{async fetchTaskById(g){return await this.get(`/tasks/${g}`)}async fetchTasksList(g){return await this.get("/list/tasks/search",{params:g})}async fetchSubtasksList(g){return await this.get(`/task/${g}/subtasks/list`)}async fetchTaskBranch(g){return await this.get(`/get_list_task_branch?task_id=${g}`)}async fetchInstrumentsList(g){return await this.get("admin/instruments",{params:g})}async fetchInstrumentTypeListWithPreparedWarehouse(g){return await this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:g})}async fetchInstrumentsEquivalentList(g){return await this.get("tasks/instrument/list",{params:g})}async fetchDiffInstruments(g){return await this.get(`tasks/${g.taskId}/fill/module`,{params:g})}async replaceInstruments(g){return await this.post("/instruments/equivalent/attach",g)}async fetchTaskUsagePersonal(g){return await this.get(`tasks/${g.taskId}/usage/users`,{params:g})}async fetchTaskUsageInstrument(g){return await this.get(`tasks/${g.taskId}/usage/instruments`,{params:g})}fetchEquipment(g){return this.get("repairs/equipment/list",{params:g})}fetchTaskVideoSources(g){return this.get("work_zone/get_list_video_source",{params:g})}fetchTaskVideoSourcesStream(g){return this.get("horizon/video-source",{params:g})}createWorkZone(g){return this.post("admin/work-zones",g)}async createTask(g){return await this.post("tasks",g)}async editTask(g){return await this.put(`tasks/${g.taskId}`,g.data)}async mergeTask(g){return await this.post("tasks/merge",g)}async deleteTask(g){return await this.delete(`tasks/${g}`)}async changeStatus(g){const{taskId:Q,data:C}=g;return await this.put(`task/${Q}/change-status`,C)}async uploadComment(g){return await this.post("comments",g)}async deleteComment(g){return await this.delete(`comments/${g}`)}async editComment(g){const{commentId:Q,data:C}=g;return await this.put(`comments/${Q}`,C)}async saveMetrics(g){return await this.put("/update_quality_metrics",g)}async checkReasonForStatus(g){return await this.post("/tasks/check_reason_for_task",g)}async verifyTaskStatus(g){const{task_id:Q,data:C}=g;return await this.get(`/task/${Q}/change-status/verification`,{params:C})}async checkBranchBeforeCloseTask(g){return await this.post("/check_branch_before_close_task",g)}}let ww;function Un(){return ww||(ww=new rn),ww}class Gn extends GB{login(g,Q){return this.post("/login",{email:g,password:Q})}loginPhoto(g){return this.post("/login/from_photo",{photo:g})}logout(){return this.post("/logout",null)}userInfo(){return this.get("/users/auth")}configs(){return this.get("/configs")}changePassword(g,Q,C){return this.put(`/users/${g}/password`,{password:Q,password_confirmation:C})}}let Ew;function hn(){return Ew||(Ew=new Gn),Ew}class Pn extends GB{uploadFile(g){return this.post("/upload-file",g,{headers:{"Content-Type":"multipart/form-data"}})}}let Iw;function Hn(){return Iw||(Iw=new Pn),Iw}class un extends GB{fetchControlZones(g){return this.get("/frame/list",{params:g})}async fetchControlZone(g){return this.get(`/frame/${g}`)}createControlZone(g){return this.post("/frame",g)}editControlZone(g,Q){return this.put(`/frame/${g}`,Q)}deleteControlZone(g){return this.delete(`/frame/${g}`)}fetchControlLogs(g){return this.get("/exposed_equipment_zones/list",{params:g})}fetchControllers(g){return this.get("/frame/controllers/list",{params:g})}fetchUsersWithPasses(){return this.get("inspector/users-with-passes")}fetchWarehousesList(){return this.get("tasks/warehouse/list?only_outside_exposed_equipment_zone=1")}manualEntry(g){return this.post("exposed_equipment_zones/hand/enter",g)}manualExit(g){return this.post("exposed_equipment_zones/hand/exit",g)}deleteControlLogs(g){return this.delete("exposed_equipment_zones",g)}fetchInstrumentTypeList(g){return this.get("search/instrument_types",{params:g})}}let ew;function fn(){return ew||(ew=new un),ew}function dn(A){const g=B.ref(""),Q=B.ref(1),C=async(I="",e=1)=>{await A.initialize({search:I,page:e})},w=async I=>{g.value=I,Q.value=1,await C(I,Q.value)},E=async I=>{Q.value=I,await C(g.value,I)};return B.watch(()=>A.columnFilters.value,()=>C(g.value,Q.value),{deep:!0}),B.onMounted(()=>C(g.value,Q.value)),{search:g,currentPage:Q,loading:A.loading,handleSearch:w,handlePageChange:E,loadTable:C}}const Jn=A=>{const g=B.ref({}),Q=B.ref({});A.columns.forEach(({name:M,filterType:o})=>{o&&(g.value[M]=o==="multi"?[]:void 0,Q.value[M]=!1)});const C=B.computed(()=>Array.isArray(A.rows)?A.rows:A.rows.value),w=(M,o)=>{const D=A.columns.find(Y=>Y.name===M);if((D==null?void 0:D.filterType)==="multi"){const Y=g.value[M],n=Y.indexOf(o);n>-1?Y.splice(n,1):Y.push(o),g.value[M]=[...Y]}else g.value[M]=o,Q.value[M]=!1},E=B.computed(()=>{var o;const M={};for(const D of A.columns){const Y=g.value[D.name],n=((o=A.filtersOptions)==null?void 0:o.value[D.name])||[];Y&&(M[D.name]=Array.isArray(Y)?n.filter(t=>Y.includes(t.name)).map(t=>t.id):n.filter(t=>t.name===Y).map(t=>t.id))}return M}),I=M=>{const o=A.columns.find(D=>D.name===M);g.value[M]=(o==null?void 0:o.filterType)==="multi"?[]:void 0},e=(M,o)=>{Q.value[M]=o};return{rows:C,columns:B.computed(()=>A.columns),columnFilters:g,filterMenus:Q,toggleFilterValue:w,clearFilter:I,openFilterMenu:e,selectedFilters:E}};function Nn(A,g=[]){const Q=B.ref([...new Set([...g,...A.map(E=>E.name)])]),C=B.computed(()=>A.filter(E=>Q.value.includes(E.name)));function w(E){E.dialog({title:"Выберите колонки",options:{type:"checkbox",model:[...Q.value],items:A.map(I=>({label:I.label,value:I.name,disable:g.includes(I.name)}))},cancel:!0,persistent:!0}).onOk(I=>{Q.value=Array.from(new Set([...I,...g]))})}return{selectedColumnNames:Q,visibleColumns:C,openColumnSelectorDialog:w}}oA.ApiService=GB,oA.AppButton=BQ,oA.AppCheckbox=CD,oA.AppConfirmDialog=ft,oA.AppDatePicker=zD,oA.AppDropdown=vt,oA.AppInput=XD,oA.AppInputSearch=ZD,oA.AppLayout=Bo,oA.AppLayoutHeader=TY,oA.AppLayoutPage=WY,oA.AppLoader=WE,oA.AppModalSelect=II,oA.AppSelect=OY,oA.AppSheet=gt,oA.AppSidebar=Yt,oA.AppTable=aI,oA.AppTableLayout=Sc,oA.AppTableModal=Ot,oA.AppTablePagination=wI,oA.AppTableSearch=EI,oA.AppToggle=tt,oA.AppWrapper=Ft,oA.notificationSettings=eI,oA.useAuthService=hn,oA.useBaseTable=dn,oA.useColumnSelector=Nn,oA.useControlsService=fn,oA.useFileService=Hn,oA.useGanttService=tn,oA.useMetricsService=nn,oA.useProjectsService=sn,oA.useRepairsService=ln,oA.useTableModel=Jn,oA.useTasksService=Un,Object.defineProperty(oA,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -13,6 +13,7 @@ declare class ControlsService extends ApiService {
|
|
|
13
13
|
manualEntry(params: any): Promise<ResponseApi<any>>;
|
|
14
14
|
manualExit(params: any): Promise<ResponseApi<any>>;
|
|
15
15
|
deleteControlLogs(params: any): Promise<any>;
|
|
16
|
+
fetchInstrumentTypeList(params: any): Promise<any>;
|
|
16
17
|
}
|
|
17
18
|
export default function useControlsService(): ControlsService;
|
|
18
19
|
export {};
|
package/package.json
CHANGED
|
@@ -50,6 +50,10 @@ class ControlsService extends ApiService {
|
|
|
50
50
|
public deleteControlLogs(params: any): Promise<any> {
|
|
51
51
|
return this.delete<ResponseApi<any>>(`exposed_equipment_zones`, params)
|
|
52
52
|
}
|
|
53
|
+
|
|
54
|
+
public fetchInstrumentTypeList(params: any): Promise<any> {
|
|
55
|
+
return this.get<ResponseApi<any>>(`search/instrument_types`, { params })
|
|
56
|
+
}
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
let api: ControlsService
|