1(()=>{var $e=!1,Fe=!1,F=[],Ue=-1;function mi(e){gi(e)}function gi(e){F.includes(e)||F.push(e),_i()}function wi(e){let t=F.indexOf(e);t!==-1&&t>Ue&&F.splice(t,1)}function _i(){!Fe&&!$e&&($e=!0,queueMicrotask(bi))}function bi(){$e=!1,Fe=!0;for(let e=0;e<F.length;e++)F[e](),Ue=e;F.length=0,Ue=-1,Fe=!1}var W,U,K,Nt,De=!0;function yi(e){De=!1,e(),De=!0}function vi(e){W=e.reactive,K=e.release,U=t=>e.effect(t,{scheduler:n=>{De?mi(n):n()}}),Nt=e.raw}function Pt(e){U=e}function Si(e){let t=()=>{};return[i=>{let r=U(i);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(s=>s())}),e._x_effects.add(r),t=()=>{r!==void 0&&(e._x_effects.delete(r),K(r))},r},()=>{t()}]}function Mt(e,t){let n=!0,i,r=U(()=>{let s=e();JSON.stringify(s),n?i=s:queueMicrotask(()=>{t(s,i),i=s}),n=!1});return()=>K(r)}var Lt=[],kt=[],Rt=[];function xi(e){Rt.push(e)}function je(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,kt.push(t))}function $t(e){Lt.push(e)}function Ft(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function Ut(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([n,i])=>{(t===void 0||t.includes(n))&&(i.forEach(r=>r()),delete e._x_attributeCleanups[n])})}function Ei(e){var t,n;for((t=e._x_effects)==null||t.forEach(wi);(n=e._x_cleanups)!=null&&n.length;)e._x_cleanups.pop()()}var Be=new MutationObserver(Ge),qe=!1;function ze(){Be.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),qe=!0}function Dt(){Ii(),Be.disconnect(),qe=!1}var ee=[];function Ii(){let e=Be.takeRecords();ee.push(()=>e.length>0&&Ge(e));let t=ee.length;queueMicrotask(()=>{if(ee.length===t)for(;ee.length>0;)ee.shift()()})}function _(e){if(!qe)return e();Dt();let t=e();return ze(),t}var He=!1,fe=[];function Ai(){He=!0}function Ci(){He=!1,Ge(fe),fe=[]}function Ge(e){if(He){fe=fe.concat(e);return}let t=[],n=new Set,i=new Map,r=new Map;for(let s=0;s<e.length;s++)if(!e[s].target._x_ignoreMutationObserver&&(e[s].type==="childList"&&(e[s].removedNodes.forEach(o=>{o.nodeType===1&&o._x_marker&&n.add(o)}),e[s].addedNodes.forEach(o=>{if(o.nodeType===1){if(n.has(o)){n.delete(o);return}o._x_marker||t.push(o)}})),e[s].type==="attributes")){let o=e[s].target,a=e[s].attributeName,l=e[s].oldValue,c=()=>{i.has(o)||i.set(o,[]),i.get(o).push({name:a,value:o.getAttribute(a)})},u=()=>{r.has(o)||r.set(o,[]),r.get(o).push(a)};o.hasAttribute(a)&&l===null?c():o.hasAttribute(a)?(u(),c()):u()}r.forEach((s,o)=>{Ut(o,s)}
vendor: 19,733 bytes, lines 1-5
1),i.forEach((s,o)=>{Lt.forEach(a=>a(o,s))});for(let s of n)t.some(o=>o.contains(s))||kt.forEach(o=>o(s));for(let s of t)s.isConnected&&Rt.forEach(o=>o(s));t=null,n=null,i=null,r=null}function jt(e){return ne(V(e))}function te(e,t,n){return e._x_dataStack=[t,...V(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter(i=>i!==t)}}function V(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?V(e.host):e.parentNode?V(e.parentNode):[]}function ne(e){return new Proxy({objects:e},Ti)}var Ti={ownKeys({objects:e}){return Array.from(new Set(e.flatMap(t=>Object.keys(t))))},has({objects:e},t){return t==Symbol.unscopables?!1:e.some(n=>Object.prototype.hasOwnProperty.call(n,t)||Reflect.has(n,t))},get({objects:e},t,n){return t=="toJSON"?Oi:Reflect.get(e.find(i=>Reflect.has(i,t))||{},t,n)},set({objects:e},t,n,i){const r=e.find(o=>Object.prototype.hasOwnProperty.call(o,t))||e[e.length-1],s=Object.getOwnPropertyDescriptor(r,t);return s!=null&&s.set&&(s!=null&&s.get)?s.set.call(i,n)||!0:Reflect.set(r,t,n)}};function Oi(){return Reflect.ownKeys(this).reduce((t,n)=>(t[n]=Reflect.get(this,n),t),{})}function Bt(e){let t=i=>typeof i=="object"&&!Array.isArray(i)&&i!==null,n=(i,r="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([s,{value:o,enumerable:a}])=>{if(a===!1||o===void 0||typeof o=="object"&&o!==null&&o.__v_skip)return;let l=r===""?s:`${r}.${s}`;typeof o=="object"&&o!==null&&o._x_interceptor?i[s]=o.initialize(e,l,s):t(o)&&o!==i&&!(o instanceof Element)&&n(o,l)})};return n(e)}function qt(e,t=()=>{}){let n={initialValue:void 0,_x_interceptor:!0,initialize(i,r,s){return e(this.initialValue,()=>Ni(i,r),o=>We(i,r,o),r,s)}};return t(n),i=>{if(typeof i=="object"&&i!==null&&i._x_interceptor){let r=n.initialize.bind(n);n.initialize=(s,o,a)=>{let l=i.initialize(s,o,a);return n.initialValue=l,r(s,o,a)}}else n.initialValue=i;return n}}function Ni(e,t){return t.split(".").reduce((n,i)=>n[i],e)}function We(e,t,n){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=n;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),We(e[t[0]],t.slice(1),n)}}var zt={};function I(e,t){zt[e]=t}function Ke(e,t){let n=Pi(t);return Object.entries(zt).forEach(([i,r])=>{Object.defineProperty(e,`$${i}`,{get(){return r(t,n)},enumerable:!1})}),e}function Pi(e){let[t,n]=Xt(e),i={interceptor:qt,...t};return je(e,n),i}function Mi(e,t,n,...i){try{return n(...i)}catch(r){ie(r,e,t)}}function ie(e,t,n=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:n}),console.warn(`Alpine Expression Error: ${e.message} 2 3${n?'Expression: "'+n+`" 4 5`:""}`,t),setTimeout(()=>{throw e},0)}var he=!0;function Ht(e){let t=he;he=!1;let n=e();return he=t,n}function D(e,t,n={}){let i;return S(e,t)(r=>i=r,n),i}function S(...e){return Gt(...e)}var Gt=Wt;function Li(e){Gt=e}function Wt(e,t){let n={};Ke(n,e);let i=[n,...V(e)],r=typeof t=="function"?ki(i,t):$i(i,t,e);return Mi.bind(null,e,t,r)}function ki(e,t){return(n=()=>{},{scope:i={},params:r=[],context:s}={})=>{let o=t.apply(ne([i,...e]),r);pe(n,o)}}var Ve={};function Ri(e,t){if(Ve[e])return Ve[e];let n=Object.getPrototypeOf(async function(){}).constructor,i=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,s=(()=>{try{let o=new n(["__self","scope"],`with (scope) { __self.result = ${i} }; __self.finished = true; return __self.result;`);return Object.defineProperty(o,"name",{value:`[Alpine] ${e}`}),o}catch(o){return ie(o,t,e),Promise.resolve()}})();return Ve[e]=s,s}function $i(e,t,n){let i=Ri(t,n);return(r=()=>{},{scope:s={},params:o=[],context:a}={})=>{i.result=void 0,i.finished=!1;let l=ne([s,...e]);if(typeof i=="function"){let c=i.call(a,i,l).catch(u=>ie(u,n,t));i.finished?(pe(r,i.result,l,o,n),i.result=void 0):c.then(u=>{pe(r,u,l,o,n)}).catch(u=>ie(u,n,t)).finally(()=>i.result=void 0)}}}function pe(e,t,n,i,r){if(he&&typeof t=="function"){let s=t.apply(n,i);s instanceof Promise?s.then(o=>pe(e,o,n,i)).catch(o=>ie(o,r,t)):e(s)}else typeof t=="object"&&t instanceof Promise?t.then(s=>e(s)):e(t)}var Xe="x-";function X(e=""){return Xe+e}function Fi(e){Xe=e}var me={};function y(e,t){return me[e]=t,{before(n){if(!me[n]){console.warn(String.raw`Cannot find directive \`${n}\`. \`${e}\` will use the default order of execution`);return}const i=j.indexOf(n);j.splice(i>=0?i:j.indexOf("DEFAULT"),0,e)}}}function Ui(e){return Object.keys(me).includes(e)}function Ye(e,t,n){if(t=Array.from(t),e._x_virtualDirectives){let s=Object.entries(e._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),o=Kt(s);s=s.map(a=>o.find(l=>l.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),t=t.concat(s)}let i={};return t.map(Zt((s,o)=>i[s]=o)).filter(en).map(Bi(i,n)).sort(qi).map(s=>ji(e,s))}function Kt(e){return Array.from(e).map(Zt()).filter(t=>!en(t))}var Je=!1,re=new Map,Vt=Symbol();function Di(e){Je=!0;let t=Symbol();Vt=t,re.set(t,[]);let n=()=>{for(;re.get(t).length;)re.get(t).shift()();re.delete(t)},i=()=>{Je=!1,n()};e(n),i()}function Xt(e){let t=[],n=a=>t.push(a),[i,r]=Si(e);return t.push(r),[{Alpine:ae,effect:i,cleanup:n,evaluateLater:S.bind(S,e),evaluate:D.bind(D,e)},()=>t.forEach(a=>a())]}function ji(e,t){let n=()=>{},i=me[t.type]||n,[r,s]=Xt(e);Ft(e,t.original,s);let o=()=>{e._x_ignore||e._x_ignoreSelf||(i.inline&&i.inline(e,t,r),i=i.bind(i,e,t,r),Je?re.get(Vt).push(i):i())};return o.runCleanups=s,o}var Yt=(e,t)=>({name:n,value:i})=>(n.startsWith(e)&&(n=n.replace(e,t)),{name:n,value:i}),Jt=e=>e;function Zt(e=()=>{}){return({name:t,value:n})=>{let{name:i,value:r}=Qt.reduce((s,o)=>o(s),{name:t,value:n});return i!==t&&e(i,t),{name:i,value:r}}}var Qt=[];function Ze(e){Qt.push(e)}function en({name:e}){return tn().test(e)}var tn=()=>new RegExp(`^${Xe}([^:^.]+)\\b`);function Bi(e,t){return({name:n,value:i})=>{let r=n.match(tn()),s=n.match(/:([a-zA-Z0-9\-_:]+)/),o=n.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[n]||n;return{type:r?r[1]:null,value:s?s[1]:null,modifiers:o.map(l=>l.replace(".","")),expression:i,original:a}}}var Qe="DEFAULT",j=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",Qe,"teleport"];function qi(e,t){let n=j.indexOf(e.type)===-1?Qe:e.type,i=j.indexOf(t.type)===-1?Qe:t.type;return j.indexOf(n)-j.indexOf(i)}function se(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function B(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(r=>B(r,t));return}let n=!1;if(t(e,()=>n=!0),n)return;let i=e.firstElementChild;for(;i;)B(i,t),i=i.nextElementSibling}function E(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var nn=!1;function zi(){nn&&E("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),nn=!0,document.body||E("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),se(document,"alpine:init"),se(document,"alpine:initializing"),ze(),xi(t=>O(t,B)),je(t=>J(t)),$t((t,n)=>{Ye(t,n).forEach(i=>i())});let e=t=>!ge(t.parentElement,!0);Array.from(document.querySelectorAll(on().join(","))).filter(e).forEach(t=>{O(t)}),se(document,"alpine:initialized"),setTimeout(()=>{Ki()})}var et=[],rn=[];function sn(){return et.map(e=>e())}function on(){return et.concat(rn).map(e=>e())}function an(e){et.push(e)}function ln(e){rn.push(e)}function ge(e,t=!1){return Y(e,n=>{if((t?on():sn()).some(r=>n.matches(r)))return!0})}function Y(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return Y(e.parentElement,t)}}function Hi(e){return sn().some(t=>e.matches(t))}var cn=[];function Gi(e){cn.push(e)}var Wi=1;function O(e,t=B,n=()=>{}){Y(e,i=>i._x_ignore)||Di(()=>{t(e,(i,r)=>{i._x_marker||(n(i,r),cn.forEach(s=>s(i,r)),Ye(i,i.attributes).forEach(s=>s()),i._x_ignore||(i._x_marker=Wi++),i._x_ignore&&r())})})}function J(e,t=B){t(e,n=>{Ei(n),Ut(n),delete n._x_marker})}function Ki(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,n,i])=>{Ui(n)||i.some(r=>{if(document.querySelector(r))return E(`found "${r}", but missing ${t} plugin`),!0})})}var tt=[],nt=!1;function it(e=()=>{}){return queueMicrotask(()=>{nt||setTimeout(()=>{rt()})}),new Promise(t=>{tt.push(()=>{e(),t()})})}function rt(){for(nt=!1;tt.length;)tt.shift()()}function Vi(){nt=!0}function st(e,t){return Array.isArray(t)?un(e,t.join(" ")):typeof t=="object"&&t!==null?Xi(e,t):typeof t=="function"?st(e,t()):un(e,t)}function un(e,t){let n=r=>r.split(" ").filter(s=>!e.classList.contains(s)).filter(Boolean),i=r=>(e.classList.add(...r),()=>{e.classList.remove(...r)});return t=t===!0?t="":t||"",i(n(t))}function Xi(e,t){let n=a=>a.split(" ").filter(Boolean),i=Object.entries(t).flatMap(([a,l])=>l?n(a):!1).filter(Boolean),r=Object.entries(t).flatMap(([a,l])=>l?!1:n(a)).filter(Boolean),s=[],o=[];return r.forEach(a=>{e.classList.contains(a)&&(e.classList.remove(a),o.push(a))}),i.forEach(a=>{e.classList.contains(a)||(e.classList.add(a),s.push(a))}),()=>{o.forEach(a=>e.classList.add(a)),s.forEach(a=>e.classList.remove(a))}}function we(e,t){return typeof t=="object"&&t!==null?Yi(e,t):Ji(e,t)}function Yi(e,t){let n={};return Object.entries(t).forEach(([i,r])=>{n[i]=e.style[i],i.startsWith("--")||(i=Zi(i)),e.style.setProperty(i,r)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{we(e,n)}}function Ji(e,t){let n=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",n||"")}}function Zi(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ot(e,t=()=>{}){let n=!1;return function(){n?t.apply(this,arguments):(n=!0,e.apply(this,arguments))}}y("transition",(e,{value:t,modifiers:n,expression:i},{evaluate:r})=>{typeof i=="function"&&(i=r(i)),i!==!1&&(!i||typeof i=="boolean"?er(e,n,t):Qi(e,i,t))});function Qi(e,t,n){dn(e,st,""),{enter:r=>{e._x_transition.enter.during=r},"enter-start":r=>{e._x_transition.enter.start=r},"enter-end":r=>{e._x_transition.enter.end=r},leave:r=>{e._x_transition.leave.during=r},"leave-start":r=>{e._x_transition.leave.start=r},"leave-end":r=>{e._x_transition.leave.end=r}}[n](t)}function er(e,t,n){dn(e,we);let i=!t.includes("in")&&!t.includes("out")&&!n,r=i||t.includes("in")||["enter"].includes(n),s=i||t.includes("out")||["leave"].includes(n);t.includes("in")&&!i&&(t=t.filter((m,w)=>w<t.indexOf("out"))),t.includes("out")&&!i&&(t=t.filter((m,w)=>w>t.indexOf("out")));let o=!t.includes("opacity")&&!t.includes("scale"),a=o||t.includes("opacity"),l=o||t.includes("scale"),c=a?0:1,u=l?oe(t,"scale",95)/100:1,d=oe(t,"delay",0)/1e3,h=oe(t,"origin","center"),p="opacity, transform",C=oe(t,"duration",150)/1e3,G=oe(t,"duration",75)/1e3,f="cubic-bezier(0.4, 0.0, 0.2, 1)";r&&(e._x_transition.enter.during={transformOrigin:h,transitionDelay:`${d}s`,transitionProperty:p,transitionDuration:`${C}s`,transitionTimingFunction:f},e._x_transition.enter.start={opacity:c,transform:`scale(${u})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),s&&(e._x_transition.leave.during={transformOrigin:h,transitionDelay:`${d}s`,transitionProperty:p,transitionDuration:`${G}s`,transitionTimingFunction:f},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${u})`})}function dn(e,t,n={}){e._x_transition||(e._x_transition={enter:{during:n,start:n,end:n},leave:{during:n,start:n,end:n},in(i=()=>{},r=()=>{}){at(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},i,r)},out(i=()=>{},r=()=>{}){at(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},i,r)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,n,i){const r=document.visibilityState==="visible"?requestAnimationFrame:setTimeout;let s=()=>r(n);if(t){e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(n):s():e._x_transition?e._x_transition.in(n):s();return}e._x_hidePromise=e._x_transition?new Promise((o,a)=>{e._x_transition.out(()=>{},()=>o(i)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(i),queueMicrotask(()=>{let o=fn(e);o?(o._x_hideChildren||(o._x_hideChildren=[]),o._x_hideChildren.push(e)):r(()=>{let a=l=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([u])=>u==null?void 0:u());return delete l._x_hidePromise,delete l._x_hideChildren,c};a(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function fn(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:fn(t)}function at(e,t,{during:n,start:i,end:r}={},s=()=>{},o=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(n).length===0&&Object.keys(i).length===0&&Object.keys(r).length===0){s(),o();return}let a,l,c;tr(e,{start(){a=t(e,i)},during(){l=t(e,n)},before:s,end(){a(),c=t(e,r)},after:o,cleanup(){l(),c()}})}function tr(e,t){let n,i,r,s=ot(()=>{_(()=>{n=!0,i||t.before(),r||(t.end(),rt()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(o){this.beforeCancels.push(o)},cancel:ot(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();s()}),finish:s},_(()=>{t.start(),t.during()}),Vi(),requestAnimationFrame(()=>{if(n)return;let o=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;o===0&&(o=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),_(()=>{t.before()}),i=!0,requestAnimationFrame(()=>{n||(_(()=>{t.end()}),rt(),setTimeout(e._x_transitioning.finish,o+a),r=!0)})})}function oe(e,t,n){if(e.indexOf(t)===-1)return n;const i=e[e.indexOf(t)+1];if(!i||t==="scale"&&isNaN(i))return n;if(t==="duration"||t==="delay"){let r=i.match(/([0-9]+)ms/);if(r)return r[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[i,e[e.indexOf(t)+2]].join(" "):i}var P=!1;function M(e,t=()=>{}){return(...n)=>P?t(...n):e(...n)}function nr(e){return(...t)=>P&&e(...t)}var hn=[];function _e(e){hn.push(e)}function ir(e,t){hn.forEach(n=>n(e,t)),P=!0,pn(()=>{O(t,(n,i)=>{i(n,()=>{})})}),P=!1}var lt=!1;function rr(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),P=!0,lt=!0,pn(()=>{sr(t)}),P=!1,lt=!1}function sr(e){let t=!1;O(e,(i,r)=>{B(i,(s,o)=>{if(t&&Hi(s))return o();t=!0,r(s,o)})})}function pn(e){let t=U;Pt((n,i)=>{let r=t(n);return K(r),()=>{}}),e(),Pt(t)}function mn(e,t,n,i=[]){switch(e._x_bindings||(e._x_bindings=W({})),e._x_bindings[t]=n,t=i.includes("camel")?hr(t):t,t){case"value":or(e,n);break;case"style":lr(e,n);break;case"class":ar(e,n);break;case"selected":case"checked":cr(e,t,n);break;default:gn(e,t,n);break}}function or(e,t){if(yn(e))e.attributes.value===void 0&&(e.value=t),window.fromModel&&(typeof t=="boolean"?e.checked=be(e.value)===t:e.checked=wn(e.value,t));else if(ct(e))Number.isInteger(t)?e.value=t:!Array.isArray(t)&&typeof t!="boolean"&&![null,void 0].includes(t)?e.value=String(t):Array.isArray(t)?e.checked=t.some(n=>wn(n,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")fr(e,t);else{if(e.value===t)return;e.value=t===void 0?"":t}}function ar(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=st(e,t)}function lr(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=we(e,t)}function cr(e,t,n){gn(e,t,n),dr(e,t,n)}function gn(e,t,n){[null,void 0,!1].includes(n)&&mr(t)?e.removeAttribute(t):(_n(t)&&(n=t),ur(e,t,n))}function ur(e,t,n){e.getAttribute(t)!=n&&e.setAttribute(t,n)}function dr(e,t,n){e[t]!==n&&(e[t]=n)}function fr(e,t){const n=[].concat(t).map(i=>i+"");Array.from(e.options).forEach(i=>{i.selected=n.includes(i.value)})}function hr(e){return e.toLowerCase().replace(/-(\w)/g,(t,n)=>n.toUpperCase())}function wn(e,t){return e==t}function be(e){return[1,"1","true","on","yes",!0].includes(e)?!0:[0,"0","false","off","no",!1].includes(e)?!1:e?!!e:null}var pr=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);function _n(e){return pr.has(e)}function mr(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function gr(e,t,n){return e._x_bindings&&e._x_bindings[t]!==void 0?e._x_bindings[t]:bn(e,t,n)}function wr(e,t,n,i=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let r=e._x_inlineBindings[t];return r.extract=i,Ht(()=>D(e,r.expression))}return bn(e,t,n)}function bn(e,t,n){let i=e.getAttribute(t);return i===null?typeof n=="function"?n():n:i===""?!0:_n(t)?!![t,"true"].includes(i):i}function ct(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function yn(e){return e.type==="radio"||e.localName==="ui-radio"}function vn(e,t){let n;return function(){const i=this,r=arguments,s=function(){n=null,e.apply(i,r)};clearTimeout(n),n=setTimeout(s,t)}}function Sn(e,t){let n;return function(){let i=this,r=arguments;n||(e.apply(i,r),n=!0,setTimeout(()=>n=!1,t))}}function xn({get:e,set:t},{get:n,set:i}){let r=!0,s,o=U(()=>{let a=e(),l=n();if(r)i(ut(a)),r=!1;else{let c=JSON.stringify(a),u=JSON.stringify(l);c!==s?i(ut(a)):c!==u&&t(ut(l))}s=JSON.stringify(e()),JSON.stringify(n())});return()=>{K(o)}}function ut(e){return typeof e=="object"?JSON.parse(JSON.stringify(e)):e}function _r(e){(Array.isArray(e)?e:[e]).forEach(n=>n(ae))}var q={},En=!1;function br(e,t){if(En||(q=W(q),En=!0),t===void 0)return q[e];q[e]=t,Bt(q[e]),typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&q[e].init()}function yr(){return q}var In={};function vr(e,t){let n=typeof t!="function"?()=>t:t;return e instanceof Element?An(e,n()):(In[e]=n,()=>{})}function Sr(e){return Object.entries(In).forEach(([t,n])=>{Object.defineProperty(e,t,{get(){return(...i)=>n(...i)}})}),e}function An(e,t,n){let i=[];for(;i.length;)i.pop()();let r=Object.entries(t).map(([o,a])=>({name:o,value:a})),s=Kt(r);return r=r.map(o=>s.find(a=>a.name===o.name)?{name:`x-bind:${o.name}`,value:`"${o.value}"`}:o),Ye(e,r,n).map(o=>{i.push(o.runCleanups),o()}),()=>{for(;i.length;)i.pop()()}}var Cn={};function xr(e,t){Cn[e]=t}function Er(e,t){return Object.entries(Cn).forEach(([n,i])=>{Object.defineProperty(e,n,{get(){return(...r)=>i.bind(t)(...r)},enumerable:!1})}),e}var Ir={get reactive(){return W},get release(){return K},get effect(){return U},get raw(){return Nt},version:"3.15.1",flushAndStopDeferringMutations:Ci,dontAutoEvaluateFunctions:Ht,disableEffectScheduling:yi,startObservingMutations:ze,stopObservingMutations:Dt,setReactivityEngine:vi,onAttributeRemoved:Ft,onAttributesAdded:$t,closestDataStack:V,skipDuringClone:M,onlyDuringClone:nr,addRootSelector:an,addInitSelector:ln,interceptClone:_e,addScopeToNode:te,deferMutations:Ai,mapAttributes:Ze,evaluateLater:S,interceptInit:Gi,setEvaluator:Li,mergeProxies:ne,extractProp:wr,findClosest:Y,onElRemoved:je,closestRoot:ge,destroyTree:J,interceptor:qt,transition:at,setStyles:we,mutateDom:_,directive:y,entangle:xn,throttle:Sn,debounce:vn,evaluate:D,initTree:O,nextTick:it,prefixed:X,prefix:Fi,plugin:_r,magic:I,store:br,start:zi,clone:rr,cloneNode:ir,bound:gr,$data:jt,wat
5ch:Mt,walk:B,data:xr,bind:vr},ae=Ir;function Ar(e,t){const n=Object.create(null),i=e.split(",");for(let r=0;r<i.length;r++)n[i[r]]=!0;return r=>!!n[r]}var Cr=Object.freeze({}),Tr=Object.prototype.hasOwnProperty,ye=(e,t)=>Tr.call(e,t),z=Array.isArray,le=e=>Tn(e)==="[object Map]",Or=e=>typeof e=="string",dt=e=>typeof e=="symbol",ve=e=>e!==null&&typeof e=="object",Nr=Object.prototype.toString,Tn=e=>Nr.call(e),On=e=>Tn(e).slice(8,-1),ft=e=>Or(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Pr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Mr=Pr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Nn=(e,t)=>e!==t&&(e===e||t===t),ht=new WeakMap,ce=[],T,H=Symbol("iterate"),pt=Symbol("Map key iterate");function Lr(e){return e&&e._isEffect===!0}function kr(e,t=Cr){Lr(e)&&(e=e.raw);const n=Fr(e,t);return t.lazy||n(),n}function Rr(e){e.active&&(Pn(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var $r=0;function Fr(e,t){const n=function(){if(!n.active)return e();if(!ce.includes(n)){Pn(n);try{return Dr(),ce.push(n),T=n,e()}finally{ce.pop(),Mn(),T=ce[ce.length-1]}}};return n.id=$r++,n.allowRecurse=!!t.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}function Pn(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}var Z=!0,mt=[];function Ur(){mt.push(Z),Z=!1}function Dr(){mt.push(Z),Z=!0}function Mn(){const e=mt.pop();Z=e===void 0?!0:e}function A(e,t,n){if(!Z||T===void 0)return;let i=ht.get(e);i||ht.set(e,i=new Map);let r=i.get(n);r||i.set(n,r=new Set),r.has(T)||(r.add(T),T.deps.push(r),T.options.onTrack&&T.options.onTrack({effect:T,target:e,type:t,key:n}))}function L(e,t,n,i,r,s){const o=ht.get(e);if(!o)return;const a=new Set,l=u=>{u&&u.forEach(d=>{(d!==T||d.allowRecurse)&&a.add(d)})};if(t==="clear")o.forEach(l);else if(n==="length"&&z(e))o.forEach((u,d)=>{(d==="length"||d>=i)&&l(u)});else switch(n!==void 0&&l(o.get(n)),t){case"add":z(e)?ft(n)&&l(o.get("length")):(l(o.get(H)),le(e)&&l(o.get(pt)));break;case"delete":z(e)||(l(o.get(H)),le(e)&&l(o.get(pt)));break;case"set":le(e)&&l(o.get(H));break}const c=u=>{u.options.onTrigger&&u.options.onTrigger({effect:u,target:e,key:n,type:t,newValue:i,oldValue:r,oldTarget:s}),u.options.scheduler?u.options.scheduler(u):u()};a.forEach(c)}var jr=Ar("__proto__,__v_isRef,__isVue"),Ln=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(dt)),Br=Rn(),qr=Rn(!0),kn=zr();function zr(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const i=g(this);for(let s=0,o=this.length;s<o;s++)A(i,"get",s+"");const r=i[t](...n);return r===-1||r===!1?i[t](...n.map(g)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Ur();const i=g(this)[t].apply(this,n);return Mn(),i}}),e}function Rn(e=!1,t=!1){return function(i,r,s){if(r==="__v_isReactive")return!e;if(r==="__v_isReadonly")return e;if(r==="__v_raw"&&s===(e?t?is:zn:t?ns:qn).get(i))return i;const o=z(i);if(!e&&o&&ye(kn,r))return Reflect.get(kn,r,s);const a=Reflect.get(i,r,s);return(dt(r)?Ln.has(r):jr(r))||(e||A(i,"get",r),t)?a:yt(a)?!o||!ft(r)?a.value:a:ve(a)?e?Hn(a):bt(a):a}}var Hr=Gr();function Gr(e=!1){return function(n,i,r,s){let o=n[i];if(!e&&(r=g(r),o=g(o),!z(n)&&yt(o)&&!yt(r)))return o.value=r,!0;const a=z(n)&&ft(i)?Number(i)<n.length:ye(n,i),l=Reflect.set(n,i,r,s);return n===g(s)&&(a?Nn(r,o)&&L(n,"set",i,r,o):L(n,"add",i,r)),l}}function Wr(e,t){const n=ye(e,t),i=e[t],r=Reflect.deleteProperty(e,t);return r&&n&&L(e,"delete",t,void 0,i),r}function Kr(e,t){const n=Reflect.has(e,t);return(!dt(t)||!Ln.has(t))&&A(e,"has",t),n}function Vr(e){return A(e,"iterate",z(e)?"length":H),Reflect.ownKeys(e)}var Xr={get:Br,set:Hr,deleteProperty:Wr,has:Kr,ownKeys:Vr},Yr={get:qr,set(e,t){return console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},gt=e=>ve(e)?bt(e):e,wt=e=>ve(e)?Hn(e):e,_t=e=>e,Se=e=>Reflect.getPrototypeOf(e);function xe(e,t,n=!1,i=!1){e=e.__v_raw;const r=g(e),s=g(t);t!==s&&!n&&A(r,"get",t),!n&&A(r,"get",s);const{has:o}=Se(r),a=i?_t:n?wt:gt;if(o.call(r,t))return a(e.get(t));if(o.call(r,s))return a(e.get(s));e!==r&&e.get(t)}function Ee(e,t=!1){const n=this.__v_raw,i=g(n),r=g(e);return e!==r&&!t&&A(i,"has",e),!t&&A(i,"has",r),e===r?n.has(e):n.has(e)||n.has(r)}function Ie(e,t=!1){return e=e.__v_raw,!t&&A(g(e),"iterate",H),Reflect.get(e,"size",e)}function $n(e){e=g(e);const t=g(this);return Se(t).has.call(t,e)||(t.add(e),L(t,"add",e,e)),this}function Fn(e,t){t=g(t);const n=g(this),{has:i,get:r}=Se(n);let s=i.call(n,e);s?Bn(n,i,e):(e=g(e),s=i.call(n,e));const o=r.call(n,e);return n.set(e,t),s?Nn(t,o)&&L(n,"set",e,t,o):L(n,"add",e,t),this}function Un(e){const t=g(this),{has:n,get:i}=Se(t);let r=n.call(t,e);r?Bn(t,n,e):(e=g(e),r=n.call(t,e));const s=i?i.call(t,e):void 0,o=t.delete(e);return r&&L(t,"delete",e,void 0,s),o}function Dn(){const e=g(this),t=e.size!==0,n=le(e)?new Map(e):new Set(e),i=e.clear();return t&&L(e,"clear",void 0,void 0,n),i}function Ae(e,t){return function(i,r){const s=this,o=s.__v_raw,a=g(o),l=t?_t:e?wt:gt;return!e&&A(a,"iterate",H),o.forEach((c,u)=>i.call(r,l(c),l(u),s))}}function Ce(e,t,n){return function(...i){const r=this.__v_raw,s=g(r),o=le(s),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=r[e](...i),u=n?_t:t?wt:gt;return!t&&A(s,"iterate",l?pt:H),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function k(e){return function(...t){{const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${Mr(e)} operation ${n}failed: target is readonly.`,g(this))}return e==="delete"?!1:this}}function Jr(){const e={get(s){return xe(this,s)},get size(){return Ie(this)},has:Ee,add:$n,set:Fn,delete:Un,clear:Dn,forEach:Ae(!1,!1)},t={get(s){return xe(this,s,!1,!0)},get size(){return Ie(this)},has:Ee,add:$n,set:Fn,delete:Un,clear:Dn,forEach:Ae(!1,!0)},n={get(s){return xe(this,s,!0)},get size(){return Ie(this,!0)},has(s){return Ee.call(this,s,!0)},add:k("add"),set:k("set"),delete:k("delete"),clear:k("clear"),forEach:Ae(!0,!1)},i={get(s){return xe(this,s,!0,!0)},get size(){return Ie(this,!0)},has(s){return Ee.call(this,s,!0)},add:k("add"),set:k("set"),delete:k("delete"),clear:k("clear"),forEach:Ae(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>
5{e[s]=Ce(s,!1,!1),n[s]=Ce(s,!0,!1),t[s]=Ce(s,!1,!0),i[s]=Ce(s,!0,!0)}),[e,n,t,i]}var[Zr,Qr]=Jr();function jn(e,t){const n=e?Qr:Zr;return(i,r,s)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?i:Reflect.get(ye(n,r)&&r in i?n:i,r,s)}var es={get:jn(!1)},ts={get:jn(!0)};function Bn(e,t,n){const i=g(n);if(i!==n&&t.call(e,i)){const r=On(e);console.warn(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var qn=new WeakMap,ns=new WeakMap,zn=new WeakMap,is=new WeakMap;function rs(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ss(e){return e.__v_skip||!Object.isExtensible(e)?0:rs(On(e))}function bt(e){return e&&e.__v_isReadonly?e:Gn(e,!1,Xr,es,qn)}function Hn(e){return Gn(e,!0,Yr,ts,zn)}function Gn(e,t,n,i,r){if(!ve(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const o=ss(e);if(o===0)return e;const a=new Proxy(e,o===2?i:n);return r.set(e,a),a}function g(e){return e&&g(e.__v_raw)||e}function yt(e){return!!(e&&e.__v_isRef===!0)}I("nextTick",()=>it),I("dispatch",e=>se.bind(se,e)),I("watch",(e,{evaluateLater:t,cleanup:n})=>(i,r)=>{let s=t(i),a=Mt(()=>{let l;return s(c=>l=c),l},r);n(a)}),I("store",yr),I("data",e=>jt(e)),I("root",e=>ge(e)),I("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=ne(os(e))),e._x_refs_proxy));function os(e){let t=[];return Y(e,n=>{n._x_refs&&t.push(n._x_refs)}),t}var vt={};function Wn(e){return vt[e]||(vt[e]=0),++vt[e]}function as(e,t){return Y(e,n=>{if(n._x_ids&&n._x_ids[t])return!0})}function ls(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Wn(t))}I("id",(e,{cleanup:t})=>(n,i=null)=>{let r=`${n}${i?`-${i}`:""}`;return cs(e,r,t,()=>{let s=as(e,n),o=s?s._x_ids[n]:Wn(n);return i?`${n}-${o}-${i}`:`${n}-${o}`})}),_e((e,t)=>{e._x_id&&(t._x_id=e._x_id)});function cs(e,t,n,i){if(e._x_id||(e._x_id={}),e._x_id[t])return e._x_id[t];let r=i();return e._x_id[t]=r,n(()=>{delete e._x_id[t]}),r}I("el",e=>e),Kn("Focus","focus","focus"),Kn("Persist","persist","persist");function Kn(e,t,n){I(t,i=>E(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${n}`,i))}y("modelable",(e,{expression:t},{effect:n,evaluateLater:i,cleanup:r})=>{let s=i(t),o=()=>{let u;return s(d=>u=d),u},a=i(`${t} = __placeholder`),l=u=>a(()=>{},{scope:{__placeholder:u}}),c=o();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let u=e._x_model.get,d=e._x_model.set,h=xn({get(){return u()},set(p){d(p)}},{get(){return o()},set(p){l(p)}});r(h)})}),y("teleport",(e,{modifiers:t,expression:n},{cleanup:i})=>{e.tagName.toLowerCase()!=="template"&&E("x-teleport can only be used on a <template> tag",e);let r=Vn(n),s=e.content.cloneNode(!0).firstElementChild;e._x_teleport=s,s._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),s.setAttribute("data-teleport-target",!0),e._x_forwardEvents&&e._x_forwardEvents.forEach(a=>{s.addEventListener(a,l=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})}),te(s,{},e);let o=(a,l,c)=>{c.includes("prepend")?l.parentNode.insertBefore(a,l):c.includes("append")?l.parentNode.insertBefore(a,l.nextSibling):l.appendChild(a)};_(()=>{o(s,r,t),M(()=>{O(s)})()}),e._x_teleportPutBack=()=>{let a=Vn(n);_(()=>{o(e._x_teleport,a,t)})},i(()=>_(()=>{s.remove(),J(s)}))});var us=document.createElement("div");function Vn(e){let t=M(()=>document.querySelector(e),()=>us)();return t||E(`Cannot find x-teleport element for selector: "${e}"`),t}var Xn=()=>{};Xn.inline=(e,{modifiers:t},{cleanup:n})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,n(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})},y("ignore",Xn),y("effect",M((e,{expression:t},{effect:n})=>{n(S(e,t))}));function St(e,t,n,i){let r=e,s=l=>i(l),o={},a=(l,c)=>u=>c(l,u);if(n.includes("dot")&&(t=ds(t)),n.includes("camel")&&(t=fs(t)),n.includes("passive")&&(o.passive=!0),n.includes("capture")&&(o.capture=!0),n.includes("window")&&(r=window),n.includes("document")&&(r=document),n.includes("debounce")){let l=n[n.indexOf("debounce")+1]||"invalid-wait",c=Te(l.split("ms")[0])?Number(l.split("ms")[0]):250;s=vn(s,c)}if(n.includes("throttle")){let l=n[n.indexOf("throttle")+1]||"invalid-wait",c=Te(l.split("ms")[0])?Number(l.split("ms")[0]):250;s=Sn(s,c)}return n.includes("prevent")&&(s=a(s,(l,c)=>{c.preventDefault(),l(c)})),n.includes("stop")&&(s=a(s,(l,c)=>{c.stopPropagation(),l(c)})),n.includes("once")&&(s=a(s,(l,c)=>{l(c),r.removeEventListener(t,s,o)})),(n.includes("away")||n.includes("outside"))&&(r=document,s=a(s,(l,c)=>{e.contains(c.target)||c.target.isConnected!==!1&&(e.offsetWidth<1&&e.offsetHeight<1||e._x_isShown!==!1&&l(c))})),n.includes("self")&&(s=a(s,(l,c)=>{c.target===e&&l(c)})),(ps(t)||Yn(t))&&(s=a(s,(l,c)=>{ms(c,n)||l(c)})),r.addEventListener(t,s,o),()=>{r.removeEventListener(t,s,o)}}function ds(e){return e.replace(/-/g,".")}function fs(e){return e.toLowerCase().replace(/-(\w)/g,(t,n)=>n.toUpperCase())}function Te(e){return!Array.isArray(e)&&!isNaN(e)}function hs(e){return[" ","_"].includes(e)?e:e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function ps(e){return["keydown","keyup"].includes(e)}function Yn(e){return["contextmenu","click","mouse"].some(t=>e.includes(t))}function ms(e,t){let n=t.filter(s=>!["window","document","prevent","stop","once","capture","self","away","outside","passive","preserve-scroll"].includes(s));if(n.includes("debounce")){let s=n.indexOf("debounce");n.splice(s,Te((n[s+1]||"invalid-wait").split("ms")[0])?2:1)}if(n.includes("throttle")){let s=n.indexOf("throttle");n.splice(s,Te((n[s+1]||"invalid-wait").split("ms")[0])?2:1)}if(n.length===0||n.length===1&&Jn(e.key).includes(n[0]))return!1;const r=["ctrl","shift","alt","meta","cmd","super"].filter(s=>n.includes(s));return n=n.filter(s=>!r.includes(s)),!(r.length>
50&&r.filter(o=>((o==="cmd"||o==="super")&&(o="meta"),e[`${o}Key`])).length===r.length&&(Yn(e.type)||Jn(e.key).includes(n[0])))}function Jn(e){if(!e)return[];e=hs(e);let t={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map(n=>{if(t[n]===e)return n}).filter(n=>n)}y("model",(e,{modifiers:t,expression:n},{effect:i,cleanup:r})=>{let s=e;t.includes("parent")&&(s=e.parentNode);let o=S(s,n),a;typeof n=="string"?a=S(s,`${n} = __placeholder`):typeof n=="function"&&typeof n()=="string"?a=S(s,`${n()} = __placeholder`):a=()=>{};let l=()=>{let h;return o(p=>h=p),Zn(h)?h.get():h},c=h=>{let p;o(C=>p=C),Zn(p)?p.set(h):a(()=>{},{scope:{__placeholder:h}})};typeof n=="string"&&e.type==="radio"&&_(()=>{e.hasAttribute("name")||e.setAttribute("name",n)});let u=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input",d=P?()=>{}:St(e,u,t,h=>{c(xt(e,t,h,l()))});if(t.includes("fill")&&([void 0,null,""].includes(l())||ct(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)&&c(xt(e,t,{target:e},l())),e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=d,r(()=>e._x_removeModelListeners.default()),e.form){let h=St(e.form,"reset",[],p=>{it(()=>e._x_model&&e._x_model.set(xt(e,t,{target:e},l())))});r(()=>h())}e._x_model={get(){return l()},set(h){c(h)}},e._x_forceModelUpdate=h=>{h===void 0&&typeof n=="string"&&n.match(/\./)&&(h=""),window.fromModel=!0,_(()=>mn(e,"value",h)),delete window.fromModel},i(()=>{let h=l();t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate(h)})});function xt(e,t,n,i){return _(()=>{if(n instanceof CustomEvent&&n.detail!==void 0)return n.detail!==null&&n.detail!==void 0?n.detail:n.target.value;if(ct(e))if(Array.isArray(i)){let r=null;return t.includes("number")?r=Et(n.target.value):t.includes("boolean")?r=be(n.target.value):r=n.target.value,n.target.checked?i.includes(r)?i:i.concat([r]):i.filter(s=>!gs(s,r))}else return n.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(r=>{let s=r.value||r.text;return Et(s)}):t.includes("boolean")?Array.from(n.target.selectedOptions).map(r=>{let s=r.value||r.text;return be(s)}):Array.from(n.target.selectedOptions).map(r=>r.value||r.text);{let r;return yn(e)?n.target.checked?r=n.target.value:r=i:r=n.target.value,t.includes("number")?Et(r):t.includes("boolean")?be(r):t.includes("trim")?r.trim():r}}})}function Et(e){let t=e?parseFloat(e):null;return ws(t)?t:e}function gs(e,t){return e==t}function ws(e){return!Array.isArray(e)&&!isNaN(e)}function Zn(e){return e!==null&&typeof e=="object"&&typeof e.get=="function"&&typeof e.set=="function"}y("cloak",e=>queueMicrotask(()=>_(()=>e.removeAttribute(X("cloak"))))),ln(()=>`[${X("init")}]`),y("init",M((e,{expression:t},{evaluate:n})=>typeof t=="string"?!!t.trim()&&n(t,{},!1):n(t,{},!1))),y("text",(e,{expression:t},{effect:n,evaluateLater:i})=>{let r=i(t);n(()=>{r(s=>{_(()=>{e.textContent=s})})})}),y("html",(e,{expression:t},{effect:n,evaluateLater:i})=>{let r=i(t);n(()=>{r(s=>{_(()=>{e.innerHTML=s,e._x_ignoreSelf=!0,O(e),delete e._x_ignoreSelf})})})}),Ze(Yt(":",Jt(X("bind:"))));var Qn=(e,{value:t,modifiers:n,expression:i,original:r},{effect:s,cleanup:o})=>{if(!t){let l={};Sr(l),S(e,i)(u=>{An(e,u,r)},{scope:l});return}if(t==="key")return _s(e,i);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=S(e,i);s(()=>a(l=>{l===void 0&&typeof i=="string"&&i.match(/\./)&&(l=""),_(()=>mn(e,t,l,n))})),o(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})};Qn.inline=(e,{value:t,modifiers:n,expression:i})=>{t&&(e._x_inlineBindings||(e._x_inlineBindings={}),e._x_inlineBindings[t]={expression:i,extract:!1})},y("bind",Qn);function _s(e,t){e._x_keyExpression=t}an(()=>`[${X("data")}]`),y("data",(e,{expression:t},{cleanup:n})=>{if(bs(e))return;t=t===""?"{}":t;let i={};Ke(i,e);let r={};Er(r,i);let s=D(e,t,{scope:r});(s===void 0||s===!0)&&(s={}),Ke(s,e);let o=W(s);Bt(o);let a=te(e,o);o.init&&D(e,o.init),n(()=>{o.destroy&&D(e,o.destroy),a()})}),_e((e,t)=>{e._x_dataStack&&(t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0))});function bs(e){return P?lt?!0:e.hasAttribute("data-has-alpine-state"):!1}y("show",(e,{modifiers:t,expression:n},{effect:i})=>{let r=S(e,n);e._x_doHide||(e._x_doHide=()=>{_(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{_(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display")})});let s=()=>{e._x_doHide(),e._x_isShown=!1},o=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(o),l=ot(d=>d?o():s(),d=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,d,o,s):d?a():s()}),c,u=!0;i(()=>r(d=>{!u&&d===c||(t.includes("immediate")&&(d?a():s()),l(d),c=d,u=!1)}))}),y("for",(e,{expression:t},{effect:n,cleanup:i})=>{let r=vs(t),s=S(e,r.items),o=S(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},n(()=>ys(e,r,s,o)),i(()=>
5{Object.values(e._x_lookup).forEach(a=>_(()=>{J(a),a.remove()})),delete e._x_prevKeys,delete e._x_lookup})});function ys(e,t,n,i){let r=o=>typeof o=="object"&&!Array.isArray(o),s=e;n(o=>{Ss(o)&&o>=0&&(o=Array.from(Array(o).keys(),f=>f+1)),o===void 0&&(o=[]);let a=e._x_lookup,l=e._x_prevKeys,c=[],u=[];if(r(o))o=Object.entries(o).map(([f,m])=>{let w=ei(t,m,f,o);i(b=>{u.includes(b)&&E("Duplicate key on x-for",e),u.push(b)},{scope:{index:f,...w}}),c.push(w)});else for(let f=0;f<o.length;f++){let m=ei(t,o[f],f,o);i(w=>{u.includes(w)&&E("Duplicate key on x-for",e),u.push(w)},{scope:{index:f,...m}}),c.push(m)}let d=[],h=[],p=[],C=[];for(let f=0;f<l.length;f++){let m=l[f];u.indexOf(m)===-1&&p.push(m)}l=l.filter(f=>!p.includes(f));let G="template";for(let f=0;f<u.length;f++){let m=u[f],w=l.indexOf(m);if(w===-1)l.splice(f,0,m),d.push([G,f]);else if(w!==f){let b=l.splice(f,1)[0],x=l.splice(w-1,1)[0];l.splice(f,0,x),l.splice(w,0,b),h.push([b,x])}else C.push(m);G=m}for(let f=0;f<p.length;f++){let m=p[f];m in a&&(_(()=>{J(a[m]),a[m].remove()}),delete a[m])}for(let f=0;f<h.length;f++){let[m,w]=h[f],b=a[m],x=a[w],N=document.createElement("div");_(()=>{x||E('x-for ":key" is undefined or invalid',s,w,a),x.after(N),b.after(x),x._x_currentIfEl&&x.after(x._x_currentIfEl),N.before(b),b._x_currentIfEl&&b.after(b._x_currentIfEl),N.remove()}),x._x_refreshXForScope(c[u.indexOf(w)])}for(let f=0;f<d.length;f++){let[m,w]=d[f],b=m==="template"?s:a[m];b._x_currentIfEl&&(b=b._x_currentIfEl);let x=c[w],N=u[w],$=document.importNode(s.content,!0).firstElementChild,de=W(x);te($,de,s),$._x_refreshXForScope=ke=>{Object.entries(ke).forEach(([Q,Re])=>{de[Q]=Re})},_(()=>{b.after($),M(()=>O($))()}),typeof N=="object"&&E("x-for key cannot be an object, it must be a string or an integer",s),a[N]=$}for(let f=0;f<C.length;f++)a[C[f]]._x_refreshXForScope(c[u.indexOf(C[f])]);s._x_prevKeys=u})}function vs(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,n=/^\s*\(|\)\s*$/g,i=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,r=e.match(i);if(!r)return;let s={};s.items=r[2].trim();let o=r[1].replace(n,"").trim(),a=o.match(t);return a?(s.item=o.replace(t,"").trim(),s.index=a[1].trim(),a[2]&&(s.collection=a[2].trim())):s.item=o,s}function ei(e,t,n,i){let r={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(o=>o.trim()).forEach((o,a)=>{r[o]=t[a]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t=="object"?e.item.replace("{","").replace("}","").split(",").map(o=>o.trim()).forEach(o=>{r[o]=t[o]}):r[e.item]=t,e.index&&(r[e.index]=n),e.collection&&(r[e.collection]=i),r}function Ss(e){return!Array.isArray(e)&&!isNaN(e)}function ti(){}ti.inline=(e,{expression:t},{cleanup:n})=>{let i=ge(e);i._x_refs||(i._x_refs={}),i._x_refs[t]=e,n(()=>delete i._x_refs[t])},y("ref",ti),y("if",(e,{expression:t},{effect:n,cleanup:i})=>{e.tagName.toLowerCase()!=="template"&&E("x-if can only be used on a <template> tag",e);let r=S(e,t),s=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return te(a,{},e),_(()=>{e.after(a),M(()=>O(a))()}),e._x_currentIfEl=a,e._x_undoIf=()=>{_(()=>{J(a),a.remove()}),delete e._x_currentIfEl},a},o=()=>{e._x_undoIf&&(e._x_undoIf(),delete e._x_undoIf)};n(()=>r(a=>{a?s():o()})),i(()=>e._x_undoIf&&e._x_undoIf())}),y("id",(e,{expression:t},{evaluate:n})=>{n(t).forEach(r=>ls(e,r))}),_e((e,t)=>{e._x_ids&&(t._x_ids=e._x_ids)}),Ze(Yt("@",Jt(X("on:")))),y("on",M((e,{value:t,modifiers:n,expression:i},{cleanup:r})=>{let s=i?S(e,i):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let o=St(e,t,n,a=>{s(()=>{},{scope:{$event:a},params:[a]})});r(()=>o())})),Oe("Collapse","collapse","collapse"),Oe("Intersect","intersect","intersect"),Oe("Focus","trap","focus"),Oe("Mask","mask","mask");function Oe(e,t,n){y(t,i=>E(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${n}`,i))}ae.setEvaluator(Wt),ae.setReactivityEngine({reactive:bt,effect:kr,release:Rr,raw:g});var xs=ae,v=xs;const ni="hn_member_ads";function Es(e=null){try{window.localStorage.setItem(ni,JSON.stringify({member:!0,tier:e||null,at:Date.now()}))}catch{}}function ii(){try{window.localStorage.removeItem(ni)}catch{}}const It="piano_user_state";let At=!1;function Ne(e,t=5e3){return new Promise((n,i)=>{if(e.isReady){n();return}const r=setInterval(()=>{e.isReady&&(clearInterval(r),clearTimeout(s),n())},100),s=setTimeout(()=>{clearInterval(r),i(new Error("Piano SDK timeout"))},t)})}function Is(e){e.store("piano",{isLoggedIn:!1,isSubscriber:!1,composerVars:{},membershipState:"free",membershipTier:null,user:null,userEmail:"",userInitials:"",isReady:!1,showLogin(i=null){var r;(r=window.tp)!=null&&r.pianoId&&(window.tp.pianoId.show({screen:"login",displayMode:i?"inline":"modal",...i&&{containerSelector:i}}),window.dispatchEvent(new CustomEvent("piano-modal-shown")))},showRegister(i=null){var r;(r=window.tp)!=null&&r.pianoId&&(window.tp.pianoId.show({screen:"register",displayMode:i?"inline":"modal",...i&&{containerSelector:i}}),window.dispatchEvent(new CustomEvent("piano-modal-shown")))},logout(){var i;(i=window.tp)!=null&&i.pianoId&&window.tp.pianoId.logout()},showMyAccount(){var i;(i=window.tp)!=null&&i.myaccount&&window.tp.myaccount.show({containerSelector:"#piano-my-account-container"})},_updateUser(i){var r;if((r=window.PIANO_CONFIG)!=null&&r.debug&&console.log("[Piano] _updateUser called with:",i),this.user=i,this.isLoggedIn=!!i,this.userEmail=(i==null?void 0:i.email)||"",this.userInitials=this._getInitials(i),i){this.membershipState="unknown";try{localStorage.setItem(It,JSON.stringify({email:i.email,uid:i.uid}))}catch{}this._refreshSubscription()}else{this.isSubscriber=!1,this.membershipState="free",this.membershipTier=null,ii();try{localStorage.removeItem(It)}catch{}}},async _refreshSubscription(){var r,s,o,a,l;if(!((s=(r=window.tp)==null?void 0:r.pianoId)!=null&&s.getToken))return;const i=((o=this.user)==null?void 0:o.uid)||null;try{const c=await window.tp.pianoId.getToken(),u=await fetch("/wp-json/hn2/v1/piano/subscription-status",{headers:{Authorization:`Bearer ${c}`}});if(!u.ok)return;const d=await u.json();if((((a=this.user)==null?void 0:a.uid)||null)!==i)return;this.isSubscriber=!!d.subscribed,this.membershipState=this.isSubscriber?"member":"free",this.membershipTier=this.isSubscriber&&d.tier||null,this.isSubscriber?Es(this.membershipTier):ii()}catch(c){(l=window.PIANO_CONFIG)!=null&&l.debug&&console.error("[Piano] subscription status fetch failed",c)}},_getInitials(i){if(!i)return"";const r=i.firstName||i.first_name||"",s=i.lastName||i.last_name||"";return r&&s?`${r[0]}${s[0]}`.toUpperCase():i.email?i.email[0].toUpperCase():"?"},_restoreState(){var i,r;try{const s=localStorage.getItem(It);if(s){const o=JSON.parse(s);this._restoredUid=o.uid||null,this.isLoggedIn=!0,this.userEmail=o.email||"",this.userInitials=((r=(i=o.email)==null?void 0:i[0])==null?void 0:r.toUpperCase())||"?",this.membershipState="unknown"}}catch{}},_reconcileRestoredState(i){var o;const r=(i==null?void 0:i.uid)||null,s=this._restoredUid||null;s&&s!==r&&((o=window.PIANO_CONFIG)!=null&&o.debug&&console.log("[Piano] Stale localStorage detected, clearing"),this._updateUser(i||null)),this._restoredUid=null}}),e.store("piano")._restoreState(),As(e),window.addEventListener("message",i=>{if(i.data&&i.data.hnAction==="logoutAndClose"){try{tp.offer.close()}catch{}try{tp.pianoId.logout()}catch{}}});function t(i){i.classList.add("hn-piano-3ds-active")}function n(i){i.classList.remove("hn-piano-3ds-active")}window.addEventListener("message",i=>{let r=i.data;if(typeof r=="string"&&r.charCodeAt(0)===123)try{r=JSON.parse(r)}catch{return}
5if(!r||r.hnAction!=="threeDsShown"&&r.hnAction!=="threeDsHidden")return;const s=document.querySelector('iframe[id^="offer-"]');if(!s)return;const o=s.closest(".tp-modal");if(r.hnAction==="threeDsShown"){if(s.dataset.hn3dsActive)return;s.dataset.hn3dsActive="1",o&&t(o),t(s)}else{if(!s.dataset.hn3dsActive)return;n(s),o&&n(o),delete s.dataset.hn3dsActive}})}function As(e){const t=window.PIANO_CONFIG||{},n=window.PIANO_ARTICLE||{};window.tp=window.tp||[];const i=window.tp;if(i.push(["setUsePianoIdUserProvider",!0]),i.push(["setDebug",t.debug||!1]),i.push(["setAid",t.aid]),n.id){n.section&&i.push(["setContentSection",n.section]),n.authors&&n.authors.length>0&&i.push(["setContentAuthor",n.authors.join(", ")]);const r=[...n.tags||[]];n.section&&!r.includes(n.section)&&r.push(n.section),r.length>0&&i.push(["setTags",r]),n.published&&i.push(["setContentCreated",new Date(n.published*1e3).toISOString()]),i.push(["setCustomVariable","isSponsored",n.isSponsored?"true":"false"]),i.push(["setContentIsNative",n.isSponsored])}i.push(["addHandler","loginSuccess",Ts]),i.push(["addHandler","registrationSuccess",Os]),i.push(["addHandler","logout",Ns]),i.push(["addHandler","checkoutComplete",Ps]),i.push(["addHandler","meterActive",Ms]),i.push(["addHandler","meterExpired",Ls]),i.push(["addHandler","showOffer",ks]),i.push(["addHandler","showTemplate",Rs]),i.push(["addHandler","loginFailed",Fs]),i.push(["addHandler","registrationFailed",Us]),i.push(["addHandler","checkoutError",Ds]),i.push(["addHandler","checkoutClose",js]),i.push(["addHandler","loginRequired",Bs]),i.push(["addHandler","customEvent",qs]),i.push(["addHandler","nonSite",function(r,s,o){document.dispatchEvent(new CustomEvent("piano:non-site",{detail:{event:r,card:s,context:o}}))}]),i.push(["addHandler","setResponseVariable",function(r){var o;const s=(o=window.Alpine)==null?void 0:o.store("piano");s&&(s.composerVars=Object.assign({},s.composerVars||{},r||{})),document.dispatchEvent(new CustomEvent("piano:response-vars",{detail:r||{}}))}]),i.push(["init",function(){var a,l,c,u,d,h,p,C,G,f,m,w,b,x,N,$,de,ke,Q,Re;const r=(a=window.PIANO_CONFIG)==null?void 0:a.debug,s=()=>Math.round(performance.now());r&&console.log("[Piano cx-order]",s(),"init handler entered",{isUserValid:(u=(c=(l=window.tp)==null?void 0:l.pianoId)==null?void 0:c.isUserValid)==null?void 0:u.call(c),hasUser:!!((p=(h=(d=window.tp)==null?void 0:d.pianoId)==null?void 0:h.getUser)!=null&&p.call(h))}),(C=window.tp)!=null&&C.pianoId&&window.tp.pianoId.init({profileUpdate:$s}),r&&console.log("[Piano cx-order]",s(),"after pianoId.init",{isUserValid:(m=(f=(G=window.tp)==null?void 0:G.pianoId)==null?void 0:f.isUserValid)==null?void 0:m.call(f),hasUser:!!((x=(b=(w=window.tp)==null?void 0:w.pianoId)==null?void 0:b.getUser)!=null&&x.call(b))}),Cs(),e.store("piano").isReady=!0;const o=(N=window.tp.pianoId)==null?void 0:N.getUser();if(document.dispatchEvent(new CustomEvent("piano:ready",{detail:{user:o,isLoggedIn:!!o}})),(de=($=window.tp)==null?void 0:$.experience)!=null&&de.init&&(r&&console.log("[Piano cx-order]",s(),"about to call experience.init",{isUserValid:(Re=(Q=(ke=window.tp)==null?void 0:ke.pianoId)==null?void 0:Q.isUserValid)==null?void 0:Re.call(Q),hasUser:!!o}),window.tp.experience.init(),r&&console.log("[Piano cx-order]",s(),"after experience.init returned")),document.getElementById("password-reset-container")){if(window.tp.pianoId.isUserValid()){window.location.href="/contul-meu";return}const pi=location.search.match(/reset_token=([A-Za-z0-9]+)/);pi&&window.tp.pianoId.show({resetPasswordToken:pi[1],displayMode:"inline",containerSelector:"#password-reset-container",loggedIn:()=>{window.location.href="/contul-meu"}})}}])}function Cs(){var n,i;if(!((n=window.tp)!=null&&n.pianoId))return;const e=window.tp.pianoId.getUser(),t=(i=window.Alpine)==null?void 0:i.store("piano");t&&(t._reconcileRestoredState(e),t._updateUser(e))}function Ts(e){var i,r,s,o,a,l;(i=window.PIANO_CONFIG)!=null&&i.debug&&console.log("[Piano] onLoginSuccess called",e);const t=(s=(r=window.tp)==null?void 0:r.pianoId)==null?void 0:s.getUser(),n=(o=window.Alpine)==null?void 0:o.store("piano");n&&t&&n._updateUser(t),(l=(a=window.tp)==null?void 0:a.api)!=null&&l.callApi&&window.tp.api.callApi("/access/list",{},function(c){var u,d;if(c!=null&&c.data){for(const h of c.data)if(h.granted){document.body.classList.add("piano-access-granted"),(
5d=(u=window.tp)==null?void 0:u.offer)!=null&&d.close&&window.tp.offer.close();break}}}),document.dispatchEvent(new CustomEvent("piano:login",{detail:{...e,user:t}}))}function Os(e){var i,r,s,o;(i=window.PIANO_CONFIG)!=null&&i.debug&&console.log("[Piano] onRegistrationSuccess called",e);const t=(s=(r=window.tp)==null?void 0:r.pianoId)==null?void 0:s.getUser(),n=(o=window.Alpine)==null?void 0:o.store("piano");n&&t&&n._updateUser(t),document.dispatchEvent(new CustomEvent("piano:register",{detail:{...e,user:t}}))}function Ns(){var t,n;(t=window.PIANO_CONFIG)!=null&&t.debug&&console.log("[Piano] Logout");const e=(n=window.Alpine)==null?void 0:n.store("piano");e&&e._updateUser(null),document.cookie.split(";").forEach(i=>{const r=i.trim().split("=")[0];r.startsWith("piano_cv_")&&(document.cookie=`${r}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`)}),document.dispatchEvent(new CustomEvent("piano:logout"))}function Ps(e){var n,i;(n=window.PIANO_CONFIG)!=null&&n.debug&&console.log("[Piano] Checkout complete:",e);const t=(i=window.Alpine)==null?void 0:i.store("piano");t&&t._refreshSubscription(),document.dispatchEvent(new CustomEvent("piano:checkout",{detail:e})),At=!0}function Ms(e){var t;(t=window.PIANO_CONFIG)!=null&&t.debug&&console.log("[Piano] Meter active:",e),document.dispatchEvent(new CustomEvent("piano:meterActive",{detail:e}))}function Ls(e){var t;(t=window.PIANO_CONFIG)!=null&&t.debug&&console.log("[Piano] Meter expired:",e),document.dispatchEvent(new CustomEvent("piano:meterExpired",{detail:e}))}function ks(e){var t;(t=window.PIANO_CONFIG)!=null&&t.debug&&console.log("[Piano] Show offer:",e),document.dispatchEvent(new CustomEvent("piano:showOffer",{detail:e}))}function Rs(e){var r;(r=window.PIANO_CONFIG)!=null&&r.debug&&console.log("[Piano] Show template:",e);const t=e.containerSelector;if(!t)return;const n=document.querySelector(t);if(!n||!n.classList.contains("piano-template--soft-lock"))return;const i=new MutationObserver(s=>{var o;for(const a of s)for(const l of a.removedNodes)if(l.tagName==="IFRAME"){n.classList.add("piano-dismissed"),i.disconnect(),(o=window.PIANO_CONFIG)!=null&&o.debug&&console.log("[Piano] Soft-lock dismissed:",t),document.dispatchEvent(new CustomEvent("piano:softlockDismissed",{detail:{containerSelector:t}}));return}});i.observe(n,{childList:!0,subtree:!0}),document.dispatchEvent(new CustomEvent("piano:showTemplate",{detail:e}))}async function $s(e){var n,i,r,s,o,a,l;(n=window.PIANO_CONFIG)!=null&&n.debug&&console.log("[Piano] Profile update callback data:",e);const t=await((s=(r=(i=window.tp)==null?void 0:i.pianoId)==null?void 0:r.getToken)==null?void 0:s.call(r));if(!t){(o=window.PIANO_CONFIG)!=null&&o.debug&&console.warn("[Piano] Cannot sync newsletters: no Piano token");return}try{const u=await(await fetch("/wp-json/hn2/v1/piano/sync-newsletters",{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({})})).json();(a=window.PIANO_CONFIG)!=null&&a.debug&&console.log("[Piano] Newsletter sync result:",u),document.dispatchEvent(new CustomEvent("piano:newslettersSynced",{detail:u}))}catch(c){(l=window.PIANO_CONFIG)!=null&&l.debug&&console.error("[Piano] Newsletter sync failed:",c)}document.dispatchEvent(new CustomEvent("piano:profileUpdate",{detail:e}))}function Fs(e){var t;(t=window.PIANO_CONFIG)!=null&&t.debug&&console.error("[Piano] Login failed:",e),document.dispatchEvent(new CustomEvent("piano:loginFailed",{detail:e}))}function Us(e){var t;(t=window.PIANO_CONFIG)!=null&&t.debug&&console.error("[Piano] Registration failed:",e),document.dispatchEvent(new CustomEvent("piano:registrationFailed",{detail:e}))}function Ds(e){var t;(t=window.PIANO_CONFIG)!=null&&t.debug&&console.error("[Piano] Checkout error:",e),document.dispatchEvent(new CustomEvent("piano:checkoutError",{detail:e}))}function js(e){var t,n;if((t=window.PIANO_CONFIG)!=null&&t.debug&&console.log("[Piano] Checkout closed:",e),At){At=!1;const i=(n=window.PIANO_CONFIG)==null?void 0:n.onboardingUrl;if(i&&!localStorage.getItem("hn_onboarding_completed")){try{sessionStorage.setItem("hn_
5just_subscribed","1")}catch{}window.location.replace(i);return}window.location.reload();return}e.state==="close"&&document.dispatchEvent(new CustomEvent("piano:checkoutAbandoned",{detail:e})),document.dispatchEvent(new CustomEvent("piano:checkoutClose",{detail:e}))}function Bs(e){var t;return(t=window.PIANO_CONFIG)!=null&&t.debug&&console.log("[Piano] Login required for checkout:",e),document.dispatchEvent(new CustomEvent("piano:loginRequired",{detail:e})),!1}function qs(e){var n,i,r;(n=window.PIANO_CONFIG)!=null&&n.debug&&console.log("[Piano] Custom event:",e);const t=e.eventName||((i=e.params)==null?void 0:i.eventName);switch(t){case"email-signup":zs(e);break;default:(r=window.PIANO_CONFIG)!=null&&r.debug&&console.log("[Piano] Unknown custom event:",t)}document.dispatchEvent(new CustomEvent("piano:customEvent",{detail:e}))}async function zs(e){var s,o,a,l,c;const t=e.params||{},n=t.email,i=t.newsletter,r=e.iframeId;if(!n||!i){(s=window.PIANO_CONFIG)!=null&&s.debug&&console.error("[Piano] Email signup missing params:",t),Pe(r,!1,"Missing email or newsletter");return}
5try{const u=await((l=(a=(o=window.tp)==null?void 0:o.pianoId)==null?void 0:a.getToken)==null?void 0:l.call(a)),d={"Content-Type":"application/json"};u&&(d.Authorization=`Bearer ${u}`);const p=await(await fetch("/wp-json/hn2/v1/beehiiv/subscribe",{method:"POST",headers:d,body:JSON.stringify({email:n,newsletter:i})})).json();p.success?(Hs(`subscribed_${i}`,"true"),Pe(r,!0,"Subscription successful"),document.dispatchEvent(new CustomEvent("piano:emailSignupSuccess",{detail:{email:n,newsletter:i}}))):(Pe(r,!1,p.message||"Subscription failed"),document.dispatchEvent(new CustomEvent("piano:emailSignupError",{detail:{email:n,newsletter:i,error:p.error}})))}catch(u){(c=window.PIANO_CONFIG)!=null&&c.debug&&console.error("[Piano] Email signup failed:",u),Pe(r,!1,"Subscription failed")}}function Pe(e,t,n){var s,o;if(!e)return;const i=document.getElementById(e);if(!(i!=null&&i.contentWindow)){(s=window.PIANO_CONFIG)!=null&&s.debug&&console.warn("[Piano] Cannot find iframe:",e);return}const r=`https://${((o=window.PIANO_CONFIG)==null?void 0:o.endpoint)||"c2.hotnews.ro"}`;i.contentWindow.postMessage({type:"email-signup-result",success:t,message:n},r)}function Hs(e,t,n=365){const i=new Date(Date.now()+n*864e5).toUTCString();document.cookie=`piano_cv_${e}=${encodeURIComponent(t)}; expires=${i}; path=/; SameSite=Lax`}async function Ct(e,t){const i={Authorization:`Bearer ${await window.tp.pianoId.getToken()}`,"Content-Type":"application/json"},r=await fetch("/wp-json/hn2/v1/user-settings-account/newsletter",{method:"POST",headers:i,body:JSON.stringify({slug:e,subscribed:t})});if(!r.ok){let s=`Eroare: ${r.status}`;try{s=(await r.json()).message||s}catch{}return{ok:!1,message:s}}return fetch("/wp-json/hn2/v1/piano/sync-newsletters",{method:"POST",headers:i,body:JSON.stringify({customFields:{[e]:t?"true":"false"}})}).catch(s=>{var o;(o=window.PIANO_CONFIG)!=null&&o.debug&&console.error("[Newsletters] Beehiiv sync failed:",s)}),{ok:!0}}function Gs(){const e={profil:"pianoid",abonament:"library",istoric:"payments",ajutor:"help"};return{loading:!0,pianoError:!1,pianoMounted:!1,activeTab:"profil",tabs:[{id:"profil",label:"Profil"},{id:"abonament",label:"Abonament"},{id:"newslettere",label:"Newslettere"},{id:"comentarii",label:"Comentarii"},{id:"istoric",label:"Istoric"},{id:"ajutor",label:"Ajutor"}],init(){const n=new URLSearchParams(window.location.search).get("tab");if(n){const r=this.tabs.find(s=>s.id===n);r&&(this.activeTab=r.id)}const i=setInterval(()=>{this.$store.piano.isReady&&(clearInterval(i),this.loading=!1,this.$store.piano.isLoggedIn&&this.$nextTick(()=>{this.mountPiano()}))},100);setTimeout(()=>{clearInterval(i),this.$store.piano.isReady||(this.pianoError=!0),this.loading=!1},5e3),document.addEventListener("piano:login",()=>{this.loading=!1,this.pianoMounted=!1;const r=document.querySelector("#piano-my-account-container");r&&(r.innerHTML=""),this.$nextTick(()=>this.mountPiano())}),document.addEventListener("piano:logout",()=>{this.pianoMounted=!1;const r=document.querySelector("#piano-my-account-container");r&&(r.innerHTML="")})},isPianoTab(){return this.activeTab in e},switchTab(t){this.activeTab=t;const n=new URL(window.location);t==="profil"?n.searchParams.delete("tab"):n.searchParams.set("tab",t),history.replaceState(null,"",n),t in e&&this.switchPianoScreen(e[t])},switchPianoScreen(t){const n=document.querySelector("#piano-my-account-container");if(!n)return;const i=n.querySelector("iframe");i!=null&&i.contentWindow&&i.contentWindow.postMessage({type:"switchScreen",screen:t},"*")},mountPiano(){if(this.pianoMounted)return;this.pianoMounted=!0,this.$store.piano.showMyAccount();const t=e[this.activeTab];t&&t!=="pianoid"&&setTimeout(()=>this.switchPianoScreen(t),500)}}}function Ws(e){return{mode:e,redirecting:!1,redirectUrl:null,init(){const n=new URLSearchParams(window.location.search).get("redirect_to")||"/contul-meu";this.redirectUrl=n.startsWith("/")&&!n.startsWith("//")?n:"/contul-meu";const i=e==="login"?"#piano-login-container":"#piano-register-container",r=setInterval(()=>{if(this.$store.piano.isReady){if(clearInterval(r),this.$store.piano.isLoggedIn){this.redirecting=!0,window.location.href=this.redirectUrl;return}this.$nextTick(()=>{this.mode==="login"?this.$store.piano.showLogin(i):this.$store.piano.showRegister(i)})}},100);setTimeout(()=>{clearInterval(r)},5e3),document.addEventListener("piano:login",()=>{this.redirecting=!0,window.location.href=this.redirectUrl}),document.addEventListener("piano:register",()=>{this.redirecting=!0,window.location.href=this.redirectUrl})}}}function Ks(){return{loading:!0,displayName:"",canChange:!0,nextChangeDate:null,editing:!1,newName:"",error:null,saving:!1,fetchError:null,async init(
5){try{await Ne(this.$store.piano)}catch{this.loading=!1,this.fetchError="Serviciul nu este disponibil momentan";return}this.$store.piano.isLoggedIn&&await this.fetchDisplayName(),document.addEventListener("piano:login",async()=>{this.displayName="",this.editing=!1,this.fetchError=null,this.loading=!0,await this.fetchDisplayName()}),document.addEventListener("piano:logout",()=>{this.displayName="",this.loading=!0,this.fetchError=null,this.editing=!1})},async fetchDisplayName(){var e,t;if(!this.$store.piano.isLoggedIn){this.loading=!1;return}try{const n=await window.tp.pianoId.getToken(),i=await fetch("/wp-json/hn2/v1/user-settings-account",{headers:{Authorization:`Bearer ${n}`}}),r=await i.json();if(!i.ok){(e=window.PIANO_CONFIG)!=null&&e.debug&&console.error("[DisplayName] API error:",r),this.fetchError=r.message||"Eroare la incarcarea datelor",this.canChange=!0;return}this.displayName=r.display_name||"",this.canChange=r.can_change!==!1,this.nextChangeDate=r.next_change_date,this.newName=this.displayName}catch(n){(t=window.PIANO_CONFIG)!=null&&t.debug&&console.error("[DisplayName] Fetch failed:",n),this.fetchError="Eroare de conexiune",this.canChange=!0}finally{this.loading=!1}},startEditing(){this.newName=this.displayName,this.error=null,this.editing=!0},cancelEditing(){this.editing=!1,this.newName=this.displayName,this.error=null},async save(){if(this.saving)return;const e=this.newName.trim();if(e.length<3||e.length>50){this.error="Numele trebuie sa aiba intre 3 si 50 caractere";return}this.saving=!0,this.error=null;try{const t=await window.tp.pianoId.getToken(),n=await fetch("/wp-json/hn2/v1/user-settings-account",{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({display_name:e})}),i=await n.json();if(!n.ok){this.error=i.message||"Eroare la salvare";return}this.displayName=i.display_name,this.canChange=!1,this.editing=!1}catch{this.error="Eroare de conexiune"}finally{this.saving=!1}}}}function Vs(){return{loading:!0,newsletters:[],error:null,async init(){try{await Ne(this.$store.piano)}catch{this.loading=!1,this.error="Serviciul nu este disponibil momentan";return}this.$store.piano.isLoggedIn&&await this.fetch(),document.addEventListener("piano:login",async()=>{this.newsletters=[],this.error=null,this.loading=!0,await this.fetch()}),document.addEventListener("piano:logout",()=>{this.newsletters=[],this.loading=!0,this.error=null})},async fetch(){var e;if(!this.$store.piano.isLoggedIn){this.loading=!1;return}try{const t=await window.tp.pianoId.getToken(),i=await(await fetch("/wp-json/hn2/v1/user-settings-account",{headers:{Authorization:`Bearer ${t}`}})).json();this.newsletters=(i.newsletters||[]).map(r=>({...r,saving:!1,saved:!1}))}catch(t){(e=window.PIANO_CONFIG)!=null&&e.debug&&console.error("[Newsletters] Fetch failed:",t),this.error="Eroare la incarcarea newsletterelor"}finally{this.loading=!1}},async toggle(e){var i;const t=this.newsletters.find(r=>r.slug===e);if(!t||t.saving)return;t.saving=!0,this.error=null;const n=!t.subscribed;try{const r=await Ct(e,n);r.ok?(t.subscribed=n,t.saved=!0,setTimeout(()=>{t.saved=!1},2e3)):this.error=r.message}catch(r){(i=window.PIANO_CONFIG)!=null&&i.debug&&console.error("[Newsletters] Toggle failed:",r),this.error="Eroare de conexiune"}finally{t.saving=!1}}}}function Xs(e){return{newsletters:e.map(t=>({...t,saving:!1})),selectedSlugs:[],subscriptionStatus:{},email:"",submitting:!1,submitted:!1,error:null,async init(){try{await Ne(this.$store.piano)}catch{return}this.$store.piano.isLoggedIn&&await this.fetchSubscriptionStatus(),document.addEventListener("piano:login",async()=>{this.selectedSlugs=[],await this.fetchSubscriptionStatus()}),document.addEventListener("piano:logout",()=>{this.subscriptionStatus={}})},async fetchSubscriptionStatus(){var t;if(this.$store.piano.isLoggedIn)try{const n=await window.tp.pianoId.getToken(),r=await(await fetch("/wp-json/hn2/v1/user-settings-account",{headers:{Authorization:`Bearer ${n}`}})).json(),s={};for(const o of r.newsletters||[])s[o.slug]=o.subscribed;this.subscriptionStatus=s}catch(n){(t=window.PIANO_CONFIG)!=null&&t.debug&&console.error("[NewsletterHub] Status fetch failed:",n)}},toggleSelect(t){const n=this.newsletters.find(r=>r.slug===t);if(n!=null&&n.isPaid)return;const i=this.selectedSlugs.indexOf(t);i===-1?this.selectedSlugs.push(t):this.selectedSlugs.splice(i,1)},isSelected(t){return this.selectedSlugs.includes(t)},getNewsletterName(t){var n;return((n=this.newsletters.find(i=>i.slug===t))==null?void 0:n.name)||t},async subscribeBatch(){var t,n,i;if(!(!this.email||this.selectedSlugs.length===0)){this.submitting=!0,this.error=null;try{const r=await((i=(n=(t=window.tp)==null?void 0:t.pianoId)==null?void 0:n.getToken)==null?void 0:i.call(n)),s={"Content-Type":"application/json"};r&&(s.Authorization=`Bearer ${r}`);const a=await(await fetch("/wp-json/hn2/v1/beehiiv/subscribe-batch",{method:"POST",headers:s,body:JSON.stringify({email:this.email,newsletters:this.selectedSlugs})})).json();a.success?this.submitted=!0:this.error=a.message||"Eroare la abonare."}catch{this.error="Eroare de conexiune."}finally{this.submitting=!1}}},isSubscribed(t){return!!this.subscriptionStatus[t]},async toggleSubscription(t){var r,s;const n=this.newsletters.find(o=>o.slug===t);if(!n||n.saving)return;n.saving=!0;const i=!this.isSubscribed(t);try{const o=await Ct(t,i);o.ok?this.subscriptionStatus[t]=i:(r=window.PIANO_CONFIG)!=null&&r.debug&&console.error("[NewsletterHub] Toggle failed:",o.message)}catch(o){(s=window.PIANO_CONFIG)!=null&&s.debug&&console.error("[NewsletterHub] Toggle failed:",o)}finally{n.saving=!1}}}}function Ys(e,t){return{slug:e,isPaid:t,email:"",submitting:!1,submitted:!1,saving:!1,subscribed:!1,justSubscribed:!1,statusReady:!1,error:null,get isVisible(){return this.statusReady}
5,get canSeeFullHistory(){return this.statusReady&&this.$store.piano.isLoggedIn&&this.$store.piano.membershipState==="member"&&this.subscribed},async init(){try{await Ne(this.$store.piano)}catch{this.statusReady=!0;return}this.$store.piano.isLoggedIn&&await this.fetchStatus(),this.statusReady=!0,document.addEventListener("piano:login",async()=>{await this.fetchStatus()}),document.addEventListener("piano:logout",()=>{this.subscribed=!1})},async fetchStatus(){var n;if(this.$store.piano.isLoggedIn)try{const i=await window.tp.pianoId.getToken(),o=((await(await fetch("/wp-json/hn2/v1/user-settings-account",{headers:{Authorization:`Bearer ${i}`}})).json()).newsletters||[]).find(a=>a.slug===this.slug);o&&(this.subscribed=o.subscribed)}catch(i){(n=window.PIANO_CONFIG)!=null&&n.debug&&console.error("[NewsletterForm] Status fetch failed:",i)}},async subscribe(){if(this.email){this.submitting=!0,this.error=null;try{const i=await(await fetch("/wp-json/hn2/v1/beehiiv/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:this.email,newsletter:this.slug})})).json();i.success?this.submitted=!0:i.error==="login_required"?this.error="Trebuie sa fii logat pentru acest newsletter.":this.error=i.message||"Eroare la abonare."}catch{this.error="Eroare de conexiune."}finally{this.submitting=!1}}},async toggleSubscription(){var i,r;if(this.saving)return;this.saving=!0;const n=!this.subscribed;try{const s=await Ct(this.slug,n);s.ok?(this.subscribed=n,n&&(this.justSubscribed=!0)):(i=window.PIANO_CONFIG)!=null&&i.debug&&console.error("[NewsletterForm] Toggle failed:",s.message)}catch(s){(r=window.PIANO_CONFIG)!=null&&r.debug&&console.error("[NewsletterForm] Toggle failed:",s)}finally{this.saving=!1}}}}let R=null,ri=!1;function Js(e){if(ri)return;ri=!0;const t=window.CORAL_CONFIG;if(!(t!=null&&t.storyId))return;Zs();const n=document.createElement("script");n.className="coral-script",n.src=`${t.url}/assets/js/count.js`,n.defer=!0,document.head.appendChild(n);const i=document.createElement("script");i.src=`${t.url}/assets/js/embed.js`,i.onload=()=>{e.store("piano").isReady?si(e,t):document.addEventListener("piano:ready",()=>{si(e,t)},{once:!0})},document.body.appendChild(i)}function Zs(){document.addEventListener("piano:login",async()=>{if(!R)return;const e=await Tt();e&&R.login(e)}),document.addEventListener("piano:ready",async e=>{var t;if(R&&(t=e.detail)!=null&&t.isLoggedIn){const n=await Tt();n&&R.login(n)}}),document.addEventListener("piano:logout",()=>{R&&R.logout()})}async function si(e,t){if(R)return;const n=e.store("piano");let i=null;n.isLoggedIn&&(i=await Tt()),R=window.Coral.createStreamEmbed({id:"coral_thread",autoRender:!0,rootURL:t.url,storyID:String(t.storyId),storyURL:t.storyUrl,accessToken:i,events:function(r){r.on("loginPrompt",()=>{n.showLogin()})}})}async function Qs(){var e,t,n;return(n=(t=(e=window.tp)==null?void 0:e.pianoId)==null?void 0:t.isUserValid)!=null&&n.call(t)&&window.tp.pianoId.getToken?await window.tp.pianoId.getToken():null}async function Tt(){var t,n,i,r,s,o,a;if(!((i=(n=(t=window.tp)==null?void 0:t.pianoId)==null?void 0:n.isUserValid)!=null&&i.call(n)))return(r=window.PIANO_CONFIG)!=null&&r.debug&&console.log("[Coral] Piano session expired or invalid"),null;const e=await Qs();if(!e)return(s=window.PIANO_CONFIG)!=null&&s.debug&&console.log("[Coral] No Piano token available"),null;try{const l=await fetch("/wp-json/hn2/v1/coral-token",{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!l.ok){if((o=window.PIANO_CONFIG)!=null&&o.debug){const u=await l.json();console.error("[Coral] Token fetch failed:",u.message)}return null}return(await l.json()).token}catch(l){return(a=window.PIANO_CONFIG)!=null&&a.debug&&console.error("[Coral] Token fetch error:",l),null}}const oi=()=>{const e=Array.from(document.querySelectorAll("[data-ad-slot-generator]"));if(e.length===0)return;const t=document.querySelector(".article-content"),n=!t,i=1800,r=l=>{const c=document.createElement("div");return c.id=l,c.dataset.slotId=l,c.dataset.frontend="true",c},s=l=>{const c=document.createElement("div");return c.className="hn2-ad-slot-generator__item",c.appendChild(r(l)),c},o=(l,c,u)=>{if(!c)return;const d=l.querySelectorAll(".hn2-ad-slot-generator__item").length,h=document.createDocumentFragment();for(let p=d+1;p<=u;p+=1)h.appendChild(s(`${c}-${p}`));l.appendChild(h),l.dataset.generated="true"};let a=1;if(!n){const l=Math.max(0,t.getBoundingClientRect().height||0);a=Math.max(1,Math.ceil(l/i))}e.forEach(l=>{if(l.dataset.generated==="true")return;const c=(l.dataset.slotBase||"").trim();o(l,c,n?1:a)})},Ot=new Map,ai="closed_newsalert",li=9e3,eo=16e3,to=6e3,no=55,io=280,ro=340,ci=async({endpoint:e}={})=>{const t=(e||"").trim();if(t==="")return null;let n;try{n=new URL(t,window.location.origin).toString()}catch{return null}if(Ot.has(n))return Ot.get(n);const i=fetch(n,{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}}).then(async r=>
5r.ok?r.json():null).catch(()=>null);return Ot.set(n,i),i},so=({endpoint:e="",currentPostId:t=null,leadPostId:n=null}={})=>({alert:null,visible:!1,minimized:!1,reopened:!1,restoring:!1,progressActive:!1,autoDismissMs:li,autoDismissTimer:null,dismissTimer:null,restoreTimer:null,endpoint:e,currentPostId:Number.isFinite(Number(t))?Number(t):0,leadPostId:Number.isFinite(Number(n))?Number(n):0,async init(){const i=await ci({endpoint:this.endpoint}),r=i==null?void 0:i.news_alert;if(!r||typeof r!="object")return;const s=Number.parseInt(String(r.postId||0),10)||0;this.currentPostId>0&&s===this.currentPostId||this.leadPostId>0&&s===this.leadPostId||this.isAlertClosed(s)||(this.alert=r,this.autoDismissMs=this.resolveAutoDismissMs(r),this.visible=!1,this.minimized=!1,this.reopened=!1,this.restoring=!1,this.progressActive=!1,this.clearDismissTimer(),this.clearRestoreTimer(),this.showAlert())},showAlert({startTimer:i=!0}={}){const r=()=>{this.visible=!0,i&&this.startAutoDismissTimer()};if(typeof this.$nextTick=="function"){this.$nextTick(r);return}r()},alertHref(){var r;const i=typeof((r=this.alert)==null?void 0:r.url)=="string"?this.alert.url.trim():"";if(i==="")return"#";try{const s=new URL(i,window.location.origin);return s.searchParams.set("utm_source","hotnews"),s.searchParams.set("utm_medium","web"),s.searchParams.set("utm_campaign","news-alert"),s.toString()}catch{return i}},closeAlert(){var r;const i=Number.parseInt(String(((r=this.alert)==null?void 0:r.postId)||0),10)||0;i>0&&this.setClosedAlertId(i),this.dismissAlert()},openMinimizedAlert(){this.clearAutoDismissTimer(),this.clearDismissTimer(),this.clearRestoreTimer(),this.progressActive=!1,this.reopened=!0,this.restoring=!0,this.minimized=!1,this.visible=!0,this.restoreTimer=window.setTimeout(()=>{this.restoring=!1,this.restoreTimer=null},ro)},dismissAlert(){this.clearAutoDismissTimer(),this.clearDismissTimer(),this.clearRestoreTimer(),this.progressActive=!1,this.minimized=!1,this.restoring=!1,this.visible=!1,this.dismissTimer=window.setTimeout(()=>{this.alert=null,this.reopened=!1,this.dismissTimer=null},io)},minimizeAlert(){this.clearAutoDismissTimer(),this.clearDismissTimer(),this.clearRestoreTimer(),this.progressActive=!1,this.visible=!1,this.restoring=!1,this.minimized=!0},startAutoDismissTimer(){this.clearAutoDismissTimer(),this.progressActive=!1,requestAnimationFrame(()=>{this.progressActive=!0,this.autoDismissTimer=window.setTimeout(()=>{this.minimizeAlert()},this.autoDismissMs)})},clearAutoDismissTimer(){this.autoDismissTimer!==null&&(window.clearTimeout(this.autoDismissTimer),this.autoDismissTimer=null)},clearDismissTimer(){this.dismissTimer!==null&&(window.clearTimeout(this.dismissTimer),this.dismissTimer=null)},clearRestoreTimer(){this.restoreTimer!==null&&(window.clearTimeout(this.restoreTimer),this.restoreTimer=null)},progressStyle(){return`--news-alert-progress-duration: ${this.autoDismissMs}ms;`},resolveAutoDismissMs(i){const r=this.alertTitleText(i),s=to+r.length*no;return Math.min(eo,Math.max(li,s))},alertTitleText(i){const r=typeof(i==null?void 0:i.title)=="string"?i.title:"";if(r===""||typeof document>"u")return r.trim();const s=document.createElement("textarea");return s.innerHTML=r.replace(/<[^>]*>/g,""),s.value.trim()},isAlertClosed(i){return i<=0?!1:this.getClosedAlertId()===i},getClosedAlertId(){try{return Number.parseInt(String(window.localStorage.getItem(ai)||0),10)||0}catch{return 0}},setClosedAlertId(i){try{window.localStorage.setItem(ai,String(i))}catch{}}}),oo=12,ao=async e=>{var l;if(!e||e.dataset.hn2LatestHydrated==="1")return;const t=e.querySelector("[data-hn2-latest-articles-list]"),n=e.querySelector("[data-hn2-latest-articles-loading]"),i=()=>{n&&n.classList.add("hidden")},r=()=>{t&&t.classList.remove("hidden")};if(!t){i();return}const s=(e.dataset.endpoint||"").trim();if(s===""){i();return}const o=Number.parseInt(e.dataset.limit||"5",10),a=Number.isFinite(o)?Math.max(1,Math.min(oo,o)):5;try{const c=await ci({endpoint:s}),u=typeof((l=c==null?void 0:c.latest_articles)==null?void 0:l.html)=="string"?c.latest_articles.html:"";if(u.trim()===""){i();return}
5t.innerHTML=u,Array.from(t.children).slice(a).forEach(d=>d.remove()),r(),i(),e.dataset.hn2LatestHydrated="1"}catch{i()}},ui=()=>{document.querySelectorAll('[data-hn2-latest-articles="frontend"]').forEach(t=>{ao(t)})},lo=(e,t)=>Math.max(0,Math.min(e,t)),co=48,uo=350;function fo(e){e.data("galleryGridOverlay",()=>({items:[],open:!1,activeIndex:0,imageWidth:0,bodyOverflow:"",handleResize:null,touchStartX:null,touchStartY:null,touchLastX:null,touchLastY:null,lastSwipeAt:0,init(){const t=this.$el.querySelector(".hn2-gallery-grid__data");if(t){try{const n=JSON.parse(t.textContent||"[]");this.items=Array.isArray(n)?n:[]}catch{this.items=[]}this.bodyOverflow=document.body.style.overflow||"",this.$watch("open",n=>{document.body.style.overflow=n?"hidden":this.bodyOverflow,n&&this.syncActiveSelection()}),this.$watch("activeIndex",()=>{this.open&&this.syncActiveSelection()}),this.handleResize=()=>{this.open&&this.scheduleWidthUpdate()},window.addEventListener("resize",this.handleResize)}},destroy(){this.handleResize&&window.removeEventListener("resize",this.handleResize)},scheduleWidthUpdate(){this.$nextTick(()=>{requestAnimationFrame(()=>this.updateImageWidth())})},updateImageWidth(){const t=this.$refs.currentImage;if(!t)return;const n=Math.round(t.getBoundingClientRect().width);n>0&&(this.imageWidth=n)},scrollActiveThumb(){this.open&&this.$nextTick(()=>{const t=this.$el.querySelector(".hn2-gallery-grid__lightbox-thumbs");if(!t)return;const i=t.querySelectorAll(".hn2-gallery-grid__lightbox-thumb")[this.activeIndex];i&&i.scrollIntoView({block:"center",inline:"center",behavior:"smooth"})})},get current(){return this.items[this.activeIndex]||{}},syncActiveSelection(){this.scheduleWidthUpdate(),this.scrollActiveThumb()},openAt(t){this.items.length&&(this.activeIndex=lo(t,this.items.length-1),this.open=!0)},close(){this.open=!1},shouldIgnoreTapAfterSwipe(){return Date.now()-this.lastSwipeAt<uo},goNext(){this.shouldIgnoreTapAfterSwipe()||this.next()},goPrev(){this.shouldIgnoreTapAfterSwipe()||this.prev()},next(){!this.open||!this.items.length||(this.activeIndex=(this.activeIndex+1)%this.items.length)},prev(){!this.open||!this.items.length||(this.activeIndex=(this.activeIndex-1+this.items.length)%this.items.length)},resetTouchState(){this.touchStartX=null,this.touchStartY=null,this.touchLastX=null,this.touchLastY=null},onTouchStart(t){var i;if(!this.open)return;const n=(i=t.touches)==null?void 0:i[0];n&&(this.touchStartX=n.clientX,this.touchStartY=n.clientY,this.touchLastX=n.clientX,this.touchLastY=n.clientY)},onTouchMove(t){var i;if(this.touchStartX===null||this.touchStartY===null)return;const n=(i=t.touches)==null?void 0:i[0];n&&(this.touchLastX=n.clientX,this.touchLastY=n.clientY)},onTouchEnd(t){var a;if(this.touchStartX===null||this.touchStartY===null)return;const n=(a=t.changedTouches)==null?void 0:a[0],i=(n==null?void 0:n.clientX)??this.touchLastX,r=(n==null?void 0:n.clientY)??this.touchLastY,s=(i??this.touchStartX)-this.touchStartX,o=(r??this.touchStartY)-this.touchStartY;if(this.resetTouchState(),!(Math.abs(s)<co||Math.abs(s)<=Math.abs(o))){if(this.lastSwipeAt=Date.now(),s<0){this.next();return}this.prev()}}}))}function ho(){return{step:1,totalSteps:4,ready:!1,swipeStartX:null,swipeStartY:null,swipeStartedAt:null,async init(){var r;this.step=this._readStepFromUrl(),window.addEventListener("popstate",()=>{this.step=this._readStepFromUrl()});let e=!1;try{e=sessionStorage.getItem("hn_just_subscribed")==="1",e&&sessionStorage.removeItem("hn_just_subscribed")}catch{}const t=(r=this.$store)==null?void 0:r.piano;if(!t){if(e){this.ready=!0;return}window.location.replace("/premium");return}const n=Date.now()+5e3;for(;!t.isReady&&Date.now()<n;)await new Promise(s=>setTimeout(s,100));const i=Date.now()+3e3;for(;t.membershipState==="unknown"&&Date.now()<i;)await new Promise(s=>setTimeout(s,100));if(!e&&t.membershipState!=="member"){window.location.replace("/premium");return}this.ready=!0},handleSwipeStart(e){var n;if(!this._canHandleSwipe(e)){this._resetSwipe();return}const t=(n=e.changedTouches)==null?void 0:n[0];t&&(this.swipeStartX=t.clientX,this.swipeStartY=t.clientY,this.swipeStartedAt=Date.now())},handleSwipeEnd(e){var s;if(this.swipeStartX===null||this.swipeStartY===null)return;const t=(s=e.changedTouches)==null?void 0:s[0];if(!t){this._resetSwipe();return}const n=t.clientX-this.swipeStartX,i=t.clientY-this.swipeStartY,r=Date.now()-this.swipeStartedAt;this._resetSwipe(),!(r>700||Math.abs(n)<60||Math.abs(n)<Math.abs(i)*1.5)&&(n<0&&this.step<this.totalSteps?this.setStep(this.step+1):n>0&&this.step>1&&this.setStep(this.step-1))},complete(e){try{localStorage.setItem("hn_onboarding_completed","1")}catch{}let t=e||"/";try{const n=sessionStorage.getItem("hn_onboarding_return_url");
5if(n){const i=new URL(n,window.location.origin);i.origin===window.location.origin&&(t=i.href),sessionStorage.removeItem("hn_onboarding_return_url")}}catch{}window.location.href=t},setStep(e){e=Math.max(1,Math.min(this.totalSteps,e)),this.step=e;const t=new URL(document.URL);t.searchParams.set("onboarding-step",e),history.pushState({},"",t),this.$nextTick(()=>{window.scrollTo(0,0),document.documentElement.scrollTop=0,document.body.scrollTop=0})},_readStepFromUrl(){const e=new URL(document.URL).searchParams.get("onboarding-step"),t=parseInt(e,10);return Number.isFinite(t)?Math.max(1,Math.min(this.totalSteps,t)):1},_canHandleSwipe(e){var t,n;return window.matchMedia("(max-width: 767px)").matches?!((n=(t=e.target)==null?void 0:t.closest)!=null&&n.call(t,'a, button, input, textarea, select, [contenteditable="true"], .overflow-x-auto')):!1},_resetSwipe(){this.swipeStartX=null,this.swipeStartY=null,this.swipeStartedAt=null}}}function po(){const e=["despre-noi","premii-si-afilieri","produse-hotnews","parteneriate","istoria-hotnews","zyx-publishing-group"],t=e[0],n="active-tab";return{tab:t,tabs:e,init(){this.tab=this._readTabFromUrl(),window.addEventListener("popstate",()=>{this.tab=this._readTabFromUrl()})},setTab(i){const r=this.tabs.includes(i)?i:t;this.tab=r;const s=new URL(document.URL);s.searchParams.delete("despre-tab"),s.searchParams.set(n,r),history.pushState({},"",s),this.$nextTick(()=>{window.scrollTo(0,0),document.documentElement.scrollTop=0,document.body.scrollTop=0;const o=document.getElementById(`tab-btn-${r}`);o&&o.scrollIntoView({block:"nearest",inline:"nearest"})})},_readTabFromUrl(){const i=new URL(document.URL).searchParams.get(n);return this.tabs.includes(i)?i:t}}}const Me=6e4,mo=8*6e4,di=150,go=30,wo=6e4,Le=(e,t,n)=>{if(e===1)return`1 ${t}`;const i=e%100===0||e%100>=20;return`${e}${i?" de ":" "}${n}`},fi=(e,t=Date.now(),n=!1)=>{const i=Date.parse(e);if(Number.isNaN(i))return null;const r=Math.max(0,Math.floor((t-i)/1e3));if(r<60)return"acum";if(r<3600){const s=Math.floor(r/60);return n?`acum ${Le(s,"minut","minute")}`:`acum ${s} min`}return r<86400?`acum ${Le(Math.floor(r/3600),"orÄ","ore")}`:n?`acum ${Le(Math.floor(r/86400),"zi","zile")}`:null},_o=()=>({newUpdatesCount:0,postId:0,hasMore:!1,nextPage:2,loadingMore:!1,loadMoreInFlight:null,reloadOnClick:!1,paywallLocked:!1,pendingScrollId:null,pollTimeout:null,timeagoInterval:null,errorCount:0,stopped:!1,lastPayload:null,pendingUpdates:[],entranceObserver:null,paywallObserver:null,onAnchorClick:null,onVisibility:null,originalTitle:"",root:null,init(){this.root=this.$el,this.$nextTick(()=>{this.postId=parseInt(this.root.dataset.postId)||0,this.hasMore=this.root.dataset.liveHasMore==="1";
5const e=this.contentContainer();if(e){const r=e.querySelector("article.is-pinned");r&&e.prepend(r)}this.onAnchorClick=r=>this.handleAnchorClick(r),document.addEventListener("click",this.onAnchorClick),this.originalTitle=document.title,this.onVisibility=()=>this.updateTitle(),document.addEventListener("visibilitychange",this.onVisibility),this.refreshTimeago(),this.timeagoInterval=setInterval(()=>this.refreshTimeago(),wo);const t=this.root.closest(".hn-paywall");this.paywallLocked=!!(t&&t.hasAttribute("hidden"));const n=window.location.hash||"";n.startsWith("#u-")&&(this.paywallLocked?this.pendingScrollId=n.slice(3):this.scrollToUpdate(n.slice(3)));const i=this.postId>0&&this.root.dataset.liveStatus!=="ended";if(this.paywallLocked){this.setTimelineHidden(!0),this.paywallObserver=new MutationObserver(()=>{var r;t.hasAttribute("hidden")||((r=this.paywallObserver)==null||r.disconnect(),this.paywallObserver=null,this.paywallLocked=!1,this.setTimelineHidden(!1),this.pendingScrollId&&(this.scrollToUpdate(this.pendingScrollId),this.pendingScrollId=null),i&&this.schedulePoll(Me))}),this.paywallObserver.observe(t,{attributes:!0,attributeFilter:["hidden"]});return}i&&this.schedulePoll(Me)})},destroy(){var e,t;this.stopPolling(),clearInterval(this.timeagoInterval),(e=this.entranceObserver)==null||e.disconnect(),(t=this.paywallObserver)==null||t.disconnect(),this.onAnchorClick&&document.removeEventListener("click",this.onAnchorClick),this.onVisibility&&document.removeEventListener("visibilitychange",this.onVisibility),this.originalTitle&&(document.title=this.originalTitle)},updateTitle(){this.originalTitle&&(document.title=document.hidden&&this.newUpdatesCount>0?`(${this.newUpdatesCount}) ${this.originalTitle}`:this.originalTitle)},refreshTimeago(e=Date.now()){this.root&&(this.root.querySelectorAll(".hn2-live-update__time").forEach(t=>{const n=fi(t.getAttribute("datetime"),e);n&&t.textContent!==n&&(t.textContent=n)}),this.refreshSince(e))},refreshSince(e=Date.now()){var r,s;const t=(s=(r=this.root)==null?void 0:r.closest("article"))==null?void 0:s.querySelector(".hn2-live-since");if(!t)return;const n=this.latestVisibleTimestamp();if(!n)return;const i=fi(n,e,!0);i&&t.textContent!==i&&(t.textContent=i)},latestVisibleTimestamp(){let e=null,t=-1/0;return this.articles().forEach(n=>{const i=n.dataset.liveTimestamp,r=i?Date.parse(i):NaN;!Number.isNaN(r)&&r>t&&(t=r,e=i)}),e},contentContainer(){return this.root?this.root.querySelector(":scope > div"):null},articles(){return this.root?Array.from(this.root.querySelectorAll("article.hn2-live-update")):[]},hasNewUpdates(){return this.newUpdatesCount>0},setTimelineHidden(e){document.querySelectorAll(".hn2-live-key-events").forEach(t=>{t.style.display=e?"none":""})},buildArticleNode(e){const t=document.createElement("template");t.innerHTML=(e.html||"").trim();const n=t.content.querySelector("article.hn2-live-update");return!n||n.dataset.liveUpdateId!==e.updateId?null:n},loadMore(){return this.loadMoreInFlight?this.loadMoreInFlight:!this.hasMore||this.postId<=0?Promise.resolve(!1):(this.loadingMore=!0,this.loadMoreInFlight=this.fetchNextPage().finally(()=>{this.loadingMore=!1,this.loadMoreInFlight=null}),this.loadMoreInFlight)},async fetchNextPage(){var e;try{const t=await fetch(`/wp-json/hn2/v1/dynamic-fragments/${this.postId}?page=${this.nextPage}`);if(!t.ok)return!1;const n=(e=await t.json())==null?void 0:e.live_updates;if(!n)return this.hasMore=!1,!1;const i=this.contentContainer();if(!i)return!1;const r=new Set(this.articles().map(s=>s.dataset.liveUpdateId).filter(Boolean));return(n.updates||[]).forEach(s=>{if(!(s!=null&&s.updateId)||r.has(s.updateId))return;const o=this.buildArticleNode(s);o&&(this.activateScripts(o),i.append(o),this.hydrateFacebookEmbeds(o))}),this.refreshTimeago(),this.hasMore=!!n.has_more,this.nextPage+=1,!0}catch{return!1}},async ensureUpdateLoaded(e){const t=()=>this.articles().find(r=>r.dataset.liveUpdateId===e)||null;let n=t(),i=go;for(;!n&&this.hasMore&&i>0&&(i-=1,!!await this.loadMore());)n=t();return n},markCoverageEnded(){var t,n;const e=(n=(t=this.root)==null?void 0:t.closest("article"))==null?void 0:n.querySelector(".hn2-single-header-live");e&&(e.querySelectorAll(".ml-slot-live").forEach(i=>
5i.remove()),e.querySelectorAll(".metaline--live").forEach(i=>i.classList.remove("metaline--live")))},schedulePoll(e){this.stopped||(clearTimeout(this.pollTimeout),this.pollTimeout=setTimeout(()=>this.poll(),e))},stopPolling(){this.stopped=!0,clearTimeout(this.pollTimeout),this.pollTimeout=null},async poll(){var n;if(this.stopped)return;let e;try{const i=await fetch(`/wp-json/hn2/v1/dynamic-fragments/${this.postId}`);if(!i.ok)throw new Error(`HTTP ${i.status}`);e=(n=await i.json())==null?void 0:n.live_updates}catch{this.errorCount+=1,this.schedulePoll(Math.min(Me*2**this.errorCount,mo));return}if(this.errorCount=0,!e){this.stopPolling();return}this.lastPayload=e;const t=this.diffAgainstDom(e);if(Array.isArray(t)?(this.reloadOnClick=!1,this.pendingUpdates=t,this.newUpdatesCount=t.length):t&&t.reload?(this.reloadOnClick=!0,this.pendingUpdates=[],this.newUpdatesCount=t.count):(this.reloadOnClick=!1,this.pendingUpdates=[],this.newUpdatesCount=0),this.updateTitle(),e.status==="ended"){this.markCoverageEnded(),this.stopPolling();return}this.schedulePoll(Me)},diffAgainstDom(e){const t=(e.updates||[]).filter(a=>a&&typeof a.updateId=="string"&&a.updateId!==""),n=e.pinned&&typeof e.pinned.updateId=="string"&&e.pinned.updateId!==""?e.pinned:null,i=this.articles(),r=new Set(i.map(a=>a.dataset.liveUpdateId).filter(Boolean)),s=i.find(a=>!a.classList.contains("is-pinned"));if(s){const a=s.dataset.liveUpdateId||"";if(!(a!==""&&(a===((n==null?void 0:n.updateId)||"")||t.some(c=>c.updateId===a)))){const c=t.length>=(e.per_page||20),u=t.length>0&&t.every(d=>!r.has(d.updateId));if(a!==""&&c&&u){const d=i.filter(h=>!h.classList.contains("is-pinned")).length;return{reload:!0,count:Math.max(t.length,(e.total||0)-d)}}return null}}const o=[];return n&&!r.has(n.updateId)&&o.push({...n,pinned:!0}),t.forEach(a=>{r.has(a.updateId)||o.push({...a,pinned:!1})}),o},loadNewUpdates(){var s,o;if(this.reloadOnClick){window.location.reload();return}if(!this.pendingUpdates.length)return;const e=this.contentContainer();if(!e)return;(s=this.entranceObserver)==null||s.disconnect(),this.entranceObserver=new IntersectionObserver((a,l)=>{a.filter(c=>c.isIntersecting).forEach(c=>{setTimeout(()=>{c.target.classList.replace("opacity-0","opacity-100"),c.target.classList.replace("translate-y-12","translate-y-0")},150),l.unobserve(c.target)})},{threshold:.1});const t=new Set(this.articles().map(a=>a.dataset.liveUpdateId).filter(Boolean)),n=[];this.pendingUpdates.filter(a=>a.pinned).forEach(a=>{if(t.has(a.updateId))return;const l=this.buildArticleNode(a);if(!l)return;const c=e.querySelector("article.is-pinned");c&&c.dataset.liveUpdateId!==a.updateId&&(c.classList.remove("is-pinned","pt-5"),c.removeAttribute("data-live-pinned")),this.prepEntrance(l),this.activateScripts(l),e.prepend(l),t.add(a.updateId),n.push(l)});const i=e.querySelector("article.is-pinned");let r=i?i.nextElementSibling:e.firstElementChild;this.pendingUpdates.filter(a=>!a.pinned).forEach(a=>{if(t.has(a.updateId))return;const l=this.buildArticleNode(a);l&&(this.prepEntrance(l),this.activateScripts(l),e.insertBefore(l,r),r=l.nextElementSibling,t.add(a.updateId),n.push(l))}),this.pendingUpdates=[],this.newUpdatesCount=0,this.updateTitle(),this.applyPayloadMeta(this.lastPayload),n.length&&(n.forEach(a=>this.hydrateFacebookEmbeds(a)),this.refreshTimeago(),window.scrollTo({top:(((o=n[0])==null?void 0:o.offsetTop)||this.root.offsetTop)-di,behavior:"smooth"}))},applyPayloadMeta(e){var n;const t=(n=this.root)==null?void 0:n.closest("article");if(!(!e||!t)){if(Number.isInteger(e.updates_total)&&e.updates_total>0){const i=t.querySelector(".hn2-live-updates-count");i&&(i.textContent=Le(e.updates_total,"actualizare","actualizÄri"))}if(e.modified_display){const i=t.querySelector("time.hn2-live-modified");i&&(i.textContent=`Actualizat ${e.modified_display}`,e.modified_iso&&i.setAttribute("datetime",e.modified_iso))}this.syncTimeline(t,e.key_events)}},syncTimeline(e,t){if(!Array.isArray(t)||!t.length)return;const n=e.querySelector('.hn2-live-key-events [x-ref="track"]'),i=n==null?void 0:n.querySelector("a");if(!n||!i)return;const r=a=>Array.from(n.querySelectorAll("a")).find(l=>l.getAttribute("href")===`#u-${a}`)||null;let s=n.querySelector("a"),o=!1;t.forEach(a=>{if(!(a!=null&&a.updateId)||!a.headline)return;const l=r(a.updateId);if(l){s=l.nextElementSibling;return}const c=i.cloneNode(!0);c.setAttribute("href",`#u-${a.updateId}`);const u=c.querySelector("time");u&&(u.textContent=a.time||"",u.setAttribute("datetime",a.timestamp||""));const d=c.querySelector("p");d&&(d.textContent=a.headline),n.insertBefore(c,s),s=c.nextElementSibling,o=!0}),o&&window.dispatchEvent(new Event("resize"))},prepEntrance(e){var t;e.classList.add("opacity-0","transform","translate-y-12","transition-all","duration-1000","ease-out"),(t=this.entranceObserver)==null||t.observe(e)},activateScripts(e){e.querySelectorAll("script").forEach(t=>{const n=document.createElement("script");
5[...t.attributes].forEach(i=>n.setAttribute(i.name,i.value)),n.textContent=t.textContent,t.replaceWith(n)})},hydrateFacebookEmbeds(e){var n,i;if(!e.querySelector(".fb-post, .fb-video, .fb-page"))return;if((i=(n=window.FB)==null?void 0:n.XFBML)!=null&&i.parse){window.FB.XFBML.parse(e);return}if(document.getElementById("facebook-jssdk")||document.getElementById("hn2-fb-sdk")||document.querySelector('script[src*="connect.facebook.net"]'))return;const t=document.createElement("script");t.id="hn2-fb-sdk",t.async=!0,t.src="https://connect.facebook.net/ro_RO/sdk.js#xfbml=1&version=v18.0",document.body.append(t)},handleAnchorClick(e){var r,s;if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;const t=(s=(r=e.target).closest)==null?void 0:s.call(r,'a[href*="#u-"]');if(!t||!this.root||this.paywallLocked)return;let n;try{n=new URL(t.getAttribute("href")||"",window.location.href)}catch{return}if(n.pathname!==window.location.pathname||!n.hash.startsWith("#u-"))return;const i=n.hash.slice(3);i!==""&&(e.preventDefault(),this.scrollToUpdate(i))},async scrollToUpdate(e){const t=await this.ensureUpdateLoaded(e);t&&(window.scrollTo({top:t.offsetTop-di,behavior:"smooth"}),history.replaceState(null,"",`#u-${e}`))}}),bo=()=>({async share(e){const t=e.currentTarget.closest("article"),n=(t==null?void 0:t.dataset.liveUpdateId)||"",i=window.location.href.split("#")[0]+(n?`#u-${n}`:"");if(navigator.share){try{await navigator.share({title:document.title,url:i})}catch{}return}navigator.clipboard&&navigator.clipboard.writeText(i)}}),yo=()=>({pointerFine:!1,atStart:!0,atEnd:!0,onResize:null,init(){this.pointerFine=typeof window.matchMedia=="function"&&window.matchMedia("(hover: hover) and (pointer: fine)").matches,this.$nextTick(()=>this.updateEdges()),this.onResize=()=>this.updateEdges(),window.addEventListener("resize",this.onResize)},destroy(){this.onResize&&window.removeEventListener("resize",this.onResize)},updateEdges(){const e=this.$refs.track;if(!e)return;const t=e.scrollWidth-e.clientWidth;this.atStart=e.scrollLeft<=1,this.atEnd=e.scrollLeft>=t-1},step(e){const t=this.$refs.track;if(!t)return;const n=t.querySelector(":scope > a"),i=parseFloat(getComputedStyle(t).columnGap)||8,r=n?n.getBoundingClientRect().width+i:t.clientWidth*.5;t.scrollBy({left:e*r,behavior:"smooth"})}}),ue=e=>Number.isFinite(e)?Math.min(100,Math.max(0,e)):50,hi=(e,t,n,i)=>i==="vertical"?e.height>0?ue((n-e.top)/e.height*100):50:e.width>0?ue((t-e.left)/e.width*100):50,vo=(e,t,n=5)=>{switch(t){case"ArrowLeft":case"ArrowUp":return ue(e-n);case"ArrowRight":case"ArrowDown":return ue(e+n);case"Home":return 0;case"End":return 100;default:return null}},So=()=>({position:50,dragging:!1,orientation:"horizontal",root:null,init(){this.root=this.$el,this.orientation=this.root.dataset.orientation==="vertical"?"vertical":"horizontal",this.apply()},frame(){return this.root?this.root.querySelector(".hn2-image-compare__frame"):null},apply(){var e;this.root&&(this.root.style.setProperty("--hn2-ic-position",`${this.position}%`),(e=this.root.querySelector(".hn2-image-compare__handle"))==null||e.setAttribute("aria-valuenow",String(Math.round(this.position))))},setPosition(e){this.position=ue(e),this.apply()},onPointerDown(e){var n;const t=this.frame();t&&(this.dragging=!0,(n=t.setPointerCapture)==null||n.call(t,e.pointerId),this.setPosition(hi(t.getBoundingClientRect(),e.clientX,e.clientY,this.orientation)))},onPointerMove(e){if(!this.dragging)return;const t=this.frame();t&&this.setPosition(hi(t.getBoundingClientRect(),e.clientX,e.clientY,this.orientation))},onPointerUp(){this.dragging=!1},onKeyDown(e){const t=vo(this.position,e.key);t!==null&&(e.preventDefault(),this.setPosition(t))}});window.Alpine=v,v.data("myAccountPage",Gs),v.data("authPage",Ws),v.data("displayNameForm",Ks),v.data("newslettersForm",Vs),v.data("onboardingPage",ho),v.data("desprePage",po),v.data("newsletterHub",Xs),v.data("newsletterInlineForm",Ys),v.data("newsAlert",so),v.data("liveBlog",_o),v.data("liveShare",bo),v.data("liveTimeline",yo),v.data("imageCompare",So),Is(v),fo(v),v.store("overlayMenu",{open:!1,toggle(){this.open=!this.open},close(){this.open=!1}}),v.start(),Js(v),document.readyState==="complete"?oi():window.addEventListener("load",oi,{once:!0}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ui,{once:!0}):ui(),document.addEventListener("click",e=>{const t=e.target.closest(".full-menu > ul > .menu-item");!t||e.target.closest(".sub-menu")||e.target.closest("a")||t.querySelector(".sub-menu")&&(e.preventDefault(),t.classList.toggle("active"))})})();
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.