phanpy-cz/assets/status-FORkhePO.js.map
2024-06-16 20:14:43 +02:00

1 line
306 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"mappings":"ooBAEAA,OAAOC,WAAaC,GAEpB,SAASA,GAAUC,EAAO,CACpB,OAAOA,GAAU,WACnBA,EAAQ,CAAEC,KAAMD,IAElB,KAAM,CAAEE,UAASC,QAAO,GAAGC,CAAM,EAAGJ,EAC9BK,EAAQC,GAAS,CACrBC,UAAY,GAAEL,GAAWF,EAAMQ,YAAc,aAAe,EAAG,GAC/DC,QAAS,SACTC,SAAU,SACV,GAAGN,EACHF,QAASA,IAAM,CACbA,WAAUG,EACZ,CACF,CAAC,EACD,OAAIF,EACFQ,WAAW,IAAM,CACfN,EAAMN,UAAS,CAChB,EAAEI,CAAK,EAERE,EAAMN,UAAS,EAEVM,CACT,CCxBA,SAASO,GAAYC,EAAIV,EAAOW,EAAMC,EAAW,CAC/C,MAAMC,EAAgBC,GAAOJ,CAAE,EAC/BK,GAAU,IAAM,CACdF,EAAcG,QAAUN,CAC1B,EAAG,CAACA,EAAIC,CAAI,CAAC,EAEbI,GAAU,IAAM,CACV,CAACH,GAAaZ,IAAU,MAAQA,IAAU,IAC9Ca,EAAcG,QAAO,CACvB,EAAG,CAACJ,CAAS,CAAC,EAEdG,GAAU,IAAM,CACd,GAAIf,IAAU,MAAQA,IAAU,GAAO,OAEvC,MAAMiB,EAAKC,YADEC,IAAMN,EAAcG,UACJhB,CAAK,EAClC,MAAO,IAAMoB,cAAcH,CAAE,CAC/B,EAAG,CAACjB,CAAK,CAAC,CACZ,CCnBe,SAASqB,GAAYC,EAAM,CACxC,MAAMC,EAAM,IAAIC,IAAI,YAAa9B,OAAO+B,QAAQ,EAC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jB,GAAAz6B,EAAA0W,CAAA,EAAA0wB,EAAY1M,EAAA,aAAAF,CAAA,EAAAyO,EAAE7B,GAAA,YAAAA,EAAA,QAAA8B,EAAAz5B,EAAA05B,MAAA,UAAAC,KAAA,MAAAF,EAAA,OAAAz5B,GAAA,GAAAw5B,GAAA,MAAAA,EAC3D,QACD,EAAA9B,EACJ,GAER,OACE8B,EAAA,IAAAC,GAET1/B,EAAAsc,GAAA,CAEMke,mBAAwBhkC,eAAI0W,iDAAkB,yBAAQ,wCAC9CA,MAAU,SAAAwyB,EAAA,GAChBxO,oBACAF,KAAiBx6B,IACjBonC,OAAoBiC,IACLjC,oBAIrB,CAAmBn9B,CAAQ,EAAAi/B,EAAA,SAAAA,EAAA,GAC3B,EAAe,CAEf,CAAOD,QAEQ5P,GAAA,CAAAnjB,EAAAC,IAAA,CAACnW,MAAsB6L,SAG9BwE,IAAoD,EAAA6F,EAEpD,CAA4BrK,SAErB,GAAAy9B,CACOtpC,IACA0W,wBACP,OAAA0oB,GAAA,YAAAA,EAAA,KAAAmK,GAAAC,EAAAF,CAAA","names":["window","_showToast","showToast","props","text","onClick","delay","rest","toast","Toastify","className","destination","gravity","position","setTimeout","useInterval","fn","deps","immediate","savedCallback","useRef","useEffect","current","id","setInterval","tick","clearInterval","openCompose","opts","url","URL","location","width","screenWidth","height","screenHeight","screen","left","Math","max","top","min","winUID","uid","random","newWin","open","__COMPOSE__","alert","isSafari","test","navigator","userAgent","openOSK","fauxEl","document","createElement","style","opacity","body","appendChild","focus","removeChild","ICONS","x","__vitePreload","heart","bookmark","check-circle","x-circle","transfer","rocket","arrow-left","arrow-right","arrow-up","arrow-down","earth","lock","unlock","eye-close","eye-open","message","comment","comment2","home","notification","follow","follow-add","poll","pencil","quill","at","attachment","upload","gear","more","more2","external","popout","popin","plus","chevron-left","chevron-right","chevron-down","reply","thread","group","bot","menu","list","search","hashtag","info","shortcut","user","following","pin","unpin","bus","link","history","share","sparkles","sparkles2","exit","translate","play","trash","mute","unmute","block","unblock","flag","time","refresh","emoji2","filter","filters","chart","react","layout4","layout5","announce","round","arrow-up-circle","arrow-down-circle","clipboard","account-edit","account-warning","keyboard","cloud","month","media","speak","building","history2","arrows-right","code","copy","quote","settings","heart-break","user-x","minimize","SIZES","s","m","l","xl","xxl","ICONDATA","SVGICon","moize","rotate","flip","_jsx","viewBox","dangerouslySetInnerHTML","__html","transform","isShallowEqual","maxSize","Object","keys","length","matchesArg","cacheKeyArg","keyArg","icon","Icon","size","alt","title","class","iconSize","iconBlock","warn","Array","iconData","setIconData","useState","currentIcon","iconB","useCloseWatcher","watcher","CloseWatcher","addEventListener","destroy","useCloseWatcher$1","$modalContainer","getElementById","Modal","children","onClose","minimized","modalRef","timer","focusElement","querySelector","clearTimeout","supportsCloseWatcher","escRef","useHotkeys","enabled","keydown","keyup","$deckContainers","querySelectorAll","page","tabIndex","forEach","$deckContainer","setAttribute","removeAttribute","ref","node","e","target","currentTarget","inert","onFocus","isFocusable","getComputedStyle","pointerEvents","console","xxxl","alphaCache","canvas","OffscreenCanvas","ctx","getContext","willReadFrequently","imageSmoothingEnabled","Avatar","squircle","avatarRef","isMissing","src","loading","decoding","crossOrigin","undefined","onError","onLoad","dataset","loaded","drawImage","allPixels","getImageData","hasAlpha","data","pixel","i","classList","add","clearRect","mem","Link","forwardRef","routerLocation","useLocation","hash","replace","trim","to","restProps","includes","parsedHash","origin","searchParams","searchParamsStr","from","entries","map","key","value","encodeURIComponent","join","pathname","isActive","decodeURIComponent","href","parentNode","closest","stopPropagation","states","prevLocation","root","documentElement","defaultBoundingBoxPadding","safeAreaInsets","getSafeAreaInsets","safeAreaInsetTop","getPropertyValue","safeAreaInsetRight","safeAreaInsetBottom","safeAreaInsetLeft","parseInt","requestAnimationFrame","safeBoundingBoxPadding","paddings","v","CSS","supports","passive","Menu2","containerProps","instanceRef","_instanceRef","useWindowSize","Menu","boundingBoxPadding","repositionFlag","unmountOnClose","closeMenu","SubMenu2","menuRef","SubMenu","itemProps","onPointerMove","pointerType","openMenu","onPointerLeave","MenuConfirm","subMenu","confirm","confirmLabel","menuItemClassName","menuFooter","menuExtras","_jsxs","openTrigger","direction","overflow","gap","shift","menuClassName","menuButton","label","MenuItem","cloneElement","CustomEmoji","staticUrl","srcset","EmojiText","emojis","indexOf","regex","RegExp","shortcode","elements","split","word","emoji","find","EmojiText$1","memo","oldProps","newProps","nameCollator","Intl","Collator","sensitivity","NameText","account","instance","showAvatar","showAcct","short","acct","avatar","avatarStatic","displayName","username","_","acct1","acct2","match","trimmedUsername","toLowerCase","trimmedDisplayName","shortenedDisplayName","shortenedAlphaNumericDisplayName","compare","shiftKey","preventDefault","metaKey","ctrlKey","which","internalURL","showAccount","_Fragment","newAccount","dayjs","extend","dayjsTwitter","localizedFormat","relativeTime","dtf","DateTimeFormat","RelativeTime","datetime","format","renderCount","rerender","useReducer","date","useMemo","dateStr","dt","isValid","str","now","diff","year","twitter","toDate","fromNow","toISOString","timeout","raf","rafRerender","scheduleRerender","cancelAnimationFrame","_localeMatch","args","localeMatch","locales","resolvedOptions","locale","languages","localeTargetLanguages","translationTargetLanguages","getTranslateTargetLanguage","fromSettings","contentTranslationTargetLanguage","IntlDN","DisplayNames","type","_localeCode2Text","of","localeCode2Text","emojifyText","fauxDiv","whitelistLinkClasses","_enhanceContent","content","postEnhanceDOM","enhancedContent","dom","innerHTML","hasLink","hasCodeBlock","c","remove","textContent","shortenLink","links","usernames","innerText","hasChildren","domain","some","u","d","push","slice","textNodes","extractTextNodes","html","nodeValue","replaceWith","childNodes","p","pre","br","nextParagraphs","currentBlock","nextElementSibling","next","tagName","codeText","replaceAll","rejectFilter","prevIndex","hashtagStuffedParagraphs","index","hashtagCount","nodeType","Node","TEXT_NODE","linkText","startsWith","img","getAttribute","naturalWidth","naturalHeight","setProperty","queueMicrotask","enhanceContent","defaultRejectFilter","defaultRejectFilterMap","fromEntries","nodeName","URL_PREFIX_REGEX","URL_DISPLAY_LENGTH","prefix","displayURL","suffix","cutoff","rejectFilterMap","assign","reduce","acc","cur","walk","createTreeWalker","NodeFilter","SHOW_TEXT","acceptNode","FILTER_REJECT","FILTER_ACCEPT","nextNode","div","getHTMLText","preProcess","el","append","handleContentLinks","mentions","previewMode","statusURL","altKey","prevText","previousSibling","textBeforeLinkIsAt","endsWith","textStartsWithAt","contains","targetText","mention","textBeforeLinkIsHash","tag","hashURL","_b","_DateTimeFormat","dateYear","hideTime","formatOpts","currentYear","Date","getFullYear","day","hour","minute","niceDateTime","dtfOpts","NumberFormat","shortenNumber","notation","roundingMode","TOAST_DURATION","showCompose","composerState","duration","containPixelfed","notContainPixelfed","platformFeatures","supportsCache","feature","version","getCurrentInstance","range","features","satisfies","includePrerelease","loose","AccountBlock","skeleton","avatarSize","useAvatarStatic","internal","showActivity","showStats","accountInstance","hideDisplayName","relationship","excludeRelationshipAttrs","statusesCount","lastStatusAt","fields","note","followersCount","createdAt","locked","verifiedField","f","verifiedAt","excludedRelationship","r","hasRelationship","followedBy","requested","MenuLink","disabled","FocusableItem","detail","TOP","shazamIDs","LazyShazam","containerRef","hasID","visible","setVisible","visibleStart","setVisibleStart","useInView","rootMargin","trackVisibility","onChange","inView","triggerOnce","skip","rect","getBoundingClientRect","bottom","innerHeight","hidden","PHANPY_LINGVA_INSTANCES","import","LINGVA_INSTANCES","throttle","pThrottle","limit","interval","currentLingvaInstance","_lingvaTranslate","source","pRetry","fetchCall","res","fetch","ok","provider","translation","detectedSourceLanguage","detectedSource","retries","onFailedAttempt","log","TRANSLATED_MAX_AGE","lingvaTranslate","pmem","forceTranslate","sourceLanguage","onTranslate","mini","autoDetected","uiState","setUIState","targetLang","setTranslatedContent","pronunciationContent","detailsRef","translatedContent","sourceLangText","targetLangText","apiSourceLang","error","detectedLangText","setDetectedLang","pronunciation","_a","query","setPronunciationContent","detectedLang","lang","dir","name","Loader","abrupt","TranslationBlock$1","TranslationBlock","initDB","dbName","storeName","store","createStore","set","val","get","getMany","del","delMany","clear","db","drafts","catchup","fetchRelationships","accounts","relationshipsMap","masto","api","currentAccount","getCurrentAccountID","uniqueAccountIds","a","v1","relationships","Poll","readOnly","votePoll","expired","expiresAt","multiple","options","ownVotes","voted","votersCount","votesCount","expiresAtDate","pollVotesCount","roundPrecision","showResults","setShowResults","optionsHaveVoteCounts","every","o","option","optionVotesCount","percentage","toFixed","isLeading","onSubmit","form","formData","FormData","choices","marginLeft","FilterContext","createContext","_isFiltered","filtered","filterContext","appliedFilters","hasContext","context","isHidden","filterAction","action","filterTitles","titles","titlesStr","isFiltered","filteredItem","item","currentAccountID","isSelf","filterState","filteredItems","items","htmlContentLength","supportsTTS","speechSynthesis","speaking","cancel","utterance","SpeechSynthesisUtterance","statusPeek","status","spoilerText","mediaAttachments","image","gifv","video","audio","unknown","useTruncated","onResize","useThrottledCallback","scrollHeight","truncated","_height","maxHeight","computedHeight","toggle","useResizeObserver","box","visibilityIconsMap","public","unlisted","private","direct","formatDuration","hours","floor","minutes","seconds","toString","padStart","dataAltLabel","AltBadge","showMediaAlt","MEDIA_CAPTION_LIMIT","MEDIA_CAPTION_LIMIT_LONGER","isMediaCaptionLong","caption","Media","showOriginal","autoAnimate","showCaption","allowLongerCaption","altIndex","blurhash","description","meta","previewRemoteUrl","previewUrl","remoteUrl","original","small","mediaURL","remoteMediaURL","hasDimensions","orientation","rgbAverageColor","getBlurHashAverageColor","videoRef","focalPosition","y","mediaRef","onUpdate","useCallback","scale","make3dTransformValue","removeProperty","touchAction","pinchZoomEnabled","setPinchZoomEnabled","quickPinchZoomProps","draggableUnZoomed","inertiaFriction","tapZoomFactor","doubleTapToggleZoom","Parent","remoteMediaURLObj","getURLObj","isVideoMaybe","isAudioMaybe","isImage","parentRef","imageSmallerThanParent","setImageSmallerThanParent","useLayoutEffect","offsetWidth","offsetHeight","smaller","maxAspectHeight","averageColorStyle","mediaStyles","aspectRatio","longDesc","showInlineDesc","Figure","Fragment","display","mode","backgroundImage","backgroundSize","QuickPinchZoom","objectPosition","$media","hasDuration","shortDuration","isGIF","loopable","formattedDuration","hoverAnimate","autoGIFAnimate","showProgress","gifHTML","pause","onMouseEnter","onMouseLeave","onBlur","slot","poster","preload","autoplay","playsinline","loop","controls","muted","onTimeUpdate","container","currentTime","disablePictureInPicture","onLoadedMetadata","SHOW_COMMENT_COUNT_LIMIT","INLINE_TRANSLATE_LIMIT","fetchAccount","$select","memFetchAccount","visibilityText","isIOS","ontouchstart","rtf","RelativeTimeFormat","REACTIONS_LIMIT","getPollText","getPostText","PostContent","post","language","oldPost","newPost","SIZE_CLASS","detectLang","detectAll","accuracy","Status","statusID","propInstance","contentTextWeight","enableCommentHint","withinContext","enableTranslate","_forceTranslate","onMediaClick","quoted","onStatusLinkClick","showFollowedTags","allowContextMenu","showActionsBar","showReplyParent","mediaFirst","authenticated","currentInstance","sameInstance","sKey","statusKey","snapStates","useSnapshot","statuses","accountId","accountURL","accountEmojis","repliesCount","reblogged","reblogsCount","favourited","favouritesCount","bookmarked","sensitive","visibility","_language","editedAt","card","inReplyToId","inReplyToAccountId","reblog","uri","tags","_deleted","_pinned","emojiReactions","languageAutoDetected","setLanguageAutoDetected","detected","hasMediaAttachments","useContext","filterInfo","debugHover","FilteredStatus","createdAtDate","editedAtDate","inReplyToAccountRef","setInReplyToAccount","inReplyToAccount","account2","catch","mentionSelf","readingExpandSpoilers","showSpoiler","readingExpandMedia","prefs","showSpoilerMedia","FollowedTagsParent","setForceTranslate","statusFollowedTags","StatusParent","contentTranslation","contentTranslationAutoInline","targetLanguage","contentLength","inlineTranslate","isSizeLarge","showEdited","setShowEdited","showEmbed","setShowEmbed","readMoreText","statusRef","spoilerContentRef","contentRef","mediaContainerRef","textWeight","editedDateText","mediaNoDesc","replyToStatus","statusMonthsAgo","boostStatus","unauthInteractionErrorMessage","confirmText","yes","newStatus","saveStatus","favouriteStatus","favouriteStatusNotify","done","bookmarkStatus","bookmarkStatusNotify","contentTranslationHideLanguages","reblogIterator","firstLoad","favouriteIterator","differentLanguage","reblogResults","_c","Promise","favouriteResults","_types","isPinnable","StatusMenuItems","replyStatus","canBoost","confirmBoostStatus","heading","fetchBoostedLikedByAccounts","showReactions","postID","MenuDivider","postText","createdDateText","nicePostURL","isPublic","cachedStatus","getStatus","setIsContextMenuOpen","contextMenuProps","bindLongPressContext","useLongPress","showContextMenu","clientX","clientY","setContextMenuProps","isContextMenuOpen","hotkeysEnabled","fRef","dRef","threshold","bRef","rRef","xRef","activeStatus","spoilerButton","spoilerMediaButton","displayedMediaAttachments","captionChildren","attachments","indices","showMultipleMediaCaptions","showCommentCount","isThread","StatusCompact","containsQuestion","nodeRef","anchorNode","selection","ControlledMenu","contextMenuRef","anchorPoint","state","portal","actionsRef","StatusButton","showCommentHint","statusThreadNumber","MediaFirstContainer","spoilers","spoilersMedia","QuoteStatuses","newPoll","pollResponse","polls","then","MultipleMediaFigure","selfReferential","emojiReaction","count","me","url2","isShortCode","checked","viewScroll","EditedAtModal","moreThanOne","currentIndex","setCurrentIndex","handleScroll","clientWidth","scrollLeft","carouselRef","behavior","Card","providerName","providerUrl","authorName","authorUrl","imageDescription","embedUrl","publishedAt","hasText","isLandscape","cardStatusURL","isMastodonLinkMaybe","unfurlMastodonLink","hasIframeHTML","setCardStatusURL","punycode","handleClick","blurhashImage","w","putImageData","videoID","videoid","toUnicode","setEditHistory","editHistory2","fetchStatusHistory","editHistory","generateHTMLCode","level","quotes","contentHTML","sourceMediaURL","previewMediaURL","mediaHTML","sourceMediaURLObj","htmlCode","prettify","EmbedModal","setButtonTitle","buttonTitle","iconAlt","urlObj","path","restPath","host","statusReply","srKey","statusPeekText","filterTitleStr","bindLongPressPeek","isReblog","actualStatusID","showPeek","isFollowedTags","setShowPeek","cancelOnMovement","ssKey","statusPeekRef","uniqueQuotes","q","arr","q2","statusQuotes","restNewProps","shallowEqual","restOldProps"],"ignoreList":[],"sources":["../../src/utils/show-toast.js","../../src/utils/useInterval.js","../../src/utils/open-compose.js","../../src/utils/open-osk.jsx","../../src/components/ICONS.jsx","../../src/components/icon.jsx","../../src/utils/useCloseWatcher.js","../../src/components/modal.jsx","../../src/components/avatar.jsx","../../src/components/link.jsx","../../src/utils/safe-bounding-box-padding.js","../../src/components/menu2.jsx","../../src/components/submenu2.jsx","../../src/components/menu-confirm.jsx","../../src/components/custom-emoji.jsx","../../src/components/emoji-text.jsx","../../src/components/name-text.jsx","../../src/components/relative-time.jsx","../../src/utils/locale-match.jsx","../../src/utils/get-translate-target-language.jsx","../../src/utils/localeCode2Text.jsx","../../src/utils/emojify-text.js","../../src/utils/enhance-content.js","../../src/utils/getHTMLText.jsx","../../src/utils/handle-content-links.js","../../src/utils/nice-date-time.js","../../src/utils/shorten-number.jsx","../../src/utils/show-compose.js","../../src/utils/supports.js","../../src/components/account-block.jsx","../../src/components/menu-link.jsx","../../src/components/lazy-shazam.jsx","../../src/components/translation-block.jsx","../../src/utils/db.js","../../src/utils/relationships.js","../../src/components/poll.jsx","../../src/utils/filter-context.js","../../src/utils/filters.jsx","../../src/utils/html-content-length.js","../../src/utils/speech.js","../../src/utils/status-peek.jsx","../../src/utils/useTruncated.js","../../src/utils/visibility-icons-map.js","../../src/utils/format-duration.jsx","../../src/components/media.jsx","../../src/components/status.jsx"],"sourcesContent":["import Toastify from 'toastify-js';\n\nwindow._showToast = showToast;\n\nfunction showToast(props) {\n if (typeof props === 'string') {\n props = { text: props };\n }\n const { onClick, delay, ...rest } = props;\n const toast = Toastify({\n className: `${onClick || props.destination ? 'shiny-pill' : ''}`,\n gravity: 'bottom',\n position: 'center',\n ...rest,\n onClick: () => {\n onClick?.(toast); // Pass in the object itself!\n },\n });\n if (delay) {\n setTimeout(() => {\n toast.showToast();\n }, delay);\n } else {\n toast.showToast();\n }\n return toast;\n}\n\nexport default showToast;\n","import { useEffect, useRef } from 'preact/hooks';\n\nfunction useInterval(fn, delay, deps, immediate) {\n const savedCallback = useRef(fn);\n useEffect(() => {\n savedCallback.current = fn;\n }, [fn, deps]);\n\n useEffect(() => {\n if (!immediate || delay === null || delay === false) return;\n savedCallback.current();\n }, [immediate]);\n\n useEffect(() => {\n if (delay === null || delay === false) return;\n const tick = () => savedCallback.current();\n const id = setInterval(tick, delay);\n return () => clearInterval(id);\n }, [delay]);\n}\n\nexport default useInterval;\n","export default function openCompose(opts) {\n const url = new URL('/compose/', window.location);\n const { width: screenWidth, height: screenHeight } = window.screen;\n const left = Math.max(0, (screenWidth - 600) / 2);\n const top = Math.max(0, (screenHeight - 450) / 2);\n const width = Math.min(screenWidth, 600);\n const height = Math.min(screenHeight, 450);\n const winUID = opts?.uid || Math.random();\n const newWin = window.open(\n url,\n 'compose' + winUID,\n `width=${width},height=${height},left=${left},top=${top}`,\n );\n\n if (newWin) {\n // if (masto) {\n // newWin.masto = masto;\n // }\n\n newWin.__COMPOSE__ = opts;\n } else {\n alert('Looks like your browser is blocking popups.');\n }\n\n return newWin;\n}\n","const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // https://stackoverflow.com/a/23522755\n\nexport default function openOSK() {\n if (isSafari) {\n const fauxEl = document.createElement('input');\n fauxEl.style.position = 'absolute';\n fauxEl.style.top = '0';\n fauxEl.style.left = '0';\n fauxEl.style.opacity = '0';\n document.body.appendChild(fauxEl);\n fauxEl.focus();\n setTimeout(() => {\n document.body.removeChild(fauxEl);\n }, 500);\n }\n}\n","export const ICONS = {\n x: () => import('@iconify-icons/mingcute/close-line'),\n heart: () => import('@iconify-icons/mingcute/heart-line'),\n bookmark: () => import('@iconify-icons/mingcute/bookmark-line'),\n 'check-circle': () => import('@iconify-icons/mingcute/check-circle-line'),\n 'x-circle': () => import('@iconify-icons/mingcute/close-circle-line'),\n transfer: () => import('@iconify-icons/mingcute/transfer-4-line'),\n rocket: () => import('@iconify-icons/mingcute/rocket-line'),\n 'arrow-left': () => import('@iconify-icons/mingcute/arrow-left-line'),\n 'arrow-right': () => import('@iconify-icons/mingcute/arrow-right-line'),\n 'arrow-up': () => import('@iconify-icons/mingcute/arrow-up-line'),\n 'arrow-down': () => import('@iconify-icons/mingcute/arrow-down-line'),\n earth: () => import('@iconify-icons/mingcute/earth-line'),\n lock: () => import('@iconify-icons/mingcute/lock-line'),\n unlock: () => import('@iconify-icons/mingcute/unlock-line'),\n 'eye-close': () => import('@iconify-icons/mingcute/eye-close-line'),\n 'eye-open': () => import('@iconify-icons/mingcute/eye-2-line'),\n message: () => import('@iconify-icons/mingcute/mail-line'),\n comment: () => import('@iconify-icons/mingcute/chat-3-line'),\n comment2: () => import('@iconify-icons/mingcute/comment-2-line'),\n home: () => import('@iconify-icons/mingcute/home-3-line'),\n notification: () => import('@iconify-icons/mingcute/notification-line'),\n follow: () => import('@iconify-icons/mingcute/user-follow-line'),\n 'follow-add': () => import('@iconify-icons/mingcute/user-add-line'),\n poll: [() => import('@iconify-icons/mingcute/chart-bar-line'), '90deg'],\n pencil: () => import('@iconify-icons/mingcute/pencil-line'),\n quill: () => import('@iconify-icons/mingcute/quill-pen-line'),\n at: () => import('@iconify-icons/mingcute/at-line'),\n attachment: () => import('@iconify-icons/mingcute/attachment-line'),\n upload: () => import('@iconify-icons/mingcute/upload-3-line'),\n gear: () => import('@iconify-icons/mingcute/settings-3-line'),\n more: () => import('@iconify-icons/mingcute/more-3-line'),\n more2: () => import('@iconify-icons/mingcute/more-1-fill'),\n external: () => import('@iconify-icons/mingcute/external-link-line'),\n popout: () => import('@iconify-icons/mingcute/external-link-line'),\n popin: [() => import('@iconify-icons/mingcute/external-link-line'), '180deg'],\n plus: () => import('@iconify-icons/mingcute/add-circle-line'),\n 'chevron-left': () => import('@iconify-icons/mingcute/left-line'),\n 'chevron-right': () => import('@iconify-icons/mingcute/right-line'),\n 'chevron-down': () => import('@iconify-icons/mingcute/down-line'),\n reply: [\n () => import('@iconify-icons/mingcute/share-forward-line'),\n '180deg',\n 'horizontal',\n ],\n thread: () => import('@iconify-icons/mingcute/route-line'),\n group: () => import('@iconify-icons/mingcute/group-line'),\n bot: () => import('@iconify-icons/mingcute/android-2-line'),\n menu: () => import('@iconify-icons/mingcute/rows-4-line'),\n list: () => import('@iconify-icons/mingcute/list-check-line'),\n search: () => import('@iconify-icons/mingcute/search-2-line'),\n hashtag: () => import('@iconify-icons/mingcute/hashtag-line'),\n info: () => import('@iconify-icons/mingcute/information-line'),\n shortcut: () => import('@iconify-icons/mingcute/lightning-line'),\n user: () => import('@iconify-icons/mingcute/user-4-line'),\n following: () => import('@iconify-icons/mingcute/walk-line'),\n pin: () => import('@iconify-icons/mingcute/pin-line'),\n unpin: [() => import('@iconify-icons/mingcute/pin-line'), '180deg'],\n bus: () => import('@iconify-icons/mingcute/bus-2-line'),\n link: () => import('@iconify-icons/mingcute/link-2-line'),\n history: () => import('@iconify-icons/mingcute/history-line'),\n share: () => import('@iconify-icons/mingcute/share-2-line'),\n sparkles: () => import('@iconify-icons/mingcute/sparkles-line'),\n sparkles2: () => import('@iconify-icons/mingcute/sparkles-2-line'),\n exit: () => import('@iconify-icons/mingcute/exit-line'),\n translate: () => import('@iconify-icons/mingcute/translate-line'),\n play: () => import('@iconify-icons/mingcute/play-fill'),\n trash: () => import('@iconify-icons/mingcute/delete-2-line'),\n mute: () => import('@iconify-icons/mingcute/volume-mute-line'),\n unmute: () => import('@iconify-icons/mingcute/volume-line'),\n block: () => import('@iconify-icons/mingcute/forbid-circle-line'),\n unblock: [\n () => import('@iconify-icons/mingcute/forbid-circle-line'),\n '180deg',\n ],\n flag: () => import('@iconify-icons/mingcute/flag-1-line'),\n time: () => import('@iconify-icons/mingcute/time-line'),\n refresh: () => import('@iconify-icons/mingcute/refresh-2-line'),\n emoji2: () => import('@iconify-icons/mingcute/emoji-2-line'),\n filter: () => import('@iconify-icons/mingcute/filter-2-line'),\n filters: () => import('@iconify-icons/mingcute/filter-line'),\n chart: () => import('@iconify-icons/mingcute/chart-line-line'),\n react: () => import('@iconify-icons/mingcute/react-line'),\n layout4: () => import('@iconify-icons/mingcute/layout-4-line'),\n layout5: () => import('@iconify-icons/mingcute/layout-5-line'),\n announce: () => import('@iconify-icons/mingcute/announcement-line'),\n alert: () => import('@iconify-icons/mingcute/alert-line'),\n round: () => import('@iconify-icons/mingcute/round-fill'),\n 'arrow-up-circle': () =>\n import('@iconify-icons/mingcute/arrow-up-circle-line'),\n 'arrow-down-circle': () =>\n import('@iconify-icons/mingcute/arrow-down-circle-line'),\n clipboard: () => import('@iconify-icons/mingcute/clipboard-line'),\n 'account-edit': () => import('@iconify-icons/mingcute/user-edit-line'),\n 'account-warning': () => import('@iconify-icons/mingcute/user-warning-line'),\n keyboard: () => import('@iconify-icons/mingcute/keyboard-line'),\n cloud: () => import('@iconify-icons/mingcute/cloud-line'),\n month: () => import('@iconify-icons/mingcute/calendar-month-line'),\n media: () => import('@iconify-icons/mingcute/photo-album-line'),\n speak: () => import('@iconify-icons/mingcute/radar-line'),\n building: () => import('@iconify-icons/mingcute/building-5-line'),\n history2: () => import('@iconify-icons/mingcute/history-2-line'),\n document: () => import('@iconify-icons/mingcute/document-line'),\n 'arrows-right': () => import('@iconify-icons/mingcute/arrows-right-line'),\n code: () => import('@iconify-icons/mingcute/code-line'),\n copy: () => import('@iconify-icons/mingcute/copy-2-line'),\n quote: () => import('@iconify-icons/mingcute/quote-left-line'),\n settings: () => import('@iconify-icons/mingcute/settings-6-line'),\n 'heart-break': () => import('@iconify-icons/mingcute/heart-crack-line'),\n 'user-x': () => import('@iconify-icons/mingcute/user-x-line'),\n minimize: () => import('@iconify-icons/mingcute/arrows-down-line'),\n};\n","import moize from 'moize';\nimport { useEffect, useRef, useState } from 'preact/hooks';\n\nimport { ICONS } from './ICONS';\n\nconst SIZES = {\n s: 12,\n m: 16,\n l: 20,\n xl: 24,\n xxl: 32,\n};\n\nconst ICONDATA = {};\n\n// Memoize the dangerouslySetInnerHTML of the SVGs\nconst SVGICon = moize(\n function ({ width, height, body, rotate, flip }) {\n return (\n <svg\n viewBox={`0 0 ${width} ${height}`}\n dangerouslySetInnerHTML={{ __html: body }}\n style={{\n transform: `${rotate ? `rotate(${rotate})` : ''} ${\n flip ? `scaleX(-1)` : ''\n }`,\n }}\n />\n );\n },\n {\n isShallowEqual: true,\n maxSize: Object.keys(ICONS).length,\n matchesArg: (cacheKeyArg, keyArg) =>\n cacheKeyArg.icon === keyArg.icon && cacheKeyArg.body === keyArg.body,\n },\n);\n\nfunction Icon({\n icon,\n size = 'm',\n alt,\n title,\n class: className = '',\n style = {},\n}) {\n if (!icon) return null;\n\n const iconSize = SIZES[size];\n let iconBlock = ICONS[icon];\n if (!iconBlock) {\n console.warn(`Icon ${icon} not found`);\n return null;\n }\n\n let rotate, flip;\n if (Array.isArray(iconBlock)) {\n [iconBlock, rotate, flip] = iconBlock;\n }\n\n const [iconData, setIconData] = useState(ICONDATA[icon]);\n const currentIcon = useRef(icon);\n useEffect(() => {\n if (iconData && currentIcon.current === icon) return;\n (async () => {\n const iconB = await iconBlock();\n setIconData(iconB.default);\n ICONDATA[icon] = iconB.default;\n })();\n currentIcon.current = icon;\n }, [icon]);\n\n return (\n <span\n class={`icon ${className}`}\n title={title || alt}\n style={{\n width: `${iconSize}px`,\n height: `${iconSize}px`,\n ...style,\n }}\n >\n {iconData && (\n // <svg\n // width={iconSize}\n // height={iconSize}\n // viewBox={`0 0 ${iconData.width} ${iconData.height}`}\n // dangerouslySetInnerHTML={{ __html: iconData.body }}\n // style={{\n // transform: `${rotate ? `rotate(${rotate})` : ''} ${\n // flip ? `scaleX(-1)` : ''\n // }`,\n // }}\n // />\n <SVGICon\n icon={icon}\n width={iconData.width}\n height={iconData.height}\n body={iconData.body}\n rotate={rotate}\n flip={flip}\n />\n )}\n </span>\n );\n}\n\nexport default Icon;\n","import { useEffect } from 'preact/hooks';\n\nfunction useCloseWatcher(fn, deps = []) {\n if (!fn || typeof fn !== 'function') return;\n useEffect(() => {\n const watcher = new CloseWatcher();\n watcher.addEventListener('close', fn);\n return () => {\n watcher.destroy();\n };\n }, deps);\n}\n\nexport default window.CloseWatcher ? useCloseWatcher : () => {};\n","import './modal.css';\n\nimport { createPortal } from 'preact/compat';\nimport { useEffect, useRef } from 'preact/hooks';\nimport { useHotkeys } from 'react-hotkeys-hook';\n\nimport useCloseWatcher from '../utils/useCloseWatcher';\n\nconst $modalContainer = document.getElementById('modal-container');\n\nfunction Modal({ children, onClose, onClick, class: className, minimized }) {\n if (!children) return null;\n\n const modalRef = useRef();\n useEffect(() => {\n let timer = setTimeout(() => {\n const focusElement = modalRef.current?.querySelector('[tabindex=\"-1\"]');\n if (focusElement) {\n focusElement.focus();\n }\n }, 100);\n return () => clearTimeout(timer);\n }, []);\n\n const supportsCloseWatcher = window.CloseWatcher;\n const escRef = useHotkeys(\n 'esc',\n () => {\n setTimeout(() => {\n onClose?.();\n }, 0);\n },\n {\n enabled: !supportsCloseWatcher && !!onClose,\n // Using keyup and setTimeout above\n // This will run \"later\" to prevent clash with esc handlers from other components\n keydown: false,\n keyup: true,\n },\n [onClose],\n );\n useCloseWatcher(onClose, [onClose]);\n\n useEffect(() => {\n const $deckContainers = document.querySelectorAll('.deck-container');\n if (minimized) {\n // Similar to focusDeck in focus-deck.jsx\n // Focus last deck\n const page = $deckContainers[$deckContainers.length - 1]; // last one\n if (page && page.tabIndex === -1) {\n page.focus();\n }\n } else {\n if (children) {\n $deckContainers.forEach(($deckContainer) => {\n $deckContainer.setAttribute('inert', '');\n });\n } else {\n $deckContainers.forEach(($deckContainer) => {\n $deckContainer.removeAttribute('inert');\n });\n }\n }\n return () => {\n $deckContainers.forEach(($deckContainer) => {\n $deckContainer.removeAttribute('inert');\n });\n };\n }, [children, minimized]);\n\n const Modal = (\n <div\n ref={(node) => {\n modalRef.current = node;\n escRef.current = node?.querySelector?.('[tabindex=\"-1\"]') || node;\n }}\n className={className}\n onClick={(e) => {\n onClick?.(e);\n if (e.target === e.currentTarget) {\n onClose?.(e);\n }\n }}\n tabIndex={minimized ? 0 : '-1'}\n inert={minimized}\n onFocus={(e) => {\n try {\n if (e.target === e.currentTarget) {\n const focusElement =\n modalRef.current?.querySelector('[tabindex=\"-1\"]');\n const isFocusable =\n !!focusElement &&\n getComputedStyle(focusElement)?.pointerEvents !== 'none';\n if (focusElement && isFocusable) {\n focusElement.focus();\n }\n }\n } catch (err) {\n console.error(err);\n }\n }}\n >\n {children}\n </div>\n );\n\n return createPortal(Modal, $modalContainer);\n\n // return createPortal(children, $modalContainer);\n}\n\nexport default Modal;\n","import './avatar.css';\n\nimport { useRef } from 'preact/hooks';\n\nimport mem from '../utils/mem';\n\nconst SIZES = {\n s: 16,\n m: 20,\n l: 24,\n xl: 32,\n xxl: 50,\n xxxl: 64,\n};\n\nconst alphaCache = {};\n\nconst canvas = window.OffscreenCanvas\n ? new OffscreenCanvas(1, 1)\n : document.createElement('canvas');\nconst ctx = canvas.getContext('2d', {\n willReadFrequently: true,\n});\nctx.imageSmoothingEnabled = false;\n\nfunction Avatar({ url, size, alt = '', squircle, ...props }) {\n size = SIZES[size] || size || SIZES.m;\n const avatarRef = useRef();\n const isMissing = /missing\\.png$/.test(url);\n return (\n <span\n ref={avatarRef}\n class={`avatar ${squircle ? 'squircle' : ''} ${\n alphaCache[url] ? 'has-alpha' : ''\n }`}\n style={{\n width: size,\n height: size,\n }}\n title={alt}\n {...props}\n >\n {!!url && (\n <img\n src={url}\n width={size}\n height={size}\n alt={alt}\n loading=\"lazy\"\n decoding=\"async\"\n crossOrigin={\n alphaCache[url] === undefined && !isMissing\n ? 'anonymous'\n : undefined\n }\n onError={(e) => {\n if (e.target.crossOrigin) {\n e.target.crossOrigin = null;\n e.target.src = url;\n }\n }}\n onLoad={(e) => {\n if (avatarRef.current) avatarRef.current.dataset.loaded = true;\n if (alphaCache[url] !== undefined) return;\n if (isMissing) return;\n setTimeout(() => {\n try {\n // Check if image has alpha channel\n const { width, height } = e.target;\n if (canvas.width !== width) canvas.width = width;\n if (canvas.height !== height) canvas.height = height;\n ctx.drawImage(e.target, 0, 0);\n const allPixels = ctx.getImageData(0, 0, width, height);\n // At least 10% of pixels have alpha <= 128\n const hasAlpha =\n allPixels.data.filter(\n (pixel, i) => i % 4 === 3 && pixel <= 128,\n ).length /\n (allPixels.data.length / 4) >\n 0.1;\n if (hasAlpha) {\n // console.log('hasAlpha', hasAlpha, allPixels.data);\n avatarRef.current.classList.add('has-alpha');\n }\n alphaCache[url] = hasAlpha;\n ctx.clearRect(0, 0, width, height);\n } catch (e) {\n // Silent fail\n alphaCache[url] = false;\n }\n }, 1);\n }}\n />\n )}\n </span>\n );\n}\n\nexport default mem(Avatar);\n","import { forwardRef } from 'preact/compat';\nimport { useLocation } from 'react-router-dom';\n\nimport states from '../utils/states';\n\n/* NOTES\n =====\n Initially this uses <NavLink> from react-router-dom, but it doesn't work:\n 1. It interferes with nested <a> inside <a> and it's difficult to preventDefault/stopPropagation from the nested <a>\n 2. isActive doesn't work properly with the weird routes that's set up in this app, due to the faux \"location\" to make the modals work and prevent unmounting\n 3. Not using <Link state/> because it modifies history.state that *persists* across page reloads. I don't need that, so using valtio's states instead.\n*/\n\nconst Link = forwardRef((props, ref) => {\n let routerLocation;\n try {\n routerLocation = useLocation();\n } catch (e) {}\n let hash = (location.hash || '').replace(/^#/, '').trim();\n if (hash === '') hash = '/';\n const { to, ...restProps } = props;\n\n // Handle encodeURIComponent of searchParams values\n if (!!hash && hash !== '/' && hash.includes('?')) {\n try {\n const parsedHash = new URL(hash, location.origin); // Fake base URL\n if (parsedHash.searchParams.size) {\n const searchParamsStr = Array.from(parsedHash.searchParams.entries())\n .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)\n .join('&');\n hash = parsedHash.pathname + '?' + searchParamsStr;\n }\n } catch (e) {}\n }\n\n const isActive = hash === to || decodeURIComponent(hash) === to;\n return (\n <a\n ref={ref}\n href={`#${to}`}\n {...restProps}\n class={`${props.class || ''} ${isActive ? 'is-active' : ''}`}\n onClick={(e) => {\n if (e.currentTarget?.parentNode?.closest('a')) {\n // If this <a> is nested inside another <a>\n e.stopPropagation();\n }\n if (routerLocation) states.prevLocation = routerLocation;\n props.onClick?.(e);\n }}\n />\n );\n});\n\nexport default Link;\n","const root = document.documentElement;\nconst style = getComputedStyle(root);\nconst defaultBoundingBoxPadding = 8;\n\nlet safeAreaInsets = [0, 0, 0, 0];\nfunction getSafeAreaInsets() {\n // Get safe area inset variables from root\n const safeAreaInsetTop = style.getPropertyValue('--sai-top');\n const safeAreaInsetRight = style.getPropertyValue('--sai-right');\n const safeAreaInsetBottom = style.getPropertyValue('--sai-bottom');\n const safeAreaInsetLeft = style.getPropertyValue('--sai-left');\n safeAreaInsets = [\n // top, right, bottom, left (clockwise)\n Math.max(0, parseInt(safeAreaInsetTop, 10)),\n Math.max(0, parseInt(safeAreaInsetRight, 10)),\n Math.max(0, parseInt(safeAreaInsetBottom, 10)),\n Math.max(0, parseInt(safeAreaInsetLeft, 10)),\n ];\n}\nrequestAnimationFrame(getSafeAreaInsets);\n\nfunction safeBoundingBoxPadding(paddings = []) {\n const str = safeAreaInsets\n .map((v, i) => (v || defaultBoundingBoxPadding) + (paddings[i] || 0))\n .join(' ');\n // console.log(str);\n return str;\n}\n\n// Update safe area insets when orientation or resize\nif (CSS.supports('top: env(safe-area-inset-top)')) {\n window.addEventListener('resize', getSafeAreaInsets, { passive: true });\n}\n\nexport default safeBoundingBoxPadding;\n","import { Menu } from '@szhsin/react-menu';\nimport { useWindowSize } from '@uidotdev/usehooks';\nimport { useRef } from 'preact/hooks';\n\nimport safeBoundingBoxPadding from '../utils/safe-bounding-box-padding';\n\n// It's like Menu but with sensible defaults, bug fixes and improvements.\nfunction Menu2(props) {\n const { containerProps, instanceRef: _instanceRef } = props;\n const size = useWindowSize();\n const instanceRef = _instanceRef?.current ? _instanceRef : useRef();\n\n return (\n <Menu\n boundingBoxPadding={safeBoundingBoxPadding()}\n repositionFlag={`${size.width}x${size.height}`}\n unmountOnClose\n {...props}\n instanceRef={instanceRef}\n containerProps={{\n onClick: (e) => {\n if (e.target === e.currentTarget) {\n instanceRef.current?.closeMenu?.();\n }\n containerProps?.onClick?.(e);\n },\n ...containerProps,\n }}\n />\n );\n}\n\nexport default Menu2;\n","import { SubMenu } from '@szhsin/react-menu';\nimport { useRef } from 'preact/hooks';\n\nexport default function SubMenu2(props) {\n const menuRef = useRef();\n return (\n <SubMenu\n {...props}\n instanceRef={menuRef}\n // Test fix for bug; submenus not opening on Android\n itemProps={{\n onPointerMove: (e) => {\n if (e.pointerType === 'touch') {\n menuRef.current?.openMenu?.();\n }\n },\n onPointerLeave: (e) => {\n if (e.pointerType === 'touch') {\n menuRef.current?.openMenu?.();\n }\n },\n }}\n />\n );\n}\n","import { MenuItem } from '@szhsin/react-menu';\nimport { cloneElement } from 'preact';\n\nimport Menu2 from './menu2';\nimport SubMenu2 from './submenu2';\n\nfunction MenuConfirm({\n subMenu = false,\n confirm = true,\n confirmLabel,\n menuItemClassName,\n menuFooter,\n menuExtras,\n ...props\n}) {\n const { children, onClick, ...restProps } = props;\n if (!confirm) {\n if (subMenu) return <MenuItem {...props} />;\n if (onClick) {\n return cloneElement(children, {\n onClick,\n });\n }\n return children;\n }\n const Parent = subMenu ? SubMenu2 : Menu2;\n return (\n <Parent\n openTrigger=\"clickOnly\"\n direction=\"bottom\"\n overflow=\"auto\"\n gap={-8}\n shift={8}\n menuClassName=\"menu-emphasized\"\n {...restProps}\n menuButton={subMenu ? undefined : children}\n label={subMenu ? children : undefined}\n >\n <MenuItem className={menuItemClassName} onClick={onClick}>\n {confirmLabel}\n </MenuItem>\n {menuExtras}\n {menuFooter}\n </Parent>\n );\n}\n\nexport default MenuConfirm;\n","export default function CustomEmoji({ staticUrl, alt, url }) {\n return (\n <picture>\n {staticUrl && (\n <source srcset={staticUrl} media=\"(prefers-reduced-motion: reduce)\" />\n )}\n <img\n key={alt || url}\n src={url}\n alt={alt}\n class=\"shortcode-emoji emoji\"\n width=\"16\"\n height=\"16\"\n loading=\"lazy\"\n decoding=\"async\"\n />\n </picture>\n );\n}\n","import { memo } from 'preact/compat';\n\nimport CustomEmoji from './custom-emoji';\n\nfunction EmojiText({ text, emojis }) {\n if (!text) return '';\n if (!emojis?.length) return text;\n if (text.indexOf(':') === -1) return text;\n const regex = new RegExp(\n `:(${emojis.map((e) => e.shortcode).join('|')}):`,\n 'g',\n );\n const elements = text.split(regex).map((word) => {\n const emoji = emojis.find((e) => e.shortcode === word);\n if (emoji) {\n const { url, staticUrl } = emoji;\n return <CustomEmoji staticUrl={staticUrl} alt={word} url={url} />;\n }\n return word;\n });\n return elements;\n}\n\nexport default memo(\n EmojiText,\n (oldProps, newProps) =>\n oldProps.text === newProps.text &&\n oldProps.emojis?.length === newProps.emojis?.length,\n);\n","import './name-text.css';\n\nimport { memo } from 'preact/compat';\n\nimport states from '../utils/states';\n\nimport Avatar from './avatar';\nimport EmojiText from './emoji-text';\n\nconst nameCollator = new Intl.Collator('en', {\n sensitivity: 'base',\n});\n\nfunction NameText({\n account,\n instance,\n showAvatar,\n showAcct,\n short,\n external,\n onClick,\n}) {\n const { acct, avatar, avatarStatic, id, url, displayName, emojis, bot } =\n account;\n let { username } = account;\n const [_, acct1, acct2] = acct.match(/([^@]+)(@.+)/i) || [, acct];\n\n const trimmedUsername = username.toLowerCase().trim();\n const trimmedDisplayName = (displayName || '').toLowerCase().trim();\n const shortenedDisplayName = trimmedDisplayName\n .replace(/(\\:(\\w|\\+|\\-)+\\:)(?=|[\\!\\.\\?]|$)/g, '') // Remove shortcodes, regex from https://regex101.com/r/iE9uV0/1\n .replace(/\\s+/g, ''); // E.g. \"My name\" === \"myname\"\n const shortenedAlphaNumericDisplayName = shortenedDisplayName.replace(\n /[^a-z0-9@\\.]/gi,\n '',\n ); // Remove non-alphanumeric characters\n\n if (\n (!short &&\n (trimmedUsername === trimmedDisplayName ||\n trimmedUsername === shortenedDisplayName ||\n trimmedUsername === shortenedAlphaNumericDisplayName ||\n nameCollator.compare(trimmedUsername, shortenedDisplayName) === 0)) ||\n shortenedAlphaNumericDisplayName === acct.toLowerCase()\n ) {\n username = null;\n }\n\n return (\n <a\n class={`name-text ${showAcct ? 'show-acct' : ''} ${short ? 'short' : ''}`}\n href={url}\n target={external ? '_blank' : null}\n title={\n displayName\n ? `${displayName} (${acct2 ? '' : '@'}${acct})`\n : `${acct2 ? '' : '@'}${acct}`\n }\n onClick={(e) => {\n if (external) return;\n if (e.shiftKey) return; // Save link? 🤷‍♂️\n e.preventDefault();\n e.stopPropagation();\n if (onClick) return onClick(e);\n if (e.metaKey || e.ctrlKey || e.shiftKey || e.which === 2) {\n const internalURL = `#/${instance}/a/${id}`;\n window.open(internalURL, '_blank');\n return;\n }\n states.showAccount = {\n account,\n instance,\n };\n }}\n >\n {showAvatar && (\n <>\n <Avatar url={avatarStatic || avatar} squircle={bot} />{' '}\n </>\n )}\n {displayName && !short ? (\n <>\n <b>\n <EmojiText text={displayName} emojis={emojis} />\n </b>\n {!showAcct && username && (\n <>\n {' '}\n <i>@{username}</i>\n </>\n )}\n </>\n ) : short ? (\n <i>{username}</i>\n ) : (\n <b>{username}</b>\n )}\n {showAcct && (\n <>\n <br />\n <i>\n {acct2 ? '' : '@'}\n {acct1}\n {!!acct2 && <span class=\"ib\">{acct2}</span>}\n </i>\n </>\n )}\n </a>\n );\n}\n\nexport default memo(NameText, (oldProps, newProps) => {\n // Only care about account.id, the other props usually don't change\n const { account } = oldProps;\n const { account: newAccount } = newProps;\n return account?.acct === newAccount?.acct;\n});\n","// Twitter-style relative time component\n// Seconds = 1s\n// Minutes = 1m\n// Hours = 1h\n// Days = 1d\n// After 7 days, use DD/MM/YYYY or MM/DD/YYYY\nimport dayjs from 'dayjs';\nimport dayjsTwitter from 'dayjs-twitter';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport { useEffect, useMemo, useReducer } from 'preact/hooks';\n\ndayjs.extend(dayjsTwitter);\ndayjs.extend(localizedFormat);\ndayjs.extend(relativeTime);\n\nconst dtf = new Intl.DateTimeFormat();\n\nexport default function RelativeTime({ datetime, format }) {\n if (!datetime) return null;\n const [renderCount, rerender] = useReducer((x) => x + 1, 0);\n const date = useMemo(() => dayjs(datetime), [datetime]);\n const [dateStr, dt, title] = useMemo(() => {\n if (!date.isValid()) return ['' + datetime, '', ''];\n let str;\n if (format === 'micro') {\n // If date <= 1 day ago or day is within this year\n const now = dayjs();\n const dayDiff = now.diff(date, 'day');\n if (dayDiff <= 1 || now.year() === date.year()) {\n str = date.twitter();\n } else {\n str = dtf.format(date.toDate());\n }\n }\n if (!str) str = date.fromNow();\n return [str, date.toISOString(), date.format('LLLL')];\n }, [date, format, renderCount]);\n\n useEffect(() => {\n if (!date.isValid()) return;\n let timeout;\n let raf;\n function rafRerender() {\n raf = requestAnimationFrame(() => {\n rerender();\n scheduleRerender();\n });\n }\n function scheduleRerender() {\n // If less than 1 minute, rerender every 10s\n // If less than 1 hour rerender every 1m\n // Else, don't need to rerender\n if (date.diff(dayjs(), 'minute', true) < 1) {\n timeout = setTimeout(rafRerender, 10_000);\n } else if (date.diff(dayjs(), 'hour', true) < 1) {\n timeout = setTimeout(rafRerender, 60_000);\n }\n }\n scheduleRerender();\n return () => {\n clearTimeout(timeout);\n cancelAnimationFrame(raf);\n };\n }, []);\n\n return (\n <time datetime={dt} title={title}>\n {dateStr}\n </time>\n );\n}\n","import { match } from '@formatjs/intl-localematcher';\n\nimport mem from './mem';\n\nfunction _localeMatch(...args) {\n // Wrap in try/catch because localeMatcher throws on invalid locales\n try {\n return match(...args);\n } catch (e) {\n const defaultLocale = args[2];\n return defaultLocale || false;\n }\n}\nconst localeMatch = mem(_localeMatch);\n\nexport default localeMatch;\n","import translationTargetLanguages from '../data/lingva-target-languages';\n\nimport localeMatch from './locale-match';\nimport states from './states';\n\nconst locales = [\n new Intl.DateTimeFormat().resolvedOptions().locale,\n ...navigator.languages,\n];\n\nconst localeTargetLanguages = localeMatch(\n locales,\n translationTargetLanguages.map((l) => l.code.replace('_', '-')), // The underscore will fail Intl.Locale inside `match`\n 'en',\n);\n\nfunction getTranslateTargetLanguage(fromSettings = false) {\n if (fromSettings) {\n const { contentTranslationTargetLanguage } = states.settings;\n if (contentTranslationTargetLanguage) {\n return contentTranslationTargetLanguage;\n }\n }\n return localeTargetLanguages;\n}\n\nexport default getTranslateTargetLanguage;\n","import mem from './mem';\n\nconst IntlDN = new Intl.DisplayNames(navigator.languages, {\n type: 'language',\n});\n\nfunction _localeCode2Text(code) {\n try {\n return IntlDN.of(code);\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n\nexport default mem(_localeCode2Text);\n","function emojifyText(text, emojis = []) {\n if (!text) return '';\n if (!emojis.length) return text;\n if (text.indexOf(':') === -1) return text;\n // Replace shortcodes in text with emoji\n // emojis = [{ shortcode: 'smile', url: 'https://example.com/emoji.png' }]\n emojis.forEach((emoji) => {\n const { shortcode, staticUrl, url } = emoji;\n text = text.replace(\n new RegExp(`:${shortcode}:`, 'g'),\n `<picture><source srcset=\"${staticUrl}\" media=\"(prefers-reduced-motion: reduce)\"></source><img class=\"shortcode-emoji emoji\" src=\"${url}\" alt=\":${shortcode}:\" width=\"16\" height=\"16\" loading=\"lazy\" decoding=\"async\" /></picture>`,\n );\n });\n // console.log(text, emojis);\n return text;\n}\n\nexport default emojifyText;\n","import emojifyText from './emojify-text';\nimport mem from './mem';\n\nconst fauxDiv = document.createElement('div');\nconst whitelistLinkClasses = ['u-url', 'mention', 'hashtag'];\n\nfunction _enhanceContent(content, opts = {}) {\n const { emojis, postEnhanceDOM = () => {} } = opts;\n let enhancedContent = content;\n const dom = document.createElement('div');\n dom.innerHTML = enhancedContent;\n const hasLink = /<a/i.test(enhancedContent);\n const hasCodeBlock = enhancedContent.includes('```');\n\n if (hasLink) {\n // Add target=\"_blank\" to all links with no target=\"_blank\"\n // E.g. `note` in `account`\n const noTargetBlankLinks = dom.querySelectorAll('a:not([target=\"_blank\"])');\n noTargetBlankLinks.forEach((link) => {\n link.setAttribute('target', '_blank');\n });\n\n // Remove all classes except `u-url`, `mention`, `hashtag`\n const links = dom.querySelectorAll('a[class]');\n links.forEach((link) => {\n link.classList.forEach((c) => {\n if (!whitelistLinkClasses.includes(c)) {\n link.classList.remove(c);\n }\n });\n });\n }\n\n // Add 'has-url-text' to all links that contains a url\n if (hasLink) {\n const links = dom.querySelectorAll('a[href]');\n links.forEach((link) => {\n if (/^https?:\\/\\//i.test(link.textContent.trim())) {\n link.classList.add('has-url-text');\n shortenLink(link);\n }\n });\n }\n\n // Spanify un-spanned mentions\n if (hasLink) {\n const links = dom.querySelectorAll('a[href]');\n const usernames = [];\n links.forEach((link) => {\n const text = link.innerText.trim();\n const hasChildren = link.querySelector('*');\n // If text looks like @username@domain, then it's a mention\n if (/^@[^@]+(@[^@]+)?$/g.test(text)) {\n // Only show @username\n const [_, username, domain] = text.split('@');\n if (!hasChildren) {\n if (\n !usernames.some(([u]) => u === username) ||\n usernames.some(([u, d]) => u === username && d === domain)\n ) {\n link.innerHTML = `@<span>${username}</span>`;\n usernames.push([username, domain]);\n } else {\n link.innerHTML = `@<span>${username}@${domain}</span>`;\n }\n }\n link.classList.add('mention');\n }\n // If text looks like #hashtag, then it's a hashtag\n if (/^#[^#]+$/g.test(text)) {\n if (!hasChildren) link.innerHTML = `#<span>${text.slice(1)}</span>`;\n link.classList.add('mention', 'hashtag');\n }\n });\n }\n\n // EMOJIS\n // ======\n // Convert :shortcode: to <img />\n let textNodes;\n if (enhancedContent.includes(':')) {\n textNodes = extractTextNodes(dom);\n textNodes.forEach((node) => {\n let html = node.nodeValue\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n if (emojis) {\n html = emojifyText(html, emojis);\n }\n fauxDiv.innerHTML = html;\n // const nodes = [...fauxDiv.childNodes];\n node.replaceWith(...fauxDiv.childNodes);\n });\n }\n\n // CODE BLOCKS\n // ===========\n // Convert ```code``` to <pre><code>code</code></pre>\n if (hasCodeBlock) {\n const blocks = [...dom.querySelectorAll('p')].filter((p) =>\n /^```[^]+```$/g.test(p.innerText.trim()),\n );\n blocks.forEach((block) => {\n const pre = document.createElement('pre');\n // Replace <br /> with newlines\n block.querySelectorAll('br').forEach((br) => br.replaceWith('\\n'));\n pre.innerHTML = `<code>${block.innerHTML.trim()}</code>`;\n block.replaceWith(pre);\n });\n }\n\n // Convert multi-paragraph code blocks to <pre><code>code</code></pre>\n if (hasCodeBlock) {\n const paragraphs = [...dom.querySelectorAll('p')];\n // Filter out paragraphs with ``` in beginning only\n const codeBlocks = paragraphs.filter((p) => /^```/g.test(p.innerText));\n // For each codeBlocks, get all paragraphs until the last paragraph with ``` at the end only\n codeBlocks.forEach((block) => {\n const nextParagraphs = [block];\n let hasCodeBlock = false;\n let currentBlock = block;\n while (currentBlock.nextElementSibling) {\n const next = currentBlock.nextElementSibling;\n if (next && next.tagName === 'P') {\n if (/```$/g.test(next.innerText)) {\n nextParagraphs.push(next);\n hasCodeBlock = true;\n break;\n } else {\n nextParagraphs.push(next);\n }\n } else {\n break;\n }\n currentBlock = next;\n }\n if (hasCodeBlock) {\n const pre = document.createElement('pre');\n nextParagraphs.forEach((p) => {\n // Replace <br /> with newlines\n p.querySelectorAll('br').forEach((br) => br.replaceWith('\\n'));\n });\n const codeText = nextParagraphs.map((p) => p.innerHTML).join('\\n\\n');\n pre.innerHTML = `<code tabindex=\"0\">${codeText}</code>`;\n block.replaceWith(pre);\n nextParagraphs.forEach((p) => p.remove());\n }\n });\n }\n\n // INLINE CODE\n // ===========\n // Convert `code` to <code>code</code>\n if (enhancedContent.includes('`')) {\n textNodes = extractTextNodes(dom);\n textNodes.forEach((node) => {\n let html = node.nodeValue\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n if (/`[^`]+`/g.test(html)) {\n html = html.replaceAll(/(`[^]+?`)/g, '<code>$1</code>');\n }\n fauxDiv.innerHTML = html;\n // const nodes = [...fauxDiv.childNodes];\n node.replaceWith(...fauxDiv.childNodes);\n });\n }\n\n // TWITTER USERNAMES\n // =================\n // Convert @username@twitter.com to <a href=\"https://twitter.com/username\">@username@twitter.com</a>\n if (/twitter\\.com/i.test(enhancedContent)) {\n textNodes = extractTextNodes(dom, {\n rejectFilter: ['A'],\n });\n textNodes.forEach((node) => {\n let html = node.nodeValue\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n if (/@[a-zA-Z0-9_]+@twitter\\.com/g.test(html)) {\n html = html.replaceAll(\n /(@([a-zA-Z0-9_]+)@twitter\\.com)/g,\n '<a href=\"https://twitter.com/$2\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">$1</a>',\n );\n }\n fauxDiv.innerHTML = html;\n // const nodes = [...fauxDiv.childNodes];\n node.replaceWith(...fauxDiv.childNodes);\n });\n }\n\n // HASHTAG STUFFING\n // ================\n // Get the <p> that contains a lot of hashtags, add a class to it\n if (enhancedContent.includes('#')) {\n let prevIndex = null;\n const hashtagStuffedParagraphs = [...dom.querySelectorAll('p')].filter(\n (p, index) => {\n let hashtagCount = 0;\n for (let i = 0; i < p.childNodes.length; i++) {\n const node = p.childNodes[i];\n\n if (node.nodeType === Node.TEXT_NODE) {\n const text = node.textContent.trim();\n if (text !== '') {\n return false;\n }\n } else if (node.tagName === 'BR') {\n // Ignore <br />\n } else if (node.tagName === 'A') {\n const linkText = node.textContent.trim();\n if (!linkText || !linkText.startsWith('#')) {\n return false;\n } else {\n hashtagCount++;\n }\n } else {\n return false;\n }\n }\n // Only consider \"stuffing\" if:\n // - there are more than 3 hashtags\n // - there are more than 1 hashtag in adjacent paragraphs\n if (hashtagCount > 3) {\n prevIndex = index;\n return true;\n }\n if (hashtagCount > 1 && prevIndex && index === prevIndex + 1) {\n prevIndex = index;\n return true;\n }\n },\n );\n if (hashtagStuffedParagraphs?.length) {\n hashtagStuffedParagraphs.forEach((p) => {\n p.classList.add('hashtag-stuffing');\n p.title = p.innerText;\n });\n }\n }\n\n // ADD ASPECT RATIO TO ALL IMAGES\n if (enhancedContent.includes('<img')) {\n dom.querySelectorAll('img').forEach((img) => {\n const width = img.getAttribute('width') || img.naturalWidth;\n const height = img.getAttribute('height') || img.naturalHeight;\n if (width && height) {\n img.style.setProperty('--original-aspect-ratio', `${width}/${height}`);\n }\n });\n }\n\n if (postEnhanceDOM) {\n queueMicrotask(() => postEnhanceDOM(dom));\n // postEnhanceDOM(dom); // mutate dom\n }\n\n enhancedContent = dom.innerHTML;\n\n return enhancedContent;\n}\nconst enhanceContent = mem(_enhanceContent);\n\nconst defaultRejectFilter = [\n // Document metadata\n 'STYLE',\n // Image and multimedia\n 'IMG',\n 'VIDEO',\n 'AUDIO',\n 'AREA',\n 'MAP',\n 'TRACK',\n // Embedded content\n 'EMBED',\n 'IFRAME',\n 'OBJECT',\n 'PICTURE',\n 'PORTAL',\n 'SOURCE',\n // SVG and MathML\n 'SVG',\n 'MATH',\n // Scripting\n 'CANVAS',\n 'NOSCRIPT',\n 'SCRIPT',\n // Forms\n 'INPUT',\n 'OPTION',\n 'TEXTAREA',\n // Web Components\n 'SLOT',\n 'TEMPLATE',\n];\nconst defaultRejectFilterMap = Object.fromEntries(\n defaultRejectFilter.map((nodeName) => [nodeName, true]),\n);\n\nconst URL_PREFIX_REGEX = /^(https?:\\/\\/(www\\.)?|xmpp:)/;\nconst URL_DISPLAY_LENGTH = 30;\n// Similar to https://github.com/mastodon/mastodon/blob/1666b1955992e16f4605b414c6563ca25b3a3f18/app/lib/text_formatter.rb#L54-L69\nfunction shortenLink(link) {\n if (!link || link.querySelector?.('*')) {\n return;\n }\n try {\n const url = link.innerText.trim();\n const prefix = (url.match(URL_PREFIX_REGEX) || [])[0] || '';\n if (!prefix) return;\n const displayURL = url.slice(\n prefix.length,\n prefix.length + URL_DISPLAY_LENGTH,\n );\n const suffix = url.slice(prefix.length + URL_DISPLAY_LENGTH);\n const cutoff = url.slice(prefix.length).length > URL_DISPLAY_LENGTH;\n link.innerHTML = `<span class=\"invisible\">${prefix}</span><span class=${\n cutoff ? 'ellipsis' : ''\n }>${displayURL}</span><span class=\"invisible\">${suffix}</span>`;\n } catch (e) {}\n}\n\nfunction extractTextNodes(dom, opts = {}) {\n const textNodes = [];\n const rejectFilterMap = Object.assign(\n {},\n defaultRejectFilterMap,\n opts.rejectFilter?.reduce((acc, cur) => {\n acc[cur] = true;\n return acc;\n }, {}),\n );\n const walk = document.createTreeWalker(\n dom,\n NodeFilter.SHOW_TEXT,\n {\n acceptNode(node) {\n if (rejectFilterMap[node.parentNode.nodeName]) {\n return NodeFilter.FILTER_REJECT;\n }\n return NodeFilter.FILTER_ACCEPT;\n },\n },\n false,\n );\n let node;\n while ((node = walk.nextNode())) {\n textNodes.push(node);\n }\n return textNodes;\n}\n\nexport default enhanceContent;\n","import mem from './mem';\n\nconst div = document.createElement('div');\nfunction getHTMLText(html, opts) {\n if (!html) return '';\n const { preProcess } = opts || {};\n\n div.innerHTML = html\n .replace(/<\\/p>/g, '</p>\\n\\n')\n .replace(/<\\/li>/g, '</li>\\n');\n div.querySelectorAll('br').forEach((br) => {\n br.replaceWith('\\n');\n });\n\n preProcess?.(div);\n\n // MASTODON-SPECIFIC classes\n // Remove .invisible\n div.querySelectorAll('.invisible').forEach((el) => {\n el.remove();\n });\n // Add … at end of .ellipsis\n div.querySelectorAll('.ellipsis').forEach((el) => {\n el.append('...');\n });\n\n return div.innerText.replace(/[\\r\\n]{3,}/g, '\\n\\n').trim();\n}\n\nexport default mem(getHTMLText);\n","import states from './states';\n\nfunction handleContentLinks(opts) {\n const { mentions = [], instance, previewMode, statusURL } = opts || {};\n return (e) => {\n let { target } = e;\n target = target.closest('a');\n if (!target) return;\n\n // If cmd/ctrl/shift/alt key is pressed or middle-click, let the browser handle it\n if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.which === 2) {\n return;\n }\n\n const prevText = target.previousSibling?.textContent;\n const textBeforeLinkIsAt = prevText?.endsWith('@');\n const textStartsWithAt = target.innerText.startsWith('@');\n if (\n ((target.classList.contains('u-url') ||\n target.classList.contains('mention')) &&\n textStartsWithAt) ||\n (textBeforeLinkIsAt && !textStartsWithAt)\n ) {\n const targetText = (\n target.querySelector('span') || target\n ).innerText.trim();\n const username = targetText.replace(/^@/, '');\n const url = target.getAttribute('href');\n // Only fallback to acct/username check if url doesn't match\n const mention =\n mentions.find((mention) => mention.url === url) ||\n mentions.find(\n (mention) =>\n mention.acct === username || mention.username === username,\n );\n console.warn('MENTION', mention, url);\n if (mention) {\n e.preventDefault();\n e.stopPropagation();\n states.showAccount = {\n account: mention.acct,\n instance,\n };\n } else if (!/^http/i.test(targetText)) {\n console.log('mention not found', targetText);\n e.preventDefault();\n e.stopPropagation();\n const href = target.getAttribute('href');\n states.showAccount = {\n account: href,\n instance,\n };\n }\n } else if (!previewMode) {\n const textBeforeLinkIsHash = prevText?.endsWith('#');\n if (target.classList.contains('hashtag') || textBeforeLinkIsHash) {\n e.preventDefault();\n e.stopPropagation();\n const tag = target.innerText.replace(/^#/, '').trim();\n const hashURL = instance ? `#/${instance}/t/${tag}` : `#/t/${tag}`;\n console.log({ hashURL });\n location.hash = hashURL;\n } else if (\n states.unfurledLinks[target.href]?.url &&\n statusURL !== target.href\n ) {\n // If unfurled AND not self-referential\n e.preventDefault();\n e.stopPropagation();\n states.prevLocation = {\n pathname: location.hash.replace(/^#/, ''),\n };\n location.hash = `#${states.unfurledLinks[target.href].url}`;\n }\n }\n };\n}\n\nexport default handleContentLinks;\n","import mem from './mem';\n\nconst { locale } = new Intl.DateTimeFormat().resolvedOptions();\n\nconst _DateTimeFormat = (opts) => {\n const { dateYear, hideTime, formatOpts } = opts || {};\n const currentYear = new Date().getFullYear();\n return Intl.DateTimeFormat(locale, {\n // Show year if not current year\n year: dateYear === currentYear ? undefined : 'numeric',\n month: 'short',\n day: 'numeric',\n // Hide time if requested\n hour: hideTime ? undefined : 'numeric',\n minute: hideTime ? undefined : 'numeric',\n ...formatOpts,\n });\n};\nconst DateTimeFormat = mem(_DateTimeFormat);\n\nfunction niceDateTime(date, dtfOpts) {\n if (!(date instanceof Date)) {\n date = new Date(date);\n }\n const DTF = DateTimeFormat({\n dateYear: date.getFullYear(),\n ...dtfOpts,\n });\n const dateText = DTF.format(date);\n return dateText;\n}\n\nexport default niceDateTime;\n","const { locale } = Intl.NumberFormat().resolvedOptions();\nconst shortenNumber = Intl.NumberFormat(locale, {\n notation: 'compact',\n roundingMode: 'floor',\n}).format;\nexport default shortenNumber;\n","import openOSK from './open-osk';\nimport showToast from './show-toast';\nimport states from './states';\n\nconst TOAST_DURATION = 5_000; // 5 seconds\n\nexport default function showCompose(opts) {\n if (!opts) opts = true;\n\n if (states.showCompose) {\n if (states.composerState.minimized) {\n showToast({\n duration: TOAST_DURATION,\n text: `A draft post is currently minimized. Post or discard it before creating a new one.`,\n });\n } else {\n showToast({\n duration: TOAST_DURATION,\n text: `A post is currently open. Post or discard it before creating a new one.`,\n });\n }\n return;\n }\n\n openOSK();\n states.showCompose = opts;\n}\n","import { satisfies } from 'compare-versions';\n\nimport features from '../data/features.json';\n\nimport { getCurrentInstance } from './store-utils';\n\n// Non-semver(?) UA string detection\nconst containPixelfed = /pixelfed/i;\nconst notContainPixelfed = /^(?!.*pixelfed).*$/i;\nconst platformFeatures = {\n '@mastodon/lists': notContainPixelfed,\n '@mastodon/filters': notContainPixelfed,\n '@mastodon/mentions': notContainPixelfed,\n '@mastodon/trending-hashtags': notContainPixelfed,\n '@mastodon/trending-links': notContainPixelfed,\n '@mastodon/post-bookmark': notContainPixelfed,\n '@mastodon/post-edit': notContainPixelfed,\n '@mastodon/profile-edit': notContainPixelfed,\n '@mastodon/profile-private-note': notContainPixelfed,\n '@pixelfed/trending': containPixelfed,\n '@pixelfed/home-include-reblogs': containPixelfed,\n};\nconst supportsCache = {};\n\nfunction supports(feature) {\n try {\n const { version, domain } = getCurrentInstance();\n const key = `${domain}-${feature}`;\n if (supportsCache[key]) return supportsCache[key];\n\n if (platformFeatures[feature]) {\n return (supportsCache[key] = platformFeatures[feature].test(version));\n }\n\n const range = features[feature];\n if (!range) return false;\n return (supportsCache[key] = satisfies(version, range, {\n includePrerelease: true,\n loose: true,\n }));\n } catch (e) {\n return false;\n }\n}\n\nexport default supports;\n","import './account-block.css';\n\n// import { useNavigate } from 'react-router-dom';\nimport enhanceContent from '../utils/enhance-content';\nimport niceDateTime from '../utils/nice-date-time';\nimport shortenNumber from '../utils/shorten-number';\nimport states from '../utils/states';\n\nimport Avatar from './avatar';\nimport EmojiText from './emoji-text';\nimport Icon from './icon';\n\nfunction AccountBlock({\n skeleton,\n account,\n avatarSize = 'xl',\n useAvatarStatic = false,\n instance,\n external,\n internal,\n onClick,\n showActivity = false,\n showStats = false,\n accountInstance,\n hideDisplayName = false,\n relationship = {},\n excludeRelationshipAttrs = [],\n}) {\n if (skeleton) {\n return (\n <div class=\"account-block skeleton\">\n <Avatar size={avatarSize} />\n <span>\n <b>████████</b>\n <br />\n <span class=\"account-block-acct\">██████</span>\n </span>\n </div>\n );\n }\n\n if (!account) {\n return null;\n }\n\n // const navigate = useNavigate();\n\n const {\n id,\n acct,\n avatar,\n avatarStatic,\n displayName,\n username,\n emojis,\n url,\n statusesCount,\n lastStatusAt,\n bot,\n fields,\n note,\n group,\n followersCount,\n createdAt,\n locked,\n } = account;\n let [_, acct1, acct2] = acct.match(/([^@]+)(@.+)/i) || [, acct];\n if (accountInstance) {\n acct2 = `@${accountInstance}`;\n }\n\n const verifiedField = fields?.find((f) => !!f.verifiedAt && !!f.value);\n\n const excludedRelationship = {};\n for (const r in relationship) {\n if (!excludeRelationshipAttrs.includes(r)) {\n excludedRelationship[r] = relationship[r];\n }\n }\n const hasRelationship =\n excludedRelationship.following ||\n excludedRelationship.followedBy ||\n excludedRelationship.requested;\n\n return (\n <a\n class=\"account-block\"\n href={url}\n target={external ? '_blank' : null}\n title={acct2 ? acct : `@${acct}`}\n onClick={(e) => {\n if (external) return;\n e.preventDefault();\n if (onClick) return onClick(e);\n if (internal) {\n // navigate(`/${instance}/a/${id}`);\n location.hash = `/${instance}/a/${id}`;\n } else {\n states.showAccount = {\n account,\n instance,\n };\n }\n }}\n >\n <Avatar\n url={useAvatarStatic ? avatarStatic : avatar || avatarStatic}\n size={avatarSize}\n squircle={bot}\n />\n <span class=\"account-block-content\">\n {!hideDisplayName && (\n <>\n {displayName ? (\n <b>\n <EmojiText text={displayName} emojis={emojis} />\n </b>\n ) : (\n <b>{username}</b>\n )}\n </>\n )}{' '}\n <span class=\"account-block-acct\">\n {acct2 ? '' : '@'}\n {acct1}\n <wbr />\n {acct2}\n {locked && (\n <>\n {' '}\n <Icon icon=\"lock\" size=\"s\" alt=\"Locked\" />\n </>\n )}\n </span>\n {showActivity && (\n <div class=\"account-block-stats\">\n Posts: {shortenNumber(statusesCount)}\n {!!lastStatusAt && (\n <>\n {' '}\n &middot; Last posted:{' '}\n {niceDateTime(lastStatusAt, {\n hideTime: true,\n })}\n </>\n )}\n </div>\n )}\n {showStats && (\n <div class=\"account-block-stats\">\n {bot && (\n <>\n <span class=\"tag collapsed\">\n <Icon icon=\"bot\" /> Automated\n </span>\n </>\n )}\n {!!group && (\n <>\n <span class=\"tag collapsed\">\n <Icon icon=\"group\" /> Group\n </span>\n </>\n )}\n {hasRelationship && (\n <div key={relationship.id} class=\"shazam-container-horizontal\">\n <div class=\"shazam-container-inner\">\n {excludedRelationship.following &&\n excludedRelationship.followedBy ? (\n <span class=\"tag minimal\">Mutual</span>\n ) : excludedRelationship.requested ? (\n <span class=\"tag minimal\">Requested</span>\n ) : excludedRelationship.following ? (\n <span class=\"tag minimal\">Following</span>\n ) : excludedRelationship.followedBy ? (\n <span class=\"tag minimal\">Follows you</span>\n ) : null}\n </div>\n </div>\n )}\n {!!followersCount && (\n <span class=\"ib\">\n {shortenNumber(followersCount)}{' '}\n {followersCount === 1 ? 'follower' : 'followers'}\n </span>\n )}\n {!!verifiedField && (\n <span class=\"verified-field\">\n <Icon icon=\"check-circle\" size=\"s\" />{' '}\n <span\n dangerouslySetInnerHTML={{\n __html: enhanceContent(verifiedField.value, { emojis }),\n }}\n />\n </span>\n )}\n {!bot &&\n !group &&\n !hasRelationship &&\n !followersCount &&\n !verifiedField &&\n !!createdAt && (\n <span class=\"created-at\">\n Joined{' '}\n <time datetime={createdAt}>\n {niceDateTime(createdAt, {\n hideTime: true,\n })}\n </time>\n </span>\n )}\n </div>\n )}\n </span>\n </a>\n );\n}\n\nexport default AccountBlock;\n","import { FocusableItem } from '@szhsin/react-menu';\n\nimport Link from './link';\n\nfunction MenuLink(props) {\n const { className, disabled, ...restProps } = props;\n return (\n <FocusableItem className={className} disabled={disabled}>\n {({ ref, closeMenu }) => (\n <Link\n {...restProps}\n ref={ref}\n onClick={({ detail }) =>\n closeMenu(detail === 0 ? 'Enter' : undefined)\n }\n />\n )}\n </FocusableItem>\n );\n}\n\nexport default MenuLink;\n","/*\n Rendered but hidden. Only show when visible\n*/\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { useInView } from 'react-intersection-observer';\n\n// The sticky header, usually at the top\nconst TOP = 48;\n\nconst shazamIDs = {};\n\nexport default function LazyShazam({ id, children }) {\n const containerRef = useRef();\n const hasID = !!shazamIDs[id];\n const [visible, setVisible] = useState(false);\n const [visibleStart, setVisibleStart] = useState(hasID || false);\n\n const { ref } = useInView({\n root: null,\n rootMargin: `-${TOP}px 0px 0px 0px`,\n trackVisibility: true,\n delay: 1000,\n onChange: (inView) => {\n if (inView) {\n setVisible(true);\n if (id) shazamIDs[id] = true;\n }\n },\n triggerOnce: true,\n skip: visibleStart || visible,\n });\n\n useEffect(() => {\n if (!containerRef.current) return;\n const rect = containerRef.current.getBoundingClientRect();\n if (rect.bottom > TOP) {\n if (rect.top < window.innerHeight) {\n setVisible(true);\n } else {\n setVisibleStart(true);\n }\n if (id) shazamIDs[id] = true;\n }\n }, []);\n\n if (visibleStart) return children;\n\n return (\n <div\n ref={containerRef}\n class=\"shazam-container no-animation\"\n hidden={!visible}\n >\n <div ref={ref} class=\"shazam-container-inner\">\n {children}\n </div>\n </div>\n );\n}\n","import './translation-block.css';\n\nimport pRetry from 'p-retry';\nimport pThrottle from 'p-throttle';\nimport { useEffect, useRef, useState } from 'preact/hooks';\n\nimport sourceLanguages from '../data/lingva-source-languages';\nimport getTranslateTargetLanguage from '../utils/get-translate-target-language';\nimport localeCode2Text from '../utils/localeCode2Text';\nimport pmem from '../utils/pmem';\n\nimport Icon from './icon';\nimport LazyShazam from './lazy-shazam';\nimport Loader from './loader';\n\nconst { PHANPY_LINGVA_INSTANCES } = import.meta.env;\nconst LINGVA_INSTANCES = PHANPY_LINGVA_INSTANCES\n ? PHANPY_LINGVA_INSTANCES.split(/\\s+/)\n : [];\n\nconst throttle = pThrottle({\n limit: 1,\n interval: 2000,\n});\n\nlet currentLingvaInstance = 0;\n\nfunction _lingvaTranslate(text, source, target) {\n console.log('TRANSLATE', text, source, target);\n const fetchCall = () => {\n let instance = LINGVA_INSTANCES[currentLingvaInstance];\n return fetch(\n `https://${instance}/api/v1/${source}/${target}/${encodeURIComponent(\n text,\n )}`,\n )\n .then((res) => {\n if (!res.ok) throw new Error(res.statusText);\n return res.json();\n })\n .then((res) => {\n return {\n provider: 'lingva',\n content: res.translation,\n detectedSourceLanguage: res.info?.detectedSource,\n info: res.info,\n };\n });\n };\n return pRetry(fetchCall, {\n retries: 3,\n onFailedAttempt: (e) => {\n currentLingvaInstance =\n (currentLingvaInstance + 1) % LINGVA_INSTANCES.length;\n console.log(\n 'Retrying translation with another instance',\n currentLingvaInstance,\n );\n },\n });\n // return masto.v1.statuses.$select(id).translate({\n // lang: DEFAULT_LANG,\n // });\n}\nconst TRANSLATED_MAX_AGE = 1000 * 60 * 60; // 1 hour\nconst lingvaTranslate = pmem(_lingvaTranslate, {\n maxAge: TRANSLATED_MAX_AGE,\n});\nconst throttledLingvaTranslate = pmem(throttle(lingvaTranslate), {\n // I know, this is double-layered memoization\n maxAge: TRANSLATED_MAX_AGE,\n});\n\nfunction TranslationBlock({\n forceTranslate,\n sourceLanguage,\n onTranslate,\n text = '',\n mini,\n autoDetected,\n}) {\n const targetLang = getTranslateTargetLanguage(true);\n const [uiState, setUIState] = useState('default');\n const [pronunciationContent, setPronunciationContent] = useState(null);\n const [translatedContent, setTranslatedContent] = useState(null);\n const [detectedLang, setDetectedLang] = useState(null);\n const detailsRef = useRef();\n\n const sourceLangText = sourceLanguage\n ? localeCode2Text(sourceLanguage)\n : null;\n const targetLangText = localeCode2Text(targetLang);\n const apiSourceLang = useRef('auto');\n\n if (!onTranslate) {\n onTranslate = mini ? throttledLingvaTranslate : lingvaTranslate;\n }\n\n const translate = async () => {\n setUIState('loading');\n try {\n const { content, detectedSourceLanguage, provider, error, ...props } =\n await onTranslate(text, apiSourceLang.current, targetLang);\n if (content) {\n if (detectedSourceLanguage) {\n const detectedLangText = localeCode2Text(detectedSourceLanguage);\n setDetectedLang(detectedLangText);\n }\n if (provider === 'lingva') {\n const pronunciation = props?.info?.pronunciation?.query;\n if (pronunciation) {\n setPronunciationContent(pronunciation);\n }\n }\n setTranslatedContent(content);\n setUIState('default');\n if (!mini && content.trim() !== text.trim()) {\n detailsRef.current.open = true;\n detailsRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n });\n }\n } else {\n if (error) console.error(error);\n setUIState('error');\n }\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n };\n\n useEffect(() => {\n if (forceTranslate) {\n translate();\n }\n }, [forceTranslate]);\n\n if (mini) {\n if (\n !!translatedContent &&\n translatedContent.trim() !== text.trim() &&\n detectedLang !== targetLangText\n ) {\n return (\n <LazyShazam>\n <div class=\"status-translation-block-mini\">\n <Icon\n icon=\"translate\"\n alt={`Auto-translated from ${sourceLangText}`}\n />\n <output\n lang={targetLang}\n dir=\"auto\"\n title={pronunciationContent || ''}\n >\n {translatedContent}\n </output>\n </div>\n </LazyShazam>\n );\n }\n return null;\n }\n\n return (\n <div\n class=\"status-translation-block\"\n onClick={(e) => {\n e.preventDefault();\n }}\n >\n <details ref={detailsRef}>\n <summary>\n <button\n type=\"button\"\n onClick={async (e) => {\n e.preventDefault();\n e.stopPropagation();\n detailsRef.current.open = !detailsRef.current.open;\n if (uiState === 'loading') return;\n if (!translatedContent) translate();\n }}\n >\n <Icon icon=\"translate\" />{' '}\n <span>\n {uiState === 'loading'\n ? 'Translating…'\n : sourceLanguage && sourceLangText && !detectedLang\n ? autoDetected\n ? `Translate from ${sourceLangText} (auto-detected)`\n : `Translate from ${sourceLangText}`\n : `Translate`}\n </span>\n </button>\n </summary>\n <div class=\"translated-block\">\n <div class=\"translation-info insignificant\">\n <select\n class=\"translated-source-select\"\n disabled={uiState === 'loading'}\n onChange={(e) => {\n apiSourceLang.current = e.target.value;\n translate();\n }}\n >\n {sourceLanguages.map((l) => (\n <option value={l.code}>\n {l.code === 'auto' ? `Auto (${detectedLang ?? '…'})` : l.name}\n </option>\n ))}\n </select>{' '}\n <span>→ {targetLangText}</span>\n <Loader abrupt hidden={uiState !== 'loading'} />\n </div>\n {uiState === 'error' ? (\n <p class=\"ui-state\">Failed to translate</p>\n ) : (\n !!translatedContent && (\n <>\n <output class=\"translated-content\" lang={targetLang} dir=\"auto\">\n {translatedContent}\n </output>\n {!!pronunciationContent && (\n <output\n class=\"translated-pronunciation-content\"\n tabIndex={-1}\n onClick={(e) => {\n e.target.classList.toggle('expand');\n }}\n >\n {pronunciationContent}\n </output>\n )}\n </>\n )\n )}\n </div>\n </details>\n </div>\n );\n}\n\nexport default LINGVA_INSTANCES?.length ? TranslationBlock : () => null;\n","import {\n clear,\n createStore,\n del,\n delMany,\n get,\n getMany,\n keys,\n set,\n} from 'idb-keyval';\n\nfunction initDB(dbName, storeName) {\n const store = createStore(dbName, storeName);\n return {\n set: (key, val) => set(key, val, store),\n get: (key) => get(key, store),\n getMany: (keys) => getMany(keys, store),\n del: (key) => del(key, store),\n delMany: (keys) => delMany(keys, store),\n clear: () => clear(store),\n keys: () => keys(store),\n };\n}\n\nexport default {\n drafts: initDB('drafts-db', 'drafts-store'),\n catchup: initDB('catchup-db', 'catchup-store'),\n};\n","import { api } from './api';\nimport { getCurrentAccountID } from './store-utils';\n\nexport async function fetchRelationships(accounts, relationshipsMap = {}) {\n if (!accounts?.length) return;\n const { masto } = api();\n\n const currentAccount = getCurrentAccountID();\n const uniqueAccountIds = accounts.reduce((acc, a) => {\n // 1. Ignore duplicate accounts\n // 2. Ignore accounts that are already inside relationshipsMap\n // 3. Ignore currently logged in account\n if (\n !acc.includes(a.id) &&\n !relationshipsMap[a.id] &&\n a.id !== currentAccount\n ) {\n acc.push(a.id);\n }\n return acc;\n }, []);\n if (!uniqueAccountIds.length) return null;\n\n try {\n const relationships = await masto.v1.accounts.relationships.fetch({\n id: uniqueAccountIds,\n });\n const newRelationshipsMap = relationships.reduce((acc, r) => {\n acc[r.id] = r;\n return acc;\n }, {});\n return newRelationshipsMap;\n } catch (e) {\n console.error(e);\n // It's okay to fail\n return null;\n }\n}\n","import { useState } from 'preact/hooks';\n\nimport shortenNumber from '../utils/shorten-number';\n\nimport EmojiText from './emoji-text';\nimport Icon from './icon';\nimport RelativeTime from './relative-time';\n\nexport default function Poll({\n poll,\n lang,\n readOnly,\n refresh = () => {},\n votePoll = () => {},\n}) {\n const [uiState, setUIState] = useState('default');\n const {\n expired,\n expiresAt,\n id,\n multiple,\n options,\n ownVotes,\n voted,\n votersCount,\n votesCount,\n emojis,\n } = poll;\n const expiresAtDate = !!expiresAt && new Date(expiresAt); // Update poll at point of expiry\n // NOTE: Disable this because setTimeout runs immediately if delay is too large\n // https://stackoverflow.com/a/56718027/20838\n // useEffect(() => {\n // let timeout;\n // if (!expired && expiresAtDate) {\n // const ms = expiresAtDate.getTime() - Date.now() + 1; // +1 to give it a little buffer\n // if (ms > 0) {\n // timeout = setTimeout(() => {\n // setUIState('loading');\n // (async () => {\n // // await refresh();\n // setUIState('default');\n // })();\n // }, ms);\n // }\n // }\n // return () => {\n // clearTimeout(timeout);\n // };\n // }, [expired, expiresAtDate]);\n\n const pollVotesCount = votersCount || votesCount;\n let roundPrecision = 0;\n\n if (pollVotesCount <= 1000) {\n roundPrecision = 0;\n } else if (pollVotesCount <= 10000) {\n roundPrecision = 1;\n } else if (pollVotesCount <= 100000) {\n roundPrecision = 2;\n }\n\n const [showResults, setShowResults] = useState(false);\n const optionsHaveVoteCounts = options.every((o) => o.votesCount !== null);\n\n return (\n <div\n lang={lang}\n dir=\"auto\"\n class={`poll ${readOnly ? 'read-only' : ''} ${\n uiState === 'loading' ? 'loading' : ''\n }`}\n >\n {(showResults && optionsHaveVoteCounts) || voted || expired ? (\n <>\n <div class=\"poll-options\">\n {options.map((option, i) => {\n const { title, votesCount: optionVotesCount } = option;\n const percentage = pollVotesCount\n ? ((optionVotesCount / pollVotesCount) * 100).toFixed(\n roundPrecision,\n )\n : 0; // check if current poll choice is the leading one\n\n const isLeading =\n optionVotesCount > 0 &&\n optionVotesCount ===\n Math.max(...options.map((o) => o.votesCount));\n return (\n <div\n key={`${i}-${title}-${optionVotesCount}`}\n class={`poll-option poll-result ${\n isLeading ? 'poll-option-leading' : ''\n }`}\n style={{\n '--percentage': `${percentage}%`,\n }}\n >\n <div class=\"poll-option-title\">\n <span>\n <EmojiText text={title} emojis={emojis} />\n </span>\n {voted && ownVotes.includes(i) && (\n <>\n {' '}\n <Icon icon=\"check-circle\" />\n </>\n )}\n </div>\n <div\n class=\"poll-option-votes\"\n title={`${optionVotesCount} vote${\n optionVotesCount === 1 ? '' : 's'\n }`}\n >\n {percentage}%\n </div>\n </div>\n );\n })}\n </div>\n {!expired && !voted && (\n <button\n class=\"poll-vote-button plain2\"\n disabled={uiState === 'loading'}\n onClick={(e) => {\n e.preventDefault();\n setShowResults(false);\n }}\n >\n <Icon icon=\"arrow-left\" size=\"s\" /> Hide results\n </button>\n )}\n </>\n ) : (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n const form = e.target;\n const formData = new FormData(form);\n const choices = [];\n formData.forEach((value, key) => {\n if (key === 'poll') {\n choices.push(value);\n }\n });\n if (!choices.length) return;\n setUIState('loading');\n await votePoll(choices);\n setUIState('default');\n }}\n >\n <div class=\"poll-options\">\n {options.map((option, i) => {\n const { title } = option;\n return (\n <div class=\"poll-option\">\n <label class=\"poll-label\">\n <input\n type={multiple ? 'checkbox' : 'radio'}\n name=\"poll\"\n value={i}\n disabled={uiState === 'loading'}\n readOnly={readOnly}\n />\n <span class=\"poll-option-title\">\n <EmojiText text={title} emojis={emojis} />\n </span>\n </label>\n </div>\n );\n })}\n </div>\n {!readOnly && (\n <button\n class=\"poll-vote-button\"\n type=\"submit\"\n disabled={uiState === 'loading'}\n >\n Vote\n </button>\n )}\n </form>\n )}\n <p class=\"poll-meta\">\n {!expired && !readOnly && (\n <button\n type=\"button\"\n class=\"plain small\"\n disabled={uiState === 'loading'}\n style={{\n marginLeft: -8,\n }}\n onClick={(e) => {\n e.preventDefault();\n setUIState('loading');\n\n (async () => {\n await refresh();\n setUIState('default');\n })();\n }}\n title=\"Refresh\"\n >\n <Icon icon=\"refresh\" alt=\"Refresh\" />\n </button>\n )}\n {!voted && !expired && !readOnly && optionsHaveVoteCounts && (\n <button\n type=\"button\"\n class=\"plain small\"\n disabled={uiState === 'loading'}\n onClick={(e) => {\n e.preventDefault();\n setShowResults(!showResults);\n }}\n title={showResults ? 'Hide results' : 'Show results'}\n >\n <Icon\n icon={showResults ? 'eye-open' : 'eye-close'}\n alt={showResults ? 'Hide results' : 'Show results'}\n />{' '}\n </button>\n )}\n {!expired && !readOnly && ' '}\n <span title={votesCount}>{shortenNumber(votesCount)}</span> vote\n {votesCount === 1 ? '' : 's'}\n {!!votersCount && votersCount !== votesCount && (\n <>\n {' '}\n &bull; <span title={votersCount}>\n {shortenNumber(votersCount)}\n </span>{' '}\n voter\n {votersCount === 1 ? '' : 's'}\n </>\n )}{' '}\n &bull; {expired ? 'Ended' : 'Ending'}{' '}\n {!!expiresAtDate && <RelativeTime datetime={expiresAtDate} />}\n </p>{' '}\n </div>\n );\n}\n","import { createContext } from 'preact';\n\nconst FilterContext = createContext();\nexport default FilterContext;\n","import mem from './mem';\nimport { getCurrentAccountID } from './store-utils';\n\nfunction _isFiltered(filtered, filterContext) {\n if (!filtered?.length) return false;\n const appliedFilters = filtered.filter((f) => {\n const { filter } = f;\n const hasContext = filter.context.includes(filterContext);\n if (!hasContext) return false;\n if (!filter.expiresAt) return hasContext;\n return new Date(filter.expiresAt) > new Date();\n });\n if (!appliedFilters.length) return false;\n const isHidden = appliedFilters.some((f) => f.filter.filterAction === 'hide');\n if (isHidden)\n return {\n action: 'hide',\n };\n const isWarn = appliedFilters.some((f) => f.filter.filterAction === 'warn');\n if (isWarn) {\n const filterTitles = appliedFilters.map((f) => f.filter.title);\n return {\n action: 'warn',\n titles: filterTitles,\n titlesStr: filterTitles.join(' • '),\n };\n }\n return false;\n}\nexport const isFiltered = mem(_isFiltered);\n\nexport function filteredItem(item, filterContext, currentAccountID) {\n const { filtered } = item;\n if (!filtered?.length) return true;\n const isSelf = currentAccountID && item.account?.id === currentAccountID;\n if (isSelf) return true;\n const filterState = isFiltered(filtered, filterContext);\n if (!filterState) return true;\n if (filterState.action === 'hide') return false;\n // item._filtered = filterState;\n return true;\n}\nexport function filteredItems(items, filterContext) {\n if (!items?.length) return [];\n if (!filterContext) return items;\n const currentAccountID = getCurrentAccountID();\n return items.filter((item) =>\n filteredItem(item, filterContext, currentAccountID),\n );\n}\n","const div = document.createElement('div');\nexport default function htmlContentLength(html) {\n if (!html) return 0;\n div.innerHTML = html;\n // .invisible spans for links\n // e.g. <span class=\"invisible\">https://</span>mastodon.social\n div.querySelectorAll('.invisible').forEach((el) => {\n el.remove();\n });\n return div.innerText.length;\n}\n","export const supportsTTS = 'speechSynthesis' in window;\n\nexport function speak(text, lang) {\n if (!supportsTTS) return;\n try {\n if (speechSynthesis.speaking) {\n speechSynthesis.cancel();\n }\n const utterance = new SpeechSynthesisUtterance(text);\n if (lang) utterance.lang = lang;\n speechSynthesis.speak(utterance);\n } catch (e) {\n alert(e);\n }\n}\n","import getHTMLText from './getHTMLText';\n\nfunction statusPeek(status) {\n const { spoilerText, content, poll, mediaAttachments } = status;\n let text = '';\n if (spoilerText?.trim()) {\n text += spoilerText;\n } else {\n text += getHTMLText(content);\n }\n text = text.trim();\n if (poll?.options?.length) {\n text += `\\n\\n📊:\\n${poll.options\n .map((o) => `${poll.multiple ? '▪️' : '•'} ${o.title}`)\n .join('\\n')}`;\n }\n if (mediaAttachments?.length) {\n text +=\n ' ' +\n mediaAttachments\n .map(\n (m) =>\n ({\n image: '🖼️',\n gifv: '🎞️',\n video: '📹',\n audio: '🎵',\n unknown: '',\n }[m.type] || ''),\n )\n .join('');\n }\n return text;\n}\n\nexport default statusPeek;\n","import { useRef } from 'preact/hooks';\nimport { useThrottledCallback } from 'use-debounce';\nimport useResizeObserver from 'use-resize-observer';\n\nexport default function useTruncated({ className = 'truncated' } = {}) {\n const ref = useRef();\n const onResize = useThrottledCallback(({ height }) => {\n if (ref.current) {\n const { scrollHeight } = ref.current;\n let truncated = scrollHeight > height;\n if (truncated) {\n const { height: _height, maxHeight } = getComputedStyle(ref.current);\n const computedHeight = parseInt(maxHeight || _height, 10);\n truncated = scrollHeight > computedHeight;\n }\n ref.current.classList.toggle(className, truncated);\n }\n }, 300);\n useResizeObserver({\n ref,\n box: 'border-box',\n onResize,\n });\n return ref;\n}\n","export default {\n public: 'earth',\n unlisted: 'group',\n private: 'lock',\n direct: 'message',\n};\n","export default function formatDuration(time) {\n if (!time) return;\n let hours = Math.floor(time / 3600);\n let minutes = Math.floor((time % 3600) / 60);\n let seconds = Math.round(time % 60);\n\n if (hours === 0) {\n return `${minutes}:${seconds.toString().padStart(2, '0')}`;\n } else {\n return `${hours}:${minutes.toString().padStart(2, '0')}:${seconds\n .toString()\n .padStart(2, '0')}`;\n }\n}\n","import { getBlurHashAverageColor } from 'fast-blurhash';\nimport { Fragment } from 'preact';\nimport {\n useCallback,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'preact/hooks';\nimport QuickPinchZoom, { make3dTransformValue } from 'react-quick-pinch-zoom';\n\nimport formatDuration from '../utils/format-duration';\nimport mem from '../utils/mem';\nimport states from '../utils/states';\n\nimport Icon from './icon';\nimport Link from './link';\n\nconst isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // https://stackoverflow.com/a/23522755\n\n/*\nMedia type\n===\nunknown = unsupported or unrecognized file type\nimage = Static image\ngifv = Looping, soundless animation\nvideo = Video clip\naudio = Audio track\n*/\n\nconst dataAltLabel = 'ALT';\nconst AltBadge = (props) => {\n const { alt, lang, index, ...rest } = props;\n if (!alt || !alt.trim()) return null;\n return (\n <button\n type=\"button\"\n class=\"alt-badge clickable\"\n {...rest}\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n states.showMediaAlt = {\n alt,\n lang,\n };\n }}\n title=\"Media description\"\n >\n {dataAltLabel}\n {!!index && <sup>{index}</sup>}\n </button>\n );\n};\n\nconst MEDIA_CAPTION_LIMIT = 140;\nconst MEDIA_CAPTION_LIMIT_LONGER = 280;\nexport const isMediaCaptionLong = mem((caption) =>\n caption?.length\n ? caption.length > MEDIA_CAPTION_LIMIT ||\n /[\\n\\r].*[\\n\\r]/.test(caption.trim())\n : false,\n);\n\nfunction Media({\n class: className = '',\n media,\n to,\n lang,\n showOriginal,\n autoAnimate,\n showCaption,\n allowLongerCaption,\n altIndex,\n onClick = () => {},\n}) {\n let {\n blurhash,\n description,\n meta,\n previewRemoteUrl,\n previewUrl,\n remoteUrl,\n url,\n type,\n } = media;\n if (/no\\-preview\\./i.test(previewUrl)) {\n previewUrl = null;\n }\n const { original = {}, small, focus } = meta || {};\n\n const width = showOriginal\n ? original?.width\n : small?.width || original?.width;\n const height = showOriginal\n ? original?.height\n : small?.height || original?.height;\n const mediaURL = showOriginal ? url : previewUrl || url;\n const remoteMediaURL = showOriginal\n ? remoteUrl\n : previewRemoteUrl || remoteUrl;\n const hasDimensions = width && height;\n const orientation = hasDimensions\n ? width > height\n ? 'landscape'\n : 'portrait'\n : null;\n\n const rgbAverageColor = blurhash ? getBlurHashAverageColor(blurhash) : null;\n\n const videoRef = useRef();\n\n let focalPosition;\n if (focus) {\n // Convert focal point to CSS background position\n // Formula from jquery-focuspoint\n // x = -1, y = 1 => 0% 0%\n // x = 0, y = 0 => 50% 50%\n // x = 1, y = -1 => 100% 100%\n const x = ((focus.x + 1) / 2) * 100;\n const y = ((1 - focus.y) / 2) * 100;\n focalPosition = `${x.toFixed(0)}% ${y.toFixed(0)}%`;\n }\n\n const mediaRef = useRef();\n const onUpdate = useCallback(({ x, y, scale }) => {\n const { current: media } = mediaRef;\n\n if (media) {\n const value = make3dTransformValue({ x, y, scale });\n\n if (scale === 1) {\n media.style.removeProperty('transform');\n } else {\n media.style.setProperty('transform', value);\n }\n\n media.closest('.media-zoom').style.touchAction =\n scale <= 1.01 ? 'pan-x' : '';\n }\n }, []);\n\n const [pinchZoomEnabled, setPinchZoomEnabled] = useState(false);\n const quickPinchZoomProps = {\n enabled: pinchZoomEnabled,\n draggableUnZoomed: false,\n inertiaFriction: 0.9,\n tapZoomFactor: 2,\n doubleTapToggleZoom: true,\n containerProps: {\n className: 'media-zoom',\n style: {\n overflow: 'visible',\n // width: 'inherit',\n // height: 'inherit',\n // justifyContent: 'inherit',\n // alignItems: 'inherit',\n // display: 'inherit',\n },\n },\n onUpdate,\n };\n\n const Parent = useMemo(\n () => (to ? (props) => <Link to={to} {...props} /> : 'div'),\n [to],\n );\n\n const remoteMediaURLObj = remoteMediaURL ? getURLObj(remoteMediaURL) : null;\n const isVideoMaybe =\n type === 'unknown' &&\n remoteMediaURLObj &&\n /\\.(mp4|m4r|m4v|mov|webm)$/i.test(remoteMediaURLObj.pathname);\n const isAudioMaybe =\n type === 'unknown' &&\n remoteMediaURLObj &&\n /\\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(remoteMediaURLObj.pathname);\n const isImage =\n type === 'image' ||\n (type === 'unknown' && previewUrl && !isVideoMaybe && !isAudioMaybe);\n\n const parentRef = useRef();\n const [imageSmallerThanParent, setImageSmallerThanParent] = useState(false);\n useLayoutEffect(() => {\n if (!isImage) return;\n if (!showOriginal) return;\n if (!parentRef.current) return;\n const { offsetWidth, offsetHeight } = parentRef.current;\n const smaller = width < offsetWidth && height < offsetHeight;\n if (smaller) setImageSmallerThanParent(smaller);\n }, [width, height]);\n\n const maxAspectHeight =\n window.innerHeight * (orientation === 'portrait' ? 0.45 : 0.33);\n const maxHeight = orientation === 'portrait' ? 0 : 160;\n const averageColorStyle = {\n '--average-color': rgbAverageColor && `rgb(${rgbAverageColor.join(',')})`,\n };\n const mediaStyles =\n width && height\n ? {\n '--width': `${width}px`,\n '--height': `${height}px`,\n // Calculate '--aspectWidth' based on aspect ratio calculated from '--width' and '--height', max height has to be 160px\n '--aspectWidth': `${\n (width / height) * Math.max(maxHeight, maxAspectHeight)\n }px`,\n aspectRatio: `${width} / ${height}`,\n ...averageColorStyle,\n }\n : {\n ...averageColorStyle,\n };\n\n const longDesc = isMediaCaptionLong(description);\n let showInlineDesc =\n !!showCaption && !showOriginal && !!description && !longDesc;\n if (\n allowLongerCaption &&\n !showInlineDesc &&\n description?.length <= MEDIA_CAPTION_LIMIT_LONGER\n ) {\n showInlineDesc = true;\n }\n const Figure = !showInlineDesc\n ? Fragment\n : (props) => {\n const { children, ...restProps } = props;\n return (\n <figure {...restProps}>\n {children}\n <figcaption\n class=\"media-caption\"\n lang={lang}\n dir=\"auto\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n states.showMediaAlt = {\n alt: description,\n lang,\n };\n }}\n >\n {description}\n </figcaption>\n </figure>\n );\n };\n\n if (isImage) {\n // Note: type: unknown might not have width/height\n quickPinchZoomProps.containerProps.style.display = 'inherit';\n\n useLayoutEffect(() => {\n if (!isSafari) return;\n if (!showOriginal) return;\n (async () => {\n try {\n await fetch(mediaURL, { mode: 'no-cors' });\n mediaRef.current.src = mediaURL;\n } catch (e) {\n // Ignore\n }\n })();\n }, [mediaURL]);\n\n return (\n <Figure>\n <Parent\n ref={parentRef}\n class={`media media-image ${className}`}\n onClick={onClick}\n data-orientation={orientation}\n data-has-alt={!showInlineDesc}\n style={\n showOriginal\n ? {\n backgroundImage: `url(${previewUrl})`,\n backgroundSize: imageSmallerThanParent\n ? `${width}px ${height}px`\n : undefined,\n ...averageColorStyle,\n }\n : mediaStyles\n }\n >\n {showOriginal ? (\n <QuickPinchZoom {...quickPinchZoomProps}>\n <img\n ref={mediaRef}\n src={mediaURL}\n alt={description}\n width={width}\n height={height}\n data-orientation={orientation}\n loading=\"eager\"\n decoding=\"sync\"\n onLoad={(e) => {\n e.target.closest('.media-image').style.backgroundImage = '';\n e.target.closest('.media-zoom').style.display = '';\n setPinchZoomEnabled(true);\n }}\n onError={(e) => {\n const { src } = e.target;\n if (\n src === mediaURL &&\n remoteMediaURL &&\n mediaURL !== remoteMediaURL\n ) {\n e.target.src = remoteMediaURL;\n }\n }}\n />\n </QuickPinchZoom>\n ) : (\n <>\n <img\n src={mediaURL}\n alt={showInlineDesc ? '' : description}\n width={width}\n height={height}\n data-orientation={orientation}\n loading=\"lazy\"\n style={{\n // backgroundColor:\n // rgbAverageColor && `rgb(${rgbAverageColor.join(',')})`,\n // backgroundPosition: focalBackgroundPosition || 'center',\n // Duration based on width or height in pixels\n objectPosition: focalPosition || 'center',\n // 100px per second (rough estimate)\n // Clamp between 5s and 120s\n '--anim-duration': `${Math.min(\n Math.max(Math.max(width, height) / 100, 5),\n 120,\n )}s`,\n }}\n onLoad={(e) => {\n // e.target.closest('.media-image').style.backgroundImage = '';\n e.target.dataset.loaded = true;\n if (!hasDimensions) {\n const $media = e.target.closest('.media');\n if ($media) {\n const { naturalWidth, naturalHeight } = e.target;\n $media.dataset.orientation =\n naturalWidth > naturalHeight ? 'landscape' : 'portrait';\n $media.style.setProperty('--width', `${naturalWidth}px`);\n $media.style.setProperty(\n '--height',\n `${naturalHeight}px`,\n );\n $media.style.aspectRatio = `${naturalWidth}/${naturalHeight}`;\n }\n }\n }}\n onError={(e) => {\n const { src } = e.target;\n if (src === mediaURL && mediaURL !== remoteMediaURL) {\n e.target.src = remoteMediaURL;\n }\n }}\n />\n {!showInlineDesc && (\n <AltBadge alt={description} lang={lang} index={altIndex} />\n )}\n </>\n )}\n </Parent>\n </Figure>\n );\n } else if (type === 'gifv' || type === 'video' || isVideoMaybe) {\n const hasDuration = original.duration > 0;\n const shortDuration = original.duration < 31;\n const isGIF = type === 'gifv' && shortDuration;\n // If GIF is too long, treat it as a video\n const loopable = original.duration < 61;\n const formattedDuration = formatDuration(original.duration);\n const hoverAnimate = !showOriginal && !autoAnimate && isGIF;\n const autoGIFAnimate = !showOriginal && autoAnimate && isGIF;\n const showProgress = original.duration > 5;\n\n // This string is only for autoplay + muted to work on Mobile Safari\n const gifHTML = `\n <video\n src=\"${url}\"\n poster=\"${previewUrl}\"\n width=\"${width}\"\n height=\"${height}\"\n data-orientation=\"${orientation}\"\n preload=\"auto\"\n autoplay\n muted\n playsinline\n loop=\"${loopable}\"\n ondblclick=\"this.paused ? this.play() : this.pause()\"\n ${\n showProgress\n ? \"ontimeupdate=\\\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\\\"\"\n : ''\n }\n ></video>\n `;\n\n return (\n <Figure>\n <Parent\n class={`media ${className} media-${isGIF ? 'gif' : 'video'} ${\n autoGIFAnimate ? 'media-contain' : ''\n } ${hoverAnimate ? 'media-hover-animate' : ''}`}\n data-orientation={orientation}\n data-formatted-duration={\n !showOriginal ? formattedDuration : undefined\n }\n data-label={isGIF && !showOriginal && !autoGIFAnimate ? 'GIF' : ''}\n data-has-alt={!showInlineDesc}\n // style={{\n // backgroundColor:\n // rgbAverageColor && `rgb(${rgbAverageColor.join(',')})`,\n // }}\n style={!showOriginal && mediaStyles}\n onClick={(e) => {\n if (hoverAnimate) {\n try {\n videoRef.current.pause();\n } catch (e) {}\n }\n onClick(e);\n }}\n onMouseEnter={() => {\n if (hoverAnimate) {\n try {\n videoRef.current.play();\n } catch (e) {}\n }\n }}\n onMouseLeave={() => {\n if (hoverAnimate) {\n try {\n videoRef.current.pause();\n } catch (e) {}\n }\n }}\n onFocus={() => {\n if (hoverAnimate) {\n try {\n videoRef.current.play();\n } catch (e) {}\n }\n }}\n onBlur={() => {\n if (hoverAnimate) {\n try {\n videoRef.current.pause();\n } catch (e) {}\n }\n }}\n >\n {showOriginal || autoGIFAnimate ? (\n isGIF && showOriginal ? (\n <QuickPinchZoom {...quickPinchZoomProps} enabled>\n <div\n ref={mediaRef}\n dangerouslySetInnerHTML={{\n __html: gifHTML,\n }}\n />\n </QuickPinchZoom>\n ) : isGIF ? (\n <div\n class=\"video-container\"\n dangerouslySetInnerHTML={{\n __html: gifHTML,\n }}\n />\n ) : (\n <div class=\"video-container\">\n <video\n slot=\"media\"\n src={url}\n poster={previewUrl}\n width={width}\n height={height}\n data-orientation={orientation}\n preload=\"auto\"\n autoplay\n playsinline\n loop={loopable}\n controls\n ></video>\n </div>\n )\n ) : isGIF ? (\n <video\n ref={videoRef}\n src={url}\n poster={previewUrl}\n width={width}\n height={height}\n data-orientation={orientation}\n preload=\"auto\"\n // controls\n playsinline\n loop\n muted\n onTimeUpdate={\n showProgress\n ? (e) => {\n const { target } = e;\n const container = target?.closest('.media-gif');\n if (container) {\n const percentage =\n (target.currentTime / target.duration) * 100;\n container.style.setProperty(\n '--progress',\n `${percentage}%`,\n );\n }\n }\n : undefined\n }\n />\n ) : (\n <>\n {previewUrl ? (\n <img\n src={previewUrl}\n alt={showInlineDesc ? '' : description}\n width={width}\n height={height}\n data-orientation={orientation}\n loading=\"lazy\"\n decoding=\"async\"\n onLoad={(e) => {\n if (!hasDimensions) {\n const $media = e.target.closest('.media');\n if ($media) {\n const { naturalHeight, naturalWidth } = e.target;\n $media.dataset.orientation =\n naturalWidth > naturalHeight\n ? 'landscape'\n : 'portrait';\n $media.style.setProperty(\n '--width',\n `${naturalWidth}px`,\n );\n $media.style.setProperty(\n '--height',\n `${naturalHeight}px`,\n );\n $media.style.aspectRatio = `${naturalWidth}/${naturalHeight}`;\n }\n }\n }}\n />\n ) : (\n <video\n src={url + '#t=0.1'} // Make Safari show 1st-frame preview\n width={width}\n height={height}\n data-orientation={orientation}\n preload=\"metadata\"\n muted\n disablePictureInPicture\n onLoadedMetadata={(e) => {\n if (!hasDuration) {\n const { duration } = e.target;\n if (duration) {\n const formattedDuration = formatDuration(duration);\n const container = e.target.closest('.media-video');\n if (container) {\n container.dataset.formattedDuration =\n formattedDuration;\n }\n }\n }\n }}\n />\n )}\n <div class=\"media-play\">\n <Icon icon=\"play\" size=\"xl\" />\n </div>\n </>\n )}\n {!showOriginal && !showInlineDesc && (\n <AltBadge alt={description} lang={lang} index={altIndex} />\n )}\n </Parent>\n </Figure>\n );\n } else if (type === 'audio' || isAudioMaybe) {\n const formattedDuration = formatDuration(original.duration);\n return (\n <Figure>\n <Parent\n class={`media media-audio ${className}`}\n data-formatted-duration={\n !showOriginal ? formattedDuration : undefined\n }\n data-has-alt={!showInlineDesc}\n onClick={onClick}\n style={!showOriginal && mediaStyles}\n >\n {showOriginal ? (\n <audio src={remoteUrl || url} preload=\"none\" controls autoplay />\n ) : previewUrl ? (\n <img\n src={previewUrl}\n alt={showInlineDesc ? '' : description}\n width={width}\n height={height}\n data-orientation={orientation}\n loading=\"lazy\"\n onError={(e) => {\n try {\n // Remove self if broken\n e.target?.remove?.();\n } catch (e) {}\n }}\n />\n ) : null}\n {!showOriginal && (\n <>\n <div class=\"media-play\">\n <Icon icon=\"play\" size=\"xl\" />\n </div>\n {!showInlineDesc && (\n <AltBadge alt={description} lang={lang} index={altIndex} />\n )}\n </>\n )}\n </Parent>\n </Figure>\n );\n }\n}\n\nfunction getURLObj(url) {\n try {\n // Fake base URL if url doesn't have https:// prefix\n return new URL(url, location.origin);\n } catch (e) {\n return null;\n }\n}\n\nexport default Media;\n","import './status.css';\n\nimport '@justinribeiro/lite-youtube';\nimport {\n ControlledMenu,\n Menu,\n MenuDivider,\n MenuHeader,\n MenuItem,\n} from '@szhsin/react-menu';\nimport { decodeBlurHash, getBlurHashAverageColor } from 'fast-blurhash';\nimport { shallowEqual } from 'fast-equals';\nimport prettify from 'html-prettify';\nimport { Fragment } from 'preact';\nimport { memo } from 'preact/compat';\nimport {\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'preact/hooks';\nimport punycode from 'punycode';\nimport { useHotkeys } from 'react-hotkeys-hook';\nimport { detectAll } from 'tinyld/light';\nimport { useLongPress } from 'use-long-press';\nimport { useSnapshot } from 'valtio';\n\nimport CustomEmoji from '../components/custom-emoji';\nimport EmojiText from '../components/emoji-text';\nimport LazyShazam from '../components/lazy-shazam';\nimport Loader from '../components/loader';\nimport Menu2 from '../components/menu2';\nimport MenuConfirm from '../components/menu-confirm';\nimport Modal from '../components/modal';\nimport NameText from '../components/name-text';\nimport Poll from '../components/poll';\nimport { api } from '../utils/api';\nimport emojifyText from '../utils/emojify-text';\nimport enhanceContent from '../utils/enhance-content';\nimport FilterContext from '../utils/filter-context';\nimport { isFiltered } from '../utils/filters';\nimport getTranslateTargetLanguage from '../utils/get-translate-target-language';\nimport getHTMLText from '../utils/getHTMLText';\nimport handleContentLinks from '../utils/handle-content-links';\nimport htmlContentLength from '../utils/html-content-length';\nimport isMastodonLinkMaybe from '../utils/isMastodonLinkMaybe';\nimport localeMatch from '../utils/locale-match';\nimport mem from '../utils/mem';\nimport niceDateTime from '../utils/nice-date-time';\nimport openCompose from '../utils/open-compose';\nimport pmem from '../utils/pmem';\nimport safeBoundingBoxPadding from '../utils/safe-bounding-box-padding';\nimport shortenNumber from '../utils/shorten-number';\nimport showCompose from '../utils/show-compose';\nimport showToast from '../utils/show-toast';\nimport { speak, supportsTTS } from '../utils/speech';\nimport states, { getStatus, saveStatus, statusKey } from '../utils/states';\nimport statusPeek from '../utils/status-peek';\nimport store from '../utils/store';\nimport { getCurrentAccountID } from '../utils/store-utils';\nimport supports from '../utils/supports';\nimport unfurlMastodonLink from '../utils/unfurl-link';\nimport useTruncated from '../utils/useTruncated';\nimport visibilityIconsMap from '../utils/visibility-icons-map';\n\nimport Avatar from './avatar';\nimport Icon from './icon';\nimport Link from './link';\nimport Media from './media';\nimport { isMediaCaptionLong } from './media';\nimport MenuLink from './menu-link';\nimport RelativeTime from './relative-time';\nimport TranslationBlock from './translation-block';\n\nconst SHOW_COMMENT_COUNT_LIMIT = 280;\nconst INLINE_TRANSLATE_LIMIT = 140;\n\nfunction fetchAccount(id, masto) {\n return masto.v1.accounts.$select(id).fetch();\n}\nconst memFetchAccount = pmem(fetchAccount);\n\nconst visibilityText = {\n public: 'Public',\n unlisted: 'Unlisted',\n private: 'Followers only',\n direct: 'Private mention',\n};\n\nconst isIOS =\n window.ontouchstart !== undefined &&\n /iPad|iPhone|iPod/.test(navigator.userAgent);\n\nconst rtf = new Intl.RelativeTimeFormat();\n\nconst REACTIONS_LIMIT = 80;\n\nfunction getPollText(poll) {\n if (!poll?.options?.length) return '';\n return `📊:\\n${poll.options\n .map(\n (option) =>\n `- ${option.title}${\n option.votesCount >= 0 ? ` (${option.votesCount})` : ''\n }`,\n )\n .join('\\n')}`;\n}\nfunction getPostText(status) {\n const { spoilerText, content, poll } = status;\n return (\n (spoilerText ? `${spoilerText}\\n\\n` : '') +\n getHTMLText(content) +\n getPollText(poll)\n );\n}\n\nconst PostContent = memo(\n ({ post, instance, previewMode }) => {\n const { content, emojis, language, mentions, url } = post;\n return (\n <div\n lang={language}\n dir=\"auto\"\n class=\"inner-content\"\n onClick={handleContentLinks({\n mentions,\n instance,\n previewMode,\n statusURL: url,\n })}\n dangerouslySetInnerHTML={{\n __html: enhanceContent(content, {\n emojis,\n postEnhanceDOM: (dom) => {\n // Remove target=\"_blank\" from links\n dom.querySelectorAll('a.u-url[target=\"_blank\"]').forEach((a) => {\n if (!/http/i.test(a.innerText.trim())) {\n a.removeAttribute('target');\n }\n });\n },\n }),\n }}\n />\n );\n },\n (oldProps, newProps) => {\n const { post: oldPost } = oldProps;\n const { post: newPost } = newProps;\n return oldPost.content === newPost.content;\n },\n);\n\nconst SIZE_CLASS = {\n s: 'small',\n m: 'medium',\n l: 'large',\n};\n\nconst detectLang = mem((text) => {\n text = text?.trim();\n\n // Ref: https://github.com/komodojp/tinyld/blob/develop/docs/benchmark.md\n // 500 should be enough for now, also the default max chars for Mastodon\n if (text?.length > 500) {\n return null;\n }\n const langs = detectAll(text);\n const lang = langs[0];\n if (lang?.lang && lang?.accuracy > 0.5) {\n // If > 50% accurate, use it\n // It can be accurate if < 50% but better be safe\n // Though > 50% also can be inaccurate 🤷‍♂️\n return lang.lang;\n }\n return null;\n});\n\nfunction Status({\n statusID,\n status,\n instance: propInstance,\n size = 'm',\n contentTextWeight,\n readOnly,\n enableCommentHint,\n withinContext,\n skeleton,\n enableTranslate,\n forceTranslate: _forceTranslate,\n previewMode,\n // allowFilters,\n onMediaClick,\n quoted,\n onStatusLinkClick = () => {},\n showFollowedTags,\n allowContextMenu,\n showActionsBar,\n showReplyParent,\n mediaFirst,\n}) {\n if (skeleton) {\n return (\n <div\n class={`status skeleton ${\n mediaFirst ? 'status-media-first small' : ''\n }`}\n >\n {!mediaFirst && <Avatar size=\"xxl\" />}\n <div class=\"container\">\n <div class=\"meta\">\n {(size === 's' || mediaFirst) && <Avatar size=\"m\" />} ███ ████████\n </div>\n <div class=\"content-container\">\n {mediaFirst && <div class=\"media-first-container\" />}\n <div class={`content ${mediaFirst ? 'media-first-content' : ''}`}>\n <p>████ ████████</p>\n </div>\n </div>\n </div>\n </div>\n );\n }\n const { masto, instance, authenticated } = api({ instance: propInstance });\n const { instance: currentInstance } = api();\n const sameInstance = instance === currentInstance;\n\n let sKey = statusKey(statusID || status?.id, instance);\n const snapStates = useSnapshot(states);\n if (!status) {\n status = snapStates.statuses[sKey] || snapStates.statuses[statusID];\n sKey = statusKey(status?.id, instance);\n }\n if (!status) {\n return null;\n }\n\n const {\n account: {\n acct,\n avatar,\n avatarStatic,\n id: accountId,\n url: accountURL,\n displayName,\n username,\n emojis: accountEmojis,\n bot,\n group,\n },\n id,\n repliesCount,\n reblogged,\n reblogsCount,\n favourited,\n favouritesCount,\n bookmarked,\n poll,\n muted,\n sensitive,\n spoilerText,\n visibility, // public, unlisted, private, direct\n language: _language,\n editedAt,\n filtered,\n card,\n createdAt,\n inReplyToId,\n inReplyToAccountId,\n content,\n mentions,\n mediaAttachments,\n reblog,\n uri,\n url,\n emojis,\n tags,\n // Non-API props\n _deleted,\n _pinned,\n // _filtered,\n // Non-Mastodon\n emojiReactions,\n } = status;\n\n const [languageAutoDetected, setLanguageAutoDetected] = useState(null);\n useEffect(() => {\n if (!content) return;\n if (_language) return;\n let timer;\n timer = setTimeout(() => {\n let detected = detectLang(\n getHTMLText(content, {\n preProcess: (dom) => {\n // Remove anything that can skew the language detection\n\n // Remove .mention, .hashtag, pre, code, a:has(.invisible)\n dom\n .querySelectorAll(\n '.mention, .hashtag, pre, code, a:has(.invisible)',\n )\n .forEach((a) => {\n a.remove();\n });\n\n // Remove links that contains text that starts with https?://\n dom.querySelectorAll('a').forEach((a) => {\n const text = a.innerText.trim();\n if (text.startsWith('https://') || text.startsWith('http://')) {\n a.remove();\n }\n });\n },\n }),\n );\n setLanguageAutoDetected(detected);\n }, 1000);\n return () => clearTimeout(timer);\n }, [content, _language]);\n const language = _language || languageAutoDetected;\n\n // if (!mediaAttachments?.length) mediaFirst = false;\n const hasMediaAttachments = !!mediaAttachments?.length;\n if (mediaFirst && hasMediaAttachments) size = 's';\n\n const currentAccount = useMemo(() => {\n return getCurrentAccountID();\n }, []);\n const isSelf = useMemo(() => {\n return currentAccount && currentAccount === accountId;\n }, [accountId, currentAccount]);\n\n const filterContext = useContext(FilterContext);\n const filterInfo =\n !isSelf && !readOnly && !previewMode && isFiltered(filtered, filterContext);\n\n if (filterInfo?.action === 'hide') {\n return null;\n }\n\n console.debug('RENDER Status', id, status?.account.displayName, quoted);\n\n const debugHover = (e) => {\n if (e.shiftKey) {\n console.log({\n ...status,\n });\n }\n };\n\n if (/*allowFilters && */ size !== 'l' && filterInfo) {\n return (\n <FilteredStatus\n status={status}\n filterInfo={filterInfo}\n instance={instance}\n containerProps={{\n onMouseEnter: debugHover,\n }}\n showFollowedTags\n quoted={quoted}\n />\n );\n }\n\n const createdAtDate = new Date(createdAt);\n const editedAtDate = new Date(editedAt);\n\n let inReplyToAccountRef = mentions?.find(\n (mention) => mention.id === inReplyToAccountId,\n );\n if (!inReplyToAccountRef && inReplyToAccountId === id) {\n inReplyToAccountRef = { url: accountURL, username, displayName };\n }\n const [inReplyToAccount, setInReplyToAccount] = useState(inReplyToAccountRef);\n if (!withinContext && !inReplyToAccount && inReplyToAccountId) {\n const account = states.accounts[inReplyToAccountId];\n if (account) {\n setInReplyToAccount(account);\n } else {\n memFetchAccount(inReplyToAccountId, masto)\n .then((account) => {\n setInReplyToAccount(account);\n states.accounts[account.id] = account;\n })\n .catch((e) => {});\n }\n }\n const mentionSelf =\n inReplyToAccountId === currentAccount ||\n mentions?.find((mention) => mention.id === currentAccount);\n\n const readingExpandSpoilers = useMemo(() => {\n const prefs = store.account.get('preferences') || {};\n return !!prefs['reading:expand:spoilers'];\n }, []);\n const readingExpandMedia = useMemo(() => {\n // default | show_all | hide_all\n // Ignore hide_all because it means hide *ALL* media including non-sensitive ones\n const prefs = store.account.get('preferences') || {};\n return prefs['reading:expand:media'] || 'default';\n }, []);\n // FOR TESTING:\n // const readingExpandSpoilers = true;\n // const readingExpandMedia = 'show_all';\n const showSpoiler =\n previewMode || readingExpandSpoilers || !!snapStates.spoilers[id];\n const showSpoilerMedia =\n previewMode ||\n readingExpandMedia === 'show_all' ||\n !!snapStates.spoilersMedia[id];\n\n if (reblog) {\n // If has statusID, means useItemID (cached in states)\n\n if (group) {\n return (\n <div\n data-state-post-id={sKey}\n class=\"status-group\"\n onMouseEnter={debugHover}\n >\n <div class=\"status-pre-meta\">\n <Icon icon=\"group\" size=\"l\" alt=\"Group\" />{' '}\n <NameText account={status.account} instance={instance} showAvatar />\n </div>\n <Status\n status={statusID ? null : reblog}\n statusID={statusID ? reblog.id : null}\n instance={instance}\n size={size}\n contentTextWeight={contentTextWeight}\n readOnly={readOnly}\n mediaFirst={mediaFirst}\n />\n </div>\n );\n }\n\n return (\n <div\n data-state-post-id={sKey}\n class=\"status-reblog\"\n onMouseEnter={debugHover}\n >\n <div class=\"status-pre-meta\">\n <Icon icon=\"rocket\" size=\"l\" />{' '}\n <NameText account={status.account} instance={instance} showAvatar />{' '}\n <span>boosted</span>\n </div>\n <Status\n status={statusID ? null : reblog}\n statusID={statusID ? reblog.id : null}\n instance={instance}\n size={size}\n contentTextWeight={contentTextWeight}\n readOnly={readOnly}\n enableCommentHint\n mediaFirst={mediaFirst}\n />\n </div>\n );\n }\n\n // Check followedTags\n const FollowedTagsParent = useCallback(\n ({ children }) => (\n <div\n data-state-post-id={sKey}\n class=\"status-followed-tags\"\n onMouseEnter={debugHover}\n >\n <div class=\"status-pre-meta\">\n <Icon icon=\"hashtag\" size=\"l\" />{' '}\n {snapStates.statusFollowedTags[sKey].slice(0, 3).map((tag) => (\n <Link\n key={tag}\n to={instance ? `/${instance}/t/${tag}` : `/t/${tag}`}\n class=\"status-followed-tag-item\"\n >\n {tag}\n </Link>\n ))}\n </div>\n {children}\n </div>\n ),\n [sKey, instance, snapStates.statusFollowedTags[sKey]],\n );\n const StatusParent =\n showFollowedTags && !!snapStates.statusFollowedTags[sKey]?.length\n ? FollowedTagsParent\n : Fragment;\n\n const isSizeLarge = size === 'l';\n\n const [forceTranslate, setForceTranslate] = useState(_forceTranslate);\n const targetLanguage = getTranslateTargetLanguage(true);\n const contentTranslationHideLanguages =\n snapStates.settings.contentTranslationHideLanguages || [];\n const { contentTranslation, contentTranslationAutoInline } =\n snapStates.settings;\n if (!contentTranslation) enableTranslate = false;\n const inlineTranslate = useMemo(() => {\n if (\n !contentTranslation ||\n !contentTranslationAutoInline ||\n readOnly ||\n (withinContext && !isSizeLarge) ||\n previewMode ||\n spoilerText ||\n sensitive ||\n poll ||\n card ||\n mediaAttachments?.length\n ) {\n return false;\n }\n const contentLength = htmlContentLength(content);\n return contentLength > 0 && contentLength <= INLINE_TRANSLATE_LIMIT;\n }, [\n contentTranslation,\n contentTranslationAutoInline,\n readOnly,\n withinContext,\n isSizeLarge,\n previewMode,\n spoilerText,\n sensitive,\n poll,\n card,\n mediaAttachments,\n content,\n ]);\n\n const [showEdited, setShowEdited] = useState(false);\n const [showEmbed, setShowEmbed] = useState(false);\n\n const spoilerContentRef = useTruncated();\n const contentRef = useTruncated();\n const mediaContainerRef = useTruncated();\n const readMoreText = 'Read more →';\n\n const statusRef = useRef(null);\n\n const unauthInteractionErrorMessage = `Sorry, your current logged-in instance can't interact with this post from another instance.`;\n\n const textWeight = useCallback(\n () =>\n Math.max(\n Math.round((spoilerText.length + htmlContentLength(content)) / 140) ||\n 1,\n 1,\n ),\n [spoilerText, content],\n );\n\n const createdDateText = niceDateTime(createdAtDate);\n const editedDateText = editedAt && niceDateTime(editedAtDate);\n\n // Can boost if:\n // - authenticated AND\n // - visibility != direct OR\n // - visibility = private AND isSelf\n let canBoost =\n authenticated && visibility !== 'direct' && visibility !== 'private';\n if (visibility === 'private' && isSelf) {\n canBoost = true;\n }\n\n const replyStatus = (e) => {\n if (!sameInstance || !authenticated) {\n return alert(unauthInteractionErrorMessage);\n }\n // syntheticEvent comes from MenuItem\n if (e?.shiftKey || e?.syntheticEvent?.shiftKey) {\n const newWin = openCompose({\n replyToStatus: status,\n });\n if (newWin) return;\n }\n showCompose({\n replyToStatus: status,\n });\n };\n\n // Check if media has no descriptions\n const mediaNoDesc = useMemo(() => {\n return mediaAttachments.some(\n (attachment) => !attachment.description?.trim?.(),\n );\n }, [mediaAttachments]);\n\n const statusMonthsAgo = useMemo(() => {\n return Math.floor(\n (new Date() - createdAtDate) / (1000 * 60 * 60 * 24 * 30),\n );\n }, [createdAtDate]);\n\n const boostStatus = async () => {\n if (!sameInstance || !authenticated) {\n alert(unauthInteractionErrorMessage);\n return false;\n }\n try {\n if (!reblogged) {\n let confirmText = 'Boost this post?';\n if (mediaNoDesc) {\n confirmText += '\\n\\n⚠ Some media have no descriptions.';\n }\n const yes = confirm(confirmText);\n if (!yes) {\n return false;\n }\n }\n // Optimistic\n states.statuses[sKey] = {\n ...status,\n reblogged: !reblogged,\n reblogsCount: reblogsCount + (reblogged ? -1 : 1),\n };\n if (reblogged) {\n const newStatus = await masto.v1.statuses.$select(id).unreblog();\n saveStatus(newStatus, instance);\n return true;\n } else {\n const newStatus = await masto.v1.statuses.$select(id).reblog();\n saveStatus(newStatus, instance);\n return true;\n }\n } catch (e) {\n console.error(e);\n // Revert optimistism\n states.statuses[sKey] = status;\n return false;\n }\n };\n const confirmBoostStatus = async () => {\n if (!sameInstance || !authenticated) {\n alert(unauthInteractionErrorMessage);\n return false;\n }\n try {\n // Optimistic\n states.statuses[sKey] = {\n ...status,\n reblogged: !reblogged,\n reblogsCount: reblogsCount + (reblogged ? -1 : 1),\n };\n if (reblogged) {\n const newStatus = await masto.v1.statuses.$select(id).unreblog();\n saveStatus(newStatus, instance);\n } else {\n const newStatus = await masto.v1.statuses.$select(id).reblog();\n saveStatus(newStatus, instance);\n }\n return true;\n } catch (e) {\n console.error(e);\n // Revert optimistism\n states.statuses[sKey] = status;\n return false;\n }\n };\n\n const favouriteStatus = async () => {\n if (!sameInstance || !authenticated) {\n alert(unauthInteractionErrorMessage);\n return false;\n }\n try {\n // Optimistic\n states.statuses[sKey] = {\n ...status,\n favourited: !favourited,\n favouritesCount: favouritesCount + (favourited ? -1 : 1),\n };\n if (favourited) {\n const newStatus = await masto.v1.statuses.$select(id).unfavourite();\n saveStatus(newStatus, instance);\n } else {\n const newStatus = await masto.v1.statuses.$select(id).favourite();\n saveStatus(newStatus, instance);\n }\n return true;\n } catch (e) {\n console.error(e);\n // Revert optimistism\n states.statuses[sKey] = status;\n return false;\n }\n };\n const favouriteStatusNotify = async () => {\n try {\n const done = await favouriteStatus();\n if (!isSizeLarge && done) {\n showToast(\n favourited\n ? `Unliked @${username || acct}'s post`\n : `Liked @${username || acct}'s post`,\n );\n }\n } catch (e) {}\n };\n\n const bookmarkStatus = async () => {\n if (!supports('@mastodon/post-bookmark')) return;\n if (!sameInstance || !authenticated) {\n alert(unauthInteractionErrorMessage);\n return false;\n }\n try {\n // Optimistic\n states.statuses[sKey] = {\n ...status,\n bookmarked: !bookmarked,\n };\n if (bookmarked) {\n const newStatus = await masto.v1.statuses.$select(id).unbookmark();\n saveStatus(newStatus, instance);\n } else {\n const newStatus = await masto.v1.statuses.$select(id).bookmark();\n saveStatus(newStatus, instance);\n }\n return true;\n } catch (e) {\n console.error(e);\n // Revert optimistism\n states.statuses[sKey] = status;\n return false;\n }\n };\n const bookmarkStatusNotify = async () => {\n try {\n const done = await bookmarkStatus();\n if (!isSizeLarge && done) {\n showToast(\n bookmarked\n ? `Unbookmarked @${username || acct}'s post`\n : `Bookmarked @${username || acct}'s post`,\n );\n }\n } catch (e) {}\n };\n\n const differentLanguage =\n !!language &&\n language !== targetLanguage &&\n !localeMatch([language], [targetLanguage]) &&\n !contentTranslationHideLanguages.find(\n (l) => language === l || localeMatch([language], [l]),\n );\n\n const reblogIterator = useRef();\n const favouriteIterator = useRef();\n async function fetchBoostedLikedByAccounts(firstLoad) {\n if (firstLoad) {\n reblogIterator.current = masto.v1.statuses\n .$select(statusID)\n .rebloggedBy.list({\n limit: REACTIONS_LIMIT,\n });\n favouriteIterator.current = masto.v1.statuses\n .$select(statusID)\n .favouritedBy.list({\n limit: REACTIONS_LIMIT,\n });\n }\n const [{ value: reblogResults }, { value: favouriteResults }] =\n await Promise.allSettled([\n reblogIterator.current.next(),\n favouriteIterator.current.next(),\n ]);\n if (reblogResults.value?.length || favouriteResults.value?.length) {\n const accounts = [];\n if (reblogResults.value?.length) {\n accounts.push(\n ...reblogResults.value.map((a) => {\n a._types = ['reblog'];\n return a;\n }),\n );\n }\n if (favouriteResults.value?.length) {\n accounts.push(\n ...favouriteResults.value.map((a) => {\n a._types = ['favourite'];\n return a;\n }),\n );\n }\n return {\n value: accounts,\n done: reblogResults.done && favouriteResults.done,\n };\n }\n return {\n value: [],\n done: true,\n };\n }\n\n const actionsRef = useRef();\n const isPublic = ['public', 'unlisted'].includes(visibility);\n const isPinnable = ['public', 'unlisted', 'private'].includes(visibility);\n const StatusMenuItems = (\n <>\n {!isSizeLarge && sameInstance && (\n <>\n <div class=\"menu-control-group-horizontal status-menu\">\n <MenuItem onClick={replyStatus}>\n <Icon icon=\"comment\" />\n <span>\n {repliesCount > 0 ? shortenNumber(repliesCount) : 'Reply'}\n </span>\n </MenuItem>\n <MenuConfirm\n subMenu\n confirmLabel={\n <>\n <Icon icon=\"rocket\" />\n <span>{reblogged ? 'Unboost' : 'Boost'}</span>\n </>\n }\n className={`menu-reblog ${reblogged ? 'checked' : ''}`}\n menuExtras={\n <MenuItem\n onClick={() => {\n showCompose({\n draftStatus: {\n status: `\\n${url}`,\n },\n });\n }}\n >\n <Icon icon=\"quote\" />\n <span>Quote</span>\n </MenuItem>\n }\n menuFooter={\n mediaNoDesc && !reblogged ? (\n <div class=\"footer\">\n <Icon icon=\"alert\" />\n Some media have no descriptions.\n </div>\n ) : (\n statusMonthsAgo >= 3 && (\n <div class=\"footer\">\n <Icon icon=\"info\" />\n <span>\n Old post (\n <strong>{rtf.format(-statusMonthsAgo, 'month')}</strong>\n )\n </span>\n </div>\n )\n )\n }\n disabled={!canBoost}\n onClick={async () => {\n try {\n const done = await confirmBoostStatus();\n if (!isSizeLarge && done) {\n showToast(\n reblogged\n ? `Unboosted @${username || acct}'s post`\n : `Boosted @${username || acct}'s post`,\n );\n }\n } catch (e) {}\n }}\n >\n <Icon icon=\"rocket\" />\n <span>\n {reblogsCount > 0\n ? shortenNumber(reblogsCount)\n : reblogged\n ? 'Unboost'\n : 'Boost…'}\n </span>\n </MenuConfirm>\n <MenuItem\n onClick={favouriteStatusNotify}\n className={`menu-favourite ${favourited ? 'checked' : ''}`}\n >\n <Icon icon=\"heart\" />\n <span>\n {favouritesCount > 0\n ? shortenNumber(favouritesCount)\n : favourited\n ? 'Unlike'\n : 'Like'}\n </span>\n </MenuItem>\n {supports('@mastodon/post-bookmark') && (\n <MenuItem\n onClick={bookmarkStatusNotify}\n className={`menu-bookmark ${bookmarked ? 'checked' : ''}`}\n >\n <Icon icon=\"bookmark\" />\n <span>{bookmarked ? 'Unbookmark' : 'Bookmark'}</span>\n </MenuItem>\n )}\n </div>\n </>\n )}\n {!isSizeLarge && sameInstance && (isSizeLarge || showActionsBar) && (\n <MenuDivider />\n )}\n {(isSizeLarge || showActionsBar) && (\n <>\n <MenuItem\n onClick={() => {\n states.showGenericAccounts = {\n heading: 'Boosted/Liked by…',\n fetchAccounts: fetchBoostedLikedByAccounts,\n instance,\n showReactions: true,\n postID: sKey,\n };\n }}\n >\n <Icon icon=\"react\" />\n <span>\n Boosted/Liked by<span class=\"more-insignificant\">…</span>\n </span>\n </MenuItem>\n </>\n )}\n {!mediaFirst && (\n <>\n {(enableTranslate || !language || differentLanguage) && (\n <MenuDivider />\n )}\n {enableTranslate ? (\n <div class={supportsTTS ? 'menu-horizontal' : ''}>\n <MenuItem\n disabled={forceTranslate}\n onClick={() => {\n setForceTranslate(true);\n }}\n >\n <Icon icon=\"translate\" />\n <span>Translate</span>\n </MenuItem>\n {supportsTTS && (\n <MenuItem\n onClick={() => {\n const postText = getPostText(status);\n if (postText) {\n speak(postText, language);\n }\n }}\n >\n <Icon icon=\"speak\" />\n <span>Speak</span>\n </MenuItem>\n )}\n </div>\n ) : (\n (!language || differentLanguage) && (\n <div class={supportsTTS ? 'menu-horizontal' : ''}>\n <MenuLink\n to={`${instance ? `/${instance}` : ''}/s/${id}?translate=1`}\n >\n <Icon icon=\"translate\" />\n <span>Translate</span>\n </MenuLink>\n {supportsTTS && (\n <MenuItem\n onClick={() => {\n const postText = getPostText(status);\n if (postText) {\n speak(postText, language);\n }\n }}\n >\n <Icon icon=\"speak\" />\n <span>Speak</span>\n </MenuItem>\n )}\n </div>\n )\n )}\n </>\n )}\n {((!isSizeLarge && sameInstance) ||\n enableTranslate ||\n !language ||\n differentLanguage) && <MenuDivider />}\n {!isSizeLarge && (\n <>\n <MenuLink\n to={instance ? `/${instance}/s/${id}` : `/s/${id}`}\n onClick={(e) => {\n onStatusLinkClick(e, status);\n }}\n >\n <Icon icon=\"arrows-right\" />\n <small>\n View post by @{username || acct}\n <br />\n <span class=\"more-insignificant\">\n {visibilityText[visibility]} • {createdDateText}\n </span>\n </small>\n </MenuLink>\n </>\n )}\n {!!editedAt && (\n <>\n <MenuItem\n onClick={() => {\n setShowEdited(id);\n }}\n >\n <Icon icon=\"history\" />\n <small>\n Show Edit History\n <br />\n <span class=\"more-insignificant\">Edited: {editedDateText}</span>\n </small>\n </MenuItem>\n </>\n )}\n <MenuItem href={url} target=\"_blank\">\n <Icon icon=\"external\" />\n <small class=\"menu-double-lines\">{nicePostURL(url)}</small>\n </MenuItem>\n <div class=\"menu-horizontal\">\n <MenuItem\n onClick={() => {\n // Copy url to clipboard\n try {\n navigator.clipboard.writeText(url);\n showToast('Link copied');\n } catch (e) {\n console.error(e);\n showToast('Unable to copy link');\n }\n }}\n >\n <Icon icon=\"link\" />\n <span>Copy</span>\n </MenuItem>\n {isPublic &&\n navigator?.share &&\n navigator?.canShare?.({\n url,\n }) && (\n <MenuItem\n onClick={() => {\n try {\n navigator.share({\n url,\n });\n } catch (e) {\n console.error(e);\n alert(\"Sharing doesn't seem to work.\");\n }\n }}\n >\n <Icon icon=\"share\" />\n <span>Share…</span>\n </MenuItem>\n )}\n </div>\n {isPublic && isSizeLarge && (\n <MenuItem\n onClick={() => {\n setShowEmbed(true);\n }}\n >\n <Icon icon=\"code\" />\n <span>Embed post</span>\n </MenuItem>\n )}\n {(isSelf || mentionSelf) && <MenuDivider />}\n {(isSelf || mentionSelf) && (\n <MenuItem\n onClick={async () => {\n try {\n const newStatus = await masto.v1.statuses\n .$select(id)\n [muted ? 'unmute' : 'mute']();\n saveStatus(newStatus, instance);\n showToast(muted ? 'Conversation unmuted' : 'Conversation muted');\n } catch (e) {\n console.error(e);\n showToast(\n muted\n ? 'Unable to unmute conversation'\n : 'Unable to mute conversation',\n );\n }\n }}\n >\n {muted ? (\n <>\n <Icon icon=\"unmute\" />\n <span>Unmute conversation</span>\n </>\n ) : (\n <>\n <Icon icon=\"mute\" />\n <span>Mute conversation</span>\n </>\n )}\n </MenuItem>\n )}\n {isSelf && isPinnable && (\n <MenuItem\n onClick={async () => {\n try {\n const newStatus = await masto.v1.statuses\n .$select(id)\n [_pinned ? 'unpin' : 'pin']();\n // saveStatus(newStatus, instance);\n showToast(\n _pinned\n ? 'Post unpinned from profile'\n : 'Post pinned to profile',\n );\n } catch (e) {\n console.error(e);\n showToast(\n _pinned ? 'Unable to unpin post' : 'Unable to pin post',\n );\n }\n }}\n >\n {_pinned ? (\n <>\n <Icon icon=\"unpin\" />\n <span>Unpin from profile</span>\n </>\n ) : (\n <>\n <Icon icon=\"pin\" />\n <span>Pin to profile</span>\n </>\n )}\n </MenuItem>\n )}\n {isSelf && (\n <div class=\"menu-horizontal\">\n {supports('@mastodon/post-edit') && (\n <MenuItem\n onClick={() => {\n showCompose({\n editStatus: status,\n });\n }}\n >\n <Icon icon=\"pencil\" />\n <span>Edit</span>\n </MenuItem>\n )}\n {isSizeLarge && (\n <MenuConfirm\n subMenu\n confirmLabel={\n <>\n <Icon icon=\"trash\" />\n <span>Delete this post?</span>\n </>\n }\n menuItemClassName=\"danger\"\n onClick={() => {\n // const yes = confirm('Delete this post?');\n // if (yes) {\n (async () => {\n try {\n await masto.v1.statuses.$select(id).remove();\n const cachedStatus = getStatus(id, instance);\n cachedStatus._deleted = true;\n showToast('Deleted');\n } catch (e) {\n console.error(e);\n showToast('Unable to delete');\n }\n })();\n // }\n }}\n >\n <Icon icon=\"trash\" />\n <span>Delete…</span>\n </MenuConfirm>\n )}\n </div>\n )}\n {!isSelf && isSizeLarge && (\n <>\n <MenuDivider />\n <MenuItem\n className=\"danger\"\n onClick={() => {\n states.showReportModal = {\n account: status.account,\n post: status,\n };\n }}\n >\n <Icon icon=\"flag\" />\n <span>Report post…</span>\n </MenuItem>\n </>\n )}\n </>\n );\n\n const contextMenuRef = useRef();\n const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);\n const [contextMenuProps, setContextMenuProps] = useState({});\n\n const showContextMenu =\n allowContextMenu || (!isSizeLarge && !previewMode && !_deleted && !quoted);\n\n // Only iOS/iPadOS browsers don't support contextmenu\n // Some comments report iPadOS might support contextmenu if a mouse is connected\n const bindLongPressContext = useLongPress(\n isIOS && showContextMenu\n ? (e) => {\n if (e.pointerType === 'mouse') return;\n // There's 'pen' too, but not sure if contextmenu event would trigger from a pen\n\n const { clientX, clientY } = e.touches?.[0] || e;\n // link detection copied from onContextMenu because here it works\n const link = e.target.closest('a');\n if (\n link &&\n statusRef.current.contains(link) &&\n !link.getAttribute('href').startsWith('#')\n )\n return;\n e.preventDefault();\n setContextMenuProps({\n anchorPoint: {\n x: clientX,\n y: clientY,\n },\n direction: 'right',\n });\n setIsContextMenuOpen(true);\n }\n : null,\n {\n threshold: 600,\n captureEvent: true,\n detect: 'touch',\n cancelOnMovement: 2, // true allows movement of up to 25 pixels\n },\n );\n\n const hotkeysEnabled = !readOnly && !previewMode && !quoted;\n const rRef = useHotkeys('r, shift+r', replyStatus, {\n enabled: hotkeysEnabled,\n });\n const fRef = useHotkeys('f, l', favouriteStatusNotify, {\n enabled: hotkeysEnabled,\n });\n const dRef = useHotkeys('d', bookmarkStatusNotify, {\n enabled: hotkeysEnabled,\n });\n const bRef = useHotkeys(\n 'shift+b',\n () => {\n (async () => {\n try {\n const done = await confirmBoostStatus();\n if (!isSizeLarge && done) {\n showToast(\n reblogged\n ? `Unboosted @${username || acct}'s post`\n : `Boosted @${username || acct}'s post`,\n );\n }\n } catch (e) {}\n })();\n },\n {\n enabled: hotkeysEnabled && canBoost,\n },\n );\n const xRef = useHotkeys('x', (e) => {\n const activeStatus = document.activeElement.closest(\n '.status-link, .status-focus',\n );\n if (activeStatus) {\n const spoilerButton = activeStatus.querySelector(\n '.spoiler-button:not(.spoiling)',\n );\n if (spoilerButton) {\n e.stopPropagation();\n spoilerButton.click();\n } else {\n const spoilerMediaButton = activeStatus.querySelector(\n '.spoiler-media-button:not(.spoiling)',\n );\n if (spoilerMediaButton) {\n e.stopPropagation();\n spoilerMediaButton.click();\n }\n }\n }\n });\n\n const displayedMediaAttachments = mediaAttachments.slice(\n 0,\n isSizeLarge ? undefined : 4,\n );\n const showMultipleMediaCaptions =\n mediaAttachments.length > 1 &&\n displayedMediaAttachments.some(\n (media) => !!media.description && !isMediaCaptionLong(media.description),\n );\n const captionChildren = useMemo(() => {\n if (!showMultipleMediaCaptions) return null;\n const attachments = [];\n displayedMediaAttachments.forEach((media, i) => {\n if (!media.description) return;\n const index = attachments.findIndex(\n (attachment) => attachment.media.description === media.description,\n );\n if (index === -1) {\n attachments.push({\n media,\n indices: [i],\n });\n } else {\n attachments[index].indices.push(i);\n }\n });\n return attachments.map(({ media, indices }) => (\n <div\n key={media.id}\n data-caption-index={indices.map((i) => i + 1).join(' ')}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n states.showMediaAlt = {\n alt: media.description,\n lang: language,\n };\n }}\n title={media.description}\n >\n <sup>{indices.map((i) => i + 1).join(' ')}</sup> {media.description}\n </div>\n ));\n\n // return displayedMediaAttachments.map(\n // (media, i) =>\n // !!media.description && (\n // <div\n // key={media.id}\n // data-caption-index={i + 1}\n // onClick={(e) => {\n // e.preventDefault();\n // e.stopPropagation();\n // states.showMediaAlt = {\n // alt: media.description,\n // lang: language,\n // };\n // }}\n // title={media.description}\n // >\n // <sup>{i + 1}</sup> {media.description}\n // </div>\n // ),\n // );\n }, [showMultipleMediaCaptions, displayedMediaAttachments, language]);\n\n const isThread = useMemo(() => {\n return (\n (!!inReplyToId && inReplyToAccountId === status.account?.id) ||\n !!snapStates.statusThreadNumber[sKey]\n );\n }, [\n inReplyToId,\n inReplyToAccountId,\n status.account?.id,\n snapStates.statusThreadNumber[sKey],\n ]);\n\n const showCommentHint = useMemo(() => {\n return (\n enableCommentHint &&\n !isThread &&\n !withinContext &&\n !inReplyToId &&\n visibility === 'public' &&\n repliesCount > 0\n );\n }, [\n enableCommentHint,\n isThread,\n withinContext,\n inReplyToId,\n repliesCount,\n visibility,\n ]);\n const showCommentCount = useMemo(() => {\n if (\n card ||\n poll ||\n sensitive ||\n spoilerText ||\n mediaAttachments?.length ||\n isThread ||\n withinContext ||\n inReplyToId ||\n repliesCount <= 0\n ) {\n return false;\n }\n const questionRegex = /[???︖❓❔⁇⁈⁉¿‽؟]/;\n const containsQuestion = questionRegex.test(content);\n if (!containsQuestion) return false;\n const contentLength = htmlContentLength(content);\n if (contentLength > 0 && contentLength <= SHOW_COMMENT_COUNT_LIMIT) {\n return true;\n }\n }, [\n card,\n poll,\n sensitive,\n spoilerText,\n mediaAttachments,\n reblog,\n isThread,\n withinContext,\n inReplyToId,\n repliesCount,\n content,\n ]);\n\n return (\n <StatusParent>\n {showReplyParent && !!(inReplyToId && inReplyToAccountId) && (\n <StatusCompact sKey={sKey} />\n )}\n <article\n data-state-post-id={sKey}\n ref={(node) => {\n statusRef.current = node;\n // Use parent node if it's in focus\n // Use case: <a><status /></a>\n // When navigating (j/k), the <a> is focused instead of <status />\n // Hotkey binding doesn't bubble up thus this hack\n const nodeRef =\n node?.closest?.(\n '.timeline-item, .timeline-item-alt, .status-link, .status-focus',\n ) || node;\n rRef.current = nodeRef;\n fRef.current = nodeRef;\n dRef.current = nodeRef;\n bRef.current = nodeRef;\n xRef.current = nodeRef;\n }}\n tabindex=\"-1\"\n class={`status ${\n !withinContext && inReplyToId && inReplyToAccount\n ? 'status-reply-to'\n : ''\n } visibility-${visibility} ${_pinned ? 'status-pinned' : ''} ${\n SIZE_CLASS[size]\n } ${_deleted ? 'status-deleted' : ''} ${quoted ? 'status-card' : ''} ${\n isContextMenuOpen ? 'status-menu-open' : ''\n } ${mediaFirst && hasMediaAttachments ? 'status-media-first' : ''}`}\n onMouseEnter={debugHover}\n onContextMenu={(e) => {\n if (!showContextMenu) return;\n if (e.metaKey) return;\n // console.log('context menu', e);\n const link = e.target.closest('a');\n if (\n link &&\n statusRef.current.contains(link) &&\n !link.getAttribute('href').startsWith('#')\n )\n return;\n\n // If there's selected text, don't show custom context menu\n const selection = window.getSelection?.();\n if (selection.toString().length > 0) {\n const { anchorNode } = selection;\n if (statusRef.current?.contains(anchorNode)) {\n return;\n }\n }\n e.preventDefault();\n setContextMenuProps({\n anchorPoint: {\n x: e.clientX,\n y: e.clientY,\n },\n direction: 'right',\n });\n setIsContextMenuOpen(true);\n }}\n {...(showContextMenu ? bindLongPressContext() : {})}\n >\n {showContextMenu && (\n <ControlledMenu\n ref={contextMenuRef}\n state={isContextMenuOpen ? 'open' : undefined}\n {...contextMenuProps}\n onClose={(e) => {\n setIsContextMenuOpen(false);\n // statusRef.current?.focus?.();\n if (e?.reason === 'click') {\n statusRef.current?.closest('[tabindex]')?.focus?.();\n }\n }}\n portal={{\n target: document.body,\n }}\n containerProps={{\n style: {\n // Higher than the backdrop\n zIndex: 1001,\n },\n onClick: () => {\n contextMenuRef.current?.closeMenu?.();\n },\n }}\n overflow=\"auto\"\n boundingBoxPadding={safeBoundingBoxPadding()}\n unmountOnClose\n >\n {StatusMenuItems}\n </ControlledMenu>\n )}\n {showActionsBar &&\n size !== 'l' &&\n !previewMode &&\n !readOnly &&\n !_deleted &&\n !quoted && (\n <div\n class={`status-actions ${\n isContextMenuOpen === 'actions-bar' ? 'open' : ''\n }`}\n ref={actionsRef}\n >\n <StatusButton\n size=\"s\"\n title=\"Reply\"\n alt=\"Reply\"\n class=\"reply-button\"\n icon=\"comment\"\n iconSize=\"m\"\n onClick={replyStatus}\n />\n <StatusButton\n size=\"s\"\n checked={favourited}\n title={['Like', 'Unlike']}\n alt={['Like', 'Liked']}\n class=\"favourite-button\"\n icon=\"heart\"\n iconSize=\"m\"\n count={favouritesCount}\n onClick={favouriteStatusNotify}\n />\n <button\n type=\"button\"\n title=\"More\"\n class=\"plain more-button\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n setContextMenuProps({\n anchorRef: {\n current: e.currentTarget,\n },\n align: 'start',\n direction: 'left',\n gap: 0,\n shift: -8,\n });\n setIsContextMenuOpen('actions-bar');\n }}\n >\n <Icon icon=\"more2\" size=\"m\" alt=\"More\" />\n </button>\n </div>\n )}\n {size !== 'l' && (\n <div class=\"status-badge\">\n {reblogged && <Icon class=\"reblog\" icon=\"rocket\" size=\"s\" />}\n {favourited && <Icon class=\"favourite\" icon=\"heart\" size=\"s\" />}\n {bookmarked && <Icon class=\"bookmark\" icon=\"bookmark\" size=\"s\" />}\n {_pinned && <Icon class=\"pin\" icon=\"pin\" size=\"s\" />}\n </div>\n )}\n {size !== 's' && (\n <a\n href={accountURL}\n tabindex=\"-1\"\n // target=\"_blank\"\n title={`@${acct}`}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n states.showAccount = {\n account: status.account,\n instance,\n };\n }}\n >\n <Avatar url={avatarStatic || avatar} size=\"xxl\" squircle={bot} />\n </a>\n )}\n <div class=\"container\">\n <div class=\"meta\">\n <span class=\"meta-name\">\n <NameText\n account={status.account}\n instance={instance}\n showAvatar={size === 's'}\n showAcct={isSizeLarge}\n />\n </span>\n {/* {inReplyToAccount && !withinContext && size !== 's' && (\n <>\n {' '}\n <span class=\"ib\">\n <Icon icon=\"arrow-right\" class=\"arrow\" />{' '}\n <NameText account={inReplyToAccount} instance={instance} short />\n </span>\n </>\n )} */}\n {/* </span> */}{' '}\n {size !== 'l' &&\n (_deleted ? (\n <span class=\"status-deleted-tag\">Deleted</span>\n ) : url && !previewMode && !readOnly && !quoted ? (\n <Link\n to={instance ? `/${instance}/s/${id}` : `/s/${id}`}\n onClick={(e) => {\n if (\n e.metaKey ||\n e.ctrlKey ||\n e.shiftKey ||\n e.altKey ||\n e.which === 2\n ) {\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n onStatusLinkClick?.(e, status);\n setContextMenuProps({\n anchorRef: {\n current: e.currentTarget,\n },\n align: 'end',\n direction: 'bottom',\n gap: 4,\n });\n setIsContextMenuOpen(true);\n }}\n class={`time ${\n isContextMenuOpen && contextMenuProps?.anchorRef\n ? 'is-open'\n : ''\n }`}\n >\n {showCommentHint && !showCommentCount ? (\n <Icon\n icon=\"comment2\"\n size=\"s\"\n alt={`${repliesCount} ${\n repliesCount === 1 ? 'reply' : 'replies'\n }`}\n />\n ) : (\n visibility !== 'public' &&\n visibility !== 'direct' && (\n <Icon\n icon={visibilityIconsMap[visibility]}\n alt={visibilityText[visibility]}\n size=\"s\"\n />\n )\n )}{' '}\n <RelativeTime datetime={createdAtDate} format=\"micro\" />\n {!previewMode && !readOnly && (\n <Icon icon=\"more2\" class=\"more\" />\n )}\n </Link>\n ) : (\n // <Menu\n // instanceRef={menuInstanceRef}\n // portal={{\n // target: document.body,\n // }}\n // containerProps={{\n // style: {\n // // Higher than the backdrop\n // zIndex: 1001,\n // },\n // onClick: (e) => {\n // if (e.target === e.currentTarget)\n // menuInstanceRef.current?.closeMenu?.();\n // },\n // }}\n // align=\"end\"\n // gap={4}\n // overflow=\"auto\"\n // viewScroll=\"close\"\n // boundingBoxPadding=\"8 8 8 8\"\n // unmountOnClose\n // menuButton={({ open }) => (\n // <Link\n // to={instance ? `/${instance}/s/${id}` : `/s/${id}`}\n // onClick={(e) => {\n // e.preventDefault();\n // e.stopPropagation();\n // onStatusLinkClick?.(e, status);\n // }}\n // class={`time ${open ? 'is-open' : ''}`}\n // >\n // <Icon\n // icon={visibilityIconsMap[visibility]}\n // alt={visibilityText[visibility]}\n // size=\"s\"\n // />{' '}\n // <RelativeTime datetime={createdAtDate} format=\"micro\" />\n // </Link>\n // )}\n // >\n // {StatusMenuItems}\n // </Menu>\n <span class=\"time\">\n {visibility !== 'public' && visibility !== 'direct' && (\n <>\n <Icon\n icon={visibilityIconsMap[visibility]}\n alt={visibilityText[visibility]}\n size=\"s\"\n />{' '}\n </>\n )}\n <RelativeTime datetime={createdAtDate} format=\"micro\" />\n </span>\n ))}\n </div>\n {visibility === 'direct' && (\n <>\n <div class=\"status-direct-badge\">Private mention</div>{' '}\n </>\n )}\n {!withinContext && (\n <>\n {isThread ? (\n <div class=\"status-thread-badge\">\n <Icon icon=\"thread\" size=\"s\" />\n Thread\n {snapStates.statusThreadNumber[sKey]\n ? ` ${snapStates.statusThreadNumber[sKey]}/X`\n : ''}\n </div>\n ) : (\n !!inReplyToId &&\n !!inReplyToAccount &&\n (!!spoilerText ||\n !mentions.find((mention) => {\n return mention.id === inReplyToAccountId;\n })) && (\n <div class=\"status-reply-badge\">\n <Icon icon=\"reply\" />{' '}\n <NameText\n account={inReplyToAccount}\n instance={instance}\n short\n />\n </div>\n )\n )}\n </>\n )}\n <div\n class={`content-container ${\n spoilerText || sensitive ? 'has-spoiler' : ''\n } ${showSpoiler ? 'show-spoiler' : ''} ${\n showSpoilerMedia ? 'show-media' : ''\n }`}\n data-content-text-weight={contentTextWeight ? textWeight() : null}\n style={\n (isSizeLarge || contentTextWeight) && {\n '--content-text-weight': textWeight(),\n }\n }\n >\n {mediaFirst && hasMediaAttachments ? (\n <>\n {(!!spoilerText || !!sensitive) && !readingExpandSpoilers && (\n <>\n {!!spoilerText && (\n <span\n class=\"spoiler-content media-first-spoiler-content\"\n lang={language}\n dir=\"auto\"\n ref={spoilerContentRef}\n data-read-more={readMoreText}\n >\n <EmojiText text={spoilerText} emojis={emojis} />{' '}\n </span>\n )}\n <button\n class={`light spoiler-button media-first-spoiler-button ${\n showSpoiler ? 'spoiling' : ''\n }`}\n type=\"button\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n if (showSpoiler) {\n delete states.spoilers[id];\n if (!readingExpandSpoilers) {\n delete states.spoilersMedia[id];\n }\n } else {\n states.spoilers[id] = true;\n if (!readingExpandSpoilers) {\n states.spoilersMedia[id] = true;\n }\n }\n }}\n >\n <Icon icon={showSpoiler ? 'eye-open' : 'eye-close'} />{' '}\n {showSpoiler ? 'Show less' : 'Show content'}\n </button>\n </>\n )}\n <MediaFirstContainer\n mediaAttachments={mediaAttachments}\n language={language}\n postID={id}\n instance={instance}\n />\n {!!content && (\n <div class=\"media-first-content content\" ref={contentRef}>\n <PostContent\n post={status}\n instance={instance}\n previewMode={previewMode}\n />\n </div>\n )}\n </>\n ) : (\n <>\n {!!spoilerText && (\n <>\n <div\n class=\"content spoiler-content\"\n lang={language}\n dir=\"auto\"\n ref={spoilerContentRef}\n data-read-more={readMoreText}\n >\n <p>\n <EmojiText text={spoilerText} emojis={emojis} />\n </p>\n </div>\n {readingExpandSpoilers || previewMode ? (\n <div class=\"spoiler-divider\">\n <Icon icon=\"eye-open\" /> Content warning\n </div>\n ) : (\n <button\n class={`light spoiler-button ${\n showSpoiler ? 'spoiling' : ''\n }`}\n type=\"button\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n if (showSpoiler) {\n delete states.spoilers[id];\n if (!readingExpandSpoilers) {\n delete states.spoilersMedia[id];\n }\n } else {\n states.spoilers[id] = true;\n if (!readingExpandSpoilers) {\n states.spoilersMedia[id] = true;\n }\n }\n }}\n >\n <Icon icon={showSpoiler ? 'eye-open' : 'eye-close'} />{' '}\n {showSpoiler ? 'Show less' : 'Show content'}\n </button>\n )}\n </>\n )}\n {!!content && (\n <div\n class=\"content\"\n ref={contentRef}\n data-read-more={readMoreText}\n >\n <PostContent\n post={status}\n instance={instance}\n previewMode={previewMode}\n />\n <QuoteStatuses id={id} instance={instance} level={quoted} />\n </div>\n )}\n {!!poll && (\n <Poll\n lang={language}\n poll={poll}\n readOnly={readOnly || !sameInstance || !authenticated}\n onUpdate={(newPoll) => {\n states.statuses[sKey].poll = newPoll;\n }}\n refresh={() => {\n return masto.v1.polls\n .$select(poll.id)\n .fetch()\n .then((pollResponse) => {\n states.statuses[sKey].poll = pollResponse;\n })\n .catch((e) => {}); // Silently fail\n }}\n votePoll={(choices) => {\n return masto.v1.polls\n .$select(poll.id)\n .votes.create({\n choices,\n })\n .then((pollResponse) => {\n states.statuses[sKey].poll = pollResponse;\n })\n .catch((e) => {}); // Silently fail\n }}\n />\n )}\n {(((enableTranslate || inlineTranslate) &&\n !!content.trim() &&\n !!getHTMLText(emojifyText(content, emojis)) &&\n differentLanguage) ||\n forceTranslate) && (\n <TranslationBlock\n forceTranslate={forceTranslate || inlineTranslate}\n mini={!isSizeLarge && !withinContext}\n sourceLanguage={language}\n autoDetected={languageAutoDetected}\n text={getPostText(status)}\n />\n )}\n {!previewMode &&\n sensitive &&\n !!mediaAttachments.length &&\n readingExpandMedia !== 'show_all' && (\n <button\n class={`plain spoiler-media-button ${\n showSpoilerMedia ? 'spoiling' : ''\n }`}\n type=\"button\"\n hidden={!readingExpandSpoilers && !!spoilerText}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n if (showSpoilerMedia) {\n delete states.spoilersMedia[id];\n } else {\n states.spoilersMedia[id] = true;\n }\n }}\n >\n <Icon\n icon={showSpoilerMedia ? 'eye-open' : 'eye-close'}\n />{' '}\n {showSpoilerMedia ? 'Show less' : 'Show media'}\n </button>\n )}\n {!!mediaAttachments.length && (\n <MultipleMediaFigure\n lang={language}\n enabled={showMultipleMediaCaptions}\n captionChildren={captionChildren}\n >\n <div\n ref={mediaContainerRef}\n class={`media-container media-eq${\n mediaAttachments.length\n } ${mediaAttachments.length > 2 ? 'media-gt2' : ''} ${\n mediaAttachments.length > 4 ? 'media-gt4' : ''\n }`}\n >\n {displayedMediaAttachments.map((media, i) => (\n <Media\n key={media.id}\n media={media}\n autoAnimate={isSizeLarge}\n showCaption={mediaAttachments.length === 1}\n allowLongerCaption={\n !content && mediaAttachments.length === 1\n }\n lang={language}\n altIndex={\n showMultipleMediaCaptions &&\n !!media.description &&\n i + 1\n }\n to={`/${instance}/s/${id}?${\n withinContext ? 'media' : 'media-only'\n }=${i + 1}`}\n onClick={\n onMediaClick\n ? (e) => {\n onMediaClick(e, i, media, status);\n }\n : undefined\n }\n />\n ))}\n </div>\n </MultipleMediaFigure>\n )}\n {!!card &&\n /^https/i.test(card?.url) &&\n !sensitive &&\n !spoilerText &&\n !poll &&\n !mediaAttachments.length &&\n !snapStates.statusQuotes[sKey] && (\n <Card\n card={card}\n selfReferential={\n card?.url === status.url || card?.url === status.uri\n }\n instance={currentInstance}\n />\n )}\n </>\n )}\n </div>\n {!isSizeLarge && showCommentCount && (\n <div class=\"content-comment-hint insignificant\">\n <Icon icon=\"comment2\" alt=\"Replies\" /> {repliesCount}\n </div>\n )}\n {isSizeLarge && (\n <>\n <div class=\"extra-meta\">\n {_deleted ? (\n <span class=\"status-deleted-tag\">Deleted</span>\n ) : (\n <>\n {/* <Icon\n icon={visibilityIconsMap[visibility]}\n alt={visibilityText[visibility]}\n /> */}\n <span>{visibilityText[visibility]}</span> &bull;{' '}\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\">\n <time\n class=\"created\"\n datetime={createdAtDate.toISOString()}\n title={createdAtDate.toLocaleString()}\n >\n {createdDateText}\n </time>\n </a>\n {editedAt && (\n <>\n {' '}\n &bull; <Icon icon=\"pencil\" alt=\"Edited\" />{' '}\n <time\n tabIndex=\"0\"\n class=\"edited\"\n datetime={editedAtDate.toISOString()}\n onClick={() => {\n setShowEdited(id);\n }}\n >\n {editedDateText}\n </time>\n </>\n )}\n </>\n )}\n </div>\n {!!emojiReactions?.length && (\n <div class=\"emoji-reactions\">\n {emojiReactions.map((emojiReaction) => {\n const { name, count, me, url, staticUrl } = emojiReaction;\n if (url) {\n // Some servers return url and staticUrl\n return (\n <span\n class={`emoji-reaction tag ${\n me ? '' : 'insignificant'\n }`}\n >\n <CustomEmoji\n alt={name}\n url={url}\n staticUrl={staticUrl}\n />{' '}\n {count}\n </span>\n );\n }\n const isShortCode = /^:.+?:$/.test(name);\n if (isShortCode) {\n const emoji = emojis.find(\n (e) =>\n e.shortcode ===\n name.replace(/^:/, '').replace(/:$/, ''),\n );\n if (emoji) {\n return (\n <span\n class={`emoji-reaction tag ${\n me ? '' : 'insignificant'\n }`}\n >\n <CustomEmoji\n alt={name}\n url={emoji.url}\n staticUrl={emoji.staticUrl}\n />{' '}\n {count}\n </span>\n );\n }\n }\n return (\n <span\n class={`emoji-reaction tag ${\n me ? '' : 'insignificant'\n }`}\n >\n {name} {count}\n </span>\n );\n })}\n </div>\n )}\n <div class={`actions ${_deleted ? 'disabled' : ''}`}>\n <div class=\"action has-count\">\n <StatusButton\n title=\"Reply\"\n alt=\"Comments\"\n class=\"reply-button\"\n icon=\"comment\"\n count={repliesCount}\n onClick={replyStatus}\n />\n </div>\n {/* <div class=\"action has-count\">\n <StatusButton\n checked={reblogged}\n title={['Boost', 'Unboost']}\n alt={['Boost', 'Boosted']}\n class=\"reblog-button\"\n icon=\"rocket\"\n count={reblogsCount}\n onClick={boostStatus}\n disabled={!canBoost}\n />\n </div> */}\n <MenuConfirm\n disabled={!canBoost}\n onClick={confirmBoostStatus}\n confirmLabel={\n <>\n <Icon icon=\"rocket\" />\n <span>{reblogged ? 'Unboost' : 'Boost'}</span>\n </>\n }\n menuExtras={\n <MenuItem\n onClick={() => {\n showCompose({\n draftStatus: {\n status: `\\n${url}`,\n },\n });\n }}\n >\n <Icon icon=\"quote\" />\n <span>Quote</span>\n </MenuItem>\n }\n menuFooter={\n mediaNoDesc &&\n !reblogged && (\n <div class=\"footer\">\n <Icon icon=\"alert\" />\n Some media have no descriptions.\n </div>\n )\n }\n >\n <div class=\"action has-count\">\n <StatusButton\n checked={reblogged}\n title={['Boost', 'Unboost']}\n alt={['Boost', 'Boosted']}\n class=\"reblog-button\"\n icon=\"rocket\"\n count={reblogsCount}\n // onClick={boostStatus}\n disabled={!canBoost}\n />\n </div>\n </MenuConfirm>\n <div class=\"action has-count\">\n <StatusButton\n checked={favourited}\n title={['Like', 'Unlike']}\n alt={['Like', 'Liked']}\n class=\"favourite-button\"\n icon=\"heart\"\n count={favouritesCount}\n onClick={favouriteStatus}\n />\n </div>\n {supports('@mastodon/post-bookmark') && (\n <div class=\"action\">\n <StatusButton\n checked={bookmarked}\n title={['Bookmark', 'Unbookmark']}\n alt={['Bookmark', 'Bookmarked']}\n class=\"bookmark-button\"\n icon=\"bookmark\"\n onClick={bookmarkStatus}\n />\n </div>\n )}\n <Menu2\n portal={{\n target:\n document.querySelector('.status-deck') || document.body,\n }}\n align=\"end\"\n gap={4}\n overflow=\"auto\"\n viewScroll=\"close\"\n menuButton={\n <div class=\"action\">\n <button\n type=\"button\"\n title=\"More\"\n class=\"plain more-button\"\n >\n <Icon icon=\"more\" size=\"l\" alt=\"More\" />\n </button>\n </div>\n }\n >\n {StatusMenuItems}\n </Menu2>\n </div>\n </>\n )}\n </div>\n {!!showEdited && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n setShowEdited(false);\n // statusRef.current?.focus();\n }\n }}\n >\n <EditedAtModal\n statusID={showEdited}\n instance={instance}\n fetchStatusHistory={() => {\n return masto.v1.statuses.$select(showEdited).history.list();\n }}\n onClose={() => {\n setShowEdited(false);\n statusRef.current?.focus();\n }}\n />\n </Modal>\n )}\n {!!showEmbed && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n setShowEmbed(false);\n }\n }}\n >\n <EmbedModal\n post={status}\n instance={instance}\n onClose={() => {\n setShowEmbed(false);\n }}\n />\n </Modal>\n )}\n </article>\n </StatusParent>\n );\n}\n\nfunction MultipleMediaFigure(props) {\n const { enabled, children, lang, captionChildren } = props;\n if (!enabled || !captionChildren) return children;\n return (\n <figure class=\"media-figure-multiple\">\n {children}\n <figcaption lang={lang} dir=\"auto\">\n {captionChildren}\n </figcaption>\n </figure>\n );\n}\n\nfunction MediaFirstContainer(props) {\n const { mediaAttachments, language, postID, instance } = props;\n const moreThanOne = mediaAttachments.length > 1;\n\n const carouselRef = useRef();\n const [currentIndex, setCurrentIndex] = useState(0);\n\n useEffect(() => {\n let handleScroll = () => {\n const { clientWidth, scrollLeft } = carouselRef.current;\n const index = Math.round(scrollLeft / clientWidth);\n setCurrentIndex(index);\n };\n if (carouselRef.current) {\n carouselRef.current.addEventListener('scroll', handleScroll, {\n passive: true,\n });\n }\n return () => {\n if (carouselRef.current) {\n carouselRef.current.removeEventListener('scroll', handleScroll);\n }\n };\n }, []);\n\n return (\n <>\n <div class=\"media-first-container\">\n <div class=\"media-first-carousel\" ref={carouselRef}>\n {mediaAttachments.map((media, i) => (\n <div class=\"media-first-item\" key={media.id}>\n <Media\n media={media}\n lang={language}\n to={`/${instance}/s/${postID}?media=${i + 1}`}\n />\n </div>\n ))}\n </div>\n {moreThanOne && (\n <div class=\"media-carousel-controls\">\n <div class=\"carousel-indexer\">\n {currentIndex + 1}/{mediaAttachments.length}\n </div>\n <label class=\"media-carousel-button\">\n <button\n type=\"button\"\n class=\"carousel-button\"\n hidden={currentIndex === 0}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n carouselRef.current.focus();\n carouselRef.current.scrollTo({\n left: carouselRef.current.clientWidth * (currentIndex - 1),\n behavior: 'smooth',\n });\n }}\n >\n <Icon icon=\"arrow-left\" />\n </button>\n </label>\n <label class=\"media-carousel-button\">\n <button\n type=\"button\"\n class=\"carousel-button\"\n hidden={currentIndex === mediaAttachments.length - 1}\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n carouselRef.current.focus();\n carouselRef.current.scrollTo({\n left: carouselRef.current.clientWidth * (currentIndex + 1),\n behavior: 'smooth',\n });\n }}\n >\n <Icon icon=\"arrow-right\" />\n </button>\n </label>\n </div>\n )}\n </div>\n {moreThanOne && (\n <div\n class=\"media-carousel-dots\"\n style={{\n '--dots-count': mediaAttachments.length,\n }}\n >\n {mediaAttachments.map((media, i) => (\n <span\n key={media.id}\n class={`carousel-dot ${i === currentIndex ? 'active' : ''}`}\n />\n ))}\n </div>\n )}\n </>\n );\n}\n\nfunction Card({ card, selfReferential, instance }) {\n const snapStates = useSnapshot(states);\n const {\n blurhash,\n title,\n description,\n html,\n providerName,\n providerUrl,\n authorName,\n authorUrl,\n width,\n height,\n image,\n imageDescription,\n url,\n type,\n embedUrl,\n language,\n publishedAt,\n } = card;\n\n /* type\n link = Link OEmbed\n photo = Photo OEmbed\n video = Video OEmbed\n rich = iframe OEmbed. Not currently accepted, so wont show up in practice.\n */\n\n const hasText = title || providerName || authorName;\n const isLandscape = width / height >= 1.2;\n const size = isLandscape ? 'large' : '';\n\n const [cardStatusURL, setCardStatusURL] = useState(null);\n // const [cardStatusID, setCardStatusID] = useState(null);\n useEffect(() => {\n if (hasText && image && !selfReferential && isMastodonLinkMaybe(url)) {\n unfurlMastodonLink(instance, url).then((result) => {\n if (!result) return;\n const { id, url } = result;\n setCardStatusURL('#' + url);\n\n // NOTE: This is for quote post\n // (async () => {\n // const { masto } = api({ instance });\n // const status = await masto.v1.statuses.$select(id).fetch();\n // saveStatus(status, instance);\n // setCardStatusID(id);\n // })();\n });\n }\n }, [hasText, image, selfReferential]);\n\n // if (cardStatusID) {\n // return (\n // <Status statusID={cardStatusID} instance={instance} size=\"s\" readOnly />\n // );\n // }\n\n if (snapStates.unfurledLinks[url]) return null;\n\n const hasIframeHTML = /<iframe/i.test(html);\n const handleClick = useCallback(\n (e) => {\n if (hasIframeHTML) {\n e.preventDefault();\n states.showEmbedModal = {\n html,\n url: url || embedUrl,\n width,\n height,\n };\n }\n },\n [hasIframeHTML],\n );\n\n if (hasText && (image || (type === 'photo' && blurhash))) {\n const domain = punycode.toUnicode(\n new URL(url).hostname.replace(/^www\\./, '').replace(/\\/$/, ''),\n );\n let blurhashImage;\n const rgbAverageColor =\n image && blurhash ? getBlurHashAverageColor(blurhash) : null;\n if (!image) {\n const w = 44;\n const h = 44;\n const blurhashPixels = decodeBlurHash(blurhash, w, h);\n const canvas = window.OffscreenCanvas\n ? new OffscreenCanvas(1, 1)\n : document.createElement('canvas');\n canvas.width = w;\n canvas.height = h;\n const ctx = canvas.getContext('2d');\n ctx.imageSmoothingEnabled = false;\n const imageData = ctx.createImageData(w, h);\n imageData.data.set(blurhashPixels);\n ctx.putImageData(imageData, 0, 0);\n blurhashImage = canvas.toDataURL();\n }\n return (\n <a\n href={cardStatusURL || url}\n target={cardStatusURL ? null : '_blank'}\n rel=\"nofollow noopener noreferrer\"\n class={`card link ${blurhashImage ? '' : size}`}\n lang={language}\n dir=\"auto\"\n style={{\n '--average-color':\n rgbAverageColor && `rgb(${rgbAverageColor.join(',')})`,\n }}\n onClick={handleClick}\n >\n <div class=\"card-image\">\n <img\n src={image || blurhashImage}\n width={width}\n height={height}\n loading=\"lazy\"\n alt={imageDescription || ''}\n onError={(e) => {\n try {\n e.target.style.display = 'none';\n } catch (e) {}\n }}\n />\n </div>\n <div class=\"meta-container\">\n <p class=\"meta domain\">\n <span class=\"domain\">{domain}</span>{' '}\n {!!publishedAt && <>&middot; </>}\n {!!publishedAt && (\n <>\n <RelativeTime datetime={publishedAt} format=\"micro\" />\n </>\n )}\n </p>\n <p class=\"title\" dir=\"auto\" title={title}>\n {title}\n </p>\n <p class=\"meta\" dir=\"auto\" title={description}>\n {description ||\n (!!publishedAt && (\n <RelativeTime datetime={publishedAt} format=\"micro\" />\n ))}\n </p>\n </div>\n </a>\n );\n } else if (type === 'photo') {\n return (\n <a\n href={url}\n target=\"_blank\"\n rel=\"nofollow noopener noreferrer\"\n class=\"card photo\"\n onClick={handleClick}\n >\n <img\n src={embedUrl}\n width={width}\n height={height}\n alt={title || description}\n loading=\"lazy\"\n style={{\n height: 'auto',\n aspectRatio: `${width}/${height}`,\n }}\n />\n </a>\n );\n } else {\n if (type === 'video') {\n if (/youtube/i.test(providerName)) {\n // Get ID from e.g. https://www.youtube.com/watch?v=[VIDEO_ID]\n const videoID = url.match(/watch\\?v=([^&]+)/)?.[1];\n if (videoID) {\n return (\n <a class=\"card video\" onClick={handleClick}>\n <lite-youtube videoid={videoID} nocookie></lite-youtube>\n </a>\n );\n }\n }\n // return (\n // <div\n // class=\"card video\"\n // style={{\n // aspectRatio: `${width}/${height}`,\n // }}\n // dangerouslySetInnerHTML={{ __html: html }}\n // />\n // );\n }\n if (hasText && !image) {\n const domain = punycode.toUnicode(\n new URL(url).hostname.replace(/^www\\./, ''),\n );\n return (\n <a\n href={cardStatusURL || url}\n target={cardStatusURL ? null : '_blank'}\n rel=\"nofollow noopener noreferrer\"\n class={`card link no-image`}\n lang={language}\n onClick={handleClick}\n >\n <div class=\"meta-container\">\n <p class=\"meta domain\">\n <span class=\"domain\">\n <Icon icon=\"link\" size=\"s\" /> <span>{domain}</span>\n </span>{' '}\n {!!publishedAt && <>&middot; </>}\n {!!publishedAt && (\n <>\n <RelativeTime datetime={publishedAt} format=\"micro\" />\n </>\n )}\n </p>\n <p class=\"title\" title={title}>\n {title}\n </p>\n <p class=\"meta\" title={description || providerName || authorName}>\n {description || providerName || authorName}\n </p>\n </div>\n </a>\n );\n }\n }\n}\n\nfunction EditedAtModal({\n statusID,\n instance,\n fetchStatusHistory = () => {},\n onClose,\n}) {\n const [uiState, setUIState] = useState('default');\n const [editHistory, setEditHistory] = useState([]);\n\n useEffect(() => {\n setUIState('loading');\n (async () => {\n try {\n const editHistory = await fetchStatusHistory();\n console.log(editHistory);\n setEditHistory(editHistory);\n setUIState('default');\n } catch (e) {\n console.error(e);\n setUIState('error');\n }\n })();\n }, []);\n\n return (\n <div id=\"edit-history\" class=\"sheet\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" />\n </button>\n )}\n <header>\n <h2>Edit History</h2>\n {uiState === 'error' && <p>Failed to load history</p>}\n {uiState === 'loading' && (\n <p>\n <Loader abrupt /> Loading&hellip;\n </p>\n )}\n </header>\n <main tabIndex=\"-1\">\n {editHistory.length > 0 && (\n <ol>\n {editHistory.map((status) => {\n const { createdAt } = status;\n const createdAtDate = new Date(createdAt);\n return (\n <li key={createdAt} class=\"history-item\">\n <h3>\n <time>\n {niceDateTime(createdAtDate, {\n formatOpts: {\n weekday: 'short',\n second: 'numeric',\n },\n })}\n </time>\n </h3>\n <Status\n status={status}\n instance={instance}\n size=\"s\"\n withinContext\n readOnly\n previewMode\n />\n </li>\n );\n })}\n </ol>\n )}\n </main>\n </div>\n );\n}\n\nfunction generateHTMLCode(post, instance, level = 0) {\n const {\n account: {\n url: accountURL,\n displayName,\n acct,\n username,\n emojis: accountEmojis,\n bot,\n group,\n },\n id,\n poll,\n spoilerText,\n language,\n editedAt,\n createdAt,\n content,\n mediaAttachments,\n url,\n emojis,\n } = post;\n\n const sKey = statusKey(id, instance);\n const quotes = states.statusQuotes[sKey] || [];\n const uniqueQuotes = quotes.filter(\n (q, i, arr) => arr.findIndex((q2) => q2.url === q.url) === i,\n );\n const quoteStatusesHTML =\n uniqueQuotes.length && level <= 2\n ? uniqueQuotes\n .map((quote) => {\n const { id, instance } = quote;\n const sKey = statusKey(id, instance);\n const s = states.statuses[sKey];\n if (s) {\n return generateHTMLCode(s, instance, ++level);\n }\n })\n .join('')\n : '';\n\n const createdAtDate = new Date(createdAt);\n // const editedAtDate = editedAt && new Date(editedAt);\n\n const contentHTML =\n emojifyText(content, emojis) +\n '\\n' +\n quoteStatusesHTML +\n '\\n' +\n (poll?.options?.length\n ? `\n <p>📊:</p>\n <ul>\n ${poll.options\n .map(\n (option) => `\n <li>\n ${option.title}\n ${option.votesCount >= 0 ? ` (${option.votesCount})` : ''}\n </li>\n `,\n )\n .join('')}\n </ul>`\n : '') +\n (mediaAttachments.length > 0\n ? '\\n' +\n mediaAttachments\n .map((media) => {\n const {\n description,\n meta,\n previewRemoteUrl,\n previewUrl,\n remoteUrl,\n url,\n type,\n } = media;\n const { original = {}, small } = meta || {};\n const width = small?.width || original?.width;\n const height = small?.height || original?.height;\n\n // Prefer remote over original\n const sourceMediaURL = remoteUrl || url;\n const previewMediaURL = previewRemoteUrl || previewUrl;\n const mediaURL = previewMediaURL || sourceMediaURL;\n\n const sourceMediaURLObj = sourceMediaURL\n ? new URL(sourceMediaURL)\n : null;\n const isVideoMaybe =\n type === 'unknown' &&\n sourceMediaURLObj &&\n /\\.(mp4|m4r|m4v|mov|webm)$/i.test(sourceMediaURLObj.pathname);\n const isAudioMaybe =\n type === 'unknown' &&\n sourceMediaURLObj &&\n /\\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(sourceMediaURLObj.pathname);\n const isImage =\n type === 'image' ||\n (type === 'unknown' &&\n previewMediaURL &&\n !isVideoMaybe &&\n !isAudioMaybe);\n const isVideo = type === 'gifv' || type === 'video' || isVideoMaybe;\n const isAudio = type === 'audio' || isAudioMaybe;\n\n let mediaHTML = '';\n if (isImage) {\n mediaHTML = `<img src=\"${mediaURL}\" width=\"${width}\" height=\"${height}\" alt=\"${description}\" loading=\"lazy\" />`;\n } else if (isVideo) {\n mediaHTML = `\n <video src=\"${sourceMediaURL}\" width=\"${width}\" height=\"${height}\" controls preload=\"auto\" poster=\"${previewMediaURL}\" loading=\"lazy\"></video>\n ${description ? `<figcaption>${description}</figcaption>` : ''}\n `;\n } else if (isAudio) {\n mediaHTML = `\n <audio src=\"${sourceMediaURL}\" controls preload=\"auto\"></audio>\n ${description ? `<figcaption>${description}</figcaption>` : ''}\n `;\n } else {\n mediaHTML = `\n <a href=\"${sourceMediaURL}\">📄 ${\n description || sourceMediaURL\n }</a>\n `;\n }\n\n return `<figure>${mediaHTML}</figure>`;\n })\n .join('\\n')\n : '');\n\n const htmlCode = `\n <blockquote lang=\"${language}\" cite=\"${url}\">\n ${\n spoilerText\n ? `\n <details>\n <summary>${spoilerText}</summary>\n ${contentHTML}\n </details>\n `\n : contentHTML\n }\n <footer>\n — ${emojifyText(\n displayName,\n accountEmojis,\n )} (@${acct}) <a href=\"${url}\"><time datetime=\"${createdAtDate.toISOString()}\">${createdAtDate.toLocaleString()}</time></a>\n </footer>\n </blockquote>\n `;\n\n return prettify(htmlCode);\n}\n\nfunction EmbedModal({ post, instance, onClose }) {\n const {\n account: {\n url: accountURL,\n displayName,\n username,\n emojis: accountEmojis,\n bot,\n group,\n },\n id,\n poll,\n spoilerText,\n language,\n editedAt,\n createdAt,\n content,\n mediaAttachments,\n url,\n emojis,\n } = post;\n\n const htmlCode = generateHTMLCode(post, instance);\n return (\n <div id=\"embed-post\" class=\"sheet\">\n {!!onClose && (\n <button type=\"button\" class=\"sheet-close\" onClick={onClose}>\n <Icon icon=\"x\" />\n </button>\n )}\n <header>\n <h2>Embed post</h2>\n </header>\n <main tabIndex=\"-1\">\n <h3>HTML Code</h3>\n <textarea\n class=\"embed-code\"\n readonly\n onClick={(e) => {\n e.target.select();\n }}\n >\n {htmlCode}\n </textarea>\n <button\n type=\"button\"\n onClick={() => {\n try {\n navigator.clipboard.writeText(htmlCode);\n showToast('HTML code copied');\n } catch (e) {\n console.error(e);\n showToast('Unable to copy HTML code');\n }\n }}\n >\n <Icon icon=\"clipboard\" /> <span>Copy</span>\n </button>\n {!!mediaAttachments?.length && (\n <section>\n <p>Media attachments:</p>\n <ol class=\"links-list\">\n {mediaAttachments.map((media) => {\n return (\n <li key={media.id}>\n <a\n href={media.remoteUrl || media.url}\n target=\"_blank\"\n download\n >\n {media.remoteUrl || media.url}\n </a>\n </li>\n );\n })}\n </ol>\n </section>\n )}\n {!!accountEmojis?.length && (\n <section>\n <p>Account Emojis:</p>\n <ul>\n {accountEmojis.map((emoji) => {\n return (\n <li key={emoji.shortcode}>\n <picture>\n <source\n srcset={emoji.staticUrl}\n media=\"(prefers-reduced-motion: reduce)\"\n ></source>\n <img\n class=\"shortcode-emoji emoji\"\n src={emoji.url}\n alt={`:${emoji.shortcode}:`}\n width=\"16\"\n height=\"16\"\n loading=\"lazy\"\n decoding=\"async\"\n />\n </picture>{' '}\n <code>:{emoji.shortcode}:</code> (\n <a href={emoji.url} target=\"_blank\" download>\n url\n </a>\n )\n {emoji.staticUrl ? (\n <>\n {' '}\n (\n <a href={emoji.staticUrl} target=\"_blank\" download>\n static\n </a>\n )\n </>\n ) : null}\n </li>\n );\n })}\n </ul>\n </section>\n )}\n {!!emojis?.length && (\n <section>\n <p>Emojis:</p>\n <ul>\n {emojis.map((emoji) => {\n return (\n <li key={emoji.shortcode}>\n <picture>\n <source\n srcset={emoji.staticUrl}\n media=\"(prefers-reduced-motion: reduce)\"\n ></source>\n <img\n class=\"shortcode-emoji emoji\"\n src={emoji.url}\n alt={`:${emoji.shortcode}:`}\n width=\"16\"\n height=\"16\"\n loading=\"lazy\"\n decoding=\"async\"\n />\n </picture>{' '}\n <code>:{emoji.shortcode}:</code> (\n <a href={emoji.url} target=\"_blank\" download>\n url\n </a>\n )\n {emoji.staticUrl ? (\n <>\n {' '}\n (\n <a href={emoji.staticUrl} target=\"_blank\" download>\n static\n </a>\n )\n </>\n ) : null}\n </li>\n );\n })}\n </ul>\n </section>\n )}\n <section>\n <small>\n <p>Notes:</p>\n <ul>\n <li>\n This is static, unstyled and scriptless. You may need to apply\n your own styles and edit as needed.\n </li>\n <li>\n Polls are not interactive, becomes a list with vote counts.\n </li>\n <li>\n Media attachments can be images, videos, audios or any file\n types.\n </li>\n <li>Post could be edited or deleted later.</li>\n </ul>\n </small>\n </section>\n <h3>Preview</h3>\n <output\n class=\"embed-preview\"\n dangerouslySetInnerHTML={{ __html: htmlCode }}\n />\n <p>\n <small>Note: This preview is lightly styled.</small>\n </p>\n </main>\n </div>\n );\n}\n\nfunction StatusButton({\n checked,\n count,\n class: className,\n title,\n alt,\n size,\n icon,\n iconSize = 'l',\n onClick,\n ...props\n}) {\n if (typeof title === 'string') {\n title = [title, title];\n }\n if (typeof alt === 'string') {\n alt = [alt, alt];\n }\n\n const [buttonTitle, setButtonTitle] = useState(title[0] || '');\n const [iconAlt, setIconAlt] = useState(alt[0] || '');\n\n useEffect(() => {\n if (checked) {\n setButtonTitle(title[1] || '');\n setIconAlt(alt[1] || '');\n } else {\n setButtonTitle(title[0] || '');\n setIconAlt(alt[0] || '');\n }\n }, [checked, title, alt]);\n\n return (\n <button\n type=\"button\"\n title={buttonTitle}\n class={`plain ${size ? 'small' : ''} ${className} ${\n checked ? 'checked' : ''\n }`}\n onClick={(e) => {\n if (!onClick) return;\n e.preventDefault();\n e.stopPropagation();\n onClick(e);\n }}\n {...props}\n >\n <Icon icon={icon} size={iconSize} alt={iconAlt} />\n {!!count && (\n <>\n {' '}\n <small title={count}>{shortenNumber(count)}</small>\n </>\n )}\n </button>\n );\n}\n\nfunction nicePostURL(url) {\n if (!url) return;\n const urlObj = new URL(url);\n const { host, pathname } = urlObj;\n const path = pathname.replace(/\\/$/, '');\n // split only first slash\n const [_, username, restPath] = path.match(/\\/(@[^\\/]+)\\/(.*)/) || [];\n return (\n <>\n {punycode.toUnicode(host)}\n {username ? (\n <>\n /{username}\n <wbr />\n <span class=\"more-insignificant\">/{restPath}</span>\n </>\n ) : (\n <span class=\"more-insignificant\">{path}</span>\n )}\n </>\n );\n}\n\nfunction StatusCompact({ sKey }) {\n const snapStates = useSnapshot(states);\n const statusReply = snapStates.statusReply[sKey];\n if (!statusReply) return null;\n\n const { id, instance } = statusReply;\n const status = getStatus(id, instance);\n if (!status) return null;\n\n const {\n sensitive,\n spoilerText,\n account: { avatar, avatarStatic, bot } = {},\n visibility,\n content,\n language,\n filtered,\n } = status;\n if (sensitive || spoilerText) return null;\n if (!content) return null;\n\n const srKey = statusKey(id, instance);\n const statusPeekText = statusPeek(status);\n\n const filterContext = useContext(FilterContext);\n const filterInfo = isFiltered(filtered, filterContext);\n\n if (filterInfo?.action === 'hide') return null;\n\n const filterTitleStr = filterInfo?.titlesStr || '';\n\n return (\n <article\n class={`status compact-reply ${\n visibility === 'direct' ? 'visibility-direct' : ''\n }`}\n tabindex=\"-1\"\n data-state-post-id={srKey}\n >\n <Avatar url={avatarStatic || avatar} squircle={bot} />\n <div\n class=\"content-compact\"\n title={statusPeekText}\n lang={language}\n dir=\"auto\"\n >\n {filterInfo ? (\n <b class=\"status-filtered-badge badge-meta\" title={filterTitleStr}>\n <span>Filtered</span>\n <span>{filterTitleStr}</span>\n </b>\n ) : (\n <span>{statusPeekText}</span>\n )}\n </div>\n </article>\n );\n}\n\nfunction FilteredStatus({\n status,\n filterInfo,\n instance,\n containerProps = {},\n showFollowedTags,\n quoted,\n}) {\n const snapStates = useSnapshot(states);\n const {\n id: statusID,\n account: { avatar, avatarStatic, bot, group },\n createdAt,\n visibility,\n reblog,\n } = status;\n const isReblog = !!reblog;\n const filterTitleStr = filterInfo?.titlesStr || '';\n const createdAtDate = new Date(createdAt);\n const statusPeekText = statusPeek(status.reblog || status);\n\n const [showPeek, setShowPeek] = useState(false);\n const bindLongPressPeek = useLongPress(\n () => {\n setShowPeek(true);\n },\n {\n threshold: 600,\n captureEvent: true,\n detect: 'touch',\n cancelOnMovement: 2, // true allows movement of up to 25 pixels\n },\n );\n\n const statusPeekRef = useTruncated();\n const sKey = statusKey(status.id, instance);\n const ssKey =\n statusKey(status.id, instance) +\n ' ' +\n (statusKey(reblog?.id, instance) || '');\n\n const actualStatusID = reblog?.id || statusID;\n const url = instance\n ? `/${instance}/s/${actualStatusID}`\n : `/s/${actualStatusID}`;\n const isFollowedTags =\n showFollowedTags && !!snapStates.statusFollowedTags[sKey]?.length;\n\n return (\n <div\n class={\n quoted\n ? ''\n : isReblog\n ? group\n ? 'status-group'\n : 'status-reblog'\n : isFollowedTags\n ? 'status-followed-tags'\n : ''\n }\n {...containerProps}\n // title={statusPeekText}\n onContextMenu={(e) => {\n e.preventDefault();\n setShowPeek(true);\n }}\n {...bindLongPressPeek()}\n >\n <article\n data-state-post-id={ssKey}\n class={`status filtered ${quoted ? 'status-card' : ''}`}\n tabindex=\"-1\"\n >\n <b\n class=\"status-filtered-badge clickable badge-meta\"\n title={filterTitleStr}\n onClick={(e) => {\n e.preventDefault();\n setShowPeek(true);\n }}\n >\n <span>Filtered</span>\n <span>{filterTitleStr}</span>\n </b>{' '}\n <Avatar url={avatarStatic || avatar} squircle={bot} />\n <span class=\"status-filtered-info\">\n <span class=\"status-filtered-info-1\">\n <NameText account={status.account} instance={instance} />{' '}\n <Icon\n icon={visibilityIconsMap[visibility]}\n alt={visibilityText[visibility]}\n size=\"s\"\n />{' '}\n {isReblog ? (\n 'boosted'\n ) : isFollowedTags ? (\n <span>\n {snapStates.statusFollowedTags[sKey].slice(0, 3).map((tag) => (\n <span key={tag} class=\"status-followed-tag-item\">\n #{tag}\n </span>\n ))}\n </span>\n ) : (\n <RelativeTime datetime={createdAtDate} format=\"micro\" />\n )}\n </span>\n <span class=\"status-filtered-info-2\">\n {isReblog && (\n <>\n <Avatar\n url={reblog.account.avatarStatic || reblog.account.avatar}\n squircle={bot}\n />{' '}\n </>\n )}\n {statusPeekText}\n </span>\n </span>\n </article>\n {!!showPeek && (\n <Modal\n onClick={(e) => {\n if (e.target === e.currentTarget) {\n setShowPeek(false);\n }\n }}\n >\n <div id=\"filtered-status-peek\" class=\"sheet\">\n <button\n type=\"button\"\n class=\"sheet-close\"\n onClick={() => setShowPeek(false)}\n >\n <Icon icon=\"x\" />\n </button>\n <header>\n <b class=\"status-filtered-badge\">Filtered</b> {filterTitleStr}\n </header>\n <main tabIndex=\"-1\">\n <Link\n ref={statusPeekRef}\n class=\"status-link\"\n to={url}\n onClick={() => {\n setShowPeek(false);\n }}\n data-read-more=\"Read more →\"\n >\n <Status status={status} instance={instance} size=\"s\" readOnly />\n </Link>\n </main>\n </div>\n </Modal>\n )}\n </div>\n );\n}\n\nconst QuoteStatuses = memo(({ id, instance, level = 0 }) => {\n if (!id || !instance) return;\n const snapStates = useSnapshot(states);\n const sKey = statusKey(id, instance);\n const quotes = snapStates.statusQuotes[sKey];\n const uniqueQuotes = quotes?.filter(\n (q, i, arr) => arr.findIndex((q2) => q2.url === q.url) === i,\n );\n\n if (!uniqueQuotes?.length) return;\n if (level > 2) return;\n\n return uniqueQuotes.map((q) => {\n return (\n <LazyShazam id={q.instance + q.id}>\n <Link\n key={q.instance + q.id}\n to={`${q.instance ? `/${q.instance}` : ''}/s/${q.id}`}\n class=\"status-card-link\"\n data-read-more=\"Read more →\"\n >\n <Status\n statusID={q.id}\n instance={q.instance}\n size=\"s\"\n quoted={level + 1}\n enableCommentHint\n />\n </Link>\n </LazyShazam>\n );\n });\n});\n\nexport default memo(Status, (oldProps, newProps) => {\n // Shallow equal all props except 'status'\n // This will be pure static until status ID changes\n const { status, ...restOldProps } = oldProps;\n const { status: newStatus, ...restNewProps } = newProps;\n return (\n status?.id === newStatus?.id && shallowEqual(restOldProps, restNewProps)\n );\n});\n"],"file":"assets/status-FORkhePO.js"}