pangea-lib 2.12.2 → 2.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +1 -1
- package/package.json +1 -1
package/dist/main.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(_){return _ instanceof this?_:new this(_)}static concat(_,...N){const W=new this(_);return N.forEach(J=>W.set(J)),W}static accessor(_){const N=(this[m3]=this[m3]={accessors:{}}).accessors,W=this.prototype;function J(a1){const e1=p2(a1);N[e1]||(function(m1,b1){const w1=B.toCamelCase(" "+b1);["get","set","has"].forEach(x1=>{Object.defineProperty(m1,x1+w1,{value:function(F1,P1,Q1){return this[x1].call(this,b1,F1,P1,Q1)},configurable:!0})})}(W,a1),N[e1]=!0)}return B.isArray(_)?_.forEach(J):J(_),this}}l1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),B.reduceDescriptors(l1.prototype,({value:M},_)=>{let N=_[0].toUpperCase()+_.slice(1);return{get:()=>M,set(W){this[N]=W}}}),B.freezeMethods(l1);var s1=l1;function y1(M,_){const N=this||U1,W=_||N,J=s1.from(W.headers);let a1=W.data;return B.forEach(M,function(e1){a1=e1.call(N,a1,J.normalize(),_?_.status:void 0)}),J.normalize(),a1}function k1(M){return!(!M||!M.__CANCEL__)}function K1(M,_,N){I.call(this,M??"canceled",I.ERR_CANCELED,_,N),this.name="CanceledError"}B.inherits(K1,I,{__CANCEL__:!0});var K2=U2.hasStandardBrowserEnv?{write(M,_,N,W,J,a1){const e1=[M+"="+encodeURIComponent(_)];B.isNumber(N)&&e1.push("expires="+new Date(N).toGMTString()),B.isString(W)&&e1.push("path="+W),B.isString(J)&&e1.push("domain="+J),a1===!0&&e1.push("secure"),document.cookie=e1.join("; ")},read(M){const _=document.cookie.match(new RegExp("(^|;\\s*)("+M+")=([^;]*)"));return _?decodeURIComponent(_[3]):null},remove(M){this.write(M,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function i4(M,_){return M&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(_)?function(N,W){return W?N.replace(/\/?\/$/,"")+"/"+W.replace(/^\/+/,""):N}(M,_):_}var C4=U2.hasStandardBrowserEnv?function(){const M=/(msie|trident)/i.test(navigator.userAgent),_=document.createElement("a");let N;function W(J){let a1=J;return M&&(_.setAttribute("href",a1),a1=_.href),_.setAttribute("href",a1),{href:_.href,protocol:_.protocol?_.protocol.replace(/:$/,""):"",host:_.host,search:_.search?_.search.replace(/^\?/,""):"",hash:_.hash?_.hash.replace(/^#/,""):"",hostname:_.hostname,port:_.port,pathname:_.pathname.charAt(0)==="/"?_.pathname:"/"+_.pathname}}return N=W(window.location.href),function(J){const a1=B.isString(J)?W(J):J;return a1.protocol===N.protocol&&a1.host===N.host}}():function(){return!0};function Te(M,_){let N=0;const W=function(J,a1){J=J||10;const e1=new Array(J),m1=new Array(J);let b1,w1=0,x1=0;return a1=a1!==void 0?a1:1e3,function(F1){const P1=Date.now(),Q1=m1[x1];b1||(b1=P1),e1[w1]=F1,m1[w1]=P1;let E1=x1,J1=0;for(;E1!==w1;)J1+=e1[E1++],E1%=J;if(w1=(w1+1)%J,w1===x1&&(x1=(x1+1)%J),P1-b1<a1)return;const H2=Q1&&P1-Q1;return H2?Math.round(1e3*J1/H2):void 0}}(50,250);return J=>{const a1=J.loaded,e1=J.lengthComputable?J.total:void 0,m1=a1-N,b1=W(m1);N=a1;const w1={loaded:a1,total:e1,progress:e1?a1/e1:void 0,bytes:m1,rate:b1||void 0,estimated:b1&&e1&&a1<=e1?(e1-a1)/b1:void 0,event:J};w1[_?"download":"upload"]=!0,M(w1)}}const ie={http:null,xhr:typeof XMLHttpRequest<"u"&&function(M){return new Promise(function(_,N){let W=M.data;const J=s1.from(M.headers).normalize();let a1,e1,{responseType:m1,withXSRFToken:b1}=M;function w1(){M.cancelToken&&M.cancelToken.unsubscribe(a1),M.signal&&M.signal.removeEventListener("abort",a1)}if(B.isFormData(W)){if(U2.hasStandardBrowserEnv||U2.hasStandardBrowserWebWorkerEnv)J.setContentType(!1);else if((e1=J.getContentType())!==!1){const[E1,...J1]=e1?e1.split(";").map(H2=>H2.trim()).filter(Boolean):[];J.setContentType([E1||"multipart/form-data",...J1].join("; "))}}let x1=new XMLHttpRequest;if(M.auth){const E1=M.auth.username||"",J1=M.auth.password?unescape(encodeURIComponent(M.auth.password)):"";J.set("Authorization","Basic "+btoa(E1+":"+J1))}const F1=i4(M.baseURL,M.url);function P1(){if(!x1)return;const E1=s1.from("getAllResponseHeaders"in x1&&x1.getAllResponseHeaders());(function(J1,H2,J2){const Sl=J2.config.validateStatus;J2.status&&Sl&&!Sl(J2.status)?H2(new I("Request failed with status code "+J2.status,[I.ERR_BAD_REQUEST,I.ERR_BAD_RESPONSE][Math.floor(J2.status/100)-4],J2.config,J2.request,J2)):J1(J2)})(function(J1){_(J1),w1()},function(J1){N(J1),w1()},{data:m1&&m1!=="text"&&m1!=="json"?x1.response:x1.responseText,status:x1.status,statusText:x1.statusText,headers:E1,config:M,request:x1}),x1=null}if(x1.open(M.method.toUpperCase(),W1(F1,M.params,M.paramsSerializer),!0),x1.timeout=M.timeout,"onloadend"in x1?x1.onloadend=P1:x1.onreadystatechange=function(){x1&&x1.readyState===4&&(x1.status!==0||x1.responseURL&&x1.responseURL.indexOf("file:")===0)&&setTimeout(P1)},x1.onabort=function(){x1&&(N(new I("Request aborted",I.ECONNABORTED,M,x1)),x1=null)},x1.onerror=function(){N(new I("Network Error",I.ERR_NETWORK,M,x1)),x1=null},x1.ontimeout=function(){let E1=M.timeout?"timeout of "+M.timeout+"ms exceeded":"timeout exceeded";const J1=M.transitional||L1;M.timeoutErrorMessage&&(E1=M.timeoutErrorMessage),N(new I(E1,J1.clarifyTimeoutError?I.ETIMEDOUT:I.ECONNABORTED,M,x1)),x1=null},U2.hasStandardBrowserEnv&&(b1&&B.isFunction(b1)&&(b1=b1(M)),b1||b1!==!1&&C4(F1))){const E1=M.xsrfHeaderName&&M.xsrfCookieName&&K2.read(M.xsrfCookieName);E1&&J.set(M.xsrfHeaderName,E1)}W===void 0&&J.setContentType(null),"setRequestHeader"in x1&&B.forEach(J.toJSON(),function(E1,J1){x1.setRequestHeader(J1,E1)}),B.isUndefined(M.withCredentials)||(x1.withCredentials=!!M.withCredentials),m1&&m1!=="json"&&(x1.responseType=M.responseType),typeof M.onDownloadProgress=="function"&&x1.addEventListener("progress",Te(M.onDownloadProgress,!0)),typeof M.onUploadProgress=="function"&&x1.upload&&x1.upload.addEventListener("progress",Te(M.onUploadProgress)),(M.cancelToken||M.signal)&&(a1=E1=>{x1&&(N(!E1||E1.type?new K1(null,M,x1):E1),x1.abort(),x1=null)},M.cancelToken&&M.cancelToken.subscribe(a1),M.signal&&(M.signal.aborted?a1():M.signal.addEventListener("abort",a1)));const Q1=function(E1){const J1=/^([-+\w]{1,25})(:?\/\/|:)/.exec(E1);return J1&&J1[1]||""}(F1);Q1&&U2.protocols.indexOf(Q1)===-1?N(new I("Unsupported protocol "+Q1+":",I.ERR_BAD_REQUEST,M)):x1.send(W||null)})}};B.forEach(ie,(M,_)=>{if(M){try{Object.defineProperty(M,"name",{value:_})}catch{}Object.defineProperty(M,"adapterName",{value:_})}});const s4=M=>`- ${M}`,r6=M=>B.isFunction(M)||M===null||M===!1;var a8=M=>{M=B.isArray(M)?M:[M];const{length:_}=M;let N,W;const J={};for(let a1=0;a1<_;a1++){let e1;if(N=M[a1],W=N,!r6(N)&&(W=ie[(e1=String(N)).toLowerCase()],W===void 0))throw new I(`Unknown adapter '${e1}'`);if(W)break;J[e1||"#"+a1]=W}if(!W){const a1=Object.entries(J).map(([e1,m1])=>`adapter ${e1} `+(m1===!1?"is not supported by the environment":"is not available in the build"));throw new I("There is no suitable adapter to dispatch the request "+(_?a1.length>1?`since :
|
|
4
4
|
`+a1.map(s4).join(`
|
|
5
5
|
`):" "+s4(a1[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return W};function J8(M){if(M.cancelToken&&M.cancelToken.throwIfRequested(),M.signal&&M.signal.aborted)throw new K1(null,M)}function va(M){return J8(M),M.headers=s1.from(M.headers),M.data=y1.call(M,M.transformRequest),["post","put","patch"].indexOf(M.method)!==-1&&M.headers.setContentType("application/x-www-form-urlencoded",!1),a8(M.adapter||U1.adapter)(M).then(function(_){return J8(M),_.data=y1.call(M,M.transformResponse,_),_.headers=s1.from(_.headers),_},function(_){return k1(_)||(J8(M),_&&_.response&&(_.response.data=y1.call(M,M.transformResponse,_.response),_.response.headers=s1.from(_.response.headers))),Promise.reject(_)})}const ga=M=>M instanceof s1?{...M}:M;function se(M,_){_=_||{};const N={};function W(w1,x1,F1){return B.isPlainObject(w1)&&B.isPlainObject(x1)?B.merge.call({caseless:F1},w1,x1):B.isPlainObject(x1)?B.merge({},x1):B.isArray(x1)?x1.slice():x1}function J(w1,x1,F1){return B.isUndefined(x1)?B.isUndefined(w1)?void 0:W(void 0,w1,F1):W(w1,x1,F1)}function a1(w1,x1){if(!B.isUndefined(x1))return W(void 0,x1)}function e1(w1,x1){return B.isUndefined(x1)?B.isUndefined(w1)?void 0:W(void 0,w1):W(void 0,x1)}function m1(w1,x1,F1){return F1 in _?W(w1,x1):F1 in M?W(void 0,w1):void 0}const b1={url:a1,method:a1,data:a1,baseURL:e1,transformRequest:e1,transformResponse:e1,paramsSerializer:e1,timeout:e1,timeoutMessage:e1,withCredentials:e1,withXSRFToken:e1,adapter:e1,responseType:e1,xsrfCookieName:e1,xsrfHeaderName:e1,onUploadProgress:e1,onDownloadProgress:e1,decompress:e1,maxContentLength:e1,maxBodyLength:e1,beforeRedirect:e1,transport:e1,httpAgent:e1,httpsAgent:e1,cancelToken:e1,socketPath:e1,responseEncoding:e1,validateStatus:m1,headers:(w1,x1)=>J(ga(w1),ga(x1),!0)};return B.forEach(Object.keys(Object.assign({},M,_)),function(w1){const x1=b1[w1]||J,F1=x1(M[w1],_[w1],w1);B.isUndefined(F1)&&x1!==m1||(N[w1]=F1)}),N}const et={};["object","boolean","number","function","string","symbol"].forEach((M,_)=>{et[M]=function(N){return typeof N===M||"a"+(_<1?"n ":" ")+M}});const xa={};et.transitional=function(M,_,N){function W(J,a1){return"[Axios v1.6.8] Transitional option '"+J+"'"+a1+(N?". "+N:"")}return(J,a1,e1)=>{if(M===!1)throw new I(W(a1," has been removed"+(_?" in "+_:"")),I.ERR_DEPRECATED);return _&&!xa[a1]&&(xa[a1]=!0,console.warn(W(a1," has been deprecated since v"+_+" and will be removed in the near future"))),!M||M(J,a1,e1)}};var tt={assertOptions:function(M,_,N){if(typeof M!="object")throw new I("options must be an object",I.ERR_BAD_OPTION_VALUE);const W=Object.keys(M);let J=W.length;for(;J-- >0;){const a1=W[J],e1=_[a1];if(e1){const m1=M[a1],b1=m1===void 0||e1(m1,a1,M);if(b1!==!0)throw new I("option "+a1+" must be "+b1,I.ERR_BAD_OPTION_VALUE)}else if(N!==!0)throw new I("Unknown option "+a1,I.ERR_BAD_OPTION)}},validators:et};const T=tt.validators;class q{constructor(_){this.defaults=_,this.interceptors={request:new $1,response:new $1}}async request(_,N){try{return await this._request(_,N)}catch(W){if(W instanceof Error){let J;Error.captureStackTrace?Error.captureStackTrace(J={}):J=new Error;const a1=J.stack?J.stack.replace(/^.+\n/,""):"";W.stack?a1&&!String(W.stack).endsWith(a1.replace(/^.+\n.+\n/,""))&&(W.stack+=`
|
|
6
|
-
`+a1):W.stack=a1}throw W}}_request(_,N){typeof _=="string"?(N=N||{}).url=_:N=_||{},N=se(this.defaults,N);const{transitional:W,paramsSerializer:J,headers:a1}=N;W!==void 0&&tt.assertOptions(W,{silentJSONParsing:T.transitional(T.boolean),forcedJSONParsing:T.transitional(T.boolean),clarifyTimeoutError:T.transitional(T.boolean)},!1),J!=null&&(B.isFunction(J)?N.paramsSerializer={serialize:J}:tt.assertOptions(J,{encode:T.function,serialize:T.function},!0)),N.method=(N.method||this.defaults.method||"get").toLowerCase();let e1=a1&&B.merge(a1.common,a1[N.method]);a1&&B.forEach(["delete","get","head","post","put","patch","common"],E1=>{delete a1[E1]}),N.headers=s1.concat(e1,a1);const m1=[];let b1=!0;this.interceptors.request.forEach(function(E1){typeof E1.runWhen=="function"&&E1.runWhen(N)===!1||(b1=b1&&E1.synchronous,m1.unshift(E1.fulfilled,E1.rejected))});const w1=[];let x1;this.interceptors.response.forEach(function(E1){w1.push(E1.fulfilled,E1.rejected)});let F1,P1=0;if(!b1){const E1=[va.bind(this),void 0];for(E1.unshift.apply(E1,m1),E1.push.apply(E1,w1),F1=E1.length,x1=Promise.resolve(N);P1<F1;)x1=x1.then(E1[P1++],E1[P1++]);return x1}F1=m1.length;let Q1=N;for(P1=0;P1<F1;){const E1=m1[P1++],J1=m1[P1++];try{Q1=E1(Q1)}catch(H2){J1.call(this,H2);break}}try{x1=va.call(this,Q1)}catch(E1){return Promise.reject(E1)}for(P1=0,F1=w1.length;P1<F1;)x1=x1.then(w1[P1++],w1[P1++]);return x1}getUri(_){return W1(i4((_=se(this.defaults,_)).baseURL,_.url),_.params,_.paramsSerializer)}}B.forEach(["delete","get","head","options"],function(M){q.prototype[M]=function(_,N){return this.request(se(N||{},{method:M,url:_,data:(N||{}).data}))}}),B.forEach(["post","put","patch"],function(M){function _(N){return function(W,J,a1){return this.request(se(a1||{},{method:M,headers:N?{"Content-Type":"multipart/form-data"}:{},url:W,data:J}))}}q.prototype[M]=_(),q.prototype[M+"Form"]=_(!0)});var R=q;class U{constructor(_){if(typeof _!="function")throw new TypeError("executor must be a function.");let N;this.promise=new Promise(function(J){N=J});const W=this;this.promise.then(J=>{if(!W._listeners)return;let a1=W._listeners.length;for(;a1-- >0;)W._listeners[a1](J);W._listeners=null}),this.promise.then=J=>{let a1;const e1=new Promise(m1=>{W.subscribe(m1),a1=m1}).then(J);return e1.cancel=function(){W.unsubscribe(a1)},e1},_(function(J,a1,e1){W.reason||(W.reason=new K1(J,a1,e1),N(W.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(_){this.reason?_(this.reason):this._listeners?this._listeners.push(_):this._listeners=[_]}unsubscribe(_){if(!this._listeners)return;const N=this._listeners.indexOf(_);N!==-1&&this._listeners.splice(N,1)}static source(){let _;return{token:new U(function(N){_=N}),cancel:_}}}var Z=U;const Q={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(Q).forEach(([M,_])=>{Q[_]=M});var u1=Q;const d1=function M(_){const N=new R(_),W=l(R.prototype.request,N);return B.extend(W,R.prototype,N,{allOwnKeys:!0}),B.extend(W,N,null,{allOwnKeys:!0}),W.create=function(J){return M(se(_,J))},W}(U1);d1.Axios=R,d1.CanceledError=K1,d1.CancelToken=Z,d1.isCancel=k1,d1.VERSION="1.6.8",d1.toFormData=V1,d1.AxiosError=I,d1.Cancel=d1.CanceledError,d1.all=function(M){return Promise.all(M)},d1.spread=function(M){return function(_){return M.apply(null,_)}},d1.isAxiosError=function(M){return B.isObject(M)&&M.isAxiosError===!0},d1.mergeConfig=se,d1.AxiosHeaders=s1,d1.formToJSON=M=>W2(B.isHTMLForm(M)?new FormData(M):M),d1.getAdapter=a8,d1.HttpStatusCode=u1,d1.default=d1,n.exports=d1}},r={};function c(n){var i=r[n];if(i!==void 0)return i.exports;var s=r[n]={exports:{}};return a[n].call(s.exports,s,s.exports,c),s.exports}return c.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),c(927)})())})(Mm);var B3=Mm.exports,ve;let X2=(ve=class{constructor(t){o1(this,"config");this.config=t}static init(t){if(ve.instance)throw new Error("Config is already initialized");ve.instance=new ve(t)}static getConfig(){if(!ve.instance)throw new Error("Config is not initialized. Call init() first.");return ve.instance.config}},o1(ve,"instance"),ve);const Je=Z4.defineStore("pga-app-options",()=>{const e=o.ref(!1),t=o.ref({language:"es",theme:"light"}),a=o.computed({get(){return t.value.language},set(l){t.value.language=l}}),r=o.computed({get(){return t.value.theme},set(l){t.value.theme=l}});o.watch(r,()=>Ns);function c(l){e.value||(e.value=!0,t.value=B3.mergeDeep(t.value,l))}function n(l){a.value=l}function i(l){r.value=l}function s(){r.value=r.value==="light"?"dark":"light"}return{options:t,language:a,theme:r,init:c,setLanguage:n,setTheme:i,changeTheme:s}},{persist:!0}),RS=os(),_4=Z4.defineStore("pga-route",()=>{const e=o.ref(),t=o.ref(!RS),a=o.computed(()=>yp(e.value)),r=o.computed(()=>{var s;return W5(a.value,(s=e.value)==null?void 0:s.name)}),c=o.computed(()=>{var s;return(s=e.value)==null?void 0:s.meta.access}),n=o.computed(()=>{var s;return!!((s=e.value)!=null&&s.meta.preventDisplayNavigationBars)}),i=o.computed(()=>!n.value&&t.value);return{currentRoute:e,isSideBarOpen:t,currentRouteType:a,currentRouteTitle:r,currentRouteAccess:c,preventDisplayNavigationBars:n,isDisplayingSideBar:i}}),IS={es:{successfulLogout:"¡Vuelva pronto!"}},$S={es:{alertTitle:"¿Estás seguro?",cancelBtn:"Cancelar",acceptBtn:"Eliminar"}},US={es:{INTERNAL_SERVER_ERROR:"Ha ocurrido un error",DUPLICATE_KEY:"Item ya creado",FOREIGN_KEY_INTEGRITY:"El item no existe",MODELS_ASSOCIATED:"No se puede eliminar porque tiene items asociados",INVALID_INPUT_DATA:"Los datos ingresados no son correctos",ENTITY_NOT_FOUND:"El item no existe",INVALID_CREDENTIALS:"Usuario o contraseña incorrectos",UNAUTHORIZED:"No autorizado"}},WS={es:{LOGIN:"¡Bienvenido!"}},YS={es:{noItemsText:"No hay resultados"}},jS={es:{cancelBtn:"Cancelar",selectBtn:"Seleccionar"}},GS={es:{selectFileLabel:"Seleccione un archivo",removeBtn:"Eliminar archivo",newFileError:"Formato inválido"}},qS={es:{optionalLabel:"Opcional"}},XS={es:{usernameLabel:"Usuario",passwordLabel:"Contraseña",loginBtn:"Iniciar sesión"}},ZS={es:{emptyOptionsText:"No hay opciones"}},QS={es:{confirmDeleteText:"La imagen se eliminará permanentemente."}},KS={es:{backBtn:"Volver",deleteBtn:"Eliminar",confirmDeleteText:"",editBtn:"Editar",logoutBtn:"Cerrar sesión"}},JS={es:{header:{switchToLightMode:"Cambiar a modo claro",switchToDarkMode:"Cambiar a modo oscuro",logout:"Cerrar sesión"},footer:{allRightsReserved:"Todos los derechos reservados",designedBy:"Diseñado por"}}},eA={es:{cancelBtn:"Cancelar",acceptBtn:"Guardar"}},tA={es:{columnTitleActions:"",selectAllBtn:"Seleccionar todo",withTheSelectedItemsText:"Con los seleccionados:",filtersBtn:"Filtros",filtersModalTitle:"Filtros",confirmDeleteText:'¿Eliminar "{description}"?'}},aA={es:{removeAllBtn:"Eliminar todo"}},rA={es:{requiredRuleError:"Campo requerido",minLengthRuleError:"Longitud mínima: {length} caracteres",maxLengthRuleError:"Longitud máxima: {length} caracteres",integerRuleError:"Ingrese un valor entero",lessEqualRuleError:"Ingrese un valor menor o igual a {number}",greaterEqualRuleError:"Ingrese un valor mayor o igual a {number}",lessThanRuleError:"Ingrese un valor menor a {number}",greaterThanRuleError:"Ingrese un valor mayor a {number}"}},cA={authHelpers:IS,alert:$S,apiConnectionsError:US,apiConnectionsSuccess:WS,pgaDisplayNoItems:YS,pgaDatePicker:jS,pgaInputFile:GS,pgaInputGroup:qS,pgaLoginForm:XS,pgaSelect:ZS,pgaImage:QS,pgaButton:KS,pgaLayout:JS,pgaModal:eA,pgaTable:tA,notifications:aA,validations:rA};function ym(e){function t(a,r){return function(c,n={}){const i=Je().language,s=e==null?void 0:e[a],l=s==null?void 0:s[i],f=r?r.split(".").reduce((p,v)=>p==null?void 0:p[v],l):l,u=(f==null?void 0:f[c])||"",h=n.count||0,d=u.split("|").map(p=>p.trim());let m=d[0];d.length===2?m=h===1?d[0]:d[1]:d.length===3&&(m=h===0?d[0]:h===1?d[1]:d[2]),m=m.replace(new RegExp("{count}","g"),h.toString());for(const p in n)p!=="count"&&n[p]!==void 0&&n[p]!==null&&(m=m.replace(new RegExp(`{${p}}`,"g"),n[p].toString()));return m}}return t}const I2=ym(cA),nA=I2("authHelpers");function bm(){const e=X2.getConfig().stores.useAuthStore(),t=_4().currentRouteType,a=`auth${B3.getFirstChartInUppercase(t)}`;return!!e[a].accessToken&&!!e[a].user.id}function Hm(){const e=X2.getConfig().stores.useAuthStore(),t=_4().currentRouteType,a=`auth${B3.getFirstChartInUppercase(t)}`;return e[a].accessToken}async function Vm(e,t,a){const r=X2.getConfig(),c=r.stores.useAuthStore(),n=`authentication/login/${e}`,i={basicAuth:t,isLoadingRef:a==null?void 0:a.isLoadingRef},s=await r.api.postOne(n,void 0,i);c.setAuthUser(e,s.data);const l={name:(a==null?void 0:a.redirectToName)||r.defaultRoutes[e].auth};r.router.push(l)}async function wm(){const e=X2.getConfig(),t=e.stores.useAuthStore(),a=_4().currentRouteType;try{const r=`authentication/validateAccessToken/${a}`,c=await e.api.getOne(r,void 0,void 0,{preventDisplayError:!0});t.setAuthUser(a,c.data)}catch{t.setAuthUser(a)}}function _m(e){const t=X2.getConfig();t.stores.useAuthStore().setAuthUser(e),E0("success",()=>nA("successfulLogout"));const r={name:`login${B3.getFirstChartInUppercase(e)}`};t.router.push(r)}function _7(e,t){const a=e.toLocaleString(Je().language,{maximumFractionDigits:t});return a==="-0"?"0":a}function iA(e,t,a,r=!0){let c=_7(e,t);return r&&(c=c+=` ${a}`),c}function os(){return window.innerWidth<=768}function k7(e,t,a){const r=document.querySelector(":root"),c="--pga-",n=a!=null&&a.preventConvertToKebab?e:B3.camelToKebab(e);r.style.setProperty(`${c}${n}`,t)}function L7(e){const t=e?"visible":"hidden";document.body.style.overflow=t}function sA(e,t,a="animate__"){return new Promise(r=>{const c=`${a}${t}`,n=document.querySelector(e);if(n){n.classList.add(`${a}animated`,c);const i=s=>{s.stopPropagation(),n==null||n.classList.remove(`${a}animated`,c),r("Animation ended")};n.addEventListener("animationend",i,{once:!0})}})}function km(e,t){let a=0,r=0,c=0,n=0;if(e.startsWith("rgb")||e.startsWith("rgba")){const s=e.replace(/rgba?\((.*?)\)/,"$1").replace(/\s/g,""),[,l,f,u,h="1"]=s.match(/(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?/);a=parseInt(l),r=parseInt(f),c=parseInt(u),n=parseFloat(h)}if(e.startsWith("#")){let s=e;s.length===4&&(s="#"+s[1]+s[1]+s[2]+s[2]+s[3]+s[3]);let[,l,f,u,h]=s.match(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i).map((d,m)=>m===4?parseInt(d,16)/255:parseInt(d,16));h=h?parseFloat(h.toFixed(3)):1,a=l,r=f,c=u,n=h}const i=t/100;return`rgba(${a}, ${r}, ${c}, ${n*i})`}function In(e,t){const r=`color-${B3.camelToKebab(e)}`,c={preventConvertToKebab:!0};k7(r,t,c);for(let n=5;n<=95;n+=5){const i=n<10?`0${n}`:n%10===0?`${n/10}`:`${n}`;k7(`${r}-0${i}`,km(t,n),c)}}function oA(){const e=zm,t=Math.floor(Math.random()*Object.keys(e).length);return e[Object.keys(e)[t]]}function lA(e,t){const r={...{format:"short",withTime:!0},...t};if(!e)return"-";const c={weekday:r.format==="numbers"?void 0:r.format,year:"numeric",month:r.format==="numbers"?"2-digit":r.format,day:"2-digit",hour:r.withTime?"2-digit":void 0,minute:r.withTime?"2-digit":void 0,hour12:!1},n=e.toLocaleString("es-ES",c);return n.charAt(0).toUpperCase()+n.slice(1)}function Lm(e){if(!e)return!1;let t=e;const a=["http://","https://"];for(const r of a)if(e.startsWith(r)){t=e.replace(r,"");break}return t=t.replace(/:(\d*)$/,""),window.location.href.includes(t)}const Sm=["production","demo","testing","development"];function fA(e,t){if(t)return t;for(const a of Sm)for(const r of e[a])if(Lm(r))return a;throw Error("Incorrect URL")}//! moment.js
|
|
6
|
+
`+a1):W.stack=a1}throw W}}_request(_,N){typeof _=="string"?(N=N||{}).url=_:N=_||{},N=se(this.defaults,N);const{transitional:W,paramsSerializer:J,headers:a1}=N;W!==void 0&&tt.assertOptions(W,{silentJSONParsing:T.transitional(T.boolean),forcedJSONParsing:T.transitional(T.boolean),clarifyTimeoutError:T.transitional(T.boolean)},!1),J!=null&&(B.isFunction(J)?N.paramsSerializer={serialize:J}:tt.assertOptions(J,{encode:T.function,serialize:T.function},!0)),N.method=(N.method||this.defaults.method||"get").toLowerCase();let e1=a1&&B.merge(a1.common,a1[N.method]);a1&&B.forEach(["delete","get","head","post","put","patch","common"],E1=>{delete a1[E1]}),N.headers=s1.concat(e1,a1);const m1=[];let b1=!0;this.interceptors.request.forEach(function(E1){typeof E1.runWhen=="function"&&E1.runWhen(N)===!1||(b1=b1&&E1.synchronous,m1.unshift(E1.fulfilled,E1.rejected))});const w1=[];let x1;this.interceptors.response.forEach(function(E1){w1.push(E1.fulfilled,E1.rejected)});let F1,P1=0;if(!b1){const E1=[va.bind(this),void 0];for(E1.unshift.apply(E1,m1),E1.push.apply(E1,w1),F1=E1.length,x1=Promise.resolve(N);P1<F1;)x1=x1.then(E1[P1++],E1[P1++]);return x1}F1=m1.length;let Q1=N;for(P1=0;P1<F1;){const E1=m1[P1++],J1=m1[P1++];try{Q1=E1(Q1)}catch(H2){J1.call(this,H2);break}}try{x1=va.call(this,Q1)}catch(E1){return Promise.reject(E1)}for(P1=0,F1=w1.length;P1<F1;)x1=x1.then(w1[P1++],w1[P1++]);return x1}getUri(_){return W1(i4((_=se(this.defaults,_)).baseURL,_.url),_.params,_.paramsSerializer)}}B.forEach(["delete","get","head","options"],function(M){q.prototype[M]=function(_,N){return this.request(se(N||{},{method:M,url:_,data:(N||{}).data}))}}),B.forEach(["post","put","patch"],function(M){function _(N){return function(W,J,a1){return this.request(se(a1||{},{method:M,headers:N?{"Content-Type":"multipart/form-data"}:{},url:W,data:J}))}}q.prototype[M]=_(),q.prototype[M+"Form"]=_(!0)});var R=q;class U{constructor(_){if(typeof _!="function")throw new TypeError("executor must be a function.");let N;this.promise=new Promise(function(J){N=J});const W=this;this.promise.then(J=>{if(!W._listeners)return;let a1=W._listeners.length;for(;a1-- >0;)W._listeners[a1](J);W._listeners=null}),this.promise.then=J=>{let a1;const e1=new Promise(m1=>{W.subscribe(m1),a1=m1}).then(J);return e1.cancel=function(){W.unsubscribe(a1)},e1},_(function(J,a1,e1){W.reason||(W.reason=new K1(J,a1,e1),N(W.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(_){this.reason?_(this.reason):this._listeners?this._listeners.push(_):this._listeners=[_]}unsubscribe(_){if(!this._listeners)return;const N=this._listeners.indexOf(_);N!==-1&&this._listeners.splice(N,1)}static source(){let _;return{token:new U(function(N){_=N}),cancel:_}}}var Z=U;const Q={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(Q).forEach(([M,_])=>{Q[_]=M});var u1=Q;const d1=function M(_){const N=new R(_),W=l(R.prototype.request,N);return B.extend(W,R.prototype,N,{allOwnKeys:!0}),B.extend(W,N,null,{allOwnKeys:!0}),W.create=function(J){return M(se(_,J))},W}(U1);d1.Axios=R,d1.CanceledError=K1,d1.CancelToken=Z,d1.isCancel=k1,d1.VERSION="1.6.8",d1.toFormData=V1,d1.AxiosError=I,d1.Cancel=d1.CanceledError,d1.all=function(M){return Promise.all(M)},d1.spread=function(M){return function(_){return M.apply(null,_)}},d1.isAxiosError=function(M){return B.isObject(M)&&M.isAxiosError===!0},d1.mergeConfig=se,d1.AxiosHeaders=s1,d1.formToJSON=M=>W2(B.isHTMLForm(M)?new FormData(M):M),d1.getAdapter=a8,d1.HttpStatusCode=u1,d1.default=d1,n.exports=d1}},r={};function c(n){var i=r[n];if(i!==void 0)return i.exports;var s=r[n]={exports:{}};return a[n].call(s.exports,s,s.exports,c),s.exports}return c.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),c(927)})())})(Mm);var B3=Mm.exports,ve;let X2=(ve=class{constructor(t){o1(this,"config");this.config=t}static init(t){if(ve.instance)throw new Error("Config is already initialized");ve.instance=new ve(t)}static getConfig(){if(!ve.instance)throw new Error("Config is not initialized. Call init() first.");return ve.instance.config}},o1(ve,"instance"),ve);const Je=Z4.defineStore("pga-app-options",()=>{const e=o.ref(!1),t=o.ref({language:"es",theme:"light"}),a=o.computed({get(){return t.value.language},set(l){t.value.language=l}}),r=o.computed({get(){return t.value.theme},set(l){t.value.theme=l}});o.watch(r,()=>Ns());function c(l){e.value||(e.value=!0,t.value=B3.mergeDeep(t.value,l))}function n(l){a.value=l}function i(l){r.value=l}function s(){r.value=r.value==="light"?"dark":"light"}return{options:t,language:a,theme:r,init:c,setLanguage:n,setTheme:i,changeTheme:s}},{persist:!0}),RS=os(),_4=Z4.defineStore("pga-route",()=>{const e=o.ref(),t=o.ref(!RS),a=o.computed(()=>yp(e.value)),r=o.computed(()=>{var s;return W5(a.value,(s=e.value)==null?void 0:s.name)}),c=o.computed(()=>{var s;return(s=e.value)==null?void 0:s.meta.access}),n=o.computed(()=>{var s;return!!((s=e.value)!=null&&s.meta.preventDisplayNavigationBars)}),i=o.computed(()=>!n.value&&t.value);return{currentRoute:e,isSideBarOpen:t,currentRouteType:a,currentRouteTitle:r,currentRouteAccess:c,preventDisplayNavigationBars:n,isDisplayingSideBar:i}}),IS={es:{successfulLogout:"¡Vuelva pronto!"}},$S={es:{alertTitle:"¿Estás seguro?",cancelBtn:"Cancelar",acceptBtn:"Eliminar"}},US={es:{INTERNAL_SERVER_ERROR:"Ha ocurrido un error",DUPLICATE_KEY:"Item ya creado",FOREIGN_KEY_INTEGRITY:"El item no existe",MODELS_ASSOCIATED:"No se puede eliminar porque tiene items asociados",INVALID_INPUT_DATA:"Los datos ingresados no son correctos",ENTITY_NOT_FOUND:"El item no existe",INVALID_CREDENTIALS:"Usuario o contraseña incorrectos",UNAUTHORIZED:"No autorizado"}},WS={es:{LOGIN:"¡Bienvenido!"}},YS={es:{noItemsText:"No hay resultados"}},jS={es:{cancelBtn:"Cancelar",selectBtn:"Seleccionar"}},GS={es:{selectFileLabel:"Seleccione un archivo",removeBtn:"Eliminar archivo",newFileError:"Formato inválido"}},qS={es:{optionalLabel:"Opcional"}},XS={es:{usernameLabel:"Usuario",passwordLabel:"Contraseña",loginBtn:"Iniciar sesión"}},ZS={es:{emptyOptionsText:"No hay opciones"}},QS={es:{confirmDeleteText:"La imagen se eliminará permanentemente."}},KS={es:{backBtn:"Volver",deleteBtn:"Eliminar",confirmDeleteText:"",editBtn:"Editar",logoutBtn:"Cerrar sesión"}},JS={es:{header:{switchToLightMode:"Cambiar a modo claro",switchToDarkMode:"Cambiar a modo oscuro",logout:"Cerrar sesión"},footer:{allRightsReserved:"Todos los derechos reservados",designedBy:"Diseñado por"}}},eA={es:{cancelBtn:"Cancelar",acceptBtn:"Guardar"}},tA={es:{columnTitleActions:"",selectAllBtn:"Seleccionar todo",withTheSelectedItemsText:"Con los seleccionados:",filtersBtn:"Filtros",filtersModalTitle:"Filtros",confirmDeleteText:'¿Eliminar "{description}"?'}},aA={es:{removeAllBtn:"Eliminar todo"}},rA={es:{requiredRuleError:"Campo requerido",minLengthRuleError:"Longitud mínima: {length} caracteres",maxLengthRuleError:"Longitud máxima: {length} caracteres",integerRuleError:"Ingrese un valor entero",lessEqualRuleError:"Ingrese un valor menor o igual a {number}",greaterEqualRuleError:"Ingrese un valor mayor o igual a {number}",lessThanRuleError:"Ingrese un valor menor a {number}",greaterThanRuleError:"Ingrese un valor mayor a {number}"}},cA={authHelpers:IS,alert:$S,apiConnectionsError:US,apiConnectionsSuccess:WS,pgaDisplayNoItems:YS,pgaDatePicker:jS,pgaInputFile:GS,pgaInputGroup:qS,pgaLoginForm:XS,pgaSelect:ZS,pgaImage:QS,pgaButton:KS,pgaLayout:JS,pgaModal:eA,pgaTable:tA,notifications:aA,validations:rA};function ym(e){function t(a,r){return function(c,n={}){const i=Je().language,s=e==null?void 0:e[a],l=s==null?void 0:s[i],f=r?r.split(".").reduce((p,v)=>p==null?void 0:p[v],l):l,u=(f==null?void 0:f[c])||"",h=n.count||0,d=u.split("|").map(p=>p.trim());let m=d[0];d.length===2?m=h===1?d[0]:d[1]:d.length===3&&(m=h===0?d[0]:h===1?d[1]:d[2]),m=m.replace(new RegExp("{count}","g"),h.toString());for(const p in n)p!=="count"&&n[p]!==void 0&&n[p]!==null&&(m=m.replace(new RegExp(`{${p}}`,"g"),n[p].toString()));return m}}return t}const I2=ym(cA),nA=I2("authHelpers");function bm(){const e=X2.getConfig().stores.useAuthStore(),t=_4().currentRouteType,a=`auth${B3.getFirstChartInUppercase(t)}`;return!!e[a].accessToken&&!!e[a].user.id}function Hm(){const e=X2.getConfig().stores.useAuthStore(),t=_4().currentRouteType,a=`auth${B3.getFirstChartInUppercase(t)}`;return e[a].accessToken}async function Vm(e,t,a){const r=X2.getConfig(),c=r.stores.useAuthStore(),n=`authentication/login/${e}`,i={basicAuth:t,isLoadingRef:a==null?void 0:a.isLoadingRef},s=await r.api.postOne(n,void 0,i);c.setAuthUser(e,s.data);const l={name:(a==null?void 0:a.redirectToName)||r.defaultRoutes[e].auth};r.router.push(l)}async function wm(){const e=X2.getConfig(),t=e.stores.useAuthStore(),a=_4().currentRouteType;try{const r=`authentication/validateAccessToken/${a}`,c=await e.api.getOne(r,void 0,void 0,{preventDisplayError:!0});t.setAuthUser(a,c.data)}catch{t.setAuthUser(a)}}function _m(e){const t=X2.getConfig();t.stores.useAuthStore().setAuthUser(e),E0("success",()=>nA("successfulLogout"));const r={name:`login${B3.getFirstChartInUppercase(e)}`};t.router.push(r)}function _7(e,t){const a=e.toLocaleString(Je().language,{maximumFractionDigits:t});return a==="-0"?"0":a}function iA(e,t,a,r=!0){let c=_7(e,t);return r&&(c=c+=` ${a}`),c}function os(){return window.innerWidth<=768}function k7(e,t,a){const r=document.querySelector(":root"),c="--pga-",n=a!=null&&a.preventConvertToKebab?e:B3.camelToKebab(e);r.style.setProperty(`${c}${n}`,t)}function L7(e){const t=e?"visible":"hidden";document.body.style.overflow=t}function sA(e,t,a="animate__"){return new Promise(r=>{const c=`${a}${t}`,n=document.querySelector(e);if(n){n.classList.add(`${a}animated`,c);const i=s=>{s.stopPropagation(),n==null||n.classList.remove(`${a}animated`,c),r("Animation ended")};n.addEventListener("animationend",i,{once:!0})}})}function km(e,t){let a=0,r=0,c=0,n=0;if(e.startsWith("rgb")||e.startsWith("rgba")){const s=e.replace(/rgba?\((.*?)\)/,"$1").replace(/\s/g,""),[,l,f,u,h="1"]=s.match(/(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?/);a=parseInt(l),r=parseInt(f),c=parseInt(u),n=parseFloat(h)}if(e.startsWith("#")){let s=e;s.length===4&&(s="#"+s[1]+s[1]+s[2]+s[2]+s[3]+s[3]);let[,l,f,u,h]=s.match(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i).map((d,m)=>m===4?parseInt(d,16)/255:parseInt(d,16));h=h?parseFloat(h.toFixed(3)):1,a=l,r=f,c=u,n=h}const i=t/100;return`rgba(${a}, ${r}, ${c}, ${n*i})`}function In(e,t){const r=`color-${B3.camelToKebab(e)}`,c={preventConvertToKebab:!0};k7(r,t,c);for(let n=5;n<=95;n+=5){const i=n<10?`0${n}`:n%10===0?`${n/10}`:`${n}`;k7(`${r}-0${i}`,km(t,n),c)}}function oA(){const e=zm,t=Math.floor(Math.random()*Object.keys(e).length);return e[Object.keys(e)[t]]}function lA(e,t){const r={...{format:"short",withTime:!0},...t};if(!e)return"-";const c={weekday:r.format==="numbers"?void 0:r.format,year:"numeric",month:r.format==="numbers"?"2-digit":r.format,day:"2-digit",hour:r.withTime?"2-digit":void 0,minute:r.withTime?"2-digit":void 0,hour12:!1},n=e.toLocaleString("es-ES",c);return n.charAt(0).toUpperCase()+n.slice(1)}function Lm(e){if(!e)return!1;let t=e;const a=["http://","https://"];for(const r of a)if(e.startsWith(r)){t=e.replace(r,"");break}return t=t.replace(/:(\d*)$/,""),window.location.href.includes(t)}const Sm=["production","demo","testing","development"];function fA(e,t){if(t)return t;for(const a of Sm)for(const r of e[a])if(Lm(r))return a;throw Error("Incorrect URL")}//! moment.js
|
|
7
7
|
//! version : 2.30.1
|
|
8
8
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
9
9
|
//! license : MIT
|
package/dist/main.es.js
CHANGED