@luizleon/sf.prefeiturasp.vuecomponents 4.1.14 → 4.1.16
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/http-client/apiClient.d.ts +2 -1
- package/dist/sf.prefeiturasp.vuecomponents.cjs +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.cjs.map +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.js +11 -10
- package/dist/sf.prefeiturasp.vuecomponents.js.map +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.cjs +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -412,5 +412,5 @@ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_m
|
|
|
412
412
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Ps]=this[Ps]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=yn(s);r[a]||(_p(o,s),r[a]=!0)}return g.isArray(e)?e.forEach(i):i(e),this}}Se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),g.reduceDescriptors(Se.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),g.freezeMethods(Se);function Zr(t,e){const n=this||gn,r=e||n,o=Se.from(r.headers);let i=r.data;return g.forEach(t,function(a){i=a.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function Is(t){return!!(t&&t.__CANCEL__)}function Bt(t,e,n){M.call(this,t??"canceled",M.ERR_CANCELED,e,n),this.name="CanceledError"}g.inherits(Bt,M,{__CANCEL__:!0});function Os(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new M("Request failed with status code "+n.status,[M.ERR_BAD_REQUEST,M.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kp(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Cp(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),f=r[i];s||(s=u),n[o]=c,r[o]=u;let m=i,v=0;for(;m!==o;)v+=n[m++],m=m%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-s<e)return;const _=f&&u-f;return _?Math.round(v*1e3/_):void 0}}function Ep(t,e){let n=0,r=1e3/e,o,i;const s=(u,f=Date.now())=>{n=f,o=null,i&&(clearTimeout(i),i=null),t.apply(null,u)};return[(...u)=>{const f=Date.now(),m=f-n;m>=r?s(u,f):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-m)))},()=>o&&s(o)]}const Yn=(t,e,n=3)=>{let r=0;const o=Cp(50,250);return Ep(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-r,u=o(c),f=s<=a;r=s;const m={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&f?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(m)},n)},xs=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Ls=t=>(...e)=>g.asap(()=>t(...e)),Tp=ze.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(s){const a=g.isString(s)?o(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),Ap=ze.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];g.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),g.isString(r)&&s.push("path="+r),g.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Pp(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ip(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Rs(t,e){return t&&!Pp(e)?Ip(t,e):e}const $s=t=>t instanceof Se?{...t}:t;function St(t,e){e=e||{};const n={};function r(u,f,m){return g.isPlainObject(u)&&g.isPlainObject(f)?g.merge.call({caseless:m},u,f):g.isPlainObject(f)?g.merge({},f):g.isArray(f)?f.slice():f}function o(u,f,m){if(g.isUndefined(f)){if(!g.isUndefined(u))return r(void 0,u,m)}else return r(u,f,m)}function i(u,f){if(!g.isUndefined(f))return r(void 0,f)}function s(u,f){if(g.isUndefined(f)){if(!g.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function a(u,f,m){if(m in e)return r(u,f);if(m in t)return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,f)=>o($s(u),$s(f),!0)};return g.forEach(Object.keys(Object.assign({},t,e)),function(f){const m=c[f]||o,v=m(t[f],e[f],f);g.isUndefined(v)&&m!==a||(n[f]=v)}),n}const Bs=t=>{const e=St({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=e;e.headers=s=Se.from(s),e.url=Cs(Rs(e.baseURL,e.url),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(g.isFormData(n)){if(ze.hasStandardBrowserEnv||ze.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...f]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...f].join("; "))}}if(ze.hasStandardBrowserEnv&&(r&&g.isFunction(r)&&(r=r(e)),r||r!==!1&&Tp(e.url))){const u=o&&i&&Ap.read(i);u&&s.set(o,u)}return e},Op=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const o=Bs(t);let i=o.data;const s=Se.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,m,v,_,b;function O(){_&&_(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let w=new XMLHttpRequest;w.open(o.method.toUpperCase(),o.url,!0),w.timeout=o.timeout;function N(){if(!w)return;const T=Se.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),Q={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:T,config:t,request:w};Os(function(Z){n(Z),O()},function(Z){r(Z),O()},Q),w=null}"onloadend"in w?w.onloadend=N:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(N)},w.onabort=function(){w&&(r(new M("Request aborted",M.ECONNABORTED,t,w)),w=null)},w.onerror=function(){r(new M("Network Error",M.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let z=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const Q=o.transitional||Ts;o.timeoutErrorMessage&&(z=o.timeoutErrorMessage),r(new M(z,Q.clarifyTimeoutError?M.ETIMEDOUT:M.ECONNABORTED,t,w)),w=null},i===void 0&&s.setContentType(null),"setRequestHeader"in w&&g.forEach(s.toJSON(),function(z,Q){w.setRequestHeader(Q,z)}),g.isUndefined(o.withCredentials)||(w.withCredentials=!!o.withCredentials),a&&a!=="json"&&(w.responseType=o.responseType),u&&([v,b]=Yn(u,!0),w.addEventListener("progress",v)),c&&w.upload&&([m,_]=Yn(c),w.upload.addEventListener("progress",m),w.upload.addEventListener("loadend",_)),(o.cancelToken||o.signal)&&(f=T=>{w&&(r(!T||T.type?new Bt(null,t,w):T),w.abort(),w=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const C=kp(o.url);if(C&&ze.protocols.indexOf(C)===-1){r(new M("Unsupported protocol "+C+":",M.ERR_BAD_REQUEST,t));return}w.send(i||null)})},xp=(t,e)=>{let n=new AbortController,r;const o=function(c){if(!r){r=!0,s();const u=c instanceof Error?c:this.reason;n.abort(u instanceof M?u:new Bt(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{o(new M(`timeout ${e} of ms exceeded`,M.ETIMEDOUT))},e);const s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",o):c.unsubscribe(o))}),t=null)};t.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=s,[a,()=>{i&&clearTimeout(i),i=null}]},Lp=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},Rp=async function*(t,e,n){for await(const r of t)yield*Lp(ArrayBuffer.isView(r)?r:await n(String(r)),e)},Ns=(t,e,n,r,o)=>{const i=Rp(t,e,o);let s=0,a,c=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:f,value:m}=await i.next();if(f){c(),u.close();return}let v=m.byteLength;if(n){let _=s+=v;n(_)}u.enqueue(new Uint8Array(m))}catch(f){throw c(f),f}},cancel(u){return c(u),i.return()}},{highWaterMark:2})},Jn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ds=Jn&&typeof ReadableStream=="function",Qr=Jn&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Ms=(t,...e)=>{try{return!!t(...e)}catch{return!1}},$p=Ds&&Ms(()=>{let t=!1;const e=new Request(ze.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Us=64*1024,eo=Ds&&Ms(()=>g.isReadableStream(new Response("").body)),Xn={stream:eo&&(t=>t.body)};Jn&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Xn[e]&&(Xn[e]=g.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new M(`Response type '${e}' is not supported`,M.ERR_NOT_SUPPORT,r)})})})(new Response);const Bp=async t=>{if(t==null)return 0;if(g.isBlob(t))return t.size;if(g.isSpecCompliantForm(t))return(await new Request(t).arrayBuffer()).byteLength;if(g.isArrayBufferView(t)||g.isArrayBuffer(t))return t.byteLength;if(g.isURLSearchParams(t)&&(t=t+""),g.isString(t))return(await Qr(t)).byteLength},Np=async(t,e)=>{const n=g.toFiniteNumber(t.getContentLength());return n??Bp(e)},to={http:ip,xhr:Op,fetch:Jn&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:m="same-origin",fetchOptions:v}=Bs(t);u=u?(u+"").toLowerCase():"text";let[_,b]=o||i||s?xp([o,i],s):[],O,w;const N=()=>{!O&&setTimeout(()=>{_&&_.unsubscribe()}),O=!0};let C;try{if(c&&$p&&n!=="get"&&n!=="head"&&(C=await Np(f,r))!==0){let re=new Request(e,{method:"POST",body:r,duplex:"half"}),Z;if(g.isFormData(r)&&(Z=re.headers.get("content-type"))&&f.setContentType(Z),re.body){const[ge,ie]=xs(C,Yn(Ls(c)));r=Ns(re.body,Us,ge,ie,Qr)}}g.isString(m)||(m=m?"include":"omit"),w=new Request(e,{...v,signal:_,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:m});let T=await fetch(w);const z=eo&&(u==="stream"||u==="response");if(eo&&(a||z)){const re={};["status","statusText","headers"].forEach(H=>{re[H]=T[H]});const Z=g.toFiniteNumber(T.headers.get("content-length")),[ge,ie]=a&&xs(Z,Yn(Ls(a),!0))||[];T=new Response(Ns(T.body,Us,ge,()=>{ie&&ie(),z&&N()},Qr),re)}u=u||"text";let Q=await Xn[g.findKey(Xn,u)||"text"](T,t);return!z&&N(),b&&b(),await new Promise((re,Z)=>{Os(re,Z,{data:Q,headers:Se.from(T.headers),status:T.status,statusText:T.statusText,config:t,request:w})})}catch(T){throw N(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new M("Network Error",M.ERR_NETWORK,t,w),{cause:T.cause||T}):M.from(T,T&&T.code,t,w)}})};g.forEach(to,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Hs=t=>`- ${t}`,Dp=t=>g.isFunction(t)||t===null||t===!1,js={getAdapter:t=>{t=g.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){n=t[i];let s;if(r=n,!Dp(n)&&(r=to[(s=String(n)).toLowerCase()],r===void 0))throw new M(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since :
|
|
413
413
|
`+i.map(Hs).join(`
|
|
414
414
|
`):" "+Hs(i[0]):"as no adapter specified";throw new M("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:to};function no(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Bt(null,t)}function Vs(t){return no(t),t.headers=Se.from(t.headers),t.data=Zr.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),js.getAdapter(t.adapter||gn.adapter)(t).then(function(r){return no(t),r.data=Zr.call(t,t.transformResponse,r),r.headers=Se.from(r.headers),r},function(r){return Is(r)||(no(t),r&&r.response&&(r.response.data=Zr.call(t,t.transformResponse,r.response),r.response.headers=Se.from(r.response.headers))),Promise.reject(r)})}const Fs="1.7.4",ro={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ro[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const zs={};ro.transitional=function(e,n,r){function o(i,s){return"[Axios v"+Fs+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new M(o(s," has been removed"+(n?" in "+n:"")),M.ERR_DEPRECATED);return n&&!zs[s]&&(zs[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function Mp(t,e,n){if(typeof t!="object")throw new M("options must be an object",M.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const a=t[i],c=a===void 0||s(a,i,t);if(c!==!0)throw new M("option "+i+" must be "+c,M.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new M("Unknown option "+i,M.ERR_BAD_OPTION)}}const oo={assertOptions:Mp,validators:ro},dt=oo.validators;class _t{constructor(e){this.defaults=e,this.interceptors={request:new Es,response:new Es}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
415
|
-
`+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=St(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&oo.assertOptions(r,{silentJSONParsing:dt.transitional(dt.boolean),forcedJSONParsing:dt.transitional(dt.boolean),clarifyTimeoutError:dt.transitional(dt.boolean)},!1),o!=null&&(g.isFunction(o)?n.paramsSerializer={serialize:o}:oo.assertOptions(o,{encode:dt.function,serialize:dt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&g.merge(i.common,i[n.method]);i&&g.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),n.headers=Se.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(n)===!1||(c=c&&O.synchronous,a.unshift(O.fulfilled,O.rejected))});const u=[];this.interceptors.response.forEach(function(O){u.push(O.fulfilled,O.rejected)});let f,m=0,v;if(!c){const b=[Vs.bind(this),void 0];for(b.unshift.apply(b,a),b.push.apply(b,u),v=b.length,f=Promise.resolve(n);m<v;)f=f.then(b[m++],b[m++]);return f}v=a.length;let _=n;for(m=0;m<v;){const b=a[m++],O=a[m++];try{_=b(_)}catch(w){O.call(this,w);break}}try{f=Vs.call(this,_)}catch(b){return Promise.reject(b)}for(m=0,v=u.length;m<v;)f=f.then(u[m++],u[m++]);return f}getUri(e){e=St(this.defaults,e);const n=Rs(e.baseURL,e.url);return Cs(n,e.params,e.paramsSerializer)}}g.forEach(["delete","get","head","options"],function(e){_t.prototype[e]=function(n,r){return this.request(St(r||{},{method:e,url:n,data:(r||{}).data}))}}),g.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,a){return this.request(St(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}_t.prototype[e]=n(),_t.prototype[e+"Form"]=n(!0)});class io{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new Bt(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new io(function(o){e=o}),cancel:e}}}function Up(t){return function(n){return t.apply(null,n)}}function Hp(t){return g.isObject(t)&&t.isAxiosError===!0}const so={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(so).forEach(([t,e])=>{so[e]=t});function Ks(t){const e=new _t(t),n=ls(_t.prototype.request,e);return g.extend(n,_t.prototype,e,{allOwnKeys:!0}),g.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Ks(St(t,o))},n}const oe=Ks(gn);oe.Axios=_t,oe.CanceledError=Bt,oe.CancelToken=io,oe.isCancel=Is,oe.VERSION=Fs,oe.toFormData=qn,oe.AxiosError=M,oe.Cancel=oe.CanceledError,oe.all=function(e){return Promise.all(e)},oe.spread=Up,oe.isAxiosError=Hp,oe.mergeConfig=St,oe.AxiosHeaders=Se,oe.formToJSON=t=>As(g.isHTMLForm(t)?new FormData(t):t),oe.getAdapter=js.getAdapter,oe.HttpStatusCode=so,oe.default=oe;function jp(t){const e=window.location.origin,n=new URL(t).origin;return e===n}class Vp{constructor(e){Ne(this,"axios");this.axios=oe.create(e==null?void 0:e.config);const n=window.location.origin+"/api";this.axios.defaults.baseURL||(this.axios.defaults.baseURL=n),e!=null&&e.anonymous||this.axios.interceptors.request.use(async r=>{if(!jp(
|
|
415
|
+
`+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=St(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&oo.assertOptions(r,{silentJSONParsing:dt.transitional(dt.boolean),forcedJSONParsing:dt.transitional(dt.boolean),clarifyTimeoutError:dt.transitional(dt.boolean)},!1),o!=null&&(g.isFunction(o)?n.paramsSerializer={serialize:o}:oo.assertOptions(o,{encode:dt.function,serialize:dt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&g.merge(i.common,i[n.method]);i&&g.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),n.headers=Se.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(O){typeof O.runWhen=="function"&&O.runWhen(n)===!1||(c=c&&O.synchronous,a.unshift(O.fulfilled,O.rejected))});const u=[];this.interceptors.response.forEach(function(O){u.push(O.fulfilled,O.rejected)});let f,m=0,v;if(!c){const b=[Vs.bind(this),void 0];for(b.unshift.apply(b,a),b.push.apply(b,u),v=b.length,f=Promise.resolve(n);m<v;)f=f.then(b[m++],b[m++]);return f}v=a.length;let _=n;for(m=0;m<v;){const b=a[m++],O=a[m++];try{_=b(_)}catch(w){O.call(this,w);break}}try{f=Vs.call(this,_)}catch(b){return Promise.reject(b)}for(m=0,v=u.length;m<v;)f=f.then(u[m++],u[m++]);return f}getUri(e){e=St(this.defaults,e);const n=Rs(e.baseURL,e.url);return Cs(n,e.params,e.paramsSerializer)}}g.forEach(["delete","get","head","options"],function(e){_t.prototype[e]=function(n,r){return this.request(St(r||{},{method:e,url:n,data:(r||{}).data}))}}),g.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,a){return this.request(St(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}_t.prototype[e]=n(),_t.prototype[e+"Form"]=n(!0)});class io{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new Bt(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new io(function(o){e=o}),cancel:e}}}function Up(t){return function(n){return t.apply(null,n)}}function Hp(t){return g.isObject(t)&&t.isAxiosError===!0}const so={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(so).forEach(([t,e])=>{so[e]=t});function Ks(t){const e=new _t(t),n=ls(_t.prototype.request,e);return g.extend(n,_t.prototype,e,{allOwnKeys:!0}),g.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Ks(St(t,o))},n}const oe=Ks(gn);oe.Axios=_t,oe.CanceledError=Bt,oe.CancelToken=io,oe.isCancel=Is,oe.VERSION=Fs,oe.toFormData=qn,oe.AxiosError=M,oe.Cancel=oe.CanceledError,oe.all=function(e){return Promise.all(e)},oe.spread=Up,oe.isAxiosError=Hp,oe.mergeConfig=St,oe.AxiosHeaders=Se,oe.formToJSON=t=>As(g.isHTMLForm(t)?new FormData(t):t),oe.getAdapter=js.getAdapter,oe.HttpStatusCode=so,oe.default=oe;function jp(t){const e=window.location.origin,n=new URL(t).origin;return e===n}class Vp{constructor(e){Ne(this,"axios");this.axios=oe.create(e==null?void 0:e.config);const n=window.location.origin+"/api";this.axios.defaults.baseURL||(this.axios.defaults.baseURL=n),e!=null&&e.anonymous||this.axios.interceptors.request.use(async r=>await this.AccessTokenInterceptor(r))}async AccessTokenInterceptor(e){if(!jp(e.baseURL+e.url))return e;const n=as().oidc;await n.updateToken(10);const r=n.token;return r?e.headers.Authorization=`Bearer ${r}`:n.login(),e}async GetAsync(e){return this.axios.get(e).then(n=>this.HandleThen(n)).catch(n=>this.HandleCatch(n))}async PostAsync(e,n){return this.axios.post(e,n).then(r=>this.HandleThen(r)).catch(r=>this.HandleCatch(r))}async PutAsync(e,n){return this.axios.put(e,n).then(r=>this.HandleThen(r)).catch(r=>this.HandleCatch(r))}async DeleteAsync(e){return this.axios.delete(e).then(n=>this.HandleThen(n)).catch(n=>this.HandleCatch(n))}HandleThen(e){const n=new zr,r=this.ParsedResponse(e.data);return r===null?(n.httpStatusCode=e.status,n.value=e.data,n):(n.httpStatusCode=r.httpStatusCode,r.hasError?(n.WithErrors(r.errors),n):(n.value=r.value,n))}HandleCatch(e){var o;const n=new zr,r=this.ParsedResponse((o=e.response)==null?void 0:o.data);return r===null?(n.WithError(e.message),n):(n.httpStatusCode=r.httpStatusCode,n.WithErrors(r.errors),n)}ParsedResponse(e){try{const n=typeof e.hasSuccess=="boolean",r=typeof e.hasError=="boolean",o=Array.isArray(e.errors);return n&&r&&o?e:null}catch{return null}}}class Zn{static get IsTouch(){return window.matchMedia("(pointer: coarse)").matches}static GetMaxZindex(e=[]){let n="body > *:not(script):not(style)";for(const o of e)n+=`, ${o}`;const r=Math.max(...Array.from(document.querySelectorAll(n)).map(o=>{const i=getComputedStyle(o).zIndex;return+i==+i?+i:0}));return r>=100?r:100}static AjustarFuso(e){const n=e.getTimezoneOffset()/60;e.setHours(e.getHours()-n)}static Mask(e,n){let r=0,o=e.toString();return n.replace(/#/g,()=>o[r++]||"")}static MaskCpf(e){return Zn.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return Zn.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static async DelayAsync(e){return new Promise(n=>setTimeout(n,e))}}function Fp(){document.documentElement.classList.add("app-mounted")}function Ws(){mt.SetInitialTheme()}function zp(){mt.Toggle()}function Kp(){mt.EnableDarkMode()}function Wp(){mt.EnableLightMode()}function qp(){mt.ClearStoredTheme()}Ws(),j.ApiClient=Vp,j.AppResult=zr,j.ClearStoredTheme=qp,j.ConfigAuth=vm,j.EnableDarkMode=Kp,j.EnableLightMode=Wp,j.RemovePreloader=Fp,j.SetInitialTheme=Ws,j.SfButton=Ua,j.SfContent=La,j.SfDrawer=Wa,j.SfIcon=_n,j.SfLayout=Ca,j.SfMessage=Ga,j.SfNavMenu=Fc,j.SfTabNavigation=Na,j.SfTooltip=nr,j.ToggleTheme=zp,j.UseAlertService=tm,j.UseAuth=as,j.UseConfirmService=nm,j.UseNavMenuService=tr,j.Utilities=Zn,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
|
|
416
416
|
//# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.cjs.map
|