"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,e);var i=o.showPagination,a=void 0===i||i,s=o.itemGap,l=void 0===s?16:s,c=o.dragSpeed,u=void 0===c?1.2:c;this.container=document.querySelector(t),this.container?(this.wrapper=this.container.querySelector(".carousel-wrapper"),this.scrollContainer=null===(n=this.wrapper)||void 0===n?void 0:n.querySelector(".carousel-scroll"),this.carousel=Array.from((null===(r=this.scrollContainer)||void 0===r?void 0:r.querySelectorAll(".carousel-item"))||[]),this.dotsContainer=this.container.querySelector(".carousel-dots"),this.prevBtn=this.container.querySelector(".prev"),this.nextBtn=this.container.querySelector(".next"),this.currentPage=0,this.dragSpeed=Math.max(u,.1),this.showPagination=a,this.itemGapConfig=l,this.itemGap=this.calculateDynamicGap(l),this.wrapper&&this.scrollContainer&&this.carousel.length?(this.handlePrevClick=this.handlePrevClick.bind(this),this.handleNextClick=this.handleNextClick.bind(this),this.handleResize=this.handleResize.bind(this),this.handleScroll=this.handleScroll.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.setup()):console.error("Carousel: Missing required elements (wrapper, scroll container or items) in the DOM.")):console.error('Carousel: Container not found for selector "'.concat(t,'".'))}),[{key:"calculateDynamicGap",value:function(e){var t=window.innerWidth;if("number"==typeof e)return e;if(Array.isArray(e))return t<620?e[0]||16:t>=620&&t<=1123?e[1]||24:e[2]||32;if("object"===_typeof(e)){var n=e.mobile,r=void 0===n?16:n,o=e.tablet,i=void 0===o?24:o,a=e.desktop;return t<620?r:t>=620&&t<=1123?i:void 0===a?32:a}return 16}},{key:"calculateItemWidth",value:function(){var e=window.innerWidth;return e<=619?32:e<=1123||e<=1320?72:48+(e-1320)/2}},{key:"setup",value:function(){this.initializeCarousel(),this.updateCarousel()}},{key:"initializeCarousel",value:function(){var e=this;this.totalItemWidths=this.carousel.map((function(t,n){var r=t.getBoundingClientRect().width;return t.style.marginRight=n!==e.carousel.length-1?"".concat(e.itemGap,"px"):"0",r})),this.createDots(),this.addEvents(),"ontouchstart"in window||window.matchMedia("(pointer: coarse)").matches?this.addTouchEvents():this.addMouseDrag()}},{key:"updateCarousel",value:function(){var e=this;this.itemGap=this.calculateDynamicGap(this.itemGapConfig),this.viewportWidth=this.container.offsetWidth;var t=this.calculateItemWidth();this.itemsPerPage=this.calculateItemsPerPage(),this.totalPages=Math.ceil(this.carousel.length/this.itemsPerPage);var n=this.carousel.length<=this.itemsPerPage;Object.assign(this.scrollContainer.style,{paddingRight:n?"0px":"".concat(t,"px"),width:"".concat(this.viewportWidth+(n?0:t),"px"),justifyContent:n?"center":""}),this.scrollContainer.classList.toggle("centered-items",n),this.togglePagination(),setTimeout((function(){if(n)e.currentPage=0,e.scrollToPage(0);else{var t=e.totalItemWidths.slice(0,e.itemsPerPage).reduce((function(t,n){return t+n+e.itemGap}),0),r=e.scrollContainer.scrollLeft,o=Math.round(r/t);o>=e.totalPages&&(o=e.totalPages-1),o<0&&(o=0),e.currentPage=o;var i=e.carousel.findIndex((function(e){return"true"===e.dataset.highlight}));e.currentPage=-1!==i?Math.floor(i/e.itemsPerPage):0,e.scrollToPage(e.currentPage)}e.createDots(),e.updateDots()}),0)}},{key:"calculateItemsPerPage",value:function(){var e=this,t=0,n=this.totalItemWidths.findIndex((function(n){return t+n>e.viewportWidth||(t+=n+e.itemGap,!1)}));return-1===n?this.totalItemWidths.length:Math.max(1,n)}},{key:"togglePagination",value:function(){var e,t,n=function(e,t){e&&(e.style.display=t?"":"none")},r=this.carousel.length>this.itemsPerPage&&this.showPagination,o=this.container.querySelector(".carousel-pagination");n(o,!!r),null===(e=this.prevBtn)||void 0===e||e.setAttribute("aria-label","Previous slide"),null===(t=this.nextBtn)||void 0===t||t.setAttribute("aria-label","Next slide")}},{key:"createDots",value:function(){var e=this;this.showPagination&&this.dotsContainer&&(this.dotsContainer.innerHTML=Array.from({length:this.totalPages},(function(e,t){return'\n \n ')})).join(""),this.dotsContainer.querySelectorAll("span").forEach((function(t){t.addEventListener("click",(function(){return e.scrollToPage(Number(t.dataset.index))}))})))}},{key:"updateDots",value:function(){var e=this;this.showPagination&&this.dotsContainer&&this.dotsContainer.querySelectorAll("span").forEach((function(t,n){t.classList.toggle("active",n===e.currentPage)}))}},{key:"scrollToPage",value:function(e){var t=this;if(!(e<0||e>=this.totalPages)){var n=e*this.itemsPerPage,r=this.totalItemWidths.slice(0,n).reduce((function(e,n){return e+n+t.itemGap}),0),o=this.totalItemWidths.slice(0,this.itemsPerPage).reduce((function(e,n){return e+n+t.itemGap}),0),i=(this.viewportWidth-o)/2;this.scrollContainer.scrollTo({left:r-i,behavior:"smooth"}),this.currentPage=e,this.updateDots()}}},{key:"handlePrevClick",value:function(e){e.stopPropagation(),this.currentPage>0&&this.scrollToPage(this.currentPage-1)}},{key:"handleNextClick",value:function(e){e.stopPropagation(),this.currentPageMath.abs(n)){var r=t*this.dragSpeed;this.scrollContainer.scrollLeft=this._scrollLeft-r}}}},{key:"onMouseUp",value:function(){var e=this;if(this._isDragging){var t=this.totalItemWidths.slice(0,this.itemsPerPage).reduce((function(t,n){return t+n+e.itemGap}),0),n=this.scrollContainer.scrollLeft;Math.round(n/t);Math.abs(this._dragDistanceX)>t/4?this._dragDistanceX>0&&this.currentPage>0?this.scrollToPage(this.currentPage-1):this._dragDistanceX<0&&this.currentPage6||Math.abs(n)>6)){if(this._dragDirectionLocked=!0,!(Math.abs(t)>Math.abs(n)))return void(this._isDragging=!1);this._isHorizontalDrag=!0}if(this._isHorizontalDrag){e.preventDefault();var r=t*this.dragSpeed;this.scrollContainer.scrollLeft=this._scrollLeft-r}}}},{key:"onTouchEnd",value:function(){var e=this;if(this._isHorizontalDrag){this.totalItemWidths.slice(0,this.itemsPerPage).reduce((function(t,n){return t+n+e.itemGap}),0);Math.abs(this._dragDistanceX)>20?this._dragDistanceX>0&&this.currentPage>0?this.scrollToPage(this.currentPage-1):this._dragDistanceX<0&&this.currentPagee.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;window.dataLayer.push(_objectSpread(_objectSpread(_objectSpread({},t&&{event:t}),!e.event_type&&{event_type:"click"}),e))}},{key:"trackClick",value:function(e,t){this.trackDOMEvent({element:e,eventData:t,domEvent:"click"})}},{key:"trackDOMEvent",value:function(e){var t=this,n=e.element,r=e.eventData,o=e.domEvent,i=e.eventName,a=void 0===i?null:i,s=function(){return t.pushEvent(r,a)};n.addEventListener(o,s),this.trackedElements.has(n)||this.trackedElements.set(n,[]),this.trackedElements.get(n).push({domEvent:o,listener:s})}},{key:"untrackElement",value:function(e){var t=this.trackedElements.get(e);t&&(t.forEach((function(t){var n=t.domEvent,r=t.listener;e.removeEventListener(n,r)})),this.trackedElements.delete(e))}},{key:"trackElementInteraction",value:function(e){var t=this.normalizeElementInteractionData(e),n={event:"element_interaction",element_name:t.elementName,section_name:t.sectionName||pageName||null,event_type:"click",element_type:"button"};this.trackClick(e,n)}},{key:"trackGenericGTMEvent",value:function(e){var t=_slicedToArray((e.getAttribute("data-gtm")||"").split("||").map((function(e){return e.trim()})),5),n=t[0],r=t[1],o=t[2],i=t[3],a={event:n,element_name:r,section_name:t[4]||pageName||null,event_type:o||"click",element_type:i||"button"};this.trackDOMEvent({element:e,eventData:a,domEvent:o||"click"})}},{key:"normalizeElementInteractionData",value:function(e){var t=_slicedToArray(e.dataset.interaction.split("||").map((function(e){return e.trim()})),2);return{elementName:t[0],sectionName:t[1]||null}}},{key:"observeDOMChanges",value:function(){var e=this;new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){t instanceof HTMLElement&&(t.hasAttribute("data-interaction")&&e.trackElementInteraction(t),t.hasAttribute("data-gtm")&&e.trackGenericGTMEvent(t),t.querySelectorAll("[data-interaction], [data-gtm]").forEach((function(t){t.hasAttribute("data-interaction")&&e.trackElementInteraction(t),t.hasAttribute("data-gtm")&&e.trackGenericGTMEvent(t)})))}))}))})).observe(document.body,{childList:!0,subtree:!0})}}])}();function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n=1124&&(e.style.paddingRight="18px"),this._isScrollBlocked=!0}},{key:"releaseScroll",value:function(){var e=document.querySelector("html");e.style.overflowY="scroll",e.style.paddingRight="0px",this._isScrollBlocked=!1}},{key:"toggleScroll",value:function(){this._isScrollBlocked?this.releaseScroll():this.blockScroll()}},{key:"isScrollBlocked",value:function(){return this._isScrollBlocked}}])}();_defineProperty(ScrollManager,"_instance",void 0);var scrollManager=new ScrollManager;function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:C(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",v="executing",m="completed",y={};function p(){}function g(){}function b(){}var _={};c(_,a,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(D([])));k&&k!==n&&r.call(k,a)&&(_=k);var E=b.prototype=p.prototype=Object.create(_);function P(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function n(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==_typeof(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function C(t,n,r){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=S(s,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=v;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?m:f,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=m,r.method="throw",r.arg=c.arg)}}}function S(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function asyncGeneratorStep(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){asyncGeneratorStep(i,r,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,r,o,a,s,"throw",e)}a(void 0)}))}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:{runCallbacks:!0,runApplyImagePaths:!0},r=Object.keys(this.themeKeys).map((function(e){return t.themeKeys[e]}));(e=this._htmlElement.classList).remove.apply(e,_toConsumableArray(r)),this._htmlElement.classList.add(this._currentTheme),n.runCallbacks&&this._runCallbacksList(),n.runApplyImagePaths&&this._setImagePaths()}},{key:"_runCallbacksList",value:function(){var e=this;this.callbacks.forEach(function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function t(n){return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e._runCallback(n,e._currentTheme));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}},{key:"_runCallback",value:function(e,t){try{t&&e(t)}catch(e){console.log("erro ao executar callback de temas da funcao",e)}}},{key:"toggleTheme",value:function(){themeManager.currentTheme="dark"==themeManager.currentTheme?"light":"dark"}},{key:"runWhenChangeTheme",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};"function"==typeof e?this.callbacks.push(e):console.log("tentado adicionar um elemento que nao é uma função na callback de themas")}},{key:"_readImages",value:function(){var e=_toConsumableArray(document.querySelectorAll("[data-src-dark]"));this._images=e.map((function(e){var t="IMG"==e.nodeName&&e.src||"SOURCE"==e.nodeName&&e.srcset,n={nodeElement:e,nodeName:e.nodeName,src:{dark:e.dataset.srcDark,light:t}};return e.removeAttribute("data-src-dark"),n}))}},{key:"_setImagePaths",value:function(){var e=this;this._images.forEach((function(t){var n=t.src[e._currentTheme];"IMG"==t.nodeName&&(t.nodeElement.src=n),"SOURCE"==t.nodeName&&(t.nodeElement.srcset=n)}))}}])}();function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n=0&&o.left>=0&&o.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&o.right<=(window.innerWidth||document.documentElement.clientWidth)),a=window.innerWidth>1123;n.classList.toggle("floating-elements__is-hidden",!(a&&i)),t.classList.toggle("floating-elements__is-hidden",!(!a&&i)),r.classList.toggle("floating-elements__cookies--minimized",a&&i)}o.addEventListener("click",(function(){a=!0,r.classList.remove("floating-elements__cookies--minimized"),r.classList.add("floating-elements__is-hidden")})),i.addEventListener("click",(function(){a=!1,s()})),window.addEventListener("resize",s),window.addEventListener("scroll",l),window.addEventListener("resize",l)})),document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelectorAll('details[hidden-faq-footer="true"]'),t=document.querySelector(".footer__more-btn");0===e.length&&t&&(t.style.display="none")})),document.addEventListener("DOMContentLoaded",(function(){try{document.querySelector("#help-menu-trigger").addEventListener("click",toggleHelpMenu),document.querySelector("#menu-overlay").addEventListener("click",toggleHelpMenu)}catch(e){console.log("Não foi possível adicionar os listeners do menu de ajuda.")}})),document.addEventListener("keydown",(function(e){if("Escape"===e.key){var t=document.querySelector("#menu-option");(null==t?void 0:t.classList.contains("menu-options__container--open"))&&toggleHelpMenu()}}));var attendanceModalOpenTrigger=document.querySelector("#attendance-modal-open-trigger");attendanceModalOpenTrigger&&attendanceModalOpenTrigger.addEventListener("click",openHeaderAttendanceModal);var attendanceModalClose=document.querySelector("#attendance-modal-close-trigger");function handleOutsideClick(e){var t=document.querySelector("#attendance-modal"),n=null==t?void 0:t.contains(e.target),r=e.target.closest("#attendance-modal-open-trigger");n||r||closeHeaderAttendanceModal(e)}function validateCPF(e){return 11===(e=e.replace(/\D/g,"")).length&&!/^([0-9])\1*$/.test(e)&&(checkCPFDigit(e,9)&&checkCPFDigit(e,10))}function checkCPFDigit(e,t){for(var n=0,r=0;r=10&&(o=0),o===parseInt(e.charAt(t))}function validateCNPJ(e){return 14===(e=e.replace(/\D/g,"")).length&&(checkCNPJDigit(e,12)&&checkCNPJDigit(e,13))}function checkCNPJDigit(e,t){for(var n=0,r=t-7,o=t;o>=1;o--)n+=e.charAt(t-o)*r--,r<2&&(r=9);return(n%11<2?0:11-n%11)==e.charAt(t)}attendanceModalClose&&attendanceModalClose.addEventListener("click",closeHeaderAttendanceModal),document.querySelectorAll(".attendance-modal__copy-phone-number").forEach((function(e){e.addEventListener("click",(function(){var e=this.getAttribute("data-phone");navigator.clipboard.writeText(e).then((function(){return alert("Número de telefone copiado!")})).catch((function(e){console.error("Erro ao copiar:",e),alert("Erro ao copiar. Seu navegador pode não permitir essa ação.")}))}))})),document.addEventListener("click",(function(e){var t=document.querySelector("#attendance-modal");(null==t?void 0:t.classList.contains("attendance-modal--open"))&&handleOutsideClick(e)})),document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector(".cpf-cnpj"),t=document.querySelector(".validationresult"),n=document.querySelector(".input-field__container");function r(e,t,n){if(t(e)){o("".concat(n," válido"),"success"),document.querySelector(".second-copy-cta").href="https://www.niointernet.com.br/ajuda/servicos/segunda-via"}else{if(i(),11!==e.length&&14!==e.length)return;o("".concat(n," inválido"),"alert")}}function o(e,r){t.classList.add(r),n.classList.add("input-field__container--".concat(r)),"success"!=r&&(t.innerHTML=e)}function i(){t.innerHTML="",t.classList.remove("success","alert"),n.classList.remove("input-field__container--alert","input-field__container--success")}e&&(e.addEventListener("focus",(function(){this.value=this.value.replace(/\D/g,""),this.setAttribute("maxlength","18"),i()})),e.addEventListener("keypress",(function(e){/\d/.test(e.key)||e.preventDefault()})),e.addEventListener("paste",(function(e){e.preventDefault()})),e.addEventListener("input",(function(e){var t=e.target,n=t.value.replace(/\D/g,"");n.length<=11?(t.value=n.replace(/^(\d{3})(\d{3})?(\d{3})?(\d{2})?$/,(function(e,t,n,r,o){return[t,n,r].filter(Boolean).join(".")+(o?"-"+o:"")})),r(n,validateCPF,"CPF")):(t.value=n.replace(/^(\d{2})(\d{3})?(\d{3})?(\d{4})?(\d{2})?$/,(function(e,t,n,r,o,i){return[t,n,r].filter(Boolean).join(".")+(o?"/"+o:"")+(i?"-"+i:"")})),r(n,validateCNPJ,"CNPJ"))})))}));var handleInternalNav=function(){var e=document.getElementById("internalNavigationBar"),t=document.getElementById("shaftInternalNavigationLeft"),n=document.getElementById("shaftInternalNavigationRight");function r(){var r=e.scrollWidth>e.clientWidth;t.style.display=e.scrollLeft>0&&r?"flex":"none",n.style.display=r?"flex":"none",t.style.display=e.scrollLeft>0?"flex":"none"}e&&t&&n&&(null==t||t.addEventListener("click",(function(){e.scrollBy({top:0,left:-e.clientWidth/2,behavior:"smooth"})})),null==n||n.addEventListener("click",(function(){e.scrollBy({top:0,left:e.clientWidth/2,behavior:"smooth"})})),null==e||e.addEventListener("scroll",(function(){t.style.display=e.scrollLeft>0?"flex":"none",n.style.display=e.scrollLeft+e.clientWidth