/*! * Cosmos web-components v1.48.0 * * Documentação: https://cosmos.info.ufrn.br/web-components/introducao.html * * Copyright 2019-2025 */ !function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";const t=(t,e)=>{window.customElements.get(t)||window.customElements.define(t,e)},e="pt",r="px",n="em",o="rem",i="%",a=(t,a)=>{if(!t)return a;const s=t.match(/^(\d+(?:\.\d+)?)(\D+)?$/);if(!s)return console.warn(`Valor do atributo é inválido. Esperado: [], recebido: ${t}`),a;const c=s[1],l=s[2]||r;return[r,n,e,o,i].includes(l)?`${c}${l}`:(console.warn(`Unidade desconhecida: ${l}`),`${c}${r}`)},s=(t,e,r)=>{re&&(r=e);const n=e-t,o=Math.min(Math.max(r-t,0),n);return Math.round(o/n*100)};const c="ds-";const l=document.createElement("template");l.innerHTML="\n\n\n \n\n";const u=c+"avatar-group",d="--h-animation",f="--v-animation";var h;!function(t){t.Horizontal="horizontal",t.Vertical="vertical"}(h||(h={}));class p extends HTMLElement{static get observedAttributes(){return["animation","max"]}constructor(){super();this.attachShadow({mode:"open"}).appendChild(l.content.cloneNode(!0))}connectedCallback(){this.render()}render(){this.updateAnimation(),this.updateMaxItems()}attributeChangedCallback(t,e,r){if(e!==r)switch(t){case"animation":case"max":this.render()}}updateAnimation(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".avatar-group"),r=this.getAttribute("animation"),n=Object.values(h).includes(r);if(e.classList.remove(f,d),!n)return;const o=r==h.Horizontal?d:f;e.classList.add(o)}createContainerAvatarText(t,e){const r=document.createElement("template");return r.innerHTML=`\n
+${t}
\n `,r.content.cloneNode(!0)}updateMaxItems(){var t,e,r;const n=Number(this.getAttribute("max"));if(!n||n<0)return;const o=((null===(t=this.shadowRoot.querySelector("slot"))||void 0===t?void 0:t.assignedElements())||[]).filter((t=>"DS-AVATAR"===t.tagName));o.forEach((t=>{t.classList.remove("d-none")}));const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".avatar-group"),a=i.querySelector(".avatar");if(null==a||a.remove(),o.length>n){const t=Math.max(o.length-n,0);if(o.forEach(((t,e)=>{e>=n&&t.classList.add("d-none")})),t>0){const e=o[0].getAttribute("size");e&&i.setAttribute("size",e);const r=this.createContainerAvatarText(t,e);i.appendChild(r)}}0===n&&(null===(r=null==i?void 0:i.querySelector(".avatar"))||void 0===r||r.classList.add("ml-0"))}}const v=document.createElement("template");v.innerHTML='
\n
';const m=c+"avatar";class b extends HTMLElement{static get observedAttributes(){return["name","name-initials","size","imgsrc","tooltip"]}constructor(){super()}connectedCallback(){this.render()}render(){this.innerHTML="",this.appendChild(v.content.cloneNode(!0)),this.updateImage(),this.updateName(),this.updateNameInitials(),this.updateSize(this.getAttribute("size")||"medium"),this.updateTooltip()}attributeChangedCallback(t,e,r){if(e!==r)switch(t){case"name":case"name-initials":case"imgsrc":case"tooltip":this.render();break;case"size":this.render(),this.updateSize(r)}}fallbackImageHandler(){const t=this.querySelector(".avatar-image");t&&t.remove();const e=this.querySelector(".avatar");e.querySelector(".avatar-text")||(e.appendChild(this.createContainerAvatarText()),this.updateNameInitials())}updateName(){const t=this.querySelector(".avatar-name");t&&(t.textContent=this.getAttribute("name"))}updateNameInitials(){const t=this.querySelector(".avatar-text");t&&(t.textContent=this.getAttribute("name-initials"))}updateTooltip(){const t=this.querySelector(".avatar"),e=this.querySelector(".avatar-name"),r=this.hasAttribute("tooltip")&&"false"!=this.getAttribute("tooltip");r&&!e?this.createAvatarName(t):!r&&e&&e.remove()}createAvatarName(t){const e=document.createElement("span");e.classList.add("avatar-name"),e.textContent=this.getAttribute("name"),t.appendChild(e)}updateSize(t){const e=this.querySelector(".avatar");if(e.classList.forEach((t=>{t.includes("--")&&e.classList.remove(t)})),["small","medium","large","x-large"].includes(t))return e.style.removeProperty("--avatar-size"),void e.classList.add(`--${t}`);const r=parseFloat(t);if(!Number.isNaN(r)){const r=a(t,"3rem");e.style.setProperty("--avatar-size",`${r}`)}}createContainerAvatarText(){const t=document.createElement("div");t.classList.add("avatar-text"),t.setAttribute("aria-hidden","true");const e=this.querySelector(".avatar");return null==e||e.setAttribute("aria-label",`avatar de ${this.getAttribute("name")}`),t}createImageAvatar(t){const e=document.createElement("img");return e.classList.add("avatar-image"),e.setAttribute("alt","Imagem do usuário"),e.setAttribute("loading","lazy"),e.setAttribute("src",t),e.setAttribute("aria-label",`avatar de ${this.getAttribute("name")}`),e.addEventListener("error",(()=>{this.fallbackImageHandler()})),e}removeNameInitials(){const t=this.querySelector(".avatar-text");t&&t.remove()}removeImage(){const t=this.querySelector(".avatar-image");t&&t.remove()}updateImage(){const t=this.querySelector(".avatar"),e=this.getAttribute("imgsrc");if(e){const r=t.querySelector(".avatar-image");if(r)r.setAttribute("src",e);else{const r=this.createImageAvatar(e);t.appendChild(r)}this.removeNameInitials()}else if(this.removeImage(),!t.querySelector(".avatar-text")){const e=this.createContainerAvatarText();e.textContent=this.getAttribute("name-initials")||"",t.appendChild(e)}}}const g=document.createElement("template");g.innerHTML='
\n %\n
\n
\n
\n
\n
\n
';const y=c+"circular-progress";class x extends HTMLElement{static get observedAttributes(){return["min-value","max-value","value","size"]}constructor(){super()}attributeChangedCallback(t,e,r){if(e!==r)switch(t){case"min-value":case"max-value":case"value":this.render();break;case"size":this.render(),this.updateSize()}}connectedCallback(){this.render()}render(){this.mountedProgressCircle(),this.calculatePercentage(),this.updateSize()}mountedProgressCircle(){this.innerHTML="",this.appendChild(g.content.cloneNode(!0))}calculatePercentage(){const t=Number(this.getAttribute("min-value"))||0,e=Number(this.getAttribute("max-value"))||100;let r=Number(this.getAttribute("value"));const n=this.querySelector(".progress-wrapper"),o=s(t,e,r),i=n.querySelector(".label");Array.from(n.classList).forEach((t=>{/^progress-\d+/.test(t)&&n.classList.remove(t)})),n.setAttribute("aria-valueNow",o.toString()),n.classList.add(`progress-${o}`),i.textContent=`${o}%`}updateSize(){const t=this.getAttribute("size")||90;this.querySelector(".progress-wrapper").style.setProperty("--circle-progress-size",`${t}px`)}}const w=document.createElement("template");w.innerHTML='
\n
\n
';const A=c+"linear-progress";class S extends HTMLElement{static get observedAttributes(){return["min-value","max-value","value","height","hide-label"]}constructor(){super()}attributeChangedCallback(t,e,r){if(e!==r)switch(t){case"min-value":case"max-value":case"value":case"height":case"hide-label":this.render()}}connectedCallback(){this.render()}render(){this.mountedLinearProgress(),this.calculatePercentage(),this.updateHeight()}updateHeight(){const t=Number(this.getAttribute("height"))||16;this.querySelector(".progress").style.setProperty("--linear-progress-height",`${t}px`)}mountedLinearProgress(){this.innerHTML="",this.appendChild(w.content.cloneNode(!0)),this.style.display="block",this.style.width="100%"}calculatePercentage(){const t=Number(this.getAttribute("min-value"))||0,e=Number(this.getAttribute("max-value"))||100,r=this.hasAttribute("hide-label")&&"false"!=this.getAttribute("hide-label");let n=Number(this.getAttribute("value"));const o=s(t,e,n);this.querySelector(".progress").setAttribute("aria-valueNow",o.toString());const i=this.querySelector(".progress-bar");i.style.setProperty("--linear-progress-size",`${o}%`),i.textContent=r?"":`${o}%`}}var L;!function(t){t.Text="text",t.Circular="circular",t.Rectangular="rectangular",t.Rounded="rounded"}(L||(L={}));const O="loading-content",E=c+"skeleton";class k extends HTMLElement{static get observedAttributes(){return["width","height","variant","font-size","size"]}constructor(){super(),this.initialized=!1}connectedCallback(){this.build()}attributeChangedCallback(t,e,r){if(this.build(),e!==r)switch(t){case"width":this.updateWidth(r);break;case"height":this.updateHeight(r);break;case"variant":this.updateVariant(r,e);break;case"font-size":this.updateFontSize(r);break;case"size":this.updateSize(r)}}build(){this.initialized||(this.initialized=!0,this.innerHTML=`
`)}updateWidth(t){const e=this.querySelector(`.${O}`),r=a(t,"100%");this.isCircular||e.style.setProperty("--loading-content-width",r)}updateHeight(t){if(!this.isRetangular&&!this.isRounded)return;const e=this.querySelector(`.${O}`),r=a(t,"1rem");e.style.setProperty("--loading-content-height",r)}updateSize(t){if(!this.isCircular)return;const e=this.querySelector(`.${O}`),r=a(t,"3rem");e.style.setProperty("--loading-content-width",r),e.style.setProperty("--loading-content-height",r)}updateVariant(t,e){if(!this.isValidVariant(t))return void console.warn(`A variante "${t}" não é válida.`);const r=this.querySelector(`.${O}`);r.classList.add(t),this.isCircular&&this.updateSize(this.getAttribute("size")),e&&r.classList.remove(e)}updateFontSize(t){if(this.isText){const e=this.querySelector(`.${O}`),r=a(t,"1rem");e.style.setProperty("--loading-content-fontSize",`${r}`)}}isValidVariant(t){return Object.values(L).includes(t)}get isText(){return this.getAttribute("variant")===L.Text.valueOf()}get isCircular(){return this.getAttribute("variant")===L.Circular.valueOf()}get isRetangular(){return this.getAttribute("variant")===L.Rectangular.valueOf()||null===this.getAttribute("variant")}get isRounded(){return this.getAttribute("variant")===L.Rounded.valueOf()}}const T=c+"ranged-progress",P=["danger","warning","success","info"];function z(t){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},z(t)}function j(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function C(t){for(var e=1;ee.floating[i]&&(a=Z(a)),[a,Z(a)]}function X(t){var e=Z(t);return[K(t),e,K(e)]}function K(t){return t.replace(/start|end/g,(function(t){return H[t]}))}function Q(t,e,r,n){var o=V(t),i=function(t,e,r){var n=["left","right"],o=["right","left"];switch(t){case"top":case"bottom":return r?e?o:n:e?n:o;case"left":case"right":return e?["top","bottom"]:["bottom","top"];default:return[]}}(B(t),"start"===r,n);return o&&(i=i.map((function(t){return t+"-"+o})),e&&(i=i.concat(i.map(K)))),i}function Z(t){return t.replace(/left|right|bottom|top/g,(function(t){return D[t]}))}function tt(t){return"number"!=typeof t?function(t){return C({top:0,right:0,bottom:0,left:0},t)}(t):{top:t,right:t,bottom:t,left:t}}function et(t){return C(C({},t),{},{top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height})}var rt=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],nt=["mainAxis","crossAxis","limiter"];function ot(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function it(t){return function(t){if(Array.isArray(t))return at(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return at(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return at(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function ct(t){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(t)}function lt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ut(t){for(var e=1;e0})).reduce((function(t,e){return t+e}),0)]})).sort((function(t,e){return t[1]-e[1]}))[0])?void 0:M[0],$&&(q=$),r.abrupt("break",33);case 31:return q=s,r.abrupt("break",33);case 33:if(o===q){r.next=35;break}return r.abrupt("return",{reset:{placement:q}});case 35:return r.abrupt("return",{});case 36:case"end":return r.stop()}}),r)})))()}}};function xt(t,e){return wt.apply(this,arguments)}function wt(){return wt=ht(st().mark((function t(e,r){var n,o,i,a,s,c,l,u,d,f,h,p,v,m;return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.placement,o=e.platform,i=e.elements,t.next=3,null==o.isRTL?void 0:o.isRTL(i.floating);case 3:return a=t.sent,s=B(n),c=V(n),l="y"===Y(n),u=["left","top"].includes(s)?-1:1,d=a&&l?-1:1,f=_(r,e),h="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:ut({mainAxis:0,crossAxis:0,alignmentAxis:null},f),p=h.mainAxis,v=h.crossAxis,m=h.alignmentAxis,c&&"number"==typeof m&&(v="end"===c?-1*m:m),t.abrupt("return",l?{x:v*d,y:p*u}:{x:p*u,y:v*d});case 13:case"end":return t.stop()}}),t)}))),wt.apply(this,arguments)}var At=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn:function(e){return ht(st().mark((function r(){var n,o,i;return st().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.x,o=e.y,r.next=3,xt(e,t);case 3:return i=r.sent,r.abrupt("return",{x:n+i.x,y:o+i.y,data:i});case 5:case"end":return r.stop()}}),r)})))()}}};function St(t){return Et(t)?(t.nodeName||"").toLowerCase():"#document"}function Lt(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Ot(t){var e;return null==(e=(Et(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Et(t){return t instanceof Node||t instanceof Lt(t).Node}function kt(t){return t instanceof Element||t instanceof Lt(t).Element}function Tt(t){return t instanceof HTMLElement||t instanceof Lt(t).HTMLElement}function Pt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof Lt(t).ShadowRoot)}function zt(t){var e=It(t),r=e.overflow,n=e.overflowX,o=e.overflowY,i=e.display;return/auto|scroll|overlay|hidden|clip/.test(r+o+n)&&!["inline","contents"].includes(i)}function jt(t){return["table","td","th"].includes(St(t))}function Ct(t){var e=Nt(),r=It(t);return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!e&&!!r.backdropFilter&&"none"!==r.backdropFilter||!e&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((function(t){return(r.willChange||"").includes(t)}))||["paint","layout","strict","content"].some((function(t){return(r.contain||"").includes(t)}))}function Nt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Rt(t){return["html","body","#document"].includes(St(t))}function It(t){return Lt(t).getComputedStyle(t)}function qt(t){return kt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Mt(t){if("html"===St(t))return t;var e=t.assignedSlot||t.parentNode||Pt(t)&&t.host||Ot(t);return Pt(e)?e.host:e}function $t(t){var e=Mt(t);return Rt(e)?t.ownerDocument?t.ownerDocument.body:t.body:Tt(e)&&zt(e)?e:$t(e)}function Dt(t,e){var r;void 0===e&&(e=[]);var n=$t(t),o=n===(null==(r=t.ownerDocument)?void 0:r.body),i=Lt(n);return o?e.concat(i,i.visualViewport||[],zt(n)?n:[]):e.concat(n,Dt(n))}function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}function Ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(t,e)||Gt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _t(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_t=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),s=new O(o||[]);return n(a,"_invoke",{value:w(t,r,s)}),a}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var d={};function f(){}function h(){}function p(){}var v={};c(v,i,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(E([])));b&&b!==e&&r.call(b,i)&&(v=b);var g=p.prototype=f.prototype=Object.create(v);function y(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,i,a,s){var c=u(t[n],t,i);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==Ht(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function w(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=A(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function A(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function Bt(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function Vt(t){return function(t){if(Array.isArray(t))return Wt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Gt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gt(t,e){if(t){if("string"==typeof t)return Wt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wt(t,e):void 0}}function Wt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{this.dataset.originalTitle=this.title,this.removeAttribute("title"),"hover"===e&&this.createTooltip()})),this.addEventListener("mouseleave",(()=>{this.title=this.dataset.originalTitle||"",this.removeAttribute("data-original-title"),"hover"===e&&this.removeTooltip()})),"click"===e&&(t.addEventListener("click",(()=>{this.querySelector(`#tooltip-${this.uuid}`)?this.removeTooltip():this.createTooltip()})),document.addEventListener("click",(t=>{t.target.closest("ds-tooltip")!==this&&this.removeTooltip()}))),"hover"===e&&(t.addEventListener("focus",(()=>{this.createTooltip()})),t.addEventListener("blur",(()=>{this.removeTooltip()}))),document.addEventListener("keyup",(t=>{"Escape"===t.key&&this.removeTooltip()}))}isValidMaxWidthValue(t){return/^(\d+px|\d+%|\d+em|\d+rem|\d+vw|\d+cm|\d+mm|\d+in|\d+pt|\d+pc|\d+ch|\d+ex|auto)$/.test(t)}handlePosition(t,e){const r=this.querySelector(".ds-tooltip-arrow"),n=pe.top.valueOf();let o=this.getAttribute("placement")||n;var i;i=o,Object.values(pe).includes(i)||(console.warn(`O placement "${o}" não é válido.`),o=n),t.style.position="relative";const a=this.getAttribute("max-width");a&&this.isValidMaxWidthValue(a)&&(e.style.maxWidth=a),ue(t,e,(()=>{var n;de(t,e,{placement:o,middleware:[At(10),(void 0===n&&(n={}),{name:"shift",options:n,fn:function(t){return ht(st().mark((function e(){var r,o,i,a,s,c,l,u,d,f,h,p,v,m,b,g,y,x,w,A,S,L,O,E,k;return st().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.x,i=t.y,a=t.placement,s=_(n,t),c=s.mainAxis,l=void 0===c||c,u=s.crossAxis,d=void 0!==u&&u,f=s.limiter,h=void 0===f?{fn:function(t){return{x:t.x,y:t.y}}}:f,p=ot(s,nt),v={x:o,y:i},e.next=5,mt(t,p);case 5:return m=e.sent,b=Y(B(a)),g=G(b),y=v[g],x=v[b],l&&(w="y"===g?"bottom":"right",A=y+m["y"===g?"top":"left"],S=y-m[w],y=F(A,y,S)),d&&(L="y"===b?"bottom":"right",O=x+m["y"===b?"top":"left"],E=x-m[L],x=F(O,x,E)),k=h.fn(ut(ut({},t),{},(dt(r={},g,y),dt(r,b,x),r))),e.abrupt("return",ut(ut({},k),{},{data:{x:k.x-o,y:k.y-i}}));case 14:case"end":return e.stop()}}),e)})))()}}),yt(),gt({element:r})]}).then((({x:t,y:n,middlewareData:o,placement:i})=>{Object.assign(e.style,{left:`${t}px`,top:`${n}px`});const a={top:"bottom",right:"left",bottom:"top",left:"right",topStart:"top-start",topEnd:"top-end",bottomStart:"bottom-start",bottomEnd:"bottom-end"}[i.split("-")[0]];if(o.arrow){const{x:t,y:e}=o.arrow;Object.assign(r.style,{left:null!=t?`${t}px`:"",top:null!=e?`${e}px`:"",[a]:-r.offsetWidth/2+"px",transform:"rotate(45deg)"})}}))}))}}class me{constructor(t){this.observers=[],this.state=t}attach(t){this.observers.includes(t)||this.observers.push(t)}detach(t){const e=this.observers.indexOf(t);if(-1===e)return console.info("Subject: Nonexistent observer.");this.observers.splice(e,1)}notify(){for(const t of this.observers)t.update(this)}setState(t){t!==this.state&&(this.state=t,this.notify())}}let be=new class extends me{constructor(){super(),this.STORAGE_NAME="acMode",this.state=this.loadState()}setState(t){t!==this.state&&(this.saveState(t),this.notify())}saveState(t){this.state=t,window.localStorage.setItem(this.STORAGE_NAME,t)}loadState(){return window.localStorage.getItem(this.STORAGE_NAME)||"off"}};class ge{constructor(t,e){this.options=[{value:"off",title:"Desativar o alto-contraste",content:"",srText:"Alto-contraste desativado"},{value:"branco-azul",title:"Tema Fundo Branco, Texto Preto, Destaque Azul",content:"A",srText:"tema branco-azul"},{value:"azul-amarelo",title:"Tema Fundo Azul, Texto Branco, Destaque Amarelo",content:"A",srText:"tema azul-amarelo"},{value:"preto-amarelo",title:"Tema Fundo Preto, Texto Branco, Destaque Amarelo",content:"A",srText:"tema preto-amarelo"},{value:"preto-azul",title:"Tema Fundo Preto, Texto Branco, Destaque Azul",content:"A",srText:"tema preto-azul"}],this.selectedIndex=0,this.focusedIndex=0,this.button=null,this.listbox=null,this.wrapper=null,this.button=t,this.wrapper=e,this.listbox=this.wrapper.querySelector('[role="listbox"]'),this.options.forEach((t=>{var e;const r=this.createOption(t,!1);null===(e=this.listbox)||void 0===e||e.appendChild(r)})),be.attach(this);const r=this.findOptionIndexByValue(be.state);this.selectOption(r>-1?r:0),this.addEventHandle()}update(t){t instanceof me&&(this.contrastThemeHandle(t.state),t.state!=this.options[this.selectedIndex].value&&this.selectOption(this.findOptionIndexByValue(t.state)))}contrastThemeHandle(t){"off"==t?document.body.removeAttribute("data-ac-activated"):document.body.setAttribute("data-ac-activated",t)}addEventHandle(){var t,e;null===(t=this.button)||void 0===t||t.addEventListener("keydown",(t=>{var e,r;switch(t.key){case"ArrowDown":case"ArrowRight":if(this.expanded){t.preventDefault(),this.focusOption(this.focusedIndex+1>=this.options.length?0:this.focusedIndex+1);break}this.openListBox();break;case"ArrowUp":case"ArrowLeft":if(this.expanded){t.preventDefault(),this.focusOption(this.focusedIndex-1<0?this.options.length-1:this.focusedIndex-1);break}this.openListBox();break;case"Enter":case" ":if(this.expanded){t.preventDefault(),this.selectOption(this.focusedIndex),this.closeListBox(),null===(e=this.button)||void 0===e||e.focus();break}this.openListBox();break;case"Home":t.preventDefault(),this.openListBox(),this.focusOption(0);break;case"End":t.preventDefault(),this.openListBox(),this.focusOption(this.options.length-1);break;case"Tab":this.expanded&&(this.selectOption(this.focusedIndex),this.closeListBox());break;case"Escape":this.expanded&&(this.closeListBox(),null===(r=this.button)||void 0===r||r.focus())}})),null===(e=this.button)||void 0===e||e.addEventListener("click",(()=>{this.expanded?this.closeListBox():this.openListBox()})),document.addEventListener("click",(t=>{var e;(null===(e=this.wrapper)||void 0===e?void 0:e.classList.contains("open"))&&(t.composedPath().includes(this.wrapper)||(this.selectOption(this.focusedIndex),this.closeListBox()))}))}get expanded(){var t;return"true"===(null===(t=this.button)||void 0===t?void 0:t.getAttribute("aria-expanded"))}openListBox(){var t,e,r;this.button.setAttribute("aria-expanded","true"),null===(t=this.wrapper)||void 0===t||t.classList.add("open"),null===(e=this.button)||void 0===e||e.setAttribute("aria-activedescendant",(null===(r=this.focused)||void 0===r?void 0:r.id)||""),this.setPositionOptionsContainer(this.button,this.listbox)}closeListBox(){var t,e;this.button.setAttribute("aria-expanded","false"),null===(t=this.wrapper)||void 0===t||t.classList.remove("open"),null===(e=this.button)||void 0===e||e.setAttribute("aria-activedescendant","")}createOption({value:t,title:e,content:r},n=!1){const o=document.createElement("div");o.setAttribute("id",`opt-${t}`),o.setAttribute("data-testid",`opt-${t}`),o.setAttribute("role","option"),o.setAttribute("class","combo-option"),o.setAttribute("aria-selected",`${n}`),o.setAttribute("value",t),o.setAttribute("title",e);const i=document.createElement("span");return i.setAttribute("aria-hidden","true"),o.appendChild(i),r instanceof HTMLElement?i.appendChild(r):i.textContent=r,o.addEventListener("click",(t=>{var e;const r=t.currentTarget.getAttribute("value");this.selectOption(this.findOptionIndexByValue(r)),this.closeListBox(),null===(e=this.button)||void 0===e||e.focus()})),o}setPositionOptionsContainer(t,e){de(t,e,{placement:"bottom-end",middleware:[yt(),At(5)]}).then((({x:t,y:r})=>{Object.assign(e.style,{left:`${t}px`,top:`${r}px`})}))}selectOption(t){var e,r,n,o,i;if(t<0||t>=this.options.length)return;if(t!==this.selectedIndex&&this.selected){this.selected.setAttribute("aria-selected","false");const t=this.selected.getAttribute("title").replace("Selecionado: ","");this.selected.setAttribute("title",t)}this.selectedIndex=t,this.selected=null===(e=this.listbox)||void 0===e?void 0:e.childNodes[t],null===(r=this.selected)||void 0===r||r.setAttribute("aria-selected","true");const a=this.selected.getAttribute("title");a.startsWith("Selecionado: ")||this.selected.setAttribute("title","Selecionado: "+a);(null===(n=this.button)||void 0===n?void 0:n.querySelector("#sr-text")).textContent=null===(o=this.options[t])||void 0===o?void 0:o.srText,this.focusOption(t);const s=(null===(i=this.options[t])||void 0===i?void 0:i.value)||"off";this.contrastThemeHandle(s),be.setState(s)}findOptionIndexByValue(t){return this.options.findIndex((e=>e.value==t))}focusOption(t){var e,r,n,o,i;t!=this.focusedIndex&&(null===(e=this.focused)||void 0===e||e.classList.remove("option-current")),this.focusedIndex=t,this.focused=null===(r=this.listbox)||void 0===r?void 0:r.childNodes[t],null===(n=this.focused)||void 0===n||n.classList.add("option-current"),this.expanded&&(null===(o=this.button)||void 0===o||o.setAttribute("aria-activedescendant",null===(i=this.focused)||void 0===i?void 0:i.id))}destroy(){this.expanded&&this.closeListBox(),be.detach(this)}}const ye=c+"contrast-theme-picker",xe=document.createElement("template");xe.innerHTML='
\n \n
\n \n\n';const we=new CSSStyleSheet;we.replaceSync(":host {\n --contrast-picker-color: transparent;\n --contrast-picker-hover-color: var(--white);\n --contrast-picker-menu-bg-color: var(--white);\n}\n.combo *,\n.combo *::before,\n.combo *::after {\n box-sizing: border-box;\n}\n\n.combo {\n display: block;\n position: relative;\n}\n\n.combo-label {\n display: none;\n}\n\n.combo-input {\n background-color: var(--contrast-picker-color);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: left;\n width: 47px;\n height: 47px;\n cursor: pointer;\n}\n\n.combo-input:focus-visible {\n outline-width: 2px;\n outline-style: dashed;\n outline-offset: 3px;\n outline-color: var(--outline-focus-color);\n z-index: 1;\n position: relative;\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n.combo-input:focus,\n.combo-input:hover {\n --contrast-picker-color: var(--contrast-picker-hover-color);\n box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);\n}\n\n[ac-mode] .combo-input:hover,\n[ac-mode] .combo-input:focus {\n --contrast-picker-color: var(--primary-light-color);\n}\n\n.combo-input:active {\n --contrast-picker-color: var(--primary-darker-color);\n box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);\n}\n\n.combo-input:focus .svg-icon,\n.combo-input:hover .svg-icon {\n fill: var(--secondary-darkest-color);\n}\n\n[ac-mode] .combo-input:focus .svg-icon,\n[ac-mode] .combo-input:hover .svg-icon {\n fill: var(--primary-dark-color);\n}\n\n.combo-input:active .svg-icon {\n fill: var(--white);\n}\n\n.svg-icon {\n width: 1.188rem;\n fill: var(--secondary-darker-color);\n}\n\n[ac-mode] .svg-icon {\n fill: var(--primary-color);\n}\n\n.combo-menu {\n background-color: var(--contrast-picker-menu-bg-color);\n border-radius: 5px 5px 5px 5px;\n padding: 12px 8px;\n display: none;\n position: absolute;\n box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);\n gap: 8px;\n align-items: center;\n z-index: 10;\n}\n\n[ac-mode] .combo-menu {\n background-color: var(--bg-color);\n border: 1px solid var(--border-color);\n}\n\n.open .combo-menu {\n display: flex;\n}\n\n.combo-option {\n font-size: 20px;\n line-height: 1;\n font-weight: bolder;\n border: 1px solid black;\n border-radius: 4px;\n cursor: pointer;\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.combo-option.option-current {\n outline: 2px solid var(--outline-focus-color);\n outline-offset: 1px;\n}\n\n.combo-option[aria-selected='true'] {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.combo-option[aria-selected='true']::after {\n content: '';\n border-bottom: 3px solid var(--primary-dark-color);\n position: absolute;\n width: 100%;\n top: 100%;\n right: 0;\n margin-top: 5px;\n}\n\n[ac-mode] .combo-option[aria-selected='true']::after {\n border-color: var(--border-color);\n}\n\n.combo-option[value='off'] {\n background-color: var(--white);\n color: red;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.combo-option[value='off']::before {\n content: '';\n border-bottom: 3px solid #ff0000;\n width: 120%;\n transform: rotate(135deg);\n}\n\n.combo-option[value='branco-azul'] {\n background-color: var(--white);\n color: var(--ac-branco-azul-primary-color);\n border-color: var(--ac-branco-azul-border-color);\n}\n\n.combo-option[value='azul-amarelo'] {\n background-color: var(--ac-azul-amarelo-bg-color);\n color: var(--ac-azul-amarelo-primary-color);\n border-color: var(--ac-azul-amarelo-border-color);\n}\n\n.combo-option[value='preto-amarelo'] {\n background-color: var(--ac-preto-amarelo-bg-color);\n color: var(--ac-preto-amarelo-primary-color);\n border-color: var(--ac-preto-amarelo-border-color);\n}\n\n.combo-option[value='preto-azul'] {\n background-color: var(--ac-preto-azul-bg-color);\n color: var(--ac-preto-azul-primary-color);\n border-color: var(--ac-preto-azul-border-color);\n}\n\n.combo-option:hover {\n outline: 2px solid var(--outline-focus-color);\n}\n");class Ae extends HTMLElement{static get observedAttributes(){return["ac-mode"]}constructor(){super(),this.dropdown=void 0}connectedCallback(){this.attachShadow({mode:"open"}).adoptedStyleSheets=[we],this.render()}render(){this.shadowRoot.appendChild(xe.content.cloneNode(!0));const t=this.shadowRoot.querySelector(".combo"),e=this.shadowRoot.querySelector("#toggle-button"),r=this.shadowRoot.querySelector(".combo");this.dropdown=new ge(e,r),this.updateAcMode(t)}updateAcMode(t){this.hasAttribute("ac-mode")?t.setAttribute("ac-mode","true"):t.removeAttribute("ac-mode")}attributeChangedCallback(t,e,r){var n;if(this.isConnected&&e!==r){const e=null===(n=this.shadowRoot)||void 0===n?void 0:n.querySelector(".combo");if(!e)return;if("ac-mode"===t)this.updateAcMode(e)}}disconnectedCallback(){var t;null===(t=this.dropdown)||void 0===t||t.destroy()}}t(E,k),t(m,b),t(u,p),t(y,x),t(A,S),t(T,class extends S{constructor(){super()}static get observedAttributes(){return[...super.observedAttributes,"colors","ranges","inverted"]}attributeChangedCallback(t,e,r){if(e!==r)switch(t){case"ranges":case"colors":case"inverted":this.rangedProgressTheme();break;default:super.attributeChangedCallback(t,e,r)}}connectedCallback(){super.connectedCallback(),this.render()}render(){super.render(),this.rangedProgressTheme()}getColors(){let t=JSON.parse(this.getAttribute("colors"))||P;const e=JSON.parse(this.getAttribute("ranges"));return t.length!==e.length&&console.warn("O número de cores deve ser igual ao número de range definido no atributo de ranges, por padrão será utilizada a cor primária nos próximos temas."),t=this.hasAttribute("inverted")?t.slice().reverse():t,t}rangedProgressTheme(){const t=JSON.parse(this.getAttribute("ranges")),e=Number(this.getAttribute("min-value"))||0,r=Number(this.getAttribute("max-value"))||100,n=Number(this.getAttribute("value")),o=s(e,r,n),i=this.querySelector(".progress-bar");if(!t)return void console.warn('O atributo "ranges" é obrigatório.');if(!Array.isArray(t)||0===t.length)return void console.warn('O atributo "ranges" deve ser um array não vazio.');for(const e of t){if(!Array.isArray(e)||2!==e.length)return void console.warn('Cada elemento do atributo "ranges" deve ser um array de dois elementos representando o intervalo.');const[t,r]=e;if("number"!=typeof t||"number"!=typeof r)return void console.warn('Cada elemento do atributo "ranges" deve ser um array contendo apenas números.')}let a=this.getColors();t.map(((t,e)=>({range:t,theme:void 0!==a[e]?a[e]:"info"}))).forEach((t=>{const[e,r]=t.range;e<=o&&o<=r?i.classList.add(t.theme):i.classList.remove(t.theme)}))}}),t(fe,ve),t(ye,Ae);const Se=t=>{var e;(e=/^ds-\w+/i,Array.prototype.slice.call(document.querySelectorAll("*")).filter((function(t){return t.tagName.match(e)}))).forEach((e=>{t?e.setAttribute("ac-mode","true"):e.removeAttribute("ac-mode")}))};window.addEventListener("load",(()=>{document.body.hasAttribute("data-ac-activated")&&Se(!0);new MutationObserver((t=>{for(const e of t)"attributes"===e.type&&"data-ac-activated"===e.attributeName&&Se(e.target.hasAttribute("data-ac-activated"))})).observe(document.body,{attributes:!0})}))}));