PageSourceSearch

https://padrepauloricardo.org/assets/login-831207d4a4129916908178cabb5c3a5ed02cd507f0c1d8d07b1f55bb07957b6d.js

js padrepauloricardo.org collected 2026-09-24 19:48:20 UTC 254,315 bytes, 8 lines download raw bytes

1(()=>{function e(e){if("immediatePropagationStopped"in e)return e;{const{stopImmediatePropagation:t}=e;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}function t(e){const t=e.trim().match(rr)||[];let i=t[2],n=t[3];return n&&!["keydown","keyup","keypress"].includes(i)&&(i+=`.${n}`,n=""),{eventTarget:s(t[4]),eventName:i,eventOptions:t[7]?r(t[7]):{},identifier:t[5],methodName:t[6],keyFilter:t[1]||n}}function s(e){return"window"==e?window:"document"==e?document:void 0}function r(e){return e.split(":").reduce((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)}),{})}function i(e){return e==window?"window":e==document?"document":void 0}function n(e){return e.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function a(e){return n(e.replace(/--/g,"-").replace(/__/g,"_"))}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function c(e){return e.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function l(e){return e.match(/[^\s]+/g)||[]}function d(e){return null!=e}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e){const t=e.tagName.toLowerCase();if(t in ar)return ar[t](e)}function p(e){throw new Error(e)}function g(e){try{return JSON.parse(e)}catch(t){return e}}function m(e,t,s){b(e,t).add(s)}function f(e,t,s){b(e,t).delete(s),y(e,t)}function b(e,t){let s=e.get(t);return s||(s=new Set,e.set(t,s)),s}function y(e,t){const s=e.get(t);null!=s&&0==s.size&&e.delete(t)}function v(e,t,s){return e.trim().split(/\s+/).filter(e=>e.length).map((e,r)=>({element:t,attributeName:s,content:e,index:r}))}function w(e,t){const s=Math.max(e.length,t.length);return Array.from({length:s},(s,r)=>[e[r],t[r]])}function T(e,t){return e&&t&&e.index==t.index&&e.content==t.content}function k(e,t){const s=S(e);return Array.from(s.reduce((e,s)=>(L(s,t).forEach(t=>e.add(t)),e),new Set))}function C(e,t){return S(e).reduce((e,s)=>(e.push(...A(s,t)),e),[])}function S(e){const t=[];for(;e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}function L(e,t){const s=e[t];return Array.isArray(s)?s:[]}function A(e,t){const s=e[t];return s?Object.keys(s).map(e=>[e,s[e]]):[]}function _(e){return x(e,E(e))}function x(e,t){const s=Tr(e),r=O(e.prototype,t);return Object.defineProperties(s.prototype,r),s}function E(e){return k(e,"blessings").reduce((t,s)=>{const r=s(e);for(const e in r){const s=t[e]||{};t[e]=Object.assign(s,r[e])}return t},{})}function O(e,t){return wr(t).reduce((s,r)=>{const i=M(e,t,r);return i&&Object.assign(s,{[r]:i}),s},{})}function M(e,t,s){const r=Object.getOwnPropertyDescriptor(e,s);if(!(r&&"value"in r)){const e=Object.getOwnPropertyDescriptor(t,s).value;return r&&(e.get=r.get||e.get,e.set=r.set||e.set),e}}function N(e){return{identifier:e.identifier,controllerConstructor:_(e.controllerConstructor)}}function R(e,t){return`[${e}~="${t}"]`}function B(e){return e.reduce((e,[t,s])=>Object.assign(Object.assign({},e),{[t]:s}),{})}function F(){return new Promise(e=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",()=>e()):e()})}function P(e){return k(e,"classes").reduce((e,t)=>Object.assign(e,I(t)),{})}function I(e){return{[`${e}Class`]:{get(){const{classes:t}=this;if(t.has(e))return t.get(e);{const s=t.getAttributeName(e);throw new Error(`Missing attribute "${s}"`)}}},[`${e}Classes`]:{get(){return this.classes.getAll(e)}},[`has${o(e)}Class`]:{get(){return this.classes.has(e)}}}}function D(e){return k(e,"outlets").reduce((e,t)=>Object.assign(e,j(t)),{})}function $(e,t,s){return e.application.getControllerForElementAndIdentifier(t,s)}function q(e,t,s){let r=$(e,t,s);return r||(e.application.router.proposeToConnectScopeForElementAndIdentifier(t,s),r=$(e,t,s),r||void 0)}function j(e){const t=a(e);return{[`${t}Outlet`]:{get(){const t=this.outlets.find(e),s=this.outlets.getSelectorForOutletName(e);if(t){const s=q(this,t,e);if(s)return s;throw new Error(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${s}".`)}},[`${t}Outlets`]:{get(){const t=this.outlets.findAll(e);return t.length>0?t.map(t=>{const s=q(this,t,e);if(s)return s;console.warn(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`,t)}).filter(e=>e):[]}},[`${t}OutletElement`]:{get(){const t=this.outlets.find(e),s=this.outlets.getSelectorForOutletName(e);
1if(t)return t;throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${s}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(e)}},[`has${o(t)}Outlet`]:{get(){return this.outlets.has(e)}}}}function U(e){return k(e,"targets").reduce((e,t)=>Object.assign(e,V(t)),{})}function V(e){return{[`${e}Target`]:{get(){const t=this.targets.find(e);if(t)return t;throw new Error(`Missing target element "${e}" for "${this.identifier}" controller`)}},[`${e}Targets`]:{get(){return this.targets.findAll(e)}},[`has${o(e)}Target`]:{get(){return this.targets.has(e)}}}}function z(e){const t=C(e,"values"),s={valueDescriptorMap:{get(){return t.reduce((e,t)=>{const s=W(t,this.identifier),r=this.data.getAttributeNameForKey(s.key);return Object.assign(e,{[r]:s})},{})}}};return t.reduce((e,t)=>Object.assign(e,H(t)),s)}function H(e,t){const s=W(e,t),{key:r,name:i,reader:n,writer:a}=s;return{[i]:{get(){const e=this.data.get(r);return null!==e?n(e):s.defaultValue},set(e){void 0===e?this.data.delete(r):this.data.set(r,a(e))}},[`has${o(i)}`]:{get(){return this.data.has(r)||s.hasCustomDefaultValue}}}}function W([e,t],s){return Q({controller:s,token:e,typeDefinition:t})}function K(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function J(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(e)?"array":"[object Object]"===Object.prototype.toString.call(e)?"object":void 0}function G(e){const{controller:t,token:s,typeObject:r}=e,i=d(r.type),n=d(r.default),a=i&&n,o=i&&!n,c=!i&&n,l=K(r.type),u=J(e.typeObject.default);if(o)return l;if(c)return u;if(l!==u){throw new Error(`The specified default value for the Stimulus Value "${t?`${t}.${s}`:s}" must match the defined type "${l}". The provided default value of "${r.default}" is of type "${u}".`)}return a?l:void 0}function X(e){const{controller:t,token:s,typeDefinition:r}=e,i=G({controller:t,token:s,typeObject:r}),n=J(r),a=K(r),o=i||n||a;if(o)return o;throw new Error(`Unknown value type "${t?`${t}.${r}`:s}" for "${s}" value`)}function Y(e){const t=K(e);if(t)return Rr[t];const s=u(e,"default"),r=u(e,"type"),i=e;if(s)return i.default;if(r){const{type:e}=i,t=K(e);if(t)return Rr[t]}return e}function Q(e){const{token:t,typeDefinition:s}=e,r=`${c(t)}-value`,i=X(e);return{type:i,key:r,name:n(r),get defaultValue(){return Y(s)},get hasCustomDefaultValue(){return void 0!==J(s)},reader:Br[i],writer:Fr[i]||Fr.default}}function Z(e){return JSON.stringify(e)}function ee(e){return`${e}`}function te(){return Dr.urlPrefix+Dr.visitsUrl}function se(){return Dr.urlPrefix+Dr.eventsUrl}function re(e){return 0===Object.keys(e).length}function ie(){return(Dr.useBeacon||Dr.trackNow)&&re(Dr.headers)&&Kr&&void 0!==window.navigator.sendBeacon&&!Dr.withCredentials}function ne(e){var t=new FormData;for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.append(s,e[s]);return t}function ae(e,t,s){Ir.set(e,t,s,Dr.cookieDomain||Dr.domain)}function oe(e){return Ir.get(e)}function ce(e){Ir.set(e,"",-1,Dr.cookieDomain||Dr.domain)}function le(e){oe("ahoy_debug")&&window.console.log(e)}function de(){for(var e;e=Wr.shift();)e();Hr=!0}function ue(e,t){var s=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;return s?s.apply(e,[t])?e:e.parentElement?ue(e.parentElement,t):null:(le("Unable to match"),null)}function he(e,t,s){document.addEventListener(e,function(e){var r=ue(e.target,t);if(r){var i=_e(r,"data-ahoy-skip");if(null!==i&&"false"!==i)return;s.call(r,e)}})}function pe(e){"interactive"===document.readyState||"complete"===document.readyState?setTimeout(e,0):document.addEventListener("DOMContentLoaded",e)}function ge(){return window.crypto&&window.crypto.randomUUID?window.crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function me(){Dr.cookies&&Kr&&ae("ahoy_events",JSON.stringify(Jr),1)}function fe(){var e=document.querySelector("meta[name=csrf-token]");return e&&e.content}function be(){var e=document.querySelector("meta[name=csrf-param]");return e&&e.content}function ye(e){var t=fe();t&&e.setRequestHeader("X-CSRF-Token",t)}
1function ve(e,t,s){if(Kr)if(zr&&zr.ajax)zr.ajax({type:"POST",url:e,data:JSON.stringify(t),contentType:"application/json; charset=utf-8",dataType:"json",beforeSend:ye,success:s,headers:Dr.headers,xhrFields:{withCredentials:Dr.withCredentials}});else{var r=new XMLHttpRequest;for(var i in r.open("POST",e,!0),r.withCredentials=Dr.withCredentials,r.setRequestHeader("Content-Type","application/json"),Dr.headers)Object.prototype.hasOwnProperty.call(Dr.headers,i)&&r.setRequestHeader(i,Dr.headers[i]);r.onload=function(){200===r.status&&s()},ye(r),r.send(JSON.stringify(t))}}function we(e){var t={events:[e]};return Dr.cookies&&(t.visit_token=e.visit_token,t.visitor_token=e.visitor_token),delete e.visit_token,delete e.visitor_token,t}function Te(e){$r.ready(function(){ve(se(),we(e),function(){for(var t=0;t<Jr.length;t++)if(Jr[t].id===e.id){Jr.splice(t,1);break}me()})})}function ke(e){$r.ready(function(){var t=we(e),s=be(),r=fe();s&&r&&(t[s]=r),t.events_json=JSON.stringify(t.events),delete t.events,window.navigator.sendBeacon(se(),ne(t))})}function Ce(){return Dr.page||window.location.pathname}function Se(e){return e&&e.length>0?e:null}function Le(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&null===e[t]&&delete e[t];return e}function Ae(){return Le({tag:this.tagName.toLowerCase(),id:Se(this.id),class:Se(this.className),page:Ce(),section:_e(this,"data-section")})}function _e(e,t){for(;e&&e!==document;e=e.parentNode)if(e.hasAttribute(t))return e.getAttribute(t);return null}function xe(){if(Hr=!1,qr=$r.getVisitId(),jr=$r.getVisitorId(),Ur=oe("ahoy_track"),!1===Dr.cookies||!1===Dr.trackVisits)le("Visit tracking disabled"),de();else if(qr&&jr&&!Ur)le("Active visit"),de();else if(qr||ae("ahoy_visit",qr=ge(),Dr.visitDuration),oe("ahoy_visit")){le("Visit started"),jr||ae("ahoy_visitor",jr=ge(),Dr.visitorDuration);var e={visit_token:qr,visitor_token:jr,platform:Dr.platform,landing_page:window.location.href,screen_width:window.screen.width,screen_height:window.screen.height,js:!0};for(var t in document.referrer.length>0&&(e.referrer=document.referrer),Dr.visitParams)Object.prototype.hasOwnProperty.call(Dr.visitParams,t)&&(e[t]=Dr.visitParams[t]);le(e),ve(te(),e,function(){ce("ahoy_track"),de()})}else le("Cookies disabled"),de()}function Ee(){if(window.ahoy=$r,Oe())return;if(window.__pprAhoyTrackingInitialized)return;window.__pprAhoyTrackingInitialized=!0,$r.configure({visitsUrl:"/ahoy/visits",eventsUrl:"/ahoy/events",cookies:!0,trackVisits:!0,startOnReady:!0});let e=!0;$r.ready(function(){$r.trackView(),e=!1}),document.addEventListener("turbo:load",function(){e||Oe()||$r.trackView()})}function Oe(){const e=window.location.pathname;return e.startsWith("/cp")||e.startsWith("/crm")}function Me(e){const t=window.innerWidth;return t>1360?e:t>1190?e-13:t>1020?e-30:e}function Ne(e){return!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))}function Re(e,t){if(!Ne(e))return;const s=Me(t),r=e.getBoundingClientRect().top+window.pageYOffset-s,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:r,behavior:i?"auto":"smooth"})}function Be(e){const t=e.target.closest('a.scroll-to, .scroll-to[href^="#"]');if(!t)return;const s=t.getAttribute("href");if(!s||"#"!==s.charAt(0)||"#"===s)return;const r=document.querySelector(s);r&&(e.preventDefault(),Re(r,Gr))}function Fe(e){if(!e.target.closest("#print-button, .js-print-button"))return;e.preventDefault();const t=document.getElementById("nightModeToggle");document.body.classList.contains("night-mode")&&(t?t.click():document.body.classList.remove("night-mode")),window.print()}function Pe(e){return e.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function Ie(e){return Pe(e.replace(/--/g,"-").replace(/__/g,"_"))}function De(e){return e.charAt(0).toUpperCase()+e.slice(1)}function $e(e){return e.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function qe(e){return null!=e}function je(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ue(e,t){const s=ze(e);return Array.from(s.reduce((e,s)=>(He(s,t).forEach(t=>e.add(t)),e),new Set))}function Ve(e,t){return ze(e).reduce((e,s)=>(e.push(...We(s,t)),e),[])}function ze(e){const t=[];for(;e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}function He(e,t){const s=e[t];return Array.isArray(s)?s:[]}function We(e,t){const s=e[t];return s?Object.keys(s).map(e=>[e,s[e]]):[]}function Ke(e){return e.reduce((e,[t,s])=>Object.assign(Object.assign({},e),{[t]:s}),{})}function Je(e){return Ue(e,"classes").reduce((e,t)=>
1Object.assign(e,Ge(t)),{})}function Ge(e){return{[`${e}Class`]:{get(){const{classes:t}=this;if(t.has(e))return t.get(e);{const s=t.getAttributeName(e);throw new Error(`Missing attribute "${s}"`)}}},[`${e}Classes`]:{get(){return this.classes.getAll(e)}},[`has${De(e)}Class`]:{get(){return this.classes.has(e)}}}}function Xe(e){return Ue(e,"outlets").reduce((e,t)=>Object.assign(e,Ze(t)),{})}function Ye(e,t,s){return e.application.getControllerForElementAndIdentifier(t,s)}function Qe(e,t,s){let r=Ye(e,t,s);return r||(e.application.router.proposeToConnectScopeForElementAndIdentifier(t,s),r=Ye(e,t,s),r||void 0)}function Ze(e){const t=Ie(e);return{[`${t}Outlet`]:{get(){const t=this.outlets.find(e),s=this.outlets.getSelectorForOutletName(e);if(t){const s=Qe(this,t,e);if(s)return s;throw new Error(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${s}".`)}},[`${t}Outlets`]:{get(){const t=this.outlets.findAll(e);return t.length>0?t.map(t=>{const s=Qe(this,t,e);if(s)return s;console.warn(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`,t)}).filter(e=>e):[]}},[`${t}OutletElement`]:{get(){const t=this.outlets.find(e),s=this.outlets.getSelectorForOutletName(e);if(t)return t;throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${s}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(e)}},[`has${De(t)}Outlet`]:{get(){return this.outlets.has(e)}}}}function et(e){return Ue(e,"targets").reduce((e,t)=>Object.assign(e,tt(t)),{})}function tt(e){return{[`${e}Target`]:{get(){const t=this.targets.find(e);if(t)return t;throw new Error(`Missing target element "${e}" for "${this.identifier}" controller`)}},[`${e}Targets`]:{get(){return this.targets.findAll(e)}},[`has${De(e)}Target`]:{get(){return this.targets.has(e)}}}}function st(e){const t=Ve(e,"values"),s={valueDescriptorMap:{get(){return t.reduce((e,t)=>{const s=it(t,this.identifier),r=this.data.getAttributeNameForKey(s.key);return Object.assign(e,{[r]:s})},{})}}};return t.reduce((e,t)=>Object.assign(e,rt(t)),s)}function rt(e,t){const s=it(e,t),{key:r,name:i,reader:n,writer:a}=s;return{[i]:{get(){const e=this.data.get(r);return null!==e?n(e):s.defaultValue},set(e){void 0===e?this.data.delete(r):this.data.set(r,a(e))}},[`has${De(i)}`]:{get(){return this.data.has(r)||s.hasCustomDefaultValue}}}}function it([e,t],s){return dt({controller:s,token:e,typeDefinition:t})}function nt(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function at(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(e)?"array":"[object Object]"===Object.prototype.toString.call(e)?"object":void 0}function ot(e){const{controller:t,token:s,typeObject:r}=e,i=qe(r.type),n=qe(r.default),a=i&&n,o=i&&!n,c=!i&&n,l=nt(r.type),d=at(e.typeObject.default);if(o)return l;if(c)return d;if(l!==d){throw new Error(`The specified default value for the Stimulus Value "${t?`${t}.${s}`:s}" must match the defined type "${l}". The provided default value of "${r.default}" is of type "${d}".`)}return a?l:void 0}function ct(e){const{controller:t,token:s,typeDefinition:r}=e,i=ot({controller:t,token:s,typeObject:r}),n=at(r),a=nt(r),o=i||n||a;if(o)return o;throw new Error(`Unknown value type "${t?`${t}.${r}`:s}" for "${s}" value`)}function lt(e){const t=nt(e);if(t)return Xr[t];const s=je(e,"default"),r=je(e,"type"),i=e;if(s)return i.default;if(r){const{type:e}=i,t=nt(e);if(t)return Xr[t]}return e}function dt(e){const{token:t,typeDefinition:s}=e,r=`${$e(t)}-value`,i=ct(e);return{type:i,key:r,name:Pe(r),get defaultValue(){return lt(s)},get hasCustomDefaultValue(){return void 0!==at(s)}
1,reader:Yr[i],writer:Qr[i]||Qr.default}}function ut(e){return JSON.stringify(e)}function ht(e){return`${e}`}function pt(e){const t=`${e}=`,s=document.cookie.split(";");for(let e=0;e<s.length;e++){let r=s[e];for(;" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null}function gt(e){return e&&e.trim()||""}function mt(){const e=new URLSearchParams(window.location.search),t=gt(e.get("src")),s=gt(e.get("camp")),r=t||pt(ii)||"",i=s||pt(ni)||"";return{first_touch:{src:pt(ai)||r,camp:pt(oi)||i},last_touch:{src:r,camp:i},utm_source:r,utm_campaign:i}}function ft(e,t){return function(){return e.apply(t,arguments)}}function bt(e){return null!==e&&!yi(e)&&null!==e.constructor&&!yi(e.constructor)&&Ti(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}function yt(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&vi(e.buffer),t}function vt(e,t,{allOwnKeys:s=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),bi(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(bt(e))return;const i=s?Object.getOwnPropertyNames(e):Object.keys(e),n=i.length;let a;for(r=0;r<n;r++)a=i[r],t.call(null,e[a],a,e)}}function wt(e,t){if(bt(e))return null;t=t.toLowerCase();const s=Object.keys(e);let r,i=s.length;for(;i-- >0;)if(r=s[i],t===r.toLowerCase())return r;return null}function Tt(){const{caseless:e,skipUndefined:t}=qi(this)&&this||{},s={},r=(r,i)=>{const n=e&&wt(s,i)||i;Li(s[n])&&Li(r)?s[n]=Tt(s[n],r):Li(r)?s[n]=Tt({},r):bi(r)?s[n]=r.slice():t&&yi(r)||(s[n]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&vt(arguments[e],r);return s}function kt(e){return!!(e&&Ti(e.append)&&"FormData"===e[pi]&&e[hi])}function Ct(e){return hn.isPlainObject(e)||hn.isArray(e)}function St(e){return hn.endsWith(e,"[]")?e.slice(0,-2):e}function Lt(e,t,s){return e?e.concat(t).map(function(e,t){return e=St(e),!s&&t?"["+e+"]":e}).join(s?".":""):t}function At(e){return hn.isArray(e)&&!e.some(Ct)}function _t(e,t,s){function r(e){if(null===e)return"";if(hn.isDate(e))return e.toISOString();if(hn.isBoolean(e))return e.toString();if(!d&&hn.isBlob(e))throw new gn("Blob is not supported. Use a Buffer instead.");return hn.isArrayBuffer(e)||hn.isTypedArray(e)?d&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function i(e,s,i){let n=e;if(e&&!i&&"object"==typeof e)if(hn.endsWith(s,"{}"))s=a?s:s.slice(0,-2),e=JSON.stringify(e);else if(hn.isArray(e)&&At(e)||(hn.isFileList(e)||hn.endsWith(s,"[]"))&&(n=hn.toArray(e)))return s=St(s),n.forEach(function(e,i){!hn.isUndefined(e)&&null!==e&&t.append(!0===l?Lt([s],i,c):null===l?s:s+"[]",r(e))}),!1;return!!Ct(e)||(t.append(Lt(i,s,c),r(e)),!1)}function n(e,s){if(!hn.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+s.join("."));u.push(e),hn.forEach(e,function(e,r){!0===(!(hn.isUndefined(e)||null===e)&&o.call(t,e,hn.isString(r)?r.trim():r,s,h))&&n(e,s?s.concat(r):[r])}),u.pop()}}if(!hn.isObject(e))throw new TypeError("target must be an object");t=t||new(mn||FormData);const a=(s=hn.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!hn.isUndefined(t[e])})).metaTokens,o=s.visitor||i,c=s.dots,l=s.indexes,d=(s.Blob||"undefined"!=typeof Blob&&Blob)&&hn.isSpecCompliantForm(t);if(!hn.isFunction(o))throw new TypeError("visitor must be a function");const u=[],h=Object.assign(fn,{defaultVisitor:i,convertValue:r,isVisitable:Ct});if(!hn.isObject(e))throw new TypeError("data must be an object");return n(e),t}function xt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Et(e,t){this._pairs=[],e&&bn(e,this,t)}function Ot(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Mt(e,t,s){if(!t)return e;const r=s&&s.encode||Ot,i=hn.isFunction(s)?{serialize:s}:s,n=i&&i.serialize;let a;if(a=n?n(t,i):hn.isURLSearchParams(t)?t.toString():new vn(t,i).toString(r),a){const t=e.indexOf("#");
1-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}function Nt(e,t){return bn(e,new En.classes.URLSearchParams,{visitor:function(e,t,s,r){return En.isNode&&hn.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}function Rt(e){return hn.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}function Bt(e){const t={},s=Object.keys(e);let r;const i=s.length;let n;for(r=0;r<i;r++)n=s[r],t[n]=e[n];return t}function Ft(e){function t(e,s,r,i){let n=e[i++];if("__proto__"===n)return!0;const a=Number.isFinite(+n),o=i>=e.length;if(n=!n&&hn.isArray(r)?r.length:n,o)return hn.hasOwnProp(r,n)?r[n]=[r[n],s]:r[n]=s,!a;r[n]&&hn.isObject(r[n])||(r[n]=[]);return t(e,s,r[n],i)&&hn.isArray(r[n])&&(r[n]=Bt(r[n])),!a}if(hn.isFormData(e)&&hn.isFunction(e.entries)){const s={};return hn.forEachEntry(e,(e,r)=>{t(Rt(e),r,s,0)}),s}return null}function Pt(e,t,s){if(hn.isString(e))try{return(t||JSON.parse)(e),hn.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(s||JSON.stringify)(e)}function It(e){return e&&String(e).trim().toLowerCase()}function Dt(e){return!1===e||null==e?e:hn.isArray(e)?e.map(Dt):String(e)}function $t(e){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=s.exec(e);)t[r[1]]=r[2];return t}function qt(e,t,s,r,i){return hn.isFunction(r)?r.call(this,t,s):(i&&(t=s),hn.isString(t)?hn.isString(r)?-1!==t.indexOf(r):hn.isRegExp(r)?r.test(t):void 0:void 0)}function jt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,s)=>t.toUpperCase()+s)}function Ut(e,t){const s=hn.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+s,{value:function(e,s,i){return this[r].call(this,t,e,s,i)},configurable:!0})})}function Vt(e,t){const s=this||Nn,r=t||s,i=Dn.from(r.headers);let n=r.data;return hn.forEach(e,function(e){n=e.call(s,n,i.normalize(),t?t.status:void 0)}),i.normalize(),n}function zt(e){return!(!e||!e.__CANCEL__)}function Ht(e,t,s){const r=s.config.validateStatus;s.status&&r&&!r(s.status)?t(new gn("Request failed with status code "+s.status,[gn.ERR_BAD_REQUEST,gn.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s)):e(s)}function Wt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Kt(e,t){e=e||10;const s=new Array(e),r=new Array(e);let i,n=0,a=0;return t=void 0!==t?t:1e3,function(o){const c=Date.now(),l=r[a];i||(i=c),s[n]=o,r[n]=c;let d=a,u=0;for(;d!==n;)u+=s[d++],d%=e;if(n=(n+1)%e,n===a&&(a=(a+1)%e),c-i<t)return;const h=l&&c-l;return h?Math.round(1e3*u/h):void 0}}function Jt(e,t){let s,r,i=0,n=1e3/t;const a=(t,n=Date.now())=>{i=n,s=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),o=t-i;o>=n?a(e,t):(s=e,r||(r=setTimeout(()=>{r=null,a(s)},n-o)))},()=>s&&a(s)]}function Gt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Xt(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Yt(e,t,s){let r=!Gt(t);return e&&(r||0==s)?Xt(e,t):t}function Qt(e,t){function s(e,t,s,r){return hn.isPlainObject(e)&&hn.isPlainObject(t)?hn.merge.call({caseless:r},e,t):hn.isPlainObject(t)?hn.merge({},t):hn.isArray(t)?t.slice():t}function r(e,t,r,i){return hn.isUndefined(t)?hn.isUndefined(e)?void 0:s(void 0,e,r,i):s(e,t,r,i)}function i(e,t){if(!hn.isUndefined(t))return s(void 0,t)}function n(e,t){return hn.isUndefined(t)?hn.isUndefined(e)?void 0:s(void 0,e):s(void 0,t)}function a(r,i,n){return n in t?s(r,i):n in e?s(void 0,r):void 0}t=t||{};const o={},c={url:i,method:i,data:i,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:a,headers:(e,t,s)=>r(Kn(e),Kn(t),s,!0)};return hn.forEach(Object.keys({...e,...t}),function(s){const i=c[s]||r,n=i(e[s],t[s],s);hn.isUndefined(n)&&i!==a||(o[s]=n)}),o}function Zt(e,t){e=hn.isArray(e)?e:[e];const{length:s}=e;let r,i;const n={};for(let a=0;a<s;a++){let s;if(r=e[a],i=r,!ha(r)&&(i=da[(s=String(r)).toLowerCase()],void 0===i))throw new gn(`Unknown adapter '${s}'`);if(i&&(hn.isFunction(i)||(i=i.get(t))))break;n[s||"#"+a]=i}if(!i){const e=Object.entries(n).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=s?e.length>
11?"since :\n"+e.map(ua).join("\n"):" "+ua(e[0]):"as no adapter specified";throw new gn("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return i}function es(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $n(null,e)}function ts(e){es(e),e.headers=Dn.from(e.headers),e.data=Vt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return pa.getAdapter(e.adapter||Nn.adapter,e)(e).then(function(t){return es(e),t.data=Vt.call(e,e.transformResponse,t),t.headers=Dn.from(t.headers),t},function(t){return zt(t)||(es(e),t&&t.response&&(t.response.data=Vt.call(e,e.transformResponse,t.response),t.response.headers=Dn.from(t.response.headers))),Promise.reject(t)})}function ss(e,t,s){if("object"!=typeof e)throw new gn("options must be an object",gn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const n=r[i],a=t[n];if(a){const t=e[n],s=void 0===t||a(t,n,e);if(!0!==s)throw new gn("option "+n+" must be "+s,gn.ERR_BAD_OPTION_VALUE);continue}if(!0!==s)throw new gn("Unknown option "+n,gn.ERR_BAD_OPTION)}}function rs(e){return function(t){return e.apply(null,t)}}function is(e){return hn.isObject(e)&&!0===e.isAxiosError}function ns(e){const t=new wa(e),s=ft(wa.prototype.request,t);return hn.extend(s,wa.prototype,t,{allOwnKeys:!0}),hn.extend(s,t,null,{allOwnKeys:!0}),s.create=function(t){return ns(Qt(e,t))},s}function as(e,t){return!t||!t.length||os(e,t)}function os(e,t){return hs(t)&&t.map(function(e){return e.toLowerCase()}).includes(Ja(e).toLowerCase())}function cs(e){return e&&e.length>14&&e.length<=19}function ls(e){return e.replace(/\D/g,"")}function ds(e){return new RegExp("[^0-9- ]").test(e)}function us(e){return e>0&&e%10==0}function hs(e){var t=Ka.map(function(e){return e.name.toLowerCase()});return e.every(function(e){return t.includes(e.toLowerCase())})}function ps(e){if(!e)return{};var t=e.replace(/[^\d]/g,"");return Ka.find(function(e){return e.bins.test(t)&&e})||{}}function gs(e){for(var t=[0,2,4,6,8,1,3,5,7,9],s=0,r=0,i=e.length,n=!0;i--;)r=Number(e[i]),s+=(n=!n)?t[r]:r;return s}function ms(e,t=Qa.headline.placement){return ao[e]?ao[e]:no.includes(e)?e:t}function fs(e,t){return no.includes(e)?e:oo.includes(e)?`${t.split("_")[0]}_${e}`:t}function bs(e){const t=e&&"object"==typeof e?e:{},s=e=>!1!==e&&"false"!==e&&"0"!==e;return{headline:s(t.headline),body:s(t.body),button:s(t.button)}}function ys(e){return{desktop_wide:"landscape",mobile_portrait:"portrait"}[e]||e||eo.format}function vs(e,t="landscape"){const s=Number(e);return!Number.isFinite(s)||s<=0?to[ys(t)]||Qa.maxWidth:Math.min(Math.max(Math.round(s),320),1200)}function ws(e){const t=Number(e);return!Number.isFinite(t)||t<0?Qa.padding:Math.min(Math.max(Math.round(t),0),96)}function Ts(e){const t=e||{},s=Number(t.width),r=Number(t.height);return{width:Number.isFinite(s)&&s>0?Math.min(Math.max(Math.round(s),1),64):eo.customSize.width,height:Number.isFinite(r)&&r>0?Math.min(Math.max(Math.round(r),1),64):eo.customSize.height}}function ks(e,t,s={}){const r="mobile"===t?Za:Qa,i=e&&"object"==typeof e?e:{},n={maxWidth:vs(i.maxWidth||i.max_width||("mobile"===t?r.maxWidth:null)||s.maxWidth||s.max_width||r.maxWidth),padding:ws(i.padding??("mobile"===t?r.padding:null)??s.padding??r.padding),card:{backgroundColor:i.card?.backgroundColor||i.card?.background_color||s.card?.backgroundColor||s.card?.background_color||r.card.backgroundColor},background:{...r.background,...s.background||{},...i.background||{}},headline:{...r.headline,...s.headline||{},...i.headline||{}},body:{...r.body,...s.body||{},...i.body||{}},button:{...r.button,...s.button||{},...i.button||{}}},a=ms(n.headline.placement,r.headline.placement);return n.headline.placement=a,n.body.placement=ms(n.body.placement,a),n.button.placement=fs(n.button.placement,a),n.button=Cs(n.button),n}function Cs(e){const t=io[e.style]||io.light;return{placement:e.placement,style:e.style,backgroundColor:e.backgroundColor||e.background_color||t.background,textColor:e.textColor||e.text_color||t.text}}function Ss(e){const t=e&&"object"==typeof e?e:{},s=bs(t.elements);if(!t.breakpoints||"object"!=typeof t.breakpoints){const e=ks({maxWidth:t.max_width||t.maxWidth,padding:t.padding,card:t.card,background:t.background,headline:t.headline,body:t.body,button:t.button},"desktop");return{version:2,format:ys(t.format),customSize:Ts(t.custom_size||t.customSize),elements:s,breakpoints:{desktop:e,mobile:ks(e,"mobile",e)}}}return{version:2,format:ys(t.format),customSize:Ts(t.custom_size||t.customSize),elements:s,breakpoints:{desktop:ks(t.breakpoints.desktop,"desktop",{maxWidth:t.max_width||t.maxWidth}),mobile:ks(t.breakpoints.mobile,"mobile",t.breakpoints.desktop)}}}function Ls(e,t="desktop"){return"full_screen"===e.format&&"mobile"===t?"9 / 16":"custom"===e.format?`${e.customSize.width} / ${e.customSize.height}`:so[e.format]||so.desktop_wide}function As(e,t=0,{maxWidth:s=null}={}){const[r,i]=no.includes(e)?e.split("_"):["middle","left"],n=`${t}px`,a="center"===i?"-50%":"0",o="middle"===r?"-50%":"0";return{position:"absolute",top:"top"===r?n:"middle"===r?"50%":"",bottom:"bottom"===r?n:"",left:"left"===i?n:"center"===i?"50%":"",right:"right"===i?n:"",transform:"0"===a&&"0"===o?"":`translate(${a}, ${o})`,textAlign:i,maxWidth:s?`min(calc(100% - ${2*t}px), ${s}px)`:`calc(100% - ${2*t}px)`}}
1function _s(e,t,s,r={}){e&&Object.assign(e.style,As(t,s,r))}function xs(e){const t=e||"";return t.includes("minha_conta")||t.includes("minha_inscricao")||t.includes("checkout")||t.includes("doacao")||t.includes("loja")}async function Es(e=window.location.pathname,t={}){const s=e||window.location.pathname;if(xs(s))return null;const r=t.decisionUrl||co,i=new URL(r,window.location.origin);i.searchParams.set("path",s);const n=await fetch(i.toString(),{method:"GET",headers:{Accept:"application/json"},credentials:"same-origin"});if(204===n.status)return null;const a=await n.text();if(!a)return null;if(!n.ok)throw new Error(`Growth decision HTTP ${n.status}`);try{return Os(JSON.parse(a))}catch{return null}}function Os(e){if(!e)return null;const t=Object.prototype.hasOwnProperty.call(e,"decision")?e.decision:e;if(!t||!1===e.matched)return null;const s="object"==typeof t.placement?t.placement?.kind:t.placement,r=t.creative||{};return{...t,placement:s,payload:t.payload||{title:r.headline,body:r.body,cta_text:r.cta_text,cta_url:r.cta_url,image_url:r.image_url,design:r.design}}}function Ms(){
2return document.querySelector('meta[name="csrf-token"]')?.getAttribute("content")||""}function Ns(e){return JSON.stringify({authenticity_token:Ms(),events:e})}function Rs(e,t){if(!e.length)return Promise.resolve();const s=Ns(e);return fetch(ho,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-CSRF-Token":Ms()},credentials:"same-origin",keepalive:Boolean(t),body:s}).then(e=>{if(!e.ok)throw new Error(`Growth events HTTP ${e.status}`)})}function Bs(e){if(!e.length||!navigator.sendBeacon)return!1;const t=new Blob([Ns(e)],{type:"application/json"}),s=new URL(ho,window.location.origin).toString();return navigator.sendBeacon(s,t)}function Fs(e={}){const{preferBeacon:t=!1,keepalive:s=!1}=e;if(!lo.length)return Promise.resolve();const r=lo;return lo=[],t&&Bs(r)?Promise.resolve():Rs(r,s).catch(()=>{lo=r.concat(lo)})}
2function Ps(e){$s();const{type:t,event_type:s,metadata:r={},path:i,...n}=e;lo.push({...n,event_type:s||t,metadata:{...r,path:i,client_ts:Date.now()}})}function Is(){Fs({preferBeacon:!0,keepalive:!0})}function Ds(){"hidden"===document.visibilityState&&Is()}function $s(e={}){uo||(uo=!0,e.eventsUrl&&(ho=e.eventsUrl),e.flushIntervalMs&&(po=e.flushIntervalMs),window.setInterval(()=>{Fs()},po),window.addEventListener("pagehide",Is,{capture:!0}),document.addEventListener("visibilitychange",Ds,{capture:!0}))}function qs({leaveClientYMax:e=0}={}){function t(){s&&(r.removeEventListener("mouseleave",s),s=null)}let s=null;const r=document.documentElement;return{arm(i){t(),s=s=>{s.clientY<=e&&(t(),i())},r.addEventListener("mouseleave",s)},disarm:t}}function js({threshold:e=.5}={}){function t(){s&&(window.removeEventListener("scroll",s,{capture:!0}),s=null)}let s=null;return{arm(r){t(),s=()=>{const s=document.documentElement,i=window.scrollY||s.scrollTop,n=Math.max(s.scrollHeight-window.innerHeight,0);(0===n?1:i/n)>=e&&(t(),r())},window.addEventListener("scroll",s,{passive:!0,capture:!0}),s()},disarm:t}}function Us({delayMs:e}){function t(){null!=s&&(window.clearTimeout(s),s=null)}let s=null;return{arm(r){t(),s=window.setTimeout(()=>{s=null,r()},e)},disarm:t}}function Vs(e){return e?Array.from(e.querySelectorAll(go)).filter(e=>e.matches(":not([hidden])")&&(null!==e.offsetParent||e===document.activeElement)):[]}function zs({panel:e,onRequestClose:t}){function s(){n=document.activeElement instanceof HTMLElement?document.activeElement:null;const s=Vs(e)[0];s&&s.focus(),i=s=>{if("Escape"===s.key)return s.preventDefault(),void t();if("Tab"!==s.key)return;const r=Vs(e);if(0===r.length)return;const i=r[0],n=r[r.length-1];s.shiftKey&&document.activeElement===i?(s.preventDefault(),n.focus()):s.shiftKey||document.activeElement!==n||(s.preventDefault(),i.focus())},e.addEventListener("keydown",i)}function r(){i&&(e.removeEventListener("keydown",i),i=null),n&&"function"==typeof n.focus&&n.focus(),n=null}let i=null,n=null;return{activate:s,deactivate:r}}function Hs(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)e[r]=s[r]}return e}function Ws(e,t){function s(s,r,i){if("undefined"!=typeof document){"number"==typeof(i=Hs({},t,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var n="";for(var a in i)i[a]&&(n+="; "+a,!0!==i[a]&&(n+="="+i[a].split(";")[0]));return document.cookie=s+"="+e.write(r,s)+n}}function r(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var s=document.cookie?document.cookie.split("; "):[],r={},i=0;i<s.length;i++){var n=s[i].split("="),a=n.slice(1).join("=");try{var o=decodeURIComponent(n[0]);if(r[o]=e.read(a,o),t===o)break}catch(e){}}return t?r[t]:r}}return Object.create({set:s,get:r,remove:function(e,t){s(e,"",Hs({},t,{expires:-1}))},withAttributes:function(e){return Ws(this.converter,Hs({},this.attributes,e))},withConverter:function(e){return Ws(Hs({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}function Ks(e,t="store-svg-icon"){const s=vo[e];if(!s)return"";const[,,r,i]=s.viewBox.split(" ").map(Number);return`<svg xmlns="http://www.w3.org/2000/svg" class="${t}" style="--store-icon-width: ${r&&i?(r/i).toFixed(4):"1"}em;" viewBox="${s.viewBox}" aria-hidden="true" focusable="false"><path fill="currentColor" d="${s.path}"/></svg>`}function Js(e,t){return Ks(e,`review-star-icon review-star-icon--${t}`)}function Gs(e){for(var t=null,s=0;s<9;++s)t+=e.toString().charAt(s)*(10-s);var r=t%11;return r<2?0:11-r}function Xs(e){for(var t=null,s=0;s<10;++s)t+=e.toString().charAt(s)*(11-s);var r=t%11;return r<2?0:11-r}function Ys(){return document.querySelector("#zipInput").value.length>8}var Qs=Object.defineProperty,Zs=(e,t)=>{for(var s in t)Qs(e,s,{get:t[s],enumerable:!0})},er=class{constructor(e,t,s){this.eventTarget=e,this.eventName=t,this.eventOptions=s,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(t){const s=e(t);for(const e of this.bindings){if(s.immediatePropagationStopped)break;e.handleEvent(s)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((e,t)=>
vendor: 9,835 bytes, line 2
2{const s=e.index,r=t.index;return s<r?-1:s>r?1:0})}},tr=class{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(e=>e.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(e=>e.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((e,t)=>e.concat(Array.from(t.values())),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,t=!1){this.fetchEventListenerForBinding(e).bindingDisconnected(e),t&&this.clearEventListenersForBinding(e)}handleError(e,t,s={}){this.application.handleError(e,`Error ${t}`,s)}clearEventListenersForBinding(e){const t=this.fetchEventListenerForBinding(e);t.hasBindings()||(t.disconnect(),this.removeMappedEventListenerFor(e))}removeMappedEventListenerFor(e){const{eventTarget:t,eventName:s,eventOptions:r}=e,i=this.fetchEventListenerMapForEventTarget(t),n=this.cacheKey(s,r);i.delete(n),0==i.size&&this.eventListenerMaps.delete(t)}fetchEventListenerForBinding(e){const{eventTarget:t,eventName:s,eventOptions:r}=e;return this.fetchEventListener(t,s,r)}fetchEventListener(e,t,s){const r=this.fetchEventListenerMapForEventTarget(e),i=this.cacheKey(t,s);let n=r.get(i);return n||(n=this.createEventListener(e,t,s),r.set(i,n)),n}createEventListener(e,t,s){const r=new er(e,t,s);return this.started&&r.connect(),r}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){const s=[e];return Object.keys(t).sort().forEach(e=>{s.push(`${t[e]?"":"!"}${e}`)}),s.join(":")}},sr={stop:({event:e,value:t})=>(t&&e.stopPropagation(),!0),prevent:({event:e,value:t})=>(t&&e.preventDefault(),!0),self:({event:e,value:t,element:s})=>!t||s===e.target},rr=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/,ir=["meta","ctrl","alt","shift"],nr=class{constructor(e,t,s,r){this.element=e,this.index=t,this.eventTarget=s.eventTarget||e,this.eventName=s.eventName||h(e)||p("missing event name"),this.eventOptions=s.eventOptions||{},this.identifier=s.identifier||p("missing identifier"),this.methodName=s.methodName||p("missing method name"),this.keyFilter=s.keyFilter||"",this.schema=r}static forToken(e,s){return new this(e.element,e.index,t(e.content),s)}toString(){const e=this.keyFilter?`.${this.keyFilter}`:"",t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}${t}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(e){if(!this.keyFilter)return!1;const t=this.keyFilter.split("+");if(this.keyFilterDissatisfied(e,t))return!0;const s=t.filter(e=>!ir.includes(e))[0];return!!s&&(u(this.keyMappings,s)||p(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[s].toLowerCase()!==e.key.toLowerCase())}shouldIgnoreMouseEvent(e){if(!this.keyFilter)return!1;const t=[this.keyFilter];return!!this.keyFilterDissatisfied(e,t)}get params(){const e={},t=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:s,value:r}of Array.from(this.element.attributes)){const i=s.match(t),a=i&&i[1];a&&(e[n(a)]=g(r))}return e}get eventTargetName(){return i(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(e,t){const[s,r,i,n]=ir.map(e=>t.includes(e));return e.metaKey!==s||e.ctrlKey!==r||e.altKey!==i||e.shiftKey!==n}},ar={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:e=>"submit"==e.getAttribute("type")?"click":"input",select:()=>"change",textarea:()=>"input"},or=class{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){const t=this.prepareActionEvent(e);this.willBeInvokedByEvent(e)&&this.applyEventModifiers(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){const e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){const{element:t}=this.action,{actionDescriptorFilters:s}=this.context.application,{controller:r}=this.context;let i=!0;for(const[n,a]of Object.entries(this.eventOptions))if(n in s){const o=s[n];i=i&&o({name:n,value:a,event:e,element:t,controller:r})}return i}prepareActionEvent(e){return Object.assign(e,{params:this.action.params})}invokeWithEvent(e){const{target:t,currentTarget:s}=e;try{this.method.call(this.controller,e),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:s,action:this.methodName})}catch(t){const{identifier:s,controller:r,element:i,index:n}=this,a={identifier:s,controller:r,element:i,index:n,event:e};this.context.handleError(t,`invoking action "${this.action}"`,a)}}willBeInvokedByEvent(e){const t=e.target;return!(e instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(e))&&(!(e instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(e))&&(this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}},cr=class{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver(e=>this.processMutations(e))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const e=new Set(this.matchElementsInTree());for(const t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(const t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){this.elements.has(e)?this.delegate.elementAttributeChanged&&this.matchElement(e)?this.delegate.elementAttributeChanged(e,t):this.removeElement(e):this.matchElement(e)&&this.addElement(e)}processRemovedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.processTree(e,this.removeElement)}}processAddedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.elementIsActive(e)&&this.processTree(e,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(const s of this.matchElementsInTree(e))t.call(this,s)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}},lr=class{constructor(e,t,s){this.attributeName=t,this.delegate=s,this.elementObserver=new cr(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[],s=Array.from(e.querySelectorAll(this.selector));return t.concat(s)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}},dr=class{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((e,t)=>e.concat(Array.from(t)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((e,t)=>e+t.size,0)}add(e,t){m(this.valuesByKey,e,t)}delete(e,t){f(this.valuesByKey,e,t)}has(e,t){const s=this.valuesByKey.get(e);return null!=s&&s.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some(t=>t.has(e))}getValuesForKey(e){const t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter(([t,s])=>s.has(e)).map(([e,t])=>e)}},ur=class{constructor(e,t,s,r){this._selector=t,this.details=r,this.elementObserver=new cr(e,this),this.delegate=s,this.matchesByElement=new dr}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(e){this._selector=e,this.refresh()}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}
2get element(){return this.elementObserver.element}matchElement(e){const{selector:t}=this;if(t){const s=e.matches(t);return this.delegate.selectorMatchElement?s&&this.delegate.selectorMatchElement(e,this.details):s}return!1}matchElementsInTree(e){const{selector:t}=this;if(t){const s=this.matchElement(e)?[e]:[],r=Array.from(e.querySelectorAll(t)).filter(e=>this.matchElement(e));return s.concat(r)}return[]}elementMatched(e){const{selector:t}=this;t&&this.selectorMatched(e,t)}elementUnmatched(e){const t=this.matchesByElement.getKeysForValue(e);for(const s of t)this.selectorUnmatched(e,s)}elementAttributeChanged(e,t){const{selector:s}=this;if(s){const t=this.matchElement(e),r=this.matchesByElement.has(s,e);t&&!r?this.selectorMatched(e,s):!t&&r&&this.selectorUnmatched(e,s)}}selectorMatched(e,t){this.delegate.selectorMatched(e,t,this.details),this.matchesByElement.add(t,e)}selectorUnmatched(e,t){this.delegate.selectorUnmatched(e,t,this.details),this.matchesByElement.delete(t,e)}},hr=class{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(e=>this.processMutations(e))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){const t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){const s=this.delegate.getStringMapKeyForAttribute(e);if(null!=s){this.stringMap.has(e)||this.stringMapKeyAdded(s,e);const r=this.element.getAttribute(e);if(this.stringMap.get(e)!=r&&this.stringMapValueChanged(r,s,t),null==r){const t=this.stringMap.get(e);this.stringMap.delete(e),t&&this.stringMapKeyRemoved(s,e,t)}else this.stringMap.set(e,r)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,s){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,s)}stringMapKeyRemoved(e,t,s){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,s)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(e=>e.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}},pr=class{constructor(e,t,s){this.attributeObserver=new lr(e,t,this),this.delegate=s,this.tokensByElement=new dr}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){const[t,s]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(s)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach(e=>this.tokenMatched(e))}tokensUnmatched(e){e.forEach(e=>this.tokenUnmatched(e))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){const t=this.tokensByElement.getValuesForKey(e),s=this.readTokensForElement(e),r=w(t,s).findIndex(([e,t])=>!T(e,t));return-1==r?[[],[]]:[t.slice(r),s.slice(r)]}readTokensForElement(e){const t=this.attributeName;return v(e.getAttribute(t)||"",e,t)}},gr=class{constructor(e,t,s){this.tokenListObserver=new pr(e,t,this),this.delegate=s,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}
vendor: 10,308 bytes, line 2
2get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){const{element:t}=e,{value:s}=this.fetchParseResultForToken(e);s&&(this.fetchValuesByTokenForElement(t).set(e,s),this.delegate.elementMatchedValue(t,s))}tokenUnmatched(e){const{element:t}=e,{value:s}=this.fetchParseResultForToken(e);s&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,s))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}}},mr=class{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new gr(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){const t=new or(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){const t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}disconnectAllActions(){this.bindings.forEach(e=>this.delegate.bindingDisconnected(e,!0)),this.bindingsByAction.clear()}parseValueForToken(e){const t=nr.forToken(e,this.schema);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}},fr=class{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new hr(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){const s=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,s.writer(this.receiver[e]),s.writer(s.defaultValue))}stringMapValueChanged(e,t,s){const r=this.valueDescriptorNameMap[t];null!==e&&(null===s&&(s=r.writer(r.defaultValue)),this.invokeChangedCallback(t,e,s))}stringMapKeyRemoved(e,t,s){const r=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,r.writer(this.receiver[e]),s):this.invokeChangedCallback(e,r.writer(r.defaultValue),s)}invokeChangedCallbacksForDefaultValues(){for(const{key:e,name:t,defaultValue:s,writer:r}of this.valueDescriptors)null==s||this.controller.data.has(e)||this.invokeChangedCallback(t,r(s),void 0)}invokeChangedCallback(e,t,s){const r=`${e}Changed`,i=this.receiver[r];if("function"==typeof i){const r=this.valueDescriptorNameMap[e];try{const e=r.reader(t);let n=s;s&&(n=r.reader(s)),i.call(this.receiver,e,n)}catch(e){throw e instanceof TypeError&&(e.message=`Stimulus Value "${this.context.identifier}.${r.name}" - ${e.message}`),e}}}get valueDescriptors(){const{valueDescriptorMap:e}=this;return Object.keys(e).map(t=>e[t])}get valueDescriptorNameMap(){const e={};return Object.keys(this.valueDescriptorMap).forEach(t=>{const s=this.valueDescriptorMap[t];e[s.name]=s}),e}hasValue(e){const t=`has${o(this.valueDescriptorNameMap[e].name)}`;return this.receiver[t]}},br=class{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new dr}start(){this.tokenListObserver||(this.tokenListObserver=new pr(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var s;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),null===(s=this.tokenListObserver)||void 0===s||s.pause(()=>this.delegate.targetConnected(e,t)))}disconnectTarget(e,t){var s;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),null===(s=this.tokenListObserver)||void 0===s||s.pause(()=>this.delegate.targetDisconnected(e,t)))}disconnectAllTargets(){for(const e of this.targetsByName.keys)for(const t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}},yr=class{constructor(e,t){this.started=!1,this.context=e,this.delegate=t,this.outletsByName=new dr,this.outletElementsByName=new dr,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(e=>{this.setupSelectorObserverForOutlet(e),this.setupAttributeObserverForOutlet(e)}),this.started=!0,this.dependentContexts.forEach(e=>e.refresh()))}refresh(){this.selectorObserverMap.forEach(e=>e.refresh()),this.attributeObserverMap.forEach(e=>e.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(e=>e.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(e=>e.stop()),this.attributeObserverMap.clear())}selectorMatched(e,t,{outletName:s}){const r=this.getOutlet(e,s);r&&this.connectOutlet(r,e,s)}selectorUnmatched(e,t,{outletName:s}){const r=this.getOutletFromMap(e,s);r&&this.disconnectOutlet(r,e,s)}selectorMatchElement(e,{outletName:t}){const s=this.selector(t),r=this.hasOutlet(e,t),i=e.matches(`[${this.schema.controllerAttribute}~=${t}]`);return!!s&&(r&&i&&e.matches(s))}elementMatchedAttribute(e,t){const s=this.getOutletNameFromOutletAttributeName(t);s&&this.updateSelectorObserverForOutlet(s)}elementAttributeValueChanged(e,t){const s=this.getOutletNameFromOutletAttributeName(t);s&&this.updateSelectorObserverForOutlet(s)}elementUnmatchedAttribute(e,t){const s=this.getOutletNameFromOutletAttributeName(t);s&&this.updateSelectorObserverForOutlet(s)}connectOutlet(e,t,s){var r;this.outletElementsByName.has(s,t)||(this.outletsByName.add(s,e),this.outletElementsByName.add(s,t),null===(r=this.selectorObserverMap.get(s))||void 0===r||r.pause(()=>this.delegate.outletConnected(e,t,s)))}disconnectOutlet(e,t,s){var r;this.outletElementsByName.has(s,t)&&(this.outletsByName.delete(s,e),this.outletElementsByName.delete(s,t),null===(r=this.selectorObserverMap.get(s))||void 0===r||r.pause(()=>this.delegate.outletDisconnected(e,t,s)))}disconnectAllOutlets(){for(const e of this.outletElementsByName.keys)for(const t of this.outletElementsByName.getValuesForKey(e))for(const s of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(s,t,e)}updateSelectorObserverForOutlet(e){const t=this.selectorObserverMap.get(e);t&&(t.selector=this.selector(e))}setupSelectorObserverForOutlet(e){const t=this.selector(e),s=new ur(document.body,t,this,{outletName:e});this.selectorObserverMap.set(e,s),s.start()}setupAttributeObserverForOutlet(e){const t=this.attributeNameForOutletName(e),s=new lr(this.scope.element,t,this);this.attributeObserverMap.set(e,s),s.start()}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}attributeNameForOutletName(e){return this.scope.schema.outletAttributeForScope(this.identifier,e)}getOutletNameFromOutletAttributeName(e){return this.outletDefinitions.find(t=>this.attributeNameForOutletName(t)===e)}get outletDependencies(){const e=new dr;return this.router.modules.forEach(t=>{k(t.definition.controllerConstructor,"outlets").forEach(s=>e.add(s,t.identifier))}),e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const e=this.dependentControllerIdentifiers;return this.router.contexts.filter(t=>e.includes(t.identifier))}hasOutlet(e,t){return!!this.getOutlet(e,t)||!!this.getOutletFromMap(e,t)}getOutlet(e,t){return this.application.getControllerForElementAndIdentifier(e,t)}getOutletFromMap(e,t){return this.outletsByName.getValuesForKey(t).find(t=>t.element===e)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}},vr=class{constructor(e,t){this.logDebugActivity=(e,t={})=>{const{identifier:s,controller:r,element:i}=this;t=Object.assign({identifier:s,controller:r,element:i},t),this.application.logDebugActivity(this.identifier,e,t)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new mr(this,this.dispatcher),this.valueObserver=new fr(this,this.controller),this.targetObserver=new br(this,this),this.outletObserver=new yr(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(e){this.handleError(e,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}
2get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,s={}){const{identifier:r,controller:i,element:n}=this;s=Object.assign({identifier:r,controller:i,element:n},s),this.application.handleError(e,`Error ${t}`,s)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}outletConnected(e,t,s){this.invokeControllerMethod(`${a(s)}OutletConnected`,e,t)}outletDisconnected(e,t,s){this.invokeControllerMethod(`${a(s)}OutletDisconnected`,e,t)}invokeControllerMethod(e,...t){const s=this.controller;"function"==typeof s[e]&&s[e](...t)}},wr="function"==typeof Object.getOwnPropertySymbols?e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]:Object.getOwnPropertyNames,Tr=(()=>{function e(e){function t(){return Reflect.construct(e,arguments,new.target)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}function t(){const t=e(function(){this.a.call(this)});return t.prototype.a=function(){},new t}try{return t(),e}catch(e){return e=>class extends e{}}})(),kr=class{constructor(e,t){this.application=e,this.definition=N(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){const t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){const t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new vr(this,e),this.contextsByScope.set(e,t)),t}},Cr=class{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){return l(this.data.get(this.getDataKey(e))||"")}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}},Sr=class{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){const t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){const s=this.getAttributeNameForKey(e);return this.element.setAttribute(s,t),this.get(e)}has(e){const t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){const t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${c(e)}`}},Lr=class{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,s){let r=this.warnedKeysByObject.get(e);r||(r=new Set,this.warnedKeysByObject.set(e,r)),r.has(t)||(r.add(t),this.logger.warn(s,e))
3}},Ar=class{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce((e,t)=>e||this.findTarget(t)||this.findLegacyTarget(t),void 0)}findAll(...e){return e.reduce((e,t)=>[...e,...this.findAllTargets(t),...this.findAllLegacyTargets(t)],[])}findTarget(e){const t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){const t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){return R(this.schema.targetAttributeForScope(this.identifier),e)}findLegacyTarget(e){const t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){const t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map(t=>this.deprecate(t,e))}getLegacySelectorForTargetName(e){const t=`${this.identifier}.${e}`;return R(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:s}=this,r=this.schema.targetAttribute,i=this.schema.targetAttributeForScope(s);this.guide.warn(e,`target:${t}`,`Please replace ${r}="${s}.${t}" with ${i}="${t}". The ${r} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}},_r=class{constructor(e,t){this.scope=e,this.controllerElement=t}
vendor: 5,133 bytes, line 3
3get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce((e,t)=>e||this.findOutlet(t),void 0)}findAll(...e){return e.reduce((e,t)=>[...e,...this.findAllOutlets(t)],[])}getSelectorForOutletName(e){const t=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(t)}findOutlet(e){const t=this.getSelectorForOutletName(e);if(t)return this.findElement(t,e)}findAllOutlets(e){const t=this.getSelectorForOutletName(e);return t?this.findAllElements(t,e):[]}findElement(e,t){return this.scope.queryElements(e).filter(s=>this.matchesElement(s,e,t))[0]}findAllElements(e,t){return this.scope.queryElements(e).filter(s=>this.matchesElement(s,e,t))}matchesElement(e,t,s){const r=e.getAttribute(this.scope.schema.controllerAttribute)||"";return e.matches(t)&&r.split(" ").includes(s)}},xr=class e{constructor(e,t,s,r){this.targets=new Ar(this),this.classes=new Cr(this),this.data=new Sr(this),this.containsElement=e=>e.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=s,this.guide=new Lr(r),this.outlets=new _r(this.documentScope,t)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return R(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new e(this.schema,document.documentElement,this.identifier,this.guide.logger)}},Er=class{constructor(e,t,s){this.element=e,this.schema=t,this.delegate=s,this.valueListObserver=new gr(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){const{element:t,content:s}=e;return this.parseValueForElementAndIdentifier(t,s)}parseValueForElementAndIdentifier(e,t){const s=this.fetchScopesByIdentifierForElement(e);let r=s.get(t);return r||(r=this.delegate.createScopeForElementAndIdentifier(e,t),s.set(t,r)),r}elementMatchedValue(e,t){const s=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,s),1==s&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){const s=this.scopeReferenceCounts.get(t);s&&(this.scopeReferenceCounts.set(t,s-1),1==s&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}},Or=class{constructor(e){this.application=e,this.scopeObserver=new Er(this.element,this.schema,this),this.scopesByIdentifier=new dr,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((e,t)=>e.concat(t.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);const t=new kr(this.application,e);this.connectModule(t);const s=e.controllerConstructor.afterLoad;s&&s.call(e.controllerConstructor,e.identifier,this.application)}unloadIdentifier(e){const t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){const s=this.modulesByIdentifier.get(t);if(s)return s.contexts.find(t=>t.element==e)}proposeToConnectScopeForElementAndIdentifier(e,t){const s=this.scopeObserver.parseValueForElementAndIdentifier(e,t);s?this.scopeObserver.elementMatchedValue(s.element,s):console.error(`Couldn't find or create scope for identifier: "${t}" and element:`,e)}handleError(e,t,s){this.application.handleError(e,t,s)}createScopeForElementAndIdentifier(e,t){return new xr(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(t=>e.connectContextForScope(t))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(t=>e.disconnectContextForScope(t))}},Mr={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:e=>`data-${e}-target`,outletAttributeForScope:(e,t)=>`data-${e}-${t}
3-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},B("abcdefghijklmnopqrstuvwxyz".split("").map(e=>[e,e]))),B("0123456789".split("").map(e=>[e,e])))},Nr=class{constructor(e=document.documentElement,t=Mr){this.logger=console,this.debug=!1,this.logDebugActivity=(e,t,s={})=>{this.debug&&this.logFormattedMessage(e,t,s)},this.element=e,this.schema=t,this.dispatcher=new tr(this),this.router=new Or(this),this.actionDescriptorFilters=Object.assign({},sr)}static start(e,t){const s=new this(e,t);return s.start(),s}async start(){await F(),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,t){this.load({identifier:e,controllerConstructor:t})}registerActionOption(e,t){this.actionDescriptorFilters[e]=t}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(e=>{e.controllerConstructor.shouldLoad&&this.router.loadDefinition(e)})}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(e=>this.router.unloadIdentifier(e))}get controllers(){return this.router.contexts.map(e=>e.controller)}getControllerForElementAndIdentifier(e,t){const s=this.router.getContextForElementAndIdentifier(e,t);return s?s.controller:null}handleError(e,t,s){var r;this.logger.error("%s\n\n%o\n\n%o",t,e,s),null===(r=window.onerror)||void 0===r||r.call(window,t,"",0,0,e)}logFormattedMessage(e,t,s={}){s=Object.assign({application:this},s),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},s)),this.logger.groupEnd()}},Rr={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Br={array(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${e}" of type "${J(t)}"`);return t},boolean:e=>!("0"==e||"false"==String(e).toLowerCase()),number:e=>Number(e.replace(/_/g,"")),object(e){const t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${e}" of type "${J(t)}"`);return t},string:e=>e},Fr={default:ee,array:Z,object:Z},Pr=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:s={},prefix:r=this.identifier,bubbles:i=!0,cancelable:n=!0}={}){const a=new CustomEvent(r?`${r}:${e}`:e,{detail:s,bubbles:i,cancelable:n});return t.dispatchEvent(a),a}};Pr.blessings=[P,U,z,D],Pr.targets=[],Pr.outlets=[],Pr.values={};var Ir={set:function(e,t,s,r){var i="",n="";if(s){var a=new Date;a.setTime(a.getTime()+60*s*1e3),i="; expires="+a.toGMTString()}r&&(n="; domain="+r),document.cookie=e+"="+escape(t)+i+n+"; path=/; samesite=lax"},get:function(e){var t,s,r=e+"=",i=document.cookie.split(";");for(t=0;t<i.length;t++){for(s=i[t];" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(r))return unescape(s.substring(r.length,s.length))}return null}},Dr={urlPrefix:"",visitsUrl:"/ahoy/visits",eventsUrl:"/ahoy/events",page:null,platform:"Web",useBeacon:!0,startOnReady:!0,trackVisits:!0,cookies:!0,cookieDomain:null,headers:{},visitParams:{},withCredentials:!1,visitDuration:240,visitorDuration:1051200},$r=window.ahoy||window.Ahoy||{};$r.configure=function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(Dr[t]=e[t])},$r.configure($r);var qr,jr,Ur,Vr,zr=window.jQuery||window.Zepto||window.$,Hr=!1,Wr=[],Kr="undefined"!=typeof JSON&&void 0!==JSON.stringify,Jr=[];$r.ready=function(e){Hr?e():Wr.push(e)},$r.getVisitId=$r.getVisitToken=function(){return oe("ahoy_visit")},$r.getVisitorId=$r.getVisitorToken=function(){return oe("ahoy_visitor")},$r.reset=function(){return ce("ahoy_visit"),ce("ahoy_visitor"),ce("ahoy_events"),ce("ahoy_track"),!0},$r.debug=function(e){return!1===e?ce("ahoy_debug"):ae("ahoy_debug","t",525600),!0},$r.track=function(e,t){var s={name:e,properties:t||{},time:(new Date).getTime()/1e3,id:ge(),js:!0};return $r.ready(function(){Dr.cookies&&!$r.getVisitId()&&xe(),$r.ready(function(){le(s),s.visit_token=$r.getVisitId(),s.visitor_token=$r.getVisitorId(),ie()?ke(s):(Jr.push(s),me(),setTimeout(function(){Te(s)},1e3))})}),!0},$r.trackView=function(e){var t={url:window.location.href,title:document.title,page:Ce()};if(e)for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);$r.track("$view",t)},$r.trackClicks=function(e){if(void 0===e)throw new Error("Missing selector");he("click",e,function(e){var t=Ae.call(this,e);t.text="input"===t.tag?this.value:(this.textContent||this.innerText||this.innerHTML).replace(/[\s\r\n]+/g," ").trim(),t.href=this.href,$r.track("$click",t)})},$r.trackSubmits=function(e){if(void 0===e)throw new Error("Missing selector");he("submit",e,function(e){var t=Ae.call(this,e);$r.track("$submit",t)})},$r.trackChanges=function(e){if(le("trackChanges is deprecated and will be removed in 0.5.0"),void 0===e)throw new Error("Missing selector");he("change",e,function(e){var t=Ae.call(this,e);$r.track("$change",t)})};try{Jr=JSON.parse(oe("ahoy_events")||"[]")}catch(e){}for(Vr=0;Vr<Jr.length;Vr++)Te(Jr[Vr]);$r.start=function(){xe(),$r.start=function(){}},pe(function(){Dr.startOnReady&&$r.start()});var Gr=130;document.addEventListener("click",Be),window.scrollToAnchor=(e,t=Gr)=>{const s=document.querySelector(e);s&&Re(s,t)},document.addEventListener("click",Fe);"function"==typeof Object.getOwnPropertySymbols||Object.getOwnPropertyNames,(()=>{function e(e){function t(){return Reflect.construct(e,arguments,new.target)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}function t(){const t=e(function(){this.a.call(this)});return t.prototype.a=function(){},new t}try{return t(),e}catch(e){return e=>class extends e{}}})(),Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},Ke("abcdefghijklmnopqrstuvwxyz".split("").map(e=>[e,e]))),Ke("0123456789".split("").map(e=>[e,e])));var Xr={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Yr={array(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${e}" of type "${at(t)}"`);return t},boolean:e=>!("0"==e||"false"==String(e).toLowerCase()),number:e=>Number(e.replace(/_/g,"")),object(e){const t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${e}" of type "${at(t)}"`);return t},string:e=>e},Qr={default:ht,array:ut,object:ut},Zr=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}
3get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:s={},prefix:r=this.identifier,bubbles:i=!0,cancelable:n=!0}={}){const a=new CustomEvent(r?`${r}:${e}`:e,{detail:s,bubbles:i,cancelable:n});return t.dispatchEvent(a),a}};Zr.blessings=[Je,et,st,Xe],Zr.targets=[],Zr.outlets=[],Zr.values={};var ei,ti,si,ri,ii="pp_sales_src",ni="pp_sales_camp",ai="pp_ft_src",oi="pp_ft_camp",ci=class extends Zr{static targets=["sidenav","overlay","searchForm","subscriptionLink","content","icon","accordion"];connect(){this.addParamsToSubscriptionLink(),this.updateMobileSlideForAppInvitation();window.location.pathname.startsWith("/minha_conta")&&this.accordionTarget.click()}updateNightModeIcon(e){const t=document.getElementById("nightModeIcon");t&&(e?(t.classList.remove("fa-moon"),t.classList.add("fa-sun-bright")):(t.classList.remove("fa-sun-bright"),t.classList.add("fa-moon")))}toggleNightMode(){const e=!document.body.classList.contains("night-mode");localStorage.setItem("night-mode",e),document.cookie=`night_mode=${e}; path=/`,e?document.body.classList.add("night-mode"):document.body.classList.remove("night-mode"),this.updateNightModeIcon(e)}toggle(){"none"===this.contentTarget.style.display?(this.contentTarget.style.display="block",this.iconTarget.classList.add("rotate-180"),requestAnimationFrame(()=>{this.contentTarget.classList.add("accordion-content--visible")})):(this.contentTarget.classList.remove("accordion-content--visible"),this.iconTarget.classList.remove("rotate-180"),this.contentTarget.style.display="none")}updateMobileSlideForAppInvitation(){let e=document.querySelector(".slider");if(e){const t=e.querySelectorAll('a[href="https://bio.link/apppadrepauloricardo"]');if(t){const e=/Android/i.test(navigator.userAgent),s=/iPhone|iPad|iPod/i.test(navigator.userAgent);e?t.forEach(e=>{console.log("link",e.href),e.href="https://play.google.com/store/apps/details?id=org.padrepauloricardo.app&hl=pt_BR",console.log("link",e.href)}):s&&t.forEach(e=>{e.href="https://apps.apple.com/br/app/padre-paulo-ricardo/id1607579645"})}}}addParamsToSubscriptionLink(){const{last_touch:e}=mt(),t=e.src,s=e.camp;(t||s)&&this.subscriptionLinkTargets.forEach(e=>{const r=new URL(e.getAttribute("href"),window.location.origin);t&&r.searchParams.set("src",t),s&&r.searchParams.set("camp",s),e.href=r.pathname+r.search+r.hash})}showSidenav(){this.highlightLink(),this.sidenavTarget.classList.add("columnnav-in");let e=this.overlayTarget;e.classList.add("overlay-block"),setTimeout(function(){e.classList.add("overlay-in")},50)}hideSidenav(){this.sidenavTarget.classList.remove("columnnav-in");let e=this.overlayTarget;e.classList.remove("overlay-in"),setTimeout(function(){e.classList.remove("overlay-block")},500)}openSearch(){this.searchFormTarget.classList.toggle("navbar-search-in")}closeSearch(){this.searchFormTarget.classList.remove("navbar-search-in");let e=this.searchFormTarget.querySelector(".navbar-search__input");setTimeout(function(){e.value=""},500)}highlightLink(){const e=document.querySelector(".columnnav-menu");e.querySelectorAll("a").forEach(e=>{e.classList.remove("highlighted-link")});let t=window.location.pathname;switch(!0){case/aulas|cursos/.test(t):e.querySelector('[href="/cursos"]').classList.add("highlighted-link");break;case/blog/.test(t):e.querySelector('[href="/blog"]').classList.add("highlighted-link");break;case/programas|episodios/.test(t):e.querySelector('[href="/programas"]').classList.add("highlighted-link");break;case/doacao/.test(t):e.querySelector('[href="/doacao"]').classList.add("highlighted-link");break;case/loja/.test(t):e.querySelector('[href="/loja"]').classList.add("highlighted-link");break;case/oracoes/.test(t):e.querySelector('[href="/oracoes"]').classList.add("highlighted-link");break;case/liturgia/.test(t):e.querySelector('[href="/liturgia"]').classList.add("highlighted-link");break;case/biblia/.test(t):e.querySelector('[href="/biblia"]').classList.add("highlighted-link");break;case/contato/.test(t):e.querySelector('[href="/contato"]').classList.add("highlighted-link");break;case/^\/$/.test(t):e.querySelector('[href="/"]').classList.add("highlighted-link")}}toggleCart(e){e.preventDefault(),document.querySelector(".hidden-button__open-cart").click()}},li=class extends Zr{static targets=["accountContent","accountToggle","drawer","header","marqueeTrack","menuButton","moonIcon","subscriptionLink","
3sunIcon"];connect(){this.addParamsToSubscriptionLinks(),this.highlightCurrentLink(),window.location.pathname.startsWith("/minha_conta")&&this.openAccount(),this.boundCloseOnEscape=this.closeOnEscape.bind(this),this.boundCloseOnOutsideClick=this.closeOnOutsideClick.bind(this),document.addEventListener("keydown",this.boundCloseOnEscape),document.addEventListener("click",this.boundCloseOnOutsideClick)}disconnect(){document.removeEventListener("keydown",this.boundCloseOnEscape),document.removeEventListener("click",this.boundCloseOnOutsideClick),this.cancelMarqueeRateAnimation()}toggleMenu(){this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this.highlightCurrentLink(),this.headerTarget.classList.add("is-menu-open"),this.menuButtonTarget.setAttribute("aria-expanded","true")}closeMenu(){this.headerTarget.classList.remove("is-menu-open"),this.menuButtonTarget.setAttribute("aria-expanded","false")}toggleAccount(){const e="true"!==this.accountToggleTarget.getAttribute("aria-expanded");this.setAccountOpen(e)}toggleNightMode(){const e=!document.body.classList.contains("night-mode");localStorage.setItem("night-mode",e),document.cookie=`night_mode=${e}; path=/`,document.body.classList.toggle("night-mode",e),this.updateNightModeIcon(e)}toggleCart(e){e.preventDefault(),document.querySelector(".hidden-button__open-cart")?.click()}slowMarquee(){this.animateMarqueePlaybackRate(0,700)}resumeMarquee(){this.animateMarqueePlaybackRate(1,420)}get menuOpen(){return this.headerTarget.classList.contains("is-menu-open")}openAccount(){this.hasAccountToggleTarget&&this.hasAccountContentTarget&&this.setAccountOpen(!0)}setAccountOpen(e){this.hasAccountToggleTarget&&this.hasAccountContentTarget&&(this.accountToggleTarget.setAttribute("aria-expanded",String(e)),this.accountToggleTarget.classList.toggle("is-open",e),this.accountContentTarget.hidden=!e)}updateNightModeIcon(e){this.hasMoonIconTarget&&this.moonIconTarget.classList.toggle("is-hidden",e),this.hasSunIconTarget&&this.sunIconTarget.classList.toggle("is-hidden",!e)}animateMarqueePlaybackRate(e,t){const s=this.marqueeAnimation;if(!s)return;this.cancelMarqueeRateAnimation();const r=s.playbackRate,i=performance.now();"idle"===s.playState&&s.play();const n=a=>{const o=Math.min((a-i)/t,1),c=1-Math.pow(1-o,3),l=r+(e-r)*c;s.playbackRate=l,o<1?this.marqueeRateAnimationFrame=requestAnimationFrame(n):s.playbackRate=e};this.marqueeRateAnimationFrame=requestAnimationFrame(n)}cancelMarqueeRateAnimation(){this.marqueeRateAnimationFrame&&(cancelAnimationFrame(this.marqueeRateAnimationFrame),this.marqueeRateAnimationFrame=null)}get marqueeAnimation(){return this.hasMarqueeTrackTarget?this.marqueeTrackTarget.getAnimations()[0]:null}closeOnEscape(e){"Escape"===e.key&&this.closeMenu()}closeOnOutsideClick(e){this.menuOpen&&(this.headerTarget.contains(e.target)||this.closeMenu())}addParamsToSubscriptionLinks(){const{last_touch:e}=mt(),t=e.src,s=e.camp;(t||s)&&this.subscriptionLinkTargets.forEach(e=>{const r=new URL(e.getAttribute("href"),window.location.origin);t&&r.searchParams.set("src",t),s&&r.searchParams.set("camp",s),e.href=r.pathname+r.search+r.hash})}highlightCurrentLink(){const e=Array.from(this.element.querySelectorAll(".public-navbar__drawer-links a")),t=window.location.pathname;e.forEach(e=>e.classList.remove("is-active"));const s=e.find(e=>{const s=e.getAttribute("href");return"/"===s?"/"===t:"/cursos"===s?/aulas|cursos/.test(t):"/programas"===s?/programas|episodios/.test(t):"/doacao"===s?/doacao/.test(t):s&&t.startsWith(s)});s?.classList.add("is-active")}},{toString:di}=Object.prototype,{getPrototypeOf:ui}=Object,{iterator:hi,toStringTag:pi}=Symbol,gi=(e=>t=>{const s=di.call(t);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),mi=e=>(e=e.toLowerCase(),t=>gi(t)===e),fi=e=>t=>typeof t===e,{isArray:bi}=Array,yi=fi("undefined"),vi=mi("ArrayBuffer"),wi=fi("string"),Ti=fi("function"),ki=fi("number"),Ci=e=>null!==e&&"object"==typeof e,Si=e=>!0===e||!1===e,Li=e=>{if("object"!==gi(e))return!1;const t=ui(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||pi in e||hi in e)},Ai=e=>{if(!Ci(e)||bt(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},_i=mi("Date"),xi=mi("File"),Ei=mi("Blob"),Oi=mi("FileList"),Mi=e=>Ci(e)&&Ti(e.pipe),Ni=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ti(e.append)&&("formdata"===(t=gi(e))||"object"===t&&Ti(e.toString)&&"[object FormData]"===e.toString()))},Ri=mi("URLSearchParams"),[Bi,Fi,Pi,Ii]=["ReadableStream","Request","Response","Headers"].map(mi),Di=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),$i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,qi=e=>!yi(e)&&e!==$i,ji=(e,t,s,{allOwnKeys:r}={})=>(vt(t,(t,r)=>{s&&Ti(t)?Object.defineProperty(e,r,{value:ft(t,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ui=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),Vi=(e,t,s,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,
3configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),s&&Object.assign(e.prototype,s)},zi=(e,t,s,r)=>{let i,n,a;const o={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),n=i.length;n-- >0;)a=i[n],r&&!r(a,e,t)||o[a]||(t[a]=e[a],o[a]=!0);e=!1!==s&&ui(e)}while(e&&(!s||s(e,t))&&e!==Object.prototype);return t},Hi=(e,t,s)=>{e=String(e),(void 0===s||s>e.length)&&(s=e.length),s-=t.length;const r=e.indexOf(t,s);return-1!==r&&r===s},Wi=e=>{if(!e)return null;if(bi(e))return e;let t=e.length;if(!ki(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=e[t];return s},Ki=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&ui(Uint8Array)),Ji=(e,t)=>{const s=(e&&e[hi]).call(e);let r;for(;(r=s.next())&&!r.done;){const s=r.value;t.call(e,s[0],s[1])}},Gi=(e,t)=>{let s;const r=[];for(;null!==(s=e.exec(t));)r.push(s);return r},Xi=mi("HTMLFormElement"),Yi=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,s){return t.toUpperCase()+s}),Qi=(({hasOwnProperty:e})=>(t,s)=>e.call(t,s))(Object.prototype),Zi=mi("RegExp"),en=(e,t)=>{const s=Object.getOwnPropertyDescriptors(e),r={};vt(s,(s,i)=>{let n;!1!==(n=t(s,i,e))&&(r[i]=n||s)}),Object.defineProperties(e,r)},tn=e=>{en(e,(t,s)=>{if(Ti(e)&&-1!==["arguments","caller","callee"].indexOf(s))return!1;const r=e[s];Ti(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")}))})},sn=(e,t)=>{const s={},r=e=>{e.forEach(e=>{s[e]=!0})};return bi(e)?r(e):r(String(e).split(t)),s},rn=()=>{},nn=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,an=e=>{const t=new Array(10),s=(e,r)=>{if(Ci(e)){if(t.indexOf(e)>=0)return;if(bt(e))return e;if(!("toJSON"in e)){t[r]=e;const i=bi(e)?[]:{};return vt(e,(e,t)=>{const n=s(e,r+1);!yi(n)&&(i[t]=n)}),t[r]=void 0,i}}return e};return s(e,0)},on=mi("AsyncFunction"),cn=e=>e&&(Ci(e)||Ti(e))&&Ti(e.then)&&Ti(e.catch),ln=(ei="function"==typeof setImmediate,ti=Ti($i.postMessage),ei?setImmediate:ti?(si=`axios@${Math.random()}`,ri=[],$i.addEventListener("message",({source:e,data:t})=>{e===$i&&t===si&&ri.length&&ri.shift()()},!1),e=>{ri.push(e),$i.postMessage(si,"*")}):e=>setTimeout(e)),dn="undefined"!=typeof queueMicrotask?queueMicrotask.bind($i):"undefined"!=typeof process&&process.nextTick||ln,un=e=>null!=e&&Ti(e[hi]),hn={isArray:bi,isArrayBuffer:vi,isBuffer:bt,isFormData:Ni,isArrayBufferView:yt,isString:wi,isNumber:ki,isBoolean:Si,isObject:Ci,isPlainObject:Li,isEmptyObject:Ai,isReadableStream:Bi,isRequest:Fi,isResponse:Pi,isHeaders:Ii,isUndefined:yi,isDate:_i,isFile:xi,isBlob:Ei,isRegExp:Zi,isFunction:Ti,isStream:Mi,isURLSearchParams:Ri,isTypedArray:Ki,isFileList:Oi,forEach:vt,merge:Tt,extend:ji,trim:Di,stripBOM:Ui,inherits:Vi,toFlatObject:zi,kindOf:gi,kindOfTest:mi,endsWith:Hi,toArray:Wi,forEachEntry:Ji,matchAll:Gi,isHTMLForm:Xi,hasOwnProperty:Qi,hasOwnProp:Qi,reduceDescriptors:en,freezeMethods:tn,toObjectSet:sn,toCamelCase:Yi,noop:rn,toFiniteNumber:nn,findKey:wt,global:$i,isContextDefined:qi,isSpecCompliantForm:kt,toJSONObject:an,isAsyncFn:on,isThenable:cn,setImmediate:ln,asap:dn,isIterable:un},pn=class e extends Error{static from(t,s,r,i,n,a){const o=new e(t.message,s||t.code,r,i,n);return o.cause=t,o.name=t.name,a&&Object.assign(o,a),o}constructor(e,t,s,r,i){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),s&&(this.config=s),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:hn.toJSONObject(this.config),code:this.code,status:this.status}}};pn.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",pn.ERR_BAD_OPTION="ERR_BAD_OPTION",pn.ECONNABORTED="ECONNABORTED",pn.ETIMEDOUT="ETIMEDOUT",pn.ERR_NETWORK="ERR_NETWORK",pn.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",pn.ERR_DEPRECATED="ERR_DEPRECATED",pn.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",pn.ERR_BAD_REQUEST="ERR_BAD_REQUEST",pn.ERR_CANCELED="ERR_CANCELED",pn.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",pn.ERR_INVALID_URL="ERR_INVALID_URL";var gn=pn,mn=null,fn=hn.toFlatObject(hn,{},null,function(e){return/^is[A-Z]/.test(e)}),bn=_t,yn=Et.prototype;yn.append=function(e,t){this._pairs.push([e,t])},yn.toString=function(e){const t=e?function(t){return e.call(this,t,xt)}:xt;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var vn=Et,wn=class{constructor(){this.handlers=[]}use(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!s&&s.synchronous,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){hn.forEach(this.handlers,function(t){null!==t&&e(t)})}},Tn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}
3,kn={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:vn,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Cn={};Zs(Cn,{hasBrowserEnv:()=>Sn,hasStandardBrowserEnv:()=>An,hasStandardBrowserWebWorkerEnv:()=>_n,navigator:()=>Ln,origin:()=>xn});var Sn="undefined"!=typeof window&&"undefined"!=typeof document,Ln="object"==typeof navigator&&navigator||void 0,An=Sn&&(!Ln||["ReactNative","NativeScript","NS"].indexOf(Ln.product)<0),_n="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,xn=Sn&&window.location.href||"http://localhost",En={...Cn,...kn},On=Ft,Mn={transitional:Tn,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const s=t.getContentType()||"",r=s.indexOf("application/json")>-1,i=hn.isObject(e);i&&hn.isHTMLForm(e)&&(e=new FormData(e));if(hn.isFormData(e))return r?JSON.stringify(On(e)):e;if(hn.isArrayBuffer(e)||hn.isBuffer(e)||hn.isStream(e)||hn.isFile(e)||hn.isBlob(e)||hn.isReadableStream(e))return e;if(hn.isArrayBufferView(e))return e.buffer;if(hn.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let n;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Nt(e,this.formSerializer).toString();if((n=hn.isFileList(e))||s.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return bn(n?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),Pt(e)):e}],transformResponse:[function(e){const t=this.transitional||Mn.transitional,s=t&&t.forcedJSONParsing,r="json"===this.responseType;if(hn.isResponse(e)||hn.isReadableStream(e))return e;if(e&&hn.isString(e)&&(s&&!this.responseType||r)){const s=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(s){if("SyntaxError"===e.name)throw gn.from(e,gn.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:En.classes.FormData,Blob:En.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};hn.forEach(["delete","get","head","post","put","patch"],e=>{Mn.headers[e]={}});var Nn=Mn,Rn=hn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Bn=e=>{const t={};let s,r,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),s=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!s||t[s]&&Rn[s]||("set-cookie"===s?t[s]?t[s].push(r):t[s]=[r]:t[s]=t[s]?t[s]+", "+r:r)}),t},Fn=Symbol("internals"),Pn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),In=class{constructor(e){e&&this.set(e)}set(e,t,s){function r(e,t,s){const r=It(t);if(!r)throw new Error("header name must be a non-empty string");const n=hn.findKey(i,r);(!n||void 0===i[n]||!0===s||void 0===s&&!1!==i[n])&&(i[n||t]=Dt(e))}const i=this,n=(e,t)=>hn.forEach(e,(e,s)=>r(e,s,t));if(hn.isPlainObject(e)||e instanceof this.constructor)n(e,t);else if(hn.isString(e)&&(e=e.trim())&&!Pn(e))n(Bn(e),t);else if(hn.isObject(e)&&hn.isIterable(e)){let s,r,i={};for(const t of e){if(!hn.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[r=t[0]]=(s=i[r])?hn.isArray(s)?[...s,t[1]]:[s,t[1]]:t[1]}n(i,t)}else null!=e&&r(t,e,s);return this}get(e,t){if(e=It(e)){const s=hn.findKey(this,e);if(s){const e=this[s];if(!t)return e;if(!0===t)return $t(e);if(hn.isFunction(t))return t.call(this,e,s);if(hn.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=It(e)){const s=hn.findKey(this,e)
4;return!(!s||void 0===this[s]||t&&!qt(this,this[s],s,t))}return!1}delete(e,t){function s(e){if(e=It(e)){const s=hn.findKey(r,e);!s||t&&!qt(r,r[s],s,t)||(delete r[s],i=!0)}}const r=this;let i=!1;return hn.isArray(e)?e.forEach(s):s(e),i}clear(e){const t=Object.keys(this);let s=t.length,r=!1;for(;s--;){const i=t[s];e&&!qt(this,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,s={};return hn.forEach(this,(r,i)=>{const n=hn.findKey(s,i);if(n)return t[n]=Dt(r),void delete t[i];const a=e?jt(i):String(i).trim();a!==i&&delete t[i],t[a]=Dt(r),s[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return hn.forEach(this,(s,r)=>
4{null!=s&&!1!==s&&(t[r]=e&&hn.isArray(s)?s.join(", "):s)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const s=new this(e);return t.forEach(e=>s.set(e)),s}static accessor(e){function t(e){const t=It(e);s[t]||(Ut(r,e),s[t]=!0)}const s=(this[Fn]=this[Fn]={accessors:{}}).accessors,r=this.prototype;return hn.isArray(e)?e.forEach(t):t(e),this}};In.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),hn.reduceDescriptors(In.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[s]=e}}}),hn.freezeMethods(In);var Dn=In,$n=class extends gn{constructor(e,t,s){super(null==e?"canceled":e,gn.ERR_CANCELED,t,s),this.name="CanceledError",this.__CANCEL__=!0}},qn=Kt,jn=Jt,Un=(e,t,s=3)=>{let r=0;const i=qn(50,250);return jn(s=>{const n=s.loaded,a=s.lengthComputable?s.total:void 0,o=n-r,c=i(o);r=n;e({loaded:n,total:a,progress:a?n/a:void 0,bytes:o,rate:c||void 0,estimated:c&&a&&n<=a?(a-n)/c:void 0,event:s,lengthComputable:null!=a,[t?"download":"upload"]:!0})},s)},Vn=(e,t)=>{const s=null!=e;return[r=>t[0]({lengthComputable:s,total:e,loaded:r}),t[1]]},zn=e=>(...t)=>hn.asap(()=>e(...t)),Hn=En.hasStandardBrowserEnv?((e,t)=>s=>(s=new URL(s,En.origin),e.protocol===s.protocol&&e.host===s.host&&(t||e.port===s.port)))(new URL(En.origin),En.navigator&&/(msie|trident)/i.test(En.navigator.userAgent)):()=>!0,Wn=En.hasStandardBrowserEnv?{write(e,t,s,r,i,n,a){if("undefined"==typeof document)return;const o=[`${e}=${encodeURIComponent(t)}`];hn.isNumber(s)&&o.push(`expires=${new Date(s).toUTCString()}`),hn.isString(r)&&o.push(`path=${r}`),hn.isString(i)&&o.push(`domain=${i}`),!0===n&&o.push("secure"),hn.isString(a)&&o.push(`SameSite=${a}`),document.cookie=o.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}},Kn=e=>e instanceof Dn?{...e}:e,Jn=e=>{const t=Qt({},e);let{data:s,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:n,headers:a,auth:o}=t;if(t.headers=a=Dn.from(a),t.url=Mt(Yt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),hn.isFormData(s))if(En.hasStandardBrowserEnv||En.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(hn.isFunction(s.getHeaders)){const e=s.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,s])=>{t.includes(e.toLowerCase())&&a.set(e,s)})}if(En.hasStandardBrowserEnv&&(r&&hn.isFunction(r)&&(r=r(t)),r||!1!==r&&Hn(t.url))){const e=i&&n&&Wn.read(n);e&&a.set(i,e)}return t},Gn="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,s){function r(){u&&u(),h&&h(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}function i(){if(!f)return;const i=Dn.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Ht(function(e){t(e),r()},function(e){s(e),r()},{data:p&&"text"!==p&&"json"!==p?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:e,request:f}),f=null}const n=Jn(e);let a=n.data;const o=Dn.from(n.headers).normalize();let c,l,d,u,h,{responseType:p,onUploadProgress:g,onDownloadProgress:m}=n,f=new XMLHttpRequest;f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout,"onloadend"in f?f.onloadend=i:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(i)},f.onabort=function(){f&&(s(new gn("Request aborted",gn.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const r=t&&t.message?t.message:"Network Error",i=new gn(r,gn.ERR_NETWORK,e,f);i.event=t||null,s(i),f=null},f.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const r=n.transitional||Tn;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),s(new gn(t,r.clarifyTimeoutError?gn.ETIMEDOUT:gn.ECONNABORTED,e,f)),f=null},void 0===a&&o.setContentType(null),"setRequestHeader"in f&&hn.forEach(o.toJSON(),function(e,t){f.setRequestHeader(t,e)}),hn.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),p&&"json"!==p&&(f.responseType=n.responseType),m&&([d,h]=Un(m,!0),f.addEventListener("progress",d)),g&&f.upload&&([l,u]=Un(g),f.upload.addEventListener("progress",l),f.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(c=t=>{f&&(s(!t||t.type?new $n(null,e,f):t),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const b=Wt(n.url);b&&-1===En.protocols.indexOf(b)?s(new gn("Unsupported protocol "+b+":",gn.ERR_BAD_REQUEST,e)):f.send(a||null)})},Xn=(e,t)=>{const{length:s}=e=e?e.filter(Boolean):[];if(t||s){let s,r=new AbortController;const i=function(e){if(!s){s=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof gn?t:new $n(t instanceof Error?t.message:t))}};let n=t&&setTimeout(()=>{n=null,i(new gn(`timeout of ${t}ms exceeded`,gn.ETIMEDOUT))},t);const a=()=>
vendor: 4,127 bytes, line 4
4{e&&(n&&clearTimeout(n),n=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:o}=r;return o.unsubscribe=()=>hn.asap(a),o}},Yn=function*(e,t){let s=e.byteLength;if(!t||s<t)return void(yield e);let r,i=0;for(;i<s;)r=i+t,yield e.slice(i,r),i=r},Qn=async function*(e,t){for await(const s of Zn(e))yield*Yn(s,t)},Zn=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;yield s}}finally{await t.cancel()}},ea=(e,t,s,r)=>{const i=Qn(e,t);let n,a=0,o=e=>{n||(n=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await i.next();if(t)return o(),void e.close();let n=r.byteLength;if(s){let e=a+=n;s(e)}e.enqueue(new Uint8Array(r))}catch(e){throw o(e),e}},cancel:e=>(o(e),i.return())},{highWaterMark:2})},ta=65536,{isFunction:sa}=hn,ra=(({Request:e,Response:t})=>({Request:e,Response:t}))(hn.global),{ReadableStream:ia,TextEncoder:na}=hn.global,aa=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},oa=e=>{e=hn.merge.call({skipUndefined:!0},ra,e);const{fetch:t,Request:s,Response:r}=e,i=t?sa(t):"function"==typeof fetch,n=sa(s),a=sa(r);if(!i)return!1;const o=i&&sa(ia),c=i&&("function"==typeof na?(e=>t=>e.encode(t))(new na):async e=>new Uint8Array(await new s(e).arrayBuffer())),l=n&&o&&aa(()=>{let e=!1;const t=new s(En.origin,{body:new ia,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=a&&o&&aa(()=>hn.isReadableStream(new r("").body)),u={stream:d&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!u[e]&&(u[e]=(t,s)=>{let r=t&&t[e];if(r)return r.call(t);throw new gn(`Response type '${e}' is not supported`,gn.ERR_NOT_SUPPORT,s)})});const h=async e=>{if(null==e)return 0;if(hn.isBlob(e))return e.size;if(hn.isSpecCompliantForm(e)){const t=new s(En.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return hn.isArrayBufferView(e)||hn.isArrayBuffer(e)?e.byteLength:(hn.isURLSearchParams(e)&&(e+=""),hn.isString(e)?(await c(e)).byteLength:void 0)},p=async(e,t)=>{const s=hn.toFiniteNumber(e.getContentLength());return null==s?h(t):s};return async e=>{let{url:i,method:a,data:o,signal:c,cancelToken:h,timeout:g,onDownloadProgress:m,onUploadProgress:f,responseType:b,headers:y,withCredentials:v="same-origin",fetchOptions:w}=Jn(e),T=t||fetch;b=b?(b+"").toLowerCase():"text";let k=Xn([c,h&&h.toAbortSignal()],g),C=null;const S=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let L;try{if(f&&l&&"get"!==a&&"head"!==a&&0!==(L=await p(y,o))){let e,t=new s(i,{method:"POST",body:o,duplex:"half"});if(hn.isFormData(o)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,s]=Vn(L,Un(zn(f)));o=ea(t.body,ta,e,s)}}hn.isString(v)||(v=v?"include":"omit");const t=n&&"credentials"in s.prototype,c={...w,signal:k,method:a.toUpperCase(),headers:y.normalize().toJSON(),body:o,duplex:"half",credentials:t?v:void 0};C=n&&new s(i,c);let h=await(n?T(C,w):T(i,c));const g=d&&("stream"===b||"response"===b);if(d&&(m||g&&S)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=hn.toFiniteNumber(h.headers.get("content-length")),[s,i]=m&&Vn(t,Un(zn(m),!0))||[];h=new r(ea(h.body,ta,s,()=>{i&&i(),S&&S()}),e)}b=b||"text";let A=await u[hn.findKey(u,b)||"text"](h,e);return!g&&S&&S(),await new Promise((t,s)=>{Ht(t,s,{data:A,headers:Dn.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:C})})}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new gn("Network Error",gn.ERR_NETWORK,e,C),{cause:t.cause||t});throw gn.from(t,t&&t.code,e,C)}}},ca=new Map,la=e=>{let t=e&&e.env||{};const{fetch:s,Request:r,Response:i}=t,n=[r,i,s];let a,o,c=n.length,l=ca;for(;c--;)a=n[c],o=l.get(a),void 0===o&&l.set(a,o=c?new Map:oa(t)),l=o;return o},da=(la(),{http:mn,xhr:Gn,fetch:{get:la}});hn.forEach(da,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});var ua=e=>`- ${e}`,ha=e=>
4hn.isFunction(e)||null===e||!1===e,pa={getAdapter:Zt,adapters:da},ga="1.13.4",ma={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ma[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});var fa={};ma.transitional=function(e,t,s){function r(e,t){return"[Axios v"+ga+"] Transitional option '"+e+"'"+t+(s?". "+s:"")}return(s,i,n)=>{if(!1===e)throw new gn(r(i," has been removed"+(t?" in "+t:"")),gn.ERR_DEPRECATED);return t&&!fa[i]&&(fa[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(s,i,n)}},ma.spelling=function(e){return(t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};var ba={assertOptions:ss,validators:ma},ya=ba.validators,va=class{constructor(e){this.defaults=e||{},this.interceptors={request:new wn,response:new wn}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const s=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?s&&!String(e.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+s):e.stack=s}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Qt(this.defaults,t);const{transitional:s,paramsSerializer:r,headers:i}=t;void 0!==s&&ba.assertOptions(s,{silentJSONParsing:ya.transitional(ya.boolean),forcedJSONParsing:ya.transitional(ya.boolean),clarifyTimeoutError:ya.transitional(ya.boolean)},!1),null!=r&&(hn.isFunction(r)?t.paramsSerializer={serialize:r}:ba.assertOptions(r,{encode:ya.function,serialize:ya.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ba.assertOptions(t,{baseUrl:ya.spelling("baseURL"),withXsrfToken:ya.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=i&&hn.merge(i.common,i[t.method]);i&&hn.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=Dn.concat(n,i);const a=[];let o=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let d,u=0;if(!o){const e=[ts.bind(this),void 0];for(e.unshift(...a),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=a.length;let h=t;for(;u<d;){const e=a[u++],t=a[u++];try{h=e(h)}catch(e){t.call(this,e);break}}try{l=ts.call(this,h)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return Mt(Yt((e=Qt(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};hn.forEach(["delete","get","head","options"],function(e){va.prototype[e]=function(t,s){return this.request(Qt(s||{},{method:e,url:t,data:(s||{}).data}))}}),hn.forEach(["post","put","patch"],function(e){function t(t){return function(s,r,i){return this.request(Qt(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}va.prototype[e]=t(),va.prototype[e+"Form"]=t(!0)});var wa=va,Ta=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const s=this;this.promise.then(e=>{if(!s._listeners)return;let t=s._listeners.length;for(;t-- >0;)s._listeners[t](e);s._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{s.subscribe(e),t=e}).then(e);return r.cancel=function(){s.unsubscribe(t)},r}
4,e(function(e,r,i){s.reason||(s.reason=new $n(e,r,i),t(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},ka=Ta,Ca={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ca).forEach(([e,t])=>{Ca[t]=e});var Sa=Ca,La=ns(Nn);La.Axios=wa,La.CanceledError=$n,La.CancelToken=ka,La.isCancel=zt,La.VERSION=ga,La.toFormData=bn,La.AxiosError=gn,La.Cancel=La.CanceledError,La.all=function(e){return Promise.all(e)},La.spread=rs,La.isAxiosError=is,La.mergeConfig=Qt,La.AxiosHeaders=Dn,La.formToJSON=e=>On(hn.isHTMLForm(e)?new FormData(e):e),La.getAdapter=pa.getAdapter,La.HttpStatusCode=Sa,La.default=La;var Aa=La,{Axios:_a,AxiosError:xa,CanceledError:Ea,isCancel:Oa,CancelToken:Ma,VERSION:Na,all:Ra,Cancel:Ba,isAxiosError:Fa,spread:Pa,toFormData:Ia,AxiosHeaders:Da,HttpStatusCode:$a,formToJSON:qa,getAdapter:ja,mergeConfig:Ua}=Aa,Va=class extends Pr{static targets=["trigger","badge","panel","body","loading","error","list","pagination","previousPage","nextPage","pageLabel"];static values={url:String,label:String,unreadLabel:String,pageLabel:String};connect(){this.page=1,this.countTimer=window.setInterval(()=>this.refreshCount(),6e4)}disconnect(){window.clearInterval(this.countTimer),this.listRequest?.abort(),this.countRequest?.abort(),this.close()}toggle(e){"function"==typeof this.panelTarget.showModal&&(e.preventDefault(),this.panelTarget.open?this.close():(this.positionPanel(),this.panelTarget.showModal(),this.previousOverflow=document.body.style.overflow,document.body.style.overflow="hidden",this.triggerTarget.setAttribute("aria-expanded","true"),this.page=1,this.refresh()))}close(){this.panelTarget.open&&(document.body.style.overflow=this.previousOverflow||"",this.panelTarget.close())}closed(){document.body.style.overflow=this.previousOverflow||"",this.triggerTarget.setAttribute("aria-expanded","false"),this.triggerTarget.focus({preventScroll:!0})}outsideClick(e){if(e.target!==this.panelTarget)return;const t=this.panelTarget.getBoundingClientRect();e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom||this.close()}positionPanel(){const e=this.triggerTarget.getBoundingClientRect(),t=this.element.closest(".public-navbar__topbar"),s=(t?.getBoundingClientRect().bottom??e.bottom)+12,r=Math.max(12,window.innerWidth-e.right);this.panelTarget.style.setProperty("--notification-panel-right",`${r}px`),this.panelTarget.style.setProperty("--notification-panel-top",`${s}px`)}previousPage(){this.pagination?.previous_page&&(this.page=this.pagination.previous_page,this.refresh())}nextPage(){this.pagination?.next_page&&(this.page=this.pagination.next_page,this.refresh())}async refresh(){this.listRequest?.abort();const e=new AbortController;this.listRequest=e,this.bodyTarget.setAttribute("aria-busy","true"),this.loadingTarget.hidden=!1,this.errorTarget.hidden=!0,this.listTarget.hidden=!0,this.previousPageTarget.disabled=!0,this.nextPageTarget.disabled=!0;try{const{data:t}=await Aa.get(this.urlValue,{params:{page:this.page},headers:{Accept:"application/json"},signal:e.signal});if("string"!=typeof t.html)throw new Error("Invalid notification response");this.listTarget.innerHTML=t.html,this.listTarget.hidden=!1,this.bodyTarget.scrollTop=0,this.renderPagination(t.pagination),this.renderBadge(t.unread_count)}catch(e){if(Aa.isCancel(e))return;this.errorTarget.hidden=!1,this.paginationTarget.hidden=!0}finally{this.listRequest===e&&(this.loadingTarget.hidden=!0,this.bodyTarget.setAttribute("aria-busy","false"))}}renderPagination(e){this.pagination=e,this.page=e.current_page,this.paginationTarget.hidden=e.total_pages<=1,this.previousPageTarget.disabled=!e.previous_page,this.nextPageTarget.disabled=!e.next_page,this.pageLabelTarget.textContent=this.pageLabelValue.replace("%{current}",e.current_page).replace("%{total}",e.total_pages)}async refreshCount(){if(!document.hidden&&!this.countRequest){this.countRequest=new AbortController;try{const{data:e}=await Aa.get(this.urlValue,{params:{count_only:1},headers:{Accept:"application/json"},signal:this.countRequest.signal});this.renderBadge(e.unread_count)}catch(e){}finally{this.countRequest=null}}}renderBadge(e){const t=Number(e)||0;this.badgeTarget.hidden=0===t,this.badgeTarget.textContent=t>99?"99+":String(t),this.triggerTarget.setAttribute("aria-label",t>0?this.unreadLabelValue.replace("%{count}",t):this.labelValue)}},za=class extends Zr{static targets=["modal","overlay","input","results","categories","pagination","loading","emptyState","body","iconTemplates"];static values={category:{type:String,default:"all"},perPage:{type:Number,default:6}};connect(){this.rawResults={},this.filteredResults=[],this.currentPage=0,this.totalPages=0,this.selectedIndex=-1,this.debounceTimer=null,this.resetTimer=null,this.isOpen=!1,this.detectCurrentCategory(),this.bindKeyboardShortcuts(),this.detectOperatingSystem()}detectOperatingSystem(){const e=navigator.platform.toUpperCase().indexOf("MAC")>=0||navigator.userAgent.toUpperCase().indexOf("MAC")>=0,t=document.querySelectorAll(".public-navbar__search-shortcut--mac, .navbar-links__search-shortcut--mac"),s=document.querySelectorAll(".public-navbar__search-shortcut--windows, .navbar-links__search-shortcut--windows");t.forEach(t=>
4t.style.display=e?"flex":"none"),s.forEach(t=>t.style.display=e?"none":"flex")}disconnect(){this.unbindKeyboardShortcuts()}bindKeyboardShortcuts(){this.keydownHandler=this.handleGlobalKeydown.bind(this),document.addEventListener("keydown",this.keydownHandler)}unbindKeyboardShortcuts(){document.removeEventListener("keydown",this.keydownHandler)}handleGlobalKeydown(e){if((e.metaKey||e.ctrlKey)&&"k"===e.key)return e.preventDefault(),void this.toggle();if(this.isOpen)switch(e.key){case"Escape":this.close();break;case"ArrowDown":e.preventDefault(),this.navigateResults(1);break;case"ArrowUp":e.preventDefault(),this.navigateResults(-1);break;case"ArrowLeft":document.activeElement!==this.inputTarget&&(e.preventDefault(),this.previousPage());break;case"ArrowRight":document.activeElement!==this.inputTarget&&(e.preventDefault(),this.nextPage())}}detectCurrentCategory(){const e=window.location.pathname;e.startsWith("/blog")?this.preferredCategories=["posts"]:e.startsWith("/cursos")?this.preferredCategories=["courses","lessons"]:e.startsWith("/aulas")?this.preferredCategories=["lessons","courses"]:e.startsWith("/programas")?this.preferredCategories=["programs","episodes"]:e.startsWith("/episodios")?this.preferredCategories=["episodes","programs"]:e.startsWith("/loja")?this.preferredCategories=["products"]:e.startsWith("/biblia")?this.preferredCategories=["bible_verses","bible_books"]:e.startsWith("/oracoes")?this.preferredCategories=["prayers"]:this.preferredCategories=["all"],this.categoryValue=this.preferredCategories[0]}selectBestCategory(){for(const e of this.preferredCategories){if("all"===e)return void(this.categoryValue="all");if(this.getCategoryCount(e)>0)return void(this.categoryValue=e)}this.getCategoryCount("all")>0&&(this.categoryValue="all")}toggle(){this.isOpen?this.close():this.open()}open(){clearTimeout(this.resetTimer),this.isOpen=!0,this.modalTarget.classList.add("search-modal--open"),this.overlayTarget.classList.add("search-modal__overlay--visible"),document.body.style.overflow="hidden",setTimeout(()=>{this.inputTarget.focus()},100),this.updateCategorySelection()}close(){clearTimeout(this.debounceTimer),clearTimeout(this.resetTimer),this.isOpen=!1,this.modalTarget.classList.remove("search-modal--open"),this.overlayTarget.classList.remove("search-modal__overlay--visible"),document.body.style.overflow="",this.resetTimer=setTimeout(()=>{this.isOpen||this.resetSearch()},220)}resetSearch(){this.inputTarget.value="",this.rawResults={},this.filteredResults=[],this.currentPage=0,this.selectedIndex=-1,this.collapseBody(),this.hideLoading(),this.updateCategorySelection(),this.renderResults()}closeOnOverlay(e){e.target===this.overlayTarget&&this.close()}onInput(e){const t=e.target.value.trim();if(clearTimeout(this.debounceTimer),t.length<2)return this.rawResults={},this.filteredResults=[],this.currentPage=0,this.collapseBody(),this.updateCategorySelection(),void this.renderResults();this.debounceTimer=setTimeout(()=>{this.showLoading(),this.performSearch(t)},2e3)}onKeydown(e){if("Enter"===e.key){if(e.preventDefault(),this.selectedIndex>=0)return void this.selectCurrentResult();const t=this.inputTarget.value.trim();t.length>=2&&(clearTimeout(this.debounceTimer),this.showLoading(),this.performSearch(t))}}async performSearch(e){try{this.expandBody();const t=`/global_search?query=${encodeURIComponent(e)}&category=all`,s=await fetch(t),r=await s.json();this.rawResults=r.results||{},this.selectBestCategory(),this.updateCategorySelection(),this.applyFilter(),this.hideLoading(),this.renderResults()}catch(e){console.error("Search error:",e),this.hideLoading(),this.rawResults={},this.filteredResults=[],this.updateCategorySelection(),this.renderResults()}}expandBody(){this.hasBodyTarget&&this.bodyTarget.classList.add("search-modal__body--expanded")}collapseBody(){this.hasBodyTarget&&this.bodyTarget.classList.remove("search-modal__body--expanded")}applyFilter(){if("all"===this.categoryValue)this.filteredResults=this.flattenAllResults(this.rawResults);else{const e={posts:["posts"],courses:["courses"],programs:["programs"],products:["products"],lessons:["lessons"],episodes:["episodes"],bible_verses:["bible_verses"],bible_books:["bible_books"],prayers:["prayers"]}[this.categoryValue]||[];
4this.filteredResults=[],e.forEach(e=>{this.rawResults[e]&&Array.isArray(this.rawResults[e])&&this.filteredResults.push(...this.rawResults[e])})}this.currentPage=0,this.totalPages=Math.ceil(this.filteredResults.length/this.perPageValue),this.selectedIndex=-1}flattenAllResults(e){const t=[];return["posts","courses","lessons","episodes","programs","products","prayers","bible_books","bible_verses"].forEach(s=>{e[s]&&Array.isArray(e[s])&&t.push(...e[s])}),t}selectCategory(e){const t=e.currentTarget.dataset.category;0===this.getCategoryCount(t)&&"all"!==t||(this.categoryValue=t,this.updateCategorySelection(),this.applyFilter(),this.renderResults())}getCategoryCount(e){if("all"===e)return this.flattenAllResults(this.rawResults).length;const t={posts:["posts"],courses:["courses"],programs:["programs"],products:["products"],lessons:["lessons"],episodes:["episodes"],bible_verses:["bible_verses"],bible_books:["bible_books"],prayers:["prayers"]}[e]||[];let s=0;return t.forEach(e=>{this.rawResults[e]&&Array.isArray(this.rawResults[e])&&(s+=this.rawResults[e].length)}),s}updateCategorySelection(){if(!this.hasCategoriesTarget)return;const e=this.categoriesTarget.querySelectorAll("[data-category]"),t=Object.keys(this.rawResults).length>0,s=this.getCategoryCount("all");e.forEach(e=>{const r=e.dataset.category,i=this.getCategoryCount(r),n=r===this.categoryValue,a=t&&(0===s||0===i&&"all"!==r);e.classList.toggle("search-modal__category--active",n),e.classList.toggle("search-modal__category--disabled",a);let o=e.querySelector(".search-modal__category-count");t&&i>0?(o||(o=document.createElement("span"),o.className="search-modal__category-count",e.appendChild(o)),o.textContent=i>99?"99+":i):o&&o.remove()})}navigateResults(e){const t=this.getCurrentPageResults();0!==t.length&&(this.selectedIndex+=e,this.selectedIndex<0?this.selectedIndex=t.length-1:this.selectedIndex>=t.length&&(this.selectedIndex=0),this.updateResultSelection())}selectCurrentResult(){const e=this.getCurrentPageResults();if(this.selectedIndex>=0&&this.selectedIndex<e.length){const t=e[this.selectedIndex];window.location.href=t.url}}updateResultSelection(){this.resultsTarget.querySelectorAll(".search-modal__result-item").forEach((e,t)=>{e.classList.toggle("search-modal__result-item--selected",t===this.selectedIndex)})}getCurrentPageResults(){const e=this.currentPage*this.perPageValue,t=e+this.perPageValue;return this.filteredResults.slice(e,t)}previousPage(){this.currentPage>0&&(this.currentPage--,this.selectedIndex=-1,this.renderResults())}nextPage(){this.currentPage<this.totalPages-1&&(this.currentPage++,this.selectedIndex=-1,this.renderResults())}goToResult(e){const t=e.currentTarget.dataset.url;t&&(window.location.href=t)}showLoading(){this.hasLoadingTarget&&this.loadingTarget.classList.add("search-modal__loading--visible"),this.hasResultsTarget&&this.resultsTarget.classList.add("search-modal__results--loading"),this.disableAllCategories()}hideLoading(){this.hasLoadingTarget&&this.loadingTarget.classList.remove("search-modal__loading--visible"),this.hasResultsTarget&&this.resultsTarget.classList.remove("search-modal__results--loading")}disableAllCategories(){if(this.hasCategoriesTarget){this.categoriesTarget.querySelectorAll(".search-modal__category").forEach(e=>e.classList.add("search-modal__category--disabled"))}}renderResults(){if(!this.hasResultsTarget)return;const e=this.getCurrentPageResults();if(0===this.filteredResults.length){if(this.inputTarget.value.trim().length>=2){const e="all"===this.categoryValue?"":` em ${this.getCategoryLabel(this.categoryValue)}`;this.resultsTarget.innerHTML=`\n          <div class="search-modal__empty">\n            ${this.iconSvg("no_results","search-modal__empty-icon")}\n            <p>Nenhum resultado encontrado${e}</p>\n          </div>\n        `}else this.resultsTarget.innerHTML=`\n          <div class="search-modal__empty">\n            ${this.iconSvg("empty","search-modal__empty-icon")}\n            <p>Digite pelo menos 2 caracteres para pesquisar</p>\n          </div>\n        `;return void this.renderPagination()}const t=e.map((e,t)=>
4{const s=this.getTypeLabel(e.type),r=t===this.selectedIndex?"search-modal__result-item--selected":"";return`\n        <a href="${e.url}" class="search-modal__result-item ${r}" data-action="click->search-modal#goToResult" data-url="${e.url}">\n          <div class="search-modal__result-content">\n            <div class="search-modal__result-title">${this.escapeHtml(e.title)}</div>\n            ${e.subtitle?`<div class="search-modal__result-subtitle">${this.escapeHtml(e.subtitle)}</div>`:""}\n            ${e.course_name?`<div class="search-modal__result-meta">${this.escapeHtml(e.course_name)}</div>`:""}\n            ${e.program_name?`<div class="search-modal__result-meta">${this.escapeHtml(e.program_name)}</div>`:""}\n          </div>\n          <div class="search-modal__result-type">${s}</div>\n        </a>\n      `}).join("");this.resultsTarget.innerHTML=t,this.renderPagination()}renderPagination(){this.hasPaginationTarget&&(this.totalPages<=1?this.paginationTarget.innerHTML="":this.paginationTarget.innerHTML=`\n      <button class="search-modal__pagination-btn" data-action="click->search-modal#previousPage" ${0===this.currentPage?"disabled":""}>\n        ${this.iconSvg("previous","search-modal__pagination-icon")}\n      </button>\n      <span class="search-modal__pagination-info">\n        P\xe1gina ${this.currentPage+1} de ${this.totalPages}\n      </span>\n      <button class="search-modal__pagination-btn" data-action="click->search-modal#nextPage" ${this.currentPage===this.totalPages-1?"disabled":""}>\n        ${this.iconSvg("next","search-modal__pagination-icon")}\n      </button>\n    `)}getCategoryLabel(e){return{posts:"Artigos",courses:"Cursos",programs:"Programas",products:"Loja",lessons:"Aulas",episodes:"Epis\xf3dios",bible_verses:"Vers\xedculos",bible_books:"Livros da B\xedblia",prayers:"Ora\xe7\xf5es"}[e]||e}getTypeLabel(e){return{post:"Artigo",course:"Curso",program:"Programa",product:"Produto",lesson:"Aula",episode:"Epis\xf3dio",bible_verse:"Vers\xedculo",bible_book:"Livro",prayer:"Ora\xe7\xe3o"}[e]||e}iconSvg(e,t="search-modal__result-svg"){if(!this.hasIconTemplatesTarget)return"";const s=this.iconTemplatesTarget.querySelector(`template[data-search-modal-icon="${e}"]`),r=s?.content?.firstElementChild?.cloneNode(!0);return r?(r.setAttribute("class",t),r.setAttribute("aria-hidden","true"),r.setAttribute("focusable","false"),r.outerHTML):""}escapeHtml(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}},Ha=class extends Pr{connect(){this.element.dataset.nhFooterStimulusReady="true"}toggle(e){const t=e.currentTarget.closest("[data-nh-footer-section]");if(!t)return;const s=t.classList.toggle("is-open");e.currentTarget.setAttribute("aria-expanded",String(s))}},Wa=class extends Pr{static targets=["fullname","email","submitButton","message","honeypot"];connect(){this.emailPattern=/^[+_a-z0-9-'&=]+(\.[+_a-z0-9-']+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/i}async submit(e){e.preventDefault();const t=this.fullnameTarget.value.trim(),s=this.emailTarget.value.trim();if(this.validate(t,s)){this.setSubmitting(!0),this.setMessage("");try{if(!(await fetch("/send_newsletter",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-CSRF-Token":this.csrfToken},body:JSON.stringify({fullname:t,email:s,newsletter_company:this.honeypotTarget.value||""})})).ok)throw new Error("newsletter_request_failed");this.element.reset(),this.clearInputState(this.fullnameTarget),this.clearInputState(this.emailTarget),this.setMessage("E-mail registrado com sucesso. Muito obrigado!","success")}catch(e){
5this.setMessage("N\xe3o foi poss\xedvel enviar agora. Tente novamente em instantes.")}finally{this.setSubmitting(!1)}}}validate(e,t){const s=e.length>=5,r=this.emailPattern.test(t);return this.markInput(this.fullnameTarget,s),this.markInput(this.emailTarget,r),!(!s||!r)||(this.setMessage("Preencha nome e e-mail corretamente."),(s?this.emailTarget:this.fullnameTarget).focus(),!1)}markInput(e,t){e.classList.toggle("is-invalid",!t),e.classList.toggle("is-valid",t),e.setAttribute("aria-invalid",String(!t))}clearInputState(e){e.classList.remove("is-invalid","is-valid"),e.removeAttribute("aria-invalid")}setSubmitting(e){this.element.classList.toggle("is-submitting",e),this.submitButtonTarget.disabled=e,this.submitButtonTarget.textContent=e?"Enviando":"Enviar"}setMessage(e,t="error"){this.messageTarget.textContent=e,this.messageTarget.classList.toggle("is-success","success"===t),this.messageTarget.classList.toggle("is-error","error"===t&&e.length>0)}get csrfToken(){return document.querySelector('meta[name="csrf-token"]')?.getAttribute("content")||""}},Ka=[{name:"Banescard",bins:/^(603182)[0-9]{10,12}/,codeLength:3},{name:"Maxxvan",bins:/^(603182)[0-9]{10,12}/,codeLength:3},{name:"Cabal",bins:/^(604324|604330|604337|604203|604338)[0-9]{10,12}/,codeLength:3},{name:"GoodCard",bins:/^(606387|605680|605674|603574)[0-9]{10,12}/,codeLength:3},{name:"Elo",bins:/^(401178|401179|431274|438935|451416|457393|457631|457632|504175|627780|636297|636368|(506699|5067[0-6]\d|50677[0-8])|(50900\d|5090[1-9]\d|509[1-9]\d{2})|65003[1-3]|(65003[5-9]|65004\d|65005[0-1])|(65040[5-9]|6504[1-3]\d)|(65048[5-9]|65049\d|6505[0-2]\d|65053[0-8])|(65054[1-9]|6505[5-8]\d|65059[0-8])|(65070\d|65071[0-8])|65072[0-7]|(6509[0-9])|(65165[2-9]|6516[6-7]\d)|(65500\d|65501\d)|(65502[1-9]|6550[3-4]\d|65505[0-8]))[0-9]{10,12}/,codeLength:3},{name:"Diners",bins:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,codeLength:3},{name:"Discover",bins:/^6(?:011|5[0-9]{2}|4[4-9][0-9]{1}|(22(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[01][0-9]|92[0-5]$)[0-9]{10}$))[0-9]{12}$/,codeLength:4},{name:"Amex",bins:/^3[47][0-9]{13}$/,codeLength:4},{name:"Aura",bins:/^50[0-9]{14,17}$/,codeLength:3},{name:"Mastercard",bins:/^(603136|603689|608619|606200|603326|605919|608783|607998|603690|604891|603600|603134|608718|603680|608710|604998)|(5[1-5][0-9]{14}|2221[0-9]{12}|222[2-9][0-9]{12}|22[3-9][0-9]{13}|2[3-6][0-9]{14}
5|27[01][0-9]{13}|2720[0-9]{12})$/,codeLength:3},{name:"Visa",bins:/^4[0-9]{12}(?:[0-9]{3})?$/,codeLength:3},{name:"Hipercard",bins:/^(38[0-9]{17}|60[0-9]{14})$/,codeLength:3},{name:"JCB",bins:/^(?:2131|1800|35\d{3})\d{11}$/,codeLength:3}],Ja=function(e){return ps(e).name||"Credit card is invalid!"},Ga=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).cards,s=ls(e);return!(ds(e)||!cs(s))&&(us(gs(s))&&as(e,t))},Xa=class extends Zr{static targets=["visa","mastercard","hipercard","elo","amex","cardNumber"];connect(){this.hideCards()}insertCardBrand(){const e=this.cardNumberTarget.value;let t=Ja(e);Ga(e)?"Visa"==t?(this.hideCards(),this.visaTarget.classList.remove("hide-block")):"Mastercard"==t?(this.hideCards(),this.mastercardTarget.classList.remove("hide-block")):"Hipercard"==t?(this.hideCards(),this.hipercardTarget.classList.remove("hide-block")):"Elo"==t?(this.hideCards(),this.eloTarget.classList.remove("hide-block")):"Amex"==t&&(this.hideCards(),this.amexTarget.classList.remove("hide-block")):this.hideCards()}hideCards(){this.visaTarget.classList.add("hide-block"),this.mastercardTarget.classList.add("hide-block"),this.hipercardTarget.classList.add("hide-block"),this.eloTarget.classList.add("hide-block"),this.amexTarget.classList.add("hide-block")}},Ya=class extends Zr{static targets=["container","contentContainer","firstImage","imageContainer","link","secondImage","title"];#e;connect(){this.userOnCheckoutPage()||setTimeout(async()=>{const e=await this.fetchAdvertisements();if(!e)return;document.cookie.includes(`advertisementModalClosed_id-${this.#e}`)&&!1!==e.global||this.displayPopUpAd(e.popup_advertisements),e.post_advertisements&&this.insertAdOnPost(e.post_advertisements),e.episode_advertisements&&this.insertAdOnEpisode(e.episode_advertisements),e.prayer_advertisements&&this.insertAdOnPrayer(e.prayer_advertisements)},2e3)}insertAdOnPost(e){const t=document.querySelector(".post-content");if(!t)return;const s=Array.from(t.querySelectorAll("p")).filter(e=>!e.closest("aside"));if(s.length<3)return;const r=document.querySelector(".text-ad"),i=new Image;i.src=e.image_url,i.onload=()=>{s[2].insertAdjacentElement("afterend",r),r.classList.remove("hide-element")}}insertAdOnEpisode(e){const t=document.querySelector(".editor");if(!t)return;const s=Array.from(t.querySelectorAll("p")).filter(e=>!e.closest("aside"));if(s.length<3)return;const r=document.querySelector(".text-ad"),i=new Image;i.src=e.image_url,i.onload=()=>{s[2].insertAdjacentElement("afterend",r),r.classList.remove("hide-element")}}insertAdOnPrayer(e){const t=document.querySelector(".text-ad");if(!t)return;const s=new Image;s.src=e.image_url,s.onload=()=>{t.classList.remove("hide-element")}}displayPopUpAd(e){null!=e&&(this.renderAdvertisementContent(e),this.renderAdvertisementImage(e))}renderAdvertisementImage(e){const t=document.createElement("div");Object.assign(t.style,{backgroundImage:`url(${e.image_url})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",width:"100%"}),t.className="ads__image";const s=new Image;s.src=e.image_url,s.onload=()=>this.containerTarget.classList.add("active"),this.imageContainerTarget.appendChild(t)}renderAdvertisementContent(e){const t=(e,t,s={},r="")=>{const i=document.createElement(e);return t&&(i.className=t),Object.entries(s).forEach(([e,t])=>i.setAttribute(e,t)),r&&(i.textContent=r),i},s=t("div","ads__info"),r=t("div","ads__title",{"data-ads-target":"title"}),i=t("p","",{},e.title);r.appendChild(i),s.appendChild(r);const n=t("div","ads__buttons"),a=t("a","",{href:e.link,"data-ads-target":"link"}),o=t("button","modal-buy",{},e.call_to_action),c=t("button","modal-close",{"data-action":"click->ads#closeModal"},"Fechar");a.appendChild(o),n.append(a,c),this.contentContainerTarget.append(s,n),this.checkMobileAdvForMobile(e.link)}checkMobileAdvForMobile(e){if("https://bio.link/apppadrepauloricardo"==e){const e=/Android/i.test(navigator.userAgent),t=/iPhone|iPad|iPod/i.test(navigator.userAgent);e?this.linkTarget.href="https://play.google.com/store/apps/details?id=org.padrepauloricardo.app&hl=pt_BR":t&&(this.linkTarget.href="https://apps.apple.com/br/app/padre-paulo-ricardo/id1607579645")}}async fetchAdvertisements(){try{const e=window.location.pathname,t=await this.makeApiRequest("/advertisements",{url:e});if(!t.ok)throw new Error(`Erro HTTP! status: ${t.status}`);const s=await t.json();return s.popup_advertisements&&(this.#e=s.popup_advertisements.id),s||null}catch(e){return null}}getCsrfToken(){return document.querySelector('meta[name="csrf-token"]')?.getAttribute("content")}async makeApiRequest(e,t){const s={"Content-Type":"application/json","X-CSRF-Token":this.getCsrfToken()};return fetch(e,{method:"POST",headers:s,body:JSON.stringify(t)})}userOnCheckoutPage(){return!!(window.location.pathname.includes("minha_conta")||window.location.pathname.includes("minha_inscricao")||window.location.pathname.includes("checkout")||window.location.pathname.includes("doacao")||window.location.pathname.includes("loja"))}closeModal(){this.containerTarget.classList.remove("active"),this.storeClosedModalOnCookie()}
5storeClosedModalOnCookie(){let e=[],t=[`advertisementModalClosed_id-${this.#e}`],s=new Date;s.setDate(s.getDate()+1),e.push(t),document.cookie=`advertisementModalClosed_id-${this.#e}=${JSON.stringify(e)}; expires=${s.toUTCString()}; path=/`}},Qa={maxWidth:760,padding:32,card:{backgroundColor:"#0f172a"},background:{position:"center",overlay:35},headline:{placement:"middle_left",size:34,color:"#ffffff"},body:{placement:"middle_left",size:16,color:"#f8fafc"},button:{placement:"middle_left",style:"light"}},Za={...Qa,maxWidth:390,padding:24,headline:{...Qa.headline,placement:"bottom_center",size:26},body:{...Qa.body,placement:"bottom_center",size:14},button:{...Qa.button,placement:"bottom_center"}},eo={version:2,format:"landscape",customSize:{width:16,height:9},elements:{headline:!0,body:!0,button:!0},breakpoints:{desktop:Qa,mobile:Za}},to={landscape:760,portrait:390,rectangle:640,square:560,full_screen:960,custom:760},so={landscape:"16 / 9",portrait:"9 / 16",rectangle:"4 / 3",square:"1 / 1",full_screen:"16 / 9",custom:"16 / 9",desktop_wide:"16 / 9",mobile_portrait:"9 / 16"},ro={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center"},io={light:{background:"#ffffff",text:"#0f172a"},dark:{background:"#0f172a",text:"#ffffff"},accent:{background:"#8b5cf6",text:"#ffffff"}},no=["top_left","top_center","top_right","middle_left","middle_center","middle_right","bottom_left","bottom_center","bottom_right"],ao={left:"middle_left",center:"middle_center",right:"middle_right"},oo=["left","center","right"],co="/growth/decision",lo=[],uo=!1,ho="/growth/events",po=15e3,go='a[href]:not([disabled]):not([tabindex="-1"]),button:not([disabled]):not([tabindex="-1"]),textarea:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),[tabindex]:not([tabindex="-1"])',mo=class extends Zr{static targets=["shell","panel","title","body","cta","image","background","designOverlay","copy","actions","dismiss","buttonSlot"];static values={timerDelayMs:{type:Number,default:2e3},immediate:{type:Boolean,default:!1}};connect(){this.active=!0,this.triggers=[],this.modalShell=null,this.decision=null,this.isShown=!1,this.reducedMotionQuery=window.matchMedia("(prefers-reduced-motion: reduce)"),this.applyMotionPreference(),this.reducedMotionListener=()=>this.applyMotionPreference(),this.reducedMotionQuery.addEventListener("change",this.reducedMotionListener),$s(),this.loadDecisionAndArm()}disconnect(){this.active=!1,this.reducedMotionQuery.removeEventListener("change",this.reducedMotionListener),this.disarmTriggers(),this.teardownModal({skipDisarm:!0})}applyMotionPreference(){const e=this.hasShellTarget?this.shellTarget:this.element;e&&(this.reducedMotionQuery.matches?e.classList.add("growth-campaign-shell--no-motion"):e.classList.remove("growth-campaign-shell--no-motion"))}async loadDecisionAndArm(){let e=null;try{e=await Es()}catch{return}this.active&&this.isModalDecision(e)&&(this.decision=e,this.applyPayload(e.payload||{}),this.setupTriggers())}isModalDecision(e){return Boolean(e&&"modal"===e.placement&&e.payload)}get campaignId(){return this.decision?.campaign_id??this.decision?.id??null}get creativeId(){return this.decision?.creative?.id??this.decision?.payload?.id??null}get impressionToken(){return this.decision?.impression_token??null}applyPayload(e){const t=e.title??e.headline??"";if(this.hasTitleTarget&&(this.titleTarget.textContent=t),this.hasBodyTarget){const t=e.body_html??e.body??"";this.bodyTarget.innerHTML="string"==typeof t?t:""}if(this.hasCtaTarget){e.cta_url&&this.ctaTarget.setAttribute("href",e.cta_url);const t=e.cta_label??e.cta_text??"";this.ctaTarget.textContent="string"==typeof t?t:""}if(this.hasImageTarget){const t=e.image_url;t?(this.imageTarget.removeAttribute("hidden"),this.imageTarget.setAttribute("src",t),this.imageTarget.setAttribute("alt",e.image_alt||"")):(this.imageTarget.setAttribute("hidden",""),this.imageTarget.removeAttribute("src"))}this.applyDesign(e)}applyDesign(e){if(!e.design||"object"!=typeof e.design||!this.hasPanelTarget)return;const t=Ss(e.design),s=this.currentDesignBreakpoint(),r=t.breakpoints[s]||t.breakpoints.desktop,i=t.elements;if(this.panelTarget.classList.add("growth-campaign-modal__panel--designed"),this.panelTarget.dataset.growthFormat=t.format,this.panelTarget.dataset.growthBreakpoint=s,this.panelTarget.style.width=this.panelWidthFor(t.format,s,r.maxWidth),this.panelTarget.style.maxWidth=`${r.maxWidth}px`,this.panelTarget.style.aspectRatio=Ls(t,s),this.panelTarget.style.backgroundColor=r.card.backgroundColor,this.hasBackgroun
5dTarget){const t=e.image_url;t?(this.backgroundTarget.style.backgroundImage=`url("${t}")`,this.backgroundTarget.style.backgroundPosition=ro[r.background.position]||ro.center):this.backgroundTarget.style.backgroundImage=""}if(this.hasDesignOverlayTarget){const e=Math.min(Math.max(Number(r.background.overlay||0),0),80)/100;this.designOverlayTarget.style.backgroundColor=`rgba(15, 23, 42, ${e})`}if(this.hasTitleTarget&&(this.titleTarget.hidden=!i.headline,this.titleTarget.style.fontSize=`${Number(r.headline.size||34)}px`,this.titleTarget.style.color=r.headline.color||"#ffffff"),this.hasBodyTarget&&(this.bodyTarget.hidden=!i.body,this.bodyTarget.style.fontSize=`${Number(r.body.size||16)}px`,this.bodyTarget.style.color=r.body.color||"#f8fafc"),this.hasCtaTarget&&(this.ctaTarget.hidden=!i.button,this.ctaTarget.style.backgroundColor=r.button.backgroundColor,this.ctaTarget.style.color=r.button.textColor),this.hasDismissTarget&&this.dismissTarget.parentElement!==this.panelTarget&&this.panelTarget.appendChild(this.dismissTarget),this.hasCopyTarget&&_s(this.copyTarget,r.headline.placement,r.padding,{maxWidth:420}),this.hasActionsTarget&&this.hasCopyTarget&&this.hasButtonSlotTarget){!i.button||r.button.placement===r.headline.placement?(this.actionsTarget.parentElement!==this.copyTarget&&this.copyTarget.appendChild(this.actionsTarget),this.buttonSlotTarget.hidden=!0):(this.actionsTarget.parentElement!==this.buttonSlotTarget&&this.buttonSlotTarget.appendChild(this.actionsTarget),this.buttonSlotTarget.hidden=!1,_s(this.buttonSlotTarget,r.button.placement,r.padding))}}currentDesignBreakpoint(){return window.matchMedia("(max-width: 767px)").matches?"mobile":"desktop"}panelWidthFor(e,t,s){return`min(${"mobile"===t?"86vw":"full_screen"===e?"96vw":"92vw"}, ${s}px)`}setupTriggers(){this.disarmTriggers();const e=()=>{this.active&&!this.isShown&&(this.disarmTriggers(),this.revealModal())};if(this.immediateValue)return void e();const t=this.decision.trigger_types;(Array.isArray(t)&&t.length?t:["timer"]).forEach(t=>{if("timer"===t){const t=Us({delayMs:"number"==typeof this.decision.timer_delay_ms?this.decision.timer_delay_ms:this.timerDelayMsValue});this.triggers.push(t),t.arm(e)}else if("scroll"===t){const t=js({threshold:"number"==typeof this.decision.scroll_threshold?this.decision.scroll_threshold:.5});this.triggers.push(t),t.arm(e)}else if("exit_intent"===t){const t=qs({leaveClientYMax:"number"==typeof this.decision.exit_client_y_max?this.decision.exit_client_y_max:0});this.triggers.push(t),t.arm(e)}})}disarmTriggers(){this.triggers.forEach(e=>e.disarm()),this.triggers=[]}revealModal(){this.hasShellTarget&&this.hasPanelTarget&&(this.isShown=!0,this.shellTarget.classList.remove("hidden"),this.shellTarget.classList.add("growth-campaign-modal--visible"),this.shellTarget.setAttribute("aria-hidden","false"),Ps({type:"shown",campaign_id:this.campaignId,creative_id:this.creativeId,impression_token:this.impressionToken,path:window.location.pathname}),this.modalShell?.deactivate(),this.modalShell=zs({panel:this.panelTarget,onRequestClose:()=>this.dismiss()}),this.modalShell.activate())}dismiss(){this.isShown&&(Ps({type:"dismissed",campaign_id:this.campaignId,creative_id:this.creativeId,impression_token:this.impressionToken,path:window.location.pathname}),this.teardownModal())}teardownModal(e={}){const{skipDisarm:t=!1}=e;this.modalShell?.deactivate(),this.modalShell=null,this.isShown=!1,this.hasShellTarget&&(this.shellTarget.classList.remove("growth-campaign-modal--visible"),this.shellTarget.classList.add("hidden"),this.shellTarget.setAttribute("aria-hidden","true")),t||this.disarmTriggers()}containClick(e){e.stopPropagation()}recordCtaClick(){Ps({type:"clicked",campaign_id:this.campaignId,creative_id:this.creativeId,impression_token:this.impressionToken,path:window.location.pathname})}},fo=class extends Pr{connect(){console.log("controller on"),this.saveUrlParamsToCookies()}saveUrlParamsToCookies(){const e=["mgm_referral_code"],t=new URLSearchParams(window.location.search);e.forEach(e=>{const s=t.get(e);s&&this.setCookie(e,s,30)})}setCookie(e,t,s){let r="";if(s){const e=new Date;e.setTime(e.getTime()+24*s*60*60*1e3),r="; expires="+e.toUTCString()}document.cookie=e+"="+(encodeURIComponent(t)||"")+r+"; path=/"}},bo=Ws({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decode
5URIComponent)}},{path:"/"}),yo=class extends Zr{static targets=[];connect(){bo.get("mgm_referral_code")&&bo.remove("mgm_referral_code")}},vo={"basket-shopping-simple":{viewBox:"0 0 576 512",path:"M243.1 2.7c11.8 6.1 16.3 20.6 10.2 32.4L171.7 192l232.6 0L322.7 35.1c-6.1-11.8-1.5-26.3 10.2-32.4s26.2-1.5 32.4 10.2L458.4 192l36.1 0 49.5 0 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-20 0L476.1 463.5C469 492 443.4 512 414 512L162 512c-29.4 0-55-20-62.1-48.5L44 240l-20 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 49.5 0 36.1 0L210.7 12.9c6.1-11.8 20.6-16.3 32.4-10.2zM482.5 240l-389 0 53 211.9c1.8 7.1 8.2 12.1 15.5 12.1L414 464c7.3 0 13.7-5 15.5-12.1l53-211.9zM144 296a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zm264-24a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"},"trash-can-light":{viewBox:"0 0 448 512",path:"M164.2 39.5L148.9 64l150.3 0L283.8 39.5c-2.9-4.7-8.1-7.5-13.6-7.5l-92.5 0c-5.5 0-10.6 2.8-13.6 7.5zM311 22.6L336.9 64 384 64l32 0 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0 0 336c0 44.2-35.8 80-80 80l-224 0c-44.2 0-80-35.8-80-80L32 96 16 96C7.2 96 0 88.8 0 80s7.2-16 16-16l16 0 32 0 47.1 0L137 22.6C145.8 8.5 161.2 0 177.7 0l92.5 0c16.6 0 31.9 8.5 40.7 22.6zM64 96l0 336c0 26.5 21.5 48 48 48l224 0c26.5 0 48-21.5 48-48l0-336L64 96zm80 80l0 224c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0l0 224c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0l0 224c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16s16 7.2 16 16z"},"circle-check-light":{viewBox:"0 0 512 512",path:"M256 32a224 224 0 1 1 0 448 224 224 0 1 1 0-448zm0 480A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM363.3 203.3c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L224 297.4l-52.7-52.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l64 64c6.2 6.2 16.4 6.2 22.6 0l128-128z"},"location-dot-light":{viewBox:"0 0 384 512",path:"M352 192c0-88.4-71.6-160-160-160S32 103.6 32 192c0 15.6 5.4 37 16.6 63.4c10.9 25.9 26.2 54 43.6 82.1c34.1 55.3 74.4 108.2 99.9 140c25.4-31.8 65.8-84.7 99.9-140c17.3-28.1 32.7-56.3 43.6-82.1C346.6 229 352 207.6 352 192zm32 0c0 87.4-117 243-168.3 307.2c-12.3 15.3-35.1 15.3-47.4 0C117 435 0 279.4 0 192C0 86 86 0 192 0S384 86 384 192zm-240 0a48 48 0 1 0 96 0 48 48 0 1 0 -96 0zm48 80a80 80 0 1 1 0-160 80 80 0 1 1 0 160z"},sparkles:{viewBox:"0 0 512 512",path:"M327.5 85.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 128l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 128l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 64 426.8 7.5C425.1 3 420.8 0 416 0s-9.1 3-10.8 7.5L384 64 327.5 85.2zM9.3 240C3.6 242.6 0 248.3 0 254.6s3.6 11.9 9.3 14.5L26.3 277l8.1 3.7 .6 .3 88.3 40.8L164.1 410l.3 .6 3.7 8.1 7.9 17.1c2.6 5.7 8.3 9.3 14.5 9.3s11.9-3.6 14.5-9.3l7.9-17.1 3.7-8.1 .3-.6 40.8-88.3L346 281l.6-.3 8.1-3.7 17.1-7.9c5.7-2.6 9.3-8.3 9.3-14.5s-3.6-11.9-9.3-14.5l-17.1-7.9-8.1-3.7-.6-.3-88.3-40.8L217 99.1l-.3-.6L213 90.3l-7.9-17.1c-2.6-5.7-8.3-9.3-14.5-9.3s-11.9 3.6-14.5 9.3l-7.9 17.1-3.7 8.1-.3 .6-40.8 88.3L35.1 228.1l-.6 .3-8.1 3.7L9.3 240zm83 14.5l51.2-23.6c10.4-4.8 18.7-13.1 23.5-23.5l23.6-51.2 23.6 51.2c4.8 10.4 13.1 18.7 23.5 23.5l51.2 23.6-51.2 23.6c-10.4 4.8-18.7 13.1-23.5 23.5l-23.6 51.2-23.6-51.2c-4.8-10.4-13.1-18.7-23.5-23.5L92.3 254.6zM384 384l-56.5 21.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 448l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 448l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 384l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L384 384z"},"arrow-right-light":{viewBox:"0 0 448 512",path:"M443.3 267.3c6.2-6.2 6.2-16.4 0-22.6l-176-176c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6L393.4 240 16 240c-8.8 0-16 7.2-16 16s7.2 16 16 16l377.4 0L244.7 420.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0l176-176z"},"book-open-light":{viewBox:"0 0 576 512",path:"M156 32c44.6 0 89.7 8.6 132 22.6C330.3 40.6 375.4 32 420 32c55.4 0 107.2 14.6 128.9 21.6C565.7 59 576 74.5 576 91.1l0 311.5c0 26.9-25.1 44.8-49 40.6c-18.5-3.2-51.3-7.2-99-7.2c-58.9 0-97.8 24.3-111.2 34.1c-7.5 5.5-17.2 9.6-28.2 9.9c-.2 0-.5 0-.7 0l-.2 0-.3 0c-10.2 0-19.6-3.4-27-8.4C245.5 461.5 202 436 148 436c-45.2 0-80.1 4.4-100 7.7c-24 4-48-14.1-48-40.2L0 91.1C0 74.5 10.3 59 27.1 53.6C48.8 46.6 100.6 32 156 32zM304 440c20.3-13.5 63.1-36 124-36c49.5 0 84.1 4.2 104.4 7.6c2.5 .4 5.7-.3 8.2-2.3c2.2-1.8 3.4-4 3.4-6.8l0-311.5c0-3.5-2.1-6.1-4.9-7C518.6 77.5 470.5 64 420 64c-38.6 0-78.1 7.1-116 19l0 357zM272 83c-37.9-12-77.4-19-116-19C105.5 64 57.4 77.5 36.9 84c-2.8 .9-4.9 3.6-4.9 7l0 312.5c0 2.7 1.1 4.9 3.1 6.5c2.2 1.8 5.1 2.5 7.6 2.1c21.3-3.6 58-8.2 105.3-8.2c56.8 0 102.8 23.7 124 36.9L272 83z"},"check-light":{viewBox:"0 0 448 512",path:"M443.3 100.7c6.2 6.2 6.2 16.4 0 22.6l-272 272c-6.2 6.2-16.4 6.2-22.6 0l-144-144c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L160 361.4 420.7 100.7c6.2-6.2 16.4-6.2 22.6 0z"},"xmark-solid":{viewBox:"0 0 384 512",path:"M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"},"star-full":{viewBox:"0 0 576 512",path:"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"},"star-half":{viewBox:"0 0 576 512",path:"M309.5 13.5C305.5 5.2 297.1 0 287.9 0s-17.6 5.2-21.6 13.5L197.7 154.8 44.5 177.5c-9 1.3-16.5 7.6-19.3 16.3s-.5 18.1 5.9 24.5L142.2 328.4 116 483.9c-1.5 9 2.2 18.1 9.7 23.5s17.3 6 25.3 1.7l137-73.2 137 73.2c8.1 4.3 17.9 3.7 25.3-1.7s11.2-14.5 9.7-23.5L433.6 328.4 544.8 218.2c6.5-6.4 8.7-15.9 5.9-24.5s-10.3-14.9-19.3-16.3L378.1 154.8 309.5 13.5zM288 384.7l0-305.6 52.5 108.1c3.5 7.1 10.2 12.1 18.1 13.3l118.3 17.5L391 303c-5.5 5.5-8.1 13.3-6.8 21l20.2 119.6L299.2 387.5c-3.5-1.9-7.4-2.8-11.2-2.8z"},"star-empty":{viewBox:"0 0 576 512",path:"M287.9 0c9.2 0 17.6 5.2 21.6 13.5l68.6 141.3 153.2 22.6c9 1.3 16.5 7.6 19.3 16.3s.5 18.1-5.9 24.5L433.6 328.4l26.2 155.6c1.5 9-2.2 18.1-9.7 23.5s-17.3 6-25.3 1.7l-137-73.2L151 509.1c-8.1 4.3-17.9 3.7-25.3-1.7s-11.2-14.5-9.7-23.5l26.2-155.6L31.1 218.2c-6.5-6.4-8.7-15.9-5.9-24.5s10.3-14.9 19.3-16.3l153.2-22.6L266.3 13.5C270.4 5.2 278.7 0 287.9 0zm0 79L235.4 187.2c-3.5 7.1-10.2 12.1-18.1 13.3L99 217.9 184.9 303c5.5 5.5 8.1 13.3 6.8 21L171.4 443.7l105.2-56.2c7.1-3.8 15.6-3.8 22.6 0l105.2 56.2L384.2 324.1c-1.3-7.7 1.2-15.5 6.8-21l85.9-85.1L358.6 200.5c-7.8-1.2-14.6-6.1-18.1-13.3L287.9 79z"}},wo=5,To={displayStars(e){const t=this.setStarsToCorrectInterval(e)||0,s=Math.floor(t),r=t%1!=0,i=wo-s-(r?1:0),n=[];for(let e=0;e<s;e+=1)n.push(Js("star-full","full"));r&&n.push(Js("star-half","half"));for(let e=0;e<i;e+=1)n.push(Js("star-empty","empty"));return n.join("")},setStarsToCorrectInterval:e=>e>0&&e<.25?0:e>=.25&&e<.75?.5:e>=.75&&e<1.25?1:e>=1.25&&e<1.75?1.5:e>=1.75&&e<2.25?2:e>=2.25&&e<2.75?2.5:e>=2.75&&e<3.25?3:e>=3.25&&e<3.75?3.5:e>
5=3.75&&e<4.25?4:e>=4.25&&e<4.75?4.5:e>=4.75?5:0},ko=class extends Zr{static targets=["addToCartButton","addToCartButtonResponsive","bestsellerCarousel","bookIndexTitle","buyNowButton","carousel","carouselButton","carouselContainer","carouselWrapper","cart","cartButton","categoryFilters","chosenCategory","clickCarousel","description","descriptionHider","ebookIndexTitle","ebookList","filter","filterButton","fiveStar","forSubscription","gridTitle","imagesPage","mainContainer","pageArrows","pageArrowsResponsive","productCategory","productForSale","productId","productItem","productList","productName","productPrice","productRating","productsGridSection","productType","quantity","quantityBeforeCart","quantityForBook","questionary","rateProduct","ratingQea","readMoreButton","responsiveFilter","responsiveWall","scrollCarousel","stickyElement","stickyParent","storeBody","total","user","userRating"];#t=0;#s=0;#r=0;#i=0;#n=!1;#a(){requestAnimationFrame(()=>{const e=document.querySelector(".loading-image");e&&(e.style.opacity="0",setTimeout(()=>e.style.opacity="0",1e3),setTimeout(()=>e.remove(),1200))})}#o(){this.hasCarouselContainerTarget&&(this.mainContainerTarget.addEventListener("scroll",this.handleScroll.bind(this)),this.carouselContainerTarget.addEventListener("scroll",this.handleScrollFull.bind(this)))}connect(){this.loadCartIconOnNavBar(),this.renderCart(),this.refreshCartPricesIfNeeded();"/loja"!==window.location.pathname&&(this.isItemAvailable(),this.showSlide(this.#t),this.generateRatingStars(),this.handleProductDescription(),document.addEventListener("keydown",this.handleKeysInCarousel.bind(this)),this.#a(),setTimeout(()=>this.#o(),500)),this.generateRatingStars()}handleProductDescription(){this.hasDescriptionTarget&&(110==this.descriptionTarget.offsetHeight?(this.descriptionHiderTarget.classList.remove("hide-element"),this.readMoreButtonTarget.classList.remove("hide-element")):(this.descriptionHiderTarget.classList.add("hide-element"),this.readMoreButtonTarget.classList.add("hide-element")))}handleInstallmentsForFullPrice(){const e=this.totalTarget.innerText,t=parseFloat(e.replace("R$","").replace(".","").replace(",",".").trim());installmentsHelper.hasMinimumValueForInstallments(t)}handleKeysInCarousel(e){const t={37:()=>this.prevSlideFull(),39:()=>this.nextSlideFull(),32:()=>{e.preventDefault(),this.clickCarouselTarget.classList.contains("displaying")?this.closeCarousel(e):this.openCarousel()},27:()=>{this.clickCarouselTarget.classList.contains("displaying")&&this.closeCarousel(e)}},s=document.querySelector(".product-review-modal");!t[e.keyCode]||s&&!s.classList.contains("hide-element")||t[e.keyCode]()}removeSticky(){this.stickyElementTarget.classList.remove("left-sticky-card")}readMoreQeA(e){const t=e.target,s=window.pageYOffset||document.documentElement.scrollTop,r=t.getBoundingClientRect(),i=t.querySelector(".item-desc"),n=t.querySelector(".arrow_down_or_up"),a="2000px"===t.style.maxHeight,o=window.innerWidth>1020;t.style.maxHeight=a?"50px":"2000px",i.style.opacity=a?"0":"1",n.style.transform=a?"rotate(0deg)":"rotate(180deg)";const c=Date.now(),l=setInterval(()=>{Date.now()-c>=300?clearInterval(l):window.scrollBy(0,a?-1:1)},50);a||o||setTimeout(()=>{window.scrollTo({top:r.top+s-70,behavior:"smooth"})},900)}readMore(){const e=this.descriptionTarget.classList.contains("opened-description"),t=window.innerWidth>1020;e?this.closeDescription(t):this.openDescription(t);const s=Date.now(),r=setInterval(()=>{Date.now()-s>=500?clearInterval(r):window.scrollBy(0,e?-1:1)},50)}closeDescription(e){if(!e){const e=window.pageYOffset||document.documentElement.scrollTop,t=this.descriptionTarget.getBoundingClientRect();window.scrollTo({top:t.top+e-105,behavior:"smooth"})}this.descriptionTarget.classList.remove("opened-description"),this.descriptionTarget.style.maxHeight="110px",this.descriptionHiderTarget.style.opacity="1",this.readMoreButtonTarget.innerText="Ler mais",setTimeout(()=>{this.descriptionHiderTarget.style.display="block"},300),setTimeout(()=>{window.scrollBy(0,1)},360)}openDescription(e){this.descriptionTarget.classList.add("opened-description"),this.descriptionTarget.style.maxHeight="2000px",this.descriptionHiderTarget.style.opacity="0",this.readMoreButtonTarget.innerText="Mostrar menos";const t=window.pageYOffset||document.documentElement.scrollTop,s=this.descriptionTarget.getBoundingClientRect();e||setTimeout(()=>{window.scrollTo({top:s.top+t-120,behavior:"smooth"})},700),setTimeout(()=>{this.descriptionHiderTarget.style.display="none"},1e3)}scrollCarousel(e){const t="bestsellers"===e.target.parentElement.getAttribute("value"),s=window.innerWidth<=1190,r=window.innerWidth<=1420;let i;i=t?s?392:r?460:446:150;const n=i*("left"===e.target.getAttribute("value")?-1:1);(t?this.bestsellerCarouselTarget:this.scrollCarouselTarget).scrollBy({left:n,behavior:"smooth"})}startProductDetailsDrag(e){if(void 0===e.button||0===e.button){this.#n=!0,this.#r=e.pageX,this.#i=e.currentTarget.scrollLeft,e.currentTarget.classList.add("is-dragging");try{e.currentTarget.setPointerCapture?.(e.pointerId)}catch(e){}}}dragProductDetails(e){if(!this.#n)return;e.preventDefault();const t=e.pageX-this.#r;e.currentTarget.scrollLeft=this.#i-t}stopProductDetailsDrag(e){if(this.#n){this.#n=!1,e.currentTarget.classList.remove("is-dragging");try{e.currentTarget.releasePointerCapture?.(e.pointerId)}catch(e){}}}updateQuantityBeforeCart(e){let t=parseInt(this.quantityBeforeCartTarget.innerText,10);const s=parseInt(e.target.getAttribute("value"),10);(1===s||-1===s&&t>1)&&(this.quantityBeforeCartTarget.innerText=(t+s).toString())}filterByCategory(e){e.preventDefault();const t={Impressos:"book",Digitais:"ebook",Combos:"combo",Gratuito:"free","close-button":"recent_products"},s=(e.target.closest("a")||e.target).getAttribute("data-category")||t[e.target.firstElementChild?.innerText]||t[e.target.getAttribute("value")]||e.target.firstElementChild?.innerText;
5this.productItemTargets.forEach(e=>{const t=e.querySelectorAll(".product_category"),r=e.querySelectorAll(".product_type");let i=!1;t.forEach(e=>{e.value===s&&(i=!0)}),r.forEach(e=>{e.value===s&&(i=!0)}),e.classList.toggle("hide-element",!i&&"recent_products"!==s)}),this.openFilteredGrid()}openFilteredGrid(){const e=this.ebookListTarget,t=this.productsGridSectionTarget;Array.from(e.children).forEach(e=>{t.appendChild(e)}),this.ebookIndexTitleTarget.classList.add("hide-element")}closeFilteredGrid(){const e=this.ebookListTarget,t=this.productsGridSectionTarget;Array.from(t.children).forEach(t=>{"true"===t.querySelector(".for_subscription")?.value&&e.appendChild(t)}),this.ebookIndexTitleTarget.classList.remove("hide-element")}selectCategory(e){e.preventDefault();const t=this.storeBodyTarget.querySelector(".chosen-category");t&&t.remove();const s=document.createElement("div");s.classList.add("chosen-category"),s.setAttribute("data-store-cart-target","chosenCategory"),s.innerHTML=`\n      <div class="title-category">\n        ${e.target.innerText}\n      </div>\n      <div class="remove-category">\n        <a>\n          <span value="close-button" data-action="click->store-cart#resetCategories">${Ks("xmark-solid")}</span>\n        </a>\n      </div>\n    `,this.categoryFiltersTarget.append(s),this.gridTitleTarget.innerText="Produtos"}resetCategories(){this.productItemTargets.forEach(e=>{e.classList.remove("hide-element")}),this.chosenCategoryTarget.remove(),this.closeFilteredGrid(),this.gridTitleTarget.innerText="Livros e combos"}handleResponsiveFilter(){this.responsiveFilterTarget.classList.contains("activated-responsive-filter")?this.deactivateResponsiveFilter():this.activateResponsiveFilter()}deactivateResponsiveFilter(){this.responsiveWallTarget.style.opacity="0",this.filterTarget.style.transform="translateY(0)",setTimeout(()=>{this.responsiveFilterTarget.classList.remove("activated-responsive-filter")},500)}activateResponsiveFilter(){this.responsiveFilterTarget.classList.add("activated-responsive-filter"),setTimeout(()=>{this.responsiveWallTarget.style.opacity="1",this.filterTarget.style.transform="translateY(-98%)"},10)}preventScroll(e){e.preventDefault()}showSlide(e){if("true"!==productHasImages)return;const t=document.querySelectorAll(".carousel-item");this.#t=(e+t.length)%t.length,document.querySelector(".carousel-inner").style.transform=`translateX(${100*-this.#t}%)`}showSlideFullscreen(e){this.carouselContainerTarget.scrollLeft=e*this.carouselContainerTarget.offsetWidth}openCarousel(){this.clickCarouselTarget.classList.add("displaying"),this.carouselContainerTarget.style.scrollBehavior="auto",this.showSlideFullscreen(this.#t),setTimeout(()=>{document.querySelector(".carousel-wrapper").style.opacity="1",document.body.classList.add("no-scroll")},10)}selectPage(e){const t=this.imagesPageTargets.indexOf(e.target.parentElement);this.mainContainerTarget.scrollTo({left:t*this.carouselWrapperTarget.offsetWidth,behavior:"smooth"})}nextSlideFull(){this.changeSlide(1)}prevSlideFull(){this.changeSlide(-1)}changeSlide(e){const t=this.imagesPageTargets.length,s=(this.#s+e+t)%t;this.#s=s,this.updatePageSelection(s)}updatePageSelection(e){
6this.imagesPageTargets.forEach((t,s)=>t.classList.toggle("selected-page",s===e)),this.showSlideFullscreen(e);const t=e*this.carouselWrapperTarget.offsetWidth;this.mainContainerTarget.scrollTo({left:t,behavior:"smooth"}),this.#t=e}handleScroll(){this.updateScrollState(this.mainContainerTarget,this.carouselWrapperTarget.offsetWidth)}handleScrollFull(){this.updateScrollState(this.carouselContainerTarget,this.carouselContainerTarget.offsetWidth,!0)}updateScrollState(e,t,s=!1){const r=e.scrollLeft,i=Math.round(r/t);
6if(this.imagesPageTargets.forEach((e,t)=>{e.classList.toggle("selected-page",t===i)}),this.#t=i,this.#s=i,s){const e=this.mainContainerTarget,t=this.carouselWrapperTarget.offsetWidth,s=i*t;e.scrollTo({left:s,behavior:"smooth"})}}closeCarousel(e){(e.target.classList.contains("carousel-controls-full")||e.target.classList.contains("carousel_images-full")||e.target.classList.contains("controls-responsive")||e.target.classList.contains("carousel-item-full")||e.target.classList.contains("close-button")||27==e.keyCode||32==e.keyCode)&&(document.querySelector(".carousel-wrapper").style.opacity="0",document.body.classList.remove("no-scroll"),setTimeout(()=>{this.clickCarouselTarget.classList.remove("displaying")},500))}calculateAndDisplayTotalItems(){const e=JSON.parse(localStorage.getItem("cart"))||{},t=Object.values(e).reduce((e,t)=>e+t.quantity,0),s=document.querySelector(".cart-counter");s&&(t>0?(s.classList.remove("hide-element"),setTimeout(()=>s.classList.add("visible"),100),this.cartButtonTarget.classList.remove("disabled")):(s.classList.remove("visible"),setTimeout(()=>s.classList.add("hide-element"),500),this.cartButtonTarget.classList.add("disabled")))}loadCartIconOnNavBar(){if(document.querySelector(".public-navbar__cart-button"))return;const e=document.querySelector(".public-navbar__actions"),t=document.querySelector(".public-navbar__search");if(!e||!t)return;const s=document.createElement("li");s.className="public-navbar__action-item public-navbar__cart-item",s.innerHTML=`<a href="#" class="public-navbar__cart-button" data-action="click->public-navbar#toggleCart" aria-label="Abrir carrinho">\n                            ${Ks("basket-shopping-simple")}\n                            <span class="cart-counter hide-element" aria-hidden="true"></span>\n                          </a>`,e.insertBefore(s,t)}toggleCart(e){e.preventDefault(),document.querySelector(".cart-container").classList.contains("show-element")?this.closeCart():this.openCart()}closeCart(){document.querySelector(".cart-container").classList.remove("show-element"),this.showOverlay(!1),this.showChatbot(!0)}openCart(){document.querySelector(".cart-container").classList.add("show-element"),this.showOverlay(!0),this.showChatbot(!1)}showChatbot(e){const t=document.getElementById("launcher");t&&(1==e?t.classList.remove("hide-element"):t.classList.add("hide-element"))}showOverlay(e){e?document.querySelector(".cart-overlay").classList.add("show-overlay"):document.querySelector(".cart-overlay").classList.remove("show-overlay")}addProduct(e){e.preventDefault();const t=e.target.closest("form").dataset,s=String(t.id),r=t.name,i=t.url,n=t.product_type,a=t.image,o=t.pre_sale,c=t.pre_sale_delivery_date,l=this.productPriceTarget.getAttribute("value"),d=t.originalPrice||l,u=t.comboWithoutPhysicalProduct,h=parseInt(this.quantityTarget.value),p=JSON.parse(localStorage.getItem("cart"))||{},g=p[s]?parseInt(p[s].quantity):0,m=this.productForSaleTarget.value,f=Number(localStorage.getItem("orderCounter"))||1,b=this.hasQuantityBeforeCartTarget?parseInt(this.quantityBeforeCartTarget.innerText,10):0;if(this.isItemAvailable())return void alert("Voc\xea j\xe1 tem este item no carrinho. N\xe3o \xe9 permitido adicionar este mesmo item mais de uma vez.");if("false"===m&&"active"===gon.user.subscription_status)return void(window.location.href="/minha_conta/livros");const y=this.hasQuantityForBookTarget?b:h;localStorage.setItem("orderCounter",f+1),p[s]={id:s,name:r,price:l,originalPrice:d,comboWithoutPhysicalProduct:u,product_type:n,url:i,image:a,quantity:g+y,orderCounter:f,preSale:o,preSaleDeliveryDate:c},localStorage.setItem("cart",JSON.stringify(p));const v={content_name:r,value:parseFloat(l)*(g+y),currency:"BRL",num_items:g+y};"undefined"!=typeof gon&&gon.user&&(v.em=gon.user.email,v.fn=gon.user.name),"function"==typeof fbq&&fbq("track","AddToCart",v),"Comprar agora"!=e.target.innerText?(this.openCart(),this.renderCart(),this.isItemAvailable()):window.location.href="/checkout"}isItemAvailable(){const e=this.productForSaleTarget.value,t=this.productTypeTarget.value,s=JSON.parse(localStorage.getItem("cart"))||{},r=this.productIdTarget.value,i=s.hasOwnProperty(r);if("false"===e)return this.userHasSubscription();const n=document.querySelector(".show__add-to-cart");if(n&&"Fora de estoque"==n.innerText)return;const a=document.querySelector("form[data-combo-without-physical-product]")?.dataset.comboWithoutPhysicalProduct,o="combo"===t&&"true"===String(a);return"ebook"===t&&"false"==userHasEbookAccess||o?i?(this.addToCartButtonTargets.forEac
6h(e=>{e.innerText="O produto j\xe1 est\xe1 no carrinho",e.classList.add("disabled")}),this.buyNowButtonTarget.innerText="Abrir carrinho",this.buyNowButtonTarget.setAttribute("data-action","click->store-cart#openCart"),!0):(this.buyNowButtonTarget.innerText="Comprar agora",this.buyNowButtonTarget.setAttribute("data-action","click->store-cart#goToCheckout"),this.addToCartButtonTargets.forEach(e=>{e.classList.remove("disabled")}),!1):void 0}userHasSubscription(){const e=gon.user&&"active"===gon.user.subscription_status,t=e?"Ler agora":"Produto exclusivo para assinantes",s=e?"remove":"add";return this.addToCartButtonTargets.forEach(e=>{e.innerText=t,e.classList[s]("disabled")}),e||this.buyNowButtonTarget.remove(),e}removeProduct(e){const t=JSON.parse(localStorage.getItem("cart"))||{};delete t[e.target.dataset.id],localStorage.setItem("cart",JSON.stringify(t)),this.addToCartButtonTargets.forEach(e=>{e.innerHTML=`${Ks("basket-shopping-simple")} Adicionar ao carrinho`,e.classList.remove("disabled")}),this.renderCart()}async refreshCartPricesIfNeeded(){if("undefined"==typeof gon||!gon.user)return;const e=JSON.parse(localStorage.getItem("cart"))||{},t=Object.values(e).filter(e=>!["subscription","course"].includes(e.product_type)).map(e=>e.id);if(0!==t.length)try{const s=t.map(e=>`product_ids[]=${e}`).join("&"),r=await Aa.get(`/checkout/refresh_cart_prices?${s}`);let i=!1;r.data.forEach(({id:t,price:s,original_price:r})=>{const n=String(t);e[n]&&(Number(e[n].price)!==s&&(e[n].price=s,i=!0),null!=r&&Number(e[n].originalPrice)!==r&&(e[n].originalPrice=r,i=!0))}),i&&(localStorage.setItem("cart",JSON.stringify(e)),this.renderCart())}catch(e){console.error("Failed to refresh cart prices:",e)}}renderCart(){const e=JSON.parse(localStorage.getItem("cart"))||{},t=Object.values(e).sort((e,t)=>t.orderCounter-e.orderCounter);let s=0;const r=t.map(e=>{const{id:t,name:r,url:i,image:n,price:a,quantity:o,product_type:c}=e,l=a*o,d=l.toLocaleString("pt-BR",{style:"currency",currency:"BRL"});s+=l;const u=Number(e.originalPrice);let h="";if(u>a&&!isNaN(u)){h=`\n            <div class="checkout__product-original-line">\n              <span class="checkout__product-original-subtotal">${(u*o).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}</span>\n              <span class="checkout__product-discount-badge">\u2013${Math.round(100*(1-a/u))}%</span>\n            </div>`}return`\n        <li class="cart__product-item">\n          <div class="bookstore-cart__product-wrapper">\n            <div class="bookstore-cart__product-image checkout-item">\n              <img src="https://r2.padrepauloricardo.org/${n}">\n            </div>\n          </div>\n          <div class="cart__product-details">\n            <div class="cart__product-name"><a href="${i}">${r}</a></div>\n            <div class="checkout__product-prices-area">\n              ${h}\n              <div class="checkout__product-current-price">${d}</div>\n            </div>\n          </div>\n          <div class="cart__product-actions">\n            ${["book","physical_product"].includes(c)||"combo"===c&&"false"===String(e.comboWithoutPhysicalProduct)?`<div class="product-update-button">\n                    <span class="span-button" data-action="click->store-cart#updateQuantity" data-id="${t}" data-quantity="-1">-</span>\n                    ${o}\n                    <span class="span-button" data-action="click->store-cart#updateQuantity" data-id="${t}" data-quantity="1">+</span>\n                  </div>`:""}\n            <div class="cart__remove-btn" data-action="click->store-cart#removeProduct" data-id="${t}">\n              ${Ks("trash-can-light","store-svg-icon cart__remove-item-icon")}\n            </div>\n          </div>\n        </li>`}).join(""),i=s.toLocaleString("pt-BR",{style:"currency",currency:"BRL"});this.cartTarget.innerHTML=r,this.totalTarget.innerText=i,this.calculateAndDisplayTotalItems()}updateQuantity(e){e.preventDefault();const t=e.target.dataset.id,s=parseInt(e.target.dataset.quantity,10),r=JSON.parse(localStorage.getItem("cart"))||{};if(r[t]){const e=r[t].quantity+s;if(e<1)return;r[t].quantity=e,localStorage.setItem("cart",JSON.stringify(r)),this.renderCart()}}goToCheckout(e){"buyNowButton"===e.target.getAttribute("data-store-cart-target")&&this.addProduct(e);const t=window.location.search.slice(1);window.location.href="/checkout"+(t?"?"+t:"")}stopPropagation(e){e.stopPropagation()}rateProduct(e){e.preventDefault(),document.querySelector(".product-review-modal").classList.remove("hide-element");const t=document.getElementById("rating"),s=document.getElementById("rating-value");this.updateRatingValue(),t.addEventListener("input",()=>{const e=t.value;s.textContent=e.replace(/\./g,",")}),s.textContent=t.value.replace(/\./g,",")}closeWithOutsideFormClick(e){e.target.classList.contains("product-review-area")&&this.closeForm()}closeForm(){document.querySelector(".product-review-modal").classList.add("hide-element")}changeRate(){document.querySelector(".product-review__next-button").classList.remove("hide-element"),document.querySelector(".product-review__question-area").classList.remove("hide-element"),document.querySelector(".rating-input").classList.remove("hide-element"),document.querySelector(".product-review__ask-later").classList.remove("hide-element"),document.querySelector(".product-review__commentarea").classList.add("hide-element")}nextPage(){document.querySelector(".product-review__next-button").classList.add("hide-element"),document.querySelector(".product-review__question-area").classList.add("hide-element"),document.querySelector(".rating-input").classList.add("hide-element"),document.querySelector(".product-review__ask-later").classList.add("hide-element"),document.querySelector(".product-review__commentarea").classList.remove("hide-element")}updateRatingValue(){const e=document.getElementById("rating"),t=e.value/5*100;e.style.backgroundSize=`${t}% 100%`,document.querySelector(".stars-area").innerHTML=To.displayStars(e.value)}async submitData(){const e=document.querySelector(".current-rating"),t=document.querySelector(".product-review-form"),s=document.querySelector(".product-review__send-button"),r=this.formData(),i=r.body,n=r.headers;this.showErrorMessage(!1),this.freezeButton(!0),this.freezeForm(!0,t,s);const a=async(r,a)=>{try{const t=await Aa({url:r,method:a,data:i,headers:n});this.updateCurrentRating(e,i,t),this.showSuccess(!0)}catch(e){this.showErrorMessage(!0)}finally{this.freezeButton(!1),this.freezeForm(!1,t,s)}};if(e){const t=e.getAttribute("data-review-id");await a(`/product_reviews/${t}`,"put")}else await a("/product_reviews","post"),this.updateTotalReviews()}formData(){return{headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:{user_id:gon.user.id,product_id:gon.product_id,rating:Number(document.getElementById("rating").value),
6comment:document.querySelector(".product-review-form__textarea textarea").value}}}updateCurrentRating(e,t,s){const r=t.rating.toFixed(1).replace(".",",");if(e)e.querySelector(".rating-value").innerHTML=r;else{const e=document.createElement("div");e.className="current-rating",e.setAttribute("data-review-id",s.data.course_review_id),e.innerHTML=`Sua nota atual \xe9 <span class="rating-value">${r}</span>`,document.querySelector(".rating-input").appendChild(e)}}updateTotalReviews(){const e=document.querySelector(".all_reviews_rating_count");if(e){const t=parseInt(e.innerText.match(/\d+/)?.[0]||"0",10);e.innerText=`(${t+1} avalia\xe7\xf5es)`}}showSuccess(e){let t=document.querySelector(".product-review-form__input-area"),s=document.querySelector(".product-review__success-message");e?(t.classList.add("hide-element"),s.classList.remove("hide-element")):(this.changeRate(),t.classList.remove("hide-element"),s.classList.add("hide-element"))}showErrorMessage(e){const t=document.querySelector(".product-review-form__textarea");if(e){const e=document.createElement("div"),s=document.querySelector(".product-review__send-button");e.classList.add("product-review__error-message"),e.innerHTML="N\xe3o foi poss\xedvel enviar a avalia\xe7\xe3o",s.insertAdjacentElement("afterend",e),t.classList.add("fix-text-area-height")}else{const e=document.querySelector(".product-review__error-message");e&&e.remove(),t.classList.remove("fix-text-area-height")}}freezeButton(e){let t=document.querySelector(".product-review__send-button");e?(t.classList.add("fix-padding-for-loading-button"),t.setAttribute("disabled",!0),t.innerHTML="<div class='icon' style='margin-right: 0;'><svg width='80px'  height='30px'  xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' class='lds-ellipsis' style='background: none;'><!--circle(cx='16',cy='50',r='10')--><circle cx='84' cy='50' r='0' fill='#ffffff'><animate attributeName='r' values='13;0;0;0;0' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate><animate attributeName='cx' values='84;84;84;84;84' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate></circle><circle cx='49.9601' cy='50' r='13' fill='#ffffff'><animate attributeName='r' values='0;13;13;13;0' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='-0.8s'></animate><animate attributeName='cx' values='16;16;50;84;84' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='-0.8s'></animate></circle><circle cx='16' cy='50' r='12.9848' fill='#ffffff'><animate attributeName='r' values='0;13;13;13;0' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='-0.4s'></animate><animate attributeName='cx' values='16;16;50;84;84' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='-0.4s'></animate></circle><circle cx='84' cy='50' r='0.0152493' fill='#ffffff'><animate attributeName='r' values='0;13;13;13;0' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate><animate attributeName='cx' values='16;16;50;84;84' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate></circle><circle cx='83.9601' cy='50' r='13' fill='#ffffff'><animate attributeName='r' values='0;0;13;13;13' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate><animate attributeName='cx' values='16;16;16;50;84' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate></circle></svg></div>"):(t.classList.remove("fix-padding-for-loading-button"),t.removeAttribute("disabled"),t.innerHTML="Enviar")}
6freezeForm(e,t,s){e?(t.classList.add("no-events"),s.classList.remove("no-events")):t.classList.remove("no-events")}generateRatingStars(){this.fiveStarTargets.forEach(e=>{const t=e.parentElement.getAttribute("data-rate");e.innerHTML=To.displayStars(t)})}goToReviews(){const e=this.ratingQeaTarget.getBoundingClientRect(),t=window.pageYOffset||document.documentElement.scrollTop,s=window.innerWidth<=1020?85:.75*window.innerHeight-e.height/2;window.scrollTo({top:e.top+t-s,behavior:"smooth"}),setTimeout(()=>this.ratingQeaTarget.click(),900)}async acquireFreeEbook(e){if(e.preventDefault(),!gon.user||!gon.product_id)return void alert("Erro: usu\xe1rio ou produto n\xe3o encontrado");const t=gon.product_id,s=document.querySelector('meta[name="csrf-token"]')?.content;if(s)try{const e=await Aa.post("/minha_conta/livros/acquire_free_ebook",{product_id:t},{headers:{"Content-Type":"application/json","X-CSRF-Token":s}});200===e.status||201===e.status?window.location.href="/minha_conta/livros":alert("Erro ao adquirir o livro. Tente novamente.")}catch(e){console.error("Erro ao adquirir ebook:",e),e.response?.data?.error?alert(e.response.data.error):alert("Erro ao adquirir o livro. Tente novamente.")}else alert("Erro: token de seguran\xe7a n\xe3o encontrado")}},Co=class extends Pr{static targets=["drawer","overlay","toggle"];static values={open:Boolean};connect(){this.openValue&&this.open()}disconnect(){document.body.classList.remove("no-scroll")}async submit(e){e.preventDefault();const t=e.currentTarget,s=e.submitter||t.querySelector('[type="submit"]'),r="true"===t.dataset.legalEntityCartOpenOnSuccess,i=s?.dataset.legalEntityCartRedirectTo;s?.setAttribute("disabled","disabled");try{const e=await Aa.post(t.action,new FormData(t),{headers:{Accept:"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]')?.content}});if(i)return void window.location.assign(i);const s=this.replaceDrawer(e.data.drawer_html);this.updateCounter(e.data.total_quantity),r&&!1===s&&(this.drawerTarget.getBoundingClientRect(),this.open())}catch(e){this.showError(e.response?.data?.error||"N\xe3o foi poss\xedvel atualizar o carrinho.")}finally{s?.removeAttribute("disabled")}}toggle(){this.drawerTarget.classList.contains("show-element")?this.close():this.open()}changeProductQuantity(e){const t=e.currentTarget.closest("form"),s=t?.querySelector("[data-legal-entity-cart-quantity-input]"),r=t?.querySelector("[data-legal-entity-cart-quantity-label]");if(!s||!r)return;const i=Number(s.min)||1,n=Number(s.max)||Number.POSITIVE_INFINITY,a=Math.min(Math.max(Number(s.value)+Number(e.currentTarget.dataset.delta),i),n);s.value=a,r.textContent=a}scrollProductDetails(e){const t=this.element.querySelector(".product-details");if(!t)return;const s="left"===e.currentTarget.dataset.direction?-1:1;t.scrollBy({left:220*s,behavior:"smooth"})}open(){this.drawerTarget.classList.add("show-element"),this.overlayTarget.classList.add("show-overlay"),this.toggleTarget.setAttribute("aria-expanded","true"),document.body.classList.add("no-scroll")}close(){this.drawerTarget.classList.remove("show-element"),this.overlayTarget.classList.remove("show-overlay"),this.toggleTarget.setAttribute("aria-expanded","false"),document.body.classList.remove("no-scroll")}replaceDrawer(e){const t=document.createElement("template");t.innerHTML=e.trim();const s=t.content.querySelector('[data-legal-entity-cart-target="overlay"]'),r=t.content.querySelector('[data-legal-entity-cart-target="drawer"]');if(!s||!r)return null;const i=this.overlayTarget,n=this.drawerTarget,a=n.classList.contains("show-element"),o=n.querySelector(".cart__products-list")?.scrollTop||0;this.preserveProductImages(n,r),s.classList.toggle("show-overlay",a),r.classList.toggle("show-element",a),i.replaceWith(s),n.replaceWith(r);const c=r.querySelector(".cart__products-list");return c&&(c.scrollTop=o),this.toggleTarget.setAttribute("aria-expanded",a.toString()),document.body.classList.toggle("no-scroll",a),a}preserveProductImages(e,t){const s=e.querySelectorAll("[data-legal-entity-cart-product-id]"),r=Array.from(t.querySelectorAll("[data-legal-entity-cart-product-id]"));
6s.forEach(e=>{const t=r.find(t=>t.dataset.legalEntityCartProductId===e.dataset.legalEntityCartProductId),s=e.querySelector(".bookstore-cart__product-image"),i=t?.querySelector(".bookstore-cart__product-image");s&&i&&i.replaceWith(s)})}updateCounter(e){this.element.querySelector(".cart-counter")?.classList.toggle("visible",Number(e)>0)}showError(e){this.element.querySelector("[data-legal-entity-cart-error]")?.remove();const t=document.createElement("div"),s=document.createElement("div");t.dataset.legalEntityCartError="",t.className="mx-auto mt-6 max-w-7xl px-4 md:px-6",s.className="rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700",s.textContent=e,t.append(s),this.element.querySelector(".main-wrapper")?.before(t)}},So=class extends Zr{static targets=["fullname","fullname_warning","email","email_warning","btn","successMessageBox","wrapper","header","errorbox"];validateField(e){return"fullname"==e.name?void 0===e.value||null===e.value||""===e.value||e.value.length<5?(this.displayMessage(this.fullnameTarget,this.fullname_warningTarget,"Este campo deve ter mais de 5 letras."),!1):(this.hideMessage(this.fullnameTarget,this.fullname_warningTarget),!0):"email"==e.name?e.value.match(/^[\+_a-z0-9-'&=]+(\.[\+_a-z0-9-']+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/i)?(this.hideMessage(this.emailTarget,this.email_warningTarget),!0):(this.displayMessage(this.emailTarget,this.email_warningTarget,"Insira um e-mail v\xe1lido."),!1):void 0}displayMessage(e,t,s){e.classList.add("newsletter-form__input-error"),e.classList.remove("newsletter-form__input-success"),e.focus(),t.innerHTML=s,t.classList.add("newsletter-form__warning-show")}hideMessage(e,t){e.classList.remove("newsletter-form__input-error"),e.classList.add("newsletter-form__input-success"),t.innerHTML="",t.classList.remove("newsletter-form__warning-show")}validateFullname(){this.validateField(this.fullnameTarget)}validateEmail(){this.validateField(this.emailTarget)}freezeForm(){this.fullnameTarget.disabled=!0,this.emailTarget.disabled=!0,this.btnTarget.disabled=!0}showError(){this.fullnameTarget.disabled=!1,this.emailTarget.disabled=!1,this.btnTarget.disabled=!1,this.btnTarget.innerHTML="Enviar",this.errorboxTarget.innerHTML="Preencha os dados corretamente.",this.errorboxTarget.classList.add("newsletter-form__warning-show")}hideError(){this.errorboxTarget.innerHTML="",this.errorboxTarget.classList.remove("newsletter-form__warning-show")}showSuccess(){this.wrapperTarget.classList.add("nl-opacity-0"),this.wrapperTarget.classList.add("nl-display-none"),this.successMessageBoxTarget.classList.add("newsletter-form__message-show"),setTimeout(()=>{this.resetForm(),this.successMessageBoxTarget.classList.remove("newsletter-form__message-show"),this.wrapperTarget.classList.remove("nl-opacity-0"),this.headerTarget.classList.remove("nl-opacity-0"),this.wrapperTarget.classList.remove("nl-display-none")},5e3)}resetForm(){this.fullnameTarget.value="",this.fullnameTarget.disabled=!1,this.emailTarget.value="",this.emailTarget.disabled=!1,this.btnTarget.disabled=!1,this.btnTarget.innerHTML="Enviar",this.errorboxTarget.innerHTML="",this.errorboxTarget.classList.remove("newsletter-form__warning-show")}showLoading(){this.btnTarget.innerHTML='<div class="icon"><svg width="80px"  height="30px"  xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-ellipsis adjust-btn" style="background: none;"><!--circle(cx="16",cy="50",r="10")--><circle cx="84" cy="50" r="0" fill="#ffffff"><animate attributeName="r" values="13;0;0;0;0" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="cx" values="84;84;84;84;84" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="0s"></animate></circle><circle cx="49.9601" cy="50" r="13" fill="#ffffff"><animate attributeName="r" values="0;13;13;13;0" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;
60 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="-0.8s"></animate><animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="-0.8s"></animate></circle><circle cx="16" cy="50" r="12.9848" fill="#ffffff"><animate attributeName="r" values="0;13;13;13;0" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="-0.4s"></animate><animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="-0.4s"></animate></circle><circle cx="84" cy="50" r="0.0152493" fill="#ffffff"><animate attributeName="r" values="0;13;13;13;0" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="0s"></animate></circle><circle cx="83.9601" cy="50" r="13" fill="#ffffff"><animate attributeName="r" values="0;0;13;13;13" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="cx" values="16;16;16;50;84" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="0s"></animate></circle></svg></div>'}formData(){return{fullname:this.fullnameTarget.value,email:this.emailTarget.value,token:document.querySelector("#recaptcha_token").value}}formSubmit(e){e.preventDefault();const t=this;if(this.validateField(this.fullnameTarget)&&this.validateField(this.emailTarget)){executeRecaptcha(),this.freezeForm(),this.hideError(),this.showLoading();let e=this.formData();setTimeout(()=>{Aa.post("/send_newsletter",e).then(function(){t.showSuccess()}).catch(function(){t.showError()})},3e3)}return!1}},Lo=class extends Zr{static targets=[];connect(){this.loadCookieConsentLibrary()}loadCookieConsentLibrary(){if(window.initCookieConsent)return;const e=document.createElement("script")
7;e.textContent='\n/*\n CookieConsent v2.4.7\n https://www.github.com/orestbida/cookieconsent\n Author Orest Bida\n Released under the MIT License\n*/\n(function(){function na(za){function oa(a,b){return a.classList?a.classList.contains(b):!!a.className.match(new RegExp("(\\\\s|^)"+b+"(\\\\s|$)"))}function ha(a,b){a.classList?a.classList.remove(b):a.className=a.className.replace(new RegExp("(\\\\s|^)"+b+"(\\\\s|$)")," ")}function C(a,b){a.classList?a.classList.add(b):oa(a,b)||(a.className+=" "+b)}function Z(a){if("object"===typeof a){var b=[],c=0;for(b[c++]in a);return b}}function I(a,b,c,d){a.addEventListener?d?a.addEventListener(b,c,{passive:!0}):a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)}function ca(a,b,c){if("one"===b)var d=(d=document.cookie.match("(^|;)\\\\s*"+a+"\\\\s*=\\\\s*([^;]+)"))?c?d.pop():a:"";else if("all"===b)for(a=document.cookie.split(/;\\s*/),d=[],b=0;b<a.length;b++)d.push(a[b].split("=")[0]);return d}function pa(){if(qa){var a=document.querySelectorAll("script[data-cookiecategory]"),b=ra,c=JSON.parse(J).level||[],d=function(f,h){if(h<f.length){var k=f[h],l=k.getAttribute("data-cookiecategory");if(-1<M(c,l)){k.type="text/javascript";k.removeAttribute("data-cookiecategory");l=k.getAttribute("data-src");var g=e("script");g.textContent=k.innerHTML;(function(m,r){for(var w=r.attributes,B=w.length,N=0;N<B;N++)r=w[N],m.setAttribute(r.nodeName,r.nodeValue)})(g,k);l?g.src=l:l=k.src;l&&(b?g.readyState?g.onreadystatechange=function(){if("loaded"===g.readyState||"complete"===g.readyState)g.onreadystatechange=null,d(f,++h)}:g.onload=function(){g.onload=null;d(f,++h)}:l=!1);k.parentNode.replaceChild(g,k);if(l)return}d(f,++h)}};d(a,0)}}function Aa(a){function b(d,f,h,k,l,g,m){g=g&&g.split(" ")||[];if(-1<M(f,l)&&(C(d,l),-1<M(h,g[0])))for(f=0;f<g.length;f++)C(d,g[f]);-1<M(k,m)&&C(d,m)}if("object"===typeof a){var c=a.consent_modal;a=a.settings_modal;Q&&c&&b(z,["box","bar","cloud"],["top","bottom"],["zoom","slide"],c.layout,c.position,c.transition);a&&b(D,["bar"],["left","right"],["zoom","slide"],a.layout,a.position,a.transition)}}function Ba(){var a=!1,b=!1;I(document,"keydown",function(c){c=c||window.event;
7"Tab"===c.key&&(u&&(c.shiftKey?document.activeElement===u[0]&&(u[1].focus(),c.preventDefault()):document.activeElement===u[1]&&(u[0].focus(),c.preventDefault()),b||aa||(b=!0,!a&&c.preventDefault(),c.shiftKey?u[3]?u[2]?u[2].focus():u[0].focus():u[1].focus():u[3]?u[3].focus():u[0].focus())),!b&&(a=!0))});document.contains&&I(L,"click",function(c){c=c||window.event;ia?O.contains(c.target)?aa=!0:(t.hideSettings(0),aa=!1):ba&&z.contains(c.target)&&(aa=!0)},!0)}function e(a){var b=document.createElement(a);"button"===a&&b.setAttribute("type",a);return b}function M(a,b){for(var c=a.length,d=0;d<c;d++)if(a[d]==b)return d;return-1}function Ca(a,b){if("string"!==typeof a||""==a||document.getElementById("cc--style"))b();else{var c=e("style");c.id="cc--style";var d=new XMLHttpRequest;d.onreadystatechange=function(){4==this.readyState&&200==this.status&&(c.setAttribute("type","text/css"),c.styleSheet?c.styleSheet.cssText=this.responseText:c.appendChild(document.createTextNode(this.responseText)),document.getElementsByTagName("head")[0].appendChild(c),b())};d.open("GET",a);d.send()}}function da(a,b){var c=document.querySelectorAll(".c-tgl")||[],d="",f=[],h=!1;if(0<c.length){switch(b){case -1:for(b=0;b<c.length;b++)c[b].checked?(d+=\'"\'+c[b].value+\'",\',E[b]||(f.push(c[b].value),E[b]=!0)):E[b]&&(f.push(c[b].value),E[b]=!1);break;case 0:for(b=0;b<c.length;b++)c[b].disabled?(d+=\'"\'+c[b].value+\'",\',E[b]=!0):(c[b].checked=!1,E[b]&&(f.push(c[b].value),E[b]=!1));break;case 1:for(b=0;b<c.length;b++)c[b].checked=!0,d+=\'"\'+c[b].value+\'",\',E[b]||f.push(c[b].value),E[b]=!0}d=d.slice(0,-1);if(a.autoclear_cookies&&R&&0<f.length){c=a.languages[F].settings_modal.blocks;b=c.length;var k=-1,l=ca("","all"),g=[S,"."+S];if("www."===S.slice(0,4)){var m=S.substr(4);g.push(m);g.push("."+m)}for(m=0;m<b;m++){var r=c[m];if(r.hasOwnProperty("toggle")&&!E[++k]&&r.hasOwnProperty("cookie_table")&&-1<M(f,r.toggle.value)){var w=r.cookie_table,B=Z(a.languages[F].settings_modal.cookie_table_headers[0])[0],N=w.length;"on_disable"===r.toggle.reload&&(h=!0);for(var K=0;K<N;K++){var n=w[K],G=[],v=n[B],q=n.is_regex||!1,p=n.domain||null;n=n.path||!1;p&&(g=[p,"."+p]);if(q)for(q=0;q<l.length;q++)l[q].match(v)&&G.push(l[q]);else v=M(l,v),-1<v&&G.push(l[v]);if(0<G.length){v=g;n=n?n:"/";for(q=0;q<G.length;q++)for(p=0;p<v.length;p++)document.cookie=G[q]+"=; Path="+n+"; Domain="+v[p]+"; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";"on_clear"===r.toggle.reload&&(h=!0)}}}}}}J=\'{"level": [\'+d+"]}";if(!R||0<f.length)d=ea,c=J,b=new Date,b.setTime(b.getTime()+864E5*sa),d=d+"="+(c||"")+("; expires="+b.toUTCString())+"; Path="+ta+";",d+=" SameSite="+ua+";",-1<location.hostname.indexOf(".")&&(d+=" Domain="+S+";"),"https:"===location.protocol&&(d+=" Secure;"),document.cookie=d;pa();if("function"===typeof a.onAccept&&!R)return R=!0,a.onAccept(JSON.parse(J));if("function"===typeof a.onChange&&0<f.length)a.onChange(JSON.parse(J));h&&window.location.reload()}function Da(a,b){L=e("div");L.id="cc--main";L.style.position="fixed";L.style.zIndex="1000000";L.innerHTML=\'\\x3c!--[if lt IE 9 ]><div id="cc_div" class="cc_div ie"></div><![endif]--\\x3e\\x3c!--[if (gt IE 8)|!(IE)]>\\x3c!--\\x3e<div id="cc_div" class="cc_div"></div>\\x3c!--<![endif]--\\x3e\';var c=L.children[0],d=F,f="string"===typeof T.textContent?"textContent":"innerText";if(!a){z=e("div");var h=e("div"),k=e("div"),l=e("div"),g=e("div"),m=e("div"),r=e("button"),w=e("button"),B=e("div");z.id="cm";h.id="c-inr";k.id="c-inr-i";l.id="c-ttl";g.id="c-txt";m.id="c-bns";r.id="c-p-bn";w.id="c-s-bn";B.id="cm-ov";r.className="c-bn";w.className="c-bn c_link";l.setAttribute("role","heading");l.setAttribute("aria-level","2");z.setAttribute("role","dialog");z.setAttribute("aria-modal","true");z.setAttribute("aria-hidden","false");z.setAttribute("aria-labelledby","c-ttl");z.setAttribute("aria-describedby","c-txt");z.style.visibility=B.style.visibility="hidden";B.style.opacity=0;l.insertAdjacentHTML("beforeend",b.languages[d].consent_modal.title);g.insertAdjacentHTML("beforeend",b.languages[d].consent_modal.description);r[f]=b.languages[d].consent_modal.primary_btn.text;w[f]=b.languages[d].consent_modal.secondary_btn.text;var N=-1;"accept_all"==b.languages[d].consent_modal.primary_btn.role&&(N=1);I(r,"click",function(){t.hide();da(b,N)});"accept_necessary"==b.languages[d].consent_modal.secondary_btn.role?I(w,"click",function(){t.hide();da(b,0)}):I(w,"click",function(){t.showSettings(0)});k.appendChild(l);k.appendChild(g);m.appendChild(r);m.appendChild(w);h.appendChild(k);h.appendChild(m);z.appendChild(h);c.appendChild(z);c.appendChild(B)}D=e("div");h=e("div");k=e("div");l=e("div");O=e("div");g=e("div");m=e("div");var K=e("button");r=e("div");w=e("div");B=e("div");D.id="s-cnt";h.id="c-vln";
7l.id="c-s-in";k.id="cs";g.id="s-ttl";O.id="s-inr";m.id="s-hdr";w.id="s-bl";K.id="s-c-bn";B.id="cs-ov";r.id="s-c-bnc";K.className="c-bn";K.setAttribute("aria-label",b.languages[d].settings_modal.close_btn_label||"Close");D.setAttribute("role","dialog");D.setAttribute("aria-modal","true");D.setAttribute("aria-hidden","true");D.setAttribute("aria-labelledby","s-ttl");g.setAttribute("role","heading");D.style.visibility=B.style.visibility="hidden";B.style.opacity=0;r.appendChild(K);I(h,"keydown",function(U){U=U||window.event;27==U.keyCode&&t.hideSettings(0)},!0);I(K,"click",function(){t.hideSettings(0)});d=b.languages[F].settings_modal.blocks;K=d.length;g.insertAdjacentHTML("beforeend",b.languages[F].settings_modal.title);for(var n=0;n<K;++n){var G=e("div"),v=e("div"),q=e("div"),p=e("div");G.className="c-bl";v.className="desc";q.className="p";p.className="title";q.insertAdjacentHTML("beforeend",d[n].description);if("undefined"!==typeof d[n].toggle){var x="c-ac-"+n,P=e("button"),H=e("label"),y=e("input"),A=e("span"),V=e("span"),W=e("span"),X=e("span");P.className="b-tl";H.className="b-tg";y.className="c-tgl";W.className="on-i";X.className="off-i";A.className="c-tg";V.className="t-lb";P.setAttribute("aria-expanded","false");P.setAttribute("aria-controls",x);y.type="checkbox";A.setAttribute("aria-hidden","true");var va=d[n].toggle.value;y.value=va;V[f]=d[n].title;P.insertAdjacentHTML("beforeend",d[n].title);p.appendChild(P);A.appendChild(W);A.appendChild(X);a?-1<M(JSON.parse(J).level,va)?(y.checked=!0,E.push(!0)):E.push(!1):d[n].toggle.enabled&&(y.checked=!0);d[n].toggle.readonly&&(y.disabled=!0,y.setAttribute("aria-readonly","true"),C(A,"c-ro"));C(v,"b-acc");C(p,"b-bn");C(G,"b-ex");v.id=x;v.setAttribute("aria-hidden","true");H.appendChild(y);H.appendChild(A);H.appendChild(V);p.appendChild(H);(function(U,ja,wa){I(P,"click",function(){oa(ja,"act")?(ha(ja,"act"),wa.setAttribute("aria-expanded","false"),U.setAttribute("aria-hidden","true")):(C(ja,"act"),wa.setAttribute("aria-expanded","true"),U.setAttribute("aria-hidden","false"))},!1)})(v,G,P)}else x=e("div"),x.className="b-tl",x.setAttribute("role","heading"),x.setAttribute("aria-level","3"),x.insertAdjacentHTML("beforeend",d[n].title),p.appendChild(x);G.appendChild(p);v.appendChild(q);if(!0!==b.remove_cookie_tables&&"undefined"!==typeof d[n].cookie_table){H=document.createDocumentFragment();q=b.languages[F].settings_modal.cookie_table_headers;for(y=0;y<q.length;++y)A=e("th"),p=q[y],A.setAttribute("scope","col"),p&&(x=p&&Z(p)[0],A[f]=q[y][x],H.appendChild(A));p=e("tr");p.appendChild(H);x=e("thead");x.appendChild(p);H=e("table");H.appendChild(x);y=document.createDocumentFragment();for(A=0;A<d[n].cookie_table.length;A++){V=e("tr");for(W=0;W<q.length;++W)if(p=q[W])x=Z(p)[0],X=e("td"),X.insertAdjacentHTML("beforeend",d[n].cookie_table[A][x]),X.setAttribute("data-column",p[x]),V.appendChild(X);y.appendChild(V)}q=e("tbody");q.appendChild(y);H.appendChild(q);v.appendChild(H)}G.appendChild(v);w.appendChild(G)}a=e("div");f=e("button");d=e("button");a.id="s-bns";f.id="s-sv-bn";d.id="s-all-bn";f.className="c-bn";d.className="c-bn";f.insertAdjacentHTML("beforeend",b.languages[F].settings_modal.save_settings_btn);d.insertAdjacentHTML("beforeend",b.languages[F].settings_modal.accept_all_btn);a.appendChild(d);a.appendChild(f);I(f,"click",function(){t.hideSettings();t.hide();da(b,-1)});I(d,"click",function(){t.hideSettings();t.hide();da(b,1)});m.appendChild(g);m.appendChild(r);O.appendChild(m);O.appendChild(w);O.appendChild(a);l.appendChild(O);k.appendChild(l);h.appendChild(k);D.appendChild(h);c.appendChild(D);c.appendChild(B);(za||document.body).appendChild(L)}function Ea(){function a(c,d){var f=!1,h=!1;try{for(var k=c.querySelectorAll(b.join(\':not([tabindex="-1"]), \')),l,g=k.length,m=0;m<g;)l=k[m].getAttribute("data-focus"),h||"1"!==l?"0"===l&&(f=k[m],h||"0"===k[m+1].getAttribute("data-focus")||(h=k[m+1])):h=k[m],m++}catch(r){return c.querySelectorAll(b.join(", "))}d[0]=k[0];d[1]=k[k.length-1];d[2]=f;d[3]=h}var b=["[href]","button","input","details",\'[tabindex="0"]\'];a(O,Y);Q&&a(z,ka)}function xa(a,b){if(b.hasOwnProperty(a))return a;
7if(0<Z(b).length)return b.hasOwnProperty(F)?F:Z(b)[0]}function Fa(){for(var a=document.querySelectorAll(\'a[data-cc="c-settings"], button[data-cc="c-settings"]\'),b=0;b<a.length;b++)a[b].setAttribute("aria-haspopup","dialog"),I(a[b],"click",function(c){t.showSettings(0);c.preventDefault?c.preventDefault():c.returnValue=!1})}function Ga(a){"number"===typeof a.cookie_expiration&&(sa=a.cookie_expiration);"boolean"===typeof a.autorun&&(ya=a.autorun);"string"===typeof a.cookie_domain&&(S=a.cookie_domain);"string"===typeof a.cookie_same_site&&(ua=a.cookie_same_site);"string"===typeof a.cookie_path&&(ta=a.cookie_path);"string"===typeof a.cookie_name&&(ea=a.cookie_name);qa=!0===a.page_scripts;ra=!1!==a.page_scripts_order;if(!0===a.auto_language){var b=navigator.language||navigator.browserLanguage;2<b.length&&(b=b[0]+b[1]);F=xa(b.toLowerCase(),a.languages)}else"string"===typeof a.current_lang&&(F=xa(a.current_lang,a.languages));!0===a.force_consent&&C(T,"force--consent")}var F="en",ya=!0,ea="cc_cookie",sa=182,S=location.hostname,ta="/",ua="Lax",qa,ra,t={},J,Q=!1,R=!1,ba=!1,ia=!1,aa=!1,u,fa,la,ka=[],Y=[],E=[],T=document.documentElement,L,z,D,O;t.allowedCategory=function(a){return-1<M(JSON.parse(ca(ea,"one",!0)||"{}").level||[],a)};t.run=function(a){if(!L&&(Ga(a),J=ca(ea,"one",!0),Q=""==J,Da(!Q,a),Ca(a.theme_css,function(){Ea();Aa(a.gui_options);Fa();!J&&ya&&t.show(a.delay||0);setTimeout(function(){C(L,"c--anim")},30);setTimeout(function(){Ba()},100)}),J&&(R=!0),R&&(pa(),"function"===typeof a.onAccept)))a.onAccept(JSON.parse(J||"{}"))};t.showSettings=function(a){setTimeout(function(){C(T,"show--settings");D.setAttribute("aria-hidden","false");ia=!0;ba?la=document.activeElement:fa=document.activeElement;setTimeout(function(){0!==Y.length&&(Y[3]?Y[3].focus():Y[0].focus(),u=Y)},100)},0<a?a:0)};t.loadScript=function(a,b,c){var d="function"===typeof b;if(document.querySelector(\'script[src="\'+a+\'"]\'))d&&b();else{var f=e("script");if(c&&0<c.length)for(var h=0;h<c.length;++h)c[h]&&f.setAttribute(c[h].name,c[h].value);d&&(f.readyState?f.onreadystatechange=function(){if("loaded"===f.readyState||"complete"===f.readyState)f.onreadystatechange=null,b()}:f.onload=b);f.src=a;(document.head?document.head:document.getElementsByTagName("head")[0]).appendChild(f)}};t.show=function(a){Q&&setTimeout(function(){C(T,"show--consent");z.setAttribute("aria-hidden","false");ba=!0;fa=document.activeElement;u=ka},0<a?a:0)};t.hide=function(){Q&&(ha(T,"show--consent"),z.setAttribute("aria-hidden","true"),ba=!1,fa.focus(),u=null)};t.hideSettings=function(){ha(T,"show--settings");ia=!1;D.setAttribute("aria-hidden","true");ba?(la&&la.focus(),u=ka):(fa.focus(),u=null);aa=!1};t.validCookie=function(a){return""!=ca(a,"one",!0)};return na=window[ma]=void 0,t}var ma="initCookieConsent";"function"!==typeof window[ma]&&(window[ma]=na)})();\n    ',document.head.appendChild(e)}},Ao=class extends Zr{static targets=[];connect(){this.initializeCookieConsent()}initializeCookieConsent(){if(!window.cookieconsent_instance){var e=initCookieConsent();window.cookieconsent_instance=e,e.run({current_lang:"pt",onAccept:function(){console.log("Cookies accepted")},gui_options:{consent_modal:{layout:"box",position:"bottom left",transition:"slide"},settings_modal:{layout:"bar",position:"left",transition:"slide"}},languages:{pt:{consent_modal:{title:"Cookies",description:'Utilizamos cookies e tecnologias similares, como pixels e tags, para oferecer a melhor experi\xeancia para o usu\xe1rio. Ao utilizar nossos servi\xe7os, voc\xea concorda com essa utiliza\xe7\xe3o. Mais detalhes em nossa <a href="/politica-de-privacidade">"Pol\xedtica de Privacidade"</a>.',primary_btn:{text:"Aceito Tudo",role:"accept_all"},secondary_btn:{text:"Configura\xe7\xf5es",role:"settings"}},settings_modal:{title:"Configura\xe7\xf5es dos Cookeis",save_settings_btn:"Salvar",accept_all_btn:"Aceitar",close_btn_label:"Fechar",blocks:[{title:"Utiliza\xe7\xe3o",description:'Utilizamos cookies e tecnologias similares, como pixels e tags, para oferecer a melhor experi\xeancia para o usu\xe1rio. Ao utilizar nossos servi\xe7os, voc\xea concorda com essa utiliza\xe7\xe3o. Mais detalhes em nossa <a href="/politica-de-privacidade">"Pol\xedtica de Privacidade"</a>.'}
7,{title:"Essenciais",description:"Os cookies essenciais permitem que fun\xe7\xf5es b\xe1sicas, como navega\xe7\xe3o, acesso \xe0s p\xe1ginas da \xe1rea do aluno, cadastramento e processo de pagamento, funcionem adequadamente.",toggle:{value:"necessary",enabled:!0,readonly:!0}},{title:"Anal\xedticos",description:"Os cookies anal\xedticos nos proporcionam dados para melhor compreender os visitantes e o modo como interagem com a aplica\xe7\xe3o.",toggle:{value:"analytics",enabled:!0,readonly:!0}}]}}}})}}disconnect(){}},_o=class extends Zr{static targets=["sidenav","overlay","searchForm","subscriptionLink"];connect(){this.addParamsToSubscriptionLink()}addParamsToSubscriptionLink(){const{last_touch:e}=mt(),t=e.src,s=e.camp;let r=document.querySelector('[data-element="blackBtn"]');if(!r||!t&&!s)return;const i=new URL(r.getAttribute("href"),window.location.origin);t&&i.searchParams.set("src",t),s&&i.searchParams.set("camp",s),r.href=i.pathname+i.search+i.hash}},xo=class extends Pr{static targets=["daysValue","hoursValue","minutesValue","secondsValue"];static values={endTime:String};connect(){this.setEndTime(),this.endTime&&(this.tick(),this.start())}disconnect(){this.stop()}setEndTime(){if(!this.hasEndTimeValue)return;const e=new Date(this.endTimeValue);Number.isNaN(e.getTime())||(this.endTime=e)}start(){this.stop(),this.interval=window.setInterval(()=>this.tick(),1e3)}stop(){this.interval&&(window.clearInterval(this.interval),this.interval=null)}tick(){const e=new Date,t=Math.max(0,this.endTime-e),s=Math.floor(t/1e3),r=Math.floor(s/86400),i=Math.floor(s%86400/3600),n=Math.floor(s%3600/60),a=s%60;this.daysValueTarget.textContent=this.format(r),this.hoursValueTarget.textContent=this.format(i),this.minutesValueTarget.textContent=this.format(n),this.secondsValueTarget.textContent=this.format(a),0===t&&this.stop()}format(e){return String(e).padStart(2,"0")}},Eo=class extends Zr{static targets=["courseTopAnchor","courseStickyElement","lessonTopAnchor","lessonStickyElement","episodeTopAnchor","episodeStickyElement","productTopAnchor","productStickyElement","prayersTopAnchor","prayersStickyElement"];#c={"course-page":{side:"right",anchorTarget:"courseTopAnchorTarget",elementTarget:"courseStickyElementTarget",minWidth:0},"lesson-page":{side:"right",anchorTarget:"lessonTopAnchorTarget",elementTarget:"lessonStickyElementTarget",minWidth:0},"episode-page":{side:"right",anchorTarget:"episodeTopAnchorTarget",elementTarget:"episodeStickyElementTarget",minWidth:0,requiresTargets:!0},show_wrapper:{side:"left",anchorTarget:"productTopAnchorTarget",elementTarget:"productStickyElementTarget",minWidth:1020},"prayers-show":{side:"left-prayers",anchorTarget:"prayersTopAnchorTarget",elementTarget:"prayersStickyElementTarget",minWidth:768}};#l=null;stickySideMenu(e){const t=this.#d(e.target);if(!t)return;const s=this.#c[t];if(!this.#u(s))return;this.#l=s;const r=this[s.anchorTarget],i=this[s.elementTarget];this.stickyElement(r,i)}#d(e){return Object.keys(this.#c).find(t=>e.querySelector(`.${t}`))}#u(e){if(e.requiresTargets){const t=this[`has${e.anchorTarget.charAt(0).toUpperCase()+e.anchorTarget.slice(1)}`],s=this[`has${e.elementTarget.charAt(0).toUpperCase()+e.elementTarget.slice(1)}`];return t&&s}return!0}stickyElement(e,t){if(!e||!t||!this.#l)return;const{side:s,minWidth:r}=this.#l;if(window.innerWidth<=r)return;const i=this.#h(e,t,s),n=this.#p(s);this.#g(t,e,i,n,s)}#h(e,t,s){const r=document.querySelector(".marquee-bar")?55:0,i=61,n=56,a=56,o=s.includes("left")?10:80,c=t.getBoundingClientRect().height;let l=e.getBoundingClientRect().top-i-a-r,d=e.getBoundingClientRect().bottom-i-c-n-o-r;return"left-prayers"===s&&(l+=10,d+=100),{topDistance:l,bottomDistance:d}}#p(e){const t={left:{main:"left-sticky-card",extra:"left-sticky-card-extra-space",stop:"stop-left-sticky-card"},"left-prayers":{main:"prayer-sticky-card",extra:"prayer-sticky-card-extra-space",stop:"stop-prayer-sticky-card"},right:{main:"sticky-card",extra:"sticky-card-extra-space",stop:"stop-sticky-card"}};return t[e]||t.right}#g(e,t,s,r,i){const{topDistance:n,bottomDistance:a}=s,{main:o,extra:c,stop:l}=r,d=document.querySelector(".marquee-bar");n<0?(e.classList.add(o),d&&e.classList.add(c),a<0?(e.classList.remove(o,c),t.classList.add(l)):t.classList.remove(l)):(e.classList.remove(o,c),t.classList.remove(l))}displayTextContent(e){openTextTab();const t=e.target.closest('[href="#downloads"]')||e.target.closest('[href="#lesson-text"]');t&&t.click()}removeSticky(){this.prayersStickyElementTarget.classList.remove("prayer-sticky-card")}addPageConfig(e,t){this.#c[e]={side:t.side||"right",anchorTarget:t.anchorTarget,elementTarget:t.elementTarget,minWidth:t.minWidth||0,requiresTargets:t.requiresTargets||!1}}},Oo=class extends Pr{static targets=["stickyContainer","sticky"];
7stickElements(e){this.stickyContainerTargets.forEach(e=>{const t=parseInt(e.dataset.stickyElementsMinWidth)||1020;if(window.innerWidth<t)return;const s=e.getBoundingClientRect(),r=s.top,i=s.bottom,n=e.querySelector('[data-sticky-elements-target="sticky"]');if(n){const t=n.getBoundingClientRect(),s=t.top,a=t.bottom,o=(t.height,n.offsetWidth);n.style.position="",n.style.top="",n.style.bottom="",n.style.width="",e.style.justifyContent="",e.style.position="",i<=window.innerHeight&&i>55&&r<55?e.style.justifyContent="flex-end":r>=55&&i>window.innerHeight?e.style.justifyContent="flex-start":(s>=55&&a<=window.innerHeight&&r<=55&&i>=window.innerHeight||r<=55&&i>=window.innerHeight)&&(n.style.position="fixed",n.style.top="55px",n.style.width=o+"px",e.style.position="relative")}})}removeSticky(e){this.stickyContainerTargets.forEach(e=>{const t=e.querySelector('[data-sticky-elements-target="sticky"]');t&&(t.style.position="",t.style.top="",t.style.bottom="",t.style.width="",e.style.justifyContent="",e.style.position="")})}},Mo=class extends Pr{static targets=["chapter","chapterNumber","prev","next","backgroundForChapters","backgroundForBooks","bookChapters","bibleBooks","mainContent","responsiveChapter","responsiveBook","prevNextButtons"];static values={currentBookId:String};connect(){this.setupSwipeGestures(),this.handlePrevAndNextButtons(),this.setupTooltips(),this.setupVerseNumberHoverFallback(),this.setupVerseSharePopupClickOutside(),this.showInitialChapter(),window.addEventListener("hashchange",()=>this.checkVerseHash()),setTimeout(()=>this.checkVerseHash(),300)}showInitialChapter(){const e=new URLSearchParams(window.location.search),t=parseInt(e.get("cap"))||1;this.hasResponsiveChapterTarget&&(this.responsiveChapterTarget.innerHTML=`\n        ${t}<div class="fa-solid fa-chevron-down"></div>\n      `),this.hideAllChapters(),this.showSpecificChapter(t),this.updateCommentariesSection(t);const s=this.chapterNumberTargets.find(e=>parseInt(e.dataset.chapter)===t);s&&this.updateActiveChapterButton(s),this.prevNextButtonsTarget.classList.remove("hide-element"),this.handlePrevAndNextButtons()}setupVerseSharePopupClickOutside(){document.addEventListener("click",e=>{e.target.closest(".verse-share-popup")||e.target.closest(".verse-number-btn")||this.closeVerseSharePopupOnly()}),window.addEventListener("scroll",()=>{this.closeVerseSharePopupOnly()},{passive:!0})}closeVerseSharePopupOnly(){const e=document.querySelector(".verse-share-popup.show");if(e){const t=e.closest(".verse-content");t&&this.removeVerseSharePopup(t)}}setupSwipeGestures(){let e=0,t=0,s=0,r=!1;const i=50,n=1,a=100,o=i=>{const n=i.touches[0];e=n.clientX,t=n.clientY,s=Date.now();const a=document.elementFromPoint(n.clientX,n.clientY),o=a?.closest(".liturgy-readings-wrapper");r=!!o},c=o=>{if(!o.changedTouches)return;if(r)return void(r=!1);const c=o.changedTouches[0],l=c.clientX,d=c.clientY,u=Date.now(),h=l-e,p=Math.abs(d-t);h<-i&&p<a&&u-s<n&&this.openChapters()};document.addEventListener("touchstart",o,{passive:!0}),document.addEventListener("touchend",c,{passive:!0}),this.swipeHandlers={touchstart:o,touchend:c}}openChapters(e){e&&e.preventDefault();const t=window.scrollY||window.pageYOffset;this.backgroundForChaptersTarget.style.pointerEvents="auto",this.backgroundForChaptersTarget.classList.add("open"),this.bookChaptersTarget.classList.add("open"),document.body.classList.add("locked"),window.innerWidth>=1020&&requestAnimationFrame(()=>{window.scrollTo(0,t)})}closeChapters(){const e=window.scrollY||window.pageYOffset;this.backgroundForChaptersTarget.classList.remove("open"),this.bookChaptersTarget.classList.remove("open"),document.body.classList.remove("locked"),window.innerWidth>=1020&&requestAnimationFrame(()=>{window.scrollTo(0,e)})}openBooks(e){e&&e.preventDefault();const t=window.scrollY||window.pageYOffset;this.backgroundForBooksTarget.style.pointerEvents="auto",this.backgroundForBooksTarget.classList.add("open"),this.bibleBooksTarget.classList.add("open"),document.body.classList.add("locked"),window.innerWidth>=1020&&requestAnimationFrame(()=>{window.scrollTo(0,t)})}closeBooks(){const e=window.scrollY||window.pageYOffset;this.backgroundForBooksTarget.classList.remove("open"),this.bibleBooksTarget.classList.remove("open"),document.body.classList.remove("locked"),window.innerWidth>=1020&&requestAnimationFrame(()=>{window.scrollTo(0,e)})}async changeBibleEdition(e){const t=e.currentTarget.dataset.edition||e.target.value,s=window.location.pathname.match(/\/biblia\/([a-z0-9]+)/i);if(!s)return void(window.location.href=`/biblia?edition=${t}`);const r=window.scrollY||window.pageYOffset;try{const e=s[1],i=new URLSearchParams(window.location.search),n=i.get("cap")||"1",a=i.get("verse");let o=`/biblia/${e}?cap=${n}&edition=${t}`;a&&(o+=`&verse=${a}`);const c=await fetch(o,{headers:{Accept:"text/html","X-Requested-With":"XMLHttpRequest"}});if(!c.ok)throw new Error("Network response was not ok");const l=await c.text(),d=(new DOMParser).parseFromString(l,"text/html"),u=d.querySelector(".bible-books-in-grid"),h=document.querySelector(".bible-books-in-grid");u&&h&&(h.innerHTML=u.innerHTML);const p=d.querySelector("#bible-main-content"),g=document.getElementById("bible-main-content");p&&g&&(g.innerHTML=p.innerHTML);
7const m=d.querySelector("#bible-chapters-list"),f=document.getElementById("bible-chapters-list");m&&f&&(f.innerHTML=m.innerHTML);const b=d.querySelector(".books-button");if(b&&this.hasResponsiveBookTarget){b.textContent.trim();this.responsiveBookTarget.innerHTML=b.innerHTML}let y=`/biblia/${e}?cap=${n}&edition=${t}`;a&&(y+=`&verse=${a}`),this.updateURL(y),setTimeout(()=>{window.scrollTo(0,r),this.checkVerseHash(),this.showInitialChapter(),this.handlePrevAndNextButtons()},100)}catch(e){console.error("Error changing bible edition:",e);const s=window.location.pathname.match(/\/biblia\/([a-z0-9]+)/i),r=s?s[1]:"gn",i=new URLSearchParams(window.location.search),n=i.get("cap")||"1",a=i.get("verse");let o=`/biblia/${r}?cap=${n}&edition=${t}`;a&&(o+=`&verse=${a}`),window.location.href=o}}async loadBook(e){window.scrollTo({top:0,behavior:"smooth"});const t=e.target,s=t.dataset.bookId;if(s)try{const e=new URLSearchParams(window.location.search).get("edition"),r=e?`/biblia/${s}?edition=${e}`:`/biblia/${s}`,i=await fetch(r,{headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}});if(!i.ok)throw new Error("Network response was not ok");const n=await i.json();this.updateContent(n.content),this.updateChaptersList(n.chapters),this.hasBookChaptersTarget&&this.bookChaptersTarget.classList.remove("book-chapters--home"),this.updateActiveBookButton(t),this.updateResponsiveBookName(t.getAttribute("data-name")||t.textContent.trim());const a=e?`/biblia/${s}?cap=1&edition=${e}`:`/biblia/${s}?cap=1`;this.updateURL(a),this.currentBookIdValue=s,this.showSelectedChapter(),this.closeBooks()}catch(e){console.error("Error loading book:",e);const t=new URLSearchParams(window.location.search).get("edition");window.location.href=t?`/biblia/${s}?edition=${t}`:`/biblia/${s}`}}showChapter(e){this.chapterNumberTargets.forEach(e=>e.classList.remove("first-animated")),window.scrollTo({top:0,behavior:"smooth"});const t=parseInt(e.target.dataset.chapter);t&&(this.responsiveChapterTarget.innerHTML=`\n      ${t}<div class="fa-solid fa-chevron-down"></div>\n    `,this.hideAllChapters(),this.showSpecificChapter(t),this.updateCommentariesSection(t),this.updateActiveChapterButton(e.target),this.updateChapterInURLManual(t),this.handlePrevAndNextButtons(),this.closeChapters())}handlePrevAndNextButtons(){const e=this.getCurrentChapter(),t=1===e,s=e===this.chapterTargets.length;this.prevTarget.style.opacity=t?"0":"1",this.prevTarget.style.pointerEvents=t?"none":"auto",this.nextTarget.style.opacity=s?"0":"1",this.nextTarget.style.pointerEvents=s?"none":"auto"}nextChapter(){window.scrollTo({top:0,behavior:"smooth"});const e=this.getCurrentChapter()+1;if(this.responsiveChapterTarget.innerHTML=`\n      ${e}<div class="fa-solid fa-chevron-down"></div>\n    `,e<=this.chapterTargets.length){this.hideAllChapters(),this.showSpecificChapter(e),this.updateCommentariesSection(e);const t=this.chapterNumberTargets.find(t=>parseInt(t.dataset.chapter)===e);this.updateActiveChapterButton(t),this.updateChapterInURLManual(e),this.handlePrevAndNextButtons()}}previousChapter(){window.scrollTo({top:0,behavior:"smooth"});const e=this.getCurrentChapter()-1;if(this.responsiveChapterTarget.innerHTML=`\n      ${e}<div class="fa-solid fa-chevron-down"></div>\n    `,e>=1){this.hideAllChapters(),this.showSpecificChapter(e),this.updateCommentariesSection(e);const t=this.chapterNumberTargets.find(t=>parseInt(t.dataset.chapter)===e);this.updateActiveChapterButton(t),this.updateChapterInURLManual(e),this.handlePrevAndNextButtons()}}updateCommentariesSection(e){document.querySelectorAll(".commentaries-section").forEach(e=>e.classList.add("hide-element"));const t=document.querySelector(`.commentaries-section[data-chapter="${e}"]`);t&&t.classList.remove("hide-element")}getCurrentChapter(){return this.chapterTargets.findIndex(e=>!e.classList.contains("hide-element"))+1}updateContent(e){const t=document.getElementById("bible-main-content");t&&(t.innerHTML=e,setTimeout(()=>{this.checkVerseHash(),this.element.dispatchEvent(new CustomEvent("bible-content:updated"))},100))}updateChaptersList(e){const t=document.getElementById("bible-chapter
7s-list");t&&(t.innerHTML=e)}updateActiveBookButton(e){document.querySelectorAll(".book-in-grid").forEach(e=>e.classList.remove("active")),e.classList.add("active")}updateURL(e){history.pushState&&history.pushState(null,null,e)}hideAllChapters(){this.chapterTargets.forEach(e=>{e.classList.add("hide-element")})}showSpecificChapter(e){const t=this.chapterTargets.find(t=>parseInt(t.dataset.chapterNumber)===e);this.chapterTargets.forEach(e=>e.style.opacity="0"),t&&(t.classList.remove("hide-element"),this.chapterTargets[e-1].style.opacity="1",setTimeout(()=>{setTimeout(()=>this.checkVerseHash(),300)},200))}updateActiveChapterButton(e){document.querySelectorAll(".chapter-title").forEach(e=>e.classList.remove("active")),e&&e.classList.add("active")}handleVerseNumberClick(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget.dataset.verse;if(!t)return;const s=new URL(window.location);s.searchParams.set("verse",t),history.pushState&&history.pushState(null,null,s.toString());const r=document.querySelector(".highlighted");r&&(r.classList.remove("highlighted"),this.removeVerseSharePopup(r));const i=e.currentTarget.closest(".verse-content");i&&(i.classList.add("highlighted"),this.showVerseSharePopup(i,t))}showVerseSharePopup(e,t){this.removeVerseSharePopup(e);const s=document.createElement("div");s.className="verse-share-popup",s.innerHTML=`\n      <button class="share-button" data-action="click->bible-navigator#shareVerse" data-verse="${t}">\n        <i class="fa-solid fa-link"></i>\n        Copiar link\n      </button>\n    `,e.appendChild(s),setTimeout(()=>{s.classList.add("show")},10)}removeVerseSharePopup(e){const t=e.querySelector(".verse-share-popup");t&&(t.classList.remove("show"),t.classList.add("hide"),setTimeout(()=>{t.remove()},250))}shareVerse(e){e.preventDefault(),e.stopPropagation();const t=window.location.href;this.copyToClipboard(t)}copyToClipboard(e){navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then(()=>{this.showCopyFeedback()}).catch(()=>{this.fallbackCopyToClipboard(e)}):this.fallbackCopyToClipboard(e)}fallbackCopyToClipboard(e){const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),this.showCopyFeedback()}catch(e){console.error("Failed to copy:",e)}document.body.removeChild(t)}showCopyFeedback(){const e=document.querySelector(".verse-share-popup.show");if(e){e.querySelector(".share-button").innerHTML='<i class="fa-solid fa-check"></i> Copiado!',setTimeout(()=>{const t=e.closest(".verse-content");t&&this.removeVerseSharePopup(t)},1500)}}setupVerseNumberHoverFallback(){window.innerWidth<768||(document.addEventListener("mouseover",e=>{if(e.target.classList.contains("verse-number-btn")){const t=e.target.closest(".verse-content");t&&!t.classList.contains("highlighted")&&t.classList.add("verse-number-hover")}}),document.addEventListener("mouseout",e=>{if(e.target.classList.contains("verse-number-btn")){const t=e.target.closest(".verse-content");t&&t.classList.remove("verse-number-hover")}}))}showSelectedChapter(){const e=this.getCurrentChapter()||1;this.hideAllChapters(),this.showSpecificChapter(e),this.updateCommentariesSection(e)
8;const t=this.chapterNumberTargets.find(t=>parseInt(t.dataset.chapter)===e);t&&this.updateActiveChapterButton(t),this.responsiveChapterTarget.innerHTML=`\n      ${e}<div class="fa-solid fa-chevron-down"></div>\n    `,this.prevNextButtonsTarget.classList.remove("hide-element"),this.handlePrevAndNextButtons(),setTimeout(()=>this.checkVerseHash(),300)}updateResponsiveBookName(e){this.hasResponsiveBookTarget&&(this.responsiveBookTarget.firstChild.textContent=e)}updateChapterInURL(e){const t=new URL(window.location);t.searchParams.set("cap",e),history.pushState&&history.pushState(null,null,t.toString())}updateChapterInURLManual(e){const t=new URL(window.location);t.searchParams.set("cap",e),t.searchParams.delete("verse"),history.pushState&&history.pushState(null,null,t.toString())}openSpecificChapterFromURL(){const e=new URLSearchParams(window.location.search).get("verse");e&&this.highlightAndScrollToVerse(e)}setupTooltips(){window.innerWidth<1020||(this.tooltip=document.createElement("div"),this.tooltip.className="bible-tooltip",document.body.appendChild(this.tooltip),document.addEventListener("mouseover",e=>{const t=e.target.closest(".book-in-grid, button");t&&t.closest(".books-container")&&this.showTooltip(e,t)}),document.addEventListener("mousemove",e=>{const t=e.target.closest(".book-in-grid, button");t&&t.closest(".books-container")&&this.tooltip.classList.contains("show")&&this.updateTooltipPosition(e)}),document.addEventListener("mouseout",e=>{const t=e.target.closest(".book-in-grid, button");t&&t.closest(".books-container")&&this.hideTooltip()}))}showTooltip(e,t){let s=t.getAttribute("data-name")||t.textContent.trim();"Job"===s&&(s="J\xf3"),s&&(this.tooltip.textContent=s,this.updateTooltipPosition(e),this.tooltip.classList.add("show"))}updateTooltipPosition(e){const t=e.clientX,s=e.clientY;this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${s}px`}hideTooltip(){this.tooltip.classList.remove("show")}disconnect(){this.tooltip&&this.tooltip.remove(),clearTimeout(this._waveTimer)}checkVerseHash(){const e=window.location.hash;if(e&&e.startsWith("#verse-")){const t=e.replace("#verse-","");return void this.highlightAndScrollToVerse(t)}const t=new URLSearchParams(window.location.search).get("verse");t&&this.highlightAndScrollToVerse(t)}highlightAndScrollToVerse(e){const t=document.querySelector(".highlighted");t&&(t.classList.remove("highlighted"),this.removeVerseSharePopup(t));const s=this.chapterTargets.find(e=>!e.classList.contains("hide-element"));if(s){const t=s.querySelector(`#verse-${e}`);t&&(t.classList.add("highlighted"),this.showVerseSharePopup(t,e),t.scrollIntoView({behavior:"smooth",block:"center"}))}}},No=class extends Zr{static values={targetId:String,targetClass:String,selfClass:String,breakpoint:{type:Number,default:765}};toggle(e){if(!(window.innerWidth>=this.breakpointValue)){if(e.preventDefault(),this.targetIdValue&&this.targetClassValue){const e=document.getElementById(this.targetIdValue);e&&e.classList.toggle(this.targetClassValue)}this.selfClassValue&&this.element.classList.toggle(this.selfClassValue)}}};Ee();var Ro=Nr.start();Ro.register("nav",ci),Ro.register("public-navbar",li),Ro.register("site-notifications",Va),Ro.register("search-modal",za),Ro.register("nh-footer-accordion",Ha),Ro.register("nh-newsletter",Wa),Ro.register("utils--card-brand",Xa),Ro.register("ads",Ya),Ro.register("growth-loader",mo),Ro.register("url-params",fo),Ro.register("reset-cookie",yo),Ro.register("store-cart",ko),Ro.register("legal-entity-cart",Co),Ro.register("form--newsletter-form",So),Ro.register("shared--cookie-consent-library",Lo),Ro.register("shared--cookie-consent",Ao),Ro.register("black",_o),Ro.register("black-countdown",xo),Ro.register("sticky-side-menu",Eo),Ro.register("sticky-elements",Oo),Ro.register("bible-navigator",Mo),Ro.register("mobile-toggle",No);var Bo=Ro,Fo={nameInput:e=>!(""==e||e.replace(/\s/g,"").length<3),emailInput:e=>!(!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)||""==e),cellphoneInput:e=>!(e.length<14),foreignCellphoneInput:e=>!(e.length<8),checkCpfInput(e){var t=e.replace(/\.|\-|\s/g,""),s=t.substring(0,9),r=t.substring(9,11);if(11!==t.length)return!1;for(var i=0;i<10;i++)if(""+s+r===Array(12).join(i))return!1;var n=Gs(s),a=Xs(s+""+n);return r.toString()===n.toString()+a.toString()},addMaskPhoneNumber:e=>(e=(e=e.replace(/\D/g,"")).replace(/^(\d\d)(\d)/g,"($1) $2")).replace(/(\d{5})(\d)/,"$1-$2"),addMaskCpf:e=>
8(e=(e=(e=e.replace(/\D/g,"")).replace(/(\d{3})(\d)/,"$1.$2")).replace(/(\d{3})(\d)/,"$1.$2")).replace(/(\d{3}[\.]{1}\d{3}[\.]{1}\d{3})(\d)/,"$1-$2"),isEmpty:e=>""==e||"..."==e,addZipCodeMask:e=>(e=e.replace(/\D/g,"")).replace(/(\d{5})(\d)/,"$1-$2"),addInputMaskForLettersOnly:e=>e.replace(/[0-9]/g,""),addInputMaskForNumbersOnly:e=>e.replace(/[^0-9\s]/g,""),validatePasswordFormat:e=>/^(?=.*[A-Za-z])(?=.*\d)[\S]{6,}$/.test(e),addCardNumberMask:e=>(e=(e=(e=e.replace(/\D/g,"")).replace(/(\d{4})(\d)/,"$1 $2")).replace(/(\d{4})(\d)/,"$1 $2")).replace(/(\d{4})(\d)/,"$1 $2"),addExpDateMask:e=>(e=e.replace(/\D/g,"")).replace(/^(\d\d)(\d)/g,"$1/$2"),checkCvv:e=>e.length>=3,addDateMask:e=>(e=(e=e.replace(/\D/g,"")).replace(/(\d{2})(\d{2})/,"$1-$2")).replace(/(\d{2})(\d)/,"$1-$2"),moneyMask(e){let t=e.replace(".","").replace(",","").replace(/\D/g,"");if(0==t.length)return"R$ 0,00";let s={minimumFractionDigits:2};return"R$ "+new Intl.NumberFormat("pt-BR",s).format(parseFloat(t)/100)},isGreaterThan:(e,t)=>e>=t,defineCountryShippingArea(e){var t;switch(e){case"249":case"252":case"262":case"273":case"277":case"278":case"279":case"281":case"297":case"300":case"301":case"302":case"304":case"309":case"311":case"313":case"322":case"333":case"338":case"340":case"341":case"343":case"346":case"348":case"360":case"369":case"377":case"402":case"403":case"413":case"422":case"424":case"429":case"448":case"451":case"455":case"460":case"463":case"472":case"485":case"486":case"487":default:t="C";break;case"250":case"251":case"256":case"270":case"282":case"283":case"299":case"312":case"314":case"355":case"356":case"362":case"364":case"365":case"366":case"367":case"372":case"373":case"374":case"379":case"386":case"390":case"396":case"398":case"400":case"417":case"420":case"421":case"433":case"435":case"440":case"462":case"467":case"469":case"473":case"483":case"489":case"494":t="F";break;case"254":case"255":case"264":case"267":case"289":case"305":case"307":case"310":case"317":case"320":case"323":case"327":case"329":case"331":case"337":case"339":case"347":case"349":case"354":case"357":case"359":case"378":case"382":case"387":case"395":case"397":case"415":case"416":case"428":case"431":case"449":case"456":case"458":case"484":t="D";break;case"257":case"290":case"432":case"481":t="A";break;case"258":case"259":case"261":case"263":case"265":case"271":case"274":case"276":case"291":case"296":case"318":case"321":case"324":case"325":case"328":case"342":case"344":case"345":case"350":case"351":case"352":case"358":case"361":case"363":case"368":case"370":case"381":case"383":case"384":case"388":case"392":case"393":case"399":case"406":case"409":case"411":case"414":case"418":case"419":case"423":case"425":case"426":case"427":case"434":case"437":case"438":case"443":case"446":case"452":case"457":case"466":case"468":case"470":case"471":case"474":case"475":case"479":case"490":case"492":t="E";break;case"260":case"266":case"268":case"269":case"284":case"285":case"286":case"288":case"292":case"293":case"294":case"295":case"298":case"303":case"308":case"315":case"316":case"319":case"326":case"330":case"332":case"334":case"335":case"336":case"353":case"371":case"375":case"376":case"380":case"389":case"394":case"401":case"404":case"405":case"407":case"408":case"410":case"412":case"430":case"436":case"439":case"441":case"442":case"447":case"450":case"453":case"454":case"459":case"461":case"464":case"465":case"477":case"478":case"493":case"495":case"496":t="G";break;case"287":case"391":case"482":t="B"}return t},findStateName(e){var t;switch(e.toUpperCase()){case"AC":t="Acre";break;case"AL":t="Alagoas";break;case"AM":t="Amazonas";break;case"AP":t="Amap\xe1";break;case"BA":t="Bahia";break;case"CE":t="Cear\xe1";break;case"DF":t="Distrito Federal";break;case"ES":t="Esp\xedrito Santo";break;case"GO":t="Goi\xe1s";break;case"MA":t="Maranh\xe3o";break;case"MG":t="Minas Gerais";break;case"MS":t="Mato Grosso do Sul";break;case"MT":t="Mato Grosso";break;case"PA":t="Par\xe1";break;case"PB":t="Para\xedba";break;case"PE":t="Pernambuco";break;case"PI":t="Piau\xed";break;case"PR":t="Paran\xe1";break;case"RJ":t="Rio de Janeiro";break;case"RN":t="Rio Grande do Norte";break;case"RO":t="Rond\xf4nia";break;case"RR":t="Roraima";break;case"RS":t="Rio Grande do Sul";break;case"SC":t="Santa Catarina";break;case"SE":t="Sergipe";break;case"SP":t="S\xe3o Paulo";break;case"TO":t="Tocantins"}return t},async fetchAddressData(e){try{const t=`https://viacep.com.br/ws/${e}/json`,s={method:"GET",mode:"cors",headers:{"content-type":"application/json;charset=utf-8"}},r=await fetch(t,s),i=await r.json();return i.hasOwnProperty("erro")?null:i}catch(e){return console.error("Error fetching address data:",e),null}}
8,freezeForm(e,t,s){e?(t.classList.add("no-events"),s.classList.remove("no-events")):t.classList.remove("no-events")},checkAddressInfo(){let e=!0;[{selector:"#recipientInput",minLength:3},{selector:"#stateInput",minLength:2},{selector:"#cityInput",minLength:3},{selector:"#neighborhoodInput",minLength:3},{selector:"#addressInput",minLength:3},{selector:"#addressNumberInput",minLength:1}].forEach(t=>{const s=document.querySelector(t.selector),r=s.value,i=s.parentElement;r.length<t.minLength?(i.classList.add("input-group__wrong"),e=!1):i.classList.remove("input-group__wrong")});const t=document.querySelector("#zipInput");return Ys()?t.parentElement.classList.remove("input-group__wrong"):(t.parentElement.classList.add("input-group__wrong"),e=!1),e}},Po=class extends Zr{static targets=["oauthButton","emailInput","emailInputArea","form","successPage","sentEmail","sentCellphone"];oauthLogin(e){e.preventDefault(),this.freezeButton(!0);const t=this,s={"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content};setTimeout(()=>{Aa.post("/verify_email",{email:this.emailInputTarget.value},{headers:s}).then(e=>{"success"==e.data.status?t.sendOauthMessage():(this.emailInputAreaTarget.classList.add("input-group__wrong"),document.querySelector(".login-form__message").innerHTML=e.data.message)}).finally(()=>{this.freezeButton(!1)})},2e3)}sendOauthMessage(){const e=this,t={"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content};Aa.post("/entrar_com_token",{email:this.emailInputTarget.value},{headers:t}).then(t=>{e.showSuccess(t.data)}).catch(()=>{this.emailInputAreaTarget.classList.add("input-group__wrong"),document.querySelector(".login-form__message").innerHTML="A mensagem n\xe3o foi enviada. Tente novamente."})}showSuccess(e){this.formTarget.classList.add("hide-element"),this.successPageTarget.classList.remove("hide-element"),this.sentEmailTarget.innerHTML=e.email,this.sentCellphoneTarget.innerHTML=`(\u2022\u2022) \u2022\u2022\u2022\u2022\u2022-${e.cellphone}`}freezeButton(e){let t=this.oauthButtonTarget;e?(t.classList.add("disabled"),t.innerHTML="<div class='icon disp-flex' style='margin-right: 0;'><svg width='80px'  height='30px'  xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' class='lds-ellipsis' style='background: none;'><!--circle(cx='16',cy='50',r='10')--><circle cx='84' cy='50' r='0' fill='#ffffff'><animate attributeName='r' values='13;0;0;0;0' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate><animate attributeName='cx' values='84;84;84;84;84' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate></circle><circle cx='49.9601' cy='50' r='13' fill='#ffffff'><animate attributeName='r' values='0;13;13;13;0' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='-0.8s'></animate><animate attributeName='cx' values='16;16;50;84;84' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='-0.8s'></animate></circle><circle cx='16' cy='50' r='12.9848' fill='#ffffff'><animate attributeName='r' values='0;13;13;13;0' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='-0.4s'></animate><animate attributeName='cx' values='16;16;50;84;84' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='-0.4s'></animate></circle><circle cx='84' cy='50' r='0.0152493' fill='#ffffff'><animate attributeName='r' values='0;13;13;13;0' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate><animate attributeName='cx' values='16;16;50;84;84' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate></circle><circle cx='83.9601' cy='50' r='13' fill='#ffffff'><animate attributeName='r' values='0;0;13;13;13' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate><animate attributeName='cx' values='16;16;16;50;84' keyTimes='0;0.25;0.5;0.75;1' keySplines='0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1' calcMode='spline' dur='1.6s' repeatCount='indefinite' begin='0s'></animate></circle></svg></div>"):(t.classList.remove("disabled"),t.innerHTML="Enviar")}checkEmail(){document.querySelector(".login-form__message").innerHTML="",Fo.emailInput(this.emailInputTarget.value)?(this.oauthButtonTarget.removeAttribute("disabled"),this.emailInputAreaTarget.classList.remove("input-group__wrong")):(this.oauthButtonTarget.setAttribute("disabled",!0),this.emailInputAreaTarget.classList.add("input-group__wrong"))}},Io={redirectUser(e){const t=["active","free","legal_entity"].includes(e),s=Io.getCookie("user_return_to"),r=new URL(window.location.href),i=document.querySelector("[data-free-content]"),n=2e3;if("/acessar"===r.pathname)window.location.href="/checkout?select=plan&src=ios_app";
8else if(s){const e=decodeURIComponent(s),r=new URL(e,window.location.origin),a=r.searchParams.toString()?`?${r.searchParams}`:"";if(i){return void("true"===i.dataset.freeContent||t?setTimeout(()=>window.location.reload(),n):setTimeout(()=>window.location.href=Io.loginFromLessonRedirectUrl(),n))}if(e.includes("presentes"))window.location.href=e;else if(Io.shouldPreserveReturnTo(r.pathname))window.location.href=e;else if(e.includes("minha_conta/checkout"))window.location.href=`/minha_conta/checkout${a}`;else if(e.includes("checkout"))window.location.href="/checkout";else if(e.includes("presencial")||e.includes("loja"))window.location.href=e;else if(e.includes("/minha_conta/livros"))window.location.href="/minha_conta/livros";else if(t)window.location.href=e;else{const e=a?"&":"?";window.location.href=`/checkout?select=plan${a?e+a.slice(1):""}`}}else window.location.href=t?"/":"/checkout?select=plan"},loginFromLessonRedirectUrl:()=>gon.allow_single_sale?`/checkout?course_id=${gon.course_id}`:"/checkout?select=plan",shouldPreserveReturnTo:e=>["/minha_conta","/aulas","/episodios","/cursos","/programas","/acesso-programa"].some(t=>e.startsWith(t)),getCookie(e){const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length?t.pop().split(";").shift():null}},Do=class extends Zr{static targets=["email","error","loginButton","passwordEye","passwordForLogin","remember"];connect(){}submitLogin(e){e.preventDefault(),this.errorTarget.style.display="none",this.freezeButton(!0),this.disableForm(!0);let t=this,s=document.querySelector('meta[name="csrf-token"]').getAttribute("content");setTimeout(()=>Aa.post("/entrar",t.formLoginData(),{headers:{"X-CSRF-Token":s}}).then(function(e){"logged_in"==e.data.message&&Io.redirectUser(e.data.user_subscription_status)}).catch(function(){t.showErrorMessage(),t.freezeButton(!1),t.disableForm(!1),console.log("error")}),1e3)}submitLoginFromIOS(e){e.preventDefault(),this.errorTarget.style.display="none",this.freezeButton(!0),this.disableForm(!0),console.log(this.formLoginData());let t=this,s=document.querySelector('meta[name="csrf-token"]').getAttribute("content");setTimeout(()=>Aa.post("/login_from_ios",t.formLoginData(),{headers:{"X-CSRF-Token":s}}).then(function(e){"logged_in"==e.data.message&&Io.redirectUser(e.data.user_subscription_status)}).catch(function(){t.showErrorMessage(),t.freezeButton(!1),t.disableForm(!1),console.log("error")}),1e3)}formLoginData(){return{user:{email:this.emailTarget.value.toLowerCase(),password:this.passwordForLoginTarget.value,remember_me:this.rememberTarget.querySelector("input").value}}}freezeButton(e){const t=this.loginButtonTarget;t.disabled=e,t.classList.toggle("button-loading",e),t.innerHTML=e?'\n      <div class="input-group__input-loading">\n        <svg width="80px" height="30px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-ellipsis" style="background: none;">\n          <circle cx="16" cy="50" r="10" fill="#ffffff">\n            <animate attributeName="r" values="13;0;0;0;0" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="0s"></animate>\n            <animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="0s"></animate>\n          </circle>\n          <circle cx="50" cy="50" r="10" fill="#ffffff">\n            <animate attributeName="r" values="0;13;13;13;0" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="-0.8s"></animate>\n            <animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="-0.8s"></animate>\n          </circle>\n          <circle cx="84" cy="50" r="10" fill="#ffffff">\n            <animate attributeName="r" values="0;13;13;13;0" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;
80 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="-0.4s"></animate>\n            <animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" calcMode="spline" dur="1.6s" repeatCount="indefinite" begin="-0.4s"></animate>\n          </circle>\n        </svg>\n      </div>':"Entrar"}disableForm(e){e?(this.emailTarget.setAttribute("disabled",!0),this.passwordForLoginTarget.setAttribute("disabled",!0)):(this.emailTarget.removeAttribute("disabled"),this.passwordForLoginTarget.removeAttribute("disabled"))}showErrorMessage(){this.errorTarget.style.display="block"}checkAllInputs(){this.checkEmail(this.emailTarget)&&this.checkLoginPassword()?this.loginButtonTarget.removeAttribute("disabled"):this.loginButtonTarget.setAttribute("disabled","disabled")}checkEmail(){const e=Fo.emailInput(this.emailTarget.value);return this.emailTarget.parentElement.classList.toggle("input-group__wrong",!e),e}checkLoginPassword(){const e=this.passwordForLoginTarget.value.length>=6;return this.passwordForLoginTarget.parentElement.classList.toggle("input-group__wrong",!e),e}checkRemember(e){e.preventDefault();const t=this.rememberTarget.querySelector("input"),s=this.rememberTarget.querySelector(".login-form__toggle-thumb"),r=1==t.value;t.value=r?0:1,s.classList.toggle("checked",!r)}showHideLoginPassword(){const e=this.passwordForLoginTarget,t=this.passwordEyeTarget.querySelector("svg"),s="password"===e.type;e.setAttribute("type",s?"text":"password"),t.innerHTML=s?'<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="eye" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-eye fa-w-18 fa-3x"><path fill="currentColor" d="M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z" class=""></path></svg>':'<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="eye-slash" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" class="svg-inline--fa fa-eye-slash fa-w-20 fa-3x"><path fill="currentColor" d="M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z" class=""></path></svg>'}},$o=class extends Zr{static targets=["form","email","button","overlay"];connect(){this.processing=!1,this.emailTarget.focus(),this.disableButton()}checkEmail(){const e=this.emailTarget.value,t=""!==e&&Fo.emailInput(e);this.emailTarget.parentElement.classList.toggle("input-group__wrong",!t),this.checkFields()}checkFields(){if(this.processing)return!1;const e=this.emailTarget.value.trim();return""!==e&&Fo.emailInput(e)?(this.enableButton(),!0):(this.disableButton(),!1)}returnKeyPressed(e){13===e.keyCode&&this.checkFields()&&(e.preventDefault(),this.submitForm())}sendForm(e){e.preventDefault(),this.submitForm()}submitForm(){this.processing=!0;try{this.loadingButton(),this.disableForm()}catch(e){}this.element.submit()}disableButton(){this.buttonTarget.setAttribute("disabled",!0)}enableButton(){this.buttonTarget.removeAttribute("disabled"),this.buttonTarget.innerHTML="Enviar"}disableForm(){this.hasOverlayTarget&&(this.overlayTarget.style.display="block"),this.element.querySelectorAll("input").forEach(e
8=>e.setAttribute("readonly",!0))}loadingButton(){this.buttonTarget.setAttribute("disabled",!0),this.buttonTarget.innerHTML='<div class="input-group__input-loading"><svg width="80" height="30" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="16" cy="50" r="10" fill="#ffffff"><animate attributeName="r" values="13;0;0;0;0" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite"/><animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite"/></circle><circle cx="50" cy="50" r="10" fill="#ffffff"><animate attributeName="r" values="0;13;13;13;0" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite" begin="-0.8s"/><animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite" begin="-0.8s"/></circle><circle cx="84" cy="50" r="10" fill="#ffffff"><animate attributeName="r" values="0;13;13;13;0" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite" begin="-0.4s"/><animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite" begin="-0.4s"/></circle></svg></div>'}},qo=class extends Zr{static targets=["form","password","passwordInput","passwordEye","passwordConfirmation","passwordConfirmationInput","passwordConfirmationEye","passwordConfirmationMessage","button","overlay","alert"];connect(){this.disableButton()}checkPassword(){const e=this.passwordInputTarget.value;this.passwordTarget.classList.toggle("input-group__wrong",e.length<6),this.checkFields()}checkPasswordConfirmation(){const e=this.passwordConfirmationInputTarget.value,t=this.hasPasswordConfirmationMessageTarget?this.passwordConfirmationMessageTarget:null;e.length<6?(this.passwordConfirmationTarget.classList.add("input-group__wrong"),t&&(t.style.display="none")):e===this.passwordInputTarget.value?(this.passwordConfirmationTarget.classList.remove("input-group__wrong"),t&&(t.style.display="none")):(this.passwordConfirmationTarget.classList.add("input-group__wrong"),t&&(t.innerHTML="As senhas devem ser id\xeanticas.",t.style.display="")),this.checkFields()}checkFields(){const e=this.passwordInputTarget.value,t=this.passwordConfirmationInputTarget.value;return e.length<6||t.length<6||e!==t?(this.disableButton(),!1):(this.enableButton(),!0)}returnKeyPressed(e){13===e.keyCode&&this.checkFields()&&(e.preventDefault(),this.submitForm())}sendForm(e){e.preventDefault(),this.checkFields()&&this.submitForm()}submitForm(){try{this.disableForm()}catch(e){}this.element.submit()}showHidePassword(){this.togglePasswordVisibility(this.passwordInputTarget,this.passwordEyeTarget)}showHidePasswordConfirmation(){this.togglePasswordVisibility(this.passwordConfirmationInputTarget,this.passwordConfirmationEyeTarget)}togglePasswordVisibility(e,t){const s="password"===e.getAttribute("type");e.setAttribute("type",s?"text":"password"),t.innerHTML=s?'<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="eye" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa"><path fill="currentColor" d="M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"/></svg>':'<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="eye-slash" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" class="svg-inline--fa">
8<path fill="currentColor" d="M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"/></svg>'}disableButton(){this.buttonTarget.setAttribute("disabled",!0)}enableButton(){this.buttonTarget.removeAttribute("disabled")}disableForm(){this.loadingButton(),this.hasOverlayTarget&&(this.overlayTarget.style.display="block"),this.hasAlertTarget&&(this.alertTarget.style.display="none"),this.passwordInputTarget.setAttribute("readonly",!0),this.passwordConfirmationInputTarget.setAttribute("readonly",!0)}loadingButton(){this.buttonTarget.setAttribute("disabled",!0),this.buttonTarget.innerHTML='<div class="input-group__input-loading"><svg width="80" height="30" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="16" cy="50" r="10" fill="#ffffff"><animate attributeName="r" values="13;0;0;0;0" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite"/><animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite"/></circle><circle cx="50" cy="50" r="10" fill="#ffffff"><animate attributeName="r" values="0;13;13;13;0" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite" begin="-0.8s"/><animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite" begin="-0.8s"/></circle><circle cx="84" cy="50" r="10" fill="#ffffff"><animate attributeName="r" values="0;13;13;13;0" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite" begin="-0.4s"/><animate attributeName="cx" values="16;16;50;84;84" keyTimes="0;0.25;0.5;0.75;1" calcMode="spline" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" dur="1.6s" repeatCount="indefinite" begin="-0.4s"/></circle></svg></div>'}},jo=class extends Zr{static targets=["cnpj"];connect(){this.formatCnpj()}formatCnpj(){const e=this.cnpjTarget.value.replace(/\D/g,"").slice(0,14);this.cnpjTarget.value=e.replace(/^(\d{2})(\d)/,"$1.$2").replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3").replace(/\.(\d{3})(\d)/,".$1/$2").replace(/(\d{4})(\d)/,"$1-$2")}};Bo.register("form--oauthLogin",Po),Bo.register("login",Do),Bo.register("form--password-retrieve",$o),Bo.register("form--password-reset",qo),Bo.register("legal-entity-registration",jo)})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.