bms-shared-components 1.1.7 → 1.1.11
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.
|
@@ -12,6 +12,7 @@ declare module "bms-shared-components" {
|
|
|
12
12
|
export const NewBenefitList: Component;
|
|
13
13
|
export const BenefitForm: Component;
|
|
14
14
|
export const ApplicationForm: Component;
|
|
15
|
+
export const ApiUseBenefit: Component;
|
|
15
16
|
export const ScanWriteOffMedicalDevicesFormMDLP: Component;
|
|
16
17
|
export const IsOkay: Component;
|
|
17
18
|
export const TableAccordion: Component;
|
|
@@ -144559,7 +144559,7 @@ function createBmsComponentsPlugin(e = {}) {
|
|
|
144559
144559
|
};
|
|
144560
144560
|
}
|
|
144561
144561
|
function install(e, I = {}) {
|
|
144562
|
-
I.pinia && providePinia(e, I.pinia), e.component("FullLoader", FullLoader), e.component("ConstructorReportsQueue", _sfc_main$O), e.component("ConstructorReports", _sfc_main$G), e.component("PatientInfoComponent", _sfc_main$m), e.component("NewBenefitList", _sfc_main$s), e.component("BenefitForm", _sfc_main$v), e.component("ApplicationForm", _sfc_main$p), e.component("ScanWriteOffMedicalDevicesFormMDLP", _sfc_main$f), e.component("IsOkay", _sfc_main$e), e.component("TableAccordion", TableAccordion), I.axiosInstance ? Promise.resolve().then(() => axiosSetup).then(({ setupAxios: N }) => {
|
|
144562
|
+
I.pinia && providePinia(e, I.pinia), e.component("FullLoader", FullLoader), e.component("ConstructorReportsQueue", _sfc_main$O), e.component("ConstructorReports", _sfc_main$G), e.component("PatientInfoComponent", _sfc_main$m), e.component("NewBenefitList", _sfc_main$s), e.component("BenefitForm", _sfc_main$v), e.component("ApplicationForm", _sfc_main$p), e.component("ApiUseBenefit", useBenefit), e.component("ScanWriteOffMedicalDevicesFormMDLP", _sfc_main$f), e.component("IsOkay", _sfc_main$e), e.component("TableAccordion", TableAccordion), I.axiosInstance ? Promise.resolve().then(() => axiosSetup).then(({ setupAxios: N }) => {
|
|
144563
144563
|
N(I.axiosInstance);
|
|
144564
144564
|
}) : I.axiosConfig && Promise.all([import("./index-B_94eI3S.js"), Promise.resolve().then(() => axiosSetup)]).then(([N, { setupAxios: J }]) => {
|
|
144565
144565
|
J(N.default.create(I.axiosConfig));
|
|
@@ -144572,6 +144572,7 @@ const index = {
|
|
|
144572
144572
|
};
|
|
144573
144573
|
typeof window < "u" && window.Vue && window.Vue.use({ install });
|
|
144574
144574
|
export {
|
|
144575
|
+
useBenefit as ApiUseBenefit,
|
|
144575
144576
|
_sfc_main$p as ApplicationForm,
|
|
144576
144577
|
_sfc_main$v as BenefitForm,
|
|
144577
144578
|
_sfc_main$G as ConstructorReports,
|
|
@@ -1457,4 +1457,4 @@ EOD`}return{to_workbook:J,to_sheet:N,from_sheet:vt}}(),ETH=function(){function e
|
|
|
1457
1457
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(I){return I instanceof this?I:new this(I)}static concat(I,...N){const J=new this(I);return N.forEach(V=>J.set(V)),J}static accessor(I){const J=(this[$internals]=this[$internals]={accessors:{}}).accessors,V=this.prototype;function M(vt){const yt=normalizeHeader(vt);J[yt]||(buildAccessors(V,vt),J[yt]=!0)}return utils$1.isArray(I)?I.forEach(M):M(I),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},I)=>{let N=I[0].toUpperCase()+I.slice(1);return{get:()=>e,set(J){this[N]=J}}}),utils$1.freezeMethods(AxiosHeaders$1);function transformData(e,I){const N=this||defaults,J=I||N,V=AxiosHeaders$1.from(J.headers);let M=J.data;return utils$1.forEach(e,function(yt){M=yt.call(N,M,V.normalize(),I?I.status:void 0)}),V.normalize(),M}function isCancel$1(e){return!!(e&&e.__CANCEL__)}function CanceledError$1(e,I,N){AxiosError$1.call(this,e??"canceled",AxiosError$1.ERR_CANCELED,I,N),this.name="CanceledError"}utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(e,I,N){const J=N.config.validateStatus;!N.status||!J||J(N.status)?e(N):I(new AxiosError$1("Request failed with status code "+N.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(N.status/100)-4],N.config,N.request,N))}function parseProtocol(e){const I=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return I&&I[1]||""}function speedometer(e,I){e=e||10;const N=new Array(e),J=new Array(e);let V=0,M=0,vt;return I=I!==void 0?I:1e3,function(At){const Dt=Date.now(),Ft=J[M];vt||(vt=Dt),N[V]=At,J[V]=Dt;let Pt=M,Rt=0;for(;Pt!==V;)Rt+=N[Pt++],Pt=Pt%e;if(V=(V+1)%e,V===M&&(M=(M+1)%e),Dt-vt<I)return;const $t=Ft&&Dt-Ft;return $t?Math.round(Rt*1e3/$t):void 0}}function throttle(e,I){let N=0,J=1e3/I,V,M;const vt=(Dt,Ft=Date.now())=>{N=Ft,V=null,M&&(clearTimeout(M),M=null),e(...Dt)};return[(...Dt)=>{const Ft=Date.now(),Pt=Ft-N;Pt>=J?vt(Dt,Ft):(V=Dt,M||(M=setTimeout(()=>{M=null,vt(V)},J-Pt)))},()=>V&&vt(V)]}const progressEventReducer=(e,I,N=3)=>{let J=0;const V=speedometer(50,250);return throttle(M=>{const vt=M.loaded,yt=M.lengthComputable?M.total:void 0,At=vt-J,Dt=V(At),Ft=vt<=yt;J=vt;const Pt={loaded:vt,total:yt,progress:yt?vt/yt:void 0,bytes:At,rate:Dt||void 0,estimated:Dt&&yt&&Ft?(yt-vt)/Dt:void 0,event:M,lengthComputable:yt!=null,[I?"download":"upload"]:!0};e(Pt)},N)},progressEventDecorator=(e,I)=>{const N=e!=null;return[J=>I[0]({lengthComputable:N,total:e,loaded:J}),I[1]]},asyncDecorator=e=>(...I)=>utils$1.asap(()=>e(...I)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,I)=>N=>(N=new URL(N,platform.origin),e.protocol===N.protocol&&e.host===N.host&&(I||e.port===N.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,I,N,J,V,M,vt){if(typeof document>"u")return;const yt=[`${e}=${encodeURIComponent(I)}`];utils$1.isNumber(N)&&yt.push(`expires=${new Date(N).toUTCString()}`),utils$1.isString(J)&&yt.push(`path=${J}`),utils$1.isString(V)&&yt.push(`domain=${V}`),M===!0&&yt.push("secure"),utils$1.isString(vt)&&yt.push(`SameSite=${vt}`),document.cookie=yt.join("; ")},read(e){if(typeof document>"u")return null;const I=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return I?decodeURIComponent(I[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,I){return I?e.replace(/\/?\/$/,"")+"/"+I.replace(/^\/+/,""):e}function buildFullPath(e,I,N){let J=!isAbsoluteURL(I);return e&&(J||N==!1)?combineURLs(e,I):I}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,I){I=I||{};const N={};function J(Dt,Ft,Pt,Rt){return utils$1.isPlainObject(Dt)&&utils$1.isPlainObject(Ft)?utils$1.merge.call({caseless:Rt},Dt,Ft):utils$1.isPlainObject(Ft)?utils$1.merge({},Ft):utils$1.isArray(Ft)?Ft.slice():Ft}function V(Dt,Ft,Pt,Rt){if(utils$1.isUndefined(Ft)){if(!utils$1.isUndefined(Dt))return J(void 0,Dt,Pt,Rt)}else return J(Dt,Ft,Pt,Rt)}function M(Dt,Ft){if(!utils$1.isUndefined(Ft))return J(void 0,Ft)}function vt(Dt,Ft){if(utils$1.isUndefined(Ft)){if(!utils$1.isUndefined(Dt))return J(void 0,Dt)}else return J(void 0,Ft)}function yt(Dt,Ft,Pt){if(Pt in I)return J(Dt,Ft);if(Pt in e)return J(void 0,Dt)}const At={url:M,method:M,data:M,baseURL:vt,transformRequest:vt,transformResponse:vt,paramsSerializer:vt,timeout:vt,timeoutMessage:vt,withCredentials:vt,withXSRFToken:vt,adapter:vt,responseType:vt,xsrfCookieName:vt,xsrfHeaderName:vt,onUploadProgress:vt,onDownloadProgress:vt,decompress:vt,maxContentLength:vt,maxBodyLength:vt,beforeRedirect:vt,transport:vt,httpAgent:vt,httpsAgent:vt,cancelToken:vt,socketPath:vt,responseEncoding:vt,validateStatus:yt,headers:(Dt,Ft,Pt)=>V(headersToObject(Dt),headersToObject(Ft),Pt,!0)};return utils$1.forEach(Object.keys({...e,...I}),function(Ft){const Pt=At[Ft]||V,Rt=Pt(e[Ft],I[Ft],Ft);utils$1.isUndefined(Rt)&&Pt!==yt||(N[Ft]=Rt)}),N}const resolveConfig=e=>{const I=mergeConfig$1({},e);let{data:N,withXSRFToken:J,xsrfHeaderName:V,xsrfCookieName:M,headers:vt,auth:yt}=I;if(I.headers=vt=AxiosHeaders$1.from(vt),I.url=buildURL(buildFullPath(I.baseURL,I.url,I.allowAbsoluteUrls),e.params,e.paramsSerializer),yt&&vt.set("Authorization","Basic "+btoa((yt.username||"")+":"+(yt.password?unescape(encodeURIComponent(yt.password)):""))),utils$1.isFormData(N)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)vt.setContentType(void 0);else if(utils$1.isFunction(N.getHeaders)){const At=N.getHeaders(),Dt=["content-type","content-length"];Object.entries(At).forEach(([Ft,Pt])=>{Dt.includes(Ft.toLowerCase())&&vt.set(Ft,Pt)})}}if(platform.hasStandardBrowserEnv&&(J&&utils$1.isFunction(J)&&(J=J(I)),J||J!==!1&&isURLSameOrigin(I.url))){const At=V&&M&&cookies.read(M);At&&vt.set(V,At)}return I},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(N,J){const V=resolveConfig(e);let M=V.data;const vt=AxiosHeaders$1.from(V.headers).normalize();let{responseType:yt,onUploadProgress:At,onDownloadProgress:Dt}=V,Ft,Pt,Rt,$t,Gt;function Vt(){$t&&$t(),Gt&&Gt(),V.cancelToken&&V.cancelToken.unsubscribe(Ft),V.signal&&V.signal.removeEventListener("abort",Ft)}let Ht=new XMLHttpRequest;Ht.open(V.method.toUpperCase(),V.url,!0),Ht.timeout=V.timeout;function Wt(){if(!Ht)return;const Xt=AxiosHeaders$1.from("getAllResponseHeaders"in Ht&&Ht.getAllResponseHeaders()),un={data:!yt||yt==="text"||yt==="json"?Ht.responseText:Ht.response,status:Ht.status,statusText:Ht.statusText,headers:Xt,config:e,request:Ht};settle(function(on){N(on),Vt()},function(on){J(on),Vt()},un),Ht=null}"onloadend"in Ht?Ht.onloadend=Wt:Ht.onreadystatechange=function(){!Ht||Ht.readyState!==4||Ht.status===0&&!(Ht.responseURL&&Ht.responseURL.indexOf("file:")===0)||setTimeout(Wt)},Ht.onabort=function(){Ht&&(J(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,Ht)),Ht=null)},Ht.onerror=function(ln){const un=ln&&ln.message?ln.message:"Network Error",yn=new AxiosError$1(un,AxiosError$1.ERR_NETWORK,e,Ht);yn.event=ln||null,J(yn),Ht=null},Ht.ontimeout=function(){let ln=V.timeout?"timeout of "+V.timeout+"ms exceeded":"timeout exceeded";const un=V.transitional||transitionalDefaults;V.timeoutErrorMessage&&(ln=V.timeoutErrorMessage),J(new AxiosError$1(ln,un.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,Ht)),Ht=null},M===void 0&&vt.setContentType(null),"setRequestHeader"in Ht&&utils$1.forEach(vt.toJSON(),function(ln,un){Ht.setRequestHeader(un,ln)}),utils$1.isUndefined(V.withCredentials)||(Ht.withCredentials=!!V.withCredentials),yt&&yt!=="json"&&(Ht.responseType=V.responseType),Dt&&([Rt,Gt]=progressEventReducer(Dt,!0),Ht.addEventListener("progress",Rt)),At&&Ht.upload&&([Pt,$t]=progressEventReducer(At),Ht.upload.addEventListener("progress",Pt),Ht.upload.addEventListener("loadend",$t)),(V.cancelToken||V.signal)&&(Ft=Xt=>{Ht&&(J(!Xt||Xt.type?new CanceledError$1(null,e,Ht):Xt),Ht.abort(),Ht=null)},V.cancelToken&&V.cancelToken.subscribe(Ft),V.signal&&(V.signal.aborted?Ft():V.signal.addEventListener("abort",Ft)));const Kt=parseProtocol(V.url);if(Kt&&platform.protocols.indexOf(Kt)===-1){J(new AxiosError$1("Unsupported protocol "+Kt+":",AxiosError$1.ERR_BAD_REQUEST,e));return}Ht.send(M||null)})},composeSignals=(e,I)=>{const{length:N}=e=e?e.filter(Boolean):[];if(I||N){let J=new AbortController,V;const M=function(Dt){if(!V){V=!0,yt();const Ft=Dt instanceof Error?Dt:this.reason;J.abort(Ft instanceof AxiosError$1?Ft:new CanceledError$1(Ft instanceof Error?Ft.message:Ft))}};let vt=I&&setTimeout(()=>{vt=null,M(new AxiosError$1(`timeout ${I} of ms exceeded`,AxiosError$1.ETIMEDOUT))},I);const yt=()=>{e&&(vt&&clearTimeout(vt),vt=null,e.forEach(Dt=>{Dt.unsubscribe?Dt.unsubscribe(M):Dt.removeEventListener("abort",M)}),e=null)};e.forEach(Dt=>Dt.addEventListener("abort",M));const{signal:At}=J;return At.unsubscribe=()=>utils$1.asap(yt),At}},streamChunk=function*(e,I){let N=e.byteLength;if(N<I){yield e;return}let J=0,V;for(;J<N;)V=J+I,yield e.slice(J,V),J=V},readBytes=async function*(e,I){for await(const N of readStream(e))yield*streamChunk(N,I)},readStream=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const I=e.getReader();try{for(;;){const{done:N,value:J}=await I.read();if(N)break;yield J}}finally{await I.cancel()}},trackStream=(e,I,N,J)=>{const V=readBytes(e,I);let M=0,vt,yt=At=>{vt||(vt=!0,J&&J(At))};return new ReadableStream({async pull(At){try{const{done:Dt,value:Ft}=await V.next();if(Dt){yt(),At.close();return}let Pt=Ft.byteLength;if(N){let Rt=M+=Pt;N(Rt)}At.enqueue(new Uint8Array(Ft))}catch(Dt){throw yt(Dt),Dt}},cancel(At){return yt(At),V.return()}},{highWaterMark:2})},DEFAULT_CHUNK_SIZE=64*1024,{isFunction}=utils$1,globalFetchAPI=(({Request:e,Response:I})=>({Request:e,Response:I}))(utils$1.global),{ReadableStream:ReadableStream$1,TextEncoder:TextEncoder$1}=utils$1.global,test=(e,...I)=>{try{return!!e(...I)}catch{return!1}},factory=e=>{e=utils$1.merge.call({skipUndefined:!0},globalFetchAPI,e);const{fetch:I,Request:N,Response:J}=e,V=I?isFunction(I):typeof fetch=="function",M=isFunction(N),vt=isFunction(J);if(!V)return!1;const yt=V&&isFunction(ReadableStream$1),At=V&&(typeof TextEncoder$1=="function"?(Gt=>Vt=>Gt.encode(Vt))(new TextEncoder$1):async Gt=>new Uint8Array(await new N(Gt).arrayBuffer())),Dt=M&&yt&&test(()=>{let Gt=!1;const Vt=new N(platform.origin,{body:new ReadableStream$1,method:"POST",get duplex(){return Gt=!0,"half"}}).headers.has("Content-Type");return Gt&&!Vt}),Ft=vt&&yt&&test(()=>utils$1.isReadableStream(new J("").body)),Pt={stream:Ft&&(Gt=>Gt.body)};V&&["text","arrayBuffer","blob","formData","stream"].forEach(Gt=>{!Pt[Gt]&&(Pt[Gt]=(Vt,Ht)=>{let Wt=Vt&&Vt[Gt];if(Wt)return Wt.call(Vt);throw new AxiosError$1(`Response type '${Gt}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,Ht)})});const Rt=async Gt=>{if(Gt==null)return 0;if(utils$1.isBlob(Gt))return Gt.size;if(utils$1.isSpecCompliantForm(Gt))return(await new N(platform.origin,{method:"POST",body:Gt}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(Gt)||utils$1.isArrayBuffer(Gt))return Gt.byteLength;if(utils$1.isURLSearchParams(Gt)&&(Gt=Gt+""),utils$1.isString(Gt))return(await At(Gt)).byteLength},$t=async(Gt,Vt)=>{const Ht=utils$1.toFiniteNumber(Gt.getContentLength());return Ht??Rt(Vt)};return async Gt=>{let{url:Vt,method:Ht,data:Wt,signal:Kt,cancelToken:Xt,timeout:ln,onDownloadProgress:un,onUploadProgress:yn,responseType:on,headers:Tn,withCredentials:vn="same-origin",fetchOptions:xn}=resolveConfig(Gt),bn=I||fetch;on=on?(on+"").toLowerCase():"text";let _n=composeSignals([Kt,Xt&&Xt.toAbortSignal()],ln),Er=null;const lr=_n&&_n.unsubscribe&&(()=>{_n.unsubscribe()});let ar;try{if(yn&&Dt&&Ht!=="get"&&Ht!=="head"&&(ar=await $t(Tn,Wt))!==0){let gn=new N(Vt,{method:"POST",body:Wt,duplex:"half"}),Vn;if(utils$1.isFormData(Wt)&&(Vn=gn.headers.get("content-type"))&&Tn.setContentType(Vn),gn.body){const[Bn,or]=progressEventDecorator(ar,progressEventReducer(asyncDecorator(yn)));Wt=trackStream(gn.body,DEFAULT_CHUNK_SIZE,Bn,or)}}utils$1.isString(vn)||(vn=vn?"include":"omit");const Qt=M&&"credentials"in N.prototype,Hn={...xn,signal:_n,method:Ht.toUpperCase(),headers:Tn.normalize().toJSON(),body:Wt,duplex:"half",credentials:Qt?vn:void 0};Er=M&&new N(Vt,Hn);let Ln=await(M?bn(Er,xn):bn(Vt,Hn));const dr=Ft&&(on==="stream"||on==="response");if(Ft&&(un||dr&&lr)){const gn={};["status","statusText","headers"].forEach(pr=>{gn[pr]=Ln[pr]});const Vn=utils$1.toFiniteNumber(Ln.headers.get("content-length")),[Bn,or]=un&&progressEventDecorator(Vn,progressEventReducer(asyncDecorator(un),!0))||[];Ln=new J(trackStream(Ln.body,DEFAULT_CHUNK_SIZE,Bn,()=>{or&&or(),lr&&lr()}),gn)}on=on||"text";let Nn=await Pt[utils$1.findKey(Pt,on)||"text"](Ln,Gt);return!dr&&lr&&lr(),await new Promise((gn,Vn)=>{settle(gn,Vn,{data:Nn,headers:AxiosHeaders$1.from(Ln.headers),status:Ln.status,statusText:Ln.statusText,config:Gt,request:Er})})}catch(Qt){throw lr&&lr(),Qt&&Qt.name==="TypeError"&&/Load failed|fetch/i.test(Qt.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,Gt,Er),{cause:Qt.cause||Qt}):AxiosError$1.from(Qt,Qt&&Qt.code,Gt,Er)}}},seedCache=new Map,getFetch=e=>{let I=e&&e.env||{};const{fetch:N,Request:J,Response:V}=I,M=[J,V,N];let vt=M.length,yt=vt,At,Dt,Ft=seedCache;for(;yt--;)At=M[yt],Dt=Ft.get(At),Dt===void 0&&Ft.set(At,Dt=yt?new Map:factory(I)),Ft=Dt;return Dt};getFetch();const knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:{get:getFetch}};utils$1.forEach(knownAdapters,(e,I)=>{if(e){try{Object.defineProperty(e,"name",{value:I})}catch{}Object.defineProperty(e,"adapterName",{value:I})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||e===null||e===!1;function getAdapter$1(e,I){e=utils$1.isArray(e)?e:[e];const{length:N}=e;let J,V;const M={};for(let vt=0;vt<N;vt++){J=e[vt];let yt;if(V=J,!isResolvedHandle(J)&&(V=knownAdapters[(yt=String(J)).toLowerCase()],V===void 0))throw new AxiosError$1(`Unknown adapter '${yt}'`);if(V&&(utils$1.isFunction(V)||(V=V.get(I))))break;M[yt||"#"+vt]=V}if(!V){const vt=Object.entries(M).map(([At,Dt])=>`adapter ${At} `+(Dt===!1?"is not supported by the environment":"is not available in the build"));let yt=N?vt.length>1?`since :
|
|
1458
1458
|
`+vt.map(renderReason).join(`
|
|
1459
1459
|
`):" "+renderReason(vt[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+yt,"ERR_NOT_SUPPORT")}return V}const adapters={getAdapter:getAdapter$1,adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults.adapter,e)(e).then(function(J){return throwIfCancellationRequested(e),J.data=transformData.call(e,e.transformResponse,J),J.headers=AxiosHeaders$1.from(J.headers),J},function(J){return isCancel$1(J)||(throwIfCancellationRequested(e),J&&J.response&&(J.response.data=transformData.call(e,e.transformResponse,J.response),J.response.headers=AxiosHeaders$1.from(J.response.headers))),Promise.reject(J)})}const VERSION$1="1.13.2",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,I)=>{validators$1[e]=function(J){return typeof J===e||"a"+(I<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function e(I,N,J){function V(M,vt){return"[Axios v"+VERSION$1+"] Transitional option '"+M+"'"+vt+(J?". "+J:"")}return(M,vt,yt)=>{if(I===!1)throw new AxiosError$1(V(vt," has been removed"+(N?" in "+N:"")),AxiosError$1.ERR_DEPRECATED);return N&&!deprecatedWarnings[vt]&&(deprecatedWarnings[vt]=!0,console.warn(V(vt," has been deprecated since v"+N+" and will be removed in the near future"))),I?I(M,vt,yt):!0}},validators$1.spelling=function e(I){return(N,J)=>(console.warn(`${J} is likely a misspelling of ${I}`),!0)};function assertOptions(e,I,N){if(typeof e!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const J=Object.keys(e);let V=J.length;for(;V-- >0;){const M=J[V],vt=I[M];if(vt){const yt=e[M],At=yt===void 0||vt(yt,M,e);if(At!==!0)throw new AxiosError$1("option "+M+" must be "+At,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(N!==!0)throw new AxiosError$1("Unknown option "+M,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(I){this.defaults=I||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(I,N){try{return await this._request(I,N)}catch(J){if(J instanceof Error){let V={};Error.captureStackTrace?Error.captureStackTrace(V):V=new Error;const M=V.stack?V.stack.replace(/^.+\n/,""):"";try{J.stack?M&&!String(J.stack).endsWith(M.replace(/^.+\n.+\n/,""))&&(J.stack+=`
|
|
1460
|
-
`+M):J.stack=M}catch{}}throw J}}_request(I,N){typeof I=="string"?(N=N||{},N.url=I):N=I||{},N=mergeConfig$1(this.defaults,N);const{transitional:J,paramsSerializer:V,headers:M}=N;J!==void 0&&validator.assertOptions(J,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),V!=null&&(utils$1.isFunction(V)?N.paramsSerializer={serialize:V}:validator.assertOptions(V,{encode:validators.function,serialize:validators.function},!0)),N.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?N.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:N.allowAbsoluteUrls=!0),validator.assertOptions(N,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),N.method=(N.method||this.defaults.method||"get").toLowerCase();let vt=M&&utils$1.merge(M.common,M[N.method]);M&&utils$1.forEach(["delete","get","head","post","put","patch","common"],Gt=>{delete M[Gt]}),N.headers=AxiosHeaders$1.concat(vt,M);const yt=[];let At=!0;this.interceptors.request.forEach(function(Vt){typeof Vt.runWhen=="function"&&Vt.runWhen(N)===!1||(At=At&&Vt.synchronous,yt.unshift(Vt.fulfilled,Vt.rejected))});const Dt=[];this.interceptors.response.forEach(function(Vt){Dt.push(Vt.fulfilled,Vt.rejected)});let Ft,Pt=0,Rt;if(!At){const Gt=[dispatchRequest.bind(this),void 0];for(Gt.unshift(...yt),Gt.push(...Dt),Rt=Gt.length,Ft=Promise.resolve(N);Pt<Rt;)Ft=Ft.then(Gt[Pt++],Gt[Pt++]);return Ft}Rt=yt.length;let $t=N;for(;Pt<Rt;){const Gt=yt[Pt++],Vt=yt[Pt++];try{$t=Gt($t)}catch(Ht){Vt.call(this,Ht);break}}try{Ft=dispatchRequest.call(this,$t)}catch(Gt){return Promise.reject(Gt)}for(Pt=0,Rt=Dt.length;Pt<Rt;)Ft=Ft.then(Dt[Pt++],Dt[Pt++]);return Ft}getUri(I){I=mergeConfig$1(this.defaults,I);const N=buildFullPath(I.baseURL,I.url,I.allowAbsoluteUrls);return buildURL(N,I.params,I.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function e(I){Axios$1.prototype[I]=function(N,J){return this.request(mergeConfig$1(J||{},{method:I,url:N,data:(J||{}).data}))}}),utils$1.forEach(["post","put","patch"],function e(I){function N(J){return function(M,vt,yt){return this.request(mergeConfig$1(yt||{},{method:I,headers:J?{"Content-Type":"multipart/form-data"}:{},url:M,data:vt}))}}Axios$1.prototype[I]=N(),Axios$1.prototype[I+"Form"]=N(!0)});let CancelToken$1=class txe{constructor(I){if(typeof I!="function")throw new TypeError("executor must be a function.");let N;this.promise=new Promise(function(M){N=M});const J=this;this.promise.then(V=>{if(!J._listeners)return;let M=J._listeners.length;for(;M-- >0;)J._listeners[M](V);J._listeners=null}),this.promise.then=V=>{let M;const vt=new Promise(yt=>{J.subscribe(yt),M=yt}).then(V);return vt.cancel=function(){J.unsubscribe(M)},vt},I(function(M,vt,yt){J.reason||(J.reason=new CanceledError$1(M,vt,yt),N(J.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(I){if(this.reason){I(this.reason);return}this._listeners?this._listeners.push(I):this._listeners=[I]}unsubscribe(I){if(!this._listeners)return;const N=this._listeners.indexOf(I);N!==-1&&this._listeners.splice(N,1)}toAbortSignal(){const I=new AbortController,N=J=>{I.abort(J)};return this.subscribe(N),I.signal.unsubscribe=()=>this.unsubscribe(N),I.signal}static source(){let I;return{token:new txe(function(V){I=V}),cancel:I}}};function spread$1(e){return function(N){return e.apply(null,N)}}function isAxiosError$1(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode$1={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(HttpStatusCode$1).forEach(([e,I])=>{HttpStatusCode$1[I]=e});function createInstance(e){const I=new Axios$1(e),N=bind(Axios$1.prototype.request,I);return utils$1.extend(N,Axios$1.prototype,I,{allOwnKeys:!0}),utils$1.extend(N,I,null,{allOwnKeys:!0}),N.create=function(V){return createInstance(mergeConfig$1(e,V))},N}const axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function e(I){return Promise.all(I)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios,index$1=Object.freeze(Object.defineProperty({__proto__:null,Axios,AxiosError,AxiosHeaders,Cancel,CancelToken,CanceledError,HttpStatusCode,VERSION,all,default:axios,formToJSON,getAdapter,isAxiosError,isCancel,mergeConfig,spread,toFormData},Symbol.toStringTag,{value:"Module"}));let axiosInstance=null,axiosConfig={baseURL:"",timeout:3e4,headers:{"Content-Type":"application/json"}};function setupAxios(e){if(!e||typeof e.request!="function")throw new Error("setupAxios требует готовый axios instance. Используйте: axios.create(config)");return axiosInstance=e,axiosConfig={baseURL:e.defaults?.baseURL??"",timeout:e.defaults?.timeout??3e4,headers:e.defaults?.headers?.common??{}},typeof window<"u"&&(window.axios=axiosInstance,window.localhost=e.defaults?.baseURL??"",window.localhost=window.localhost.at(-1)==="/"?window.localhost:window.localhost+"/"),axiosInstance}function getAxiosInstance(){if(!axiosInstance)throw new Error("Axios не инициализирован. Вызовите setupAxios() перед использованием компонентов.");return axiosInstance}function updateToken(e){if(!axiosInstance)throw new Error("Axios не инициализирован");e?axiosInstance.defaults.headers.common.Authorization=`Bearer ${e}`:delete axiosInstance.defaults.headers.common.Authorization}function updateAxiosConfig(e){if(!axiosInstance)throw new Error("Axios не инициализирован");e.baseURL&&(axiosInstance.defaults.baseURL=e.baseURL),e.headers&&(axiosInstance.defaults.headers.common||(axiosInstance.defaults.headers.common={}),axiosInstance.defaults.headers.common={...axiosInstance.defaults.headers.common,...e.headers}),e.timeout&&(axiosInstance.defaults.timeout=e.timeout)}function getAxiosConfig(){return axiosInstance?{baseURL:axiosInstance.defaults.baseURL,timeout:axiosInstance.defaults.timeout,headers:axiosInstance.defaults.headers.common||{}}:axiosConfig}const axiosSetup=Object.freeze(Object.defineProperty({__proto__:null,getAxiosConfig,getAxiosInstance,setupAxios,updateAxiosConfig,updateToken},Symbol.toStringTag,{value:"Module"})),useStockStoreImpl=defineStore("stock",{state:()=>({stock:null}),getters:{hasStock:e=>e.stock!=null,stockId:e=>e.stock?.Id??null},actions:{setStock(e){this.stock=e},clearStock(){this.stock=null}}});function useStockStore(e,I){return useStockStoreImpl(e??usePinia(),I)}function createBmsComponentsPlugin(e={}){return{install(I){e.pinia&&providePinia(I,e.pinia),e.axiosInstance&&setupAxios(e.axiosInstance),I.config.globalProperties.$setupAxios=setupAxios,I.config.globalProperties.$updateAxiosToken=N=>{updateToken(N)}}}}function install(e,I={}){I.pinia&&providePinia(e,I.pinia),e.component("FullLoader",FullLoader),e.component("ConstructorReportsQueue",_sfc_main$O),e.component("ConstructorReports",_sfc_main$G),e.component("PatientInfoComponent",_sfc_main$m),e.component("NewBenefitList",_sfc_main$s),e.component("BenefitForm",_sfc_main$v),e.component("ApplicationForm",_sfc_main$p),e.component("ScanWriteOffMedicalDevicesFormMDLP",_sfc_main$f),e.component("IsOkay",_sfc_main$e),e.component("TableAccordion",TableAccordion),I.axiosInstance?Promise.resolve().then(()=>axiosSetup).then(({setupAxios:N})=>{N(I.axiosInstance)}):I.axiosConfig&&Promise.all([Promise.resolve().then(()=>index$1),Promise.resolve().then(()=>axiosSetup)]).then(([N,{setupAxios:J}])=>{J(N.default.create(I.axiosConfig))}),I.apiConfig&&Promise.resolve().then(()=>api).then(({configureApi:N})=>{N(I.apiConfig)})}const index={install};typeof window<"u"&&window.Vue&&window.Vue.use({install}),exports.ApplicationForm=_sfc_main$p,exports.BenefitForm=_sfc_main$v,exports.ConstructorReports=_sfc_main$G,exports.ConstructorReportsQueue=_sfc_main$O,exports.FullLoader=FullLoader,exports.IsOkay=_sfc_main$e,exports.NewBenefitList=_sfc_main$s,exports.PINIA_KEY=PINIA_KEY,exports.PatientInfoComponent=_sfc_main$m,exports.ScanWriteOffMedicalDevicesFormMDLP=_sfc_main$f,exports.TableAccordion=TableAccordion,exports.configureApi=configureApi,exports.createBmsComponentsPlugin=createBmsComponentsPlugin,exports.default=index,exports.getApiConfig=getApiConfig,exports.getAxiosConfiguration=getAxiosConfig,exports.getAxiosInstance=getAxiosInstance,exports.install=install,exports.providePinia=providePinia,exports.setupAxios=setupAxios,exports.updateAxiosConfig=updateAxiosConfig,exports.updateAxiosToken=updateToken,exports.updateToken=updateToken$1,exports.useAxios=useAxios,exports.usePatientStore=usePatientStore,exports.usePinia=usePinia,exports.useStockStore=useStockStore,exports.useUserStore=useUserStore,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1460
|
+
`+M):J.stack=M}catch{}}throw J}}_request(I,N){typeof I=="string"?(N=N||{},N.url=I):N=I||{},N=mergeConfig$1(this.defaults,N);const{transitional:J,paramsSerializer:V,headers:M}=N;J!==void 0&&validator.assertOptions(J,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),V!=null&&(utils$1.isFunction(V)?N.paramsSerializer={serialize:V}:validator.assertOptions(V,{encode:validators.function,serialize:validators.function},!0)),N.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?N.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:N.allowAbsoluteUrls=!0),validator.assertOptions(N,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),N.method=(N.method||this.defaults.method||"get").toLowerCase();let vt=M&&utils$1.merge(M.common,M[N.method]);M&&utils$1.forEach(["delete","get","head","post","put","patch","common"],Gt=>{delete M[Gt]}),N.headers=AxiosHeaders$1.concat(vt,M);const yt=[];let At=!0;this.interceptors.request.forEach(function(Vt){typeof Vt.runWhen=="function"&&Vt.runWhen(N)===!1||(At=At&&Vt.synchronous,yt.unshift(Vt.fulfilled,Vt.rejected))});const Dt=[];this.interceptors.response.forEach(function(Vt){Dt.push(Vt.fulfilled,Vt.rejected)});let Ft,Pt=0,Rt;if(!At){const Gt=[dispatchRequest.bind(this),void 0];for(Gt.unshift(...yt),Gt.push(...Dt),Rt=Gt.length,Ft=Promise.resolve(N);Pt<Rt;)Ft=Ft.then(Gt[Pt++],Gt[Pt++]);return Ft}Rt=yt.length;let $t=N;for(;Pt<Rt;){const Gt=yt[Pt++],Vt=yt[Pt++];try{$t=Gt($t)}catch(Ht){Vt.call(this,Ht);break}}try{Ft=dispatchRequest.call(this,$t)}catch(Gt){return Promise.reject(Gt)}for(Pt=0,Rt=Dt.length;Pt<Rt;)Ft=Ft.then(Dt[Pt++],Dt[Pt++]);return Ft}getUri(I){I=mergeConfig$1(this.defaults,I);const N=buildFullPath(I.baseURL,I.url,I.allowAbsoluteUrls);return buildURL(N,I.params,I.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function e(I){Axios$1.prototype[I]=function(N,J){return this.request(mergeConfig$1(J||{},{method:I,url:N,data:(J||{}).data}))}}),utils$1.forEach(["post","put","patch"],function e(I){function N(J){return function(M,vt,yt){return this.request(mergeConfig$1(yt||{},{method:I,headers:J?{"Content-Type":"multipart/form-data"}:{},url:M,data:vt}))}}Axios$1.prototype[I]=N(),Axios$1.prototype[I+"Form"]=N(!0)});let CancelToken$1=class txe{constructor(I){if(typeof I!="function")throw new TypeError("executor must be a function.");let N;this.promise=new Promise(function(M){N=M});const J=this;this.promise.then(V=>{if(!J._listeners)return;let M=J._listeners.length;for(;M-- >0;)J._listeners[M](V);J._listeners=null}),this.promise.then=V=>{let M;const vt=new Promise(yt=>{J.subscribe(yt),M=yt}).then(V);return vt.cancel=function(){J.unsubscribe(M)},vt},I(function(M,vt,yt){J.reason||(J.reason=new CanceledError$1(M,vt,yt),N(J.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(I){if(this.reason){I(this.reason);return}this._listeners?this._listeners.push(I):this._listeners=[I]}unsubscribe(I){if(!this._listeners)return;const N=this._listeners.indexOf(I);N!==-1&&this._listeners.splice(N,1)}toAbortSignal(){const I=new AbortController,N=J=>{I.abort(J)};return this.subscribe(N),I.signal.unsubscribe=()=>this.unsubscribe(N),I.signal}static source(){let I;return{token:new txe(function(V){I=V}),cancel:I}}};function spread$1(e){return function(N){return e.apply(null,N)}}function isAxiosError$1(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode$1={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(HttpStatusCode$1).forEach(([e,I])=>{HttpStatusCode$1[I]=e});function createInstance(e){const I=new Axios$1(e),N=bind(Axios$1.prototype.request,I);return utils$1.extend(N,Axios$1.prototype,I,{allOwnKeys:!0}),utils$1.extend(N,I,null,{allOwnKeys:!0}),N.create=function(V){return createInstance(mergeConfig$1(e,V))},N}const axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function e(I){return Promise.all(I)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios,index$1=Object.freeze(Object.defineProperty({__proto__:null,Axios,AxiosError,AxiosHeaders,Cancel,CancelToken,CanceledError,HttpStatusCode,VERSION,all,default:axios,formToJSON,getAdapter,isAxiosError,isCancel,mergeConfig,spread,toFormData},Symbol.toStringTag,{value:"Module"}));let axiosInstance=null,axiosConfig={baseURL:"",timeout:3e4,headers:{"Content-Type":"application/json"}};function setupAxios(e){if(!e||typeof e.request!="function")throw new Error("setupAxios требует готовый axios instance. Используйте: axios.create(config)");return axiosInstance=e,axiosConfig={baseURL:e.defaults?.baseURL??"",timeout:e.defaults?.timeout??3e4,headers:e.defaults?.headers?.common??{}},typeof window<"u"&&(window.axios=axiosInstance,window.localhost=e.defaults?.baseURL??"",window.localhost=window.localhost.at(-1)==="/"?window.localhost:window.localhost+"/"),axiosInstance}function getAxiosInstance(){if(!axiosInstance)throw new Error("Axios не инициализирован. Вызовите setupAxios() перед использованием компонентов.");return axiosInstance}function updateToken(e){if(!axiosInstance)throw new Error("Axios не инициализирован");e?axiosInstance.defaults.headers.common.Authorization=`Bearer ${e}`:delete axiosInstance.defaults.headers.common.Authorization}function updateAxiosConfig(e){if(!axiosInstance)throw new Error("Axios не инициализирован");e.baseURL&&(axiosInstance.defaults.baseURL=e.baseURL),e.headers&&(axiosInstance.defaults.headers.common||(axiosInstance.defaults.headers.common={}),axiosInstance.defaults.headers.common={...axiosInstance.defaults.headers.common,...e.headers}),e.timeout&&(axiosInstance.defaults.timeout=e.timeout)}function getAxiosConfig(){return axiosInstance?{baseURL:axiosInstance.defaults.baseURL,timeout:axiosInstance.defaults.timeout,headers:axiosInstance.defaults.headers.common||{}}:axiosConfig}const axiosSetup=Object.freeze(Object.defineProperty({__proto__:null,getAxiosConfig,getAxiosInstance,setupAxios,updateAxiosConfig,updateToken},Symbol.toStringTag,{value:"Module"})),useStockStoreImpl=defineStore("stock",{state:()=>({stock:null}),getters:{hasStock:e=>e.stock!=null,stockId:e=>e.stock?.Id??null},actions:{setStock(e){this.stock=e},clearStock(){this.stock=null}}});function useStockStore(e,I){return useStockStoreImpl(e??usePinia(),I)}function createBmsComponentsPlugin(e={}){return{install(I){e.pinia&&providePinia(I,e.pinia),e.axiosInstance&&setupAxios(e.axiosInstance),I.config.globalProperties.$setupAxios=setupAxios,I.config.globalProperties.$updateAxiosToken=N=>{updateToken(N)}}}}function install(e,I={}){I.pinia&&providePinia(e,I.pinia),e.component("FullLoader",FullLoader),e.component("ConstructorReportsQueue",_sfc_main$O),e.component("ConstructorReports",_sfc_main$G),e.component("PatientInfoComponent",_sfc_main$m),e.component("NewBenefitList",_sfc_main$s),e.component("BenefitForm",_sfc_main$v),e.component("ApplicationForm",_sfc_main$p),e.component("ApiUseBenefit",useBenefit),e.component("ScanWriteOffMedicalDevicesFormMDLP",_sfc_main$f),e.component("IsOkay",_sfc_main$e),e.component("TableAccordion",TableAccordion),I.axiosInstance?Promise.resolve().then(()=>axiosSetup).then(({setupAxios:N})=>{N(I.axiosInstance)}):I.axiosConfig&&Promise.all([Promise.resolve().then(()=>index$1),Promise.resolve().then(()=>axiosSetup)]).then(([N,{setupAxios:J}])=>{J(N.default.create(I.axiosConfig))}),I.apiConfig&&Promise.resolve().then(()=>api).then(({configureApi:N})=>{N(I.apiConfig)})}const index={install};typeof window<"u"&&window.Vue&&window.Vue.use({install}),exports.ApiUseBenefit=useBenefit,exports.ApplicationForm=_sfc_main$p,exports.BenefitForm=_sfc_main$v,exports.ConstructorReports=_sfc_main$G,exports.ConstructorReportsQueue=_sfc_main$O,exports.FullLoader=FullLoader,exports.IsOkay=_sfc_main$e,exports.NewBenefitList=_sfc_main$s,exports.PINIA_KEY=PINIA_KEY,exports.PatientInfoComponent=_sfc_main$m,exports.ScanWriteOffMedicalDevicesFormMDLP=_sfc_main$f,exports.TableAccordion=TableAccordion,exports.configureApi=configureApi,exports.createBmsComponentsPlugin=createBmsComponentsPlugin,exports.default=index,exports.getApiConfig=getApiConfig,exports.getAxiosConfiguration=getAxiosConfig,exports.getAxiosInstance=getAxiosInstance,exports.install=install,exports.providePinia=providePinia,exports.setupAxios=setupAxios,exports.updateAxiosConfig=updateAxiosConfig,exports.updateAxiosToken=updateToken,exports.updateToken=updateToken$1,exports.useAxios=useAxios,exports.usePatientStore=usePatientStore,exports.usePinia=usePinia,exports.useStockStore=useStockStore,exports.useUserStore=useUserStore,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|