@luizleon/sf.prefeiturasp.vuecomponents 5.0.2 → 5.0.3

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.
@@ -407,6 +407,6 @@ If you think this parameter should be updatable, request it here: https://github
407
407
  - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
408
408
  - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
409
409
 
410
- For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),i.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(h),window.removeEventListener("message",v),u.setSuccess()))};window.addEventListener("message",v,!1)}else u.setSuccess();return M(u.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function Ze(u){if(!u||u=="default")return{login:function(_){return window.location.assign(e.createLoginUrl(_)),Y().promise},logout:async function(_){if(((_==null?void 0:_.logoutMethod)??e.logoutMethod)==="GET"){window.location.replace(e.createLogoutUrl(_));return}const O=e.createLogoutUrl(_),x=await fetch(O,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:e.idToken,client_id:e.clientId,post_logout_redirect_uri:n.redirectUri(_,!1)})});if(x.redirected){window.location.href=x.url;return}if(x.ok){window.location.reload();return}throw new Error("Logout failed, request returned an error code.")},register:function(_){return window.location.assign(e.createRegisterUrl(_)),Y().promise},accountManagement:function(){var _=e.createAccountUrl();if(typeof _<"u")window.location.href=_;else throw"Not supported by the OIDC server";return Y().promise},redirectUri:function(_,E){return _&&_.redirectUri?_.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(u=="cordova"){i.enable=!1;var h=function(_,E,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(_,E,O):window.open(_,E,O)},v=function(_){return _&&_.cordovaOptions?Object.keys(_.cordovaOptions).reduce(function(E,O){return E[O]=_.cordovaOptions[O],E},{}):{}},T=function(_){return Object.keys(_).reduce(function(E,O){return E.push(O+"="+_[O]),E},[]).join(",")},b=function(_){var E=v(_);return E.location="no",_&&_.prompt=="none"&&(E.hidden="yes"),T(E)},P=function(){return e.redirectUri||"http://localhost"};return{login:function(_){var E=Y(),O=b(_),x=e.createLoginUrl(_),D=h(x,"_blank",O),F=!1,_e=!1,fe=function(){_e=!0,D.close()};return D.addEventListener("loadstart",function(me){if(me.url.indexOf(P())==0){var Je=te(me.url);S(Je,E),fe(),F=!0}}),D.addEventListener("loaderror",function(me){if(!F)if(me.url.indexOf(P())==0){var Je=te(me.url);S(Je,E),fe(),F=!0}else E.setError(),fe()}),D.addEventListener("exit",function(me){_e||E.setError({reason:"closed_by_user"})}),E.promise},logout:function(_){var E=Y(),O=e.createLogoutUrl(_),x=h(O,"_blank","location=no,hidden=yes,clearcache=yes"),D;return x.addEventListener("loadstart",function(F){F.url.indexOf(P())==0&&x.close()}),x.addEventListener("loaderror",function(F){F.url.indexOf(P())==0||(D=!0),x.close()}),x.addEventListener("exit",function(F){D?E.setError():(e.clearToken(),E.setSuccess())}),E.promise},register:function(_){var E=Y(),O=e.createRegisterUrl(),x=b(_),D=h(O,"_blank",x);return D.addEventListener("loadstart",function(F){if(F.url.indexOf(P())==0){D.close();var _e=te(F.url);S(_e,E)}}),E.promise},accountManagement:function(){var _=e.createAccountUrl();if(typeof _<"u"){var E=h(_,"_blank","location=no");E.addEventListener("loadstart",function(O){O.url.indexOf(P())==0&&E.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(_){return P()}}}if(u=="cordova-native")return i.enable=!1,{login:function(_){var E=Y(),O=e.createLoginUrl(_);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var D=te(x.url);S(D,E)}),window.cordova.plugins.browsertab.openUrl(O),E.promise},logout:function(_){var E=Y(),O=e.createLogoutUrl(_);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),E.setSuccess()}),window.cordova.plugins.browsertab.openUrl(O),E.promise},register:function(_){var E=Y(),O=e.createRegisterUrl(_);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var D=te(x.url);S(D,E)}),window.cordova.plugins.browsertab.openUrl(O),E.promise},accountManagement:function(){var _=e.createAccountUrl();if(typeof _<"u")window.cordova.plugins.browsertab.openUrl(_);else throw"Not supported by the OIDC server"},redirectUri:function(_){return _&&_.redirectUri?_.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+u}var Fe=function(){if(!(this instanceof Fe))return new Fe;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var u=this;function h(){for(var v=new Date().getTime(),T=0;T<localStorage.length;T++){var b=localStorage.key(T);if(b&&b.indexOf("kc-callback-")==0){var P=localStorage.getItem(b);if(P)try{var _=JSON.parse(P).expires;(!_||_<v)&&localStorage.removeItem(b)}catch{localStorage.removeItem(b)}}}}u.get=function(v){if(v){var T="kc-callback-"+v,b=localStorage.getItem(T);return b&&(localStorage.removeItem(T),b=JSON.parse(b)),h(),b}},u.add=function(v){h();var T="kc-callback-"+v.state;v.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(T,JSON.stringify(v))}},ze=function(){if(!(this instanceof ze))return new ze;var u=this;u.get=function(b){if(b){var P=v("kc-callback-"+b);if(T("kc-callback-"+b,"",h(-100)),P)return JSON.parse(P)}},u.add=function(b){T("kc-callback-"+b.state,JSON.stringify(b),h(60))},u.removeItem=function(b){T(b,"",h(-100))};var h=function(b){var P=new Date;return P.setTime(P.getTime()+b*60*1e3),P},v=function(b){for(var P=b+"=",_=document.cookie.split(";"),E=0;E<_.length;E++){for(var O=_[E];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(P)==0)return O.substring(P.length,O.length)}return""},T=function(b,P,_){var E=b+"="+P+"; expires="+_.toUTCString()+"; ";document.cookie=E}};function pt(){try{return new Fe}catch{}return new ze}function $e(u){return function(){e.enableLogging&&u.apply(console,Array.prototype.slice.call(arguments))}}}function zd(t){const e=String.fromCodePoint(...t);return btoa(e)}class Kd{constructor(e){Ue(this,"oidc");Ue(this,"isAuthenticated",!1);Ue(this,"authenticatedWith",null);this.oidc=new Pi(e)}async InitAsync(e={}){return await this.oidc.init(e).then(async n=>(this.isAuthenticated=n,this.authenticatedWith=this.AuthenticatedWith(),n)).catch(n=>(console.info("Ocorreu um erro na inicialização. Verifique o console para mais detalhes."),console.error(n),!1))}LoginGovBr(){this.oidc.login({idpHint:"GOV.BR"})}LoginSenhaweb(){var n;const e=(n=this.oidc.authServerUrl)!=null&&n.startsWith("https://keycloak.dev.apps.sf.prefeitura.sp.gov.br")?"senhawebdev":"senhaweb";this.oidc.login({idpHint:e})}AuthenticatedWith(){var n,r;const e=this.oidc.tokenParsed;return e?(n=e.identity_provider)!=null&&n.startsWith("GOV.BR")?"govbr":(r=e.identity_provider)!=null&&r.startsWith("senhaweb")?"senhaweb":"ad":null}}let Li;function Wd(t){Li=new Kd(t)}const Cr=()=>Li;function Gd(t){return s.getCurrentScope()?(s.onScopeDispose(t),!0):!1}const qd=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Yd(t){return s.getCurrentInstance()}function Xd(t){return Array.isArray(t)?t:[t]}function Zd(t,e=!0,n){Yd()?s.onMounted(t,n):e?t():s.nextTick(t)}const xi=qd?window:void 0;function Ct(t){var e;const n=s.toValue(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Jd(){const t=s.ref(!1),e=s.getCurrentInstance();return e&&s.onMounted(()=>{t.value=!0},e),t}function Qd(t){const e=Jd();return s.computed(()=>(e.value,!!t()))}function ef(t,e,n={}){const{window:r=xi,...o}=n;let i;const l=Qd(()=>r&&"ResizeObserver"in r),a=()=>{i&&(i.disconnect(),i=void 0)},c=s.computed(()=>{const p=s.toValue(t);return Array.isArray(p)?p.map(y=>Ct(y)):[Ct(p)]}),d=s.watch(c,p=>{if(a(),l.value&&r){i=new ResizeObserver(e);for(const y of p)y&&i.observe(y,o)}},{immediate:!0,flush:"post"}),f=()=>{a(),d()};return Gd(f),{isSupported:l,stop:f}}function tf(t,e={width:0,height:0},n={}){const{window:r=xi,box:o="content-box"}=n,i=s.computed(()=>{var p,y;return(y=(p=Ct(t))==null?void 0:p.namespaceURI)==null?void 0:y.includes("svg")}),l=s.ref(e.width),a=s.ref(e.height),{stop:c}=ef(t,([p])=>{const y=o==="border-box"?p.borderBoxSize:o==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(r&&i.value){const k=Ct(t);if(k){const C=k.getBoundingClientRect();l.value=C.width,a.value=C.height}}else if(y){const k=Xd(y);l.value=k.reduce((C,{inlineSize:A})=>C+A,0),a.value=k.reduce((C,{blockSize:A})=>C+A,0)}else l.value=p.contentRect.width,a.value=p.contentRect.height},n);Zd(()=>{const p=Ct(t);p&&(l.value="offsetWidth"in p?p.offsetWidth:e.width,a.value="offsetHeight"in p?p.offsetHeight:e.height)});const d=s.watch(()=>Ct(t),p=>{l.value=p?e.width:0,a.value=p?e.height:0});function f(){c(),d()}return{width:l,height:a,stop:f}}var nf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Oi={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(nf,function(){var e=function(){},n="undefined",r=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],i={},l=null;function a(A,L){var w=A[L];if(typeof w.bind=="function")return w.bind(A);try{return Function.prototype.bind.call(w,A)}catch{return function(){return Function.prototype.apply.apply(w,[A,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function d(A){return A==="debug"&&(A="log"),typeof console===n?!1:A==="trace"&&r?c:console[A]!==void 0?a(console,A):console.log!==void 0?a(console,"log"):e}function f(){for(var A=this.getLevel(),L=0;L<o.length;L++){var w=o[L];this[w]=L<A?e:this.methodFactory(w,A,this.name)}if(this.log=this.debug,typeof console===n&&A<this.levels.SILENT)return"No console available for logging"}function p(A){return function(){typeof console!==n&&(f.call(this),this[A].apply(this,arguments))}}function y(A,L,w){return d(A)||p.apply(this,arguments)}function k(A,L){var w=this,S,N,U,G="loglevel";typeof A=="string"?G+=":"+A:typeof A=="symbol"&&(G=void 0);function ce(M){var X=(o[M]||"silent").toUpperCase();if(!(typeof window===n||!G)){try{window.localStorage[G]=X;return}catch{}try{window.document.cookie=encodeURIComponent(G)+"="+X+";"}catch{}}}function te(){var M;if(!(typeof window===n||!G)){try{M=window.localStorage[G]}catch{}if(typeof M===n)try{var X=window.document.cookie,ue=encodeURIComponent(G),de=X.indexOf(ue+"=");de!==-1&&(M=/^([^;]+)/.exec(X.slice(de+ue.length+1))[1])}catch{}return w.levels[M]===void 0&&(M=void 0),M}}function Ae(){if(!(typeof window===n||!G)){try{window.localStorage.removeItem(G)}catch{}try{window.document.cookie=encodeURIComponent(G)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function ne(M){var X=M;if(typeof X=="string"&&w.levels[X.toUpperCase()]!==void 0&&(X=w.levels[X.toUpperCase()]),typeof X=="number"&&X>=0&&X<=w.levels.SILENT)return X;throw new TypeError("log.setLevel() called with invalid level: "+M)}w.name=A,w.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},w.methodFactory=L||y,w.getLevel=function(){return U??N??S},w.setLevel=function(M,X){return U=ne(M),X!==!1&&ce(U),f.call(w)},w.setDefaultLevel=function(M){N=ne(M),te()||w.setLevel(M,!1)},w.resetLevel=function(){U=null,Ae(),f.call(w)},w.enableAll=function(M){w.setLevel(w.levels.TRACE,M)},w.disableAll=function(M){w.setLevel(w.levels.SILENT,M)},w.rebuild=function(){if(l!==w&&(S=ne(l.getLevel())),f.call(w),l===w)for(var M in i)i[M].rebuild()},S=ne(l?l.getLevel():"WARN");var Y=te();Y!=null&&(U=ne(Y)),f.call(w)}l=new k,l.getLogger=function(L){if(typeof L!="symbol"&&typeof L!="string"||L==="")throw new TypeError("You must supply a name when creating a logger.");var w=i[L];return w||(w=i[L]=new k(L,l.methodFactory)),w};var C=typeof window!==n?window.log:void 0;return l.noConflict=function(){return typeof window!==n&&window.log===l&&(window.log=C),l},l.getLoggers=function(){return i},l.default=l,l})})(Oi);var of=Oi.exports;const Ln=rf(of),sf={install(t,e){const n=e??{};Ln.setDefaultLevel(n.enableLogging?Ln.levels.DEBUG:Ln.levels.SILENT);const r=240;document.documentElement.style.setProperty("--nav-menu-width",`${r}px`);const o=s.ref(!0),i=s.ref(0),l=s.ref(!1),a=s.ref(!1),c=s.ref(""),d=s.ref(null),{width:f}=tf(d);t.provide(wo,{navMenuWidth:r,isMenuOpened:o,ToggleMenu:()=>{o.value=!o.value},OpenMenu:()=>{o.value=!0},CloseMenu:()=>{o.value=!1},scrollY:i,pageTitle:c,isDarkMode:l,ToggleTheme:()=>Ft.Toggle(),EnableDarkMode:()=>Ft.EnableDarkMode(),EnableLightMode:()=>Ft.EnableLightMode(),ClearStoredTheme:()=>Ft.ClearStoredTheme(),LogoutAsync:async()=>{const y=Ei(),{oidc:k}=Cr();await y.ConfirmAsync("Deseja realmente sair da sua conta?")&&(a.value=!0,await new Promise(A=>setTimeout(A,1e3)),k.logout({redirectUri:window.location.origin}))},Login:()=>{const{oidc:y}=Cr();y.login()},isLoggingOut:a,mainRef:d,mainWidth:f,isMainXs:s.computed(()=>f.value<=384),isMainSm:s.computed(()=>f.value>384),isMainMd:s.computed(()=>f.value>768),isMainLg:s.computed(()=>f.value>992),isMainXl:s.computed(()=>f.value>1280),isMain2Xl:s.computed(()=>f.value>1536),isMain3Xl:s.computed(()=>f.value>1920)}),new MutationObserver(()=>{l.value=document.documentElement.classList.contains("dark")}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.addEventListener("scroll",()=>{i.value=document.documentElement.scrollTop}),Ft.SetInitialTheme()}},af=Ln;class Er extends Error{constructor(n=[]){const r=Array.isArray(n)?n:[n];super(r[0]);Ue(this,"errors",[]);this.errors=r}}class $i{constructor(e=null){Ue(this,"errors",[]);Ue(this,"_value",null);Ue(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){if(Array.isArray(e)){e.forEach(n=>this.WithError(n));return}this.errors.push(e),this.isSuccessfulHttpStatusCode||(this._httpStatusCode=400)}get isSuccessfulHttpStatusCode(){return this._httpStatusCode>=200&&this._httpStatusCode<300}[Symbol.toPrimitive](e){if(e==="throw")throw new Er(this.errors)}get firstError(){return this.hasSuccess?null:this.errors[0]}}class Bi{get IsVisible(){return ft.isVisible()}async CreateAlertAsync(e){let n="info",r,o;return typeof e=="string"||Array.isArray(e)?r=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",o=e.title??"",r=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(i=>{ft.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:o,html:`<div style="max-height: 50vh; overflow: auto">${Si.sanitize(r)}</div>`}).then(()=>i(!0))})}async AlertAsync(e){return this.CreateAlertAsync({text:e,icon:"info"})}async AlertErrorAsync(e){return this.CreateAlertAsync({text:e,icon:"error"})}async AlertSuccessAsync(e){return this.CreateAlertAsync({text:e,icon:"success"})}}const Ni=()=>new Bi,lf=()=>new Bi;window.addEventListener("error",function(t){return Ir(t.error)||console.error(t.error),t.preventDefault(),!1}),window.addEventListener("unhandledrejection",function(t){return Ir(t.reason)||console.error("Unhandled Rejection",t.reason),t.preventDefault(),!1});const cf=t=>{t.config.errorHandler=(e,n,r)=>{Ir(e)||console.error("Vue Global Error Handler: ",{err:e,vm:n,info:r})}},Ir=t=>t instanceof Er||t instanceof $i?(Ni().AlertErrorAsync(t.errors),!0):!1;function uf(){return s.inject(wo)}const Tr=()=>uf(),df={class:"font-percentage"},Mi="--font-size-increment",ff="tamanho-fonte",mf=gt(s.defineComponent({__name:"FontSize",setup(t){const e=s.ref(!1),n=s.ref(0),r=()=>{n.value=Mn(),e.value=!0},o=()=>{e.value=!1},i=()=>document.documentElement,l=()=>parseInt(getComputedStyle(i()).getPropertyValue(Mi)||"1"),a=y=>{y<.5||y>1.6||(i().style.setProperty(Mi,y.toString()),p.value=y)},c=()=>{a(p.value+.1)},d=()=>{a(p.value-.1)},f=()=>{a(1)},p=s.ref(1);return s.onBeforeMount(()=>{localStorage.removeItem(ff)}),s.onMounted(()=>{p.value=l()}),(y,k)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(Pe,{button:!0,size:"sm",icon:"text_increase",tooltip:"Tamanho da fonte",onClick:r}),e.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createElementVNode("div",{class:s.normalizeClass(["border","fadein","font-size-wrapper"]),style:s.normalizeStyle({zIndex:n.value+1})},[s.createVNode(Pe,{button:!0,icon:"remove",size:"sm",onClick:d}),s.createElementVNode("span",df,s.toDisplayString(p.value.toLocaleString("pt-br",{style:"percent",maximumFractionDigits:0})),1),s.createVNode(Pe,{button:!0,icon:"add",size:"sm",onClick:c}),s.createElementVNode("span",{class:"redefinir",onClick:f}," Redefinir ")],4),s.createElementVNode("div",{class:"font-size-mask",style:s.normalizeStyle({zIndex:n.value}),onClick:o},null,4)],64)):s.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d0fb8241"]]),pf={class:"nav-menu-header"},hf={class:"nav-menu-inner-close"},gf={class:"main-content"},yf={class:"menu-button"},bf={class:"page-title"},vf={class:"action"},wf={id:"content"},kf={key:0,id:"logging-out"},_f={class:"info-fazenda"},Sf={class:"font-bold"},Cf={class:"info-endereco text-muted"},Ef=gt(s.defineComponent({__name:"Main",props:{auth:{}},setup(t){const e=t,{navMenuWidth:n,isMenuOpened:r,pageTitle:o,scrollY:i,ToggleMenu:l,isDarkMode:a,ToggleTheme:c,CloseMenu:d,LogoutAsync:f,Login:p,isLoggingOut:y,mainRef:k}=Tr(),C=s.ref(null),A=()=>{if(!C.value||!r.value)return!1;C.value.offsetWidth!==n&&d()};return s.onMounted(()=>{ht.useRouter().afterEach(()=>{A()})}),(L,w)=>(s.openBlock(),s.createElementBlock("main",{ref_key:"mainRef",ref:k,class:s.normalizeClass({"select-none":!0,disabled:s.unref(y),"nav-menu-visible":s.unref(r)})},[s.createElementVNode("aside",{id:"nav-menu",ref_key:"navMenuRef",ref:C,class:s.normalizeClass({"nav-menu-hidden":!s.unref(r)})},[s.createElementVNode("div",pf,[w[0]||(w[0]=s.createElementVNode("span",null,"Menu",-1)),s.createElementVNode("div",hf,[s.createVNode(Pe,{button:!0,icon:"close",onClick:s.unref(l)},null,8,["onClick"])])]),s.renderSlot(L.$slots,"nav-menu",{},void 0,!0)],2),s.createElementVNode("div",gf,[s.createElementVNode("div",{id:"top-bar",class:s.normalizeClass({"shadow-bottom":s.unref(i)>72})},[s.createElementVNode("div",yf,[s.createVNode(Pe,{button:!0,icon:s.unref(r)?"menu_open":"menu",tooltip:"Menu",onClick:s.unref(l)},null,8,["icon","onClick"])]),s.createElementVNode("div",bf,s.toDisplayString(s.unref(y)?"Saindo...":s.unref(o)),1),w[1]||(w[1]=s.createElementVNode("span",{class:"sep"},null,-1)),s.createElementVNode("div",vf,[s.createVNode(Pe,{button:!0,size:"sm",icon:s.unref(a)?"light_mode":"dark_mode",tooltip:s.unref(a)?"Modo claro":"Modo escuro",onClick:s.unref(c)},null,8,["icon","tooltip","onClick"]),s.createVNode(mf),e.auth?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[e.auth.isAuthenticated?(s.openBlock(),s.createBlock(Pe,{key:0,button:!0,size:"sm",icon:"logout",tooltip:"Sair",onClick:s.unref(f)},null,8,["onClick"])):(s.openBlock(),s.createBlock(Pe,{key:1,button:!0,size:"sm",icon:"login",tooltip:"Entrar",onClick:s.unref(p)},null,8,["onClick"]))],64)):s.createCommentVNode("",!0)])],2),s.createElementVNode("div",wf,[s.unref(y)?(s.openBlock(),s.createElementBlock("div",kf,[s.createVNode($r)])):s.renderSlot(L.$slots,"content",{key:1},void 0,!0)])]),s.createElementVNode("footer",null,[w[4]||(w[4]=s.createElementVNode("div",{class:"logo-fazenda"},null,-1)),s.createElementVNode("div",_f,[s.createElementVNode("span",Sf,[s.renderSlot(L.$slots,"footer-nome-fazenda",{},()=>[w[2]||(w[2]=s.createTextVNode(" SECRETARIA MUNICIPAL DA FAZENDA "))],!0)]),s.createElementVNode("span",Cf,[s.renderSlot(L.$slots,"footer-endereco-fazenda",{},()=>[w[3]||(w[3]=s.createTextVNode(" Rua Líbero Badaró, 190 - Centro - São Paulo - SP - CEP 01008-000 "))],!0)])])])],2))}}),[["__scopeId","data-v-8b72b78a"]]),If=s.defineComponent({__name:"PageTitle",props:{title:{}},setup(t){const{pageTitle:e}=Tr(),n=t;return s.watchEffect(()=>{document.title=n.title,e.value=n.title}),(r,o)=>null}}),Di={surface:{0:"{surface.0.color}",50:"{surface.100.color}",100:"{surface.100.color}",200:"{surface.200.color}",300:"{surface.300.color}",400:"{surface.400.color}",500:"{surface.1000.color}",600:"{surface.600.color}",700:"{surface.700.color}",800:"{surface.800.color}",900:"{surface.900.color}",950:"{surface.1000.color}"},primary:{color:"{primary.color}",contrastColor:"{bg.color}",hoverColor:"{primary.hover.color}",activeColor:"{primary.color}"},highlight:{background:"{primary.color}",color:"{bg.color}"},formField:{background:"{surface.0.color}",disabledBackground:"{surface.0.color}",filledBackground:"{surface.100.color}",filledFocusBackground:"{surface.100.color}",borderColor:"{surface.1000.color}",hoverBorderColor:"{primary.color}",focusBorderColor:"{primary.color}",invalidBorderColor:"{error.color}",color:"{text.color}",disabledColor:"{disabled.color}",placeholderColor:"{muted.color}",floatLabelColor:"{secondary.color}",floatLabelFocusColor:"{secondary.color}",floatLabelInvalidColor:"{error.color}",iconColor:"{primary.color}"},text:{color:"{text.color}",hoverColor:"{primary.color}",mutedColor:"{muted.color}",hoverMutedColor:"{muted.color}"},mask:{background:"{maskbg.color}",color:"{surface.200.color}"},content:{background:"{bg.color}",color:"{text.color}",border:{color:"{surface.1000.color}",radius:"6px"},hover:{background:"{primary.hover.color}",color:"{primary.color}"}}},Tf={semantic:{disabled:{opacity:"1"},transitionDuration:"0",primary:{50:"{primary.color}",100:"{primary.color}",200:"{primary.color}",300:"{primary.color}",400:"{primary.color}",500:"{primary.color}",600:"{primary.color}",700:"{primary.color}",800:"{primary.color}",900:"{primary.color}",950:"{primary.color}"},colorScheme:{light:{...Di},dark:{...Di}}},components:{blockui:{border:{radius:"0px"}},button:{padding:{x:"1rem",y:"0.5rem"},primary:{hover:{background:"{primary.color} !important",border:{color:"{primary.color} !important"}}},text:{secondary:{color:"{secondary.color} !important",hover:{background:"{surface.200.color} !important"}}},icon:{only:{width:"2rem"}}},checkbox:{background:"{surface.100.color} !important",border:{color:"{border.color} !important"},checked:{background:"{primary.color} !important",hover:{background:"{primary.color} !important"}},sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}},datatable:{header:{border:{color:"{border.color} !important"},cell:{border:{color:"{border.color} !important"},hover:{background:"{primary.hover.color} !important",color:"{primary.color} !important"}}},body:{cell:{border:{color:"{border.color} !important"}}},row:{striped:{background:"{surface.100.color} !important"}},footer:{border:{color:"transparent !important"}}},datepicker:{today:{background:"{primary.hover.color} !important",color:"{primary.color} !important"}},dialog:{background:"{bg.color} !important",color:"{text.color} !important",border:{color:"{surface.0.color} !important",radius:"{border.radius} !important"},title:{font:{size:"{font.size} !important",weight:"700 !important"}},header:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"{inline.spacing} !important"},content:{padding:"{content.spacing} !important"},footer:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"{inline.spacing} !important"}},inputtext:{background:"{bg.color}",color:"{text.color}",border:{color:"{border.color}"},hover:{border:{color:"{primary.color}"}},placeholder:{color:"{muted.color}"}},inputmask:{background:"{bg.color}",color:"{text.color}",border:{color:"{border.color}"},hover:{border:{color:"{primary.color}"}},placeholder:{color:"{muted.color}"}},select:{background:"{bg.color}",color:"{primary.color}",option:{focus:{background:"{primary.hover.color}",color:"{primary.color}"},selected:{focus:{background:"{primary.color}",color:"{bg.color}"}}},overlay:{background:"{bg.color}",border:{color:"{border.color}"}},dropdown:{color:"{primary.color}"},hover:{border:{color:"{primary.color}"}},placeholder:{color:"{disabled.color}"},disabled:{color:"{disabled.color}"}},skeleton:{background:"{surface.100.color} !important",animation:{background:"{surface.100.color} !important"}}}};class an{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 an.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return an.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static MaskCcm(e){return an.Mask(e.padStart(8,"0"),"#.###.###-#")}static async DelayAsync(e){return new Promise(n=>setTimeout(n,e))}}const Af=t=>{const e=new Set;function n(r){const{name:o,children:i}=r;if(o){if(e.has(o))throw new Error(["Erro na validação das rotas!",`Nome de rota duplicado: ${o}`].join(`
410
+ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),i.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(h),window.removeEventListener("message",v),u.setSuccess()))};window.addEventListener("message",v,!1)}else u.setSuccess();return M(u.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function Ze(u){if(!u||u=="default")return{login:function(_){return window.location.assign(e.createLoginUrl(_)),Y().promise},logout:async function(_){if(((_==null?void 0:_.logoutMethod)??e.logoutMethod)==="GET"){window.location.replace(e.createLogoutUrl(_));return}const O=e.createLogoutUrl(_),x=await fetch(O,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:e.idToken,client_id:e.clientId,post_logout_redirect_uri:n.redirectUri(_,!1)})});if(x.redirected){window.location.href=x.url;return}if(x.ok){window.location.reload();return}throw new Error("Logout failed, request returned an error code.")},register:function(_){return window.location.assign(e.createRegisterUrl(_)),Y().promise},accountManagement:function(){var _=e.createAccountUrl();if(typeof _<"u")window.location.href=_;else throw"Not supported by the OIDC server";return Y().promise},redirectUri:function(_,E){return _&&_.redirectUri?_.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(u=="cordova"){i.enable=!1;var h=function(_,E,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(_,E,O):window.open(_,E,O)},v=function(_){return _&&_.cordovaOptions?Object.keys(_.cordovaOptions).reduce(function(E,O){return E[O]=_.cordovaOptions[O],E},{}):{}},T=function(_){return Object.keys(_).reduce(function(E,O){return E.push(O+"="+_[O]),E},[]).join(",")},b=function(_){var E=v(_);return E.location="no",_&&_.prompt=="none"&&(E.hidden="yes"),T(E)},P=function(){return e.redirectUri||"http://localhost"};return{login:function(_){var E=Y(),O=b(_),x=e.createLoginUrl(_),D=h(x,"_blank",O),F=!1,_e=!1,fe=function(){_e=!0,D.close()};return D.addEventListener("loadstart",function(me){if(me.url.indexOf(P())==0){var Je=te(me.url);S(Je,E),fe(),F=!0}}),D.addEventListener("loaderror",function(me){if(!F)if(me.url.indexOf(P())==0){var Je=te(me.url);S(Je,E),fe(),F=!0}else E.setError(),fe()}),D.addEventListener("exit",function(me){_e||E.setError({reason:"closed_by_user"})}),E.promise},logout:function(_){var E=Y(),O=e.createLogoutUrl(_),x=h(O,"_blank","location=no,hidden=yes,clearcache=yes"),D;return x.addEventListener("loadstart",function(F){F.url.indexOf(P())==0&&x.close()}),x.addEventListener("loaderror",function(F){F.url.indexOf(P())==0||(D=!0),x.close()}),x.addEventListener("exit",function(F){D?E.setError():(e.clearToken(),E.setSuccess())}),E.promise},register:function(_){var E=Y(),O=e.createRegisterUrl(),x=b(_),D=h(O,"_blank",x);return D.addEventListener("loadstart",function(F){if(F.url.indexOf(P())==0){D.close();var _e=te(F.url);S(_e,E)}}),E.promise},accountManagement:function(){var _=e.createAccountUrl();if(typeof _<"u"){var E=h(_,"_blank","location=no");E.addEventListener("loadstart",function(O){O.url.indexOf(P())==0&&E.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(_){return P()}}}if(u=="cordova-native")return i.enable=!1,{login:function(_){var E=Y(),O=e.createLoginUrl(_);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var D=te(x.url);S(D,E)}),window.cordova.plugins.browsertab.openUrl(O),E.promise},logout:function(_){var E=Y(),O=e.createLogoutUrl(_);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),E.setSuccess()}),window.cordova.plugins.browsertab.openUrl(O),E.promise},register:function(_){var E=Y(),O=e.createRegisterUrl(_);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var D=te(x.url);S(D,E)}),window.cordova.plugins.browsertab.openUrl(O),E.promise},accountManagement:function(){var _=e.createAccountUrl();if(typeof _<"u")window.cordova.plugins.browsertab.openUrl(_);else throw"Not supported by the OIDC server"},redirectUri:function(_){return _&&_.redirectUri?_.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+u}var Fe=function(){if(!(this instanceof Fe))return new Fe;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var u=this;function h(){for(var v=new Date().getTime(),T=0;T<localStorage.length;T++){var b=localStorage.key(T);if(b&&b.indexOf("kc-callback-")==0){var P=localStorage.getItem(b);if(P)try{var _=JSON.parse(P).expires;(!_||_<v)&&localStorage.removeItem(b)}catch{localStorage.removeItem(b)}}}}u.get=function(v){if(v){var T="kc-callback-"+v,b=localStorage.getItem(T);return b&&(localStorage.removeItem(T),b=JSON.parse(b)),h(),b}},u.add=function(v){h();var T="kc-callback-"+v.state;v.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(T,JSON.stringify(v))}},ze=function(){if(!(this instanceof ze))return new ze;var u=this;u.get=function(b){if(b){var P=v("kc-callback-"+b);if(T("kc-callback-"+b,"",h(-100)),P)return JSON.parse(P)}},u.add=function(b){T("kc-callback-"+b.state,JSON.stringify(b),h(60))},u.removeItem=function(b){T(b,"",h(-100))};var h=function(b){var P=new Date;return P.setTime(P.getTime()+b*60*1e3),P},v=function(b){for(var P=b+"=",_=document.cookie.split(";"),E=0;E<_.length;E++){for(var O=_[E];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(P)==0)return O.substring(P.length,O.length)}return""},T=function(b,P,_){var E=b+"="+P+"; expires="+_.toUTCString()+"; ";document.cookie=E}};function pt(){try{return new Fe}catch{}return new ze}function $e(u){return function(){e.enableLogging&&u.apply(console,Array.prototype.slice.call(arguments))}}}function zd(t){const e=String.fromCodePoint(...t);return btoa(e)}class Kd{constructor(e){Ue(this,"oidc");Ue(this,"isAuthenticated",!1);Ue(this,"authenticatedWith",null);this.oidc=new Pi(e)}async InitAsync(e={}){return await this.oidc.init(e).then(async n=>(this.isAuthenticated=n,this.authenticatedWith=this.AuthenticatedWith(),n)).catch(n=>(console.info("Ocorreu um erro na inicialização. Verifique o console para mais detalhes."),console.error(n),!1))}LoginGovBr(){this.oidc.login({idpHint:"GOV.BR"})}LoginSenhaweb(){var n;const e=(n=this.oidc.authServerUrl)!=null&&n.startsWith("https://keycloak.dev.apps.sf.prefeitura.sp.gov.br")?"senhawebdev":"senhaweb";this.oidc.login({idpHint:e})}AuthenticatedWith(){var n,r;const e=this.oidc.tokenParsed;return e?(n=e.identity_provider)!=null&&n.startsWith("GOV.BR")?"govbr":(r=e.identity_provider)!=null&&r.startsWith("senhaweb")?"senhaweb":"ad":null}}let Li;function Wd(t){Li=new Kd(t)}const Cr=()=>Li;function Gd(t){return s.getCurrentScope()?(s.onScopeDispose(t),!0):!1}const qd=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Yd(t){return s.getCurrentInstance()}function Xd(t){return Array.isArray(t)?t:[t]}function Zd(t,e=!0,n){Yd()?s.onMounted(t,n):e?t():s.nextTick(t)}const xi=qd?window:void 0;function Ct(t){var e;const n=s.toValue(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Jd(){const t=s.ref(!1),e=s.getCurrentInstance();return e&&s.onMounted(()=>{t.value=!0},e),t}function Qd(t){const e=Jd();return s.computed(()=>(e.value,!!t()))}function ef(t,e,n={}){const{window:r=xi,...o}=n;let i;const l=Qd(()=>r&&"ResizeObserver"in r),a=()=>{i&&(i.disconnect(),i=void 0)},c=s.computed(()=>{const p=s.toValue(t);return Array.isArray(p)?p.map(y=>Ct(y)):[Ct(p)]}),d=s.watch(c,p=>{if(a(),l.value&&r){i=new ResizeObserver(e);for(const y of p)y&&i.observe(y,o)}},{immediate:!0,flush:"post"}),f=()=>{a(),d()};return Gd(f),{isSupported:l,stop:f}}function tf(t,e={width:0,height:0},n={}){const{window:r=xi,box:o="content-box"}=n,i=s.computed(()=>{var p,y;return(y=(p=Ct(t))==null?void 0:p.namespaceURI)==null?void 0:y.includes("svg")}),l=s.ref(e.width),a=s.ref(e.height),{stop:c}=ef(t,([p])=>{const y=o==="border-box"?p.borderBoxSize:o==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(r&&i.value){const k=Ct(t);if(k){const C=k.getBoundingClientRect();l.value=C.width,a.value=C.height}}else if(y){const k=Xd(y);l.value=k.reduce((C,{inlineSize:A})=>C+A,0),a.value=k.reduce((C,{blockSize:A})=>C+A,0)}else l.value=p.contentRect.width,a.value=p.contentRect.height},n);Zd(()=>{const p=Ct(t);p&&(l.value="offsetWidth"in p?p.offsetWidth:e.width,a.value="offsetHeight"in p?p.offsetHeight:e.height)});const d=s.watch(()=>Ct(t),p=>{l.value=p?e.width:0,a.value=p?e.height:0});function f(){c(),d()}return{width:l,height:a,stop:f}}var nf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Oi={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(nf,function(){var e=function(){},n="undefined",r=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],i={},l=null;function a(A,L){var w=A[L];if(typeof w.bind=="function")return w.bind(A);try{return Function.prototype.bind.call(w,A)}catch{return function(){return Function.prototype.apply.apply(w,[A,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function d(A){return A==="debug"&&(A="log"),typeof console===n?!1:A==="trace"&&r?c:console[A]!==void 0?a(console,A):console.log!==void 0?a(console,"log"):e}function f(){for(var A=this.getLevel(),L=0;L<o.length;L++){var w=o[L];this[w]=L<A?e:this.methodFactory(w,A,this.name)}if(this.log=this.debug,typeof console===n&&A<this.levels.SILENT)return"No console available for logging"}function p(A){return function(){typeof console!==n&&(f.call(this),this[A].apply(this,arguments))}}function y(A,L,w){return d(A)||p.apply(this,arguments)}function k(A,L){var w=this,S,N,U,G="loglevel";typeof A=="string"?G+=":"+A:typeof A=="symbol"&&(G=void 0);function ce(M){var X=(o[M]||"silent").toUpperCase();if(!(typeof window===n||!G)){try{window.localStorage[G]=X;return}catch{}try{window.document.cookie=encodeURIComponent(G)+"="+X+";"}catch{}}}function te(){var M;if(!(typeof window===n||!G)){try{M=window.localStorage[G]}catch{}if(typeof M===n)try{var X=window.document.cookie,ue=encodeURIComponent(G),de=X.indexOf(ue+"=");de!==-1&&(M=/^([^;]+)/.exec(X.slice(de+ue.length+1))[1])}catch{}return w.levels[M]===void 0&&(M=void 0),M}}function Ae(){if(!(typeof window===n||!G)){try{window.localStorage.removeItem(G)}catch{}try{window.document.cookie=encodeURIComponent(G)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function ne(M){var X=M;if(typeof X=="string"&&w.levels[X.toUpperCase()]!==void 0&&(X=w.levels[X.toUpperCase()]),typeof X=="number"&&X>=0&&X<=w.levels.SILENT)return X;throw new TypeError("log.setLevel() called with invalid level: "+M)}w.name=A,w.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},w.methodFactory=L||y,w.getLevel=function(){return U??N??S},w.setLevel=function(M,X){return U=ne(M),X!==!1&&ce(U),f.call(w)},w.setDefaultLevel=function(M){N=ne(M),te()||w.setLevel(M,!1)},w.resetLevel=function(){U=null,Ae(),f.call(w)},w.enableAll=function(M){w.setLevel(w.levels.TRACE,M)},w.disableAll=function(M){w.setLevel(w.levels.SILENT,M)},w.rebuild=function(){if(l!==w&&(S=ne(l.getLevel())),f.call(w),l===w)for(var M in i)i[M].rebuild()},S=ne(l?l.getLevel():"WARN");var Y=te();Y!=null&&(U=ne(Y)),f.call(w)}l=new k,l.getLogger=function(L){if(typeof L!="symbol"&&typeof L!="string"||L==="")throw new TypeError("You must supply a name when creating a logger.");var w=i[L];return w||(w=i[L]=new k(L,l.methodFactory)),w};var C=typeof window!==n?window.log:void 0;return l.noConflict=function(){return typeof window!==n&&window.log===l&&(window.log=C),l},l.getLoggers=function(){return i},l.default=l,l})})(Oi);var of=Oi.exports;const Ln=rf(of),sf={install(t,e){const n=e??{};Ln.setDefaultLevel(n.enableLogging?Ln.levels.DEBUG:Ln.levels.SILENT);const r=240;document.documentElement.style.setProperty("--nav-menu-width",`${r}px`);const o=s.ref(!0),i=s.ref(0),l=s.ref(!1),a=s.ref(!1),c=s.ref(""),d=s.ref(null),{width:f}=tf(d);t.provide(wo,{navMenuWidth:r,isMenuOpened:o,ToggleMenu:()=>{o.value=!o.value},OpenMenu:()=>{o.value=!0},CloseMenu:()=>{o.value=!1},scrollY:i,pageTitle:c,isDarkMode:l,ToggleTheme:()=>Ft.Toggle(),EnableDarkMode:()=>Ft.EnableDarkMode(),EnableLightMode:()=>Ft.EnableLightMode(),ClearStoredTheme:()=>Ft.ClearStoredTheme(),LogoutAsync:async()=>{const y=Ei(),{oidc:k}=Cr();await y.ConfirmAsync("Deseja realmente sair da sua conta?")&&(a.value=!0,await new Promise(A=>setTimeout(A,1e3)),k.logout({redirectUri:window.location.origin}))},Login:()=>{const{oidc:y}=Cr();y.login()},isLoggingOut:a,mainRef:d,mainWidth:f,isMainXs:s.computed(()=>f.value<=384),isMainSm:s.computed(()=>f.value>384),isMainMd:s.computed(()=>f.value>768),isMainLg:s.computed(()=>f.value>992),isMainXl:s.computed(()=>f.value>1280),isMain2Xl:s.computed(()=>f.value>1536),isMain3Xl:s.computed(()=>f.value>1920)}),new MutationObserver(()=>{l.value=document.documentElement.classList.contains("dark")}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.addEventListener("scroll",()=>{i.value=document.documentElement.scrollTop}),Ft.SetInitialTheme()}},af=Ln;class Er extends Error{constructor(n=[]){const r=Array.isArray(n)?n:[n];super(r[0]);Ue(this,"errors",[]);this.errors=r}}class $i{constructor(e=null){Ue(this,"errors",[]);Ue(this,"_value",null);Ue(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){if(Array.isArray(e)){e.forEach(n=>this.WithError(n));return}this.errors.push(e),this.isSuccessfulHttpStatusCode||(this._httpStatusCode=400)}get isSuccessfulHttpStatusCode(){return this._httpStatusCode>=200&&this._httpStatusCode<300}[Symbol.toPrimitive](e){if(e==="throw")throw new Er(this.errors)}get firstError(){return this.hasSuccess?null:this.errors[0]}}class Bi{get IsVisible(){return ft.isVisible()}async CreateAlertAsync(e){let n="info",r,o;return typeof e=="string"||Array.isArray(e)?r=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",o=e.title??"",r=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(i=>{ft.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:o,html:`<div style="max-height: 50vh; overflow: auto">${Si.sanitize(r)}</div>`}).then(()=>i(!0))})}async AlertAsync(e){return this.CreateAlertAsync({text:e,icon:"info"})}async AlertErrorAsync(e){return this.CreateAlertAsync({text:e,icon:"error"})}async AlertSuccessAsync(e){return this.CreateAlertAsync({text:e,icon:"success"})}}const Ni=()=>new Bi,lf=()=>new Bi;window.addEventListener("error",function(t){return Ir(t.error)||console.error(t.error),t.preventDefault(),!1}),window.addEventListener("unhandledrejection",function(t){return Ir(t.reason)||console.error("Unhandled Rejection",t.reason),t.preventDefault(),!1});const cf=t=>{t.config.errorHandler=(e,n,r)=>{Ir(e)||console.error("Vue Global Error Handler: ",{err:e,vm:n,info:r})}},Ir=t=>t instanceof Er||t instanceof $i?(Ni().AlertErrorAsync(t.errors),!0):!1;function uf(){return s.inject(wo)}const Tr=()=>uf(),df={class:"font-percentage"},Mi="--font-size-increment",ff="tamanho-fonte",mf=gt(s.defineComponent({__name:"FontSize",setup(t){const e=s.ref(!1),n=s.ref(0),r=()=>{n.value=Mn(),e.value=!0},o=()=>{e.value=!1},i=()=>document.documentElement,l=()=>parseInt(getComputedStyle(i()).getPropertyValue(Mi)||"1"),a=y=>{y<.5||y>1.6||(i().style.setProperty(Mi,y.toString()),p.value=y)},c=()=>{a(p.value+.1)},d=()=>{a(p.value-.1)},f=()=>{a(1)},p=s.ref(1);return s.onBeforeMount(()=>{localStorage.removeItem(ff)}),s.onMounted(()=>{p.value=l()}),(y,k)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(Pe,{button:!0,size:"sm",icon:"text_increase",tooltip:"Tamanho da fonte",onClick:r}),e.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createElementVNode("div",{class:s.normalizeClass(["border","fadein","font-size-wrapper"]),style:s.normalizeStyle({zIndex:n.value+1})},[s.createVNode(Pe,{button:!0,icon:"remove",size:"sm",onClick:d}),s.createElementVNode("span",df,s.toDisplayString(p.value.toLocaleString("pt-br",{style:"percent",maximumFractionDigits:0})),1),s.createVNode(Pe,{button:!0,icon:"add",size:"sm",onClick:c}),s.createElementVNode("span",{class:"redefinir",onClick:f}," Redefinir ")],4),s.createElementVNode("div",{class:"font-size-mask",style:s.normalizeStyle({zIndex:n.value}),onClick:o},null,4)],64)):s.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d0fb8241"]]),pf={class:"nav-menu-header"},hf={class:"nav-menu-inner-close"},gf={class:"main-content"},yf={class:"menu-button"},bf={class:"page-title"},vf={class:"action"},wf={id:"content"},kf={key:0,id:"logging-out"},_f={class:"info-fazenda"},Sf={class:"font-bold"},Cf={class:"info-endereco text-muted"},Ef=gt(s.defineComponent({__name:"Main",props:{auth:{}},setup(t){const e=t,{navMenuWidth:n,isMenuOpened:r,pageTitle:o,scrollY:i,ToggleMenu:l,isDarkMode:a,ToggleTheme:c,CloseMenu:d,LogoutAsync:f,Login:p,isLoggingOut:y,mainRef:k}=Tr(),C=s.ref(null),A=()=>{if(!C.value||!r.value)return!1;C.value.offsetWidth!==n&&d()};return s.onMounted(()=>{ht.useRouter().afterEach(()=>{A()})}),(L,w)=>(s.openBlock(),s.createElementBlock("main",{ref_key:"mainRef",ref:k,class:s.normalizeClass({"select-none":!0,disabled:s.unref(y),"nav-menu-visible":s.unref(r)})},[s.createElementVNode("aside",{id:"nav-menu",ref_key:"navMenuRef",ref:C,class:s.normalizeClass({"nav-menu-hidden":!s.unref(r)})},[s.createElementVNode("div",pf,[w[0]||(w[0]=s.createElementVNode("span",null,"Menu",-1)),s.createElementVNode("div",hf,[s.createVNode(Pe,{button:!0,icon:"close",onClick:s.unref(l)},null,8,["onClick"])])]),s.renderSlot(L.$slots,"nav-menu",{},void 0,!0)],2),s.createElementVNode("div",gf,[s.createElementVNode("div",{id:"top-bar",class:s.normalizeClass({"shadow-bottom":s.unref(i)>72})},[s.createElementVNode("div",yf,[s.createVNode(Pe,{button:!0,icon:s.unref(r)?"menu_open":"menu",tooltip:"Menu",onClick:s.unref(l)},null,8,["icon","onClick"])]),s.createElementVNode("div",bf,s.toDisplayString(s.unref(y)?"Saindo...":s.unref(o)),1),w[1]||(w[1]=s.createElementVNode("span",{class:"sep"},null,-1)),s.createElementVNode("div",vf,[s.createVNode(Pe,{button:!0,size:"sm",icon:s.unref(a)?"light_mode":"dark_mode",tooltip:s.unref(a)?"Modo claro":"Modo escuro",onClick:s.unref(c)},null,8,["icon","tooltip","onClick"]),s.createVNode(mf),e.auth?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[e.auth.isAuthenticated?(s.openBlock(),s.createBlock(Pe,{key:0,button:!0,size:"sm",icon:"logout",tooltip:"Sair",onClick:s.unref(f)},null,8,["onClick"])):(s.openBlock(),s.createBlock(Pe,{key:1,button:!0,size:"sm",icon:"login",tooltip:"Entrar",onClick:s.unref(p)},null,8,["onClick"]))],64)):s.createCommentVNode("",!0)])],2),s.createElementVNode("div",wf,[s.unref(y)?(s.openBlock(),s.createElementBlock("div",kf,[s.createVNode($r)])):s.renderSlot(L.$slots,"content",{key:1},void 0,!0)])]),s.createElementVNode("footer",null,[w[4]||(w[4]=s.createElementVNode("div",{class:"logo-fazenda"},null,-1)),s.createElementVNode("div",_f,[s.createElementVNode("span",Sf,[s.renderSlot(L.$slots,"footer-nome-fazenda",{},()=>[w[2]||(w[2]=s.createTextVNode(" SECRETARIA MUNICIPAL DA FAZENDA "))],!0)]),s.createElementVNode("span",Cf,[s.renderSlot(L.$slots,"footer-endereco-fazenda",{},()=>[w[3]||(w[3]=s.createTextVNode(" Rua Líbero Badaró, 190 - Centro - São Paulo - SP - CEP 01008-000 "))],!0)])])])],2))}}),[["__scopeId","data-v-2d76ce62"]]),If=s.defineComponent({__name:"PageTitle",props:{title:{}},setup(t){const{pageTitle:e}=Tr(),n=t;return s.watchEffect(()=>{document.title=n.title,e.value=n.title}),(r,o)=>null}}),Di={surface:{0:"{surface.0.color}",50:"{surface.100.color}",100:"{surface.100.color}",200:"{surface.200.color}",300:"{surface.300.color}",400:"{surface.400.color}",500:"{surface.1000.color}",600:"{surface.600.color}",700:"{surface.700.color}",800:"{surface.800.color}",900:"{surface.900.color}",950:"{surface.1000.color}"},primary:{color:"{primary.color}",contrastColor:"{bg.color}",hoverColor:"{primary.hover.color}",activeColor:"{primary.color}"},highlight:{background:"{primary.color}",color:"{bg.color}"},formField:{background:"{surface.0.color}",disabledBackground:"{surface.0.color}",filledBackground:"{surface.100.color}",filledFocusBackground:"{surface.100.color}",borderColor:"{surface.1000.color}",hoverBorderColor:"{primary.color}",focusBorderColor:"{primary.color}",invalidBorderColor:"{error.color}",color:"{text.color}",disabledColor:"{disabled.color}",placeholderColor:"{muted.color}",floatLabelColor:"{secondary.color}",floatLabelFocusColor:"{secondary.color}",floatLabelInvalidColor:"{error.color}",iconColor:"{primary.color}"},text:{color:"{text.color}",hoverColor:"{primary.color}",mutedColor:"{muted.color}",hoverMutedColor:"{muted.color}"},mask:{background:"{maskbg.color}",color:"{surface.200.color}"},content:{background:"{bg.color}",color:"{text.color}",border:{color:"{surface.1000.color}",radius:"6px"},hover:{background:"{primary.hover.color}",color:"{primary.color}"}}},Tf={semantic:{disabled:{opacity:"1"},transitionDuration:"0",primary:{50:"{primary.color}",100:"{primary.color}",200:"{primary.color}",300:"{primary.color}",400:"{primary.color}",500:"{primary.color}",600:"{primary.color}",700:"{primary.color}",800:"{primary.color}",900:"{primary.color}",950:"{primary.color}"},colorScheme:{light:{...Di},dark:{...Di}}},components:{blockui:{border:{radius:"0px"}},button:{padding:{x:"1rem",y:"0.5rem"},primary:{hover:{background:"{primary.color} !important",border:{color:"{primary.color} !important"}}},text:{secondary:{color:"{secondary.color} !important",hover:{background:"{surface.200.color} !important"}}},icon:{only:{width:"2rem"}}},checkbox:{background:"{surface.100.color} !important",border:{color:"{border.color} !important"},checked:{background:"{primary.color} !important",hover:{background:"{primary.color} !important"}},sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}},datatable:{header:{border:{color:"{border.color} !important"},cell:{border:{color:"{border.color} !important"},hover:{background:"{primary.hover.color} !important",color:"{primary.color} !important"}}},body:{cell:{border:{color:"{border.color} !important"}}},row:{striped:{background:"{surface.100.color} !important"}},footer:{border:{color:"transparent !important"}}},datepicker:{today:{background:"{primary.hover.color} !important",color:"{primary.color} !important"}},dialog:{background:"{bg.color} !important",color:"{text.color} !important",border:{color:"{surface.0.color} !important",radius:"{border.radius} !important"},title:{font:{size:"{font.size} !important",weight:"700 !important"}},header:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"{inline.spacing} !important"},content:{padding:"{content.spacing} !important"},footer:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"{inline.spacing} !important"}},inputtext:{background:"{bg.color}",color:"{text.color}",border:{color:"{border.color}"},hover:{border:{color:"{primary.color}"}},placeholder:{color:"{muted.color}"}},inputmask:{background:"{bg.color}",color:"{text.color}",border:{color:"{border.color}"},hover:{border:{color:"{primary.color}"}},placeholder:{color:"{muted.color}"}},select:{background:"{bg.color}",color:"{primary.color}",option:{focus:{background:"{primary.hover.color}",color:"{primary.color}"},selected:{focus:{background:"{primary.color}",color:"{bg.color}"}}},overlay:{background:"{bg.color}",border:{color:"{border.color}"}},dropdown:{color:"{primary.color}"},hover:{border:{color:"{primary.color}"}},placeholder:{color:"{disabled.color}"},disabled:{color:"{disabled.color}"}},skeleton:{background:"{surface.100.color} !important",animation:{background:"{surface.100.color} !important"}}}};class an{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 an.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return an.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static MaskCcm(e){return an.Mask(e.padStart(8,"0"),"#.###.###-#")}static async DelayAsync(e){return new Promise(n=>setTimeout(n,e))}}const Af=t=>{const e=new Set;function n(r){const{name:o,children:i}=r;if(o){if(e.has(o))throw new Error(["Erro na validação das rotas!",`Nome de rota duplicado: ${o}`].join(`
411
411
  `));e.add(o)}if(i&&Array.isArray(i))for(const l of i)n(l)}for(const r of t)n(r)};function Pf(){document.documentElement.classList.add("app-mounted")}R.AppError=Er,R.AppResult=$i,R.ConfigAuth=Wd,R.EnsureUniqueRouteNames=Af,R.RemovePreloader=Pf,R.SfButton=ys,R.SfContent=ds,R.SfDrawer=ws,R.SfIcon=Pe,R.SfMain=Ef,R.SfMessage=_s,R.SfNavMenu=vl,R.SfPageTitle=If,R.SfTabNavigation=hs,R.SfTooltip=Br,R.UseAlert=Ni,R.UseAlertService=lf,R.UseAppInject=Tr,R.UseAuth=Cr,R.UseConfirm=Ei,R.UseConfirmService=Pd,R.Utilities=an,R._logger=af,R.configSF=sf,R.globalErrorHandler=cf,R.themePreset=Tf,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
412
412
  //# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.cjs.map