@luizleon/sf.prefeiturasp.vuecomponents 5.0.39 → 5.0.40

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",b),u.setSuccess()))};window.addEventListener("message",b,!1)}else u.setSuccess();return N(u.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function Xe(u){if(!u||u=="default")return{login:function(S){return window.location.assign(e.createLoginUrl(S)),Y().promise},logout:async function(S){if(((S==null?void 0:S.logoutMethod)??e.logoutMethod)==="GET"){window.location.replace(e.createLogoutUrl(S));return}const O=e.createLogoutUrl(S),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(S,!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(S){return window.location.assign(e.createRegisterUrl(S)),Y().promise},accountManagement:function(){var S=e.createAccountUrl();if(typeof S<"u")window.location.href=S;else throw"Not supported by the OIDC server";return Y().promise},redirectUri:function(S,E){return S&&S.redirectUri?S.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(u=="cordova"){i.enable=!1;var h=function(S,E,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(S,E,O):window.open(S,E,O)},b=function(S){return S&&S.cordovaOptions?Object.keys(S.cordovaOptions).reduce(function(E,O){return E[O]=S.cordovaOptions[O],E},{}):{}},I=function(S){return Object.keys(S).reduce(function(E,O){return E.push(O+"="+S[O]),E},[]).join(",")},v=function(S){var E=b(S);return E.location="no",S&&S.prompt=="none"&&(E.hidden="yes"),I(E)},P=function(){return e.redirectUri||"http://localhost"};return{login:function(S){var E=Y(),O=v(S),x=e.createLoginUrl(S),R=h(x,"_blank",O),F=!1,Ce=!1,me=function(){Ce=!0,R.close()};return R.addEventListener("loadstart",function(pe){if(pe.url.indexOf(P())==0){var Ze=ne(pe.url);_(Ze,E),me(),F=!0}}),R.addEventListener("loaderror",function(pe){if(!F)if(pe.url.indexOf(P())==0){var Ze=ne(pe.url);_(Ze,E),me(),F=!0}else E.setError(),me()}),R.addEventListener("exit",function(pe){Ce||E.setError({reason:"closed_by_user"})}),E.promise},logout:function(S){var E=Y(),O=e.createLogoutUrl(S),x=h(O,"_blank","location=no,hidden=yes,clearcache=yes"),R;return x.addEventListener("loadstart",function(F){F.url.indexOf(P())==0&&x.close()}),x.addEventListener("loaderror",function(F){F.url.indexOf(P())==0||(R=!0),x.close()}),x.addEventListener("exit",function(F){R?E.setError():(e.clearToken(),E.setSuccess())}),E.promise},register:function(S){var E=Y(),O=e.createRegisterUrl(),x=v(S),R=h(O,"_blank",x);return R.addEventListener("loadstart",function(F){if(F.url.indexOf(P())==0){R.close();var Ce=ne(F.url);_(Ce,E)}}),E.promise},accountManagement:function(){var S=e.createAccountUrl();if(typeof S<"u"){var E=h(S,"_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(S){return P()}}}if(u=="cordova-native")return i.enable=!1,{login:function(S){var E=Y(),O=e.createLoginUrl(S);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var R=ne(x.url);_(R,E)}),window.cordova.plugins.browsertab.openUrl(O),E.promise},logout:function(S){var E=Y(),O=e.createLogoutUrl(S);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(S){var E=Y(),O=e.createRegisterUrl(S);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var R=ne(x.url);_(R,E)}),window.cordova.plugins.browsertab.openUrl(O),E.promise},accountManagement:function(){var S=e.createAccountUrl();if(typeof S<"u")window.cordova.plugins.browsertab.openUrl(S);else throw"Not supported by the OIDC server"},redirectUri:function(S){return S&&S.redirectUri?S.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 b=new Date().getTime(),I=0;I<localStorage.length;I++){var v=localStorage.key(I);if(v&&v.indexOf("kc-callback-")==0){var P=localStorage.getItem(v);if(P)try{var S=JSON.parse(P).expires;(!S||S<b)&&localStorage.removeItem(v)}catch{localStorage.removeItem(v)}}}}u.get=function(b){if(b){var I="kc-callback-"+b,v=localStorage.getItem(I);return v&&(localStorage.removeItem(I),v=JSON.parse(v)),h(),v}},u.add=function(b){h();var I="kc-callback-"+b.state;b.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(I,JSON.stringify(b))}},ze=function(){if(!(this instanceof ze))return new ze;var u=this;u.get=function(v){if(v){var P=b("kc-callback-"+v);if(I("kc-callback-"+v,"",h(-100)),P)return JSON.parse(P)}},u.add=function(v){I("kc-callback-"+v.state,JSON.stringify(v),h(60))},u.removeItem=function(v){I(v,"",h(-100))};var h=function(v){var P=new Date;return P.setTime(P.getTime()+v*60*1e3),P},b=function(v){for(var P=v+"=",S=document.cookie.split(";"),E=0;E<S.length;E++){for(var O=S[E];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(P)==0)return O.substring(P.length,O.length)}return""},I=function(v,P,S){var E=v+"="+P+"; expires="+S.toUTCString()+"; ";document.cookie=E}};function ht(){try{return new Fe}catch{}return new ze}function $e(u){return function(){e.enableLogging&&u.apply(console,Array.prototype.slice.call(arguments))}}}function ef(t){const e=String.fromCodePoint(...t);return btoa(e)}class tf{constructor(e){ee(this,"oidc");ee(this,"isAuthenticated",!1);ee(this,"authenticatedWith",null);this.oidc=new Di(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,o;const e=this.oidc.tokenParsed;return e?(n=e.identity_provider)!=null&&n.startsWith("GOV.BR")?"govbr":(o=e.identity_provider)!=null&&o.startsWith("senhaweb")?"senhaweb":"ad":null}}let Ri;function nf(t){Ri=new tf(t)}const xo=()=>Ri;function of(t){return s.getCurrentScope()?(s.onScopeDispose(t),!0):!1}const rf=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function sf(t){return s.getCurrentInstance()}function af(t){return Array.isArray(t)?t:[t]}function lf(t,e=!0,n){sf()?s.onMounted(t,n):e?t():s.nextTick(t)}const Ui=rf?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 cf(){const t=s.ref(!1),e=s.getCurrentInstance();return e&&s.onMounted(()=>{t.value=!0},e),t}function uf(t){const e=cf();return s.computed(()=>(e.value,!!t()))}function df(t,e,n={}){const{window:o=Ui,...r}=n;let i;const l=uf(()=>o&&"ResizeObserver"in o),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&&o){i=new ResizeObserver(e);for(const y of p)y&&i.observe(y,r)}},{immediate:!0,flush:"post"}),f=()=>{a(),d()};return of(f),{isSupported:l,stop:f}}function ff(t,e={width:0,height:0},n={}){const{window:o=Ui,box:r="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}=df(t,([p])=>{const y=r==="border-box"?p.borderBoxSize:r==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(o&&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=af(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);lf(()=>{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}}function mf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xn={exports:{}},pf=xn.exports,Vi;function hf(){return Vi||(Vi=1,function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(pf,function(){var e=function(){},n="undefined",o=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["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"&&o?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<r.length;L++){var w=r[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,_,D,U,G="loglevel";typeof A=="string"?G+=":"+A:typeof A=="symbol"&&(G=void 0);function ue(N){var X=(r[N]||"silent").toUpperCase();if(!(typeof window===n||!G)){try{window.localStorage[G]=X;return}catch{}try{window.document.cookie=encodeURIComponent(G)+"="+X+";"}catch{}}}function ne(){var N;if(!(typeof window===n||!G)){try{N=window.localStorage[G]}catch{}if(typeof N===n)try{var X=window.document.cookie,de=encodeURIComponent(G),fe=X.indexOf(de+"=");fe!==-1&&(N=/^([^;]+)/.exec(X.slice(fe+de.length+1))[1])}catch{}return w.levels[N]===void 0&&(N=void 0),N}}function Pe(){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 oe(N){var X=N;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: "+N)}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??D??_},w.setLevel=function(N,X){return U=oe(N),X!==!1&&ue(U),f.call(w)},w.setDefaultLevel=function(N){D=oe(N),ne()||w.setLevel(N,!1)},w.resetLevel=function(){U=null,Pe(),f.call(w)},w.enableAll=function(N){w.setLevel(w.levels.TRACE,N)},w.disableAll=function(N){w.setLevel(w.levels.SILENT,N)},w.rebuild=function(){if(l!==w&&(_=oe(l.getLevel())),f.call(w),l===w)for(var N in i)i[N].rebuild()},_=oe(l?l.getLevel():"WARN");var Y=ne();Y!=null&&(U=oe(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})}(xn)),xn.exports}var gf=hf();const On=mf(gf),yf={install(t,e){const n=e??{};On.setDefaultLevel(n.enableLogging?On.levels.DEBUG:On.levels.SILENT);const o=240;document.documentElement.style.setProperty("--nav-menu-width",`${o}px`);const r=s.ref(!0),i=s.ref(0),l=s.ref(!1),a=s.ref(!1),c=s.ref(""),d=s.ref(null),{width:f}=ff(d);t.provide(Ar,{navMenuWidth:o,isMenuOpened:r,ToggleMenu:()=>{r.value=!r.value},OpenMenu:()=>{r.value=!0},CloseMenu:()=>{r.value=!1},scrollY:i,pageTitle:c,isDarkMode:l,ToggleTheme:()=>Kt.Toggle(),EnableDarkMode:()=>Kt.EnableDarkMode(),EnableLightMode:()=>Kt.EnableLightMode(),ClearStoredTheme:()=>Kt.ClearStoredTheme(),LogoutAsync:async()=>{const y=$i(),{oidc:k}=xo();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}=xo();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}),Kt.SetInitialTheme()}},vf=On;class Oo extends Error{constructor(n=[]){const o=Array.isArray(n)?n:[n];super(o[0]);ee(this,"errors",[]);this.errors=o}}class Hi{constructor(e=null){ee(this,"errors",[]);ee(this,"_value",null);ee(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 Oo(this.errors)}get firstError(){return this.hasSuccess?null:this.errors[0]}}class ji{get IsVisible(){return mt.isVisible()}async CreateAlertAsync(e){let n="info",o,r;return typeof e=="string"||Array.isArray(e)?o=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",r=e.title??"",o=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(i=>{mt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:r,html:`<div style="max-height: 50vh; overflow: auto">${Ao.sanitize(o)}</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 Fi=()=>new ji,bf=()=>new ji;window.addEventListener("error",function(t){return $o(t.error)||console.error(t.error||t.message),t.preventDefault(),!1}),window.addEventListener("unhandledrejection",function(t){return $o(t.reason)||console.error("Unhandled Rejection",t.reason),t.preventDefault(),!1});const wf=t=>{t.config.errorHandler=(e,n,o)=>{$o(e)||console.error("Vue Global Error Handler: ",{err:e,vm:n,info:o})}},$o=t=>{try{if(t.httpStatusCode===401)return!0}catch{}return t instanceof Oo||t instanceof Hi?(Fi().AlertErrorAsync(t.errors),!0):!1};function kf(){return s.inject(Ar)}const $n=()=>kf(),Sf={class:"font-percentage"},zi="--font-size-increment",_f="tamanho-fonte",Cf=et(s.defineComponent({__name:"FontSize",setup(t){const e=s.ref(!1),n=s.ref(0),o=()=>{n.value=Hn(),e.value=!0},r=()=>{e.value=!1},i=()=>document.documentElement,l=()=>parseInt(getComputedStyle(i()).getPropertyValue(zi)||"1"),a=y=>{y<.5||y>1.6||(i().style.setProperty(zi,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(_f)}),s.onMounted(()=>{p.value=l()}),(y,k)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(Ue,{button:!0,size:"sm",icon:"text_increase",tooltip:"Tamanho da fonte",onClick:o}),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.createElementVNode("div",{class:"icon",onClick:d}),s.createElementVNode("span",Sf,s.toDisplayString(p.value.toLocaleString("pt-br",{style:"percent",maximumFractionDigits:0})),1),s.createElementVNode("div",{class:"icon add",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:r},null,4)],64)):s.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d17f4a5f"]]),Ef=s.defineComponent({__name:"ScrollToTop",setup(t){const{scrollY:e}=$n(),n=s.computed(()=>e.value>800);function o(){document.documentElement.scrollTo(0,0)}return(r,i)=>(s.openBlock(),s.createElementBlock("button",{class:s.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":n.value}]),onClick:o},null,2))}}),Tf={class:"nav-menu-header"},If={class:"nav-menu-inner-close"},Af={class:"main-content"},Pf={class:"page-title"},Lf={class:"action"},xf={id:"content"},Of={key:0,id:"logging-out"},$f={class:"info-fazenda"},Bf={class:"font-bold"},Nf={class:"info-endereco text-muted"},Mf={class:"footer-right"},Df=et(s.defineComponent({__name:"Main",props:{auth:{}},setup(t){const e=t,{navMenuWidth:n,isMenuOpened:o,pageTitle:r,scrollY:i,ToggleMenu:l,isDarkMode:a,ToggleTheme:c,CloseMenu:d,LogoutAsync:f,Login:p,isLoggingOut:y,mainRef:k}=$n(),C=s.ref(null),A=()=>{if(!C.value||!o.value)return!1;C.value.offsetWidth!==n&&d()};return s.onMounted(()=>{gt.useRouter().afterEach(()=>{A()})}),(L,w)=>(s.openBlock(),s.createElementBlock("main",{ref_key:"mainRef",ref:k,class:s.normalizeClass({disabled:s.unref(y),"nav-menu-visible":s.unref(o)})},[s.createElementVNode("aside",{id:"nav-menu",ref_key:"navMenuRef",ref:C,class:s.normalizeClass({"nav-menu-hidden":!s.unref(o)})},[s.createElementVNode("div",Tf,[w[0]||(w[0]=s.createElementVNode("span",null,"Menu",-1)),s.createElementVNode("div",If,[s.createVNode(Ue,{button:!0,icon:"close",onClick:s.unref(l)},null,8,["onClick"])])]),s.renderSlot(L.$slots,"nav-menu",{},void 0,!0)],2),s.createElementVNode("div",Af,[s.createElementVNode("div",{id:"top-bar",class:s.normalizeClass({"shadow-bottom":s.unref(i)>72})},[s.createVNode(Ue,{button:!0,icon:s.unref(o)?"menu_open":"menu",tooltip:"Menu",onClick:s.unref(l)},null,8,["icon","onClick"]),s.createElementVNode("div",Pf,s.toDisplayString(s.unref(y)?"Saindo...":s.unref(r)),1),w[1]||(w[1]=s.createElementVNode("span",{class:"sep"},null,-1)),s.createElementVNode("div",Lf,[s.createVNode(Ue,{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(Cf),e.auth?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[e.auth.isAuthenticated?(s.openBlock(),s.createBlock(Ue,{key:0,button:!0,size:"sm",icon:"logout",tooltip:"Sair",onClick:s.unref(f)},null,8,["onClick"])):(s.openBlock(),s.createBlock(Ue,{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",xf,[s.unref(y)?(s.openBlock(),s.createElementBlock("div",Of,[s.createVNode(Ho)])):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",Bf,[s.renderSlot(L.$slots,"footer-nome-fazenda",{},()=>[w[2]||(w[2]=s.createTextVNode(" SECRETARIA MUNICIPAL DA FAZENDA "))],!0)]),s.createElementVNode("span",Nf,[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)])]),s.createElementVNode("div",Mf,[s.renderSlot(L.$slots,"footer-right",{},void 0,!0)])]),s.createVNode(Ef)],2))}}),[["__scopeId","data-v-19181e3f"]]),Rf=s.defineComponent({__name:"PageTitle",props:{title:{}},setup(t){const{pageTitle:e}=$n(),n=t;return s.watchEffect(()=>{document.title=n.title,e.value=n.title}),(o,r)=>null}}),Et=t=>{const e=t==="light"?"0, 0, 0":"198, 198, 198";return`0 1px 3px 0 rgba(${e}, 0.1), 0 1px 2px -1px rgba(${e}, 0.1);`},Ki={surface:{0:"var(--surface-0-color)",50:"var(--surface-100-color)",100:"var(--surface-100-color)",200:"var(--surface-200-color)",300:"var(--surface-300-color)",400:"var(--surface-400-color)",500:"var(--surface-1000-color)",600:"var(--surface-600-color)",700:"var(--surface-700-color)",800:"var(--surface-800-color)",900:"var(--surface-900-color)",950:"var(--surface-1000-color)"},primary:{color:"var(--primary-color)",contrastColor:"var(--bg-color)",hoverColor:"var(--primary-hover-color)",activeColor:"var(--primary-color)"},highlight:{background:"var(--primary-color)",color:"var(--bg-color)"},formField:{background:"var(--surface-0-color)",disabledBackground:"var(--surface-0-color)",filledBackground:"var(--surface-100-color)",filledFocusBackground:"var(--surface-100-color)",borderColor:"var(--surface-1000-color)",hoverBorderColor:"var(--primary-color)",focusBorderColor:"var(--primary-color)",invalidBorderColor:"var(--error-color)",color:"var(--text-color)",disabledColor:"var(--disabled-color)",placeholderColor:"var(--muted-color)",floatLabelColor:"var(--secondary-color)",floatLabelFocusColor:"var(--secondary-color)",floatLabelInvalidColor:"var(--error-color)",iconColor:"var(--primary-color)"},text:{color:"var(--text-color)",hoverColor:"var(--primary-color)",mutedColor:"var(--muted-color)",hoverMutedColor:"var(--muted-color)"},mask:{background:"var(--maskbg-color)",color:"var(--surface-200-color)"},content:{background:"var(--bg-color)",color:"var(--text-color)",border:{color:"var(--surface-1000-color)",radius:"var(--border-radius)"},hover:{background:"var(--primary-hover-color)",color:"var(--primary-color)"}}},Uf={semantic:{disabled:{opacity:"1"},transitionDuration:"0",primary:{50:"var(--primary-color)",100:"var(--primary-color)",200:"var(--primary-color)",300:"var(--primary-color)",400:"var(--primary-color)",500:"var(--primary-color)",600:"var(--primary-color)",700:"var(--primary-color)",800:"var(--primary-color)",900:"var(--primary-color)",950:"var(--primary-color)"},colorScheme:{light:{...Ki},dark:{...Ki}}},components:{blockui:{root:{borderRadius:"0px"}},button:{root:{paddingX:"0.75rem",paddingY:"0.5rem",sm:{paddingX:"0.625rem",paddingY:"0.375rem"},lg:{paddingX:"0.875rem",paddingY:"0.575rem"},primary:{hoverBackground:"var(--primary-color) !important",hoverBorderColor:"var(--primary-color) !important"}},text:{secondary:{color:"var(--secondary-color) !important",hoverBackground:"var(--surface-200-color) !important"}}},card:{root:{borderRadius:"var(--border-radius)"},title:{fontWeight:"700",fontSize:"var(--text-md)"},body:{padding:"var(--content-gutter)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:Et("light")}},dark:{root:{background:"var(--surface-300-color)",shadow:Et("dark")}}}},checkbox:{root:{background:"var(--surface-200-color) !important",borderColor:"var(--muted-color) !important",borderRadius:"var(--border-radius) !important",checkedBackground:"var(--primary-color) !important",checkedHoverBackground:"var(--primary-color) !important",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}}},confirmpopup:{root:{borderColor:"var(--border-color)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:Et("light")}},dark:{root:{background:"var(--surface-300-color)",shadow:Et("dark")}}}},datatable:{root:{borderColor:"var(--border-color) !important"},header:{borderColor:"var(--border-color) !important",padding:"0 0 var(--content-gutter) 0",sm:{padding:"0 0 var(--content-gutter-sm) 0"}},headerCell:{borderColor:"var(--border-color) !important",hoverColor:"var(--primary-color) !important",hoverBackground:"var(--primary-hover-color) !important"},bodyCell:{borderColor:"var(--border-color) !important"},footer:{borderColor:"var(--border-color) !important"},colorScheme:{light:{header:{background:"var(--bg-color)",color:"var(--text-color)"},headerCell:{background:"var(--bg-color)"},row:{background:"var(--bg-color)",stripedBackground:"var(--surface-300-color)"}},dark:{header:{background:"var(--surface-300-color)",color:"var(--text-color)"},headerCell:{background:"var(--surface-300-color)"},row:{stripedBackground:"var(--bg-color)",background:"var(--surface-300-color)"}}}},datepicker:{today:{background:"var(--primary-hover-color) !important",color:"var(--primary-color) !important"}},dialog:{root:{background:"var(--bg-color) !important",color:"var(--text-color) !important",borderColor:"var(--border-color) !important",borderRadius:"var(--border-radius) !important",shadow:"none !important"},title:{fontSize:"var(--font-size) !important",fontWeight:"700 !important"},header:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"var(--content-gutter-sm) !important"},content:{padding:"var(--content-gutter) !important"},footer:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"var(--content-gutter-sm) !important"}},inputtext:{root:{background:"var(--surface-100-color)",color:"var(--text-color)",borderColor:"var(--border-color) !important",borderRadius:"var(--border-radius) !important",shadow:"none !important",hoverBorderColor:"var(--primary-color) !important",placeholderColor:"var(--text-muted-color)"}},menu:{item:{focusBackground:"var(--surface-400-color)",focusColor:"var(--text-color)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:Et("light")}},dark:{root:{background:"var(--surface-200-color)",shadow:Et("dark")}}}},popover:{root:{background:"var(--bg-color)",color:"var(--text-color)",borderColor:"var(--border-color)",borderRadius:"var(--border-radius)",shadow:"none",gutter:"8px",arrowOffset:"0.75rem"},content:{padding:"0"}},select:{root:{background:"var(--bg-color)",color:"var(--primary-color)",hoverBorderColor:"var(--primary-color)",placeholderColor:"var(--muted-color)",disabledColor:"var(--disabled-color)"},option:{focusBackground:"var(--surface-200-color)",focusColor:"var(--primary-color)",selectedFocusColor:"var(--bg-color)",selectedFocusBackground:"var(--primary-color)"},overlay:{borderColor:"var(--border-color)"},dropdown:{color:"var(--primary-color)"},colorScheme:{light:{overlay:{background:"var(--bg-color)"}},dark:{overlay:{background:"var(--surface-100-color)"}}}},skeleton:{root:{background:"var(--surface-700-color)",animationBackground:"var(--surface-100-color)"}},textarea:{root:{background:"var(--surface-100-color)",hoverBorderColor:"var(--primary-color)",placeholderColor:"var(--text-muted-color)"}},toast:{root:{width:"min(90vw, 320px)"},colorScheme:{light:{contrast:{background:"var(--text-color)",color:"var(--bg-color)",detailColor:"var(--bg-color)"}},dark:{contrast:{background:"var(--bg-color)",color:"var(--text-color)",detailColor:"var(--text-color)"}}},info:{background:"var(--info-color)",color:"var(--info-hover-color)",detailColor:"var(--text-color)"},success:{background:"var(--success-color)",color:"var(--success-hover-color)",detailColor:"var(--text-color)"},warn:{background:"var(--warn-color)",color:"var(--warn-hover-color)",detailColor:"var(--text-color)"},error:{background:"var(--error-color)",color:"var(--error-hover-color)",detailColor:"var(--text-color)"},secondary:{background:"var(--secondary-color)",color:"var(--secondary-hover-color)",detailColor:"var(--text-color)"}}}};class at{static get IsTouch(){return window.matchMedia("(pointer: coarse)").matches}static GetMaxZindex(e=[]){let n="body > *:not(script):not(style)";for(const r of e)n+=`, ${r}`;const o=Math.max(...Array.from(document.querySelectorAll(n)).map(r=>{const i=getComputedStyle(r).zIndex;return+i==+i?+i:0}));return o>=100?o:100}static AjustarFuso(e){const n=e.getTimezoneOffset()/60;e.setHours(e.getHours()-n)}static Mask(e,n){let o=0,r=e.toString();return n.replace(/#/g,()=>r[o++]||"")}static MaskCpf(e){return at.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return at.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static MaskCcm(e){return at.Mask(e.padStart(8,"0"),"#.###.###-#")}static async DelayAsync(e){return new Promise(n=>setTimeout(n,e))}}class Vf{constructor(e){ee(this,"sub");ee(this,"username");ee(this,"name");ee(this,"email");ee(this,"roles");ee(this,"groups");ee(this,"userinfo");ee(this,"department");ee(this,"jobTitle");ee(this,"idp");this.userinfo=e,this.sub=e.sub,this.username=e.employeeID??e.cpf??"",this.name=e.name??"",this.email=e.email??null,this.roles=e.role??[],this.groups=e.group??[],this.department=this.SetDepartment(),this.jobTitle=this.SetJobTitle(),this.idp=this.SetIdp()}get firstname(){return this.name.split(" ")[0]??this.name}get maskedUsername(){return this.username?this.username.length<=11?at.MaskCpf(this.username):this.username.length===14?at.MaskCnpj(this.username):this.username:""}IsInRole(e){return this.roles.includes(e)}IsInGroup(e){return this.groups.includes(e)}SetIdp(){var n;const e=((n=this.userinfo)==null?void 0:n.identity_provider)??null;return(e==null?void 0:e.toLocaleLowerCase())==="gov.br"?"govbr":e!=null&&e.toLocaleLowerCase().startsWith("senhaweb")?"senhaweb":null}SetDepartment(){var e;return((e=this.userinfo)==null?void 0:e.department)??null}SetJobTitle(){var e;return((e=this.userinfo)==null?void 0:e.jobTitle)??null}}function Hf(){const t=s.ref("development");function e(c){t.value=c.toLocaleLowerCase()}const n=s.computed(()=>t.value==="development"),o=s.computed(()=>t.value==="pack"),r=s.computed(()=>t.value==="hml"),i=s.computed(()=>t.value==="production"),l=s.ref(null);function a(){l.value=null}return{environment:t,SetEnvironment:e,isDev:n,isPack:o,isHml:r,isProd:i,user:l,$reset:a}}const jf=t=>{const e=new Set;function n(o){const{name:r,children:i}=o;if(r){if(e.has(r))throw new Error(["Erro na validação das rotas!",`Nome de rota duplicado: ${r}`].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",b),u.setSuccess()))};window.addEventListener("message",b,!1)}else u.setSuccess();return N(u.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function Xe(u){if(!u||u=="default")return{login:function(S){return window.location.assign(e.createLoginUrl(S)),Y().promise},logout:async function(S){if(((S==null?void 0:S.logoutMethod)??e.logoutMethod)==="GET"){window.location.replace(e.createLogoutUrl(S));return}const O=e.createLogoutUrl(S),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(S,!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(S){return window.location.assign(e.createRegisterUrl(S)),Y().promise},accountManagement:function(){var S=e.createAccountUrl();if(typeof S<"u")window.location.href=S;else throw"Not supported by the OIDC server";return Y().promise},redirectUri:function(S,E){return S&&S.redirectUri?S.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(u=="cordova"){i.enable=!1;var h=function(S,E,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(S,E,O):window.open(S,E,O)},b=function(S){return S&&S.cordovaOptions?Object.keys(S.cordovaOptions).reduce(function(E,O){return E[O]=S.cordovaOptions[O],E},{}):{}},I=function(S){return Object.keys(S).reduce(function(E,O){return E.push(O+"="+S[O]),E},[]).join(",")},v=function(S){var E=b(S);return E.location="no",S&&S.prompt=="none"&&(E.hidden="yes"),I(E)},P=function(){return e.redirectUri||"http://localhost"};return{login:function(S){var E=Y(),O=v(S),x=e.createLoginUrl(S),R=h(x,"_blank",O),F=!1,Ce=!1,me=function(){Ce=!0,R.close()};return R.addEventListener("loadstart",function(pe){if(pe.url.indexOf(P())==0){var Ze=ne(pe.url);_(Ze,E),me(),F=!0}}),R.addEventListener("loaderror",function(pe){if(!F)if(pe.url.indexOf(P())==0){var Ze=ne(pe.url);_(Ze,E),me(),F=!0}else E.setError(),me()}),R.addEventListener("exit",function(pe){Ce||E.setError({reason:"closed_by_user"})}),E.promise},logout:function(S){var E=Y(),O=e.createLogoutUrl(S),x=h(O,"_blank","location=no,hidden=yes,clearcache=yes"),R;return x.addEventListener("loadstart",function(F){F.url.indexOf(P())==0&&x.close()}),x.addEventListener("loaderror",function(F){F.url.indexOf(P())==0||(R=!0),x.close()}),x.addEventListener("exit",function(F){R?E.setError():(e.clearToken(),E.setSuccess())}),E.promise},register:function(S){var E=Y(),O=e.createRegisterUrl(),x=v(S),R=h(O,"_blank",x);return R.addEventListener("loadstart",function(F){if(F.url.indexOf(P())==0){R.close();var Ce=ne(F.url);_(Ce,E)}}),E.promise},accountManagement:function(){var S=e.createAccountUrl();if(typeof S<"u"){var E=h(S,"_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(S){return P()}}}if(u=="cordova-native")return i.enable=!1,{login:function(S){var E=Y(),O=e.createLoginUrl(S);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var R=ne(x.url);_(R,E)}),window.cordova.plugins.browsertab.openUrl(O),E.promise},logout:function(S){var E=Y(),O=e.createLogoutUrl(S);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(S){var E=Y(),O=e.createRegisterUrl(S);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var R=ne(x.url);_(R,E)}),window.cordova.plugins.browsertab.openUrl(O),E.promise},accountManagement:function(){var S=e.createAccountUrl();if(typeof S<"u")window.cordova.plugins.browsertab.openUrl(S);else throw"Not supported by the OIDC server"},redirectUri:function(S){return S&&S.redirectUri?S.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 b=new Date().getTime(),I=0;I<localStorage.length;I++){var v=localStorage.key(I);if(v&&v.indexOf("kc-callback-")==0){var P=localStorage.getItem(v);if(P)try{var S=JSON.parse(P).expires;(!S||S<b)&&localStorage.removeItem(v)}catch{localStorage.removeItem(v)}}}}u.get=function(b){if(b){var I="kc-callback-"+b,v=localStorage.getItem(I);return v&&(localStorage.removeItem(I),v=JSON.parse(v)),h(),v}},u.add=function(b){h();var I="kc-callback-"+b.state;b.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(I,JSON.stringify(b))}},ze=function(){if(!(this instanceof ze))return new ze;var u=this;u.get=function(v){if(v){var P=b("kc-callback-"+v);if(I("kc-callback-"+v,"",h(-100)),P)return JSON.parse(P)}},u.add=function(v){I("kc-callback-"+v.state,JSON.stringify(v),h(60))},u.removeItem=function(v){I(v,"",h(-100))};var h=function(v){var P=new Date;return P.setTime(P.getTime()+v*60*1e3),P},b=function(v){for(var P=v+"=",S=document.cookie.split(";"),E=0;E<S.length;E++){for(var O=S[E];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(P)==0)return O.substring(P.length,O.length)}return""},I=function(v,P,S){var E=v+"="+P+"; expires="+S.toUTCString()+"; ";document.cookie=E}};function ht(){try{return new Fe}catch{}return new ze}function $e(u){return function(){e.enableLogging&&u.apply(console,Array.prototype.slice.call(arguments))}}}function ef(t){const e=String.fromCodePoint(...t);return btoa(e)}class tf{constructor(e){ee(this,"oidc");ee(this,"isAuthenticated",!1);ee(this,"authenticatedWith",null);this.oidc=new Di(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,o;const e=this.oidc.tokenParsed;return e?(n=e.identity_provider)!=null&&n.startsWith("GOV.BR")?"govbr":(o=e.identity_provider)!=null&&o.startsWith("senhaweb")?"senhaweb":"ad":null}}let Ri;function nf(t){Ri=new tf(t)}const xo=()=>Ri;function of(t){return s.getCurrentScope()?(s.onScopeDispose(t),!0):!1}const rf=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function sf(t){return s.getCurrentInstance()}function af(t){return Array.isArray(t)?t:[t]}function lf(t,e=!0,n){sf()?s.onMounted(t,n):e?t():s.nextTick(t)}const Ui=rf?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 cf(){const t=s.ref(!1),e=s.getCurrentInstance();return e&&s.onMounted(()=>{t.value=!0},e),t}function uf(t){const e=cf();return s.computed(()=>(e.value,!!t()))}function df(t,e,n={}){const{window:o=Ui,...r}=n;let i;const l=uf(()=>o&&"ResizeObserver"in o),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&&o){i=new ResizeObserver(e);for(const y of p)y&&i.observe(y,r)}},{immediate:!0,flush:"post"}),f=()=>{a(),d()};return of(f),{isSupported:l,stop:f}}function ff(t,e={width:0,height:0},n={}){const{window:o=Ui,box:r="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}=df(t,([p])=>{const y=r==="border-box"?p.borderBoxSize:r==="content-box"?p.contentBoxSize:p.devicePixelContentBoxSize;if(o&&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=af(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);lf(()=>{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}}function mf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xn={exports:{}},pf=xn.exports,Vi;function hf(){return Vi||(Vi=1,function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(pf,function(){var e=function(){},n="undefined",o=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["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"&&o?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<r.length;L++){var w=r[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,_,D,U,G="loglevel";typeof A=="string"?G+=":"+A:typeof A=="symbol"&&(G=void 0);function ue(N){var X=(r[N]||"silent").toUpperCase();if(!(typeof window===n||!G)){try{window.localStorage[G]=X;return}catch{}try{window.document.cookie=encodeURIComponent(G)+"="+X+";"}catch{}}}function ne(){var N;if(!(typeof window===n||!G)){try{N=window.localStorage[G]}catch{}if(typeof N===n)try{var X=window.document.cookie,de=encodeURIComponent(G),fe=X.indexOf(de+"=");fe!==-1&&(N=/^([^;]+)/.exec(X.slice(fe+de.length+1))[1])}catch{}return w.levels[N]===void 0&&(N=void 0),N}}function Pe(){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 oe(N){var X=N;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: "+N)}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??D??_},w.setLevel=function(N,X){return U=oe(N),X!==!1&&ue(U),f.call(w)},w.setDefaultLevel=function(N){D=oe(N),ne()||w.setLevel(N,!1)},w.resetLevel=function(){U=null,Pe(),f.call(w)},w.enableAll=function(N){w.setLevel(w.levels.TRACE,N)},w.disableAll=function(N){w.setLevel(w.levels.SILENT,N)},w.rebuild=function(){if(l!==w&&(_=oe(l.getLevel())),f.call(w),l===w)for(var N in i)i[N].rebuild()},_=oe(l?l.getLevel():"WARN");var Y=ne();Y!=null&&(U=oe(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})}(xn)),xn.exports}var gf=hf();const On=mf(gf),yf={install(t,e){const n=e??{};On.setDefaultLevel(n.enableLogging?On.levels.DEBUG:On.levels.SILENT);const o=240;document.documentElement.style.setProperty("--nav-menu-width",`${o}px`);const r=s.ref(!0),i=s.ref(0),l=s.ref(!1),a=s.ref(!1),c=s.ref(""),d=s.ref(null),{width:f}=ff(d);t.provide(Ar,{navMenuWidth:o,isMenuOpened:r,ToggleMenu:()=>{r.value=!r.value},OpenMenu:()=>{r.value=!0},CloseMenu:()=>{r.value=!1},scrollY:i,pageTitle:c,isDarkMode:l,ToggleTheme:()=>Kt.Toggle(),EnableDarkMode:()=>Kt.EnableDarkMode(),EnableLightMode:()=>Kt.EnableLightMode(),ClearStoredTheme:()=>Kt.ClearStoredTheme(),LogoutAsync:async()=>{const y=$i(),{oidc:k}=xo();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}=xo();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}),Kt.SetInitialTheme()}},vf=On;class Oo extends Error{constructor(n=[]){const o=Array.isArray(n)?n:[n];super(o[0]);ee(this,"errors",[]);this.errors=o}}class Hi{constructor(e=null){ee(this,"errors",[]);ee(this,"_value",null);ee(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 Oo(this.errors)}get firstError(){return this.hasSuccess?null:this.errors[0]}}class ji{get IsVisible(){return mt.isVisible()}async CreateAlertAsync(e){let n="info",o,r;return typeof e=="string"||Array.isArray(e)?o=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",r=e.title??"",o=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(i=>{mt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:r,html:`<div style="max-height: 50vh; overflow: auto">${Ao.sanitize(o)}</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 Fi=()=>new ji,bf=()=>new ji;window.addEventListener("error",function(t){return $o(t.error)||console.error(t.error||t.message),t.preventDefault(),!1}),window.addEventListener("unhandledrejection",function(t){return $o(t.reason)||console.error("Unhandled Rejection",t.reason),t.preventDefault(),!1});const wf=t=>{t.config.errorHandler=(e,n,o)=>{$o(e)||console.error("Vue Global Error Handler: ",{err:e,vm:n,info:o})}},$o=t=>{try{if(t.httpStatusCode===401)return!0}catch{}return t instanceof Oo||t instanceof Hi?(Fi().AlertErrorAsync(t.errors),!0):!1};function kf(){return s.inject(Ar)}const $n=()=>kf(),Sf={class:"font-percentage"},zi="--font-size-increment",_f="tamanho-fonte",Cf=et(s.defineComponent({__name:"FontSize",setup(t){const e=s.ref(!1),n=s.ref(0),o=()=>{n.value=Hn(),e.value=!0},r=()=>{e.value=!1},i=()=>document.documentElement,l=()=>parseInt(getComputedStyle(i()).getPropertyValue(zi)||"1"),a=y=>{y<.5||y>1.6||(i().style.setProperty(zi,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(_f)}),s.onMounted(()=>{p.value=l()}),(y,k)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(Ue,{button:!0,size:"sm",icon:"text_increase",tooltip:"Tamanho da fonte",onClick:o}),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.createElementVNode("div",{class:"icon",onClick:d}),s.createElementVNode("span",Sf,s.toDisplayString(p.value.toLocaleString("pt-br",{style:"percent",maximumFractionDigits:0})),1),s.createElementVNode("div",{class:"icon add",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:r},null,4)],64)):s.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d17f4a5f"]]),Ef=s.defineComponent({__name:"ScrollToTop",setup(t){const{scrollY:e}=$n(),n=s.computed(()=>e.value>800);function o(){document.documentElement.scrollTo(0,0)}return(r,i)=>(s.openBlock(),s.createElementBlock("button",{class:s.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":n.value}]),onClick:o},null,2))}}),Tf={class:"nav-menu-header"},If={class:"nav-menu-inner-close"},Af={class:"main-content"},Pf={class:"page-title"},Lf={class:"action"},xf={id:"content"},Of={key:0,id:"logging-out"},$f={class:"info-fazenda"},Bf={class:"font-bold"},Nf={class:"info-endereco text-muted"},Mf={class:"footer-right"},Df=et(s.defineComponent({__name:"Main",props:{auth:{}},setup(t){const e=t,{navMenuWidth:n,isMenuOpened:o,pageTitle:r,scrollY:i,ToggleMenu:l,isDarkMode:a,ToggleTheme:c,CloseMenu:d,LogoutAsync:f,Login:p,isLoggingOut:y,mainRef:k}=$n(),C=s.ref(null),A=()=>{if(!C.value||!o.value)return!1;C.value.offsetWidth!==n&&d()};return s.onMounted(()=>{gt.useRouter().afterEach(()=>{A()})}),(L,w)=>(s.openBlock(),s.createElementBlock("main",{ref_key:"mainRef",ref:k,class:s.normalizeClass({disabled:s.unref(y),"nav-menu-visible":s.unref(o)})},[s.createElementVNode("aside",{id:"nav-menu",ref_key:"navMenuRef",ref:C,class:s.normalizeClass({"nav-menu-hidden":!s.unref(o)})},[s.createElementVNode("div",Tf,[w[0]||(w[0]=s.createElementVNode("span",null,"Menu",-1)),s.createElementVNode("div",If,[s.createVNode(Ue,{button:!0,icon:"close",onClick:s.unref(l)},null,8,["onClick"])])]),s.renderSlot(L.$slots,"nav-menu",{},void 0,!0)],2),s.createElementVNode("div",Af,[s.createElementVNode("div",{id:"top-bar",class:s.normalizeClass({"shadow-bottom":s.unref(i)>72})},[s.createVNode(Ue,{button:!0,icon:s.unref(o)?"menu_open":"menu",tooltip:"Menu",onClick:s.unref(l)},null,8,["icon","onClick"]),s.createElementVNode("div",Pf,s.toDisplayString(s.unref(y)?"Saindo...":s.unref(r)),1),w[1]||(w[1]=s.createElementVNode("span",{class:"sep"},null,-1)),s.createElementVNode("div",Lf,[s.createVNode(Ue,{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(Cf),e.auth?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[e.auth.isAuthenticated?(s.openBlock(),s.createBlock(Ue,{key:0,button:!0,size:"sm",icon:"logout",tooltip:"Sair",onClick:s.unref(f)},null,8,["onClick"])):(s.openBlock(),s.createBlock(Ue,{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",xf,[s.unref(y)?(s.openBlock(),s.createElementBlock("div",Of,[s.createVNode(Ho)])):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",Bf,[s.renderSlot(L.$slots,"footer-nome-fazenda",{},()=>[w[2]||(w[2]=s.createTextVNode(" SECRETARIA MUNICIPAL DA FAZENDA "))],!0)]),s.createElementVNode("span",Nf,[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)])]),s.createElementVNode("div",Mf,[s.renderSlot(L.$slots,"footer-right",{},void 0,!0)])]),s.createVNode(Ef)],2))}}),[["__scopeId","data-v-19181e3f"]]),Rf=s.defineComponent({__name:"PageTitle",props:{title:{}},setup(t){const{pageTitle:e}=$n(),n=t;return s.watchEffect(()=>{document.title=n.title,e.value=n.title}),(o,r)=>null}}),Et=t=>{const e=t==="light"?"0, 0, 0":"198, 198, 198";return`0 1px 3px 0 rgba(${e}, 0.1), 0 1px 2px -1px rgba(${e}, 0.1);`},Ki={surface:{0:"var(--surface-0-color)",50:"var(--surface-100-color)",100:"var(--surface-100-color)",200:"var(--surface-200-color)",300:"var(--surface-300-color)",400:"var(--surface-400-color)",500:"var(--surface-1000-color)",600:"var(--surface-600-color)",700:"var(--surface-700-color)",800:"var(--surface-800-color)",900:"var(--surface-900-color)",950:"var(--surface-1000-color)"},primary:{color:"var(--primary-color)",contrastColor:"var(--bg-color)",hoverColor:"var(--primary-hover-color)",activeColor:"var(--primary-color)"},highlight:{background:"var(--primary-color)",color:"var(--bg-color)"},formField:{background:"var(--surface-0-color)",disabledBackground:"var(--surface-0-color)",filledBackground:"var(--surface-100-color)",filledFocusBackground:"var(--surface-100-color)",borderColor:"var(--surface-1000-color)",hoverBorderColor:"var(--primary-color)",focusBorderColor:"var(--primary-color)",invalidBorderColor:"var(--error-color)",color:"var(--text-color)",disabledColor:"var(--disabled-color)",placeholderColor:"var(--muted-color)",floatLabelColor:"var(--secondary-color)",floatLabelFocusColor:"var(--secondary-color)",floatLabelInvalidColor:"var(--error-color)",iconColor:"var(--primary-color)"},text:{color:"var(--text-color)",hoverColor:"var(--primary-color)",mutedColor:"var(--muted-color)",hoverMutedColor:"var(--muted-color)"},mask:{background:"var(--maskbg-color)",color:"var(--surface-200-color)"},content:{background:"var(--bg-color)",color:"var(--text-color)",border:{color:"var(--surface-1000-color)",radius:"var(--border-radius)"},hover:{background:"var(--primary-hover-color)",color:"var(--primary-color)"}}},Uf={semantic:{disabled:{opacity:"1"},transitionDuration:"0",primary:{50:"var(--primary-color)",100:"var(--primary-color)",200:"var(--primary-color)",300:"var(--primary-color)",400:"var(--primary-color)",500:"var(--primary-color)",600:"var(--primary-color)",700:"var(--primary-color)",800:"var(--primary-color)",900:"var(--primary-color)",950:"var(--primary-color)"},colorScheme:{light:{...Ki},dark:{...Ki}}},components:{blockui:{root:{borderRadius:"0px"}},button:{root:{paddingX:"0.75rem",paddingY:"0.5rem",sm:{paddingX:"0.625rem",paddingY:"0.375rem"},lg:{paddingX:"0.875rem",paddingY:"0.575rem"},primary:{hoverBackground:"var(--primary-color) !important",hoverBorderColor:"var(--primary-color) !important"}},text:{secondary:{color:"var(--secondary-color) !important",hoverBackground:"var(--surface-200-color) !important"}}},card:{root:{borderRadius:"var(--border-radius)"},title:{fontWeight:"700",fontSize:"var(--text-md)"},body:{padding:"var(--content-gutter)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:Et("light")}},dark:{root:{background:"var(--surface-300-color)",shadow:Et("dark")}}}},checkbox:{root:{background:"var(--surface-200-color) !important",borderColor:"var(--muted-color) !important",borderRadius:"var(--border-radius) !important",checkedBackground:"var(--primary-color) !important",checkedHoverBackground:"var(--primary-color) !important",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}}},confirmpopup:{root:{borderColor:"var(--border-color)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:Et("light")}},dark:{root:{background:"var(--surface-300-color)",shadow:Et("dark")}}}},datatable:{root:{borderColor:"var(--border-color) !important"},header:{borderColor:"var(--border-color) !important",padding:"0 0 var(--content-gutter) 0",sm:{padding:"0 0 var(--content-gutter-sm) 0"}},headerCell:{borderColor:"var(--border-color) !important",hoverColor:"var(--primary-color) !important",hoverBackground:"var(--primary-hover-color) !important"},bodyCell:{borderColor:"var(--border-color) !important"},footer:{borderColor:"var(--border-color) !important"},colorScheme:{light:{header:{background:"var(--bg-color)",color:"var(--text-color)"},headerCell:{background:"var(--bg-color)"},row:{background:"var(--bg-color)",stripedBackground:"var(--surface-300-color)"}},dark:{header:{background:"var(--surface-300-color)",color:"var(--text-color)"},headerCell:{background:"var(--surface-300-color)"},row:{stripedBackground:"var(--bg-color)",background:"var(--surface-300-color)"}}}},datepicker:{today:{background:"var(--primary-hover-color) !important",color:"var(--primary-color) !important"}},dialog:{root:{background:"var(--bg-color) !important",color:"var(--text-color) !important",borderColor:"var(--border-color) !important",borderRadius:"var(--border-radius) !important",shadow:"none !important"},title:{fontSize:"var(--font-size) !important",fontWeight:"700 !important"},header:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"var(--content-gutter-sm) !important"},content:{padding:"var(--content-gutter) !important"},footer:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"var(--content-gutter-sm) !important"}},inputtext:{root:{background:"var(--surface-100-color)",color:"var(--text-color)",borderColor:"var(--border-color) !important",borderRadius:"var(--border-radius) !important",shadow:"none !important",hoverBorderColor:"var(--primary-color) !important",placeholderColor:"var(--muted-color)"}},menu:{item:{focusBackground:"var(--surface-400-color)",focusColor:"var(--text-color)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:Et("light")}},dark:{root:{background:"var(--surface-200-color)",shadow:Et("dark")}}}},popover:{root:{background:"var(--bg-color)",color:"var(--text-color)",borderColor:"var(--border-color)",borderRadius:"var(--border-radius)",shadow:"none",gutter:"8px",arrowOffset:"0.75rem"},content:{padding:"0"}},select:{root:{background:"var(--bg-color)",color:"var(--text-color)",hoverBorderColor:"var(--primary-color)",placeholderColor:"var(--muted-color)",disabledColor:"var(--disabled-color)"},option:{focusBackground:"var(--surface-200-color)",focusColor:"var(--primary-color)",selectedFocusColor:"var(--bg-color)",selectedFocusBackground:"var(--primary-color)"},overlay:{borderColor:"var(--border-color)"},dropdown:{color:"var(--primary-color)"},colorScheme:{light:{overlay:{background:"var(--bg-color)"}},dark:{overlay:{background:"var(--surface-100-color)"}}}},skeleton:{root:{background:"var(--surface-700-color)",animationBackground:"var(--surface-100-color)"}},textarea:{root:{background:"var(--surface-100-color)",hoverBorderColor:"var(--primary-color)",placeholderColor:"var(--muted-color)"}},toast:{root:{width:"min(90vw, 320px)"},colorScheme:{light:{contrast:{background:"var(--text-color)",color:"var(--bg-color)",detailColor:"var(--bg-color)"}},dark:{contrast:{background:"var(--bg-color)",color:"var(--text-color)",detailColor:"var(--text-color)"}}},info:{background:"var(--info-color)",color:"var(--info-hover-color)",detailColor:"var(--text-color)"},success:{background:"var(--success-color)",color:"var(--success-hover-color)",detailColor:"var(--text-color)"},warn:{background:"var(--warn-color)",color:"var(--warn-hover-color)",detailColor:"var(--text-color)"},error:{background:"var(--error-color)",color:"var(--error-hover-color)",detailColor:"var(--text-color)"},secondary:{background:"var(--secondary-color)",color:"var(--secondary-hover-color)",detailColor:"var(--text-color)"}}}};class at{static get IsTouch(){return window.matchMedia("(pointer: coarse)").matches}static GetMaxZindex(e=[]){let n="body > *:not(script):not(style)";for(const r of e)n+=`, ${r}`;const o=Math.max(...Array.from(document.querySelectorAll(n)).map(r=>{const i=getComputedStyle(r).zIndex;return+i==+i?+i:0}));return o>=100?o:100}static AjustarFuso(e){const n=e.getTimezoneOffset()/60;e.setHours(e.getHours()-n)}static Mask(e,n){let o=0,r=e.toString();return n.replace(/#/g,()=>r[o++]||"")}static MaskCpf(e){return at.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return at.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static MaskCcm(e){return at.Mask(e.padStart(8,"0"),"#.###.###-#")}static async DelayAsync(e){return new Promise(n=>setTimeout(n,e))}}class Vf{constructor(e){ee(this,"sub");ee(this,"username");ee(this,"name");ee(this,"email");ee(this,"roles");ee(this,"groups");ee(this,"userinfo");ee(this,"department");ee(this,"jobTitle");ee(this,"idp");this.userinfo=e,this.sub=e.sub,this.username=e.employeeID??e.cpf??"",this.name=e.name??"",this.email=e.email??null,this.roles=e.role??[],this.groups=e.group??[],this.department=this.SetDepartment(),this.jobTitle=this.SetJobTitle(),this.idp=this.SetIdp()}get firstname(){return this.name.split(" ")[0]??this.name}get maskedUsername(){return this.username?this.username.length<=11?at.MaskCpf(this.username):this.username.length===14?at.MaskCnpj(this.username):this.username:""}IsInRole(e){return this.roles.includes(e)}IsInGroup(e){return this.groups.includes(e)}SetIdp(){var n;const e=((n=this.userinfo)==null?void 0:n.identity_provider)??null;return(e==null?void 0:e.toLocaleLowerCase())==="gov.br"?"govbr":e!=null&&e.toLocaleLowerCase().startsWith("senhaweb")?"senhaweb":null}SetDepartment(){var e;return((e=this.userinfo)==null?void 0:e.department)??null}SetJobTitle(){var e;return((e=this.userinfo)==null?void 0:e.jobTitle)??null}}function Hf(){const t=s.ref("development");function e(c){t.value=c.toLocaleLowerCase()}const n=s.computed(()=>t.value==="development"),o=s.computed(()=>t.value==="pack"),r=s.computed(()=>t.value==="hml"),i=s.computed(()=>t.value==="production"),l=s.ref(null);function a(){l.value=null}return{environment:t,SetEnvironment:e,isDev:n,isPack:o,isHml:r,isProd:i,user:l,$reset:a}}const jf=t=>{const e=new Set;function n(o){const{name:r,children:i}=o;if(r){if(e.has(r))throw new Error(["Erro na validação das rotas!",`Nome de rota duplicado: ${r}`].join(`
411
411
  `));e.add(r)}if(i&&Array.isArray(i))for(const l of i)n(l)}for(const o of t)n(o)};Promise.prototype.TrackStateWith||(Promise.prototype.TrackStateWith=async function(t){t.value=!0;try{return await this}finally{t.value=!1}});class Ff{constructor(){ee(this,"current",null);ee(this,"resolve",null)}async showAsync(e,n){const o={message:e,life:n??5e3};return this.Render(o)}async Render(e){return new Promise(n=>{this.resolve=n,this.current&&(this.current.style.opacity="0",setTimeout((function(){this.parentElement&&this.parentElement.removeChild(this)}).bind(this.current),500));const o=document.createElement("div"),r=document.createElement("div"),i=document.createElement("div");r.className="content",i.className="progress",r.appendChild(i),o.className="sf-toast",o.style.zIndex=at.GetMaxZindex().toString(),o.appendChild(r),this.current=o,document.body.appendChild(o),o.addEventListener("transitionend",c=>{const d=c.propertyName==="opacity",f=c.target.classList.contains("visible");d&&!f&&(document.body.removeChild(o),this.current===o&&(this.current=null))});const l=[];Array.isArray(e.message)?l.push(...e.message):l.push(e.message);for(const c of l){const d=document.createElement("p");d.innerHTML=Ao.sanitize(c),r.appendChild(d)}const a=document.createElement("i");if(a.classList.add("icon","material-symbols-outlined"),a.innerText="close",a.addEventListener("click",()=>{this.Close()}),r.appendChild(a),getComputedStyle(o).bottom,getComputedStyle(o).top,o.classList.add("visible"),e.life){i.style.transitionDuration=`${e.life-300}ms`,r.classList.add("animate"),setTimeout(()=>{this.current===o&&this.Close()},e.life);return}})}Close(){this.resolve&&this.resolve(),this.current&&this.current.classList.remove("visible")}}const zf=new Ff,Kf=()=>zf;function Wf(){document.documentElement.classList.add("app-mounted")}M.AppError=Oo,M.AppResult=Hi,M.BaseAppState=Hf,M.ConfigAuth=nf,M.EnsureUniqueRouteNames=jf,M.RemovePreloader=Wf,M.SfButton=ks,M.SfContent=Il,M.SfDrawer=Fo,M.SfHelpButton=Tl,M.SfIcon=Ue,M.SfLoadingCircle=jo,M.SfMain=Df,M.SfMessage=Es,M.SfNavMenu=El,M.SfPageTitle=Rf,M.SfTabNavigation=bs,M.SfTooltip=Vo,M.UseAlert=Fi,M.UseAlertService=bf,M.UseAppInject=$n,M.UseAuth=xo,M.UseConfirm=$i,M.UseConfirmService=Ud,M.UseSimpleToast=Kf,M.User=Vf,M.Utilities=at,M._logger=vf,M.configSF=yf,M.globalErrorHandler=wf,M.themePreset=Uf,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
412
412
  //# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.cjs.map