PageSourceSearch

https://m.wingu.se/packs/relative_timestamp-BOzlsJjy.js

js wingu.se collected 2026-09-29 15:10:42 UTC 2,170 bytes, 2 lines download raw bytes

1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";import{c as n}from"./react-intl-DlKP8ATg.js";import{t as r}from"./jsx-runtime-BdxMnOeJ.js";import{a as i,i as a,n as o,o as s,r as c}from"./time-DvUjGWVP.js";import{t as l}from"./initial_state-DnZ5UeDQ.js";import{t as u}from"./react-router-dom-C1dtKQUg.js";import{t as d}from"./classnames-CfLRLWYq.js";import{t as f}from"./useHovering-Clt57sOP.js";import{t as p}from"./useAccount-DhSMQkpH.js";var m=e(t()),h=e(d()),g=r(),_=({account:e,alt:t=``,animate:n=l,size:r=20,inline:i=!1,withLink:a=!1,style:o,className:s,counter:c,counterBorderColor:d})=>{let{hovering:p,handleMouseEnter:_,handleMouseLeave:v}=f(n),[y,b]=(0,m.useState)(!0),[x,S]=(0,m.useState)(!1),C={...o,width:`${r}px`,height:`${r}px`},w=p||n?e?.avatar:e?.avatar_static,T=(0,m.useCallback)(()=>{b(!1)},[b]),E=(0,m.useCallback)(()=>{S(!0)},[S]),D=(0,g.jsxs)(`span`,{className:(0,h.default)(s,`account__avatar`,{"account__avatar--inline":i,"account__avatar--loading":y}),onMouseEnter:_,onMouseLeave:v,style:C,children:[w&&!x&&(0,g.jsx)(`img`,{src:w,alt:t,onLoad:T,onError:E}),c&&(0,g.jsx)(`span`,{className:`account__avatar__counter`,style:{borderColor:d},children:c})]});return a?(0,g.jsx)(u,{to:`/@${e?.acct}`,title:`@${e?.acct}`,"data-hover-card-account":e?.id,children:D}):D},v=({accountId:e,...t})=>{let n=p(e);return(0,g.jsx)(_,{account:n,...t})},y={year:`numeric`,month:`short`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`},b=({timestamp:e,long:t=!1,noTime:r=!1,hasFuture:l=!1})=>{let u=n(),[d,f]=(0,m.useState)(()=>Date.now()),p=(0,m.useMemo)(()=>{let t=new Date(e);return l?t:new Date(Math.min(t.getTime(),d))},[l,d,e]),h=p.getTime();(0,m.useEffect)(()=>{let e=0,t=()=>{let{unit:n,delta:r}=i(h),a=s(n),l=Math.abs(r%a),u=10*c,d=Math.min(Math.max(r<0?a-l:l,u),o);e=window.setTimeout(()=>{f(Date.now()),t()},d)};return t(),()=>{e&&clearTimeout(e)}},[h]);let _=!e.includes(`T`)||r,v=(0,m.useMemo)(()=>a({timestamp:h,intl:u,short:!t,noTime:_,now:d}),[h,u,t,_,d]);return(0,g.jsx)(`time`,{dateTime:e,title:u.formatDate(p,y),children:v})};export{_ as n,v as r,b as t};
2//# sourceMappingURL=relative_timestamp-BOzlsJjy.js.map

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.