1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CwbitxsL.js","./DwtnIozm.js","./Bfd5Thr0.js","./C_YC4gad.js","./mapbox-gl.CvTM5QQz.css","./entry.DPduQbJL.css","./ClIxWlek.js","./D3PKPQ3P.js","./D_bAZNMZ.js","./CauIw9x6.js","./OfflineLiteDownloadControl.10NlMNdX.css","./Bl2ul4cs.js","./BJXFI6vg.js","./BTCv4Qcg.js","./XIfZ2ZVe.js","./TripletaMenu.CYw01WPh.css","./EventsWidget.lijMTdCg.css","./WHEx_fgZ.js","./C2UFknjp.js","./DsYe4Zr_.js","./Dk-HGWjQ.js","./CkqgTstX.js","./Cia36pfZ.js","./DHgICur8.js","./MapaMasCerca.ByD94W4m.css","./WEQbj8kc.js","./CqXVUoH5.js","./ChatPanel.DdtzCRQM.css","./vJG2W3RX.js","./Co12AGC9.js","./CHwfXkZx.js","./editor-cards.Qo8v6_Er.css","./BzJVkfZx.js","./_virtual_public.gGbXBAWK.css","./DCtv6Mxr.js","./useEditorUserDirectory.Ct7hI0jE.css","./EditorPanel.CzQc-9ZA.css","./CKc8EMIu.js","./Cvw1VDn3.js","./DbWHnApj.js","./INaturalistPanel.BsEQ13jy.css","./BwkyrneR.js","./TfLWK1bx.js","./DHR0LoMV.js","./7J6aicYO.js","./FWLyyBVu.js"])))=>i.map(i=>d[i]); 2import{an as ie,bF as jt,a7 as ve,w as F,v as Se,d0 as qt,z as w,m as r,B as pe,o as i,c as m,i as c,d as Z,b as fe,a8 as gt,am as Qt,e as t,n as D,a as C,a2 as Xe,t as N,D as L,d1 as Ye,k as Y,d7 as Xt,d6 as Zt,bQ as Ze,aj as Je,p as bt,V as yt,Y as ue,b_ as Jt,e5 as ea,e6 as ta,ai as j,j as O,l as et,e7 as aa,O as J,E as de,as as ae,f as ce,_ as re,x as me,q as T,M as Ce,ax as it,e8 as na,bb as Ee,ak as xt,e9 as wt,ea as $e,ae as oa,c6 as kt,a3 as Ct,F as Te,y as Oe,c1 as sa,eb as He,e4 as St,aQ as tt,dn as at,ec as la,ed as ra,ee as Et,bA as Re,r as ia,s as ua,C as nt,bL as ca,ef as da,dX as va,eg as pa,e2 as Tt,eh as fa,ei as ha,T as ma,ej as _a,ek as ga,el as ba,em as It,N as Lt,by as je,g as ot,h as Rt,en as ya,eo as Ne,R as At,bl as xa,ep as Pt,eq as wa,er as ka,es as Ca,bG as Sa,bH as Ea,et as Ta,bV as Ia,eu as La,ev as Ra,ew as Aa,dg as Pa,bt as Da,L as we,aY as Ma,ex as $a,ey as Fe,bR as Na,aA as Oa,ez as Ba,ah as X,eA as Ha,eB as Fa,eC as Ua,eD as za,eE as Va,eF as Wa,eG as Ga,eH as Ka}from"./DwtnIozm.js";import{_ as qe}from"./Bl2ul4cs.js";import{_ as Ya}from"./BJXFI6vg.js";import{_ as ja}from"./BTCv4Qcg.js";import{I as qa}from"./ClIxWlek.js";import{u as Qa,s as ut}from"./XIfZ2ZVe.js";const Dt=720,Xa=720,Za=1024,Ja=1/3;function Mt(e){return e.isFullscreen?!1:!Number.isFinite(e.panelWidthPx)||e.panelWidthPx<=0||Number.isFinite(e.panelRatio)&&e.panelRatio<=Ja?!0:e.panelWidthPx<Dt}function en(e){return Mt(e)?!1:e.panelWidthPx>=Dt}function $t(e){return Mt(e)?"one-col":e.panelWidthPx>=Za?"two-col-mosaic":e.panelWidthPx>=Xa?"two-col-simple":"one-col"}function tn(e){return $t(e)!=="one-col"}const an="menu-grid grid auto-rows-auto grid-cols-1 gap-3",nn="menu-grid grid auto-rows-auto grid-cols-12 gap-6",on="menu-grid grid auto-rows-auto grid-cols-2 gap-3",sn="menu-grid grid auto-rows-[176px] grid-cols-1 gap-3",ln="menu-grid grid grid-flow-dense auto-rows-[176px] grid-cols-12 gap-6",rn="menu-grid grid grid-flow-dense auto-rows-[176px] grid-cols-2 gap-3";function un(e){switch(e){case"one-col":return an;case"two-col-simple":return on;case"two-col-mosaic":return nn;default:return e}}function cn(e){switch(e){case"one-col":return sn;case"two-col-simple":return rn;case"two-col-mosaic":return ln;default:return e}}function Ys(e){switch(e){case"two-col-mosaic":return"col-span-1 tablet:col-span-2 laptop:col-span-3";case"one-col":case"two-col-simple":return"col-span-1";default:return e}}function js(e,a,n){switch(e){case"one-col":return"col-span-full min-w-0";case"two-col-simple":return n?"col-span-2 min-w-0":"min-w-0";case"two-col-mosaic":return a;default:return e}}function qs(e){switch(e){case"one-col":return"col-span-full grid grid-cols-1 gap-3";case"two-col-simple":case"two-col-mosaic":return"col-span-full grid grid-cols-2 gap-3";default:return e}}function Qs(e,a){return!a||e==="one-col"?"min-w-0":"col-span-2 min-w-0"}function Xs(e,a,n,s){if(s)return"flex min-h-0 flex-1 flex-col";switch(e){case"one-col":return"grid grid-cols-1 gap-3";case"two-col-simple":return n?"grid grid-cols-2 gap-1.5":"grid grid-cols-1 gap-1.5";case"two-col-mosaic":return a;default:return e}}const Zs="h-[200px] min-h-[200px]",Js="h-[164px] min-h-[164px]",dn="container:aside";function vn(){const e=ie(),{width:a}
2=jt(),n=ve(dn,void 0),s=w(null);F(()=>n?.value??null,y=>{y&&(s.value=y)},{immediate:!0}),Se(()=>{s.value||(s.value=document.getElementById("tripleta-aside"))});const{width:o}=qt(s,{width:0,height:0},{box:"border-box"}),d=r(()=>o.value>0?o.value:0),f=r(()=>e.isFullscreen.value?1:o.value>0&&a.value>0?o.value/a.value:e.panelRatio.value),u=r(()=>({panelWidthPx:d.value,panelRatio:f.value,isFullscreen:e.isFullscreen.value})),p=r(()=>en(u.value)),v=r(()=>$t(u.value)),g=r(()=>tn(u.value)),_=r(()=>un(v.value)),l=r(()=>cn(v.value));return{panelChromeWidth:d,showChromeLabels:p,menuGridMode:v,menuTwoColumns:g,menuGridClass:_,menuSearchGridClass:l}}const pn=new Set(["content","inat","ebird"]),el=e=>e!=="editor",tl=e=>pn.has(e),fn=e=>e.canAccessEditor&&e.editorSessionEnabled&&e.mode!=="editor",al=e=>e.overlayActive&&e.focusedAction===null;function Be(){if(typeof navigator>"u")return!1;const e=navigator.userAgent||"",a=navigator.userAgentData?.platform||navigator.platform||"";return/Mac|iPod|iPhone|iPad/i.test(`${a} ${e}`)}function st(e,a=Be()){const n=e.length===1?e.toUpperCase():e;return a?`â${n}`:`Ctrl+${n}`}const hn={},mn={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-pencil"};function _n(e,a){return i(),m("svg",mn,[...a[0]||(a[0]=[c("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"},null,-1),c("path",{d:"m15 5 4 4"},null,-1)])])}const ct=pe(hn,[["render",_n]]),gn={class:"flex gap-2"},bn=["data-tip"],yn=["aria-label","title"],xn={key:0},wn=["data-tip"],kn=["aria-label","title"],Cn=["aria-label","title"],Sn={key:0},En=["aria-label","title"],Tn=["aria-label","title","aria-pressed"],In={key:2},Ln=["aria-pressed","title","aria-label"],dt="inline-flex h-11 items-center justify-center gap-2 rounded-lg font-[National2] text-sm font-medium text-white transition hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40",Rn=Z({__name:"PanelControls",props:{variant:{default:"dark"}},setup(e){const a=e,{t:n}=fe(),s=ie(),o=gt(),d=Qt(),{showChromeLabels:f}=vn(),u=w(!1);Se(()=>{u.value=Be()});const p=r(()=>n.value("tripleta_close_shortcut_hint",{defaultValue:"{toggle} abrir/cerrar · Esc para cerrar",toggle:st("B",u.value)})),v=r(()=>a.variant==="light"),g=r(()=>v.value?"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-gray-200 text-gray-900 transition-colors hover:bg-gray-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-300":""),_=r(()=>f.value?`${dt} px-3`:`${dt} w-11 shrink-0 px-0`),l=r(()=>s.isFullscreen.value?n.value("tripleta_exit_fullscreen","Reducir panel"):n.value("tripleta_enter_fullscreen","Pantalla completa")),y=r(()=>n.value("tripleta_open_editor_panel","Abrir editor")),A=r(()=>fn({canAccessEditor:o.canAccessEditor.value,editorSessionEnabled:d.enabled.value,mode:s.mode.value})),M=()=>{s.setMode("editor")};return(K,P)=>{const x=Xe,R=Xt,W=Zt;return i(),m("div",gn,[v.value?(i(),m("div",{key:1,class:"tooltip-start-aligned tooltip tooltip-bottom tooltip-secondary","data-tip":p.value},[c("button",{type:"button",class:D(g.value),onClick:P[1]||(P[1]=b=>t(s).close()),"aria-label":t(n)("tripleta_close","Cerrar panel"),title:t(n)("tripleta_close","Cerrar panel")},[C(Ye,{class:"h-4 w-4 text-current","aria-hidden":"true"})],10,kn)],8,wn)):(i(),m("div",{key:0,class:"tooltip-start-aligned tooltip tooltip-bottom tooltip-secondary","data-tip":p.value},[c("button",{type:"button",class:D(_.value),style:{"background-color":"#21625c"},"aria-label":t(n)("tripleta_close","Cerrar panel"),title:t(n)("tripleta_close","Cerrar panel"),onClick:P[0]||(P[0]=b=>t(s).close())},[C(x,{class:"size-3","aria-hidden":"true"}),t(f)?(i(),m("span",xn,N(t(n)("tripleta_close","Cerrar panel")),1)):L("",!0)],10,yn)],8,bn)),A.value&&!v.value?(i(),m("button",{key:2,type:"button",class:D(_.value),style:{"background-color":"#21625c"},"aria-label":y.value,title:y.value,onClick:M},[C(ct,{class:"size-3","aria-hidden":"true"}),t(f)?(i(),m("span",Sn,N(y.value),1)):L("",!0)],10,Cn)):A.value&&v.value?(i(),m("button",{key:3,type:"button",class:D(g.value),"aria-label":y.value,title:y.value,onClick:M},[C(ct,{class:"h-4 w-4","aria-hidden":"true"})],10,En)):L("",!0),!v.value&&t(s).isDesktop.value?(i(),m("button",{key:4,type:"button",class:D(_.value),style:{"background-color":"#21625c"},"aria-label":l.value,title:l.value,"aria-pressed":t(s).isFullscreen.value,onClick:P[2]||(P[2]=b=>t(s).toggleFullscreen())},[t(s).isFullscreen.value?(i(),Y(W,{key:1,class:"size-3","aria-hidden":"true"})):(i(),Y(R,{key:0,class:"size-3","aria-hidden":"true"})),t(f)?(i(),m("span",In,N(l.value),1)):L("",!0)],10,Tn)):v.value&&t(s).isDesktop.value?(i(),m("button",{key:5,type:"button",class:D(g.value),"aria-pressed":t(s).isFullscreen.value,title:l.value,"aria-label":l.value,onClick:P[3]||(P[3]=b=>t(s).toggleFullscreen())},[t(s).isFullscreen.value?(i(),Y(W,{key:1,class:"h-4 w-4","aria-hidden":"true"})):(i(),Y(R,{key:0,class:"h-4 w-4","aria-hidden":"true"}))],10,Ln)):L("",!0)])}}}),An=pe(Rn,[["__scopeId","data-v-519f500e"]]),Pn=["id","aria-labelledby","aria-expanded"],Dn={key:0,class:"pointer-events-none absolute inset-x-0 top-0 z-50 flex items-center justify-between px-4 py-2 tablet:px-6 laptop:px-4"},Mn={class:"pointer-events-auto"},$n={class:"tripleta-panel-logo-slot pointer-events-auto flex min-w-0 max-w-[7rem] shrink-0 justify-end overflow-hidden"},Nn=["src"],On={class:"relative h-full"},Bn={key:0,class:"absolute inset-0 h-full"}
2,Hn={key:0,class:"absolute inset-0 h-full"},Fn={key:0,class:"absolute inset-0 h-full"},Un={key:0,class:"absolute inset-0 h-full"},zn={key:0,class:"absolute inset-0 h-full"},Vn={key:0,class:"absolute inset-0 h-full"},Wn={key:0,class:"absolute inset-0 h-full"},Gn={key:0,class:"absolute inset-0 h-full"},Kn={class:"flex h-full items-center justify-center"},Yn=Z({__name:"SidePanel",setup(e){const a=ie(),n=Ze(),s=w(!0);Je(()=>{s.value=!1});const o=gt(),d=bt(),f=r(()=>o.canAccessEditor.value),u=w(!1),p=w(!1),v=w(!1),g=w(!1),_=w(!1),l=w(!1);F(()=>a.mode.value,k=>{k==="menu"&&(u.value=!0),k==="map"&&(p.value=!0),k==="chat"&&(v.value=!0),k==="editor"&&f.value&&(g.value=!0),k==="notifications"&&(_.value=!0),k==="content"&&(l.value=!0)},{immediate:!0}),F(()=>[a.mode.value,f.value,o.session.value.authenticated],async([k,S,U])=>{k==="editor"&&U&&!S&&await a.setMode("menu")});const y=ce(()=>re(()=>import("./CwbitxsL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url)),A=ce(()=>re(()=>import("./WHEx_fgZ.js"),__vite__mapDeps([17,1,2,3,4,5,18,19,20,21,22,23,24]),import.meta.url)),M=ce(()=>re(()=>import("./WEQbj8kc.js"),__vite__mapDeps([25,1,2,3,4,5,26,12,27]),import.meta.url)),K=ce(()=>re(()=>import("./vJG2W3RX.js"),__vite__mapDeps([28,1,2,3,4,5,29,30,31,32,33,34,35,11,12,13,6,14,36]),import.meta.url)),P=ce(()=>re(()=>import("./CKc8EMIu.js"),__vite__mapDeps([37,38,1,2,3,4,5,39,12,40]),import.meta.url)),x=ce(()=>re(()=>import("./BwkyrneR.js"),__vite__mapDeps([41,1,2,3,4,5,39,42]),import.meta.url)),R=ce(()=>re(()=>import("./DHR0LoMV.js"),__vite__mapDeps([43,1,2,3,4,5,12,11,13,6,14]),import.meta.url)),W=ce(()=>re(()=>import("./7J6aicYO.js"),__vite__mapDeps([44,1,2,3,4,5]),import.meta.url));yt();const b=ue();F(()=>b.path,(k,S)=>{if(!(!s.value||!S||Jt(k)===ea&&ta(b.query))&&k!==S&&!a.isDesktop.value&&a.isOpen.value){const E=a.mode.value;(E==="menu"||E==="map"||E==="notifications"||E==="content")&&a.close()}}),F(()=>a.chatQuery.value,(k,S)=>{},{immediate:!0});const z=r(()=>a.chatQuery.value),te=r(()=>a.chatInitialMessage.value),V=r(()=>{const k=a.mode.value,S=te.value,U=z.value;return(()=>{switch(k){case"menu":return{onClose:()=>{a.isDesktop.value,a.close()}};case"map":return{};case"chat":const B={initialMessage:S,query:U};return console.log("[SidePanel] Chat props computed:",B,{mode:k,chatQueryValue:a.chatQuery.value,chatInitialMessageValue:a.chatInitialMessage.value}),B;case"editor":return{};case"inat":return{};case"ebird":return{};case"notifications":return{};case"content":return{};default:return{}}})()});return(k,S)=>{const U=An,E=et;return i(),m("div",{class:"relative flex h-full flex-col",role:"tabpanel",id:`tripleta-panel-${t(a).mode.value}`,"aria-labelledby":`tab-${t(a).mode.value}`,"aria-expanded":t(a).isOpen.value},[t(a).isDesktop.value&&t(a).mode.value!=="editor"?(i(),m("div",Dn,[c("div",Mn,[C(U,{variant:t(a).mode.value==="content"&&t(n).content.value?.lightSurface?"light":"dark"},null,8,["variant"])]),c("div",$n,[C(j,{name:"tripleta-panel-logo",appear:""},{default:O(()=>[C(E,{to:t(d)("/"),class:"inline-flex","aria-label":"Ir al inicio",onClick:t(a).prepareHomeNavigationFromLogo},{default:O(()=>[c("img",{src:t(qe),width:"105",height:"77",alt:"Para la Naturaleza",class:"block h-[60px] w-auto max-w-none shrink-0 object-contain"},null,8,Nn)]),_:1},8,["to","onClick"])]),_:1})])])):L("",!0),c("div",{class:D(["min-h-0 flex-1",{"overflow-hidden":t(a).mode.value==="menu","overflow-y-auto":t(a).mode.value!=="menu","pt-20":t(a).isDesktop.value&&t(a).mode.value!=="editor","pb-20":t(a).isDesktop.value&&t(a).mode.value!=="map"&&t(a).mode.value!=="menu"&&t(a).mode.value!=="content"&&(t(a).isFullscreen.value||t(a).panelRatio.value>.4)}])},[(i(),Y(aa,null,{default:O(()=>[c("div",On,[C(j,{name:"tripleta-fade"},{default:O(()=>[t(a).mode.value==="menu"||t(u)?J((i(),m("div",Bn,[C(t(y),de(t(V),{class:"h-full"}),null,16)],512)),[[ae,t(a).mode.value==="menu"]]):L("",!0)]),_:1}),C(j,{name:"tripleta-fade"},{default:O(()=>[t(a).mode.value==="map"||t(p)?J((i(),m("div",Hn,[C(t(A),de(t(V),{class:"h-full"}),null,16)],512)),[[ae,t(a).mode.value==="map"]]):L("",!0)]),_:1}),C(j,{name:"tripleta-fade"},{default:O(()=>[t(a).mode.value==="chat"||t(v)?J((i(),m("div",Fn,[C(t(M),de(t(V),{class:"h-full"}),null,16)],512)),[[ae,t(a).mode.value==="chat"]]):L("",!0)]),_:1}),C(j,{name:"tripleta-fade"},{default:O(()=>[t(f)&&(t(a).mode.value==="editor"||t(g))?J((i(),m("div",Un,[C(t(K),de(t(V),{class:"h-full"}),null,16)],512)),[[ae,t(a).mode.value==="editor"]]):L("",!0)]),_:1}),C(j,{name:"tripleta-fade"},{default:O(()=>[t(a).mode.value==="inat"?J((i(),m("div",zn,[C(t(P),{class:"h-full"})],512)),[[ae,t(a).mode.value==="inat"]]):L("",!0)]),_:1}),C(j,{name:"tripleta-fade"},{default:O(()=>[t(a).mode.value==="ebird"?J((i(),m("div",Vn,[C(t(x),{class:"h-full"})],512)),[[ae,t(a).mode.value==="ebird"]]):L("",!0)]),_:1}),C(j,{name:"tripleta-fade"},{default:O(()=>[t(a).mode.value==="notifications"||t(_)?J((i(),m("div",Wn,[C(t(R),{class:"h-full"})],512)),[[ae,t(a).mode.value==="notifications"]]):L("",!0)]),_:1}),C(j,{name:"tripleta-fade"},{default:O(()=>[t(a).mode.value==="content"||t(l)?J((i(),m("div",Gn,[C(t(W),{class:"h-full"})],512)),[[ae,t(a).mode.value==="content"]]):L("",!0)]),_:1})])]),fallback:O(()=>
2[c("div",Kn,[c("span",{class:D(["loading loading-ring loading-lg",t(a).mode.value==="editor"?"text-gray-400":"text-white"]),"aria-label":"Cargando contenido"},null,2)])]),_:1}))],2)],8,Pn)}}}),Nt=pe(Yn,[["__scopeId","data-v-9c424722"]]),jn=Z({__name:"ResizeHandle",setup(e){const a=ie(),n=w(!1),s=w(0),o=w(0),d=p=>{a.isFullscreen.value||(n.value=!0,s.value=p.clientX,o.value=a.panelWidth.value,p.target?.setPointerCapture(p.pointerId),document.body.style.userSelect="none",document.body.style.cursor="col-resize",document.body.classList.add("tripleta-resizing"),window.addEventListener("pointermove",f),window.addEventListener("pointerup",u))},f=p=>{if(!n.value)return;const v=p.clientX-s.value,g=o.value-v,_=Math.max(a.minWidth.value,Math.min(g,a.maxWidth.value));a.setWidth(_)},u=()=>{n.value&&(n.value=!1,document.body.style.userSelect="",document.body.style.cursor="",document.body.classList.remove("tripleta-resizing"),window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",u),Ce(()=>{window.dispatchEvent(new CustomEvent("tripleta:resize"))}))};return me(()=>{n.value&&u()}),(p,v)=>(i(),m("div",{class:D(["group absolute bottom-0 left-0 top-0 w-1 cursor-col-resize bg-white/10 transition-colors duration-200 hover:bg-white/20",{"bg-white/30":t(n),"cursor-not-allowed":t(a).isFullscreen.value}]),onPointerdown:d,style:T({pointerEvents:t(a).isFullscreen.value?"none":"auto"})},[c("div",{class:D(["absolute left-1/2 top-1/2 h-12 w-1 -translate-x-1/2 -translate-y-1/2 transform rounded-full bg-white/40 opacity-0 transition-opacity duration-200 group-hover:opacity-100",{"opacity-100":t(n)}])},null,2),v[0]||(v[0]=c("div",{class:"absolute -left-2 -right-2 bottom-0 top-0"},null,-1))],38))}}
2),qn=pe(jn,[["__scopeId","data-v-423c9111"]]),Qn={key:0,class:"fixed inset-0 z-[69]"},Xn=["aria-label"],Zn=["data-tip"],Jn=["data-tip"],eo=["aria-label"],to=["aria-valuemax","aria-valuenow"],ao=300,no=Z({__name:"BottomSheet",setup(e){const{t:a}=fe(),n=ie(),s=Ze(),o=r(()=>n.mode.value==="content"&&!!s.content.value?.lightSurface),d=r(()=>n.mode.value!=="content"?"":s.content.value?.contentShellBgClass?.trim()||""),f=r(()=>!!d.value),u=w(!1);Se(()=>{u.value=Be()});const p=r(()=>a.value("tripleta_close_shortcut_hint",{defaultValue:"{toggle} abrir/cerrar · Esc para cerrar",toggle:st("B",u.value)})),v=r(()=>a.value("tripleta_close","Cerrar panel")),g=w(!1),_=w(0),l=w(0),y=w(0),A=w(!1),M=w(!1),K=w(),P=w();it(()=>{y.value=n.sheetHeight.value});const x=r(()=>{const k=$e;return{backgroundColor:`rgba(0, 0, 0, ${.5*Math.min(Math.max(n.sheetHeight.value/k,0),1)})`}}),R=k=>{g.value=!0,_.value=k.clientY,l.value=n.sheetHeight.value,k.target?.setPointerCapture(k.pointerId),document.body.style.overflow="hidden",window.addEventListener("pointermove",W),window.addEventListener("pointerup",b)},W=k=>{if(!g.value)return;const S=_.value-k.clientY,U=window.innerHeight,E=S/U*100,B=Math.max(0,Math.min($e,l.value+E));n.setSheetHeight(B)},b=()=>{g.value&&(g.value=!1,document.body.style.overflow="",n.sheetHeight.value===0&&n.close(),window.removeEventListener("pointermove",W),window.removeEventListener("pointerup",b))},z=()=>{n.close()};it(()=>{const k=n.isOpen.value;if(n.isDesktop.value){A.value=!1,M.value=!1;return}k?(n.sheetHeight.value===0&&n.setSheetHeight(na),A.value||(A.value=!0),M.value=!0):(M.value=!1,setTimeout(()=>{n.isOpen.value||(A.value=!1)},ao))});const te=w(),V=w([]);return Ee("keydown",k=>{if(!(!n.isOpen.value||n.isDesktop.value)){if(k.key==="Escape"){n.close();return}if(k.key==="Tab"&&V.value.length>0){const S=V.value[0],U=V.value[V.value.length-1];k.shiftKey?document.activeElement===S&&(k.preventDefault(),U.focus()):document.activeElement===U&&(k.preventDefault(),S.focus())}}}),F(()=>n.isOpen.value,k=>{k&&!n.isDesktop.value&&Ce(()=>{if(te.value){const S=["button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","a[href]",'[tabindex]:not([tabindex="-1"])'].join(", ");V.value=Array.from(te.value.querySelectorAll(S)),V.value.length>0&&V.value[0].focus()}})}),me(()=>{g.value&&b()}),(k,S)=>{const U=Nt;return i(),Y(xt,{to:"body"},[C(j,{appear:"",name:"bottomsheet","enter-active-class":"bottomsheet-enter-active","leave-active-class":"bottomsheet-leave-active","enter-from-class":"bottomsheet-enter-from","leave-to-class":"bottomsheet-leave-to"},{default:O(()=>[t(A)&&!t(n).isDesktop.value?(i(),m("div",Qn,[C(j,{appear:"",name:"backdrop","enter-active-class":"backdrop-enter-active","leave-active-class":"backdrop-leave-active","enter-from-class":"backdrop-enter-from","leave-to-class":"backdrop-leave-to"},{default:O(()=>[t(M)&&t(n).sheetHeight.value>0?(i(),m("div",{key:0,class:"absolute inset-0",style:T(t(x)),onClick:z},null,4)):L("",!0)]),_:1}),C(j,{appear:"",name:"sheet","enter-active-class":"sheet-enter-active","leave-active-class":"sheet-leave-active","enter-from-class":"sheet-enter-from","enter-to-class":"sheet-enter-to","leave-from-class":"sheet-leave-from","leave-to-class":"sheet-leave-to"},{default:O(()=>[t(M)?(i(),m("div",{key:0,ref_key:"sheetRef",ref:K,class:D(["absolute inset-x-0 bottom-0 flex flex-col rounded-t-[16px] shadow-2xl",{"bg-black":t(n).mode.value==="map","bg-white":(t(n).mode.value==="editor"||t(o))&&!t(f),[t(wt)]:t(n).mode.value!=="map"&&t(n).mode.value!=="editor"&&!t(o)&&!t(f),[t(d)]:t(f)}]),role:"dialog","aria-modal":"true","aria-label":`Panel ${t(n).mode.value}`,style:T({height:`${t(n).sheetHeight.value}vh`})},[t(n).mode.value!=="editor"?(i(),m("div",{key:0,class:"tooltip tooltip-left tooltip-secondary absolute right-4 top-3 z-50","data-tip":t(p)},[C(Ya,{"aria-label":t(v),onClick:S[0]||(S[0]=E=>t(n).close())},{default:O(()=>[C(Ye,{class:"size-full"})]),_:1},8,["aria-label"])],8,Zn)):(i(),m("div",{key:1,class:"tooltip tooltip-left tooltip-secondary absolute right-4 top-3 z-50","data-tip":t(p)},[c("button",{type:"button",class:"inline-flex size-11 shrink-0 items-center justify-center rounded-lg border border-gray-200 bg-gray-200 text-gray-900 transition hover:bg-gray-300",onClick:S[1]||(S[1]=E=>t(n).close()),"aria-label":t(v)},[C(Ye,{class:"h-4 w-4"})],8,eo)],8,Jn)),c("div",{class:D(["flex shrink-0 cursor-grab justify-center py-2 active:cursor-grabbing",{"cursor-grabbing":t(g)}])},[c("div",{ref_key:"handleRef",ref:P,class:D(["h-1.5 w-12 rounded-full transition-colors duration-200",{"bg-white/40":t(n).mode.value!=="editor","bg-gray-300":t(n).mode.value==="editor","bg-white/60":t(g)&&t(n).mode.value!=="editor","bg-gray-400":t(g)&&t(n).mode.value==="editor"}]),role:"slider","aria-label":"Ajustar altura del panel","aria-valuemin":0,"aria-valuemax":t($e),"aria-valuenow":t(n).sheetHeight.value,tabindex:"0",onPointerdown:R,onKeydown:S[2]||(S[2]=E=>{if(E.key==="ArrowUp"){E.preventDefault();const B=Math.min(t($e),t(n).sheetHeight.value+10);t(n).setSheetHeight(B)}else if(E.key==="ArrowDown"){E.preventDefault();const B=Math.max(0,t(n).sheetHeight.value-10);t(n).setSheetHeight(B),B===0&&t(n).close()}})},null,42,to)],2),c("div",{ref_key:"sheetContentRef",ref:te,class:"min-h-0 flex-1 overflow-hidden"},[C(U)],512)],14,Xn)):L("",!0)]),_:1})])):L("",!0)]),_:1})])}}}),oo=pe(no,[["__scopeId","data-v-6f109590"]]),so=12e3;function Ue(e){const a=window.FundraiseUp;if(!a)return!1;try{const n=a.openCheckout;if(typeof n=="function")return n.call(a,e),!0}catch{}try{if(typeof a.call=="function")return a.call("openCheckout",e),!0}catch{}return!1}function lo(e){if(Ue(e))return;const a=window.FundraiseUp;if(a&&typeof a.then=="function"){a.then(()=>{Ue(e)});return}const n=Date.now(),s=()=>{Ue(e)||(Date.now()-n<so?requestAnimationFrame(s):console.warn("[openFundraiseUpCheckout] Widget no listo; prueba FundraiseUp.openCheckout en consola.",e))};requestAnimationFrame(s)}const vt="FUNSDSULFZD";function ro(e,a){const n=typeof e=="string"?e.trim().replace(/^#/,""):"",s=typeof a=="str
2ing"?a.trim():"";if(n&&/^https?:\/\//i.test(n))return{id:(n.match(/\/-\/([A-Za-z0-9]+)/)?.[1]??n).toUpperCase(),url:s||n};const o=(n||vt).toUpperCase();return s?{id:o,url:s}:/^FUN/i.test(o)?{id:o,url:""}:n?{id:o,url:`https://paralanaturaleza.donorsupport.co/-/${o}`}:{id:vt,url:""}}function io(){const e=oa(),a=r(()=>ro(e.public.fundraiseUpCheckoutTarget,e.public.fundraiseUpCheckoutUrl)),n=r(()=>a.value.id);function s(f){const u=document.createElement("a");u.href=`#${f}`,u.setAttribute("aria-hidden","true"),u.tabIndex=-1,Object.assign(u.style,{position:"fixed",width:"0",height:"0",opacity:"0",pointerEvents:"none"}),document.body.appendChild(u),u.click(),u.remove()}function o(f){const u=document.createElement("a");u.href=f,u.rel="noopener noreferrer",u.setAttribute("aria-hidden","true"),u.tabIndex=-1,document.body.appendChild(u),u.click(),u.remove()}function d(){const{id:f,url:u}=a.value;lo(f),!/^FUN/i.test(f)&&(s(f),u&&o(u))}return{openCheckout:d,checkoutTarget:n,checkout:a}}const uo=["href","aria-label"],co={key:0,class:"flex items-center gap-2","aria-hidden":"true"},vo={class:"flex items-center gap-2 sm:hidden","aria-hidden":"true"},po={class:"hidden flex-col items-center gap-1 sm:flex","aria-hidden":"true"},ze="font-[National2] text-[15px] font-medium uppercase leading-none tracking-[-0.15px] [text-shadow:0px_2px_8px_rgba(0,0,0,0.1),0px_1px_2px_rgba(0,0,0,0.05)]",Ve="block size-4 shrink-0",We="donate-dock-heartbeat",fo=Z({__name:"DonateDockTab",props:{embeddedBottomNav:{type:Boolean,default:!1},embeddedDockRow:{type:Boolean,default:!1}},setup(e){const a={barBg:"#16423E",actionBg:"#21625C",textColor:"#ffffff",useBackdropBlur:!0,isLightChrome:!1},n=e,s=r(()=>n.embeddedBottomNav||n.embeddedDockRow),o=r(()=>n.embeddedDockRow),{t:d}=fe(),{checkout:f}=io(),{isEffectivelyOffline:u}=kt(),p=ve(St,void 0),v=r(()=>p?.value??a),g=r(()=>({color:v.value.textColor})),_=r(()=>sa(d.value("menu_donate","Donar")).text.trim()),l=r(()=>_.value.toUpperCase()),y=r(()=>[...l.value]),A=r(()=>f.value.url||`/?form=${f.value.id}`),M=r(()=>n.embeddedBottomNav?[He,"h-11 min-h-11 w-auto min-w-0 shrink-0 flex-row rounded-lg px-3"]:n.embeddedDockRow?[He,"h-[60px] min-h-[60px] w-auto min-w-0 flex-row gap-2 rounded-xl px-3"]:[He,"max-sm:h-11 max-sm:min-h-11 max-sm:w-auto max-sm:min-w-0 max-sm:flex-row max-sm:gap-2 max-sm:rounded-lg max-sm:px-3","sm:w-[60px] sm:min-w-[60px] sm:flex-col sm:gap-3 sm:rounded-xl sm:py-3.5"]);return(K,P)=>{const x=Ct;return i(),Y(x,null,{default:O(()=>[t(u)?L("",!0):(i(),m("div",{key:0,class:D(s.value?"relative shrink-0":"relative flex flex-col items-start gap-2")},[c("a",{href:A.value,class:D(M.value),"aria-label":_.value},[s.value?(i(),m("span",co,[o.value?(i(),m("svg",{key:0,class:D([Ve,We]),viewBox:"0 0 16 16",fill:"currentColor",style:T(g.value)},[...P[0]||(P[0]=[c("path",{d:"M8 14.5c-.2 0-.4-.1-.5-.2C7.1 13.8 1 9.4 1 5.5 1 3.4 2.7 1.5 4.8 1.5c1.2 0 2.3.6 3.2 1.5.9-.9 2-1.5 3.2-1.5 2.1 0 3.8 1.9 3.8 4 0 3.9-6.1 8.3-6.5 8.8-.1.1-.3.2-.5.2Z"},null,-1)])],6)):L("",!0),c("span",{class:D(ze),style:T(g.value)},N(l.value),5)])):(i(),m(Te,{key:1},[c("span",vo,[(i(),m("svg",{class:D([Ve,We]),viewBox:"0 0 16 16",fill:"currentColor",style:T(g.value)},[...P[1]||(P[1]=[c("path",{d:"M8 14.5c-.2 0-.4-.1-.5-.2C7.1 13.8 1 9.4 1 5.5 1 3.4 2.7 1.5 4.8 1.5c1.2 0 2.3.6 3.2 1.5.9-.9 2-1.5 3.2-1.5 2.1 0 3.8 1.9 3.8 4 0 3.9-6.1 8.3-6.5 8.8-.1.1-.3.2-.5.2Z"},null,-1)])],6)),c("span",{class:D(ze),style:T(g.value)},N(l.value),5)]),c("span",po,[(i(!0),m(Te,null,Oe(y.value,(R,W)=>(i(),m("span",{key:`${R}-${W}`,class:D(ze),style:T(g.value)},N(R),5))),128))]),(i(),m("svg",{class:D([Ve,We,"hidden sm:block"]),viewBox:"0 0 16 16",fill:"currentColor",style:T(g.value),"aria-hidden":"true"},[...P[2]||(P[2]=[c("path",{d:"M8 14.5c-.2 0-.4-.1-.5-.2C7.1 13.8 1 9.4 1 5.5 1 3.4 2.7 1.5 4.8 1.5c1.2 0 2.3.6 3.2 1.5.9-.9 2-1.5 3.2-1.5 2.1 0 3.8 1.9 3.8 4 0 3.9-6.1 8.3-6.5 8.8-.1.1-.3.2-.5.2Z"},null,-1)])],6))],64))],10,uo)],2))]),_:1})}}}),ho=pe(fo,[["__scopeId","data-v-02094ceb"]]),mo=40,pt=12,lt=w(!0);function _o(e){const a=ie(),n=ue(),s=tt(at).smaller("sm"),o=lt;let d=0;const f=()=>a.isDesktop.value&&e.value?e.value.scrollTop:window.scrollY,u=()=>{d=f()},p=()=>
2{if(!s.value){o.value=!0,u();return}const _=f(),l=_-d;_<=mo?o.value=!0:l>pt?o.value=!1:l<-pt&&(o.value=!0),d=_};let v;const g=()=>{v?.(),v=void 0;const _=a.isDesktop.value,l=e.value;if(_&&!l)return;const y=_&&l?l:window;s.value||(o.value=!0),u(),y.addEventListener("scroll",p,{passive:!0}),v=()=>{y.removeEventListener("scroll",p)}};return F(s,_=>{_||(o.value=!0,u())}),F(()=>[a.isDesktop.value,e.value],()=>{g()},{immediate:!0}),F(()=>n.fullPath,()=>{o.value=!0,u()}),me(()=>{v?.()}),{revealed:o}}const go={class:"flex items-end gap-2"},bo=Z({__name:"TripletaLeftFabStack",setup(e){const a=ie(),n=tt(at).smaller("sm"),s=r(()=>!a.shouldShowMobileToolbar.value),o=r(()=>({left:n.value?"max(0.5rem, env(safe-area-inset-left))":"max(1.25rem, env(safe-area-inset-left))",bottom:n.value?a.shouldShowMobileToolbar.value?ra:"calc(0.375rem + 2 * env(safe-area-inset-bottom, 0px))":Et})),d=lt,{isEffectivelyOffline:f}=kt();la();const u=ue(),p=r(()=>u.meta.layoutHideDonateDock!==!0),v=r(()=>u.meta.layoutHideLanguageSwitcher!==!0),g=r(()=>!f.value&&s.value&&(v.value||p.value)),_=r(()=>a.isFullscreen.value?"z-[5]":"z-[68]");return(l,y)=>(i(),m("div",{class:D(["fixed flex flex-col items-start gap-2 transition-transform duration-300 ease-out will-change-transform",[t(_),t(d)?"pointer-events-auto translate-y-0":"pointer-events-none translate-y-[calc(100%+3.5rem)]"]]),style:T(t(o))},[L("",!0),c("div",go,[y[0]||(y[0]=c("div",{id:"tripleta-left-fab-editor",class:"contents"},null,-1)),t(g)&&t(v)?(i(),Y(ja,{key:0,variant:"tripletaDock"})):L("",!0),t(g)&&t(p)?(i(),Y(ho,{key:1,"embedded-dock-row":""})):L("",!0)])],6))}});function ke(e){return typeof e=="function"?e():t(e)}function yo(e){const{base:a,suffix:n,isFocused:s,hasValue:o,discovered:d,hiddenDurationMs:f=1e4,visibleDurationMs:u=3e3}=e,p=w(!1);let v=null;const g=r(()=>ke(a)),_=r(()=>{if(d&&ke(d))return null;const M=ke(n);return M||null}),l=r(()=>!!(d&&ke(d)||s&&ke(s)||o&&ke(o)||!_.value||typeof document<"u"&&document.visibilityState==="hidden")),y=()=>{v!=null&&(clearTimeout(v),v=null)},A=()=>{if(y(),l.value)return;const M=p.value?u:f;v=setTimeout(()=>{p.value=!p.value,A()},M)};{F(l,K=>{K?(y(),p.value=!1):A()},{immediate:!0,flush:"post"});const M=()=>{document.visibilityState==="hidden"?y():l.value||A()};document.addEventListener("visibilitychange",M),Je(()=>{document.removeEventListener("visibilitychange",M),y()})}return{base:g,suffix:_,isSuffixVisible:p}}const xo="tripleta:shortcut-discovered:";function Qe(e){const a=Re(`${xo}${e}`,!1);return{discovered:a,markAsDiscovered:()=>{a.value||(a.value=!0)},reset:()=>{a.value=!1}}}const wo=6e3,ko=["tripleta_menu_search_placeholder","tripleta_menu_search_placeholder_do","tripleta_menu_search_placeholder_explore"],Ge=["¿Qué quieres aprender hoy?","¿Qué quieres hacer hoy?","¿Qué quieres explorar hoy?"];function Co(e){return typeof e=="function"?e():t(e)}function So(e={}){const{t:a}=fe(),n=w(0),s=ia(),o=r(()=>ko.map((v,g)=>a.value(v,Ge[g]))),d=r(()=>{const v=o.value;return v.length?v[n.value%v.length]??Ge[0]:Ge[0]}),f=r(()=>e.isPaused&&Co(e.isPaused)||s.value==="hidden"?!1:o.value.length>1),{pause:u,resume:p}=ua(()=>{const v=o.value.length;v<=1||(n.value=(n.value+1)%v)},e.intervalMs??wo,{immediate:!1});return F(f,v=>{v?p():u()},{immediate:!0}),{current:d}}const Eo="tripleta:searchHistory",Ot=3;function Bt(e){return e.trim().replace(/\s+/g," ")}function Ht(e){if(!Array.isArray(e))return[];const a=new Set,n=[];for(const s of e){if(typeof s!="string")continue;const o=Bt(s);if(!o)continue;const d=o.toLowerCase();if(!a.has(d)&&(a.add(d),n.push(o),n.length>=Ot))break}return n}function To(e,a,n=Ot){const s=Bt(a),o=Ht(e);if(!s)return o.slice(0,n);const d=o.filter(f=>f.toLowerCase()!==s.toLowerCase());return[s,...d].slice(0,n)}function Io(){const e=Re(Eo,[]),a=r(()=>Ht(e.value));return{recentSearches:a,recordSuccessfulSearch:s=>{e.value=To(a.value,s)}}}const Lo=["onClick"],Ro={class:"min-w-0 flex-1 truncate"},Ao=Z({__name:"TripletaSearchHistoryList",props:{items:{},variant:{default:"panel"},textColor:{default:"#ffffff"}},emits:["select"],setup(e,{emit:a}){const n=e,s=a,{tAttr:o}=fe();return(d,f)=>e.items.length>0?(i(),m("ul",de({key:0,class:"flex flex-col gap-0.5",role:"listbox"},t(o)("aria-label","tripleta_menu_recent_searches","Búsquedas recientes")),[(i(!0),m(Te,null,Oe(e.items,(u,p)=>(i(),m("li",{key:`${p}-${u}`,role:"option",class:D(["flex cursor-pointer items-center rounded-lg px-3 py-2.5 font-[National2] text-sm transition-colors",e.variant==="panel"?"text-white hover:bg-white/10":"hover:bg-black/10"]),style:T(e.variant==="persistent"?{color:n.textColor}:void 0),onMousedown:f[0]||(f[0]=nt(()=>{},["prevent"])),onClick:v=>s("select",u)},[c("span",Ro,N(u),1)],46,Lo))),128))],16)):L("",!0)}}),rt=Symbol("tripleta-main-chrome-bounds"),ft=48;let Ke=null;function Po(){return Ke||(Ke=w({left:0,width:0})),Ke}function Do(e){const a=Po();let n=0,s=null;const o=()=>{cancelAnimationFrame(n),n=requestAnimationFrame(()=>{const u=e.value;if(!u){a.value={left:0,width:window.innerWidth};return}const p=u.getBoundingClientRect();a.value={left:p.left,width:p.width}})},d=()=>{s?.disconnect(),s=null},f=u=>{d(),s=new ResizeObserver(o),s.observe(u);const p=u.closest(".tripleta-grid-container");p instanceof HTMLElement&&s.observe(p),o()};return F(e,u=>{u?f(u):d()},{immediate:!0}),Ee(window,"resize",o),Ee(window,"tripleta:resize",o),me(()=>
2{d(),cancelAnimationFrame(n)}),a}const Mo={key:0,class:"absolute bottom-full left-0 right-0 mb-2"},$o=["id","aria-selected","onClick","onMouseenter"],No={class:"min-w-0 flex-1 truncate",style:{color:"currentColor"}},Oo={class:"relative flex h-11 min-h-11 w-full items-center gap-2 overflow-hidden rounded-lg pl-4 pr-1.5"},Bo={class:"relative z-[1] min-w-0 flex-1"},Ho=["aria-expanded","aria-activedescendant","aria-placeholder"],Fo={class:"min-w-0 truncate font-[National2Narrow] text-[18px] italic leading-[1.35] tracking-[-0.18px]"},Uo={key:0,class:"ml-1 shrink-0 font-[National2Narrow] text-[18px] italic leading-[1.35] tracking-[-0.18px] opacity-80"},zo={class:"font-[National2] text-sm font-medium leading-[1.15] tracking-[0.14px]"},Vo=Z({__name:"TripletaPersistentSearchBar",props:{dock:{type:Boolean,default:!1}},setup(e){const{t:a,tAttr:n}=fe(),{locale:s}=ca(),o=ie(),d=yt(),f=ue(),u=bt(),{openContactModal:p}=da(),{openEventDetailPanel:v}=va(),g=tt(at).smaller("sm"),_={barBg:"#16423E",actionBg:"#21625C",textColor:"#ffffff",useBackdropBlur:!0,isLightChrome:!1},l=ve(St,void 0),y=r(()=>l?.value??_),A=r(()=>{const{barBg:I,useBackdropBlur:Q}=y.value;return Q?_a(I,.8):I}),M=r(()=>y.value.isLightChrome?"border-black/30":"border-white opacity-50"),K=e,P=ve(It,void 0),x=ve(rt,void 0),R=lt,W=w(null),b=w(""),z=r(()=>f.meta.layoutHidePersistentSearch===!0||o.shouldShowMobileToolbar.value||o.isOpen.value&&o.mode.value==="menu"||o.isFullscreen.value||(x?.value.width??ft)<ft);F(()=>P?.value??0,I=>{!P||I===0||z.value||R.value&&(b.value="",Ce(()=>{W.value?.focus()}))},{flush:"post",immediate:!0});const te=r(()=>({bottom:g.value?ga:Et})),V=r(()=>{if(K.dock)return;const I=x?.value;return I?{...te.value,left:`${I.left}px`,width:`${I.width}px`}:te.value}),k=pa({debounceMs:500,maxCombinedResults:3}),S=r(()=>k.combinedResults.value),U=r(()=>k.isLoading.value),E=w(-1),B=w(!1),H=w(!1);let q=null;const Ie=w(!1);Se(()=>{Ie.value=Be()});const{current:Ae}=So({isPaused:()=>B.value||b.value.length>0}),Pe=r(()=>a.value("tripleta_shortcut_hint_suffix",{defaultValue:"({shortcut})",shortcut:st("K",Ie.value)})),{discovered:_e}=Qe("cmd-k"),he=yo({base:Ae,suffix:Pe,isFocused:()=>B.value,hasValue:()=>b.value.length>0,discovered:_e}),{recentSearches:ne,recordSuccessfulSearch:ge}=Io(),be=r(()=>!z.value&&B.value&&b.value.trim().length===0&&ne.value.length>0&&R.value),oe=r(()=>be.value||!z.value&&B.value&&b.value.trim().length>0&&R.value),h=r(()=>!U.value&&!H.value&&b.value.trim().length>0&&S.value.length===0),G=r(()=>({contacto:a.value("tripleta_menu_result_contact","Contacto"),centro:a.value("tripleta_menu_result_center","Centro"),evento:a.value("tripleta_menu_result_event","Evento"),post:a.value("tripleta_menu_result_post","Historia"),desarrollo:a.value("tripleta_menu_result_desarrollo","Desarrollo"),arbol:a.value("tripleta_menu_result_tree","Ãrbol"),vereda:a.value("tripleta_menu_result_trail","Vereda"),vivero:a.value("tripleta_menu_result_nursery","Vivero"),pagina:a.value("tripleta_menu_result_page","Página"),archivo:a.value("tripleta_menu_result_archivo","Archivo")})),Le=I=>I.objectID||I.slug||I.permalink||I.url||I.loc||"";F(b,I=>{const Q=I.trim();E.value=-1,Q?(H.value=!0,k.debouncedSearch(I)):(H.value=!1,k.clear())}),F(U,I=>{I||(H.value=!1)}),F(()=>S.value,()=>{E.value=-1}),F(z,I=>{I&&(B.value=!1)});const ye=()=>{b.value="",E.value=-1,H.value=!1,k.clear()};F(Tt,()=>{ye()});const De=()=>{o.openMenuWithSearch(b.value)},Me=I=>{if(!ba(I,{localeRoute:u,router:d,openContactModal:p,locale:s.value,openEventDetailPanel:v})){console.warn("[TripletaPersistentSearchBar] No se pudo navegar al resultado:",I);return}ge(b.value),ye(),B.value=!1,W.value?.blur()},$=I=>{b.value=I,B.value=!0},se=I=>{Me(I)},Wt=()=>{q!=null&&(clearTimeout(q),q=null),B.value=!0},Gt=()=>{q!=null&&clearTimeout(q),q=setTimeout(()=>{B.value=!1,q=null},150)},Kt=I=>{if(I.key==="Enter"){if(I.preventDefault(),oe.value&&E.value>=0&&S.value[E.value]){Me(S.value[E.value]);return}De();return}if(!oe.value||S.value.length===0)return;const Q=I.key==="ArrowDown"||I.key==="ArrowRight",le=I.key==="ArrowUp"||I.key==="ArrowLeft";Q?(I.preventDefault(),E.value<0?E.value=0:E.value=(E.value+1)%S.value.length):le?(I.preventDefault(),E.value<0?E.value=S.value.length-1:E.value=(E.value-1+S.value.length)%S.value.length):I.key==="Escape"&&oe.value&&(I.preventDefault(),B.value=!1,W.value?.blur())};return Je(()=>{q!=null&&(clearTimeout(q),q=null)}),(I,Q)=>(i(),Y(j,{name:"tripleta-bottom-search"},{default:O(()=>[J(c("div",{class:D([K.dock?["w-full",t(R)?"pointer-events-auto":"pointer-events-none"]:"pointer-events-none fixed z-[48] flex justify-center px-4","transition-transform duration-300 ease-out will-change-transform",t(R)?"translate-y-0":"translate-y-[calc(100%+3.5rem)]"]),style:T(V.value),role:"search"},[c("div",{class:D(["relative w-full max-w-md tablet:max-w-3xl laptop:max-w-5xl desktop:max-w-6xl",t(R)?"pointer-events-auto":"pointer-events-none"])},[C(j,{name:"tripleta-quick-dropdown"},{default:O(()=>[oe.value?(i(),m("div",Mo,[c("div",{class:"w-full overflow-hidden rounded-xl border border-white/10 p-1.5 text-white shadow-xl backdrop-blur-[12px]",style:T({backgroundColor:A.value})},[be.value?(i(),Y(Ao,{key:0,variant:"persistent",items:t(ne),"text-color":y.value.textColor,onSelect:$},null,8,["items","text-color"])):S.value.length>0?(i(),m("ul",de({key:1,id:"tripleta-persistent-search-results",role:"listbox",class:"flex flex-col gap-0.5"},t(n)("aria-label","tripleta_persistent_search_results_label","Resultados de búsqueda")),[(i(!0),m(Te,null,Oe(S.value,(le,xe)=>
2(i(),m("li",{id:`tripleta-persistent-search-option-${Le(le)||xe}`,key:Le(le)||xe,role:"option","aria-selected":E.value===xe,class:D(["flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 font-[National2] text-sm transition-colors",E.value===xe?"":"hover:bg-black/10"]),style:T({color:y.value.textColor,backgroundColor:E.value===xe?y.value.actionBg:void 0}),onMousedown:Q[0]||(Q[0]=nt(()=>{},["prevent"])),onClick:Yt=>se(le),onMouseenter:Yt=>E.value=xe},[c("span",No,N(t(fa)(le)),1),c("span",{class:"shrink-0 rounded-full bg-white/15 px-2.5 py-0.5 font-[National2] text-[11px] font-medium",style:T({color:y.value.textColor})},N(t(ha)(le,G.value)),5)],46,$o))),128))],16)):U.value||H.value?(i(),m("div",{key:2,class:"flex items-center gap-2 px-3 py-2.5 font-[National2] text-sm opacity-80",style:T({color:y.value.textColor})},[Q[2]||(Q[2]=c("span",{class:"loading loading-dots loading-xs"},null,-1)),c("span",null,N(t(a)("tripleta_persistent_search_loading","Buscando...")),1)],4)):h.value?(i(),m("div",{key:3,class:"px-3 py-2.5 font-[National2] text-sm opacity-80",style:T({color:y.value.textColor})},N(t(a)("tripleta_persistent_search_no_results","Sin resultados")),5)):L("",!0)],4)])):L("",!0)]),_:1}),c("div",{class:"w-full rounded-xl p-2 shadow-[0_4px_8px_rgba(0,0,0,0.1),0_8px_8px_rgba(0,0,0,0.1)] backdrop-blur-[12px]",style:T({backgroundColor:A.value})},[c("div",Oo,[c("div",{class:D(["pointer-events-none absolute inset-0 rounded-lg border-2",M.value]),"aria-hidden":"true"},null,2),c("div",Bo,[J(c("input",{ref_key:"persistentSearchInputRef",ref:W,"onUpdate:modelValue":Q[1]||(Q[1]=le=>b.value=le),type:"text",enterkeyhint:"search",role:"combobox","aria-expanded":oe.value,"aria-autocomplete":"list","aria-controls":"tripleta-persistent-search-results","aria-activedescendant":E.value>=0&&S.value[E.value]?`tripleta-persistent-search-option-${Le(S.value[E.value])||E.value}`:void 0,"aria-placeholder":t(he).base.value,placeholder:"",class:D(["w-full bg-transparent font-[National2Narrow] text-[18px] leading-[1.35] tracking-[-0.18px] outline-none",{italic:!b.value.trim()}]),style:T({color:y.value.textColor}),onFocus:Wt,onBlur:Gt,onKeydown:Kt},null,46,Ho),[[ma,b.value]]),J(c("div",{"aria-hidden":"true",class:"pointer-events-none absolute inset-y-0 left-0 right-0 z-[2] flex items-center overflow-hidden whitespace-nowrap",style:T({color:y.value.textColor})},[c("span",Fo,N(t(he).base.value),1),C(j,{name:"tripleta-hint-suffix"},{default:O(()=>[t(he).isSuffixVisible.value?(i(),m("span",Uo,N(t(he).suffix.value),1)):L("",!0)]),_:1})],4),[[ae,!b.value]])]),b.value.trim()?(i(),m("button",de({key:0,type:"button",class:["relative z-[1] flex size-8 shrink-0 items-center justify-center rounded-full transition",y.value.isLightChrome?"bg-black/10 text-black/60 hover:bg-black/15 hover:text-black":"bg-white/15 text-white/70 hover:bg-white/25 hover:text-white"]},t(n)("aria-label","tripleta_menu_clear_search","Limpiar búsqueda"),{onClick:ye}),[C(Xe,{class:"size-3","aria-hidden":"true"})],16)):L("",!0),c("button",de({type:"button",class:"relative z-[1] flex min-h-8 shrink-0 items-center gap-2 rounded px-3 py-2 transition hover:opacity-90",style:{backgroundColor:y.value.actionBg,color:y.value.textColor}},t(n)("aria-label","tripleta_persistent_search_submit","Buscar"),{onClick:De}),[C(qa,{class:"size-[11px] shrink-0","aria-hidden":"true"}),c("span",zo,N(t(a)("tripleta_persistent_search_button","Buscar")),1)],16)])],4)],2)],6),[[ae,!z.value]])]),_:1}))}}),Wo=pe(Vo,[["__scopeId","data-v-cd806cd9"]]),Go="pln-notification-inbox-dismissed-map",Ko="pln-notification-page-dismissed-map",Yo="pln-notification-banner-dismissed-session",jo="pln-notification-dismissed-map";try{sessionStorage.removeItem(Yo)}catch{}const qo=Symbol("site-notification-context");function Qo(e){return e.dismissScope?e.dismissScope:e.inboxOnly?"inbox":e.context||e.variant?"page":"inbox"}function Xo(e,a){const n={};return a.inboxOnly||(e.reservaId!=null&&(n.reserva_id=String(e.reservaId)),e.veredaId!=null&&(n.vereda_id=String(e.veredaId)),e.viveroId!=null&&(n.vivero_id=String(e.viveroId)),e.parentReservaId!=null&&(n.parent_reserva_id=String(e.parentReservaId))),a.variant&&(n.variant=a.variant),a.inboxOnly&&(n.inbox="1"),n}function ht(e){if(typeof window>
2"u"||Object.keys(e).length>0)return e;try{const a=window.localStorage.getItem(jo);if(!a)return e;const n=JSON.parse(a),s={};for(const[o,d]of Object.entries(n)){if(!d)continue;const f=o.replace(/^pln-notification-dismissed:/,"");f&&(s[f]=!0)}return Object.keys(s).length?s:e}catch{return e}}function Zo(e={}){const a=ue(),n=ve(qo,w(null)),s=Qo(e),o=s==="page"?Re(Ko,{},{mergeDefaults:!0}):Re(Go,ht({}),{mergeDefaults:!0});s==="inbox"&&(o.value=ht(o.value));const d=r(()=>{if(e.inboxOnly)return{};const b=je(e.context)||{},z=je(n)||{};return{route:b.route??z.route??a.path,reservaId:b.reservaId??z.reservaId,veredaId:b.veredaId??z.veredaId,viveroId:b.viveroId??z.viveroId,parentReservaId:b.parentReservaId??z.parentReservaId}}),f=r(()=>JSON.stringify({context:d.value,variant:e.variant??null,inboxOnly:e.inboxOnly??!1,dismissScope:s})),{data:u,pending:p,refresh:v,error:g}=Lt(()=>`site-notifications-${f.value}`,async()=>(await $fetch("/api/widgets/notifications/active",{query:Xo(d.value,e)})).items||[],{watch:[f]}),_=r(()=>u.value||[]),l=b=>o.value[b]===!0,y=r(()=>e.inboxOnly?_.value.filter(b=>b.show_in_inbox?b.dismissible?!l(b.id):!0:!1):_.value.filter(b=>!l(b.id))),A=r(()=>(e.inboxOnly,y.value)),M=r(()=>_.value.filter(b=>b.show_in_inbox&&b.dismissible&&l(b.id))),K=r(()=>_.value.filter(b=>b.show_in_inbox)),P=r(()=>e.inboxOnly),x=r(()=>A.value.length);return{notifications:_,visibleNotifications:y,inboxNotifications:A,dismissedInboxNotifications:M,inboxEligibleNotifications:K,showNotificationsNav:P,inboxCount:x,pending:p,error:g,refresh:v,isDismissed:l,dismiss:b=>{o.value={...o.value,[b]:!0}},clearDismiss:b=>{const z={...o.value};delete z[b],o.value=z},context:d}}function ee(e,a){const n=a.toLowerCase().startsWith("en");return{title:n&&e.title_en||e.title_es,body:n&&e.body_en||e.body_es,ctaLabel:n&&e.cta_label_en||e.cta_label_es,ctaUrl:n&&e.cta_url_en||e.cta_url_es}}function Ft(e,a,n){const s=new Intl.DateTimeFormat(n.toLowerCase().startsWith("en")?"en-US":"es-PR",{dateStyle:"medium"}),o=s.format(new Date(e));if(!a)return o;const d=s.format(new Date(a));return`${o} â ${d}`}function mt(e){return e.trim().replace(/\/$/,"")||"/"}function Ut(e,a,n){return!e||/^https?:\/\//i.test(e)?!1:mt(n(e))===mt(a)}function _t(e,a){return e.filter(n=>n.display_variant===a)}function Jo(e){switch(e){case"critical":return"border-l-red-400";case"warning":return"border-l-amber-400";default:return"border-l-[#aacbc9]"}}const es={class:"flex items-start gap-3"},ts={class:"min-w-0 flex-1"},as={class:"mt-1 font-[National2Condensed] text-lg font-medium leading-tight text-white"},ns={class:"mt-1 font-[National2] text-sm leading-relaxed text-white/85"},os={key:0,class:"mt-3"},ss=["href"],ls=["aria-label"],rs=Z({__name:"SiteNotificationContent",props:{notification:{},showCta:{type:Boolean},showDismiss:{type:Boolean}},emits:["dismiss"],setup(e,{emit:a}){const n=a,s=ue(),{locale:o}=ot(),{t:d}=fe("notifications"),f=Rt();function u(_){switch(_){case"critical":return d("severity.critical","CrÃtico");case"warning":return d("severity.warning","Advertencia");default:return d("severity.info","Info")}}function p(_){return _?_.startsWith("http://")||_.startsWith("https://")?_:f(_):null}function v(_){const l=ee(_,o.value);return!l.ctaUrl||!l.ctaLabel?!1:!Ut(l.ctaUrl,s.path,f)}function g(_){return!!_&&(_.startsWith("http://")||_.startsWith("https://"))}return(_,l)=>{const y=et;return i(),m("div",es,[c("div",ts,[c("div",{class:"flex flex-wrap items-center gap-x-2 gap-y-1 font-[National2Narrow] text-[11px] font-medium uppercase tracking-wide",style:T({color:t(ya)})},[c("span",null,N(u(e.notification.severity)),1),l[1]||(l[1]=c("span",{"aria-hidden":"true"},"·",-1)),c("span",null,N(t(Ft)(e.notification.starts_at,e.notification.ends_at,t(o))),1)],4),c("h2",as,N(t(ee)(e.notification,t(o)).title),1),c("p",ns,N(t(ee)(e.notification,t(o)).body),1),e.showCta&&v(e.notification)?(i(),m("div",os,[g(t(ee)(e.notification,t(o)).ctaUrl)?(i(),m("a",{key:0,href:p(t(ee)(e.notification,t(o)).ctaUrl),target:"_blank",rel:"noopener noreferrer",class:"inline-flex min-h-8 items-center rounded-lg px-3 py-2 font-[National2] text-sm font-medium text-white transition hover:opacity-90",style:T({backgroundColor:t(Ne)})},N(t(ee)(e.notification,t(o)).ctaLabel),13,ss)):(i(),Y(y,{key:1,to:p(t(ee)(e.notification,t(o)).ctaUrl),class:"inline-flex min-h-8 items-center rounded-lg px-3 py-2 font-[National2] text-sm font-medium text-white transition hover:opacity-90",style:T({backgroundColor:t(Ne)})},{default:O(()=>[At(N(t(ee)(e.notification,t(o)).ctaLabel),1)]),_:1},8,["to","style"]))])):L("",!0)]),e.showDismiss?(i(),m("button",{key:0,t
2ype:"button",class:"inline-flex size-8 shrink-0 items-center justify-center rounded-lg text-white/80 transition hover:bg-white/10 hover:text-white","aria-label":t(d)("panel.close","Cerrar aviso"),onClick:l[0]||(l[0]=A=>n("dismiss"))}," â ",8,ls)):L("",!0)])}}}),is={class:"flex w-full max-w-md flex-col gap-2 tablet:max-w-3xl laptop:max-w-5xl desktop:max-w-6xl"},us=["aria-label"],cs=Z({__name:"SiteNotificationFloatingBanners",props:{notifications:{}},emits:["dismiss"],setup(e,{emit:a}){const n=a,{locale:s}=ot(),o=xa("(max-width: 639px)"),d=ve(rt,void 0),f=r(()=>{const u=d?.value,p=ka(o.value);return u?.width?{...p,left:`${u.left}px`,width:`${u.width}px`}:p});return(u,p)=>e.notifications.length?(i(),m("div",{key:0,class:"pointer-events-none fixed z-[43] flex justify-center px-4 md:px-6",style:T(t(f)),"aria-live":"polite"},[c("div",is,[(i(!0),m(Te,null,Oe(e.notifications,v=>(i(),m("article",{key:v.id,class:D(["pointer-events-auto border border-l-4 border-white/15 p-4 shadow-[0_8px_24px_rgba(0,0,0,0.35)]",[t(wa),t(Jo)(v.severity)]]),style:T({backgroundColor:t(Pt)}),"aria-label":t(ee)(v,t(s)).title},[C(rs,{notification:v,"show-cta":"","show-dismiss":"",onDismiss:g=>n("dismiss",v.id)},null,8,["notification","onDismiss"])],14,us))),128))])],4)):L("",!0)}}),ds=["aria-label"],vs=["aria-label"],ps={class:"flex items-start justify-between gap-4 px-5 pb-4 pt-5"},fs={class:"min-w-0 font-[National2Condensed] text-[2rem] font-medium leading-[1.05] text-white tablet:text-5xl tablet:leading-none"},hs=["aria-label"],ms={class:"mx-1 mb-1 flex max-h-[min(60vh,calc(100%-8rem))] flex-col overflow-y-auto rounded-[20px] bg-white px-6 py-8"},_s={class:"font-[National2Narrow] text-xs font-medium uppercase tracking-wide text-[#1B504B]/75"},gs={class:"mt-4 whitespace-pre-line font-[National2] text-lg font-normal leading-[1.5] tracking-[-0.18px] text-black",style:{"font-feature-settings":'"lnum", "tnum"'}},bs={key:0,class:"mt-6"},ys=["href"],xs=Z({__name:"SiteNotificationModals",props:{notifications:{}},emits:["dismiss"],setup(e,{emit:a}){const n=e,s=a,o=ue(),{locale:d}=ot(),{t:f}=fe("notifications"),u=Rt(),p=w(null);F(()=>n.notifications,x=>{if(!x.length){p.value=null;return}p.value&&x.some(R=>R.id===p.value)||(p.value=x[0]?.id??null)},{immediate:!0});const v=r(()=>n.notifications.find(x=>x.id===p.value)??null),g=r(()=>v.value?ee(v.value,d.value):null),_=r(()=>!!v.value),l=Qa(_),y=r(()=>({top:`${l.value.top}px`,left:`${l.value.left}px`,width:`${l.value.width}px`,height:`${l.value.height}px`}));F(_,x=>{ut(x)}),me(()=>{_.value&&ut(!1)}),Ee(window,"keydown",x=>{x.key==="Escape"&&_.value&&(x.preventDefault(),P())});function A(x){return x?x.startsWith("http://")||x.startsWith("https://")?x:u(x):null}function M(x){const R=ee(x,d.value);return!R.ctaUrl||!R.ctaLabel?!1:!Ut(R.ctaUrl,o.path,u)}function K(x){return!!x&&(x.startsWith("http://")||x.startsWith("https://"))}function P(){const x=v.value;x&&(s("dismiss",x.id),p.value=null)}return(x,R)=>{const W=et,b=Ct;return i(),Y(b,null,{default:O(()=>[(i(),Y(xt,{to:"body"},[t(v)&&t(g)?(i(),m("div",{key:t(v).id,class:"fixed z-[9999] flex items-center justify-center overflow-y-auto p-4",style:T(t(y)),role:"dialog","aria-modal":"true","aria-label":t(g).title},[c("button",{type:"button",class:"absolute inset-0 bg-black/60 backdrop-blur","aria-label":t(f)("panel.close","Cerrar aviso"),onClick:P},null,8,vs),c("div",{class:"relative z-10 w-full max-w-[600px]",onClick:R[0]||(R[0]=nt(()=>{},["stop"]))},[c("div",{class:"flex flex-col gap-0 overflow-hidden rounded-[24px] p-1 shadow-[0px_8px_48px_0px_rgba(0,0,0,0.5)]",style:T({backgroundColor:t(Pt)})},[c("div",ps,[c("h2",fs,N(t(g).title),1),c("button",{type:"button",class:"flex h-11 w-11 shrink-0 cursor-pointer items-center justify-center rounded-lg bg-[#1B504B] shadow-md transition-opacity hover:opacity-80","aria-label":t(f)("panel.close","Cerrar aviso"),onClick:P},[C(Xe,{class:"h-4 w-4 text-white","aria-hidden":"true"})],8,hs)]),c("div",ms,[c("p",_s,N(t(Ft)(t(v).starts_at,t(v).ends_at,t(d))),1),c("p",gs,N(t(g).body),1),M(t(v))?(i(),m("div",bs,[K(t(g).ctaUrl)?(i(),m("a",{key:0,href:A(t(g).ctaUrl),target:"_blank",rel:"noopener noreferrer",class:"inline-flex min-h-11 items-center rounded-lg px-4 py-2.5 font-[National2] text-sm font-medium text-white transition hover:opacity-90",style:T({backgroundColor:t(Ne)})},N(t(g).ctaLabel),13,ys)):(i(),Y(W,{key:1,to:A(t(g).ctaUrl),class:"inline-flex min-h-11 items-center rounded-lg px-4 py-2.5 font-[National2] text-sm font-medium text-white transition hover:opacity-90",style:T({backgroundColor:t(Ne)}),onClick:P},{default:O(()=>[At(N(t(g).ctaLabel),1)]),_:1},8,["to","style"]))])):L("",!0)])],4)])],12,ds)):L("",!0)]))]),_:1})}}});function ws(e){const a=ue(),n=r(()=>{const s=je(e);return{route:a.path,reservaId:s?.reservaId,veredaId:s?.veredaId,viveroId:s?.viveroId,parentReservaId:s?.parentReservaId}});return Zo({context:n,dismissScope:"page"})}function ks(e){const a=e.replace(/^\/en(?=\/)/,""),n=a.match(/^\/(?:centros|centers)\/([^/?#]+)/);
2if(n?.[1])return{kind:"reserva",slug:decodeURIComponent(n[1])};const s=a.match(/^\/reforestacion\/viveros\/([^/?#]+)/);if(s?.[1])return{kind:"vivero",slug:decodeURIComponent(s[1])};const o=a.match(/^\/(?:veredas|trails)\/([^/?#]+)/);if(o?.[1]){const d=decodeURIComponent(o[1]);if(Ca(d))return{kind:"vereda",slug:d}}return null}function Cs(){const e=ue(),a=Sa(),{preferOfflineCatalog:n}=Ea(),{data:s}=Lt(()=>`page-notification-context-${e.path}`,async()=>{const o=ks(e.path);if(!o)return{route:e.path};if(o.kind==="reserva"){if(n.value){const f=await Ta({slug:o.slug});return{route:e.path,reservaId:f?.id}}const{data:d}=await a.from("reservas").select("id").eq("slug",o.slug).eq("is_archived",!1).maybeSingle();return{route:e.path,reservaId:d?.id}}if(o.kind==="vivero"){if(n.value){const f=await Ia({slug:o.slug});return{route:e.path,viveroId:f?.id}}const{data:d}=await a.from("viveros").select("id").eq("slug",o.slug).eq("is_archived",!1).maybeSingle();return{route:e.path,viveroId:d?.id}}if(o.kind==="vereda"){const{data:d}=await a.from("veredas").select("id, reserva_id").eq("slug",o.slug).maybeSingle();return{route:e.path,veredaId:d?.id,parentReservaId:d?.reserva_id??void 0}}return{route:e.path}},{watch:[()=>e.path,n]});return r(()=>s.value??{route:e.path})}const zt=Symbol("location-notifications");function Vt(){const e=Cs(),a=r(()=>{const p=e.value;return p.reservaId==null&&p.veredaId==null&&p.viveroId==null?null:{reservaId:p.reservaId,veredaId:p.veredaId,viveroId:p.viveroId,parentReservaId:p.parentReservaId}}),{visibleNotifications:n,dismiss:s,pending:o}=ws(a),d=r(()=>_t(n.value,"banner")),f=r(()=>_t(n.value,"modal")),u=r(()=>a.value!=null);return{bannerNotifications:d,modalNotifications:f,dismiss:s,pending:o,hasLocationContext:u}}function Ss(){const e=ve(zt,void 0);return e||Vt()}const Es=Z({__name:"TripletaLocationNotifications",setup(e){const{bannerNotifications:a,modalNotifications:n,dismiss:s,hasLocationContext:o}=Ss();return(d,f)=>t(o)?(i(),m(Te,{key:0},[C(cs,{notifications:t(a),onDismiss:t(s)},null,8,["notifications","onDismiss"]),C(xs,{notifications:t(n),onDismiss:t(s)},null,8,["notifications","onDismiss"])],64)):L("",!0)}}),Ts={key:0},Is={class:"relative z-[1] min-h-full w-full"},Ls={class:"pointer-events-auto"},Rs={class:"relative mx-auto w-full max-w-[1280px] pr-4 sm:pr-6 lg:pr-0"},As={href:"/",class:"absolute right-4 top-0 inline-block tablet:right-6 laptop:right-10 desktop:right-14"},Ps=["src"],Ds={class:"relative z-10 min-w-0 overflow-hidden"},Ms={key:1},$s={class:"relative z-[1] min-h-full"},Ns={class:"pointer-events-auto"},Os={class:"relative mx-auto w-full max-w-[1280px] pr-4 sm:pr-6 lg:pr-0"},Bs={href:"/",class:"absolute right-4 top-0 inline-block tablet:right-6 laptop:right-10 desktop:right-14"},Hs=["src"],Fs=Z({__name:"TripletaShell",props:{mainBgColor:{},mainPageBackground:{},stickyTop:{},pinMobileHeader:{type:Boolean}},setup(e){const a=w(null),n=w(null),s=$a(),o=Ba();function d(){try{const h=sessionStorage.getItem(Fe);return!h||h==="null"||h==="undefined"?null:JSON.parse(h)}catch{return null}}function f(h){try{h?sessionStorage.setItem(Fe,JSON.stringify(h)):sessionStorage.removeItem(Fe)}catch{}}F(s,h=>{f(h)},{deep:!0});const u=La(),p=Ra(),v=Re("tripleta:isFullscreen",!1);X(Ha,a),X(Fa,n),X(Ua,s),X(za,o),X(Va,u),X(Wa,p),X(Ga,v);const g=w(0);X(Ka,g);const _=w(0);X(It,_);const l=ie(),y=Ze(),A=r(()=>l.mode.value==="content"&&!!y.content.value?.lightSurface),M=r(()=>l.mode.value!=="content"?"":y.content.value?.contentShellBgClass?.trim()||""),K=r(()=>!!M.value);function P(h){if(h.taxonId||h.observationId||h.projectSlug)return{...h,taxonId:h.taxonId?Number(h.taxonId):void 0,observationId:h.observationId?Number(h.observationId):void 0};if(!h.externalUrl)return h;const G=Na(h.externalUrl);return G?{...G,externalUrl:h.externalUrl||G.externalUrl,returnTo:h.returnTo}:h}Se(()=>{const h=d();if(h){const G=P(h);s.value=G,p.value="inat"}Aa()});{const{markAsDiscovered:h}=Qe("cmd-k"),{markAsDiscovered:G}=Qe("cmd-b"),Le=$=>!$||!($ instanceof HTMLElement)?!1:$.isContentEditable,ye=()=>typeof document>"u"?!1:!!document.querySelector("dialog[open]"),De=async()=>
2{if(l.isOpen.value){l.mode.value!=="menu"&&await l.setMode("menu"),await Ce(),g.value++;return}if(!l.shouldShowMobileToolbar.value&&!(l.isOpen.value&&l.mode.value==="menu")){await Ce(),_.value++;return}await l.setMode("menu"),await Ce(),g.value++};Ee(window,"keydown",$=>{if($.repeat||!($.metaKey||$.ctrlKey))return;const se=$.key?.toLowerCase();if(!(se!=="k"&&se!=="b")&&!ye()){if(se==="k"){$.preventDefault(),h(),De();return}Le($.target)||($.preventDefault(),G(),l.toggle())}});const Me=$=>{if(!$||!($ instanceof HTMLElement))return!1;const se=$.tagName;return!!(se==="INPUT"||se==="TEXTAREA"||se==="SELECT"||$.isContentEditable)};Ee(window,"keydown",$=>{if($.key==="Escape"&&!$.defaultPrevented&&!ye()&&!Me($.target)){if(l.isFullscreen.value){$.preventDefault(),l.exitFullscreen();return}l.isOpen.value&&l.isDesktop.value&&($.preventDefault(),l.close())}})}const x=w(!1);let R=null;const W=r(()=>l.isOpen.value||l.isFullscreen.value||x.value);F(()=>l.isOpen.value,(h,G)=>{R&&(clearTimeout(R),R=null),!h&&G&&l.isDesktop.value?(x.value=!0,R=setTimeout(()=>{x.value=!1},750)):x.value=!1}),me(()=>{R&&clearTimeout(R)});const b=r(()=>{if(!l.isFullscreen.value){if(x.value)return"var(--tripleta-panel-width)";if(l.isOpen.value)return"var(--tripleta-panel-width)"}}),z=r(()=>l.cssVars.value),te=r(()=>{if(l.isFullscreen.value)return{"--tripleta-main-col":"0fr","--tripleta-panel-col":"1fr"};if(!l.isOpen.value)return{"--tripleta-main-col":"1fr","--tripleta-panel-col":"0fr"};const h=l.panelRatio.value;return{"--tripleta-main-col":`${(1-h).toFixed(4)}fr`,"--tripleta-panel-col":`${h.toFixed(4)}fr`}}),V=w(null),k=w(null),S=w(null),U=w(120);Pa(S,h=>{const G=h[0];G&&(U.value=Math.round(G.contentRect.height))}),X("container:main",V),X("container:aside",k);const E=Do(V);X(rt,E);const B=Vt();X(zt,B),_o(V),Da();const H=e,q=r(()=>H.mainBgColor||"#000"),Ie=r(()=>H.mainPageBackground?.fallbackColor||q.value),Ae=r(()=>{const h=H.mainPageBackground;return h?.gradient?{backgroundColor:h.fallbackColor||Ie.value}:{backgroundColor:q.value}}),Pe=r(()=>{const h=H.mainPageBackground?.gradient;if(h)return{background:h}}),_e=r(()=>{const h=H.mainPageBackground?.texture;if(h)return{backgroundImage:`url(${h})`}}),he=r(()=>({backgroundColor:Ie.value})),ne={setMode:(h,G)=>l.setMode(h,G),openMenu:()=>{Tt.value+=1,l.setMode("menu")},openMap:()=>{l.openMapFullscreen()},openChat:h=>l.setMode("chat",h??null),openINaturalist:h=>l.openINaturalist(h),openMenuWithSearch:h=>l.openMenuWithSearch(h),togglePanel:()=>l.toggle(),openPanel:()=>l.open(),closePanel:()=>l.close(),setFullscreen:h=>h?l.enterFullscreen():l.exitFullscreen(),toggleFullscreen:()=>l.toggleFullscreen()},ge=Oa(null),be=w(!1);let oe=0;return Se(()=>{be.value=!0;const h=++oe;re(()=>import("./FWLyyBVu.js"),__vite__mapDeps([45,1,2,3,4,5,34,35,30,31,11,12,13,6,14]),import.meta.url).then(G=>{h===oe&&(ge.value=G.default)})}),me(()=>{oe+=1,be.value=!1,ge.value=null}),(h,G)=>(i(),m("div",{class:"min-h-screen w-screen",style:T({...z.value,...he.value})},[t(l).isDesktop.value?(i(),m("div",Ts,[c("div",{class:"tripleta-grid-container grid h-screen grid-cols-[var(--tripleta-main-col)_var(--tripleta-panel-col)]",style:T({...te.value,...he.value})},[c("main",{ref_key:"mainEl",ref:V,id:"tripleta-main",class:"relative overflow-y-auto",style:T(Ae.value)},[c("div",{class:"relative min-h-full w-full min-w-0 @container",style:T(Pe.value)},[_e.value?(i(),m("div",{key:0,class:"pointer-events-none absolute inset-x-0 bottom-0 top-0 z-0 min-h-full w-full bg-repeat opacity-15 mix-blend-overlay",style:T(_e.value),"aria-hidden":"true"},null,4)):L("",!0),c("div",Is,[c("div",{"data-dosel-sticky-chrome":"",class:"pointer-events-none sticky z-40",style:T({top:H.stickyTop?typeof H.stickyTop=="number"?`${H.stickyTop}px`:H.stickyTop:"0px"})},[c("div",Ls,[we(h.$slots,"header",{tripleta:t(l),actions:ne},()=>[c("div",Rs,[c("a",As,[c("img",{src:t(qe),alt:"",class:"aspect-square h-20 laptop:h-24"},null,8,Ps)])])],!0)])],4),we(h.$slots,"default",{tripleta:t(l),actions:ne},void 0,!0),we(h.$slots,"footer",{tripleta:t(l),actions:ne},void 0,!0)])],4)],4),c("div",Ds,[W.value?(i(),m("aside",{key:0,ref_key:"asideEl",ref:k,id:"tripleta-aside",class:D(["tripleta-bg-transition relative h-full overflow-y-auto overflow-x-hidden @container",{"bg-black":t(l).mode.value==="map","bg-white":(t(l).mode.value==="editor"||A.value)&&!K.value,[t(wt)]:t(l).mode.value!=="map"&&t(l).mode.value!=="editor"&&!A.value&&!K.value,[M.value]:K.value,"border-l border-white/10":!t(l).isFullscreen.value&&t(l).mode.value!=="editor"&&!A.value,"border-l border-gray-200":!t(l).isFullscreen.value&&(t(l).mode.value==="editor"||A.value)}]),style:T({minWidth:b.value})},[C(Nt),t(l).isFullscreen.value?L("",!0):(i(),Y(qn,{key:0}))],6)):L("",!0)])],4)])):(i(),m("div",Ms,[c("main",{ref_key:"mainEl",ref:V,id:"tripleta-main",class:"relative min-h-screen @container",style:T(Ae.value)},[c("div",{class:"relative min-h-full",style:T(Pe.value)},[_e.value?(i(),m("div",{key:0,class:"pointer-events-none absolute inset-x-0 bottom-0 top-0 z-0 min-h-full w-full bg-repeat opacity-15 mix-blend-overlay",style:T(_e.value),"aria-hidden":"true"},null,4)):L("",!0),c("div",$s,[c("div",{ref_key:"mobileHeaderEl",ref:S,"data-dosel-sticky-chrome":"",class:D(["pointer-events-none z-40",H.pinMobileHeader?"fixed inset-x-0 top-0":"sticky"]),style:T({top:H.stickyTop?typeof H.stickyTop=="number"?`${H.stickyTop}px`:H.stickyTop:"0px"})},[c("div",Ns,[we(h.$slots,"header",{tripleta:t(l),actions:ne},()=>[c("div",Os,[c("a",Bs,[c("img",{src:t(qe),alt:"",class:"aspect-square h-20 laptop:h-24"},null,8,Hs)])])],!0)])],6),H.pinMobileHeader?(i(),m("div",{key:0,"aria-hidden":"true",style:T({height:`${U.value}px`})},null,4)):L("",!0),we(h.$slots,"default",{tripleta:t(l),actions:ne},void 0,!0),we(h.$slots,"footer",{tripleta:t(l),actions:ne},void 0,!0)])],4)],4),C(oo)])),C(Wo),C(Es),C(bo),be.value&&ge.value?(i(),Y(M
2a(ge.value),{key:2})):L("",!0)],4))}}),nl=pe(Fs,[["__scopeId","data-v-246a7c0b"]]);export{ho as D,nl as T,ct as _,el as a,tl as b,Io as c,So as d,Qe as e,yo as f,Po as g,vn as h,Be as i,Ao as j,Ys as k,qs as l,Qs as m,Js as n,js as o,Xs as p,Zs as q,st as r,al as s,lt as t,Zo as u,An as v,Ft as w,ee as x};
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.