iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://ciencia.nasa.gov/_nuxt/Dciz2Lk9.js
import{r as y,af as C,ag as Q,ah as g,d as R,ai as Z,b as w,aj as J,ak as X,p as Y,al as G,am as ee,an as F,ao as _,ap as $,aq as te,ar as ae,as as A,o as q,at as le,ab as D,au as ne,av as b,aw as re,ax as L,ay as z,az as oe,v as ue,i as P,h as B,w as k,U as N,g as x,Q as M,T as O,c as V,j as se,aA as ie,F as ce,V as de,W as ve}from"./D9Jh96F5.js";function j(t){return[t.screenX,t.screenY]}function fe(){let t=y([-1,-1]);return{wasMoved(r){let n=j(r);return t.value[0]===n[0]&&t.value[1]===n[1]?!1:(t.value=n,!0)},update(r){t.value=j(r)}}}function pe({container:t,accept:r,walk:n,enabled:o}){C(()=>{let u=t.value;if(!u||o!==void 0&&!o.value)return;let l=Q(t);if(!l)return;let e=Object.assign(i=>r(i),{acceptNode:r}),d=l.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,e,!1);for(;d.nextNode();)n(d.currentNode)})}function me(t){throw new Error("Unexpected object: "+t)}var S=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(S||{});function be(t,r){let n=r.resolveItems();if(n.length<=0)return null;let o=r.resolveActiveIndex(),u=o??-1;switch(t.focus){case 0:{for(let l=0;l=0;--l)if(!r.resolveDisabled(n[l],l,n))return l;return o}case 2:{for(let l=u+1;l=0;--l)if(!r.resolveDisabled(n[l],l,n))return l;return o}case 4:{for(let l=0;l{let l=document.getElementById(u);if(l){let e=l.getAttribute("aria-label");return typeof e=="string"?e.trim():U(l).trim()}return null}).filter(Boolean);if(o.length>0)return o.join(", ")}return U(t).trim()}function he(t){let r=y(""),n=y("");return()=>{let o=g(t);if(!o)return"";let u=o.innerText;if(r.value===u)return n.value;let l=ge(o).trim().toLowerCase();return r.value=u,n.value=l,l}}var Ie=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Ie||{}),ye=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(ye||{});function Se(t){requestAnimationFrame(()=>requestAnimationFrame(t))}let W=Symbol("MenuContext");function E(t){let r=ne(W,null);if(r===null){let n=new Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,E),n}return r}let we=R({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(t,{slots:r,attrs:n}){let o=y(1),u=y(null),l=y(null),e=y([]),d=y(""),i=y(null),h=y(1);function m(a=c=>c){let c=i.value!==null?e.value[i.value]:null,s=oe(a(e.value.slice()),I=>g(I.dataRef.domRef)),f=c?s.indexOf(c):null;return f===-1&&(f=null),{items:s,activeItemIndex:f}}let v={menuState:o,buttonRef:u,itemsRef:l,items:e,searchQuery:d,activeItemIndex:i,activationTrigger:h,closeMenu:()=>{o.value=1,i.value=null},openMenu:()=>o.value=0,goToItem(a,c,s){let f=m(),I=be(a===S.Specific?{focus:S.Specific,id:c}:{focus:a},{resolveItems:()=>f.items,resolveActiveIndex:()=>f.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.disabled});d.value="",i.value=I,h.value=s??1,e.value=f.items},search(a){let c=d.value!==""?0:1;d.value+=a.toLowerCase();let s=(i.value!==null?e.value.slice(i.value+c).concat(e.value.slice(0,i.value+c)):e.value).find(I=>I.dataRef.textValue.startsWith(d.value)&&!I.dataRef.disabled),f=s?e.value.indexOf(s):-1;f===-1||f===i.value||(i.value=f,h.value=1)},clearSearch(){d.value=""},registerItem(a,c){let s=m(f=>[...f,{id:a,dataRef:c}]);e.value=s.items,i.value=s.activeItemIndex,h.value=1},unregisterItem(a){let c=m(s=>{let f=s.findIndex(I=>I.id===a);return f!==-1&&s.splice(f,1),s});e.value=c.items,i.value=c.activeItemIndex,h.value=1}};return Z([u,l],(a,c)=>{var s;v.closeMenu(),J(c,X.Loose)||(a.preventDefault(),(s=g(u))==null||s.focus())},w(()=>o.value===0)),Y(W,v),G(w(()=>ee(o.value,{0:F.Open,1:F.Closed}))),()=>{let a={open:o.value===0,close:v.closeMenu};return _({ourProps:{},theirProps:t,slot:a,slots:r,attrs:n,name:"Menu"})}}}),xe=R({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(t,{attrs:r,slots:n,expose:o}){var u;let l=(u=t.id)!=null?u:`headlessui-menu-button-${$()}`,e=E("MenuButton");o({el:e.buttonRef,$el:e.buttonRef});function d(v){switch(v.key){case b.Space:case b.Enter:case b.ArrowDown:v.preventDefault(),v.stopPropagation(),e.openMenu(),D(()=>{var a;(a=g(e.itemsRef))==null||a.focus({preventScroll:!0}),e.goToItem(S.First)});break;case b.ArrowUp:v.preventDefault(),v.stopPropagation(),e.openMenu(),D(()=>{var a;(a=g(e.itemsRef))==null||a.focus({preventScroll:!0}),e.goToItem(S.Last)});break}}function i(v){switch(v.key){case b.Space:v.preventDefault();break}}function h(v){t.disabled||(e.menuState.value===0?(e.closeMenu(),D(()=>{var a;return(a=g(e.buttonRef))==null?void 0:a.focus({preventScroll:!0})})):(v.preventDefault(),e.openMenu(),Se(()=>{var a;return(a=g(e.itemsRef))==null?void 0:a.focus({preventScroll:!0})})))}let m=te(w(()=>({as:t.as,type:r.type})),e.buttonRef);return()=>{var v;let a={open:e.menuState.value===0},{...c}=t,s={ref:e.buttonRef,id:l,type:m.value,"aria-haspopup":"menu","aria-controls":(v=g(e.itemsRef))==null?void 0:v.id,"aria-expanded":e.menuState.value===0,onKeydown:d,onKeyup:i,onClick:h};return _({ourProps:s,theirProps:c,slot:a,attrs:r,slots:n,name:"MenuButton"})}}}),De=R({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(t,{attrs:r,slots:n,expose:o}){var u;let l=(u=t.id)!=null?u:`headlessui-menu-items-${$()}`,e=E("MenuItems"),d=y(null);o({el:e.itemsRef,$el:e.itemsRef}),pe({container:w(()=>g(e.itemsRef)),enabled:w(()=>e.menuState.value===0),accept(a){return a.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:a.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(a){a.setAttribute("role","none")}});function i(a){var c;switch(d.value&&clearTimeout(d.value),a.key){case b.Space:if(e.searchQuery.value!=="")return a.preventDefault(),a.stopPropagation(),e.search(a.key);case b.Enter:if(a.preventDefault(),a.stopPropagation(),e.activeItemIndex.value!==null){let s=e.items.value[e.activeItemIndex.value];(c=g(s.dataRef.domRef))==null||c.click()}e.closeMenu(),z(g(e.buttonRef));break;case b.ArrowDown:return a.preventDefault(),a.stopPropagation(),e.goToItem(S.Next);case b.ArrowUp:return a.preventDefault(),a.stopPropagation(),e.goToItem(S.Previous);case b.Home:case b.PageUp:return a.preventDefault(),a.stopPropagation(),e.goToItem(S.First);case b.End:case b.PageDown:return a.preventDefault(),a.stopPropagation(),e.goToItem(S.Last);case b.Escape:a.preventDefault(),a.stopPropagation(),e.closeMenu(),D(()=>{var s;return(s=g(e.buttonRef))==null?void 0:s.focus({preventScroll:!0})});break;case b.Tab:a.preventDefault(),a.stopPropagation(),e.closeMenu(),D(()=>re(g(e.buttonRef),a.shiftKey?L.Previous:L.Next));break;default:a.key.length===1&&(e.search(a.key),d.value=setTimeout(()=>e.clearSearch(),350));break}}function h(a){switch(a.key){case b.Space:a.preventDefault();break}}let m=ae(),v=w(()=>m!==null?(m.value&F.Open)===F.Open:e.menuState.value===0);return()=>{var a,c;let s={open:e.menuState.value===0},{...f}=t,I={"aria-activedescendant":e.activeItemIndex.value===null||(a=e.items.value[e.activeItemIndex.value])==null?void 0:a.id,"aria-labelledby":(c=g(e.buttonRef))==null?void 0:c.id,id:l,onKeydown:i,onKeyup:h,role:"menu",tabIndex:0,ref:e.itemsRef};return _({ourProps:I,theirProps:f,slot:s,attrs:r,slots:n,features:A.RenderStrategy|A.Static,visible:v.value,name:"MenuItems"})}}}),Me=R({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(t,{slots:r,attrs:n,expose:o}){var u;let l=(u=t.id)!=null?u:`headlessui-menu-item-${$()}`,e=E("MenuItem"),d=y(null);o({el:d,$el:d});let i=w(()=>e.activeItemIndex.value!==null?e.items.value[e.activeItemIndex.value].id===l:!1),h=he(d),m=w(()=>({disabled:t.disabled,get textValue(){return h()},domRef:d}));q(()=>e.registerItem(l,m)),le(()=>e.unregisterItem(l)),C(()=>{e.menuState.value===0&&i.value&&e.activationTrigger.value!==0&&D(()=>{var p,T;return(T=(p=g(d))==null?void 0:p.scrollIntoView)==null?void 0:T.call(p,{block:"nearest"})})});function v(p){if(t.disabled)return p.preventDefault();e.closeMenu(),z(g(e.buttonRef))}function a(){if(t.disabled)return e.goToItem(S.Nothing);e.goToItem(S.Specific,l)}let c=fe();function s(p){c.update(p)}function f(p){c.wasMoved(p)&&(t.disabled||i.value||e.goToItem(S.Specific,l,0))}function I(p){c.wasMoved(p)&&(t.disabled||i.value&&e.goToItem(S.Nothing))}return()=>{let{disabled:p,...T}=t,H={active:i.value,disabled:p,close:e.closeMenu};return _({ourProps:{id:l,ref:d,role:"menuitem",tabIndex:p===!0?void 0:-1,"aria-disabled":p===!0?!0:void 0,onClick:v,onFocus:a,onPointerenter:s,onMouseenter:s,onPointermove:f,onMousemove:f,onPointerleave:I,onMouseleave:I},theirProps:{...n,...T},slot:H,attrs:n,slots:r,name:"MenuItem"})}}});const ke={class:"hds-filter-selection-title"},Re={key:0,class:"hds-filter-selection"},Te=M("div",{class:"hds-filter-selector-dropdown-icon"},[M("svg",{width:"11",height:"8",viewBox:"0 0 11 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[M("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.4999 4.92437L9.86424 0.529968L10.8999 1.57277L5.4999 7.00997L0.099904 1.57277L1.13557 0.529968L5.4999 4.92437Z",fill:"black"})])],-1),Pe={class:"padding-1"},Fe=["onClick"],Ee=R({__name:"SortDropdown",props:{label:{default:"Sort"},options:{},defaultValue:{default:void 0}},emits:["setSelectedOption"],setup(t,{emit:r}){const n=t,{label:o,options:u,defaultValue:l}=ue(n),e=r,d=m=>u.find(v=>v.value===m),i=y(d(l)),h=m=>{i.value=m,e("setSelectedOption",m.value)};return C(()=>{i.value&&n.defaultValue!==i.value.value&&(i.value=d(n.defaultValue))}),q(()=>{i.value=n.defaultValue?d(n.defaultValue):u[0]}),(m,v)=>(P(),B(x(we),{as:"div",class:"SortDropdown hds-filter-selector position-relative display-inline-block"},{default:k(()=>[N(x(xe),{class:"hds-filter-selector-title heading-12 text-uppercase color-carbon-60 padding-x-0 padding-y-1 border-0 bg-white position-relative z-100"},{default:k(()=>[M("span",ke,O(x(o))+":",1),i.value?(P(),V("span",Re,O(i.value.label),1)):se("",!0),Te]),_:1}),N(ie,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:k(()=>[N(x(De),{class:"menu-items position-absolute margin-top-1 origin-top-right width-card-lg bg-white border border-base-lighter shadow-4 z-200"},{default:k(()=>[M("div",Pe,[(P(!0),V(ce,null,de(x(u),(a,c)=>(P(),B(x(Me),{key:c,class:"display-block dropdown-item"},{default:k(({active:s})=>[M("button",{class:ve([s?"bg-base-lightest":"bg-transparent","width-full padding-1 border-0 color-carbon-90 text-left"]),onClick:f=>h(a)},O(a.label),11,Fe)]),_:2},1024))),128))])]),_:1})]),_:1})]),_:1}))}});export{Ee as _};