fge-auth-component 0.1.0 → 0.1.1
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.
|
@@ -3945,6 +3945,7 @@ const O0 = () => {
|
|
|
3945
3945
|
token: void 0,
|
|
3946
3946
|
refreshToken: void 0,
|
|
3947
3947
|
user: void 0,
|
|
3948
|
+
funcionario: void 0,
|
|
3948
3949
|
isAuth: !1,
|
|
3949
3950
|
apps: [],
|
|
3950
3951
|
roles: [],
|
|
@@ -3989,6 +3990,7 @@ const O0 = () => {
|
|
|
3989
3990
|
n.value = {
|
|
3990
3991
|
token: x.token,
|
|
3991
3992
|
refreshToken: x.tokenRefresh,
|
|
3993
|
+
funcionario: x.funcionario ? x.funcionario : void 0,
|
|
3992
3994
|
user: {
|
|
3993
3995
|
...x.usuario,
|
|
3994
3996
|
nombreCompleto: x.usuario.nombreCompleto.toLowerCase(),
|
|
@@ -4004,6 +4006,7 @@ const O0 = () => {
|
|
|
4004
4006
|
token: void 0,
|
|
4005
4007
|
refreshToken: void 0,
|
|
4006
4008
|
user: void 0,
|
|
4009
|
+
funcionario: void 0,
|
|
4007
4010
|
isAuth: !1,
|
|
4008
4011
|
apps: [],
|
|
4009
4012
|
roles: [],
|
|
@@ -24,7 +24,7 @@ Found in store "${a.$id}".`),o&&E&&t.hydrate&&t.hydrate(a.$state,o),j=!0,D=!0,a}
|
|
|
24
24
|
app.use(pinia)
|
|
25
25
|
This will fail in production.`);I=yM,I._s.has(N)||(E?Vt(N,M,i,I):TN(N,i,I),process.env.NODE_ENV!=="production"&&(g._pinia=I));const D=I._s.get(N);if(process.env.NODE_ENV!=="production"&&T){const c="__hot:"+N,L=E?Vt(c,M,i,I,!0):TN(c,cA({},i),I,!0);T._hotUpdate(L),delete I.state.value[c],I._s.delete(c)}if(process.env.NODE_ENV!=="production"&&ZM&&j&&j.proxy&&!T){const c=j.proxy,L="_pStores"in c?c._pStores:c._pStores={};L[N]=D}return D}return g.$id=N,g}function ZE(A){if(A)try{return JSON.parse(A)}catch(M){console.warn(M,"unknown json format!")}}function cN(A,M){var t=M.storage,N=M.encrypt,i=M.decrypt,E=t.getItem(A.$id);if(E){var g=ZE(i?i(E):E);g&&(A.$state=g)}else{var I=JSON.stringify(A.$state);t.setItem(A.$id,N?N(I):I)}var T=function(D,c){var L=JSON.stringify(c);t.setItem(A.$id,N?N(L):L)};A.$subscribe(T,{detached:!0,deep:!0})}function KE(A){return function(M){var t=A||{},N=M.store,i=t.stores,E=t.encrypt,g=t.decrypt;i&&i.length>0&&i.forEach(function(I){if(typeof I=="string"){if(I===N.$id){var T=t.storage||localStorage;cN(N,{stores:i,storage:T,encrypt:E,decrypt:g})}}else if(I&&I.name===N.$id){var j=I.storage,D=I.ciphertext;cN(N,{stores:i,storage:j||t.storage||localStorage,encrypt:D===!1?void 0:E,decrypt:D===!1?void 0:g})}})}}var iM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vE(A){if(A.__esModule)return A;var M=A.default;if(typeof M=="function"){var t=function N(){if(this instanceof N){var i=[null];i.push.apply(i,arguments);var E=Function.bind.apply(M,i);return new E}return M.apply(this,arguments)};t.prototype=M.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(A).forEach(function(N){var i=Object.getOwnPropertyDescriptor(A,N);Object.defineProperty(t,N,i.get?i:{enumerable:!0,get:function(){return A[N]}})}),t}var Wt={},qE={get exports(){return Wt},set exports(A){Wt=A}};function _E(A){throw new Error('Could not dynamically require "'+A+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $M={},$E={get exports(){return $M},set exports(A){$M=A}};const Ai=vE(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var BN;function oN(){return BN||(BN=1,function(A,M){(function(t,N){A.exports=N()})(iM,function(){var t=t||function(N,i){var E;if(typeof window<"u"&&window.crypto&&(E=window.crypto),typeof self<"u"&&self.crypto&&(E=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(E=globalThis.crypto),!E&&typeof window<"u"&&window.msCrypto&&(E=window.msCrypto),!E&&typeof iM<"u"&&iM.crypto&&(E=iM.crypto),!E&&typeof _E=="function")try{E=Ai}catch{}var g=function(){if(E){if(typeof E.getRandomValues=="function")try{return E.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof E.randomBytes=="function")try{return E.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},I=Object.create||function(){function n(){}return function(r){var w;return n.prototype=r,w=new n,n.prototype=null,w}}(),T={},j=T.lib={},D=j.Base=function(){return{extend:function(n){var r=I(this);return n&&r.mixIn(n),(!r.hasOwnProperty("init")||this.init===r.init)&&(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var n=this.extend();return n.init.apply(n,arguments),n},init:function(){},mixIn:function(n){for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);n.hasOwnProperty("toString")&&(this.toString=n.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=j.WordArray=D.extend({init:function(n,r){n=this.words=n||[],r!=i?this.sigBytes=r:this.sigBytes=n.length*4},toString:function(n){return(n||B).stringify(this)},concat:function(n){var r=this.words,w=n.words,Y=this.sigBytes,s=n.sigBytes;if(this.clamp(),Y%4)for(var a=0;a<s;a++){var h=w[a>>>2]>>>24-a%4*8&255;r[Y+a>>>2]|=h<<24-(Y+a)%4*8}else for(var y=0;y<s;y+=4)r[Y+y>>>2]=w[y>>>2];return this.sigBytes+=s,this},clamp:function(){var n=this.words,r=this.sigBytes;n[r>>>2]&=4294967295<<32-r%4*8,n.length=N.ceil(r/4)},clone:function(){var n=D.clone.call(this);return n.words=this.words.slice(0),n},random:function(n){for(var r=[],w=0;w<n;w+=4)r.push(g());return new c.init(r,n)}}),L=T.enc={},B=L.Hex={stringify:function(n){for(var r=n.words,w=n.sigBytes,Y=[],s=0;s<w;s++){var a=r[s>>>2]>>>24-s%4*8&255;Y.push((a>>>4).toString(16)),Y.push((a&15).toString(16))}return Y.join("")},parse:function(n){for(var r=n.length,w=[],Y=0;Y<r;Y+=2)w[Y>>>3]|=parseInt(n.substr(Y,2),16)<<24-Y%8*4;return new c.init(w,r/2)}},o=L.Latin1={stringify:function(n){for(var r=n.words,w=n.sigBytes,Y=[],s=0;s<w;s++){var a=r[s>>>2]>>>24-s%4*8&255;Y.push(String.fromCharCode(a))}return Y.join("")},parse:function(n){for(var r=n.length,w=[],Y=0;Y<r;Y++)w[Y>>>2]|=(n.charCodeAt(Y)&255)<<24-Y%4*8;return new c.init(w,r)}},u=L.Utf8={stringify:function(n){try{return decodeURIComponent(escape(o.stringify(n)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(n){return o.parse(unescape(encodeURIComponent(n)))}},x=j.BufferedBlockAlgorithm=D.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(n){typeof n=="string"&&(n=u.parse(n)),this._data.concat(n),this._nDataBytes+=n.sigBytes},_process:function(n){var r,w=this._data,Y=w.words,s=w.sigBytes,a=this.blockSize,h=a*4,y=s/h;n?y=N.ceil(y):y=N.max((y|0)-this._minBufferSize,0);var C=y*a,U=N.min(C*4,s);if(C){for(var J=0;J<C;J+=a)this._doProcessBlock(Y,J);r=Y.splice(0,C),w.sigBytes-=U}return new c.init(r,U)},clone:function(){var n=D.clone.call(this);return n._data=this._data.clone(),n},_minBufferSize:0});j.Hasher=x.extend({cfg:D.extend(),init:function(n){this.cfg=this.cfg.extend(n),this.reset()},reset:function(){x.reset.call(this),this._doReset()},update:function(n){return this._append(n),this._process(),this},finalize:function(n){n&&this._append(n);var r=this._doFinalize();return r},blockSize:16,_createHelper:function(n){return function(r,w){return new n.init(w).finalize(r)}},_createHmacHelper:function(n){return function(r,w){return new O.HMAC.init(n,w).finalize(r)}}});var O=T.algo={};return T}(Math);return t})}($E)),$M}(function(A,M){(function(t,N){A.exports=N(oN())})(iM,function(t){return t.enc.Utf8})})(qE);const LN=Wt;var Xt={},Mi={get exports(){return Xt},set exports(A){Xt=A}};(function(A,M){(function(t,N){A.exports=N(oN())})(iM,function(t){return function(){var N=t,i=N.lib,E=i.WordArray,g=N.enc;g.Base64={stringify:function(T){var j=T.words,D=T.sigBytes,c=this._map;T.clamp();for(var L=[],B=0;B<D;B+=3)for(var o=j[B>>>2]>>>24-B%4*8&255,u=j[B+1>>>2]>>>24-(B+1)%4*8&255,x=j[B+2>>>2]>>>24-(B+2)%4*8&255,O=o<<16|u<<8|x,n=0;n<4&&B+n*.75<D;n++)L.push(c.charAt(O>>>6*(3-n)&63));var r=c.charAt(64);if(r)for(;L.length%4;)L.push(r);return L.join("")},parse:function(T){var j=T.length,D=this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var L=0;L<D.length;L++)c[D.charCodeAt(L)]=L}var B=D.charAt(64);if(B){var o=T.indexOf(B);o!==-1&&(j=o)}return I(T,j,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function I(T,j,D){for(var c=[],L=0,B=0;B<j;B++)if(B%4){var o=D[T.charCodeAt(B-1)]<<B%4*2,u=D[T.charCodeAt(B)]>>>6-B%4*2,x=o|u;c[L>>>2]|=x<<24-L%4*8,L++}return E.create(c,L)}}(),t.enc.Base64})})(Mi);const nN=Xt,QN=VE();function ti(A){return nN.stringify(LN.parse(A))}function ei(A){return nN.parse(A).toString(LN)}const Ni=KE({stores:[{name:"LOGIN_STORE",storage:localStorage,ciphertext:!0}],encrypt:ti,decrypt:ei});QN.use(Ni);let At;const Ei=new Uint8Array(16);function ii(){if(!At&&(At=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!At))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return At(Ei)}const $=[];for(let A=0;A<256;++A)$.push((A+256).toString(16).slice(1));function gi(A,M=0){return($[A[M+0]]+$[A[M+1]]+$[A[M+2]]+$[A[M+3]]+"-"+$[A[M+4]]+$[A[M+5]]+"-"+$[A[M+6]]+$[A[M+7]]+"-"+$[A[M+8]]+$[A[M+9]]+"-"+$[A[M+10]]+$[A[M+11]]+$[A[M+12]]+$[A[M+13]]+$[A[M+14]]+$[A[M+15]]).toLowerCase()}const uN={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ii(A,M,t){if(uN.randomUUID&&!M&&!A)return uN.randomUUID();A=A||{};const N=A.random||(A.rng||ii)();if(N[6]=N[6]&15|64,N[8]=N[8]&63|128,M){t=t||0;for(let i=0;i<16;++i)M[t+i]=N[i];return M}return gi(N)}function zN(A){const M=document.cookie.split(";");for(let t=0;t<M.length;t++){const N=M[t].trim();if(N.startsWith(A+"="))return decodeURIComponent(N.substring(A.length+1))}return null}function yN({name:A,value:M,days:t=0,hours:N=0,minutes:i=0,seconds:E=0,milliseconds:g=0}){const I=new Date;I.setTime(I.getTime()+t*24*60*60*1e3+N*60*60*1e3+i*60*1e3+E*1e3+g);const T="; expires="+I.toUTCString();document.cookie=A+"="+encodeURIComponent(M)+T+"; path=/"}function sN(A,M){return function(){return A.apply(M,arguments)}}const{toString:ji}=Object.prototype,{getPrototypeOf:Zt}=Object,Mt=(A=>M=>{const t=ji.call(M);return A[t]||(A[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),hA=A=>(A=A.toLowerCase(),M=>Mt(M)===A),tt=A=>M=>typeof M===A,{isArray:gM}=Array,aM=tt("undefined");function Ti(A){return A!==null&&!aM(A)&&A.constructor!==null&&!aM(A.constructor)&&BA(A.constructor.isBuffer)&&A.constructor.isBuffer(A)}const wN=hA("ArrayBuffer");function Di(A){let M;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?M=ArrayBuffer.isView(A):M=A&&A.buffer&&wN(A.buffer),M}const ci=tt("string"),BA=tt("function"),aN=tt("number"),et=A=>A!==null&&typeof A=="object",Bi=A=>A===!0||A===!1,Nt=A=>{if(Mt(A)!=="object")return!1;const M=Zt(A);return(M===null||M===Object.prototype||Object.getPrototypeOf(M)===null)&&!(Symbol.toStringTag in A)&&!(Symbol.iterator in A)},oi=hA("Date"),Li=hA("File"),ni=hA("Blob"),Qi=hA("FileList"),ui=A=>et(A)&&BA(A.pipe),zi=A=>{let M;return A&&(typeof FormData=="function"&&A instanceof FormData||BA(A.append)&&((M=Mt(A))==="formdata"||M==="object"&&BA(A.toString)&&A.toString()==="[object FormData]"))},yi=hA("URLSearchParams"),si=A=>A.trim?A.trim():A.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function rM(A,M,{allOwnKeys:t=!1}={}){if(A===null||typeof A>"u")return;let N,i;if(typeof A!="object"&&(A=[A]),gM(A))for(N=0,i=A.length;N<i;N++)M.call(null,A[N],N,A);else{const E=t?Object.getOwnPropertyNames(A):Object.keys(A),g=E.length;let I;for(N=0;N<g;N++)I=E[N],M.call(null,A[I],I,A)}}function rN(A,M){M=M.toLowerCase();const t=Object.keys(A);let N=t.length,i;for(;N-- >0;)if(i=t[N],M===i.toLowerCase())return i;return null}const CN=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),lN=A=>!aM(A)&&A!==CN;function Kt(){const{caseless:A}=lN(this)&&this||{},M={},t=(N,i)=>{const E=A&&rN(M,i)||i;Nt(M[E])&&Nt(N)?M[E]=Kt(M[E],N):Nt(N)?M[E]=Kt({},N):gM(N)?M[E]=N.slice():M[E]=N};for(let N=0,i=arguments.length;N<i;N++)arguments[N]&&rM(arguments[N],t);return M}const wi=(A,M,t,{allOwnKeys:N}={})=>(rM(M,(i,E)=>{t&&BA(i)?A[E]=sN(i,t):A[E]=i},{allOwnKeys:N}),A),ai=A=>(A.charCodeAt(0)===65279&&(A=A.slice(1)),A),ri=(A,M,t,N)=>{A.prototype=Object.create(M.prototype,N),A.prototype.constructor=A,Object.defineProperty(A,"super",{value:M.prototype}),t&&Object.assign(A.prototype,t)},Ci=(A,M,t,N)=>{let i,E,g;const I={};if(M=M||{},A==null)return M;do{for(i=Object.getOwnPropertyNames(A),E=i.length;E-- >0;)g=i[E],(!N||N(g,A,M))&&!I[g]&&(M[g]=A[g],I[g]=!0);A=t!==!1&&Zt(A)}while(A&&(!t||t(A,M))&&A!==Object.prototype);return M},li=(A,M,t)=>{A=String(A),(t===void 0||t>A.length)&&(t=A.length),t-=M.length;const N=A.indexOf(M,t);return N!==-1&&N===t},Yi=A=>{if(!A)return null;if(gM(A))return A;let M=A.length;if(!aN(M))return null;const t=new Array(M);for(;M-- >0;)t[M]=A[M];return t},xi=(A=>M=>A&&M instanceof A)(typeof Uint8Array<"u"&&Zt(Uint8Array)),hi=(A,M)=>{const N=(A&&A[Symbol.iterator]).call(A);let i;for(;(i=N.next())&&!i.done;){const E=i.value;M.call(A,E[0],E[1])}},Oi=(A,M)=>{let t;const N=[];for(;(t=A.exec(M))!==null;)N.push(t);return N},Si=hA("HTMLFormElement"),Ui=A=>A.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,N,i){return N.toUpperCase()+i}),YN=(({hasOwnProperty:A})=>(M,t)=>A.call(M,t))(Object.prototype),di=hA("RegExp"),xN=(A,M)=>{const t=Object.getOwnPropertyDescriptors(A),N={};rM(t,(i,E)=>{M(i,E,A)!==!1&&(N[E]=i)}),Object.defineProperties(A,N)},ki=A=>{xN(A,(M,t)=>{if(BA(A)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const N=A[t];if(BA(N)){if(M.enumerable=!1,"writable"in M){M.writable=!1;return}M.set||(M.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Fi=(A,M)=>{const t={},N=i=>{i.forEach(E=>{t[E]=!0})};return gM(A)?N(A):N(String(A).split(M)),t},Ri=()=>{},mi=(A,M)=>(A=+A,Number.isFinite(A)?A:M),vt="abcdefghijklmnopqrstuvwxyz",hN="0123456789",ON={DIGIT:hN,ALPHA:vt,ALPHA_DIGIT:vt+vt.toUpperCase()+hN},Gi=(A=16,M=ON.ALPHA_DIGIT)=>{let t="";const{length:N}=M;for(;A--;)t+=M[Math.random()*N|0];return t};function fi(A){return!!(A&&BA(A.append)&&A[Symbol.toStringTag]==="FormData"&&A[Symbol.iterator])}const pi=A=>{const M=new Array(10),t=(N,i)=>{if(et(N)){if(M.indexOf(N)>=0)return;if(!("toJSON"in N)){M[i]=N;const E=gM(N)?[]:{};return rM(N,(g,I)=>{const T=t(g,i+1);!aM(T)&&(E[I]=T)}),M[i]=void 0,E}}return N};return t(A,0)},Hi=hA("AsyncFunction"),z={isArray:gM,isArrayBuffer:wN,isBuffer:Ti,isFormData:zi,isArrayBufferView:Di,isString:ci,isNumber:aN,isBoolean:Bi,isObject:et,isPlainObject:Nt,isUndefined:aM,isDate:oi,isFile:Li,isBlob:ni,isRegExp:di,isFunction:BA,isStream:ui,isURLSearchParams:yi,isTypedArray:xi,isFileList:Qi,forEach:rM,merge:Kt,extend:wi,trim:si,stripBOM:ai,inherits:ri,toFlatObject:Ci,kindOf:Mt,kindOfTest:hA,endsWith:li,toArray:Yi,forEachEntry:hi,matchAll:Oi,isHTMLForm:Si,hasOwnProperty:YN,hasOwnProp:YN,reduceDescriptors:xN,freezeMethods:ki,toObjectSet:Fi,toCamelCase:Ui,noop:Ri,toFiniteNumber:mi,findKey:rN,global:CN,isContextDefined:lN,ALPHABET:ON,generateString:Gi,isSpecCompliantForm:fi,toJSONObject:pi,isAsyncFn:Hi,isThenable:A=>A&&(et(A)||BA(A))&&BA(A.then)&&BA(A.catch)};function m(A,M,t,N,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=A,this.name="AxiosError",M&&(this.code=M),t&&(this.config=t),N&&(this.request=N),i&&(this.response=i)}z.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const SN=m.prototype,UN={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(A=>{UN[A]={value:A}}),Object.defineProperties(m,UN),Object.defineProperty(SN,"isAxiosError",{value:!0}),m.from=(A,M,t,N,i,E)=>{const g=Object.create(SN);return z.toFlatObject(A,g,function(T){return T!==Error.prototype},I=>I!=="isAxiosError"),m.call(g,A.message,M,t,N,i),g.cause=A,g.name=A.name,E&&Object.assign(g,E),g};const Ji=null;function qt(A){return z.isPlainObject(A)||z.isArray(A)}function dN(A){return z.endsWith(A,"[]")?A.slice(0,-2):A}function kN(A,M,t){return A?A.concat(M).map(function(i,E){return i=dN(i),!t&&E?"["+i+"]":i}).join(t?".":""):M}function bi(A){return z.isArray(A)&&!A.some(qt)}const Pi=z.toFlatObject(z,{},null,function(M){return/^is[A-Z]/.test(M)});function Et(A,M,t){if(!z.isObject(A))throw new TypeError("target must be an object");M=M||new FormData,t=z.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,x){return!z.isUndefined(x[u])});const N=t.metaTokens,i=t.visitor||D,E=t.dots,g=t.indexes,T=(t.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(M);if(!z.isFunction(i))throw new TypeError("visitor must be a function");function j(o){if(o===null)return"";if(z.isDate(o))return o.toISOString();if(!T&&z.isBlob(o))throw new m("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(o)||z.isTypedArray(o)?T&&typeof Blob=="function"?new Blob([o]):Buffer.from(o):o}function D(o,u,x){let O=o;if(o&&!x&&typeof o=="object"){if(z.endsWith(u,"{}"))u=N?u:u.slice(0,-2),o=JSON.stringify(o);else if(z.isArray(o)&&bi(o)||(z.isFileList(o)||z.endsWith(u,"[]"))&&(O=z.toArray(o)))return u=dN(u),O.forEach(function(r,w){!(z.isUndefined(r)||r===null)&&M.append(g===!0?kN([u],w,E):g===null?u:u+"[]",j(r))}),!1}return qt(o)?!0:(M.append(kN(x,u,E),j(o)),!1)}const c=[],L=Object.assign(Pi,{defaultVisitor:D,convertValue:j,isVisitable:qt});function B(o,u){if(!z.isUndefined(o)){if(c.indexOf(o)!==-1)throw Error("Circular reference detected in "+u.join("."));c.push(o),z.forEach(o,function(O,n){(!(z.isUndefined(O)||O===null)&&i.call(M,O,z.isString(n)?n.trim():n,u,L))===!0&&B(O,u?u.concat(n):[n])}),c.pop()}}if(!z.isObject(A))throw new TypeError("data must be an object");return B(A),M}function FN(A){const M={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(A).replace(/[!'()~]|%20|%00/g,function(N){return M[N]})}function _t(A,M){this._pairs=[],A&&Et(A,this,M)}const RN=_t.prototype;RN.append=function(M,t){this._pairs.push([M,t])},RN.toString=function(M){const t=M?function(N){return M.call(this,N,FN)}:FN;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function Vi(A){return encodeURIComponent(A).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function mN(A,M,t){if(!M)return A;const N=t&&t.encode||Vi,i=t&&t.serialize;let E;if(i?E=i(M,t):E=z.isURLSearchParams(M)?M.toString():new _t(M,t).toString(N),E){const g=A.indexOf("#");g!==-1&&(A=A.slice(0,g)),A+=(A.indexOf("?")===-1?"?":"&")+E}return A}class Wi{constructor(){this.handlers=[]}use(M,t,N){return this.handlers.push({fulfilled:M,rejected:t,synchronous:N?N.synchronous:!1,runWhen:N?N.runWhen:null}),this.handlers.length-1}eject(M){this.handlers[M]&&(this.handlers[M]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(M){z.forEach(this.handlers,function(N){N!==null&&M(N)})}}const GN=Wi,fN={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xi=typeof URLSearchParams<"u"?URLSearchParams:_t,Zi=typeof FormData<"u"?FormData:null,Ki=typeof Blob<"u"?Blob:null,vi=(()=>{let A;return typeof navigator<"u"&&((A=navigator.product)==="ReactNative"||A==="NativeScript"||A==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),qi=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),OA={isBrowser:!0,classes:{URLSearchParams:Xi,FormData:Zi,Blob:Ki},isStandardBrowserEnv:vi,isStandardBrowserWebWorkerEnv:qi,protocols:["http","https","file","blob","url","data"]};function _i(A,M){return Et(A,new OA.classes.URLSearchParams,Object.assign({visitor:function(t,N,i,E){return OA.isNode&&z.isBuffer(t)?(this.append(N,t.toString("base64")),!1):E.defaultVisitor.apply(this,arguments)}},M))}function $i(A){return z.matchAll(/\w+|\[(\w*)]/g,A).map(M=>M[0]==="[]"?"":M[1]||M[0])}function Ag(A){const M={},t=Object.keys(A);let N;const i=t.length;let E;for(N=0;N<i;N++)E=t[N],M[E]=A[E];return M}function pN(A){function M(t,N,i,E){let g=t[E++];const I=Number.isFinite(+g),T=E>=t.length;return g=!g&&z.isArray(i)?i.length:g,T?(z.hasOwnProp(i,g)?i[g]=[i[g],N]:i[g]=N,!I):((!i[g]||!z.isObject(i[g]))&&(i[g]=[]),M(t,N,i[g],E)&&z.isArray(i[g])&&(i[g]=Ag(i[g])),!I)}if(z.isFormData(A)&&z.isFunction(A.entries)){const t={};return z.forEachEntry(A,(N,i)=>{M($i(N),i,t,0)}),t}return null}const Mg={"Content-Type":void 0};function tg(A,M,t){if(z.isString(A))try{return(M||JSON.parse)(A),z.trim(A)}catch(N){if(N.name!=="SyntaxError")throw N}return(t||JSON.stringify)(A)}const it={transitional:fN,adapter:["xhr","http"],transformRequest:[function(M,t){const N=t.getContentType()||"",i=N.indexOf("application/json")>-1,E=z.isObject(M);if(E&&z.isHTMLForm(M)&&(M=new FormData(M)),z.isFormData(M))return i&&i?JSON.stringify(pN(M)):M;if(z.isArrayBuffer(M)||z.isBuffer(M)||z.isStream(M)||z.isFile(M)||z.isBlob(M))return M;if(z.isArrayBufferView(M))return M.buffer;if(z.isURLSearchParams(M))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),M.toString();let I;if(E){if(N.indexOf("application/x-www-form-urlencoded")>-1)return _i(M,this.formSerializer).toString();if((I=z.isFileList(M))||N.indexOf("multipart/form-data")>-1){const T=this.env&&this.env.FormData;return Et(I?{"files[]":M}:M,T&&new T,this.formSerializer)}}return E||i?(t.setContentType("application/json",!1),tg(M)):M}],transformResponse:[function(M){const t=this.transitional||it.transitional,N=t&&t.forcedJSONParsing,i=this.responseType==="json";if(M&&z.isString(M)&&(N&&!this.responseType||i)){const g=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(M)}catch(I){if(g)throw I.name==="SyntaxError"?m.from(I,m.ERR_BAD_RESPONSE,this,null,this.response):I}}return M}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:OA.classes.FormData,Blob:OA.classes.Blob},validateStatus:function(M){return M>=200&&M<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};z.forEach(["delete","get","head"],function(M){it.headers[M]={}}),z.forEach(["post","put","patch"],function(M){it.headers[M]=z.merge(Mg)});const $t=it,eg=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ng=A=>{const M={};let t,N,i;return A&&A.split(`
|
|
26
26
|
`).forEach(function(g){i=g.indexOf(":"),t=g.substring(0,i).trim().toLowerCase(),N=g.substring(i+1).trim(),!(!t||M[t]&&eg[t])&&(t==="set-cookie"?M[t]?M[t].push(N):M[t]=[N]:M[t]=M[t]?M[t]+", "+N:N)}),M},HN=Symbol("internals");function CM(A){return A&&String(A).trim().toLowerCase()}function gt(A){return A===!1||A==null?A:z.isArray(A)?A.map(gt):String(A)}function Eg(A){const M=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let N;for(;N=t.exec(A);)M[N[1]]=N[2];return M}const ig=A=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(A.trim());function Ae(A,M,t,N,i){if(z.isFunction(N))return N.call(this,M,t);if(i&&(M=t),!!z.isString(M)){if(z.isString(N))return M.indexOf(N)!==-1;if(z.isRegExp(N))return N.test(M)}}function gg(A){return A.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(M,t,N)=>t.toUpperCase()+N)}function Ig(A,M){const t=z.toCamelCase(" "+M);["get","set","has"].forEach(N=>{Object.defineProperty(A,N+t,{value:function(i,E,g){return this[N].call(this,M,i,E,g)},configurable:!0})})}class It{constructor(M){M&&this.set(M)}set(M,t,N){const i=this;function E(I,T,j){const D=CM(T);if(!D)throw new Error("header name must be a non-empty string");const c=z.findKey(i,D);(!c||i[c]===void 0||j===!0||j===void 0&&i[c]!==!1)&&(i[c||T]=gt(I))}const g=(I,T)=>z.forEach(I,(j,D)=>E(j,D,T));return z.isPlainObject(M)||M instanceof this.constructor?g(M,t):z.isString(M)&&(M=M.trim())&&!ig(M)?g(Ng(M),t):M!=null&&E(t,M,N),this}get(M,t){if(M=CM(M),M){const N=z.findKey(this,M);if(N){const i=this[N];if(!t)return i;if(t===!0)return Eg(i);if(z.isFunction(t))return t.call(this,i,N);if(z.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(M,t){if(M=CM(M),M){const N=z.findKey(this,M);return!!(N&&this[N]!==void 0&&(!t||Ae(this,this[N],N,t)))}return!1}delete(M,t){const N=this;let i=!1;function E(g){if(g=CM(g),g){const I=z.findKey(N,g);I&&(!t||Ae(N,N[I],I,t))&&(delete N[I],i=!0)}}return z.isArray(M)?M.forEach(E):E(M),i}clear(M){const t=Object.keys(this);let N=t.length,i=!1;for(;N--;){const E=t[N];(!M||Ae(this,this[E],E,M,!0))&&(delete this[E],i=!0)}return i}normalize(M){const t=this,N={};return z.forEach(this,(i,E)=>{const g=z.findKey(N,E);if(g){t[g]=gt(i),delete t[E];return}const I=M?gg(E):String(E).trim();I!==E&&delete t[E],t[I]=gt(i),N[I]=!0}),this}concat(...M){return this.constructor.concat(this,...M)}toJSON(M){const t=Object.create(null);return z.forEach(this,(N,i)=>{N!=null&&N!==!1&&(t[i]=M&&z.isArray(N)?N.join(", "):N)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([M,t])=>M+": "+t).join(`
|
|
27
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(M){return M instanceof this?M:new this(M)}static concat(M,...t){const N=new this(M);return t.forEach(i=>N.set(i)),N}static accessor(M){const N=(this[HN]=this[HN]={accessors:{}}).accessors,i=this.prototype;function E(g){const I=CM(g);N[I]||(Ig(i,g),N[I]=!0)}return z.isArray(M)?M.forEach(E):E(M),this}}It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.freezeMethods(It.prototype),z.freezeMethods(It);const FA=It;function Me(A,M){const t=this||$t,N=M||t,i=FA.from(N.headers);let E=N.data;return z.forEach(A,function(I){E=I.call(t,E,i.normalize(),M?M.status:void 0)}),i.normalize(),E}function JN(A){return!!(A&&A.__CANCEL__)}function lM(A,M,t){m.call(this,A??"canceled",m.ERR_CANCELED,M,t),this.name="CanceledError"}z.inherits(lM,m,{__CANCEL__:!0});function jg(A,M,t){const N=t.config.validateStatus;!t.status||!N||N(t.status)?A(t):M(new m("Request failed with status code "+t.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const Tg=OA.isStandardBrowserEnv?function(){return{write:function(t,N,i,E,g,I){const T=[];T.push(t+"="+encodeURIComponent(N)),z.isNumber(i)&&T.push("expires="+new Date(i).toGMTString()),z.isString(E)&&T.push("path="+E),z.isString(g)&&T.push("domain="+g),I===!0&&T.push("secure"),document.cookie=T.join("; ")},read:function(t){const N=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return N?decodeURIComponent(N[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Dg(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function cg(A,M){return M?A.replace(/\/+$/,"")+"/"+M.replace(/^\/+/,""):A}function bN(A,M){return A&&!Dg(M)?cg(A,M):M}const Bg=OA.isStandardBrowserEnv?function(){const M=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let N;function i(E){let g=E;return M&&(t.setAttribute("href",g),g=t.href),t.setAttribute("href",g),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return N=i(window.location.href),function(g){const I=z.isString(g)?i(g):g;return I.protocol===N.protocol&&I.host===N.host}}():function(){return function(){return!0}}();function og(A){const M=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return M&&M[1]||""}function Lg(A,M){A=A||10;const t=new Array(A),N=new Array(A);let i=0,E=0,g;return M=M!==void 0?M:1e3,function(T){const j=Date.now(),D=N[E];g||(g=j),t[i]=T,N[i]=j;let c=E,L=0;for(;c!==i;)L+=t[c++],c=c%A;if(i=(i+1)%A,i===E&&(E=(E+1)%A),j-g<M)return;const B=D&&j-D;return B?Math.round(L*1e3/B):void 0}}function PN(A,M){let t=0;const N=Lg(50,250);return i=>{const E=i.loaded,g=i.lengthComputable?i.total:void 0,I=E-t,T=N(I),j=E<=g;t=E;const D={loaded:E,total:g,progress:g?E/g:void 0,bytes:I,rate:T||void 0,estimated:T&&g&&j?(g-E)/T:void 0,event:i};D[M?"download":"upload"]=!0,A(D)}}const jt={http:Ji,xhr:typeof XMLHttpRequest<"u"&&function(A){return new Promise(function(t,N){let i=A.data;const E=FA.from(A.headers).normalize(),g=A.responseType;let I;function T(){A.cancelToken&&A.cancelToken.unsubscribe(I),A.signal&&A.signal.removeEventListener("abort",I)}z.isFormData(i)&&(OA.isStandardBrowserEnv||OA.isStandardBrowserWebWorkerEnv?E.setContentType(!1):E.setContentType("multipart/form-data;",!1));let j=new XMLHttpRequest;if(A.auth){const B=A.auth.username||"",o=A.auth.password?unescape(encodeURIComponent(A.auth.password)):"";E.set("Authorization","Basic "+btoa(B+":"+o))}const D=bN(A.baseURL,A.url);j.open(A.method.toUpperCase(),mN(D,A.params,A.paramsSerializer),!0),j.timeout=A.timeout;function c(){if(!j)return;const B=FA.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),u={data:!g||g==="text"||g==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:B,config:A,request:j};jg(function(O){t(O),T()},function(O){N(O),T()},u),j=null}if("onloadend"in j?j.onloadend=c:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(c)},j.onabort=function(){j&&(N(new m("Request aborted",m.ECONNABORTED,A,j)),j=null)},j.onerror=function(){N(new m("Network Error",m.ERR_NETWORK,A,j)),j=null},j.ontimeout=function(){let o=A.timeout?"timeout of "+A.timeout+"ms exceeded":"timeout exceeded";const u=A.transitional||fN;A.timeoutErrorMessage&&(o=A.timeoutErrorMessage),N(new m(o,u.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,A,j)),j=null},OA.isStandardBrowserEnv){const B=(A.withCredentials||Bg(D))&&A.xsrfCookieName&&Tg.read(A.xsrfCookieName);B&&E.set(A.xsrfHeaderName,B)}i===void 0&&E.setContentType(null),"setRequestHeader"in j&&z.forEach(E.toJSON(),function(o,u){j.setRequestHeader(u,o)}),z.isUndefined(A.withCredentials)||(j.withCredentials=!!A.withCredentials),g&&g!=="json"&&(j.responseType=A.responseType),typeof A.onDownloadProgress=="function"&&j.addEventListener("progress",PN(A.onDownloadProgress,!0)),typeof A.onUploadProgress=="function"&&j.upload&&j.upload.addEventListener("progress",PN(A.onUploadProgress)),(A.cancelToken||A.signal)&&(I=B=>{j&&(N(!B||B.type?new lM(null,A,j):B),j.abort(),j=null)},A.cancelToken&&A.cancelToken.subscribe(I),A.signal&&(A.signal.aborted?I():A.signal.addEventListener("abort",I)));const L=og(D);if(L&&OA.protocols.indexOf(L)===-1){N(new m("Unsupported protocol "+L+":",m.ERR_BAD_REQUEST,A));return}j.send(i||null)})}};z.forEach(jt,(A,M)=>{if(A){try{Object.defineProperty(A,"name",{value:M})}catch{}Object.defineProperty(A,"adapterName",{value:M})}});const ng={getAdapter:A=>{A=z.isArray(A)?A:[A];const{length:M}=A;let t,N;for(let i=0;i<M&&(t=A[i],!(N=z.isString(t)?jt[t.toLowerCase()]:t));i++);if(!N)throw N===!1?new m(`Adapter ${t} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(z.hasOwnProp(jt,t)?`Adapter '${t}' is not available in the build`:`Unknown adapter '${t}'`);if(!z.isFunction(N))throw new TypeError("adapter is not a function");return N},adapters:jt};function te(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new lM(null,A)}function VN(A){return te(A),A.headers=FA.from(A.headers),A.data=Me.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),ng.getAdapter(A.adapter||$t.adapter)(A).then(function(N){return te(A),N.data=Me.call(A,A.transformResponse,N),N.headers=FA.from(N.headers),N},function(N){return JN(N)||(te(A),N&&N.response&&(N.response.data=Me.call(A,A.transformResponse,N.response),N.response.headers=FA.from(N.response.headers))),Promise.reject(N)})}const WN=A=>A instanceof FA?A.toJSON():A;function IM(A,M){M=M||{};const t={};function N(j,D,c){return z.isPlainObject(j)&&z.isPlainObject(D)?z.merge.call({caseless:c},j,D):z.isPlainObject(D)?z.merge({},D):z.isArray(D)?D.slice():D}function i(j,D,c){if(z.isUndefined(D)){if(!z.isUndefined(j))return N(void 0,j,c)}else return N(j,D,c)}function E(j,D){if(!z.isUndefined(D))return N(void 0,D)}function g(j,D){if(z.isUndefined(D)){if(!z.isUndefined(j))return N(void 0,j)}else return N(void 0,D)}function I(j,D,c){if(c in M)return N(j,D);if(c in A)return N(void 0,j)}const T={url:E,method:E,data:E,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:I,headers:(j,D)=>i(WN(j),WN(D),!0)};return z.forEach(Object.keys(Object.assign({},A,M)),function(D){const c=T[D]||i,L=c(A[D],M[D],D);z.isUndefined(L)&&c!==I||(t[D]=L)}),t}const XN="1.4.0",ee={};["object","boolean","number","function","string","symbol"].forEach((A,M)=>{ee[A]=function(N){return typeof N===A||"a"+(M<1?"n ":" ")+A}});const ZN={};ee.transitional=function(M,t,N){function i(E,g){return"[Axios v"+XN+"] Transitional option '"+E+"'"+g+(N?". "+N:"")}return(E,g,I)=>{if(M===!1)throw new m(i(g," has been removed"+(t?" in "+t:"")),m.ERR_DEPRECATED);return t&&!ZN[g]&&(ZN[g]=!0,console.warn(i(g," has been deprecated since v"+t+" and will be removed in the near future"))),M?M(E,g,I):!0}};function Qg(A,M,t){if(typeof A!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const N=Object.keys(A);let i=N.length;for(;i-- >0;){const E=N[i],g=M[E];if(g){const I=A[E],T=I===void 0||g(I,E,A);if(T!==!0)throw new m("option "+E+" must be "+T,m.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new m("Unknown option "+E,m.ERR_BAD_OPTION)}}const Ne={assertOptions:Qg,validators:ee},fA=Ne.validators;class Tt{constructor(M){this.defaults=M,this.interceptors={request:new GN,response:new GN}}request(M,t){typeof M=="string"?(t=t||{},t.url=M):t=M||{},t=IM(this.defaults,t);const{transitional:N,paramsSerializer:i,headers:E}=t;N!==void 0&&Ne.assertOptions(N,{silentJSONParsing:fA.transitional(fA.boolean),forcedJSONParsing:fA.transitional(fA.boolean),clarifyTimeoutError:fA.transitional(fA.boolean)},!1),i!=null&&(z.isFunction(i)?t.paramsSerializer={serialize:i}:Ne.assertOptions(i,{encode:fA.function,serialize:fA.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g;g=E&&z.merge(E.common,E[t.method]),g&&z.forEach(["delete","get","head","post","put","patch","common"],o=>{delete E[o]}),t.headers=FA.concat(g,E);const I=[];let T=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(t)===!1||(T=T&&u.synchronous,I.unshift(u.fulfilled,u.rejected))});const j=[];this.interceptors.response.forEach(function(u){j.push(u.fulfilled,u.rejected)});let D,c=0,L;if(!T){const o=[VN.bind(this),void 0];for(o.unshift.apply(o,I),o.push.apply(o,j),L=o.length,D=Promise.resolve(t);c<L;)D=D.then(o[c++],o[c++]);return D}L=I.length;let B=t;for(c=0;c<L;){const o=I[c++],u=I[c++];try{B=o(B)}catch(x){u.call(this,x);break}}try{D=VN.call(this,B)}catch(o){return Promise.reject(o)}for(c=0,L=j.length;c<L;)D=D.then(j[c++],j[c++]);return D}getUri(M){M=IM(this.defaults,M);const t=bN(M.baseURL,M.url);return mN(t,M.params,M.paramsSerializer)}}z.forEach(["delete","get","head","options"],function(M){Tt.prototype[M]=function(t,N){return this.request(IM(N||{},{method:M,url:t,data:(N||{}).data}))}}),z.forEach(["post","put","patch"],function(M){function t(N){return function(E,g,I){return this.request(IM(I||{},{method:M,headers:N?{"Content-Type":"multipart/form-data"}:{},url:E,data:g}))}}Tt.prototype[M]=t(),Tt.prototype[M+"Form"]=t(!0)});const Dt=Tt;class Ee{constructor(M){if(typeof M!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(E){t=E});const N=this;this.promise.then(i=>{if(!N._listeners)return;let E=N._listeners.length;for(;E-- >0;)N._listeners[E](i);N._listeners=null}),this.promise.then=i=>{let E;const g=new Promise(I=>{N.subscribe(I),E=I}).then(i);return g.cancel=function(){N.unsubscribe(E)},g},M(function(E,g,I){N.reason||(N.reason=new lM(E,g,I),t(N.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(M){if(this.reason){M(this.reason);return}this._listeners?this._listeners.push(M):this._listeners=[M]}unsubscribe(M){if(!this._listeners)return;const t=this._listeners.indexOf(M);t!==-1&&this._listeners.splice(t,1)}static source(){let M;return{token:new Ee(function(i){M=i}),cancel:M}}}const ug=Ee;function zg(A){return function(t){return A.apply(null,t)}}function yg(A){return z.isObject(A)&&A.isAxiosError===!0}const ie={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(ie).forEach(([A,M])=>{ie[M]=A});const sg=ie;function KN(A){const M=new Dt(A),t=sN(Dt.prototype.request,M);return z.extend(t,Dt.prototype,M,{allOwnKeys:!0}),z.extend(t,M,null,{allOwnKeys:!0}),t.create=function(i){return KN(IM(A,i))},t}const q=KN($t);q.Axios=Dt,q.CanceledError=lM,q.CancelToken=ug,q.isCancel=JN,q.VERSION=XN,q.toFormData=Et,q.AxiosError=m,q.Cancel=q.CanceledError,q.all=function(M){return Promise.all(M)},q.spread=zg,q.isAxiosError=yg,q.mergeConfig=IM,q.AxiosHeaders=FA,q.formToJSON=A=>pN(z.isHTMLForm(A)?new FormData(A):A),q.HttpStatusCode=sg,q.default=q;const wg=q;function ct(){const A=jA(),M=wg.create({headers:{"Content-Type":"application/json","Cache-Control":"no-cache"},timeout:15e3});return M.interceptors.request.use(t=>(t.baseURL=`${A.apiBaseURL}/api`,A.userState.token&&(t.headers.Authorization=`Bearer ${A.userState.token}`),t)),M.interceptors.response.use(t=>t.data.error?Promise.reject({error:!0,message:t.data.message,response:t.data.response||{},status:t.data.status||500}):t.data,t=>Promise.reject({error:!0,message:t.message,response:t.response||{},status:500})),{apiLoginInstance:M}}function ag(){const{apiLoginInstance:A}=ct();return{onLoginApi:async E=>await A.post("v1/auth/login",E).then(g=>g).catch(g=>{var I;throw(I=g.response)!=null&&I.data?g.response.data:g}),on2AuthLoginApi:async E=>await A.post("v1/auth/login/confirmation",E).then(g=>g).catch(g=>{var I;throw(I=g.response)!=null&&I.data?g.response.data:g}),onLogoutApi:async()=>await A.post("v1/auth/logout").then(E=>E).catch(E=>{var g;throw(g=E.response)!=null&&g.data?E.response.data:E}),onLoginCiudadaniaApi:async E=>await A.post("/login",E).then(g=>g).catch(g=>{var I;throw(I=g.response)!=null&&I.data?g.response.data:g})}}const jA=DN("LOGIN_STORE",()=>{const A=e.ref("LOGIN_STORE"),M=e.ref("login"),t=e.ref({token:void 0,refreshToken:void 0,user:void 0,isAuth:!1,apps:[],roles:[],permisos:[]}),N=e.ref(null),i=e.ref(""),E=e.ref(""),g=e.ref(""),I=e.ref(),T=e.ref(),{onLoginApi:j,on2AuthLoginApi:D,onLogoutApi:c}=ag(),L=()=>{M.value="login"},B=()=>{M.value="registrar"},o=()=>{M.value="recuperar-password"},u=async y=>{var J;const C=zN(`${y.usuario}:${E.value}`),U=await j({...y,codigoDispositivo:C||void 0,aplicacion:E.value});if((J=U==null?void 0:U.response)!=null&&J.usuarioId)return U.response;n(U.response),I.value&&I.value()},x=async y=>{let C;const U=!!y.esDispositivoConfianza;U&&(C=Ii());const J=await D({...y,codigoDispositivo:C,aplicacion:E.value});n(J.response),U&&Y({usuario:y.usuario,value:C}),I.value&&I.value()},O=async()=>{try{await c()}catch{}finally{r(),localStorage.clear(),T.value&&T.value()}},n=y=>{t.value={token:y.token,refreshToken:y.tokenRefresh,user:{...y.usuario,nombreCompleto:y.usuario.nombreCompleto.toLowerCase(),fotoUrl:`${g.value}/personas/fotosegip/${y.usuario.fotoRuta}?rand=${Math.random()*100}`},isAuth:!0,apps:y.apps,roles:y.roles,permisos:y.permissions}},r=()=>{t.value={token:void 0,refreshToken:void 0,user:void 0,isAuth:!1,apps:[],roles:[],permisos:[]}},w=y=>{t.value={...t.value,user:{...t.value.user,...y,fotoUrl:y!=null&&y.fotoRuta?`${g.value}/personas/fotosegip/${y==null?void 0:y.fotoRuta}?rand=${Math.random()*100}`:t.value.user.fotoUrl}}},Y=async({usuario:y,value:C,days:U=7})=>{yN({name:`${y}:${E.value}`,value:C,days:U})};return{id:A,currentPage:M,binnacleId:N,apiBaseURL:i,aplicacion:E,userState:t,goLoginPage:L,goRegistrarPage:B,goRecuperarCont:o,onLogin:u,on2AuthLogin:x,onLogout:O,setBinnacleId:y=>{N.value=y},onLoginCiudadania:async(y,C)=>{try{N.value=y.binnacleId,C&&console.log(C)}catch(U){console.log(U)}},setConfigs:({newBaseURL:y,newAplicacion:C,newRrhhUrl:U,newRedirectLoginFunction:J,newRedirectLogoutFunction:zA})=>{i.value=y,E.value=C,I.value=J,T.value=zA,g.value=U},setDispositivoConfianzaCookie:Y,clearUserData:r,updateUserData:w}});var TA={name:"BaseComponent",props:{pt:{type:Object,default:void 0}},methods:{getOption(A={},M=""){const t=IA.convertToFlatCase(M);return A[Object.keys(A).find(N=>IA.convertToFlatCase(N)===t)||""]},getPTValue(A={},M="",t={}){const N=IA.getItemValue(this.getOption(A,M),t),i=IA.getItemValue(this.getOption(this.defaultPT,M),t);return e.mergeProps(N,i)},ptm(A="",M={}){return this.getPTValue(this.pt,A,{props:this.$props,state:this.$data,...M})},ptmo(A={},M="",t={}){return this.getPTValue(A,M,t)}},computed:{defaultPT(){return IA.getItemValue(this.getOption(this.$primevue.config.pt,this.$.type.name),this.defaultsParams)},defaultsParams(){return{instance:this.$}}}},NA={name:"InputText",extends:TA,emits:["update:modelValue"],props:{modelValue:null},methods:{onInput(A){this.$emit("update:modelValue",A.target.value)}},computed:{filled(){return this.modelValue!=null&&this.modelValue.toString().length>0}}};const rg=["value"];function Cg(A,M,t,N,i,E){return e.openBlock(),e.createElementBlock("input",e.mergeProps({class:["p-inputtext p-component",{"p-filled":E.filled}],value:t.modelValue,onInput:M[0]||(M[0]=(...g)=>E.onInput&&E.onInput(...g))},A.ptm("root")),null,16,rg)}NA.render=Cg;var EA={name:"BaseIcon",props:{label:{type:String,default:void 0},spin:{type:Boolean,default:!1}},methods:{pti(){const A=IA.isEmpty(this.label);return{class:["p-icon",{"p-icon-spin":this.spin}],role:A?void 0:"img","aria-label":A?void 0:this.label,"aria-hidden":A}}}};function lg(A,M){M===void 0&&(M={});var t=M.insertAt;if(!(!A||typeof document>"u")){var N=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",t==="top"&&N.firstChild?N.insertBefore(i,N.firstChild):N.appendChild(i),i.styleSheet?i.styleSheet.cssText=A:i.appendChild(document.createTextNode(A))}}var Yg=`
|
|
27
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(M){return M instanceof this?M:new this(M)}static concat(M,...t){const N=new this(M);return t.forEach(i=>N.set(i)),N}static accessor(M){const N=(this[HN]=this[HN]={accessors:{}}).accessors,i=this.prototype;function E(g){const I=CM(g);N[I]||(Ig(i,g),N[I]=!0)}return z.isArray(M)?M.forEach(E):E(M),this}}It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.freezeMethods(It.prototype),z.freezeMethods(It);const FA=It;function Me(A,M){const t=this||$t,N=M||t,i=FA.from(N.headers);let E=N.data;return z.forEach(A,function(I){E=I.call(t,E,i.normalize(),M?M.status:void 0)}),i.normalize(),E}function JN(A){return!!(A&&A.__CANCEL__)}function lM(A,M,t){m.call(this,A??"canceled",m.ERR_CANCELED,M,t),this.name="CanceledError"}z.inherits(lM,m,{__CANCEL__:!0});function jg(A,M,t){const N=t.config.validateStatus;!t.status||!N||N(t.status)?A(t):M(new m("Request failed with status code "+t.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const Tg=OA.isStandardBrowserEnv?function(){return{write:function(t,N,i,E,g,I){const T=[];T.push(t+"="+encodeURIComponent(N)),z.isNumber(i)&&T.push("expires="+new Date(i).toGMTString()),z.isString(E)&&T.push("path="+E),z.isString(g)&&T.push("domain="+g),I===!0&&T.push("secure"),document.cookie=T.join("; ")},read:function(t){const N=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return N?decodeURIComponent(N[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Dg(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function cg(A,M){return M?A.replace(/\/+$/,"")+"/"+M.replace(/^\/+/,""):A}function bN(A,M){return A&&!Dg(M)?cg(A,M):M}const Bg=OA.isStandardBrowserEnv?function(){const M=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let N;function i(E){let g=E;return M&&(t.setAttribute("href",g),g=t.href),t.setAttribute("href",g),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return N=i(window.location.href),function(g){const I=z.isString(g)?i(g):g;return I.protocol===N.protocol&&I.host===N.host}}():function(){return function(){return!0}}();function og(A){const M=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return M&&M[1]||""}function Lg(A,M){A=A||10;const t=new Array(A),N=new Array(A);let i=0,E=0,g;return M=M!==void 0?M:1e3,function(T){const j=Date.now(),D=N[E];g||(g=j),t[i]=T,N[i]=j;let c=E,L=0;for(;c!==i;)L+=t[c++],c=c%A;if(i=(i+1)%A,i===E&&(E=(E+1)%A),j-g<M)return;const B=D&&j-D;return B?Math.round(L*1e3/B):void 0}}function PN(A,M){let t=0;const N=Lg(50,250);return i=>{const E=i.loaded,g=i.lengthComputable?i.total:void 0,I=E-t,T=N(I),j=E<=g;t=E;const D={loaded:E,total:g,progress:g?E/g:void 0,bytes:I,rate:T||void 0,estimated:T&&g&&j?(g-E)/T:void 0,event:i};D[M?"download":"upload"]=!0,A(D)}}const jt={http:Ji,xhr:typeof XMLHttpRequest<"u"&&function(A){return new Promise(function(t,N){let i=A.data;const E=FA.from(A.headers).normalize(),g=A.responseType;let I;function T(){A.cancelToken&&A.cancelToken.unsubscribe(I),A.signal&&A.signal.removeEventListener("abort",I)}z.isFormData(i)&&(OA.isStandardBrowserEnv||OA.isStandardBrowserWebWorkerEnv?E.setContentType(!1):E.setContentType("multipart/form-data;",!1));let j=new XMLHttpRequest;if(A.auth){const B=A.auth.username||"",o=A.auth.password?unescape(encodeURIComponent(A.auth.password)):"";E.set("Authorization","Basic "+btoa(B+":"+o))}const D=bN(A.baseURL,A.url);j.open(A.method.toUpperCase(),mN(D,A.params,A.paramsSerializer),!0),j.timeout=A.timeout;function c(){if(!j)return;const B=FA.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),u={data:!g||g==="text"||g==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:B,config:A,request:j};jg(function(O){t(O),T()},function(O){N(O),T()},u),j=null}if("onloadend"in j?j.onloadend=c:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(c)},j.onabort=function(){j&&(N(new m("Request aborted",m.ECONNABORTED,A,j)),j=null)},j.onerror=function(){N(new m("Network Error",m.ERR_NETWORK,A,j)),j=null},j.ontimeout=function(){let o=A.timeout?"timeout of "+A.timeout+"ms exceeded":"timeout exceeded";const u=A.transitional||fN;A.timeoutErrorMessage&&(o=A.timeoutErrorMessage),N(new m(o,u.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,A,j)),j=null},OA.isStandardBrowserEnv){const B=(A.withCredentials||Bg(D))&&A.xsrfCookieName&&Tg.read(A.xsrfCookieName);B&&E.set(A.xsrfHeaderName,B)}i===void 0&&E.setContentType(null),"setRequestHeader"in j&&z.forEach(E.toJSON(),function(o,u){j.setRequestHeader(u,o)}),z.isUndefined(A.withCredentials)||(j.withCredentials=!!A.withCredentials),g&&g!=="json"&&(j.responseType=A.responseType),typeof A.onDownloadProgress=="function"&&j.addEventListener("progress",PN(A.onDownloadProgress,!0)),typeof A.onUploadProgress=="function"&&j.upload&&j.upload.addEventListener("progress",PN(A.onUploadProgress)),(A.cancelToken||A.signal)&&(I=B=>{j&&(N(!B||B.type?new lM(null,A,j):B),j.abort(),j=null)},A.cancelToken&&A.cancelToken.subscribe(I),A.signal&&(A.signal.aborted?I():A.signal.addEventListener("abort",I)));const L=og(D);if(L&&OA.protocols.indexOf(L)===-1){N(new m("Unsupported protocol "+L+":",m.ERR_BAD_REQUEST,A));return}j.send(i||null)})}};z.forEach(jt,(A,M)=>{if(A){try{Object.defineProperty(A,"name",{value:M})}catch{}Object.defineProperty(A,"adapterName",{value:M})}});const ng={getAdapter:A=>{A=z.isArray(A)?A:[A];const{length:M}=A;let t,N;for(let i=0;i<M&&(t=A[i],!(N=z.isString(t)?jt[t.toLowerCase()]:t));i++);if(!N)throw N===!1?new m(`Adapter ${t} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(z.hasOwnProp(jt,t)?`Adapter '${t}' is not available in the build`:`Unknown adapter '${t}'`);if(!z.isFunction(N))throw new TypeError("adapter is not a function");return N},adapters:jt};function te(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new lM(null,A)}function VN(A){return te(A),A.headers=FA.from(A.headers),A.data=Me.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),ng.getAdapter(A.adapter||$t.adapter)(A).then(function(N){return te(A),N.data=Me.call(A,A.transformResponse,N),N.headers=FA.from(N.headers),N},function(N){return JN(N)||(te(A),N&&N.response&&(N.response.data=Me.call(A,A.transformResponse,N.response),N.response.headers=FA.from(N.response.headers))),Promise.reject(N)})}const WN=A=>A instanceof FA?A.toJSON():A;function IM(A,M){M=M||{};const t={};function N(j,D,c){return z.isPlainObject(j)&&z.isPlainObject(D)?z.merge.call({caseless:c},j,D):z.isPlainObject(D)?z.merge({},D):z.isArray(D)?D.slice():D}function i(j,D,c){if(z.isUndefined(D)){if(!z.isUndefined(j))return N(void 0,j,c)}else return N(j,D,c)}function E(j,D){if(!z.isUndefined(D))return N(void 0,D)}function g(j,D){if(z.isUndefined(D)){if(!z.isUndefined(j))return N(void 0,j)}else return N(void 0,D)}function I(j,D,c){if(c in M)return N(j,D);if(c in A)return N(void 0,j)}const T={url:E,method:E,data:E,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:I,headers:(j,D)=>i(WN(j),WN(D),!0)};return z.forEach(Object.keys(Object.assign({},A,M)),function(D){const c=T[D]||i,L=c(A[D],M[D],D);z.isUndefined(L)&&c!==I||(t[D]=L)}),t}const XN="1.4.0",ee={};["object","boolean","number","function","string","symbol"].forEach((A,M)=>{ee[A]=function(N){return typeof N===A||"a"+(M<1?"n ":" ")+A}});const ZN={};ee.transitional=function(M,t,N){function i(E,g){return"[Axios v"+XN+"] Transitional option '"+E+"'"+g+(N?". "+N:"")}return(E,g,I)=>{if(M===!1)throw new m(i(g," has been removed"+(t?" in "+t:"")),m.ERR_DEPRECATED);return t&&!ZN[g]&&(ZN[g]=!0,console.warn(i(g," has been deprecated since v"+t+" and will be removed in the near future"))),M?M(E,g,I):!0}};function Qg(A,M,t){if(typeof A!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const N=Object.keys(A);let i=N.length;for(;i-- >0;){const E=N[i],g=M[E];if(g){const I=A[E],T=I===void 0||g(I,E,A);if(T!==!0)throw new m("option "+E+" must be "+T,m.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new m("Unknown option "+E,m.ERR_BAD_OPTION)}}const Ne={assertOptions:Qg,validators:ee},fA=Ne.validators;class Tt{constructor(M){this.defaults=M,this.interceptors={request:new GN,response:new GN}}request(M,t){typeof M=="string"?(t=t||{},t.url=M):t=M||{},t=IM(this.defaults,t);const{transitional:N,paramsSerializer:i,headers:E}=t;N!==void 0&&Ne.assertOptions(N,{silentJSONParsing:fA.transitional(fA.boolean),forcedJSONParsing:fA.transitional(fA.boolean),clarifyTimeoutError:fA.transitional(fA.boolean)},!1),i!=null&&(z.isFunction(i)?t.paramsSerializer={serialize:i}:Ne.assertOptions(i,{encode:fA.function,serialize:fA.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g;g=E&&z.merge(E.common,E[t.method]),g&&z.forEach(["delete","get","head","post","put","patch","common"],o=>{delete E[o]}),t.headers=FA.concat(g,E);const I=[];let T=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(t)===!1||(T=T&&u.synchronous,I.unshift(u.fulfilled,u.rejected))});const j=[];this.interceptors.response.forEach(function(u){j.push(u.fulfilled,u.rejected)});let D,c=0,L;if(!T){const o=[VN.bind(this),void 0];for(o.unshift.apply(o,I),o.push.apply(o,j),L=o.length,D=Promise.resolve(t);c<L;)D=D.then(o[c++],o[c++]);return D}L=I.length;let B=t;for(c=0;c<L;){const o=I[c++],u=I[c++];try{B=o(B)}catch(x){u.call(this,x);break}}try{D=VN.call(this,B)}catch(o){return Promise.reject(o)}for(c=0,L=j.length;c<L;)D=D.then(j[c++],j[c++]);return D}getUri(M){M=IM(this.defaults,M);const t=bN(M.baseURL,M.url);return mN(t,M.params,M.paramsSerializer)}}z.forEach(["delete","get","head","options"],function(M){Tt.prototype[M]=function(t,N){return this.request(IM(N||{},{method:M,url:t,data:(N||{}).data}))}}),z.forEach(["post","put","patch"],function(M){function t(N){return function(E,g,I){return this.request(IM(I||{},{method:M,headers:N?{"Content-Type":"multipart/form-data"}:{},url:E,data:g}))}}Tt.prototype[M]=t(),Tt.prototype[M+"Form"]=t(!0)});const Dt=Tt;class Ee{constructor(M){if(typeof M!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(E){t=E});const N=this;this.promise.then(i=>{if(!N._listeners)return;let E=N._listeners.length;for(;E-- >0;)N._listeners[E](i);N._listeners=null}),this.promise.then=i=>{let E;const g=new Promise(I=>{N.subscribe(I),E=I}).then(i);return g.cancel=function(){N.unsubscribe(E)},g},M(function(E,g,I){N.reason||(N.reason=new lM(E,g,I),t(N.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(M){if(this.reason){M(this.reason);return}this._listeners?this._listeners.push(M):this._listeners=[M]}unsubscribe(M){if(!this._listeners)return;const t=this._listeners.indexOf(M);t!==-1&&this._listeners.splice(t,1)}static source(){let M;return{token:new Ee(function(i){M=i}),cancel:M}}}const ug=Ee;function zg(A){return function(t){return A.apply(null,t)}}function yg(A){return z.isObject(A)&&A.isAxiosError===!0}const ie={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(ie).forEach(([A,M])=>{ie[M]=A});const sg=ie;function KN(A){const M=new Dt(A),t=sN(Dt.prototype.request,M);return z.extend(t,Dt.prototype,M,{allOwnKeys:!0}),z.extend(t,M,null,{allOwnKeys:!0}),t.create=function(i){return KN(IM(A,i))},t}const q=KN($t);q.Axios=Dt,q.CanceledError=lM,q.CancelToken=ug,q.isCancel=JN,q.VERSION=XN,q.toFormData=Et,q.AxiosError=m,q.Cancel=q.CanceledError,q.all=function(M){return Promise.all(M)},q.spread=zg,q.isAxiosError=yg,q.mergeConfig=IM,q.AxiosHeaders=FA,q.formToJSON=A=>pN(z.isHTMLForm(A)?new FormData(A):A),q.HttpStatusCode=sg,q.default=q;const wg=q;function ct(){const A=jA(),M=wg.create({headers:{"Content-Type":"application/json","Cache-Control":"no-cache"},timeout:15e3});return M.interceptors.request.use(t=>(t.baseURL=`${A.apiBaseURL}/api`,A.userState.token&&(t.headers.Authorization=`Bearer ${A.userState.token}`),t)),M.interceptors.response.use(t=>t.data.error?Promise.reject({error:!0,message:t.data.message,response:t.data.response||{},status:t.data.status||500}):t.data,t=>Promise.reject({error:!0,message:t.message,response:t.response||{},status:500})),{apiLoginInstance:M}}function ag(){const{apiLoginInstance:A}=ct();return{onLoginApi:async E=>await A.post("v1/auth/login",E).then(g=>g).catch(g=>{var I;throw(I=g.response)!=null&&I.data?g.response.data:g}),on2AuthLoginApi:async E=>await A.post("v1/auth/login/confirmation",E).then(g=>g).catch(g=>{var I;throw(I=g.response)!=null&&I.data?g.response.data:g}),onLogoutApi:async()=>await A.post("v1/auth/logout").then(E=>E).catch(E=>{var g;throw(g=E.response)!=null&&g.data?E.response.data:E}),onLoginCiudadaniaApi:async E=>await A.post("/login",E).then(g=>g).catch(g=>{var I;throw(I=g.response)!=null&&I.data?g.response.data:g})}}const jA=DN("LOGIN_STORE",()=>{const A=e.ref("LOGIN_STORE"),M=e.ref("login"),t=e.ref({token:void 0,refreshToken:void 0,user:void 0,funcionario:void 0,isAuth:!1,apps:[],roles:[],permisos:[]}),N=e.ref(null),i=e.ref(""),E=e.ref(""),g=e.ref(""),I=e.ref(),T=e.ref(),{onLoginApi:j,on2AuthLoginApi:D,onLogoutApi:c}=ag(),L=()=>{M.value="login"},B=()=>{M.value="registrar"},o=()=>{M.value="recuperar-password"},u=async y=>{var J;const C=zN(`${y.usuario}:${E.value}`),U=await j({...y,codigoDispositivo:C||void 0,aplicacion:E.value});if((J=U==null?void 0:U.response)!=null&&J.usuarioId)return U.response;n(U.response),I.value&&I.value()},x=async y=>{let C;const U=!!y.esDispositivoConfianza;U&&(C=Ii());const J=await D({...y,codigoDispositivo:C,aplicacion:E.value});n(J.response),U&&Y({usuario:y.usuario,value:C}),I.value&&I.value()},O=async()=>{try{await c()}catch{}finally{r(),localStorage.clear(),T.value&&T.value()}},n=y=>{t.value={token:y.token,refreshToken:y.tokenRefresh,funcionario:y.funcionario?y.funcionario:void 0,user:{...y.usuario,nombreCompleto:y.usuario.nombreCompleto.toLowerCase(),fotoUrl:`${g.value}/personas/fotosegip/${y.usuario.fotoRuta}?rand=${Math.random()*100}`},isAuth:!0,apps:y.apps,roles:y.roles,permisos:y.permissions}},r=()=>{t.value={token:void 0,refreshToken:void 0,user:void 0,funcionario:void 0,isAuth:!1,apps:[],roles:[],permisos:[]}},w=y=>{t.value={...t.value,user:{...t.value.user,...y,fotoUrl:y!=null&&y.fotoRuta?`${g.value}/personas/fotosegip/${y==null?void 0:y.fotoRuta}?rand=${Math.random()*100}`:t.value.user.fotoUrl}}},Y=async({usuario:y,value:C,days:U=7})=>{yN({name:`${y}:${E.value}`,value:C,days:U})};return{id:A,currentPage:M,binnacleId:N,apiBaseURL:i,aplicacion:E,userState:t,goLoginPage:L,goRegistrarPage:B,goRecuperarCont:o,onLogin:u,on2AuthLogin:x,onLogout:O,setBinnacleId:y=>{N.value=y},onLoginCiudadania:async(y,C)=>{try{N.value=y.binnacleId,C&&console.log(C)}catch(U){console.log(U)}},setConfigs:({newBaseURL:y,newAplicacion:C,newRrhhUrl:U,newRedirectLoginFunction:J,newRedirectLogoutFunction:zA})=>{i.value=y,E.value=C,I.value=J,T.value=zA,g.value=U},setDispositivoConfianzaCookie:Y,clearUserData:r,updateUserData:w}});var TA={name:"BaseComponent",props:{pt:{type:Object,default:void 0}},methods:{getOption(A={},M=""){const t=IA.convertToFlatCase(M);return A[Object.keys(A).find(N=>IA.convertToFlatCase(N)===t)||""]},getPTValue(A={},M="",t={}){const N=IA.getItemValue(this.getOption(A,M),t),i=IA.getItemValue(this.getOption(this.defaultPT,M),t);return e.mergeProps(N,i)},ptm(A="",M={}){return this.getPTValue(this.pt,A,{props:this.$props,state:this.$data,...M})},ptmo(A={},M="",t={}){return this.getPTValue(A,M,t)}},computed:{defaultPT(){return IA.getItemValue(this.getOption(this.$primevue.config.pt,this.$.type.name),this.defaultsParams)},defaultsParams(){return{instance:this.$}}}},NA={name:"InputText",extends:TA,emits:["update:modelValue"],props:{modelValue:null},methods:{onInput(A){this.$emit("update:modelValue",A.target.value)}},computed:{filled(){return this.modelValue!=null&&this.modelValue.toString().length>0}}};const rg=["value"];function Cg(A,M,t,N,i,E){return e.openBlock(),e.createElementBlock("input",e.mergeProps({class:["p-inputtext p-component",{"p-filled":E.filled}],value:t.modelValue,onInput:M[0]||(M[0]=(...g)=>E.onInput&&E.onInput(...g))},A.ptm("root")),null,16,rg)}NA.render=Cg;var EA={name:"BaseIcon",props:{label:{type:String,default:void 0},spin:{type:Boolean,default:!1}},methods:{pti(){const A=IA.isEmpty(this.label);return{class:["p-icon",{"p-icon-spin":this.spin}],role:A?void 0:"img","aria-label":A?void 0:this.label,"aria-hidden":A}}}};function lg(A,M){M===void 0&&(M={});var t=M.insertAt;if(!(!A||typeof document>"u")){var N=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",t==="top"&&N.firstChild?N.insertBefore(i,N.firstChild):N.appendChild(i),i.styleSheet?i.styleSheet.cssText=A:i.appendChild(document.createTextNode(A))}}var Yg=`
|
|
28
28
|
.p-icon {
|
|
29
29
|
display: inline-block;
|
|
30
30
|
}
|
|
@@ -9,6 +9,7 @@ export declare const AUTH_STORE: () => {
|
|
|
9
9
|
token: string | undefined;
|
|
10
10
|
refreshToken: string | undefined;
|
|
11
11
|
user: any;
|
|
12
|
+
funcionario: any;
|
|
12
13
|
isAuth: boolean;
|
|
13
14
|
binnacleId?: string | undefined;
|
|
14
15
|
apps: string[];
|
|
@@ -52,6 +53,7 @@ export declare const useLoginStore: import("pinia").StoreDefinition<"LOGIN_STORE
|
|
|
52
53
|
token: string | undefined;
|
|
53
54
|
refreshToken: string | undefined;
|
|
54
55
|
user: any;
|
|
56
|
+
funcionario: any;
|
|
55
57
|
isAuth: boolean;
|
|
56
58
|
binnacleId?: string | undefined;
|
|
57
59
|
apps: string[];
|
|
@@ -94,6 +96,7 @@ export declare const useLoginStore: import("pinia").StoreDefinition<"LOGIN_STORE
|
|
|
94
96
|
token: string | undefined;
|
|
95
97
|
refreshToken: string | undefined;
|
|
96
98
|
user: any;
|
|
99
|
+
funcionario: any;
|
|
97
100
|
isAuth: boolean;
|
|
98
101
|
binnacleId?: string | undefined;
|
|
99
102
|
apps: string[];
|
|
@@ -136,6 +139,7 @@ export declare const useLoginStore: import("pinia").StoreDefinition<"LOGIN_STORE
|
|
|
136
139
|
token: string | undefined;
|
|
137
140
|
refreshToken: string | undefined;
|
|
138
141
|
user: any;
|
|
142
|
+
funcionario: any;
|
|
139
143
|
isAuth: boolean;
|
|
140
144
|
binnacleId?: string | undefined;
|
|
141
145
|
apps: string[];
|