phanpy-cz/assets/fuse-rEcEZtAj.js.map
archos 3b991dbb3c Update dependencies and various components
- Updated dependencies in package-lock.json and package.json
- Modified various components for improved functionality
- Added new utility function 'is-rtl.js'
- Improved styling in multiple CSS files
- Fixed minor issues and bugs across the applicationPřidána podstránka s kontakty
2024-08-05 19:58:51 +02:00

1 line
747 KiB
Plaintext
Raw 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":"kgBAGA,SAASA,IAAW,CAClB,OAAAA,GAAW,OAAO,OAAS,OAAO,OAAO,KAAI,EAAK,SAAUC,EAAQ,CAClE,QAASC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CACzC,IAAIC,EAAS,UAAUD,CAAC,EACxB,QAASE,KAAOD,EACV,OAAO,UAAU,eAAe,KAAKA,EAAQC,CAAG,IAClDH,EAAOG,CAAG,EAAID,EAAOC,CAAG,EAG7B,CACD,OAAOH,CACX,EACSD,GAAS,MAAM,KAAM,SAAS,CACvC,CAEA,IAAIK,GAA2B,CAAC,QAAS,MAAO,OAAQ,MAAO,MAAM,EACjEC,GAAa,CACf,IAAK,SACL,OAAU,QACV,IAAK,SACL,IAAK,QACL,IAAK,QACL,IAAK,QACL,IAAK,YACL,IAAK,YACL,IAAK,eACL,UAAW,QACX,WAAY,QACZ,QAAS,MACT,SAAU,MACV,SAAU,OACV,UAAW,OACX,OAAQ,OACR,QAAS,OACT,YAAa,OACb,aAAc,MAChB,EACA,SAASC,GAAOH,EAAK,CACnB,OAAQE,GAAWF,CAAG,GAAKA,GAAK,OAAO,cAAc,QAAQ,yBAA0B,EAAE,CAC3F,CACA,SAASI,GAAiBJ,EAAK,CAC7B,OAAOC,GAAyB,SAASD,CAAG,CAC9C,CACA,SAASK,GAAmBC,EAAMC,EA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CACR,CACH,CAEA2C,GAAK,QAAU,QACfA,GAAK,YAAc1F,GACnB0F,GAAK,WAAaxF,GAClBwF,GAAK,OAAS7G,EAGZ6G,GAAK,WAAaj8D,GAIlB+6D,GAASL,EAAc","names":["_extends","target","i","source","key","reservedModifierKeywords","mappedKeys","mapKey","isHotkeyModifier","parseKeysHookInput","keys","splitKey","parseHotkey","hotkey","combinationKey","description","k","modifiers","singleCharKeys","pushToCurrentlyPressedKeys","removeFromCurrentlyPressedKeys","currentlyPressedKeys","isReadonlyArray","value","isHotkeyPressed","hotkeyArray","maybePreventDefault","preventDefault","isHotkeyEnabled","enabled","isKeyboardEventTriggeredByInput","ev","isHotkeyEnabledOnTag","_ref","enabledOnTags","targetTagName","tag","isScopeActive","activeScopes","scopes","scope","isHotkeyMatchingKeyboardEvent","e","ignoreModifiers","alt","meta","mod","shift","ctrl","pressedKeyUppercase","code","ctrlKey","metaKey","shiftKey","altKey","keyCode","pressedKey","BoundHotkeysProxyProvider","createContext","useBoundHotkeysProxy","useContext","deepEqual","x","y","isEqual","HotkeysContext","useHotkeysContext","useDeepEqualMemo","ref","useRef","stopPropagation","useSafeLayoutEffect","useLayoutEffect","useEffect","useHotkeys","callback","options","dependencies","hasTriggeredRef","_options","_keys","_deps","memoisedCB","useCallback","cbRef","memoisedOptions","_useHotkeysContext","enabledScopes","proxy","listener","isKeyUp","_e$target","rootNode","_hotkey$keys","handleKeyDown","event","handleKeyUp","domNode","root","factory","module","this","global","Toastify","version","divElement","property","avatarElement","closeElement","width","self","getAxisOffsetAValue","xOffset","yOffset","rootElement","elementToInsert","toastElement","topLeftOffsetSize","topRightOffsetSize","offsetSize","allToasts","classUsed","containsClass","height","offset","axis","elem","yourClass","window","_showToast","showToast","props","text","onClick","delay","rest","toast","className","destination","gravity","position","setTimeout","useInterval","fn","deps","immediate","savedCallback","current","id","setInterval","tick","clearInterval","openCompose","opts","url","URL","parse","location","screenWidth","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","__vitePreload","heart","bookmark","check-circle","x-circle","transfer","rocket","rtl","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","rotate","plus","chevron-down","reply","flip","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","copy","quote","settings","heart-break","user-x","minimize","SIZES","s","m","l","xl","xxl","ICONDATA","SVGICon","moize","_jsx","viewBox","dangerouslySetInnerHTML","__html","transform","isShallowEqual","maxSize","Object","length","matchesArg","cacheKeyArg","keyArg","icon","Icon","size","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","keydown","keyup","$deckContainers","querySelectorAll","page","tabIndex","forEach","$deckContainer","setAttribute","removeAttribute","node","currentTarget","inert","onFocus","isFocusable","getComputedStyle","pointerEvents","console","ReactPropTypesSecret","ReactPropTypesSecret_1","require$$0","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","propName","componentName","propFullName","secret","err","getShim","ReactPropTypes","ReactIs","throwOnDirectAccess","propTypesModule","isMenuOpen","state","batchedUpdates","unstable_batchedUpdates","getTransition","transition","name","safeCall","arg","internalKey","getName","component","mergeProps","targetProp","sourceProp","parsePadding","paddingStr","padding","right","getScrollAncestor","overflow","overflowX","overflowY","commonProps","isDisabled","isHovering","indexOfNode","nodeList","stylePropTypes","oneOfType","string","func","menuPropTypes","object","bool","number","oneOf","rootMenuPropTypes","exact","uncontrolledMenuPropTypes","useBEM","element","useMemo","blockElement","classString","expandedClassName","menuContainerClass","menuClass","menuArrowClass","menuItemClass","menuDividerClass","menuHeaderClass","menuGroupClass","subMenuClass","HoverItemContext","MenuListItemContext","MenuListContext","EventHandlersContext","RadioGroupContext","SettingsContext","Keys","HoverActionTypes","CloseReason","FocusPositions","MenuStateMap","positionAbsolute","roleNone","roleMenuitem","dummyItemProps","MenuContainer","containerRef","containerProps","isOpen","theming","itemTransition","jsx","createSubmenuCtx","count","closeDelay","pending","settled","useItems","menuRef","focusRef","hoverItem","setHoverItem","mutableState","updateItems","item","isMounted","items","index","dispatch","actionType","nextIndex","hoverIndex","sortItems","orderedNodes","a","b","newItem","prevItem","getNativeDimension","transformed","untransformed","getNormalizedClientRect","rect","getPositionHelpers","menuScroll","boundingBoxPadding","menuRect","containerRect","boundingRect","getLeftOverflow","getRightOverflow","getTopOverflow","getBottomOverflow","leftOverflow","rightOverflow","topOverflow","bottomOverflow","placeArrowVertical","arrowRef","menuY","anchorRect","placeLeftorRight","placeLeftorRightY","placeLeftX","placeRightX","confineHorizontally","confineVertically","arrow","direction","computedDirection","placeArrowHorizontal","menuX","placeToporBottom","placeToporBottomX","placeTopY","placeBottomY","positionMenu","align","gap","positionHelpers","isHorizontal","horizontalOffset","verticalOffset","arrowElt","useIsomorphicLayoutEffect","setRef","instance","useCombinedRef","refA","refB","offScreen","MenuList","ariaLabel","menuClassName","menuStyle","arrowProps","anchorPoint","anchorRef","focusProps","externalRef","parentScrollingRef","setDownOverflow","repositionFlag","captureFocus","endTransition","menuItemFocus","restProps","menuPosition","setMenuPosition","arrowPosition","setArrowPosition","overflowData","setOverflowData","expandedDirection","setExpandedDirection","submenuCtx","reposSubmenu","forceReposSubmenu","useReducer","c","boundingBoxRef","rootMenuRef","rootAnchorRef","scrollNodesRef","reposition","viewScroll","submenuCloseDelay","parentSubmenuCtx","reposFlag","prevOpen","openTransition","closeTransition","scrollNodes","onKeyDown","onAnimationEnd","onPointerMove","onPointerLeave","handlePosition","noOverflowCheck","_anchorRef$current","arrowX","arrowY","menuHeight","overflowAmt","anchorScroll","scroll","handleScroll","scrollObservers","o","hasOverflow","parentScroll","targetList","resizeObserver","entries","flushSync","resizeObserverOptions","anchor","alwaysUpdate","setItemFocus","menuElt","itemContext","maxHeight","listContext","overflowStyle","arrowModifiers","_arrowClassName","ControlledMenu","forwardRef","initialMounted","unmountOnClose","transitionTimeout","submenuOpenDelay","portal","onItemClick","eventHandlers","isCheckorRadio","keepOpen","menuList","createPortal","PRE_ENTER","ENTERING","ENTERED","PRE_EXIT","EXITING","EXITED","UNMOUNTED","STATUS","getState","status","startOrEnd","unmounted","getEndStatus","unmountOnExit","getTimeout","timeout","updateState","setState","latestState","timeoutId","onChange","useTransition","enter","preEnter","preExit","initialEntered","mountOnEnter","enterTimeout","exitTimeout","toggle","toEnter","transitState","enterStage","useMenuState","initialOpen","toggleMenu","useMenuStateAndFocus","menuProps","setMenuItemFocus","openMenu","useClick","onToggle","skipOpen","useMenuChange","onMenuChange","Menu","_","_1","menuButton","instanceRef","stateProps","buttonRef","anchorProps","handleClose","button","buttonProps","renderButton","cloneElement","useImperativeHandle","Fragment","withHovering","WrappedComponent","Component","memo","WithHovering","itemRef","useItemEffect","SubMenu","disabled","label","openTrigger","_2","itemProps","parentMenuRef","parentDir","parentOverflow","isParentOpen","isPortal","_openMenu","timerId","stopTimer","args","setHover","delayOpen","onKeyDownOfRoot","handled","externalItemRef","itemClassName","restItemProps","mergedItemProps","getMenuList","container","useItemState","unsetHover","onBlur","keepHover","MenuItem","href","type","checked","restStateProps","radioGroup","isRadio","isCheckBox","isAnchor","isChecked","handleClick","mergedProps","menuItemProps","FocusableItem","renderChildren","MenuDivider","MenuHeader","MenuGroup","takeOverflow","setOverflowStyle","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","classList","add","clearRect","mem","Link","routerLocation","useLocation","hash","replace","trim","to","includes","parsedHash","origin","searchParams","searchParamsStr","from","map","encodeURIComponent","join","pathname","isActive","decodeURIComponent","parentNode","closest","prevLocation","IS_RTL","observer","MutationObserver","mutations","mutation","observe","documentElement","attributes","attributeFilter","isRTL","defaultBoundingBoxPadding","safeAreaInsets","getSafeAreaInsets","safeAreaInsetTop","getPropertyValue","safeAreaInsetRight","safeAreaInsetBottom","safeAreaInsetLeft","parseInt","requestAnimationFrame","safeBoundingBoxPadding","paddings","v","CSS","supports","passive","useWindowSize","setSize","handleResize","innerWidth","innerHeight","removeEventListener","Menu2","_instanceRef","rtlAlign","closeMenu","SubMenu2","pointerType","MenuConfirm","subMenu","confirm","confirmLabel","menuItemClassName","menuFooter","menuExtras","_jsxs","CustomEmoji","staticUrl","srcset","EmojiText","emojis","indexOf","regex","RegExp","shortcode","elements","split","word","emoji","find","EmojiText$1","oldProps","newProps","nameCollator","Intl","Collator","sensitivity","NameText","account","showAvatar","showAcct","short","acct","avatar","avatarStatic","displayName","username","acct1","acct2","match","api","trimmedUsername","toLowerCase","trimmedDisplayName","shortenedDisplayName","shortenedAlphaNumericDisplayName","hideUsername","compare","which","internalURL","states","showAccount","_Fragment","dir","newAccount","t","n","r","u","f","h","d","$","M","g","D","p","S","w","O","dayjs","extend","dayjsTwitter","localizedFormat","relativeTime","dtf","DateTimeFormat","RelativeTime","datetime","format","renderCount","rerender","date","dateStr","dt","isValid","str","now","diff","year","twitter","toDate","fromNow","toISOString","raf","rafRerender","scheduleRerender","cancelAnimationFrame","_localeMatch","localeMatch","locales","resolvedOptions","locale","languages","localeTargetLanguages","translationTargetLanguages","getTranslateTargetLanguage","fromSettings","contentTranslationTargetLanguage","IntlDN","DisplayNames","_localeCode2Text","of","localeCode2Text","semver","validateAndParse","isWildcard","tryParse","forceType","compareStrings","ap","bp","compareSegments","compareVersions","v1","v2","n1","n2","p1","p2","operator","assertValidOperator","res","operatorResMap","allowedOperators","op","satisfies","range","v3","vp","r1","r2","r3","rp","nonZero","containPixelfed","notContainPixelfed","platformFeatures","supportsCache","feature","domain","getCurrentInstance","features","includePrerelease","loose","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexPunycode","regexNonASCII","regexSeparators","errors","baseMinusTMin","floor","stringFromCharCode","error","array","result","mapDomain","parts","labels","encoded","ucs2decode","output","counter","extra","ucs2encode","codePoints","basicToDigit","codePoint","digitToBasic","digit","adapt","delta","numPoints","firstTime","decode","input","inputLength","bias","basic","j","oldi","baseMinusT","out","encode","currentValue","basicLength","handledCPCount","handledCPCountPlusOne","q","qMinusT","toUnicode","toASCII","punycode","emojifyText","fauxDiv","whitelistLinkClasses","_enhanceContent","content","postEnhanceDOM","enhancedContent","dom","innerHTML","hasLink","hasCodeBlock","remove","textContent","shortenLink","links","usernames","innerText","hasChildren","some","push","slice","textNodes","extractTextNodes","html","nodeValue","replaceWith","childNodes","pre","br","nextParagraphs","currentBlock","nextElementSibling","next","tagName","codeText","replaceAll","rejectFilter","prevIndex","hashtagStuffedParagraphs","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","prevText","previousSibling","textBeforeLinkIsAt","endsWith","textStartsWithAt","contains","targetText","mention","textBeforeLinkIsHash","hashURL","_b","_DateTimeFormat","dateYear","hideTime","formatOpts","currentYear","Date","getFullYear","day","hour","minute","niceDateTime","dtfOpts","NumberFormat","shortenNumber","notation","roundingMode","TOAST_DURATION","showCompose","composerState","duration","AccountBlock","skeleton","avatarSize","useAvatarStatic","internal","showActivity","showStats","accountInstance","hideDisplayName","relationship","excludeRelationshipAttrs","statusesCount","lastStatusAt","fields","note","followersCount","createdAt","locked","verifiedField","verifiedAt","excludedRelationship","hasRelationship","followedBy","requested","MenuLink","detail","RetryOperation","timeouts","retry_operation","currentTime","timeoutOps","counts","mainError","mainErrorCount","exports","attempt","obj","methods","method","original","retry","objectToString","isError","errorMessages","isNetworkError","AbortError","decorateErrorWithCounts","attemptNumber","retriesLeft","pRetry","resolve","reject","operation","abortHandler","_a","cleanUp","finalError","__defProp","__defNormalProp","__publicField","observerMap","RootIds","rootId","unsupportedValue","getRootId","optionsToId","createObserver","thresholds","entry","inView","threshold","fallbackInView","bounds","callbacks","isPlainChildren","InView","React.Component","prevProps","rootMargin","trackVisibility","as","triggerOnce","skip","initialInView","React.createElement","useInView","React2.useState","React2.useRef","React2.useEffect","unobserve","entryTarget","previousEntryTarget","TOP","shazamIDs","LazyShazam","hasID","visible","setVisible","visibleStart","setVisibleStart","getBoundingClientRect","bottom","hidden","PHANPY_LINGVA_INSTANCES","import","LINGVA_INSTANCES","throttle","pThrottle","limit","interval","currentLingvaInstance","_lingvaTranslate","fetchCall","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","detectedLangText","setDetectedLang","pronunciation","query","setPronunciationContent","detectedLang","lang","sourceLanguages","abrupt","TranslationBlock$1","TranslationBlock","promisifyRequest","request","createStore","dbName","storeName","dbp","txMode","db","defaultGetStoreFunc","defaultGetStore","get","customStore","store","set","getMany","del","delMany","clear","eachCursor","cursor","initDB","val","drafts","catchup","fetchRelationships","accounts","relationshipsMap","masto","currentAccount","getCurrentAccountID","uniqueAccountIds","relationships","LiteYTEmbed","shadowDom","nonce","oldVal","newVal","isIntersectionObserver","autoplay","wantsNoCookie","embedTarget","iframeHTML","posterUrlWebp","posterUrlJpeg","kind","linkElem","digitLookup","decode83","start","end","pow","PI","PI2","sRGBToLinear","linearTosRGB","signSqr","fastCos","cos","getBlurHashAverageColor","blurHash","decodeBlurHash","punch","sizeFlag","numX","numY","basis","basisY","colorIndex","pixelIndex","maximumValue","colors","averageColor","cosinesY","cosinesX","bytesPerRow","pixels","addIndentation","splittedHtml","char","level","opened","indented","elTag","newIndented","addIndentation_1","removeEmptyLines","nonFormattedString","mergeAttributesWithElements","markup","splittedMarkup","mergedLines","currentElement","line","toLines","require$$1","prettify","splitted","A","z","U","X","Y","R","G","J","C","L","P","I","T","E","B","Poll","readOnly","votePoll","expired","expiresAt","multiple","ownVotes","voted","votersCount","votesCount","expiresAtDate","pollVotesCount","roundPrecision","showResults","setShowResults","optionsHaveVoteCounts","every","option","optionVotesCount","percentage","toFixed","isLeading","onSubmit","form","formData","FormData","choices","FilterContext","_isFiltered","filtered","filterContext","appliedFilters","hasContext","context","filterAction","action","filterTitles","titles","titlesStr","isFiltered","filteredItem","currentAccountID","filterState","filteredItems","htmlContentLength","supportsTTS","speechSynthesis","speaking","cancel","utterance","SpeechSynthesisUtterance","statusPeek","spoilerText","mediaAttachments","image","gifv","video","audio","unknown","F","useResolvedElement","subscriber","refOrElement","lastReportRef","refOrElementRef","cbElementRef","evaluateSubscription","cbElement","extractSize","boxProp","sizeType","useResizeObserver","onResize","onResizeRef","resizeObserverRef","_useState","didUnmount","previous","refCallback","reportedWidth","reportedHeight","newWidth","newHeight","newSize","useTruncated","useThrottledCallback","scrollHeight","truncated","_height","computedHeight","box","visibilityIconsMap","public","unlisted","private","direct","styleRoot","styleChild","styles","isSsr","isTouch","make3dTransformValue","scale","getOffsetBounds","containerDimension","childDimension","centerContained","classnames","other","abs","sqrt","isMac","isDragInteraction","isZoomInteraction","isZoomGesture","wheelEvent","cancelEvent","getDistance","calculateScale","startTouches","endTouches","startDistance","endDistance","isCloseTo","expected","swing","getPointByPageCoordinates","touch","getPageCoordinatesByTouches","touches","sum","getVectorAvg","vectors","clamp","shouldInterceptWheel","getElementSize","offsetWidth","offsetHeight","calculateVelocity","startPoint","endPoint","comparePoints","noup","zeroPoint","PinchZoom","_super","__extends","_this","__assign","createRef","clickEvent","touchEndEvent","touchStartEvent","touchMoveEvent","pageX","pageY","deltaY","deltaMode","scaleDelta","likeTouchEvent","center","dScale","inertiaFriction","inertia","renderFrame","prevOffset","currentCoordinates","prevPoint","newScale","touchCenter","needZoomOut","zoomFactor","startZoomFactor","updateProgress","progress","elWidth","elHeight","minOffsetX","maxOffsetX","_c","minOffsetY","maxOffsetY","__x","__y","animated","startOffset","containerCenter","diffZoomFactor","diffOffset","updateFrame","originalZoomFactor","lastCenter","sanitizedOffset","targetOffset","scaleFactor","offsetLeft","offsetTop","_document","_html","_body","scrollTop","scrollLeft","posTop","posLeft","frameFn","startTime","timeFn","frameTime","xZoomFactor","yZoomFactor","eventName","_i","newInteraction","interaction","fingers","mouseEvent","isEnd","isStart","child","Children","React","any","formatDuration","hours","minutes","seconds","toString","padStart","dataAltLabel","AltBadge","showMediaAlt","MEDIA_CAPTION_LIMIT","MEDIA_CAPTION_LIMIT_LONGER","isMediaCaptionLong","caption","Media","showOriginal","autoAnimate","showCaption","allowLongerCaption","altIndex","blurhash","previewRemoteUrl","previewUrl","remoteUrl","small","mediaURL","remoteMediaURL","hasDimensions","orientation","rgbAverageColor","videoRef","focalPosition","mediaRef","onUpdate","removeProperty","touchAction","pinchZoomEnabled","setPinchZoomEnabled","quickPinchZoomProps","draggableUnZoomed","tapZoomFactor","doubleTapToggleZoom","Parent","remoteMediaURLObj","getURLObj","isVideoMaybe","isAudioMaybe","isImage","parentRef","imageSmallerThanParent","setImageSmallerThanParent","smaller","maxAspectHeight","averageColorStyle","mediaStyles","aspectRatio","longDesc","showInlineDesc","Figure","hasNaturalAspectRatio","setHasNaturalAspectRatio","display","mode","backgroundImage","backgroundSize","QuickPinchZoom","objectPosition","$media","clientWidth","clientHeight","minDimension","hasSmallDimension","displayNaturalHeight","hasDuration","shortDuration","isGIF","loopable","formattedDuration","hoverAnimate","autoGIFAnimate","showProgress","gifHTML","videoHTML","pause","onMouseEnter","onMouseLeave","poster","preload","playsinline","loop","muted","onTimeUpdate","disablePictureInPicture","onLoadedMetadata","controls","autoPlay","oldMedia","newMedia","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","pinned","_deleted","_pinned","emojiReactions","languageAutoDetected","setLanguageAutoDetected","detected","hasMediaAttachments","isSelf","filterInfo","debugHover","FilteredStatus","createdAtDate","editedAtDate","inReplyToAccountRef","setInReplyToAccount","inReplyToAccount","account2","catch","mentionSelf","readingExpandSpoilers","showSpoiler","readingExpandMedia","prefs","showSpoilerMedia","FollowedTagsParent","setForceTranslate","statusFollowedTags","StatusParent","contentTranslation","contentTranslationAutoInline","targetLanguage","inlineTranslate","isSizeLarge","showEdited","setShowEdited","showEmbed","setShowEmbed","contentLength","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","Promise","favouriteResults","_types","isPinnable","StatusMenuItems","replyStatus","canBoost","confirmBoostStatus","heading","fetchBoostedLikedByAccounts","showReactions","postID","postText","createdDateText","nicePostURL","isPublic","cachedStatus","getStatus","setIsContextMenuOpen","contextMenuProps","bindLongPressContext","useLongPress","showContextMenu","clientX","clientY","setContextMenuProps","isContextMenuOpen","hotkeysEnabled","fRef","dRef","bRef","rRef","xRef","activeStatus","spoilerButton","spoilerMediaButton","displayedMediaAttachments","captionChildren","attachments","indices","showMultipleMediaCaptions","showCommentCount","isThread","showCommentHint","containsQuestion","nodeRef","anchorNode","selection","contextMenuRef","actionsRef","StatusButton","statusThreadNumber","MediaFirstContainer","spoilers","spoilersMedia","QuoteStatuses","newPoll","pollResponse","polls","then","MultipleMediaFigure","selfReferential","emojiReaction","me","url2","isShortCode","EditedAtModal","moreThanOne","currentIndex","setCurrentIndex","carouselRef","behavior","getDomain","providerName","providerUrl","authorName","authorUrl","imageDescription","embedUrl","publishedAt","isLandscape","hasIframeHTML","setCardStatusURL","hasText","unfurlMastodonLink","unfurledLinks","blurhashImage","isPost","isCardPost","putImageData","videoID","cardStatusURL","nocookie","setEditHistory","editHistory2","fetchStatusHistory","editHistory","Loader","generateHTMLCode","quotes","contentHTML","sourceMediaURL","previewMediaURL","mediaHTML","sourceMediaURLObj","htmlCode","EmbedModal","readonly","setButtonTitle","buttonTitle","host","iconAlt","restPath","urlObj","statusReply","filterTitleStr","srKey","statusPeekText","bindLongPressPeek","isReblog","actualStatusID","showPeek","isFollowedTags","setShowPeek","cancelOnMovement","ssKey","statusPeekRef","uniqueQuotes","arr","q2","restNewProps","shallowEqual","restOldProps","IDX","HEX","len","num","isArray","getTag","INFINITY","baseToString","isString","isNumber","isBoolean","isObjectLike","isObject","isDefined","isBlank","INCORRECT_INDEX_TYPE","LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY","PATTERN_LENGTH_TOO_LARGE","MISSING_KEY_PROPERTY","INVALID_KEY_WEIGHT_VALUE","hasOwn","KeyStore","totalWeight","createKey","keyId","path","weight","getFn","createKeyPath","createKeyId","deepGet","MatchOptions","BasicOptions","FuzzyOptions","AdvancedOptions","Config","SPACE","norm","mantissa","cache","numTokens","FuseIndex","fieldNormWeight","docs","records","idx","doc","docIndex","record","keyIndex","subRecords","stack","nestedArrIndex","subRecord","createIndex","myIndex","parseIndex","computeScore$1","pattern","currentLocation","expectedLocation","distance","ignoreLocation","proximity","convertMaskToIndices","matchmask","minMatchCharLength","MAX_BITS","patternAlphabet","findAllMatches","includeMatches","patternLen","textLen","currentThreshold","bestLocation","computeMatches","matchMask","score","lastBitArr","finalScore","binMax","mask","binMin","binMid","finish","bitArr","charMatch","createPatternAlphabet","BitapSearch","isCaseSensitive","addChunk","startIndex","remainder","allIndices","totalScore","hasMatches","alphabet","isMatch","BaseMatch","getMatch","exp","matches","ExactMatch","InverseExactMatch","PrefixExactMatch","InversePrefixExactMatch","SuffixExactMatch","InverseSuffixExactMatch","FuzzyMatch","IncludeMatch","searchers","searchersLen","SPACE_RE","OR_TOKEN","parseQuery","results","queryItem","found","searcher","token","MultiMatchSet","ExtendedSearch","numMatches","qLen","pLen","registeredSearchers","register","createSearcher","searcherClass","LogicalOperator","KeyType","isExpression","isPath","isLeaf","convertToExplicit","auto","isQueryPath","computeScore","ignoreFieldNorm","transformMatches","transformScore","includeScore","transformers","transformer","Fuse","predicate","shouldSort","sortFn","expression","evaluate","resultMap","expResults"],"ignoreList":[0,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,58,59,60,61,66,67,68,69,71,81,82,83,84,85,86,89,92,93,94,95,96,97,104,105,108,109,110,111,115,116],"sources":["../../node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.js","../../node_modules/toastify-js/src/toastify.js","../../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","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/index.js","../../node_modules/@szhsin/react-menu/dist/es/utils/utils.js","../../node_modules/@szhsin/react-menu/dist/es/utils/propTypes.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useBEM.js","../../node_modules/@szhsin/react-menu/dist/es/utils/constants.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuContainer.js","../../node_modules/@szhsin/react-menu/dist/es/utils/submenuCtx.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useItems.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/getNormalizedClientRect.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/getPositionHelpers.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/placeArrowVertical.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/placeLeftorRight.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/placeArrowHorizontal.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/placeToporBottom.js","../../node_modules/@szhsin/react-menu/dist/es/positionUtils/positionMenu.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useIsomorphicLayoutEffect.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useCombinedRef.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuList.js","../../node_modules/@szhsin/react-menu/dist/es/components/ControlledMenu.js","../../node_modules/react-transition-state/dist/es/hooks/utils.js","../../node_modules/react-transition-state/dist/es/hooks/useTransition.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useMenuState.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useMenuStateAndFocus.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useClick.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useMenuChange.js","../../node_modules/@szhsin/react-menu/dist/es/components/Menu.js","../../node_modules/@szhsin/react-menu/dist/es/utils/withHovering.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useItemEffect.js","../../node_modules/@szhsin/react-menu/dist/es/components/SubMenu.js","../../node_modules/@szhsin/react-menu/dist/es/hooks/useItemState.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuItem.js","../../node_modules/@szhsin/react-menu/dist/es/components/FocusableItem.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuDivider.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuHeader.js","../../node_modules/@szhsin/react-menu/dist/es/components/MenuGroup.js","../../src/components/avatar.jsx","../../src/components/link.jsx","../../src/utils/is-rtl.js","../../src/utils/safe-bounding-box-padding.js","../../src/utils/useWindowSize.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","../../node_modules/dayjs/dayjs.min.js","../../node_modules/dayjs-twitter/dist/dayjs-twitter.min.js","../../node_modules/dayjs/plugin/localizedFormat.js","../../node_modules/dayjs/plugin/relativeTime.js","../../src/components/relative-time.jsx","../../src/utils/locale-match.jsx","../../src/utils/get-translate-target-language.jsx","../../src/utils/localeCode2Text.jsx","../../node_modules/compare-versions/lib/esm/utils.js","../../node_modules/compare-versions/lib/esm/compareVersions.js","../../node_modules/compare-versions/lib/esm/compare.js","../../node_modules/compare-versions/lib/esm/satisfies.js","../../src/utils/supports.js","../../node_modules/punycode/punycode.es6.js","../../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/components/account-block.jsx","../../src/components/menu-link.jsx","../../node_modules/retry/lib/retry_operation.js","../../node_modules/retry/lib/retry.js","../../node_modules/retry/index.js","../../node_modules/is-network-error/index.js","../../node_modules/p-retry/index.js","../../node_modules/react-intersection-observer/dist/index.mjs","../../src/components/lazy-shazam.jsx","../../src/components/translation-block.jsx","../../node_modules/idb-keyval/dist/index.js","../../src/utils/db.js","../../src/utils/relationships.js","../../node_modules/@justinribeiro/lite-youtube/lite-youtube.js","../../node_modules/fast-blurhash/index.js","../../node_modules/html-prettify/src/utils/addIndentation.js","../../node_modules/html-prettify/src/utils/toLines.js","../../node_modules/html-prettify/src/index.js","../../node_modules/use-long-press/index.mjs","../../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","../../node_modules/use-debounce/dist/index.module.js","../../node_modules/use-resize-observer/dist/bundle.esm.js","../../src/utils/useTruncated.js","../../src/utils/visibility-icons-map.js","../../node_modules/react-quick-pinch-zoom/esm/PinchZoom/styles.css.js","../../node_modules/react-quick-pinch-zoom/esm/utils.js","../../node_modules/react-quick-pinch-zoom/esm/PinchZoom/getOffsetBounds.js","../../node_modules/react-quick-pinch-zoom/esm/PinchZoom/component.js","../../src/utils/format-duration.jsx","../../src/components/media.jsx","../../src/components/status.jsx","../../node_modules/uid/single/index.mjs","../../node_modules/fuse.js/dist/fuse.mjs"],"sourcesContent":["import { useContext, createContext, useState, useCallback, useRef, useLayoutEffect, useEffect } from 'react';\nimport { jsx } from 'react/jsx-runtime';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nvar reservedModifierKeywords = ['shift', 'alt', 'meta', 'mod', 'ctrl'];\nvar mappedKeys = {\n esc: 'escape',\n \"return\": 'enter',\n '.': 'period',\n ',': 'comma',\n '-': 'slash',\n ' ': 'space',\n '`': 'backquote',\n '#': 'backslash',\n '+': 'bracketright',\n ShiftLeft: 'shift',\n ShiftRight: 'shift',\n AltLeft: 'alt',\n AltRight: 'alt',\n MetaLeft: 'meta',\n MetaRight: 'meta',\n OSLeft: 'meta',\n OSRight: 'meta',\n ControlLeft: 'ctrl',\n ControlRight: 'ctrl'\n};\nfunction mapKey(key) {\n return (mappedKeys[key] || key).trim().toLowerCase().replace(/key|digit|numpad|arrow/, '');\n}\nfunction isHotkeyModifier(key) {\n return reservedModifierKeywords.includes(key);\n}\nfunction parseKeysHookInput(keys, splitKey) {\n if (splitKey === void 0) {\n splitKey = ',';\n }\n return keys.split(splitKey);\n}\nfunction parseHotkey(hotkey, combinationKey, description) {\n if (combinationKey === void 0) {\n combinationKey = '+';\n }\n var keys = hotkey.toLocaleLowerCase().split(combinationKey).map(function (k) {\n return mapKey(k);\n });\n var modifiers = {\n alt: keys.includes('alt'),\n ctrl: keys.includes('ctrl') || keys.includes('control'),\n shift: keys.includes('shift'),\n meta: keys.includes('meta'),\n mod: keys.includes('mod')\n };\n var singleCharKeys = keys.filter(function (k) {\n return !reservedModifierKeywords.includes(k);\n });\n return _extends({}, modifiers, {\n keys: singleCharKeys,\n description: description\n });\n}\n\n(function () {\n if (typeof document !== 'undefined') {\n document.addEventListener('keydown', function (e) {\n if (e.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n pushToCurrentlyPressedKeys([mapKey(e.key), mapKey(e.code)]);\n });\n document.addEventListener('keyup', function (e) {\n if (e.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n removeFromCurrentlyPressedKeys([mapKey(e.key), mapKey(e.code)]);\n });\n }\n if (typeof window !== 'undefined') {\n window.addEventListener('blur', function () {\n currentlyPressedKeys.clear();\n });\n }\n})();\nvar currentlyPressedKeys = /*#__PURE__*/new Set();\n// https://github.com/microsoft/TypeScript/issues/17002\nfunction isReadonlyArray(value) {\n return Array.isArray(value);\n}\nfunction isHotkeyPressed(key, splitKey) {\n if (splitKey === void 0) {\n splitKey = ',';\n }\n var hotkeyArray = isReadonlyArray(key) ? key : key.split(splitKey);\n return hotkeyArray.every(function (hotkey) {\n return currentlyPressedKeys.has(hotkey.trim().toLowerCase());\n });\n}\nfunction pushToCurrentlyPressedKeys(key) {\n var hotkeyArray = Array.isArray(key) ? key : [key];\n /*\r\n Due to a weird behavior on macOS we need to clear the set if the user pressed down the meta key and presses another key.\r\n https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser\r\n Otherwise the set will hold all ever pressed keys while the meta key is down which leads to wrong results.\r\n */\n if (currentlyPressedKeys.has('meta')) {\n currentlyPressedKeys.forEach(function (key) {\n return !isHotkeyModifier(key) && currentlyPressedKeys[\"delete\"](key.toLowerCase());\n });\n }\n hotkeyArray.forEach(function (hotkey) {\n return currentlyPressedKeys.add(hotkey.toLowerCase());\n });\n}\nfunction removeFromCurrentlyPressedKeys(key) {\n var hotkeyArray = Array.isArray(key) ? key : [key];\n /*\r\n Due to a weird behavior on macOS we need to clear the set if the user pressed down the meta key and presses another key.\r\n https://stackoverflow.com/questions/11818637/why-does-javascript-drop-keyup-events-when-the-metakey-is-pressed-on-mac-browser\r\n Otherwise the set will hold all ever pressed keys while the meta key is down which leads to wrong results.\r\n */\n if (key === 'meta') {\n currentlyPressedKeys.clear();\n } else {\n hotkeyArray.forEach(function (hotkey) {\n return currentlyPressedKeys[\"delete\"](hotkey.toLowerCase());\n });\n }\n}\n\nfunction maybePreventDefault(e, hotkey, preventDefault) {\n if (typeof preventDefault === 'function' && preventDefault(e, hotkey) || preventDefault === true) {\n e.preventDefault();\n }\n}\nfunction isHotkeyEnabled(e, hotkey, enabled) {\n if (typeof enabled === 'function') {\n return enabled(e, hotkey);\n }\n return enabled === true || enabled === undefined;\n}\nfunction isKeyboardEventTriggeredByInput(ev) {\n return isHotkeyEnabledOnTag(ev, ['input', 'textarea', 'select']);\n}\nfunction isHotkeyEnabledOnTag(_ref, enabledOnTags) {\n var target = _ref.target;\n if (enabledOnTags === void 0) {\n enabledOnTags = false;\n }\n var targetTagName = target && target.tagName;\n if (isReadonlyArray(enabledOnTags)) {\n return Boolean(targetTagName && enabledOnTags && enabledOnTags.some(function (tag) {\n return tag.toLowerCase() === targetTagName.toLowerCase();\n }));\n }\n return Boolean(targetTagName && enabledOnTags && enabledOnTags === true);\n}\nfunction isScopeActive(activeScopes, scopes) {\n if (activeScopes.length === 0 && scopes) {\n console.warn('A hotkey has the \"scopes\" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>');\n return true;\n }\n if (!scopes) {\n return true;\n }\n return activeScopes.some(function (scope) {\n return scopes.includes(scope);\n }) || activeScopes.includes('*');\n}\nvar isHotkeyMatchingKeyboardEvent = function isHotkeyMatchingKeyboardEvent(e, hotkey, ignoreModifiers) {\n if (ignoreModifiers === void 0) {\n ignoreModifiers = false;\n }\n var alt = hotkey.alt,\n meta = hotkey.meta,\n mod = hotkey.mod,\n shift = hotkey.shift,\n ctrl = hotkey.ctrl,\n keys = hotkey.keys;\n var pressedKeyUppercase = e.key,\n code = e.code,\n ctrlKey = e.ctrlKey,\n metaKey = e.metaKey,\n shiftKey = e.shiftKey,\n altKey = e.altKey;\n var keyCode = mapKey(code);\n var pressedKey = pressedKeyUppercase.toLowerCase();\n if (!(keys != null && keys.includes(keyCode)) && !(keys != null && keys.includes(pressedKey)) && !['ctrl', 'control', 'unknown', 'meta', 'alt', 'shift', 'os'].includes(keyCode)) {\n return false;\n }\n if (!ignoreModifiers) {\n // We check the pressed keys for compatibility with the keyup event. In keyup events the modifier flags are not set.\n if (alt === !altKey && pressedKey !== 'alt') {\n return false;\n }\n if (shift === !shiftKey && pressedKey !== 'shift') {\n return false;\n }\n // Mod is a special key name that is checking for meta on macOS and ctrl on other platforms\n if (mod) {\n if (!metaKey && !ctrlKey) {\n return false;\n }\n } else {\n if (meta === !metaKey && pressedKey !== 'meta' && pressedKey !== 'os') {\n return false;\n }\n if (ctrl === !ctrlKey && pressedKey !== 'ctrl' && pressedKey !== 'control') {\n return false;\n }\n }\n }\n // All modifiers are correct, now check the key\n // If the key is set, we check for the key\n if (keys && keys.length === 1 && (keys.includes(pressedKey) || keys.includes(keyCode))) {\n return true;\n } else if (keys) {\n // Check if all keys are present in pressedDownKeys set\n return isHotkeyPressed(keys);\n } else if (!keys) {\n // If the key is not set, we only listen for modifiers, that check went alright, so we return true\n return true;\n }\n // There is nothing that matches.\n return false;\n};\n\nvar BoundHotkeysProxyProvider = /*#__PURE__*/createContext(undefined);\nvar useBoundHotkeysProxy = function useBoundHotkeysProxy() {\n return useContext(BoundHotkeysProxyProvider);\n};\nfunction BoundHotkeysProxyProviderProvider(_ref) {\n var addHotkey = _ref.addHotkey,\n removeHotkey = _ref.removeHotkey,\n children = _ref.children;\n return /*#__PURE__*/jsx(BoundHotkeysProxyProvider.Provider, {\n value: {\n addHotkey: addHotkey,\n removeHotkey: removeHotkey\n },\n children: children\n });\n}\n\nfunction deepEqual(x, y) {\n //@ts-ignore\n return x && y && typeof x === 'object' && typeof y === 'object' ? Object.keys(x).length === Object.keys(y).length &&\n //@ts-ignore\n Object.keys(x).reduce(function (isEqual, key) {\n return isEqual && deepEqual(x[key], y[key]);\n }, true) : x === y;\n}\n\nvar HotkeysContext = /*#__PURE__*/createContext({\n hotkeys: [],\n enabledScopes: [],\n toggleScope: function toggleScope() {},\n enableScope: function enableScope() {},\n disableScope: function disableScope() {}\n});\nvar useHotkeysContext = function useHotkeysContext() {\n return useContext(HotkeysContext);\n};\nvar HotkeysProvider = function HotkeysProvider(_ref) {\n var _ref$initiallyActiveS = _ref.initiallyActiveScopes,\n initiallyActiveScopes = _ref$initiallyActiveS === void 0 ? ['*'] : _ref$initiallyActiveS,\n children = _ref.children;\n var _useState = useState((initiallyActiveScopes == null ? void 0 : initiallyActiveScopes.length) > 0 ? initiallyActiveScopes : ['*']),\n internalActiveScopes = _useState[0],\n setInternalActiveScopes = _useState[1];\n var _useState2 = useState([]),\n boundHotkeys = _useState2[0],\n setBoundHotkeys = _useState2[1];\n var enableScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.includes('*')) {\n return [scope];\n }\n return Array.from(new Set([].concat(prev, [scope])));\n });\n }, []);\n var disableScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.filter(function (s) {\n return s !== scope;\n }).length === 0) {\n return ['*'];\n } else {\n return prev.filter(function (s) {\n return s !== scope;\n });\n }\n });\n }, []);\n var toggleScope = useCallback(function (scope) {\n setInternalActiveScopes(function (prev) {\n if (prev.includes(scope)) {\n if (prev.filter(function (s) {\n return s !== scope;\n }).length === 0) {\n return ['*'];\n } else {\n return prev.filter(function (s) {\n return s !== scope;\n });\n }\n } else {\n if (prev.includes('*')) {\n return [scope];\n }\n return Array.from(new Set([].concat(prev, [scope])));\n }\n });\n }, []);\n var addBoundHotkey = useCallback(function (hotkey) {\n setBoundHotkeys(function (prev) {\n return [].concat(prev, [hotkey]);\n });\n }, []);\n var removeBoundHotkey = useCallback(function (hotkey) {\n setBoundHotkeys(function (prev) {\n return prev.filter(function (h) {\n return !deepEqual(h, hotkey);\n });\n });\n }, []);\n return /*#__PURE__*/jsx(HotkeysContext.Provider, {\n value: {\n enabledScopes: internalActiveScopes,\n hotkeys: boundHotkeys,\n enableScope: enableScope,\n disableScope: disableScope,\n toggleScope: toggleScope\n },\n children: /*#__PURE__*/jsx(BoundHotkeysProxyProviderProvider, {\n addHotkey: addBoundHotkey,\n removeHotkey: removeBoundHotkey,\n children: children\n })\n });\n};\n\nfunction useDeepEqualMemo(value) {\n var ref = useRef(undefined);\n if (!deepEqual(ref.current, value)) {\n ref.current = value;\n }\n return ref.current;\n}\n\nvar stopPropagation = function stopPropagation(e) {\n e.stopPropagation();\n e.preventDefault();\n e.stopImmediatePropagation();\n};\nvar useSafeLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\nfunction useHotkeys(keys, callback, options, dependencies) {\n var ref = useRef(null);\n var hasTriggeredRef = useRef(false);\n var _options = !(options instanceof Array) ? options : !(dependencies instanceof Array) ? dependencies : undefined;\n var _keys = isReadonlyArray(keys) ? keys.join(_options == null ? void 0 : _options.splitKey) : keys;\n var _deps = options instanceof Array ? options : dependencies instanceof Array ? dependencies : undefined;\n var memoisedCB = useCallback(callback, _deps != null ? _deps : []);\n var cbRef = useRef(memoisedCB);\n if (_deps) {\n cbRef.current = memoisedCB;\n } else {\n cbRef.current = callback;\n }\n var memoisedOptions = useDeepEqualMemo(_options);\n var _useHotkeysContext = useHotkeysContext(),\n enabledScopes = _useHotkeysContext.enabledScopes;\n var proxy = useBoundHotkeysProxy();\n useSafeLayoutEffect(function () {\n if ((memoisedOptions == null ? void 0 : memoisedOptions.enabled) === false || !isScopeActive(enabledScopes, memoisedOptions == null ? void 0 : memoisedOptions.scopes)) {\n return;\n }\n var listener = function listener(e, isKeyUp) {\n var _e$target;\n if (isKeyUp === void 0) {\n isKeyUp = false;\n }\n if (isKeyboardEventTriggeredByInput(e) && !isHotkeyEnabledOnTag(e, memoisedOptions == null ? void 0 : memoisedOptions.enableOnFormTags)) {\n return;\n }\n // TODO: SINCE THE EVENT IS NOW ATTACHED TO THE REF, THE ACTIVE ELEMENT CAN NEVER BE INSIDE THE REF. THE HOTKEY ONLY TRIGGERS IF THE\n // REF IS THE ACTIVE ELEMENT. THIS IS A PROBLEM SINCE FOCUSED SUB COMPONENTS WON'T TRIGGER THE HOTKEY.\n if (ref.current !== null) {\n var rootNode = ref.current.getRootNode();\n if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement !== ref.current && !ref.current.contains(rootNode.activeElement)) {\n stopPropagation(e);\n return;\n }\n }\n if ((_e$target = e.target) != null && _e$target.isContentEditable && !(memoisedOptions != null && memoisedOptions.enableOnContentEditable)) {\n return;\n }\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n var _hotkey$keys;\n var hotkey = parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey);\n if (isHotkeyMatchingKeyboardEvent(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.ignoreModifiers) || (_hotkey$keys = hotkey.keys) != null && _hotkey$keys.includes('*')) {\n if (memoisedOptions != null && memoisedOptions.ignoreEventWhen != null && memoisedOptions.ignoreEventWhen(e)) {\n return;\n }\n if (isKeyUp && hasTriggeredRef.current) {\n return;\n }\n maybePreventDefault(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.preventDefault);\n if (!isHotkeyEnabled(e, hotkey, memoisedOptions == null ? void 0 : memoisedOptions.enabled)) {\n stopPropagation(e);\n return;\n }\n // Execute the user callback for that hotkey\n cbRef.current(e, hotkey);\n if (!isKeyUp) {\n hasTriggeredRef.current = true;\n }\n }\n });\n };\n var handleKeyDown = function handleKeyDown(event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n pushToCurrentlyPressedKeys(mapKey(event.code));\n if ((memoisedOptions == null ? void 0 : memoisedOptions.keydown) === undefined && (memoisedOptions == null ? void 0 : memoisedOptions.keyup) !== true || memoisedOptions != null && memoisedOptions.keydown) {\n listener(event);\n }\n };\n var handleKeyUp = function handleKeyUp(event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n removeFromCurrentlyPressedKeys(mapKey(event.code));\n hasTriggeredRef.current = false;\n if (memoisedOptions != null && memoisedOptions.keyup) {\n listener(event, true);\n }\n };\n var domNode = ref.current || (_options == null ? void 0 : _options.document) || document;\n // @ts-ignore\n domNode.addEventListener('keyup', handleKeyUp);\n // @ts-ignore\n domNode.addEventListener('keydown', handleKeyDown);\n if (proxy) {\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n return proxy.addHotkey(parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey, memoisedOptions == null ? void 0 : memoisedOptions.description));\n });\n }\n return function () {\n // @ts-ignore\n domNode.removeEventListener('keyup', handleKeyUp);\n // @ts-ignore\n domNode.removeEventListener('keydown', handleKeyDown);\n if (proxy) {\n parseKeysHookInput(_keys, memoisedOptions == null ? void 0 : memoisedOptions.splitKey).forEach(function (key) {\n return proxy.removeHotkey(parseHotkey(key, memoisedOptions == null ? void 0 : memoisedOptions.combinationKey, memoisedOptions == null ? void 0 : memoisedOptions.description));\n });\n }\n };\n }, [_keys, memoisedOptions, enabledScopes]);\n return ref;\n}\n\nfunction useRecordHotkeys() {\n var _useState = useState(new Set()),\n keys = _useState[0],\n setKeys = _useState[1];\n var _useState2 = useState(false),\n isRecording = _useState2[0],\n setIsRecording = _useState2[1];\n var handler = useCallback(function (event) {\n if (event.key === undefined) {\n // Synthetic event (e.g., Chrome autofill). Ignore.\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n setKeys(function (prev) {\n var newKeys = new Set(prev);\n newKeys.add(mapKey(event.code));\n return newKeys;\n });\n }, []);\n var stop = useCallback(function () {\n if (typeof document !== 'undefined') {\n document.removeEventListener('keydown', handler);\n setIsRecording(false);\n }\n }, [handler]);\n var start = useCallback(function () {\n setKeys(new Set());\n if (typeof document !== 'undefined') {\n stop();\n document.addEventListener('keydown', handler);\n setIsRecording(true);\n }\n }, [handler, stop]);\n var resetKeys = useCallback(function () {\n setKeys(new Set());\n }, []);\n return [keys, {\n start: start,\n stop: stop,\n resetKeys: resetKeys,\n isRecording: isRecording\n }];\n}\n\nexport { HotkeysProvider, isHotkeyPressed, useHotkeys, useHotkeysContext, useRecordHotkeys };\n//# sourceMappingURL=react-hotkeys-hook.esm.js.map\n","/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n(function(root, factory) {\n if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n root.Toastify = factory();\n }\n})(this, function(global) {\n // Object initialization\n var Toastify = function(options) {\n // Returning a new init object\n return new Toastify.lib.init(options);\n },\n // Library version\n version = \"1.12.0\";\n\n // Set the default global options\n Toastify.defaults = {\n oldestFirst: true,\n text: \"Toastify is awesome!\",\n node: undefined,\n duration: 3000,\n selector: undefined,\n callback: function () {\n },\n destination: undefined,\n newWindow: false,\n close: false,\n gravity: \"toastify-top\",\n positionLeft: false,\n position: '',\n backgroundColor: '',\n avatar: \"\",\n className: \"\",\n stopOnFocus: true,\n onClick: function () {\n },\n offset: {x: 0, y: 0},\n escapeMarkup: true,\n ariaLive: 'polite',\n style: {background: ''}\n };\n\n // Defining the prototype of the object\n Toastify.lib = Toastify.prototype = {\n toastify: version,\n\n constructor: Toastify,\n\n // Initializing the object with required parameters\n init: function(options) {\n // Verifying and validating the input object\n if (!options) {\n options = {};\n }\n\n // Creating the options object\n this.options = {};\n\n this.toastElement = null;\n\n // Validating the options\n this.options.text = options.text || Toastify.defaults.text; // Display message\n this.options.node = options.node || Toastify.defaults.node; // Display content as node\n this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration\n this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector\n this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display\n this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination\n this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window\n this.options.close = options.close || Toastify.defaults.close; // Show toast close icon\n this.options.gravity = options.gravity === \"bottom\" ? \"toastify-bottom\" : Toastify.defaults.gravity; // toast position - top or bottom\n this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right\n this.options.position = options.position || Toastify.defaults.position; // toast position - left or right\n this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color\n this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path\n this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast\n this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus\n this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click\n this.options.offset = options.offset || Toastify.defaults.offset; // toast offset\n this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup;\n this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive;\n this.options.style = options.style || Toastify.defaults.style;\n if(options.backgroundColor) {\n this.options.style.background = options.backgroundColor;\n }\n\n // Returning the current object for chaining functions\n return this;\n },\n\n // Building the DOM element\n buildToast: function() {\n // Validating if the options are defined\n if (!this.options) {\n throw \"Toastify is not initialized\";\n }\n\n // Creating the DOM object\n var divElement = document.createElement(\"div\");\n divElement.className = \"toastify on \" + this.options.className;\n\n // Positioning toast to left or right or center\n if (!!this.options.position) {\n divElement.className += \" toastify-\" + this.options.position;\n } else {\n // To be depreciated in further versions\n if (this.options.positionLeft === true) {\n divElement.className += \" toastify-left\";\n console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.')\n } else {\n // Default position\n divElement.className += \" toastify-right\";\n }\n }\n\n // Assigning gravity of element\n divElement.className += \" \" + this.options.gravity;\n\n if (this.options.backgroundColor) {\n // This is being deprecated in favor of using the style HTML DOM property\n console.warn('DEPRECATION NOTICE: \"backgroundColor\" is being deprecated. Please use the \"style.background\" property.');\n }\n\n // Loop through our style object and apply styles to divElement\n for (var property in this.options.style) {\n divElement.style[property] = this.options.style[property];\n }\n\n // Announce the toast to screen readers\n if (this.options.ariaLive) {\n divElement.setAttribute('aria-live', this.options.ariaLive)\n }\n\n // Adding the toast message/node\n if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {\n // If we have a valid node, we insert it\n divElement.appendChild(this.options.node)\n } else {\n if (this.options.escapeMarkup) {\n divElement.innerText = this.options.text;\n } else {\n divElement.innerHTML = this.options.text;\n }\n\n if (this.options.avatar !== \"\") {\n var avatarElement = document.createElement(\"img\");\n avatarElement.src = this.options.avatar;\n\n avatarElement.className = \"toastify-avatar\";\n\n if (this.options.position == \"left\" || this.options.positionLeft === true) {\n // Adding close icon on the left of content\n divElement.appendChild(avatarElement);\n } else {\n // Adding close icon on the right of content\n divElement.insertAdjacentElement(\"afterbegin\", avatarElement);\n }\n }\n }\n\n // Adding a close icon to the toast\n if (this.options.close === true) {\n // Create a span for close element\n var closeElement = document.createElement(\"button\");\n closeElement.type = \"button\";\n closeElement.setAttribute(\"aria-label\", \"Close\");\n closeElement.className = \"toast-close\";\n closeElement.innerHTML = \"&#10006;\";\n\n // Triggering the removal of toast from DOM on close click\n closeElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.removeElement(this.toastElement);\n window.clearTimeout(this.toastElement.timeOutValue);\n }.bind(this)\n );\n\n //Calculating screen width\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Adding the close icon to the toast element\n // Display on the right if screen width is less than or equal to 360px\n if ((this.options.position == \"left\" || this.options.positionLeft === true) && width > 360) {\n // Adding close icon on the left of content\n divElement.insertAdjacentElement(\"afterbegin\", closeElement);\n } else {\n // Adding close icon on the right of content\n divElement.appendChild(closeElement);\n }\n }\n\n // Clear timeout while toast is focused\n if (this.options.stopOnFocus && this.options.duration > 0) {\n var self = this;\n // stop countdown\n divElement.addEventListener(\n \"mouseover\",\n function(event) {\n window.clearTimeout(divElement.timeOutValue);\n }\n )\n // add back the timeout\n divElement.addEventListener(\n \"mouseleave\",\n function() {\n divElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n self.removeElement(divElement);\n },\n self.options.duration\n )\n }\n )\n }\n\n // Adding an on-click destination path\n if (typeof this.options.destination !== \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n if (this.options.newWindow === true) {\n window.open(this.options.destination, \"_blank\");\n } else {\n window.location = this.options.destination;\n }\n }.bind(this)\n );\n }\n\n if (typeof this.options.onClick === \"function\" && typeof this.options.destination === \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.options.onClick();\n }.bind(this)\n );\n }\n\n // Adding offset\n if(typeof this.options.offset === \"object\") {\n\n var x = getAxisOffsetAValue(\"x\", this.options);\n var y = getAxisOffsetAValue(\"y\", this.options);\n\n var xOffset = this.options.position == \"left\" ? x : \"-\" + x;\n var yOffset = this.options.gravity == \"toastify-top\" ? y : \"-\" + y;\n\n divElement.style.transform = \"translate(\" + xOffset + \",\" + yOffset + \")\";\n\n }\n\n // Returning the generated element\n return divElement;\n },\n\n // Displaying the toast\n showToast: function() {\n // Creating the DOM object for the toast\n this.toastElement = this.buildToast();\n\n // Getting the root element to with the toast needs to be added\n var rootElement;\n if (typeof this.options.selector === \"string\") {\n rootElement = document.getElementById(this.options.selector);\n } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) {\n rootElement = this.options.selector;\n } else {\n rootElement = document.body;\n }\n\n // Validating if root element is present in DOM\n if (!rootElement) {\n throw \"Root element is not defined\";\n }\n\n // Adding the DOM element\n var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild;\n rootElement.insertBefore(this.toastElement, elementToInsert);\n\n // Repositioning the toasts in case multiple toasts are present\n Toastify.reposition();\n\n if (this.options.duration > 0) {\n this.toastElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n this.removeElement(this.toastElement);\n }.bind(this),\n this.options.duration\n ); // Binding `this` for function invocation\n }\n\n // Supporting function chaining\n return this;\n },\n\n hideToast: function() {\n if (this.toastElement.timeOutValue) {\n clearTimeout(this.toastElement.timeOutValue);\n }\n this.removeElement(this.toastElement);\n },\n\n // Removing the element from the DOM\n removeElement: function(toastElement) {\n // Hiding the element\n // toastElement.classList.remove(\"on\");\n toastElement.className = toastElement.className.replace(\" on\", \"\");\n\n // Removing the element from DOM after transition end\n window.setTimeout(\n function() {\n // remove options node if any\n if (this.options.node && this.options.node.parentNode) {\n this.options.node.parentNode.removeChild(this.options.node);\n }\n\n // Remove the element from the DOM, only when the parent node was not removed before.\n if (toastElement.parentNode) {\n toastElement.parentNode.removeChild(toastElement);\n }\n\n // Calling the callback function\n this.options.callback.call(toastElement);\n\n // Repositioning the toasts again\n Toastify.reposition();\n }.bind(this),\n 400\n ); // Binding `this` for function invocation\n },\n };\n\n // Positioning the toasts on the DOM\n Toastify.reposition = function() {\n\n // Top margins with gravity\n var topLeftOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var topRightOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var offsetSize = {\n top: 15,\n bottom: 15,\n };\n\n // Get all toast messages on the DOM\n var allToasts = document.getElementsByClassName(\"toastify\");\n\n var classUsed;\n\n // Modifying the position of each toast element\n for (var i = 0; i < allToasts.length; i++) {\n // Getting the applied gravity\n if (containsClass(allToasts[i], \"toastify-top\") === true) {\n classUsed = \"toastify-top\";\n } else {\n classUsed = \"toastify-bottom\";\n }\n\n var height = allToasts[i].offsetHeight;\n classUsed = classUsed.substr(9, classUsed.length-1)\n // Spacing between toasts\n var offset = 15;\n\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Show toast in center if screen with less than or equal to 360px\n if (width <= 360) {\n // Setting the position\n allToasts[i].style[classUsed] = offsetSize[classUsed] + \"px\";\n\n offsetSize[classUsed] += height + offset;\n } else {\n if (containsClass(allToasts[i], \"toastify-left\") === true) {\n // Setting the position\n allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + \"px\";\n\n topLeftOffsetSize[classUsed] += height + offset;\n } else {\n // Setting the position\n allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + \"px\";\n\n topRightOffsetSize[classUsed] += height + offset;\n }\n }\n }\n\n // Supporting function chaining\n return this;\n };\n\n // Helper function to get offset.\n function getAxisOffsetAValue(axis, options) {\n\n if(options.offset[axis]) {\n if(isNaN(options.offset[axis])) {\n return options.offset[axis];\n }\n else {\n return options.offset[axis] + 'px';\n }\n }\n\n return '0px';\n\n }\n\n function containsClass(elem, yourClass) {\n if (!elem || typeof yourClass !== \"string\") {\n return false;\n } else if (\n elem.className &&\n elem.className\n .trim()\n .split(/\\s+/gi)\n .indexOf(yourClass) > -1\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n // Setting up the prototype for the init object\n Toastify.lib.init.prototype = Toastify.lib;\n\n // Returning the Toastify function to be assigned to the window object/module\n return Toastify;\n});\n","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 = URL.parse('/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': {\n module: () => import('@iconify-icons/mingcute/arrow-left-line'),\n rtl: true,\n },\n 'arrow-right': {\n module: () => import('@iconify-icons/mingcute/arrow-right-line'),\n rtl: true,\n },\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: {\n module: () => import('@iconify-icons/mingcute/chat-3-line'),\n rtl: true,\n },\n comment2: {\n module: () => import('@iconify-icons/mingcute/comment-2-line'),\n rtl: true,\n },\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: {\n module: () => import('@iconify-icons/mingcute/external-link-line'),\n rtl: true,\n },\n popout: {\n module: () => import('@iconify-icons/mingcute/external-link-line'),\n rtl: true,\n },\n popin: {\n module: () => import('@iconify-icons/mingcute/external-link-line'),\n rotate: '180deg',\n rtl: true,\n },\n plus: () => import('@iconify-icons/mingcute/add-circle-line'),\n 'chevron-left': {\n module: () => import('@iconify-icons/mingcute/left-line'),\n rtl: true,\n },\n 'chevron-right': {\n module: () => import('@iconify-icons/mingcute/right-line'),\n rtl: true,\n },\n 'chevron-down': () => import('@iconify-icons/mingcute/down-line'),\n reply: {\n module: () => import('@iconify-icons/mingcute/share-forward-line'),\n rotate: '180deg',\n flip: 'horizontal',\n rtl: true,\n },\n thread: () => import('@iconify-icons/mingcute/route-line'),\n group: {\n module: () => import('@iconify-icons/mingcute/group-line'),\n rtl: true,\n },\n bot: () => import('@iconify-icons/mingcute/android-2-line'),\n menu: () => import('@iconify-icons/mingcute/rows-4-line'),\n list: {\n module: () => import('@iconify-icons/mingcute/list-check-line'),\n rtl: true,\n },\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: {\n module: () => import('@iconify-icons/mingcute/exit-line'),\n rtl: true,\n },\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: {\n module: () => import('@iconify-icons/mingcute/volume-mute-line'),\n rtl: true,\n },\n unmute: {\n module: () => import('@iconify-icons/mingcute/volume-line'),\n rtl: true,\n },\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: {\n module: () => import('@iconify-icons/mingcute/layout-4-line'),\n rtl: true,\n },\n layout5: () => import('@iconify-icons/mingcute/layout-5-line'),\n announce: {\n module: () => import('@iconify-icons/mingcute/announcement-line'),\n rtl: true,\n },\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: {\n module: () => import('@iconify-icons/mingcute/clipboard-line'),\n rtl: true,\n },\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: {\n module: () => import('@iconify-icons/mingcute/calendar-month-line'),\n rtl: true,\n },\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: {\n module: () => import('@iconify-icons/mingcute/history-2-line'),\n rtl: true,\n },\n document: () => import('@iconify-icons/mingcute/document-line'),\n 'arrows-right': {\n module: () => import('@iconify-icons/mingcute/arrows-right-line'),\n rtl: true,\n },\n code: () => import('@iconify-icons/mingcute/code-line'),\n copy: () => import('@iconify-icons/mingcute/copy-2-line'),\n quote: {\n module: () => import('@iconify-icons/mingcute/quote-left-line'),\n rtl: true,\n },\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,\n flip,\n rtl = false;\n if (Array.isArray(iconBlock)) {\n [iconBlock, rotate, flip] = iconBlock;\n } else if (typeof iconBlock === 'object') {\n ({ rotate, flip, rtl } = iconBlock);\n iconBlock = iconBlock.module;\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} ${rtl ? 'rtl-flip' : ''}`}\n title={title || alt}\n style={{\n width: `${iconSize}px`,\n height: `${iconSize}px`,\n ...style,\n }}\n data-icon={icon}\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","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import { unstable_batchedUpdates } from 'react-dom';\n\nconst isMenuOpen = state => !!state && state[0] === 'o';\nconst batchedUpdates = unstable_batchedUpdates || (callback => callback());\nconst values = Object.values || (obj => Object.keys(obj).map(key => obj[key]));\nconst getTransition = (transition, name) => transition === true || !!(transition && transition[name]);\nconst safeCall = (fn, arg) => typeof fn === 'function' ? fn(arg) : fn;\nconst internalKey = '_szhsinMenu';\nconst getName = component => component[internalKey];\nconst defineName = (name, component) => Object.defineProperty(component, internalKey, {\n value: name\n});\nconst mergeProps = (target, source) => {\n source && Object.keys(source).forEach(key => {\n const targetProp = target[key];\n const sourceProp = source[key];\n if (typeof sourceProp === 'function' && targetProp) {\n target[key] = (...arg) => {\n sourceProp(...arg);\n targetProp(...arg);\n };\n } else {\n target[key] = sourceProp;\n }\n });\n return target;\n};\nconst parsePadding = paddingStr => {\n if (typeof paddingStr !== 'string') return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n const padding = paddingStr.trim().split(/\\s+/, 4).map(parseFloat);\n const top = !isNaN(padding[0]) ? padding[0] : 0;\n const right = !isNaN(padding[1]) ? padding[1] : top;\n return {\n top,\n right,\n bottom: !isNaN(padding[2]) ? padding[2] : top,\n left: !isNaN(padding[3]) ? padding[3] : right\n };\n};\nconst getScrollAncestor = node => {\n while (node) {\n node = node.parentNode;\n if (!node || node === document.body || !node.parentNode) return;\n const {\n overflow,\n overflowX,\n overflowY\n } = getComputedStyle(node);\n if (/auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX)) return node;\n }\n};\nfunction commonProps(isDisabled, isHovering) {\n return {\n 'aria-disabled': isDisabled || undefined,\n tabIndex: isHovering ? 0 : -1\n };\n}\nfunction indexOfNode(nodeList, node) {\n for (let i = 0; i < nodeList.length; i++) {\n if (nodeList[i] === node) return i;\n }\n return -1;\n}\n\nexport { batchedUpdates, commonProps, defineName, getName, getScrollAncestor, getTransition, indexOfNode, isMenuOpen, mergeProps, parsePadding, safeCall, values };\n","import { oneOfType, string, func, object, bool, number, oneOf, exact } from 'prop-types';\n\nconst stylePropTypes = name => ({\n [name ? `${name}ClassName` : 'className']: oneOfType([string, func])\n});\nconst menuPropTypes = {\n className: string,\n ...stylePropTypes('menu'),\n arrowProps: object,\n focusProps: object,\n menuStyle: object,\n arrow: bool,\n setDownOverflow: bool,\n gap: number,\n shift: number,\n align: /*#__PURE__*/oneOf(['start', 'center', 'end']),\n direction: /*#__PURE__*/oneOf(['left', 'right', 'top', 'bottom']),\n position: /*#__PURE__*/oneOf(['auto', 'anchor', 'initial']),\n overflow: /*#__PURE__*/oneOf(['auto', 'visible', 'hidden'])\n};\nconst rootMenuPropTypes = {\n ...menuPropTypes,\n containerProps: object,\n initialMounted: bool,\n unmountOnClose: bool,\n transition: /*#__PURE__*/oneOfType([bool, /*#__PURE__*/exact({\n open: bool,\n close: bool,\n item: bool\n })]),\n transitionTimeout: number,\n boundingBoxRef: object,\n boundingBoxPadding: string,\n reposition: /*#__PURE__*/oneOf(['auto', 'initial']),\n repositionFlag: /*#__PURE__*/oneOfType([string, number]),\n viewScroll: /*#__PURE__*/oneOf(['auto', 'close', 'initial']),\n submenuOpenDelay: number,\n submenuCloseDelay: number,\n portal: /*#__PURE__*/oneOfType([bool, /*#__PURE__*/exact({\n target: object,\n stablePosition: bool\n })]),\n theming: string,\n onItemClick: func\n};\nconst uncontrolledMenuPropTypes = {\n instanceRef: /*#__PURE__*/oneOfType([object, func]),\n onMenuChange: func\n};\n\nexport { menuPropTypes, rootMenuPropTypes, stylePropTypes, uncontrolledMenuPropTypes };\n","import { useMemo } from 'react';\n\nconst useBEM = ({\n block,\n element,\n modifiers,\n className\n}) => useMemo(() => {\n const blockElement = element ? `${block}__${element}` : block;\n let classString = blockElement;\n modifiers && Object.keys(modifiers).forEach(name => {\n const value = modifiers[name];\n if (value) classString += ` ${blockElement}--${value === true ? name : `${name}-${value}`}`;\n });\n let expandedClassName = typeof className === 'function' ? className(modifiers) : className;\n if (typeof expandedClassName === 'string') {\n expandedClassName = expandedClassName.trim();\n if (expandedClassName) classString += ` ${expandedClassName}`;\n }\n return classString;\n}, [block, element, modifiers, className]);\n\nexport { useBEM };\n","import { createContext } from 'react';\n\nconst menuContainerClass = 'szh-menu-container';\nconst menuClass = 'szh-menu';\nconst menuButtonClass = 'szh-menu-button';\nconst menuArrowClass = 'arrow';\nconst menuItemClass = 'item';\nconst menuDividerClass = 'divider';\nconst menuHeaderClass = 'header';\nconst menuGroupClass = 'group';\nconst subMenuClass = 'submenu';\nconst radioGroupClass = 'radio-group';\nconst HoverItemContext = /*#__PURE__*/createContext();\nconst MenuListItemContext = /*#__PURE__*/createContext({});\nconst MenuListContext = /*#__PURE__*/createContext({});\nconst EventHandlersContext = /*#__PURE__*/createContext({});\nconst RadioGroupContext = /*#__PURE__*/createContext({});\nconst SettingsContext = /*#__PURE__*/createContext({});\nconst Keys = /*#__PURE__*/Object.freeze({\n ENTER: 'Enter',\n ESC: 'Escape',\n SPACE: ' ',\n HOME: 'Home',\n END: 'End',\n LEFT: 'ArrowLeft',\n RIGHT: 'ArrowRight',\n UP: 'ArrowUp',\n DOWN: 'ArrowDown'\n});\nconst HoverActionTypes = /*#__PURE__*/Object.freeze({\n RESET: 0,\n SET: 1,\n UNSET: 2,\n INCREASE: 3,\n DECREASE: 4,\n FIRST: 5,\n LAST: 6,\n SET_INDEX: 7\n});\nconst CloseReason = /*#__PURE__*/Object.freeze({\n CLICK: 'click',\n CANCEL: 'cancel',\n BLUR: 'blur',\n SCROLL: 'scroll'\n});\nconst FocusPositions = /*#__PURE__*/Object.freeze({\n FIRST: 'first',\n LAST: 'last'\n});\nconst MenuStateMap = /*#__PURE__*/Object.freeze({\n entering: 'opening',\n entered: 'open',\n exiting: 'closing',\n exited: 'closed'\n});\nconst positionAbsolute = 'absolute';\nconst roleNone = 'presentation';\nconst roleMenuitem = 'menuitem';\nconst dummyItemProps = {\n 'aria-hidden': true,\n role: roleMenuitem\n};\n\nexport { CloseReason, EventHandlersContext, FocusPositions, HoverActionTypes, HoverItemContext, Keys, MenuListContext, MenuListItemContext, MenuStateMap, RadioGroupContext, SettingsContext, dummyItemProps, menuArrowClass, menuButtonClass, menuClass, menuContainerClass, menuDividerClass, menuGroupClass, menuHeaderClass, menuItemClass, positionAbsolute, radioGroupClass, roleMenuitem, roleNone, subMenuClass };\n","import { useMemo } from 'react';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps, getTransition, safeCall } from '../utils/utils.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { menuContainerClass, Keys, CloseReason } from '../utils/constants.js';\n\nconst MenuContainer = ({\n className,\n containerRef,\n containerProps,\n children,\n isOpen,\n theming,\n transition,\n onClose\n}) => {\n const itemTransition = getTransition(transition, 'item');\n const onKeyDown = ({\n key\n }) => {\n switch (key) {\n case Keys.ESC:\n safeCall(onClose, {\n key,\n reason: CloseReason.CANCEL\n });\n break;\n }\n };\n const onBlur = e => {\n if (isOpen && !e.currentTarget.contains(e.relatedTarget)) {\n safeCall(onClose, {\n reason: CloseReason.BLUR\n });\n }\n };\n return /*#__PURE__*/jsx(\"div\", {\n ...mergeProps({\n onKeyDown,\n onBlur\n }, containerProps),\n className: useBEM({\n block: menuContainerClass,\n modifiers: useMemo(() => ({\n theme: theming,\n itemTransition\n }), [theming, itemTransition]),\n className\n }),\n style: {\n position: 'absolute',\n ...(containerProps == null ? void 0 : containerProps.style)\n },\n ref: containerRef,\n children: children\n });\n};\n\nexport { MenuContainer };\n","const createSubmenuCtx = () => {\n let timer,\n count = 0;\n return {\n toggle: isOpen => {\n isOpen ? count++ : count--;\n count = Math.max(count, 0);\n },\n on: (closeDelay, pending, settled) => {\n if (count) {\n if (!timer) timer = setTimeout(() => {\n timer = 0;\n pending();\n }, closeDelay);\n } else {\n settled == null || settled();\n }\n },\n off: () => {\n if (timer) {\n clearTimeout(timer);\n timer = 0;\n }\n }\n };\n};\n\nexport { createSubmenuCtx };\n","import { useState, useRef, useCallback } from 'react';\nimport { HoverActionTypes } from '../utils/constants.js';\nimport { indexOfNode } from '../utils/utils.js';\n\nconst useItems = (menuRef, focusRef) => {\n const [hoverItem, setHoverItem] = useState();\n const stateRef = useRef({\n items: [],\n hoverIndex: -1,\n sorted: false\n });\n const mutableState = stateRef.current;\n const updateItems = useCallback((item, isMounted) => {\n const {\n items\n } = mutableState;\n if (!item) {\n mutableState.items = [];\n } else if (isMounted) {\n items.push(item);\n } else {\n const index = items.indexOf(item);\n if (index > -1) {\n items.splice(index, 1);\n if (item.contains(document.activeElement)) {\n focusRef.current.focus();\n setHoverItem();\n }\n }\n }\n mutableState.hoverIndex = -1;\n mutableState.sorted = false;\n }, [mutableState, focusRef]);\n const dispatch = useCallback((actionType, item, nextIndex) => {\n const {\n items,\n hoverIndex\n } = mutableState;\n const sortItems = () => {\n if (mutableState.sorted) return;\n const orderedNodes = menuRef.current.querySelectorAll('.szh-menu__item');\n items.sort((a, b) => indexOfNode(orderedNodes, a) - indexOfNode(orderedNodes, b));\n mutableState.sorted = true;\n };\n let index = -1,\n newItem = undefined;\n switch (actionType) {\n case HoverActionTypes.RESET:\n break;\n case HoverActionTypes.SET:\n newItem = item;\n break;\n case HoverActionTypes.UNSET:\n newItem = prevItem => prevItem === item ? undefined : prevItem;\n break;\n case HoverActionTypes.FIRST:\n sortItems();\n index = 0;\n newItem = items[index];\n break;\n case HoverActionTypes.LAST:\n sortItems();\n index = items.length - 1;\n newItem = items[index];\n break;\n case HoverActionTypes.SET_INDEX:\n sortItems();\n index = nextIndex;\n newItem = items[index];\n break;\n case HoverActionTypes.INCREASE:\n sortItems();\n index = hoverIndex;\n if (index < 0) index = items.indexOf(item);\n index++;\n if (index >= items.length) index = 0;\n newItem = items[index];\n break;\n case HoverActionTypes.DECREASE:\n sortItems();\n index = hoverIndex;\n if (index < 0) index = items.indexOf(item);\n index--;\n if (index < 0) index = items.length - 1;\n newItem = items[index];\n break;\n default:\n if (process.env.NODE_ENV !== 'production') throw new Error(`[React-Menu] Unknown hover action type: ${actionType}`);\n }\n if (!newItem) index = -1;\n setHoverItem(newItem);\n mutableState.hoverIndex = index;\n }, [menuRef, mutableState]);\n return {\n hoverItem,\n dispatch,\n updateItems\n };\n};\n\nexport { useItems };\n","const getNativeDimension = (transformed, untransformed) => Math.round(transformed) === untransformed ? transformed : untransformed;\nconst getNormalizedClientRect = element => {\n const rect = element.getBoundingClientRect();\n rect.width = getNativeDimension(rect.width, element.offsetWidth);\n rect.height = getNativeDimension(rect.height, element.offsetHeight);\n return rect;\n};\n\nexport { getNormalizedClientRect };\n","import { getNormalizedClientRect } from './getNormalizedClientRect.js';\nimport { parsePadding } from '../utils/utils.js';\n\nconst getPositionHelpers = (containerRef, menuRef, menuScroll, boundingBoxPadding) => {\n const menuRect = getNormalizedClientRect(menuRef.current);\n const containerRect = containerRef.current.getBoundingClientRect();\n const boundingRect = menuScroll === window ? {\n left: 0,\n top: 0,\n right: document.documentElement.clientWidth,\n bottom: window.innerHeight\n } : menuScroll.getBoundingClientRect();\n const padding = parsePadding(boundingBoxPadding);\n const getLeftOverflow = x => x + containerRect.left - boundingRect.left - padding.left;\n const getRightOverflow = x => x + containerRect.left + menuRect.width - boundingRect.right + padding.right;\n const getTopOverflow = y => y + containerRect.top - boundingRect.top - padding.top;\n const getBottomOverflow = y => y + containerRect.top + menuRect.height - boundingRect.bottom + padding.bottom;\n const confineHorizontally = x => {\n let leftOverflow = getLeftOverflow(x);\n if (leftOverflow < 0) {\n x -= leftOverflow;\n } else {\n const rightOverflow = getRightOverflow(x);\n if (rightOverflow > 0) {\n x -= rightOverflow;\n leftOverflow = getLeftOverflow(x);\n if (leftOverflow < 0) x -= leftOverflow;\n }\n }\n return x;\n };\n const confineVertically = y => {\n let topOverflow = getTopOverflow(y);\n if (topOverflow < 0) {\n y -= topOverflow;\n } else {\n const bottomOverflow = getBottomOverflow(y);\n if (bottomOverflow > 0) {\n y -= bottomOverflow;\n topOverflow = getTopOverflow(y);\n if (topOverflow < 0) y -= topOverflow;\n }\n }\n return y;\n };\n return {\n menuRect,\n containerRect,\n getLeftOverflow,\n getRightOverflow,\n getTopOverflow,\n getBottomOverflow,\n confineHorizontally,\n confineVertically\n };\n};\n\nexport { getPositionHelpers };\n","const placeArrowVertical = ({\n arrowRef,\n menuY,\n anchorRect,\n containerRect,\n menuRect\n}) => {\n let y = anchorRect.top - containerRect.top - menuY + anchorRect.height / 2;\n const offset = arrowRef.current.offsetHeight * 1.25;\n y = Math.max(offset, y);\n y = Math.min(y, menuRect.height - offset);\n return y;\n};\n\nexport { placeArrowVertical };\n","import { placeArrowVertical } from './placeArrowVertical.js';\n\nconst placeLeftorRight = ({\n anchorRect,\n containerRect,\n menuRect,\n placeLeftorRightY,\n placeLeftX,\n placeRightX,\n getLeftOverflow,\n getRightOverflow,\n confineHorizontally,\n confineVertically,\n arrowRef,\n arrow,\n direction,\n position\n}) => {\n let computedDirection = direction;\n let y = placeLeftorRightY;\n if (position !== 'initial') {\n y = confineVertically(y);\n if (position === 'anchor') {\n y = Math.min(y, anchorRect.bottom - containerRect.top);\n y = Math.max(y, anchorRect.top - containerRect.top - menuRect.height);\n }\n }\n let x, leftOverflow, rightOverflow;\n if (computedDirection === 'left') {\n x = placeLeftX;\n if (position !== 'initial') {\n leftOverflow = getLeftOverflow(x);\n if (leftOverflow < 0) {\n rightOverflow = getRightOverflow(placeRightX);\n if (rightOverflow <= 0 || -leftOverflow > rightOverflow) {\n x = placeRightX;\n computedDirection = 'right';\n }\n }\n }\n } else {\n x = placeRightX;\n if (position !== 'initial') {\n rightOverflow = getRightOverflow(x);\n if (rightOverflow > 0) {\n leftOverflow = getLeftOverflow(placeLeftX);\n if (leftOverflow >= 0 || -leftOverflow < rightOverflow) {\n x = placeLeftX;\n computedDirection = 'left';\n }\n }\n }\n }\n if (position === 'auto') x = confineHorizontally(x);\n const arrowY = arrow ? placeArrowVertical({\n menuY: y,\n arrowRef,\n anchorRect,\n containerRect,\n menuRect\n }) : undefined;\n return {\n arrowY,\n x,\n y,\n computedDirection\n };\n};\n\nexport { placeLeftorRight };\n","const placeArrowHorizontal = ({\n arrowRef,\n menuX,\n anchorRect,\n containerRect,\n menuRect\n}) => {\n let x = anchorRect.left - containerRect.left - menuX + anchorRect.width / 2;\n const offset = arrowRef.current.offsetWidth * 1.25;\n x = Math.max(offset, x);\n x = Math.min(x, menuRect.width - offset);\n return x;\n};\n\nexport { placeArrowHorizontal };\n","import { placeArrowHorizontal } from './placeArrowHorizontal.js';\n\nconst placeToporBottom = ({\n anchorRect,\n containerRect,\n menuRect,\n placeToporBottomX,\n placeTopY,\n placeBottomY,\n getTopOverflow,\n getBottomOverflow,\n confineHorizontally,\n confineVertically,\n arrowRef,\n arrow,\n direction,\n position\n}) => {\n let computedDirection = direction === 'top' ? 'top' : 'bottom';\n let x = placeToporBottomX;\n if (position !== 'initial') {\n x = confineHorizontally(x);\n if (position === 'anchor') {\n x = Math.min(x, anchorRect.right - containerRect.left);\n x = Math.max(x, anchorRect.left - containerRect.left - menuRect.width);\n }\n }\n let y, topOverflow, bottomOverflow;\n if (computedDirection === 'top') {\n y = placeTopY;\n if (position !== 'initial') {\n topOverflow = getTopOverflow(y);\n if (topOverflow < 0) {\n bottomOverflow = getBottomOverflow(placeBottomY);\n if (bottomOverflow <= 0 || -topOverflow > bottomOverflow) {\n y = placeBottomY;\n computedDirection = 'bottom';\n }\n }\n }\n } else {\n y = placeBottomY;\n if (position !== 'initial') {\n bottomOverflow = getBottomOverflow(y);\n if (bottomOverflow > 0) {\n topOverflow = getTopOverflow(placeTopY);\n if (topOverflow >= 0 || -topOverflow < bottomOverflow) {\n y = placeTopY;\n computedDirection = 'top';\n }\n }\n }\n }\n if (position === 'auto') y = confineVertically(y);\n const arrowX = arrow ? placeArrowHorizontal({\n menuX: x,\n arrowRef,\n anchorRect,\n containerRect,\n menuRect\n }) : undefined;\n return {\n arrowX,\n x,\n y,\n computedDirection\n };\n};\n\nexport { placeToporBottom };\n","import { placeLeftorRight } from './placeLeftorRight.js';\nimport { placeToporBottom } from './placeToporBottom.js';\n\nconst positionMenu = ({\n arrow,\n align,\n direction,\n gap,\n shift,\n position,\n anchorRect,\n arrowRef,\n positionHelpers\n}) => {\n const {\n menuRect,\n containerRect\n } = positionHelpers;\n const isHorizontal = direction === 'left' || direction === 'right';\n let horizontalOffset = isHorizontal ? gap : shift;\n let verticalOffset = isHorizontal ? shift : gap;\n if (arrow) {\n const arrowElt = arrowRef.current;\n if (isHorizontal) {\n horizontalOffset += arrowElt.offsetWidth;\n } else {\n verticalOffset += arrowElt.offsetHeight;\n }\n }\n const placeLeftX = anchorRect.left - containerRect.left - menuRect.width - horizontalOffset;\n const placeRightX = anchorRect.right - containerRect.left + horizontalOffset;\n const placeTopY = anchorRect.top - containerRect.top - menuRect.height - verticalOffset;\n const placeBottomY = anchorRect.bottom - containerRect.top + verticalOffset;\n let placeToporBottomX, placeLeftorRightY;\n if (align === 'end') {\n placeToporBottomX = anchorRect.right - containerRect.left - menuRect.width;\n placeLeftorRightY = anchorRect.bottom - containerRect.top - menuRect.height;\n } else if (align === 'center') {\n placeToporBottomX = anchorRect.left - containerRect.left - (menuRect.width - anchorRect.width) / 2;\n placeLeftorRightY = anchorRect.top - containerRect.top - (menuRect.height - anchorRect.height) / 2;\n } else {\n placeToporBottomX = anchorRect.left - containerRect.left;\n placeLeftorRightY = anchorRect.top - containerRect.top;\n }\n placeToporBottomX += horizontalOffset;\n placeLeftorRightY += verticalOffset;\n const options = {\n ...positionHelpers,\n anchorRect,\n placeLeftX,\n placeRightX,\n placeLeftorRightY,\n placeTopY,\n placeBottomY,\n placeToporBottomX,\n arrowRef,\n arrow,\n direction,\n position\n };\n switch (direction) {\n case 'left':\n case 'right':\n return placeLeftorRight(options);\n case 'top':\n case 'bottom':\n default:\n return placeToporBottom(options);\n }\n};\n\nexport { positionMenu };\n","import { useLayoutEffect, useEffect } from 'react';\n\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect as useLayoutEffect };\n","import { useMemo } from 'react';\n\nfunction setRef(ref, instance) {\n typeof ref === 'function' ? ref(instance) : ref.current = instance;\n}\nconst useCombinedRef = (refA, refB) => useMemo(() => {\n if (!refA) return refB;\n if (!refB) return refA;\n return instance => {\n setRef(refA, instance);\n setRef(refB, instance);\n };\n}, [refA, refB]);\n\nexport { useCombinedRef };\n","import { useState, useReducer, useContext, useRef, useCallback, useEffect, useMemo } from 'react';\nimport { flushSync } from 'react-dom';\nimport { MenuContainer } from './MenuContainer.js';\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { createSubmenuCtx } from '../utils/submenuCtx.js';\nimport { SettingsContext, MenuListContext, HoverActionTypes, menuClass, menuArrowClass, positionAbsolute, dummyItemProps, MenuListItemContext, HoverItemContext, Keys, CloseReason, FocusPositions } from '../utils/constants.js';\nimport { useItems } from '../hooks/useItems.js';\nimport { getScrollAncestor, commonProps, mergeProps, safeCall, isMenuOpen, getTransition, batchedUpdates } from '../utils/utils.js';\nimport { getPositionHelpers } from '../positionUtils/getPositionHelpers.js';\nimport { positionMenu } from '../positionUtils/positionMenu.js';\nimport { useLayoutEffect as useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\n\nconst offScreen = -9999;\nconst MenuList = ({\n ariaLabel,\n menuClassName,\n menuStyle,\n arrow,\n arrowProps = {},\n anchorPoint,\n anchorRef,\n containerRef,\n containerProps,\n focusProps,\n externalRef,\n parentScrollingRef,\n align = 'start',\n direction = 'bottom',\n position = 'auto',\n overflow = 'visible',\n setDownOverflow,\n repositionFlag,\n captureFocus = true,\n state,\n endTransition,\n isDisabled,\n menuItemFocus,\n gap = 0,\n shift = 0,\n children,\n onClose,\n ...restProps\n}) => {\n const [menuPosition, setMenuPosition] = useState({\n x: offScreen,\n y: offScreen\n });\n const [arrowPosition, setArrowPosition] = useState({});\n const [overflowData, setOverflowData] = useState();\n const [expandedDirection, setExpandedDirection] = useState(direction);\n const [submenuCtx] = useState(createSubmenuCtx);\n const [reposSubmenu, forceReposSubmenu] = useReducer(c => c + 1, 1);\n const {\n transition,\n boundingBoxRef,\n boundingBoxPadding,\n rootMenuRef,\n rootAnchorRef,\n scrollNodesRef,\n reposition,\n viewScroll,\n submenuCloseDelay\n } = useContext(SettingsContext);\n const {\n submenuCtx: parentSubmenuCtx,\n reposSubmenu: reposFlag = repositionFlag\n } = useContext(MenuListContext);\n const menuRef = useRef(null);\n const focusRef = useRef();\n const arrowRef = useRef();\n const prevOpen = useRef(false);\n const {\n hoverItem,\n dispatch,\n updateItems\n } = useItems(menuRef, focusRef);\n const isOpen = isMenuOpen(state);\n const openTransition = getTransition(transition, 'open');\n const closeTransition = getTransition(transition, 'close');\n const scrollNodes = scrollNodesRef.current;\n const onKeyDown = e => {\n switch (e.key) {\n case Keys.HOME:\n dispatch(HoverActionTypes.FIRST);\n break;\n case Keys.END:\n dispatch(HoverActionTypes.LAST);\n break;\n case Keys.UP:\n dispatch(HoverActionTypes.DECREASE, hoverItem);\n break;\n case Keys.DOWN:\n dispatch(HoverActionTypes.INCREASE, hoverItem);\n break;\n case Keys.SPACE:\n if (e.target && e.target.className.indexOf(menuClass) !== -1) {\n e.preventDefault();\n }\n return;\n default:\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n };\n const onAnimationEnd = () => {\n if (state === 'closing') {\n setOverflowData();\n }\n safeCall(endTransition);\n };\n const onPointerMove = e => {\n e.stopPropagation();\n submenuCtx.on(submenuCloseDelay, () => {\n dispatch(HoverActionTypes.RESET);\n focusRef.current.focus();\n });\n };\n const onPointerLeave = e => {\n if (e.target === e.currentTarget) submenuCtx.off();\n };\n const handlePosition = useCallback(noOverflowCheck => {\n var _anchorRef$current;\n const anchorRect = anchorRef ? (_anchorRef$current = anchorRef.current) == null ? void 0 : _anchorRef$current.getBoundingClientRect() : anchorPoint ? {\n left: anchorPoint.x,\n right: anchorPoint.x,\n top: anchorPoint.y,\n bottom: anchorPoint.y,\n width: 0,\n height: 0\n } : null;\n if (!anchorRect) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('[React-Menu] Menu might not be positioned properly as one of the anchorRef or anchorPoint prop should be provided. If `anchorRef` is provided, the anchor must be mounted before menu is open.');\n }\n return;\n }\n if (!scrollNodes.menu) {\n scrollNodes.menu = (boundingBoxRef ? boundingBoxRef.current : getScrollAncestor(rootMenuRef.current)) || window;\n }\n const positionHelpers = getPositionHelpers(containerRef, menuRef, scrollNodes.menu, boundingBoxPadding);\n let {\n arrowX,\n arrowY,\n x,\n y,\n computedDirection\n } = positionMenu({\n arrow,\n align,\n direction,\n gap,\n shift,\n position,\n anchorRect,\n arrowRef,\n positionHelpers\n });\n const {\n menuRect\n } = positionHelpers;\n const menuHeight = menuRect.height;\n if (!noOverflowCheck && overflow !== 'visible') {\n const {\n getTopOverflow,\n getBottomOverflow\n } = positionHelpers;\n let height, overflowAmt;\n const bottomOverflow = getBottomOverflow(y);\n if (bottomOverflow > 0) {\n height = menuHeight - bottomOverflow;\n overflowAmt = bottomOverflow;\n } else {\n const topOverflow = getTopOverflow(y);\n if (topOverflow < 0) {\n height = menuHeight + topOverflow;\n overflowAmt = 0 - topOverflow;\n if (height >= 0) y -= topOverflow;\n }\n }\n if (height >= 0) {\n setOverflowData({\n height,\n overflowAmt\n });\n }\n }\n if (arrow) setArrowPosition({\n x: arrowX,\n y: arrowY\n });\n setMenuPosition({\n x,\n y\n });\n setExpandedDirection(computedDirection);\n }, [arrow, align, boundingBoxPadding, direction, gap, shift, position, overflow, anchorPoint, anchorRef, containerRef, boundingBoxRef, rootMenuRef, scrollNodes]);\n useIsomorphicLayoutEffect(() => {\n if (isOpen) {\n handlePosition();\n if (prevOpen.current) forceReposSubmenu();\n }\n prevOpen.current = isOpen;\n }, [isOpen, handlePosition, reposFlag]);\n useIsomorphicLayoutEffect(() => {\n if (overflowData && !setDownOverflow) menuRef.current.scrollTop = 0;\n }, [overflowData, setDownOverflow]);\n useIsomorphicLayoutEffect(() => updateItems, [updateItems]);\n useEffect(() => {\n let {\n menu: menuScroll\n } = scrollNodes;\n if (!isOpen || !menuScroll) return;\n menuScroll = menuScroll.addEventListener ? menuScroll : window;\n if (!scrollNodes.anchors) {\n scrollNodes.anchors = [];\n let anchorScroll = getScrollAncestor(rootAnchorRef && rootAnchorRef.current);\n while (anchorScroll && anchorScroll !== menuScroll) {\n scrollNodes.anchors.push(anchorScroll);\n anchorScroll = getScrollAncestor(anchorScroll);\n }\n }\n let scroll = viewScroll;\n if (scrollNodes.anchors.length && scroll === 'initial') scroll = 'auto';\n if (scroll === 'initial') return;\n const handleScroll = () => {\n if (scroll === 'auto') {\n batchedUpdates(() => handlePosition(true));\n } else {\n safeCall(onClose, {\n reason: CloseReason.SCROLL\n });\n }\n };\n const scrollObservers = scrollNodes.anchors.concat(viewScroll !== 'initial' ? menuScroll : []);\n scrollObservers.forEach(o => o.addEventListener('scroll', handleScroll));\n return () => scrollObservers.forEach(o => o.removeEventListener('scroll', handleScroll));\n }, [rootAnchorRef, scrollNodes, isOpen, onClose, viewScroll, handlePosition]);\n const hasOverflow = !!overflowData && overflowData.overflowAmt > 0;\n useEffect(() => {\n if (hasOverflow || !isOpen || !parentScrollingRef) return;\n const handleScroll = () => batchedUpdates(handlePosition);\n const parentScroll = parentScrollingRef.current;\n parentScroll.addEventListener('scroll', handleScroll);\n return () => parentScroll.removeEventListener('scroll', handleScroll);\n }, [isOpen, hasOverflow, parentScrollingRef, handlePosition]);\n useEffect(() => {\n if (!isOpen || typeof ResizeObserver !== 'function' || reposition === 'initial') return;\n const targetList = [];\n const resizeObserver = new ResizeObserver(entries => entries.forEach(({\n target\n }) => {\n if (targetList.indexOf(target) < 0) {\n targetList.push(target);\n } else {\n flushSync(() => {\n handlePosition();\n forceReposSubmenu();\n });\n }\n }));\n const resizeObserverOptions = {\n box: 'border-box'\n };\n resizeObserver.observe(menuRef.current, resizeObserverOptions);\n const anchor = anchorRef == null ? void 0 : anchorRef.current;\n anchor && resizeObserver.observe(anchor, resizeObserverOptions);\n return () => resizeObserver.disconnect();\n }, [isOpen, reposition, anchorRef, handlePosition]);\n useEffect(() => {\n if (!isOpen) {\n dispatch(HoverActionTypes.RESET);\n if (!closeTransition) setOverflowData();\n return;\n }\n const {\n position,\n alwaysUpdate\n } = menuItemFocus || {};\n const setItemFocus = () => {\n if (position === FocusPositions.FIRST) {\n dispatch(HoverActionTypes.FIRST);\n } else if (position === FocusPositions.LAST) {\n dispatch(HoverActionTypes.LAST);\n } else if (position >= -1) {\n dispatch(HoverActionTypes.SET_INDEX, undefined, position);\n }\n };\n if (alwaysUpdate) {\n setItemFocus();\n } else if (captureFocus) {\n const id = setTimeout(() => {\n const menuElt = menuRef.current;\n if (menuElt && !menuElt.contains(document.activeElement)) {\n focusRef.current.focus();\n setItemFocus();\n }\n }, openTransition ? 170 : 100);\n return () => clearTimeout(id);\n }\n }, [isOpen, openTransition, closeTransition, captureFocus, menuItemFocus, dispatch]);\n const itemContext = useMemo(() => ({\n isParentOpen: isOpen,\n submenuCtx,\n dispatch,\n updateItems\n }), [isOpen, submenuCtx, dispatch, updateItems]);\n let maxHeight, overflowAmt;\n if (overflowData) {\n setDownOverflow ? overflowAmt = overflowData.overflowAmt : maxHeight = overflowData.height;\n }\n const listContext = useMemo(() => ({\n reposSubmenu,\n submenuCtx,\n overflow,\n overflowAmt,\n parentMenuRef: menuRef,\n parentDir: expandedDirection\n }), [reposSubmenu, submenuCtx, overflow, overflowAmt, expandedDirection]);\n const overflowStyle = maxHeight >= 0 ? {\n maxHeight,\n overflow\n } : undefined;\n const modifiers = useMemo(() => ({\n state,\n align,\n dir: expandedDirection\n }), [state, align, expandedDirection]);\n const arrowModifiers = useMemo(() => ({\n dir: expandedDirection\n }), [expandedDirection]);\n const _arrowClassName = useBEM({\n block: menuClass,\n element: menuArrowClass,\n modifiers: arrowModifiers,\n className: arrowProps.className\n });\n const menu = /*#__PURE__*/jsxs(\"ul\", {\n role: \"menu\",\n \"aria-label\": ariaLabel,\n ...commonProps(isDisabled),\n ...mergeProps({\n onPointerEnter: parentSubmenuCtx == null ? void 0 : parentSubmenuCtx.off,\n onPointerMove,\n onPointerLeave,\n onKeyDown,\n onAnimationEnd\n }, restProps),\n ref: useCombinedRef(externalRef, menuRef),\n className: useBEM({\n block: menuClass,\n modifiers,\n className: menuClassName\n }),\n style: {\n ...menuStyle,\n ...overflowStyle,\n margin: 0,\n display: state === 'closed' ? 'none' : undefined,\n position: positionAbsolute,\n left: menuPosition.x,\n top: menuPosition.y\n },\n children: [/*#__PURE__*/jsx(\"li\", {\n tabIndex: -1,\n style: {\n position: positionAbsolute,\n left: 0,\n top: 0,\n display: 'block',\n outline: 'none'\n },\n ref: focusRef,\n ...dummyItemProps,\n ...focusProps\n }), arrow && /*#__PURE__*/jsx(\"li\", {\n ...dummyItemProps,\n ...arrowProps,\n className: _arrowClassName,\n style: {\n display: 'block',\n position: positionAbsolute,\n left: arrowPosition.x,\n top: arrowPosition.y,\n ...arrowProps.style\n },\n ref: arrowRef\n }), /*#__PURE__*/jsx(MenuListContext.Provider, {\n value: listContext,\n children: /*#__PURE__*/jsx(MenuListItemContext.Provider, {\n value: itemContext,\n children: /*#__PURE__*/jsx(HoverItemContext.Provider, {\n value: hoverItem,\n children: safeCall(children, modifiers)\n })\n })\n })]\n });\n return containerProps ? /*#__PURE__*/jsx(MenuContainer, {\n ...containerProps,\n isOpen: isOpen,\n children: menu\n }) : menu;\n};\n\nexport { MenuList };\n","import { forwardRef, useRef, useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { oneOf, exact, number, object, bool, oneOfType, string, func } from 'prop-types';\nimport { MenuList } from './MenuList.js';\nimport { jsx } from 'react/jsx-runtime';\nimport { rootMenuPropTypes } from '../utils/propTypes.js';\nimport { safeCall, values } from '../utils/utils.js';\nimport { MenuStateMap, Keys, CloseReason, SettingsContext, EventHandlersContext } from '../utils/constants.js';\n\nconst ControlledMenu = /*#__PURE__*/forwardRef(function ControlledMenu({\n 'aria-label': ariaLabel,\n className,\n containerProps,\n initialMounted,\n unmountOnClose,\n transition,\n transitionTimeout,\n boundingBoxRef,\n boundingBoxPadding,\n reposition = 'auto',\n submenuOpenDelay = 300,\n submenuCloseDelay = 150,\n viewScroll = 'initial',\n portal,\n theming,\n onItemClick,\n ...restProps\n}, externalRef) {\n const containerRef = useRef(null);\n const scrollNodesRef = useRef({});\n const {\n anchorRef,\n state,\n onClose\n } = restProps;\n const settings = useMemo(() => ({\n initialMounted,\n unmountOnClose,\n transition,\n transitionTimeout,\n boundingBoxRef,\n boundingBoxPadding,\n rootMenuRef: containerRef,\n rootAnchorRef: anchorRef,\n scrollNodesRef,\n reposition,\n viewScroll,\n submenuOpenDelay,\n submenuCloseDelay\n }), [initialMounted, unmountOnClose, transition, transitionTimeout, anchorRef, boundingBoxRef, boundingBoxPadding, reposition, viewScroll, submenuOpenDelay, submenuCloseDelay]);\n const eventHandlers = useMemo(() => ({\n handleClick(event, isCheckorRadio) {\n if (!event.stopPropagation) safeCall(onItemClick, event);\n let keepOpen = event.keepOpen;\n if (keepOpen === undefined) {\n keepOpen = isCheckorRadio && event.key === Keys.SPACE;\n }\n if (!keepOpen) {\n safeCall(onClose, {\n value: event.value,\n key: event.key,\n reason: CloseReason.CLICK\n });\n }\n },\n handleClose(key) {\n safeCall(onClose, {\n key,\n reason: CloseReason.CLICK\n });\n }\n }), [onItemClick, onClose]);\n if (!state) return null;\n const menuList = /*#__PURE__*/jsx(SettingsContext.Provider, {\n value: settings,\n children: /*#__PURE__*/jsx(EventHandlersContext.Provider, {\n value: eventHandlers,\n children: /*#__PURE__*/jsx(MenuList, {\n ...restProps,\n ariaLabel: ariaLabel || 'Menu',\n externalRef: externalRef,\n containerRef: containerRef,\n containerProps: {\n className,\n containerRef,\n containerProps,\n theming,\n transition,\n onClose\n }\n })\n })\n });\n if (portal === true && typeof document !== 'undefined') {\n return /*#__PURE__*/createPortal(menuList, document.body);\n } else if (portal) {\n return portal.target ? /*#__PURE__*/createPortal(menuList, portal.target) : portal.stablePosition ? null : menuList;\n }\n return menuList;\n});\nprocess.env.NODE_ENV !== \"production\" ? ControlledMenu.propTypes = {\n ...rootMenuPropTypes,\n state: /*#__PURE__*/oneOf( /*#__PURE__*/values(MenuStateMap)),\n anchorPoint: /*#__PURE__*/exact({\n x: number,\n y: number\n }),\n anchorRef: object,\n captureFocus: bool,\n menuItemFocus: /*#__PURE__*/exact({\n position: /*#__PURE__*/oneOfType([string, number]),\n alwaysUpdate: bool\n }),\n onClose: func\n} : void 0;\n\nexport { ControlledMenu };\n","const PRE_ENTER = 0;\nconst ENTERING = 1;\nconst ENTERED = 2;\nconst PRE_EXIT = 3;\nconst EXITING = 4;\nconst EXITED = 5;\nconst UNMOUNTED = 6;\nconst STATUS = ['preEnter', 'entering', 'entered', 'preExit', 'exiting', 'exited', 'unmounted'];\nconst getState = status => ({\n _s: status,\n status: STATUS[status],\n isEnter: status < PRE_EXIT,\n isMounted: status !== UNMOUNTED,\n isResolved: status === ENTERED || status > EXITING\n});\nconst startOrEnd = unmounted => unmounted ? UNMOUNTED : EXITED;\nconst getEndStatus = (status, unmountOnExit) => {\n switch (status) {\n case ENTERING:\n case PRE_ENTER:\n return ENTERED;\n case EXITING:\n case PRE_EXIT:\n return startOrEnd(unmountOnExit);\n }\n};\nconst getTimeout = timeout => typeof timeout === 'object' ? [timeout.enter, timeout.exit] : [timeout, timeout];\n\nexport { ENTERED, ENTERING, EXITED, EXITING, PRE_ENTER, PRE_EXIT, STATUS, UNMOUNTED, getEndStatus, getState, getTimeout, startOrEnd };\n","import { useState, useRef, useCallback, useEffect } from 'react';\nimport { getState, ENTERED, startOrEnd, getTimeout, getEndStatus, PRE_ENTER, ENTERING, PRE_EXIT, EXITING } from './utils.js';\n\nconst updateState = (status, setState, latestState, timeoutId, onChange) => {\n clearTimeout(timeoutId.current);\n const state = getState(status);\n setState(state);\n latestState.current = state;\n onChange && onChange({\n current: state\n });\n};\nconst useTransition = ({\n enter = true,\n exit = true,\n preEnter,\n preExit,\n timeout,\n initialEntered,\n mountOnEnter,\n unmountOnExit,\n onStateChange: onChange\n} = {}) => {\n const [state, setState] = useState(() => getState(initialEntered ? ENTERED : startOrEnd(mountOnEnter)));\n const latestState = useRef(state);\n const timeoutId = useRef();\n const [enterTimeout, exitTimeout] = getTimeout(timeout);\n const endTransition = useCallback(() => {\n const status = getEndStatus(latestState.current._s, unmountOnExit);\n status && updateState(status, setState, latestState, timeoutId, onChange);\n }, [onChange, unmountOnExit]);\n const toggle = useCallback(toEnter => {\n const transitState = status => {\n updateState(status, setState, latestState, timeoutId, onChange);\n switch (status) {\n case ENTERING:\n if (enterTimeout >= 0) timeoutId.current = setTimeout(endTransition, enterTimeout);\n break;\n case EXITING:\n if (exitTimeout >= 0) timeoutId.current = setTimeout(endTransition, exitTimeout);\n break;\n case PRE_ENTER:\n case PRE_EXIT:\n timeoutId.current = setTimeout(() => transitState(status + 1), 0);\n break;\n }\n };\n const enterStage = latestState.current.isEnter;\n if (typeof toEnter !== 'boolean') toEnter = !enterStage;\n if (toEnter) {\n !enterStage && transitState(enter ? preEnter ? PRE_ENTER : ENTERING : ENTERED);\n } else {\n enterStage && transitState(exit ? preExit ? PRE_EXIT : EXITING : startOrEnd(unmountOnExit));\n }\n }, [endTransition, onChange, enter, exit, preEnter, preExit, enterTimeout, exitTimeout, unmountOnExit]);\n useEffect(() => () => clearTimeout(timeoutId.current), []);\n return [state, toggle, endTransition];\n};\n\nexport { useTransition };\n","import { useTransition } from 'react-transition-state';\nimport { getTransition } from '../utils/utils.js';\nimport { MenuStateMap } from '../utils/constants.js';\n\nconst useMenuState = ({\n initialOpen,\n initialMounted,\n unmountOnClose,\n transition,\n transitionTimeout = 500\n} = {}) => {\n const [{\n status\n }, toggleMenu, endTransition] = useTransition({\n initialEntered: initialOpen,\n mountOnEnter: !initialMounted,\n unmountOnExit: unmountOnClose,\n timeout: transitionTimeout,\n enter: getTransition(transition, 'open'),\n exit: getTransition(transition, 'close')\n });\n return [{\n state: MenuStateMap[status],\n endTransition\n }, toggleMenu];\n};\n\nexport { useMenuState };\n","import { useState } from 'react';\nimport { useMenuState } from './useMenuState.js';\n\nconst useMenuStateAndFocus = options => {\n const [menuProps, toggleMenu] = useMenuState(options);\n const [menuItemFocus, setMenuItemFocus] = useState();\n const openMenu = (position, alwaysUpdate) => {\n setMenuItemFocus({\n position,\n alwaysUpdate\n });\n toggleMenu(true);\n };\n return [{\n menuItemFocus,\n ...menuProps\n }, toggleMenu, openMenu];\n};\n\nexport { useMenuStateAndFocus };\n","import { useState } from 'react';\n\nconst useClick = (state, onToggle) => {\n if (process.env.NODE_ENV !== 'production' && typeof onToggle !== 'function') {\n throw new Error('[React-Menu] useClick/useHover requires a function in the second parameter.');\n }\n const [skipOpen] = useState({});\n return {\n onMouseDown: () => {\n skipOpen.v = state && state !== 'closed';\n },\n onClick: e => skipOpen.v ? skipOpen.v = false : onToggle(true, e)\n };\n};\n\nexport { useClick };\n","import { useRef, useEffect } from 'react';\nimport { safeCall } from '../utils/utils.js';\n\nconst useMenuChange = (onMenuChange, isOpen) => {\n const prevOpen = useRef(isOpen);\n useEffect(() => {\n if (prevOpen.current !== isOpen) safeCall(onMenuChange, {\n open: isOpen\n });\n prevOpen.current = isOpen;\n }, [onMenuChange, isOpen]);\n};\n\nexport { useMenuChange };\n","import { forwardRef, useRef, useCallback, useImperativeHandle, Fragment, cloneElement } from 'react';\nimport { oneOfType, element, func } from 'prop-types';\nimport { ControlledMenu } from './ControlledMenu.js';\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { useMenuStateAndFocus } from '../hooks/useMenuStateAndFocus.js';\nimport { useClick } from '../hooks/useClick.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\nimport { safeCall, mergeProps, getName, isMenuOpen } from '../utils/utils.js';\nimport { useMenuChange } from '../hooks/useMenuChange.js';\nimport { rootMenuPropTypes, uncontrolledMenuPropTypes } from '../utils/propTypes.js';\nimport { FocusPositions, Keys } from '../utils/constants.js';\n\nconst Menu = /*#__PURE__*/forwardRef(function Menu({\n 'aria-label': ariaLabel,\n captureFocus: _,\n initialOpen: _1,\n menuButton,\n instanceRef,\n onMenuChange,\n ...restProps\n}, externalRef) {\n const [stateProps, toggleMenu, openMenu] = useMenuStateAndFocus(restProps);\n const {\n state\n } = stateProps;\n const isOpen = isMenuOpen(state);\n const buttonRef = useRef(null);\n const anchorProps = useClick(state, (_, e) => openMenu(!e.detail ? FocusPositions.FIRST : undefined));\n const handleClose = useCallback(e => {\n toggleMenu(false);\n if (e.key) buttonRef.current.focus();\n }, [toggleMenu]);\n const onKeyDown = e => {\n switch (e.key) {\n case Keys.UP:\n openMenu(FocusPositions.LAST);\n break;\n case Keys.DOWN:\n openMenu(FocusPositions.FIRST);\n break;\n default:\n return;\n }\n e.preventDefault();\n };\n const button = safeCall(menuButton, {\n open: isOpen\n });\n if (!button || !button.type) throw new Error('Menu requires a menuButton prop.');\n const buttonProps = {\n ref: useCombinedRef(button.ref, buttonRef),\n ...mergeProps({\n onKeyDown,\n ...anchorProps\n }, button.props)\n };\n if (getName(button.type) === 'MenuButton') {\n buttonProps.isOpen = isOpen;\n }\n const renderButton = /*#__PURE__*/cloneElement(button, buttonProps);\n useMenuChange(onMenuChange, isOpen);\n useImperativeHandle(instanceRef, () => ({\n openMenu,\n closeMenu: () => toggleMenu(false)\n }));\n return /*#__PURE__*/jsxs(Fragment, {\n children: [renderButton, /*#__PURE__*/jsx(ControlledMenu, {\n ...restProps,\n ...stateProps,\n \"aria-label\": ariaLabel || (typeof button.props.children === 'string' ? button.props.children : 'Menu'),\n anchorRef: buttonRef,\n ref: externalRef,\n onClose: handleClose\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.propTypes = {\n ...rootMenuPropTypes,\n ...uncontrolledMenuPropTypes,\n menuButton: oneOfType([element, func]).isRequired\n} : void 0;\n\nexport { Menu };\n","import { forwardRef, useRef, useContext, memo } from 'react';\nimport { HoverItemContext } from './constants.js';\nimport { jsx } from 'react/jsx-runtime';\n\nconst withHovering = (name, WrappedComponent) => {\n const Component = /*#__PURE__*/memo(WrappedComponent);\n const WithHovering = /*#__PURE__*/forwardRef((props, ref) => {\n const itemRef = useRef(null);\n return /*#__PURE__*/jsx(Component, {\n ...props,\n itemRef: itemRef,\n externalRef: ref,\n isHovering: useContext(HoverItemContext) === itemRef.current\n });\n });\n WithHovering.displayName = `WithHovering(${name})`;\n return WithHovering;\n};\n\nexport { withHovering };\n","import { useLayoutEffect as useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect.js';\n\nconst useItemEffect = (isDisabled, itemRef, updateItems) => {\n useIsomorphicLayoutEffect(() => {\n if (process.env.NODE_ENV !== 'production' && !updateItems) {\n throw new Error(`[React-Menu] This menu item or submenu should be rendered under a menu: ${itemRef.current.outerHTML}`);\n }\n if (isDisabled) return;\n const item = itemRef.current;\n updateItems(item, true);\n return () => {\n updateItems(item);\n };\n }, [isDisabled, itemRef, updateItems]);\n};\n\nexport { useItemEffect };\n","import { useContext, useRef, useState, useEffect, useImperativeHandle, useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { bool, oneOf, oneOfType, node, func, shape } from 'prop-types';\nimport { MenuList } from './MenuList.js';\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { withHovering } from '../utils/withHovering.js';\nimport { menuPropTypes, uncontrolledMenuPropTypes, stylePropTypes } from '../utils/propTypes.js';\nimport { useMenuStateAndFocus } from '../hooks/useMenuStateAndFocus.js';\nimport { useItemEffect } from '../hooks/useItemEffect.js';\nimport { useMenuChange } from '../hooks/useMenuChange.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { SettingsContext, MenuListContext, MenuListItemContext, menuClass, subMenuClass, roleNone, roleMenuitem, menuItemClass, HoverActionTypes, Keys, FocusPositions } from '../utils/constants.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\nimport { mergeProps, commonProps, safeCall, isMenuOpen, batchedUpdates } from '../utils/utils.js';\n\nconst SubMenu = /*#__PURE__*/withHovering('SubMenu', function SubMenu({\n 'aria-label': ariaLabel,\n className,\n disabled,\n direction,\n label,\n openTrigger,\n onMenuChange,\n isHovering,\n instanceRef,\n itemRef,\n captureFocus: _1,\n repositionFlag: _2,\n itemProps = {},\n ...restProps\n}) {\n const settings = useContext(SettingsContext);\n const {\n rootMenuRef,\n submenuOpenDelay,\n submenuCloseDelay\n } = settings;\n const {\n parentMenuRef,\n parentDir,\n overflow: parentOverflow\n } = useContext(MenuListContext);\n const {\n isParentOpen,\n submenuCtx,\n dispatch,\n updateItems\n } = useContext(MenuListItemContext);\n const isPortal = parentOverflow !== 'visible';\n const [stateProps, toggleMenu, _openMenu] = useMenuStateAndFocus(settings);\n const {\n state\n } = stateProps;\n const isDisabled = !!disabled;\n const isOpen = isMenuOpen(state);\n const containerRef = useRef(null);\n const [timerId] = useState({\n v: 0\n });\n const stopTimer = () => {\n submenuCtx.off();\n if (timerId.v) {\n clearTimeout(timerId.v);\n timerId.v = 0;\n }\n };\n const openMenu = (...args) => {\n stopTimer();\n setHover();\n !isDisabled && _openMenu(...args);\n };\n const setHover = () => !isHovering && !isDisabled && dispatch(HoverActionTypes.SET, itemRef.current);\n const delayOpen = delay => {\n setHover();\n if (!openTrigger) timerId.v = setTimeout(() => batchedUpdates(openMenu), Math.max(delay, 0));\n };\n const onPointerMove = e => {\n if (isDisabled) return;\n e.stopPropagation();\n if (timerId.v || isOpen) return;\n submenuCtx.on(submenuCloseDelay, () => delayOpen(submenuOpenDelay - submenuCloseDelay), () => delayOpen(submenuOpenDelay));\n };\n const onPointerLeave = () => {\n stopTimer();\n if (!isOpen) dispatch(HoverActionTypes.UNSET, itemRef.current);\n };\n const onKeyDown = e => {\n if (!isHovering) return;\n switch (e.key) {\n case Keys.ENTER:\n e.preventDefault();\n case Keys.SPACE:\n case Keys.RIGHT:\n openTrigger !== 'none' && openMenu(FocusPositions.FIRST);\n }\n };\n const onKeyDownOfRoot = e => {\n let handled = false;\n switch (e.key) {\n case Keys.LEFT:\n if (isOpen) {\n itemRef.current.focus();\n toggleMenu(false);\n handled = true;\n }\n break;\n case Keys.RIGHT:\n if (!isOpen) handled = true;\n break;\n }\n if (handled) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n useItemEffect(isDisabled, itemRef, updateItems);\n useMenuChange(onMenuChange, isOpen);\n useEffect(() => submenuCtx.toggle(isOpen), [submenuCtx, isOpen]);\n useEffect(() => () => clearTimeout(timerId.v), [timerId]);\n useEffect(() => {\n if (isHovering && isParentOpen) {\n itemRef.current.focus();\n } else {\n toggleMenu(false);\n }\n }, [isHovering, isParentOpen, toggleMenu, itemRef]);\n useImperativeHandle(instanceRef, () => ({\n openMenu: (...args) => {\n isParentOpen && openMenu(...args);\n },\n closeMenu: () => {\n if (isOpen) {\n itemRef.current.focus();\n toggleMenu(false);\n }\n }\n }));\n const modifiers = useMemo(() => ({\n open: isOpen,\n hover: isHovering,\n disabled: isDisabled,\n submenu: true\n }), [isOpen, isHovering, isDisabled]);\n const {\n ref: externalItemRef,\n className: itemClassName,\n ...restItemProps\n } = itemProps;\n const mergedItemProps = mergeProps({\n onPointerEnter: submenuCtx.off,\n onPointerMove,\n onPointerLeave,\n onKeyDown,\n onClick: () => openTrigger !== 'none' && openMenu()\n }, restItemProps);\n const getMenuList = () => {\n const menuList = /*#__PURE__*/jsx(MenuList, {\n ...restProps,\n ...stateProps,\n ariaLabel: ariaLabel || (typeof label === 'string' ? label : 'Submenu'),\n anchorRef: itemRef,\n containerRef: isPortal ? rootMenuRef : containerRef,\n direction: direction || (parentDir === 'right' || parentDir === 'left' ? parentDir : 'right'),\n parentScrollingRef: isPortal && parentMenuRef,\n isDisabled: isDisabled\n });\n const container = rootMenuRef.current;\n return isPortal && container ? /*#__PURE__*/createPortal(menuList, container) : menuList;\n };\n return /*#__PURE__*/jsxs(\"li\", {\n className: useBEM({\n block: menuClass,\n element: subMenuClass,\n className\n }),\n style: {\n position: 'relative'\n },\n role: roleNone,\n ref: containerRef,\n onKeyDown: onKeyDownOfRoot,\n children: [/*#__PURE__*/jsx(\"div\", {\n role: roleMenuitem,\n \"aria-haspopup\": true,\n \"aria-expanded\": isOpen,\n ...commonProps(isDisabled, isHovering),\n ...mergedItemProps,\n ref: useCombinedRef(externalItemRef, itemRef),\n className: useBEM({\n block: menuClass,\n element: menuItemClass,\n modifiers,\n className: itemClassName\n }),\n children: useMemo(() => safeCall(label, modifiers), [label, modifiers])\n }), state && getMenuList()]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SubMenu.propTypes = {\n ...menuPropTypes,\n ...uncontrolledMenuPropTypes,\n disabled: bool,\n openTrigger: /*#__PURE__*/oneOf(['none', 'clickOnly']),\n label: /*#__PURE__*/oneOfType([node, func]),\n itemProps: /*#__PURE__*/shape({\n ...stylePropTypes()\n })\n} : void 0;\n\nexport { SubMenu };\n","import { useContext, useEffect } from 'react';\nimport { useItemEffect } from './useItemEffect.js';\nimport { SettingsContext, MenuListItemContext, HoverActionTypes } from '../utils/constants.js';\n\nconst useItemState = (itemRef, focusRef, isHovering, isDisabled) => {\n const {\n submenuCloseDelay\n } = useContext(SettingsContext);\n const {\n isParentOpen,\n submenuCtx,\n dispatch,\n updateItems\n } = useContext(MenuListItemContext);\n const setHover = () => {\n !isHovering && !isDisabled && dispatch(HoverActionTypes.SET, itemRef.current);\n };\n const unsetHover = () => {\n !isDisabled && dispatch(HoverActionTypes.UNSET, itemRef.current);\n };\n const onBlur = e => {\n if (isHovering && !e.currentTarget.contains(e.relatedTarget)) unsetHover();\n };\n const onPointerMove = e => {\n if (!isDisabled) {\n e.stopPropagation();\n submenuCtx.on(submenuCloseDelay, setHover, setHover);\n }\n };\n const onPointerLeave = (_, keepHover) => {\n submenuCtx.off();\n !keepHover && unsetHover();\n };\n useItemEffect(isDisabled, itemRef, updateItems);\n useEffect(() => {\n if (isHovering && isParentOpen) {\n focusRef.current && focusRef.current.focus();\n }\n }, [focusRef, isHovering, isParentOpen]);\n return {\n setHover,\n onBlur,\n onPointerMove,\n onPointerLeave\n };\n};\n\nexport { useItemState };\n","import { useContext, useMemo } from 'react';\nimport { any, string, oneOf, bool, oneOfType, node, func } from 'prop-types';\nimport { jsx } from 'react/jsx-runtime';\nimport { useItemState } from '../hooks/useItemState.js';\nimport { EventHandlersContext, RadioGroupContext, roleMenuitem, menuClass, menuItemClass, roleNone, Keys } from '../utils/constants.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { withHovering } from '../utils/withHovering.js';\nimport { stylePropTypes } from '../utils/propTypes.js';\nimport { mergeProps, commonProps, safeCall } from '../utils/utils.js';\n\nconst MenuItem = /*#__PURE__*/withHovering('MenuItem', function MenuItem({\n className,\n value,\n href,\n type,\n checked,\n disabled,\n children,\n onClick,\n isHovering,\n itemRef,\n externalRef,\n ...restProps\n}) {\n const isDisabled = !!disabled;\n const {\n setHover,\n ...restStateProps\n } = useItemState(itemRef, itemRef, isHovering, isDisabled);\n const eventHandlers = useContext(EventHandlersContext);\n const radioGroup = useContext(RadioGroupContext);\n const isRadio = type === 'radio';\n const isCheckBox = type === 'checkbox';\n const isAnchor = !!href && !isDisabled && !isRadio && !isCheckBox;\n const isChecked = isRadio ? radioGroup.value === value : isCheckBox ? !!checked : false;\n const handleClick = e => {\n if (isDisabled) {\n e.stopPropagation();\n e.preventDefault();\n return;\n }\n const event = {\n value,\n syntheticEvent: e\n };\n if (e.key !== undefined) event.key = e.key;\n if (isCheckBox) event.checked = !isChecked;\n if (isRadio) event.name = radioGroup.name;\n safeCall(onClick, event);\n if (isRadio) safeCall(radioGroup.onRadioChange, event);\n eventHandlers.handleClick(event, isCheckBox || isRadio);\n };\n const handleKeyDown = e => {\n if (!isHovering) return;\n switch (e.key) {\n case Keys.ENTER:\n e.preventDefault();\n case Keys.SPACE:\n isAnchor ? itemRef.current.click() : handleClick(e);\n }\n };\n const modifiers = useMemo(() => ({\n type,\n disabled: isDisabled,\n hover: isHovering,\n checked: isChecked,\n anchor: isAnchor\n }), [type, isDisabled, isHovering, isChecked, isAnchor]);\n const mergedProps = mergeProps({\n ...restStateProps,\n onPointerDown: setHover,\n onKeyDown: handleKeyDown,\n onClick: handleClick\n }, restProps);\n const menuItemProps = {\n role: isRadio ? 'menuitemradio' : isCheckBox ? 'menuitemcheckbox' : roleMenuitem,\n 'aria-checked': isRadio || isCheckBox ? isChecked : undefined,\n ...commonProps(isDisabled, isHovering),\n ...mergedProps,\n ref: useCombinedRef(externalRef, itemRef),\n className: useBEM({\n block: menuClass,\n element: menuItemClass,\n modifiers,\n className\n }),\n children: useMemo(() => safeCall(children, modifiers), [children, modifiers])\n };\n return isAnchor ? /*#__PURE__*/jsx(\"li\", {\n role: roleNone,\n children: /*#__PURE__*/jsx(\"a\", {\n href: href,\n ...menuItemProps\n })\n }) : /*#__PURE__*/jsx(\"li\", {\n ...menuItemProps\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuItem.propTypes = {\n ...stylePropTypes(),\n value: any,\n href: string,\n type: /*#__PURE__*/oneOf(['checkbox', 'radio']),\n checked: bool,\n disabled: bool,\n children: /*#__PURE__*/oneOfType([node, func]),\n onClick: func\n} : void 0;\n\nexport { MenuItem };\n","import { useRef, useContext, useMemo } from 'react';\nimport { bool, func } from 'prop-types';\nimport { jsx } from 'react/jsx-runtime';\nimport { useItemState } from '../hooks/useItemState.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { withHovering } from '../utils/withHovering.js';\nimport { stylePropTypes } from '../utils/propTypes.js';\nimport { EventHandlersContext, roleMenuitem, menuClass, menuItemClass } from '../utils/constants.js';\nimport { safeCall, mergeProps, commonProps } from '../utils/utils.js';\n\nconst FocusableItem = /*#__PURE__*/withHovering('FocusableItem', function FocusableItem({\n className,\n disabled,\n children,\n isHovering,\n itemRef,\n externalRef,\n ...restProps\n}) {\n const isDisabled = !!disabled;\n const ref = useRef(null);\n const {\n setHover,\n onPointerLeave,\n ...restStateProps\n } = useItemState(itemRef, ref, isHovering, isDisabled);\n const {\n handleClose\n } = useContext(EventHandlersContext);\n const modifiers = useMemo(() => ({\n disabled: isDisabled,\n hover: isHovering,\n focusable: true\n }), [isDisabled, isHovering]);\n const renderChildren = useMemo(() => safeCall(children, {\n ...modifiers,\n ref,\n closeMenu: handleClose\n }), [children, modifiers, handleClose]);\n const mergedProps = mergeProps({\n ...restStateProps,\n onPointerLeave: e => onPointerLeave(e, true),\n onFocus: setHover\n }, restProps);\n return /*#__PURE__*/jsx(\"li\", {\n role: roleMenuitem,\n ...commonProps(isDisabled),\n ...mergedProps,\n ref: useCombinedRef(externalRef, itemRef),\n className: useBEM({\n block: menuClass,\n element: menuItemClass,\n modifiers,\n className\n }),\n children: renderChildren\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FocusableItem.propTypes = {\n ...stylePropTypes(),\n disabled: bool,\n children: func\n} : void 0;\n\nexport { FocusableItem };\n","import { memo, forwardRef } from 'react';\nimport { jsx } from 'react/jsx-runtime';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { menuClass, menuDividerClass } from '../utils/constants.js';\nimport { stylePropTypes } from '../utils/propTypes.js';\n\nconst MenuDivider = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function MenuDivider({\n className,\n ...restProps\n}, externalRef) {\n return /*#__PURE__*/jsx(\"li\", {\n role: \"separator\",\n ...restProps,\n ref: externalRef,\n className: useBEM({\n block: menuClass,\n element: menuDividerClass,\n className\n })\n });\n}));\nprocess.env.NODE_ENV !== \"production\" ? MenuDivider.propTypes = {\n ...stylePropTypes()\n} : void 0;\n\nexport { MenuDivider };\n","import { memo, forwardRef } from 'react';\nimport { jsx } from 'react/jsx-runtime';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { roleNone, menuClass, menuHeaderClass } from '../utils/constants.js';\nimport { stylePropTypes } from '../utils/propTypes.js';\n\nconst MenuHeader = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function MenuHeader({\n className,\n ...restProps\n}, externalRef) {\n return /*#__PURE__*/jsx(\"li\", {\n role: roleNone,\n ...restProps,\n ref: externalRef,\n className: useBEM({\n block: menuClass,\n element: menuHeaderClass,\n className\n })\n });\n}));\nprocess.env.NODE_ENV !== \"production\" ? MenuHeader.propTypes = {\n ...stylePropTypes()\n} : void 0;\n\nexport { MenuHeader };\n","import { forwardRef, useRef, useState, useContext } from 'react';\nimport { bool } from 'prop-types';\nimport { jsx } from 'react/jsx-runtime';\nimport { useLayoutEffect as useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect.js';\nimport { getNormalizedClientRect } from '../positionUtils/getNormalizedClientRect.js';\nimport { useCombinedRef } from '../hooks/useCombinedRef.js';\nimport { useBEM } from '../hooks/useBEM.js';\nimport { MenuListContext, menuClass, menuGroupClass } from '../utils/constants.js';\nimport { stylePropTypes } from '../utils/propTypes.js';\n\nconst MenuGroup = /*#__PURE__*/forwardRef(function MenuGroup({\n className,\n style,\n takeOverflow,\n ...restProps\n}, externalRef) {\n const ref = useRef(null);\n const [overflowStyle, setOverflowStyle] = useState();\n const {\n overflow,\n overflowAmt\n } = useContext(MenuListContext);\n useIsomorphicLayoutEffect(() => {\n let maxHeight;\n if (takeOverflow && overflowAmt >= 0) {\n maxHeight = getNormalizedClientRect(ref.current).height - overflowAmt;\n if (maxHeight < 0) maxHeight = 0;\n }\n setOverflowStyle(maxHeight >= 0 ? {\n maxHeight,\n overflow\n } : undefined);\n }, [takeOverflow, overflow, overflowAmt]);\n useIsomorphicLayoutEffect(() => {\n if (overflowStyle) ref.current.scrollTop = 0;\n }, [overflowStyle]);\n return /*#__PURE__*/jsx(\"div\", {\n ...restProps,\n ref: useCombinedRef(externalRef, ref),\n className: useBEM({\n block: menuClass,\n element: menuGroupClass,\n className\n }),\n style: {\n ...style,\n ...overflowStyle\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuGroup.propTypes = {\n ...stylePropTypes(),\n takeOverflow: bool\n} : void 0;\n\nexport { MenuGroup };\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 const parsedHash = URL.parse(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 }\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","let IS_RTL = false;\n\n// Use MutationObserver to detect RTL\nconst observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes') {\n const { value } = mutation.target;\n if (value === 'rtl') {\n IS_RTL = true;\n } else {\n IS_RTL = false;\n }\n // Fire custom event 'dirchange' on document\n // document.dispatchEvent(new Event('dirchange'));\n }\n });\n});\nobserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['dir'],\n});\n\nexport default function isRTL() {\n return IS_RTL;\n // return document.documentElement.dir === 'rtl';\n}\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 { useLayoutEffect, useState } from 'preact/hooks';\n\nexport default function useWindowSize() {\n const [size, setSize] = useState({\n width: null,\n height: null,\n });\n\n useLayoutEffect(() => {\n const handleResize = () => {\n setSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n handleResize();\n window.addEventListener('resize', handleResize, {\n passive: true,\n });\n\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, []);\n\n return size;\n}\n","import { Menu } from '@szhsin/react-menu';\nimport { useRef } from 'preact/hooks';\n\nimport isRTL from '../utils/is-rtl';\nimport safeBoundingBoxPadding from '../utils/safe-bounding-box-padding';\nimport useWindowSize from '../utils/useWindowSize';\n\n// It's like Menu but with sensible defaults, bug fixes and improvements.\nfunction Menu2(props) {\n const { containerProps, instanceRef: _instanceRef, align } = props;\n const size = useWindowSize();\n const instanceRef = _instanceRef?.current ? _instanceRef : useRef();\n\n // Values: start, end, center\n // Note: don't mess with 'center'\n const rtlAlign = isRTL()\n ? align === 'end'\n ? 'start'\n : align === 'start'\n ? 'end'\n : align\n : align;\n\n return (\n <Menu\n boundingBoxPadding={safeBoundingBoxPadding()}\n repositionFlag={`${size.width}x${size.height}`}\n unmountOnClose\n {...props}\n align={rtlAlign}\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 { api } from '../utils/api';\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 {\n acct,\n avatar,\n avatarStatic,\n id,\n url,\n displayName,\n emojis,\n bot,\n username,\n } = account;\n const [_, acct1, acct2] = acct.match(/([^@]+)(@.+)/i) || [, acct];\n\n if (!instance) instance = api().instance;\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 const hideUsername =\n (!short &&\n (trimmedUsername === trimmedDisplayName ||\n trimmedUsername === shortenedDisplayName ||\n trimmedUsername === shortenedAlphaNumericDisplayName ||\n nameCollator.compare(trimmedUsername, shortenedDisplayName) === 0)) ||\n shortenedAlphaNumericDisplayName === acct.toLowerCase();\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 dir=\"auto\">\n <EmojiText text={displayName} emojis={emojis} />\n </b>\n {!showAcct && !hideUsername && (\n <>\n {' '}\n <i class=\"bidi-isolate\">@{username}</i>\n </>\n )}\n </>\n ) : short ? (\n <i>{username}</i>\n ) : (\n <b>{username}</b>\n )}\n {showAcct && (\n <>\n <br />\n <i class=\"bidi-isolate\">\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","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));","!function(e,n){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define([],n):\"object\"==typeof exports?exports.dayjsTwitter=n():e.dayjsTwitter=n()}(this,function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&n&&\"string\"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p=\"\",t(t.s=1)}([function(e,n,t){var r,o=function(){var e={ns:1e-6,us:.001,\"µs\":.001,\"μs\":.001,ms:1,s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5},n=function(e){if(e instanceof n)return e;switch(typeof e){case\"number\":if(!isFinite(e))throw new Error(\"invalid duration: \"+e);this._milliseconds=e;break;case\"string\":this._milliseconds=n.parse(e).valueOf();break;case\"undefined\":this._milliseconds=0;break;default:throw new Error(\"invalid duration: \"+e)}};return n.millisecond=new n(1),n.second=new n(1e3),n.minute=new n(6e4),n.hour=new n(36e5),n.day=new n(864e5),n.week=new n(6048e5),n.prototype.nanoseconds=function(){return Math.floor(this._milliseconds/1e-6)},n.prototype.microseconds=function(){return Math.floor(this._milliseconds/.001)},n.prototype.milliseconds=function(){return this._milliseconds},n.prototype.seconds=function(){return Math.floor(this._milliseconds/1e3)},n.prototype.minutes=function(){return Math.floor(this._milliseconds/6e4)},n.prototype.hours=function(){return Math.floor(this._milliseconds/36e5)},n.prototype.days=function(){return Math.floor(this._milliseconds/864e5)},n.prototype.weeks=function(){return Math.floor(this._milliseconds/6048e5)},n.prototype.toString=function(){var e=\"\",n=Math.abs(this._milliseconds),t=this._milliseconds<0?\"-\":\"\";if(0===n)return\"0\";var r=Math.floor(n/36e5);0!==r&&(n-=36e5*r,e+=r.toString()+\"h\");var o=Math.floor(n/6e4);0!==o&&(n-=6e4*o,e+=o.toString()+\"m\");var i=Math.floor(n/1e3);return 0!==i&&(n-=1e3*i,e+=i.toString()+\"s\"),0!==n&&(e+=n.toString()+\"ms\"),t+e},n.prototype.valueOf=function(){return this._milliseconds},n.parse=function(t){if(\"0\"===t||\"+0\"===t||\"-0\"===t)return new n(0);for(var r,o,i,s=/([\\-\\+\\d\\.]+)([a-zµμ]+)/g,u=0,a=0,f=\"-\"===t[0]?-1:1;i=s.exec(t);){if(r=i[2],o=Math.abs(parseFloat(i[1])),a++,isNaN(o))throw new Error(\"invalid duration\");if(void 0===e[r])throw new Error(\"invalid unit: \"+r);u+=o*e[r]}if(0===a)throw new Error(\"invalid duration\");return new n(Math.floor(u)*f)},n.prototype.roundTo=function(e){var t=new n(e).valueOf();this._milliseconds=t*Math.round(this._milliseconds/t)},n.prototype.isGreaterThan=function(e){return this.valueOf()>new n(e).valueOf()},n.prototype.isLessThan=function(e){return this.valueOf()<new n(e).valueOf()},n.prototype.isEqualTo=function(e){return this.valueOf()===new n(e).valueOf()},n.prototype.after=function(e){return new Date(e.valueOf()+this._milliseconds)},n.since=function(e){return new n((new Date).valueOf()-e.valueOf())},n.until=function(e){return new n(e.valueOf()-(new Date).valueOf())},n.fromMicroseconds=function(e){var t=Math.floor(e/1e3);return new n(t)},n.fromNanoseconds=function(e){var t=Math.floor(e/1e6);return new n(t)},n.between=function(e,t){return new n(t.valueOf()-e.valueOf())},n.add=function(e,t){return new n(e+t)},n.subtract=function(e,t){return new n(e-t)},n.multiply=function(e,t){return new n(e*t)},n.divide=function(e,n){return e/n},n}.call(this);void 0===(r=function(){return o}.apply(n,[]))||(e.exports=r)},function(e,n,t){\"use strict\";t.r(n);var r=t(0),o=t.n(r),i={en:{now:\"Now\",seconds:\"%ds\",minutes:\"%dm\",hours:\"%dh\",days:\"MMM D\",years:\"MMM D, YYYY\"},es:{now:\"Ahora\",seconds:\"%ds\",minutes:\"%dmin\",hours:\"%dh\",days:\"D MMM.\",years:\"D MMM. YYYY\"},ru:{now:\"1 с\",seconds:\"%d с\",minutes:\"%d мин\",hours:\"%d ч\",days:\"D MMM.\",years:\"D MMM. YYYY\"},fr:{now:\"Μaintenant\",seconds:\"%ds\",minutes:\"%dm\",hours:\"%dh\",days:\"MMM D\",years:\"MMM D, YYYY\"},el:{now:\"Τώρα\",seconds:\"%dδ\",minutes:\"%dλ\",hours:\"%dω\",days:\"MMM D\",years:\"MMM D, YYYY\"}};n.default=function(e,n,t){n.prototype.twitter=function(){return function(e){var n=e.$locale(),t=n?n.name:\"en\",r=Math.abs(e.diff(new Date)),s=null,u=null;(s=r<=1e3?\"now\":r<6e4?\"seconds\":r<36e5?\"minutes\":r<864e5?\"hours\":r<31536e6?\"days\":\"years\",u&&s||!([\"seconds\",\"minutes\",\"hours\"].indexOf(s)>-1))||(u=new o.a(r)[s]());if(\"days\"===s||\"years\"===s){var a=i[t][s];return e.format(a)}return i[t][s].replace(\"%d\",u)}(this)}}}])});","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","// 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","export const semver = /^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\-]+(?:\\.[\\da-z\\-]+)*))?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?)?)?$/i;\nexport const validateAndParse = (version) => {\n if (typeof version !== 'string') {\n throw new TypeError('Invalid argument expected string');\n }\n const match = version.match(semver);\n if (!match) {\n throw new Error(`Invalid argument not valid semver ('${version}' received)`);\n }\n match.shift();\n return match;\n};\nconst isWildcard = (s) => s === '*' || s === 'x' || s === 'X';\nconst tryParse = (v) => {\n const n = parseInt(v, 10);\n return isNaN(n) ? v : n;\n};\nconst forceType = (a, b) => typeof a !== typeof b ? [String(a), String(b)] : [a, b];\nconst compareStrings = (a, b) => {\n if (isWildcard(a) || isWildcard(b))\n return 0;\n const [ap, bp] = forceType(tryParse(a), tryParse(b));\n if (ap > bp)\n return 1;\n if (ap < bp)\n return -1;\n return 0;\n};\nexport const compareSegments = (a, b) => {\n for (let i = 0; i < Math.max(a.length, b.length); i++) {\n const r = compareStrings(a[i] || '0', b[i] || '0');\n if (r !== 0)\n return r;\n }\n return 0;\n};\n//# sourceMappingURL=utils.js.map","import { compareSegments, validateAndParse } from './utils.js';\n/**\n * Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.\n * This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`.\n * @param v1 - First version to compare\n * @param v2 - Second version to compare\n * @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters).\n */\nexport const compareVersions = (v1, v2) => {\n // validate input and split into segments\n const n1 = validateAndParse(v1);\n const n2 = validateAndParse(v2);\n // pop off the patch\n const p1 = n1.pop();\n const p2 = n2.pop();\n // validate numbers\n const r = compareSegments(n1, n2);\n if (r !== 0)\n return r;\n // validate pre-release\n if (p1 && p2) {\n return compareSegments(p1.split('.'), p2.split('.'));\n }\n else if (p1 || p2) {\n return p1 ? -1 : 1;\n }\n return 0;\n};\n//# sourceMappingURL=compareVersions.js.map","import { compareVersions } from './compareVersions.js';\n/**\n * Compare [semver](https://semver.org/) version strings using the specified operator.\n *\n * @param v1 First version to compare\n * @param v2 Second version to compare\n * @param operator Allowed arithmetic operator to use\n * @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise.\n *\n * @example\n * ```\n * compare('10.1.8', '10.0.4', '>'); // return true\n * compare('10.0.1', '10.0.1', '='); // return true\n * compare('10.1.1', '10.2.2', '<'); // return true\n * compare('10.1.1', '10.2.2', '<='); // return true\n * compare('10.1.1', '10.2.2', '>='); // return false\n * ```\n */\nexport const compare = (v1, v2, operator) => {\n // validate input operator\n assertValidOperator(operator);\n // since result of compareVersions can only be -1 or 0 or 1\n // a simple map can be used to replace switch\n const res = compareVersions(v1, v2);\n return operatorResMap[operator].includes(res);\n};\nconst operatorResMap = {\n '>': [1],\n '>=': [0, 1],\n '=': [0],\n '<=': [-1, 0],\n '<': [-1],\n '!=': [-1, 1],\n};\nconst allowedOperators = Object.keys(operatorResMap);\nconst assertValidOperator = (op) => {\n if (typeof op !== 'string') {\n throw new TypeError(`Invalid operator type, expected string but got ${typeof op}`);\n }\n if (allowedOperators.indexOf(op) === -1) {\n throw new Error(`Invalid operator, expected one of ${allowedOperators.join('|')}`);\n }\n};\n//# sourceMappingURL=compare.js.map","import { compare } from './compare.js';\nimport { compareSegments, validateAndParse } from './utils.js';\n/**\n * Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.\n *\n * @param version Version number to match\n * @param range Range pattern for version\n * @returns `true` if the version number is within the range, `false` otherwise.\n *\n * @example\n * ```\n * satisfies('1.1.0', '^1.0.0'); // return true\n * satisfies('1.1.0', '~1.0.0'); // return false\n * ```\n */\nexport const satisfies = (version, range) => {\n // clean input\n range = range.replace(/([><=]+)\\s+/g, '$1');\n // handle multiple comparators\n if (range.includes('||')) {\n return range.split('||').some((r) => satisfies(version, r));\n }\n else if (range.includes(' - ')) {\n const [a, b] = range.split(' - ', 2);\n return satisfies(version, `>=${a} <=${b}`);\n }\n else if (range.includes(' ')) {\n return range\n .trim()\n .replace(/\\s{2,}/g, ' ')\n .split(' ')\n .every((r) => satisfies(version, r));\n }\n // if no range operator then \"=\"\n const m = range.match(/^([<>=~^]+)/);\n const op = m ? m[1] : '=';\n // if gt/lt/eq then operator compare\n if (op !== '^' && op !== '~')\n return compare(version, range, op);\n // else range of either \"~\" or \"^\" is assumed\n const [v1, v2, v3, , vp] = validateAndParse(version);\n const [r1, r2, r3, , rp] = validateAndParse(range);\n const v = [v1, v2, v3];\n const r = [r1, r2 !== null && r2 !== void 0 ? r2 : 'x', r3 !== null && r3 !== void 0 ? r3 : 'x'];\n // validate pre-release\n if (rp) {\n if (!vp)\n return false;\n if (compareSegments(v, r) !== 0)\n return false;\n if (compareSegments(vp.split('.'), rp.split('.')) === -1)\n return false;\n }\n // first non-zero number\n const nonZero = r.findIndex((v) => v !== '0') + 1;\n // pointer to where segments can be >=\n const i = op === '~' ? 2 : nonZero > 1 ? nonZero : 1;\n // before pointer must be equal\n if (compareSegments(v.slice(0, i), r.slice(0, i)) !== 0)\n return false;\n // after pointer must be >=\n if (compareSegments(v.slice(i), r.slice(i)) === -1)\n return false;\n return true;\n};\n//# sourceMappingURL=satisfies.js.map","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 '@pixelfed/global-feed': 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","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\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 './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 bidi-isolate\">\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","function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n this._timer = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts.slice(0);\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n if (this._timer) {\n clearTimeout(this._timer);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.push(err);\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(0, this._errors.length - 1);\n timeout = this._cachedTimeouts.slice(-1);\n } else {\n return false;\n }\n }\n\n var self = this;\n this._timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n this._timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n","var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && (options.forever || options.retries === Infinity),\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n","module.exports = require('./lib/retry');","const objectToString = Object.prototype.toString;\n\nconst isError = value => objectToString.call(value) === '[object Error]';\n\nconst errorMessages = new Set([\n\t'Failed to fetch', // Chrome\n\t'NetworkError when attempting to fetch resource.', // Firefox\n\t'The Internet connection appears to be offline.', // Safari 16\n\t'Load failed', // Safari 17+\n\t'Network request failed', // `cross-fetch`\n\t'fetch failed', // Undici (Node.js)\n]);\n\nexport default function isNetworkError(error) {\n\tconst isValid = error\n\t\t&& isError(error)\n\t\t&& error.name === 'TypeError'\n\t\t&& typeof error.message === 'string';\n\n\tif (!isValid) {\n\t\treturn false;\n\t}\n\n\t// We do an extra check for Safari 17+ as it has a very generic error message.\n\t// Network errors in Safari have no stack.\n\tif (error.message === 'Load failed') {\n\t\treturn error.stack === undefined;\n\t}\n\n\treturn errorMessages.has(error.message);\n}\n","import retry from 'retry';\nimport isNetworkError from 'is-network-error';\n\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\n\t\tif (message instanceof Error) {\n\t\t\tthis.originalError = message;\n\t\t\t({message} = message);\n\t\t} else {\n\t\t\tthis.originalError = new Error(message);\n\t\t\tthis.originalError.stack = this.stack;\n\t\t}\n\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\nconst decorateErrorWithCounts = (error, attemptNumber, options) => {\n\t// Minus 1 from attemptNumber because the first attempt does not count as a retry\n\tconst retriesLeft = options.retries - (attemptNumber - 1);\n\n\terror.attemptNumber = attemptNumber;\n\terror.retriesLeft = retriesLeft;\n\treturn error;\n};\n\nexport default async function pRetry(input, options) {\n\treturn new Promise((resolve, reject) => {\n\t\toptions = {\n\t\t\tonFailedAttempt() {},\n\t\t\tretries: 10,\n\t\t\tshouldRetry: () => true,\n\t\t\t...options,\n\t\t};\n\n\t\tconst operation = retry.operation(options);\n\n\t\tconst abortHandler = () => {\n\t\t\toperation.stop();\n\t\t\treject(options.signal?.reason);\n\t\t};\n\n\t\tif (options.signal && !options.signal.aborted) {\n\t\t\toptions.signal.addEventListener('abort', abortHandler, {once: true});\n\t\t}\n\n\t\tconst cleanUp = () => {\n\t\t\toptions.signal?.removeEventListener('abort', abortHandler);\n\t\t\toperation.stop();\n\t\t};\n\n\t\toperation.attempt(async attemptNumber => {\n\t\t\ttry {\n\t\t\t\tconst result = await input(attemptNumber);\n\t\t\t\tcleanUp();\n\t\t\t\tresolve(result);\n\t\t\t} catch (error) {\n\t\t\t\ttry {\n\t\t\t\t\tif (!(error instanceof Error)) {\n\t\t\t\t\t\tthrow new TypeError(`Non-error was thrown: \"${error}\". You should only throw errors.`);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof AbortError) {\n\t\t\t\t\t\tthrow error.originalError;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof TypeError && !isNetworkError(error)) {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\n\t\t\t\t\tdecorateErrorWithCounts(error, attemptNumber, options);\n\n\t\t\t\t\tif (!(await options.shouldRetry(error))) {\n\t\t\t\t\t\toperation.stop();\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t}\n\n\t\t\t\t\tawait options.onFailedAttempt(error);\n\n\t\t\t\t\tif (!operation.retry(error)) {\n\t\t\t\t\t\tthrow operation.mainError();\n\t\t\t\t\t}\n\t\t\t\t} catch (finalError) {\n\t\t\t\t\tdecorateErrorWithCounts(finalError, attemptNumber, options);\n\t\t\t\t\tcleanUp();\n\t\t\t\t\treject(finalError);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n\n// src/InView.tsx\nimport * as React from \"react\";\n\n// src/observe.ts\nvar observerMap = /* @__PURE__ */ new Map();\nvar RootIds = /* @__PURE__ */ new WeakMap();\nvar rootId = 0;\nvar unsupportedValue = void 0;\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\nfunction getRootId(root) {\n if (!root) return \"0\";\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(\n (key) => options[key] !== void 0\n ).map((key) => {\n return `${key}_${key === \"root\" ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\nfunction createObserver(options) {\n const id = optionsToId(options);\n let instance = observerMap.get(id);\n if (!instance) {\n const elements = /* @__PURE__ */ new Map();\n let thresholds;\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n var _a;\n const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n if (options.trackVisibility && typeof entry.isVisible === \"undefined\") {\n entry.isVisible = inView;\n }\n (_a = elements.get(entry.target)) == null ? void 0 : _a.forEach((callback) => {\n callback(inView, entry);\n });\n });\n }, options);\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n return instance;\n}\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === \"undefined\" && fallbackInView !== void 0) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === \"number\" ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {\n };\n }\n const { id, observer, elements } = createObserver(options);\n const callbacks = elements.get(element) || [];\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n callbacks.splice(callbacks.indexOf(callback), 1);\n if (callbacks.length === 0) {\n elements.delete(element);\n observer.unobserve(element);\n }\n if (elements.size === 0) {\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\n// src/InView.tsx\nfunction isPlainChildren(props) {\n return typeof props.children !== \"function\";\n}\nvar InView = class extends React.Component {\n constructor(props) {\n super(props);\n __publicField(this, \"node\", null);\n __publicField(this, \"_unobserveCb\", null);\n __publicField(this, \"handleNode\", (node) => {\n if (this.node) {\n this.unobserve();\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n this.setState({ inView: !!this.props.initialInView, entry: void 0 });\n }\n }\n this.node = node ? node : null;\n this.observeNode();\n });\n __publicField(this, \"handleChange\", (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n this.unobserve();\n }\n if (!isPlainChildren(this.props)) {\n this.setState({ inView, entry });\n }\n if (this.props.onChange) {\n this.props.onChange(inView, entry);\n }\n });\n this.state = {\n inView: !!props.initialInView,\n entry: void 0\n };\n }\n componentDidMount() {\n this.unobserve();\n this.observeNode();\n }\n componentDidUpdate(prevProps) {\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n componentWillUnmount() {\n this.unobserve();\n }\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(\n this.node,\n this.handleChange,\n {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n }\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n this._unobserveCb = null;\n }\n }\n render() {\n const { children } = this.props;\n if (typeof children === \"function\") {\n const { inView, entry } = this.state;\n return children({ inView, entry, ref: this.handleNode });\n }\n const {\n as,\n triggerOnce,\n threshold,\n root,\n rootMargin,\n onChange,\n skip,\n trackVisibility,\n delay,\n initialInView,\n fallbackInView,\n ...props\n } = this.props;\n return React.createElement(\n as || \"div\",\n { ref: this.handleNode, ...props },\n children\n );\n }\n};\n\n// src/useInView.tsx\nimport * as React2 from \"react\";\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = React2.useState(null);\n const callback = React2.useRef();\n const [state, setState] = React2.useState({\n inView: !!initialInView,\n entry: void 0\n });\n callback.current = onChange;\n React2.useEffect(\n () => {\n if (skip || !ref) return;\n let unobserve;\n unobserve = observe(\n ref,\n (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n if (entry.isIntersecting && triggerOnce && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n },\n {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n },\n // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n // If the threshold is an array, convert it to a string, so it won't change between renders.\n Array.isArray(threshold) ? threshold.toString() : threshold,\n ref,\n root,\n rootMargin,\n triggerOnce,\n skip,\n trackVisibility,\n fallbackInView,\n delay\n ]\n );\n const entryTarget = (_a = state.entry) == null ? void 0 : _a.target;\n const previousEntryTarget = React2.useRef();\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: void 0\n });\n }\n const result = [setRef, state.inView, state.entry];\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\nexport {\n InView,\n defaultFallbackInView,\n observe,\n useInView\n};\n//# sourceMappingURL=index.mjs.map","/*\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","function promisifyRequest(request) {\n return new Promise((resolve, reject) => {\n // @ts-ignore - file size hacks\n request.oncomplete = request.onsuccess = () => resolve(request.result);\n // @ts-ignore - file size hacks\n request.onabort = request.onerror = () => reject(request.error);\n });\n}\nfunction createStore(dbName, storeName) {\n const request = indexedDB.open(dbName);\n request.onupgradeneeded = () => request.result.createObjectStore(storeName);\n const dbp = promisifyRequest(request);\n return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));\n}\nlet defaultGetStoreFunc;\nfunction defaultGetStore() {\n if (!defaultGetStoreFunc) {\n defaultGetStoreFunc = createStore('keyval-store', 'keyval');\n }\n return defaultGetStoreFunc;\n}\n/**\n * Get a value by its key.\n *\n * @param key\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction get(key, customStore = defaultGetStore()) {\n return customStore('readonly', (store) => promisifyRequest(store.get(key)));\n}\n/**\n * Set a value with a key.\n *\n * @param key\n * @param value\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction set(key, value, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.put(value, key);\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Set multiple values at once. This is faster than calling set() multiple times.\n * It's also atomic if one of the pairs can't be added, none will be added.\n *\n * @param entries Array of entries, where each entry is an array of `[key, value]`.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction setMany(entries, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n entries.forEach((entry) => store.put(entry[1], entry[0]));\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Get multiple values by their keys\n *\n * @param keys\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction getMany(keys, customStore = defaultGetStore()) {\n return customStore('readonly', (store) => Promise.all(keys.map((key) => promisifyRequest(store.get(key)))));\n}\n/**\n * Update a value. This lets you see the old value and update it as an atomic operation.\n *\n * @param key\n * @param updater A callback that takes the old value and returns a new value.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction update(key, updater, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => \n // Need to create the promise manually.\n // If I try to chain promises, the transaction closes in browsers\n // that use a promise polyfill (IE10/11).\n new Promise((resolve, reject) => {\n store.get(key).onsuccess = function () {\n try {\n store.put(updater(this.result), key);\n resolve(promisifyRequest(store.transaction));\n }\n catch (err) {\n reject(err);\n }\n };\n }));\n}\n/**\n * Delete a particular key from the store.\n *\n * @param key\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction del(key, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.delete(key);\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Delete multiple keys at once.\n *\n * @param keys List of keys to delete.\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction delMany(keys, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n keys.forEach((key) => store.delete(key));\n return promisifyRequest(store.transaction);\n });\n}\n/**\n * Clear all values in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction clear(customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.clear();\n return promisifyRequest(store.transaction);\n });\n}\nfunction eachCursor(store, callback) {\n store.openCursor().onsuccess = function () {\n if (!this.result)\n return;\n callback(this.result);\n this.result.continue();\n };\n return promisifyRequest(store.transaction);\n}\n/**\n * Get all keys in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction keys(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n if (store.getAllKeys) {\n return promisifyRequest(store.getAllKeys());\n }\n const items = [];\n return eachCursor(store, (cursor) => items.push(cursor.key)).then(() => items);\n });\n}\n/**\n * Get all values in the store.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction values(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n if (store.getAll) {\n return promisifyRequest(store.getAll());\n }\n const items = [];\n return eachCursor(store, (cursor) => items.push(cursor.value)).then(() => items);\n });\n}\n/**\n * Get all entries in the store. Each entry is an array of `[key, value]`.\n *\n * @param customStore Method to get a custom store. Use with caution (see the docs).\n */\nfunction entries(customStore = defaultGetStore()) {\n return customStore('readonly', (store) => {\n // Fast path for modern browsers\n // (although, hopefully we'll get a simpler path some day)\n if (store.getAll && store.getAllKeys) {\n return Promise.all([\n promisifyRequest(store.getAllKeys()),\n promisifyRequest(store.getAll()),\n ]).then(([keys, values]) => keys.map((key, i) => [key, values[i]]));\n }\n const items = [];\n return customStore('readonly', (store) => eachCursor(store, (cursor) => items.push([cursor.key, cursor.value])).then(() => items));\n });\n}\n\nexport { clear, createStore, del, delMany, entries, get, getMany, keys, promisifyRequest, set, setMany, update, values };\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","export class LiteYTEmbed extends HTMLElement {\n constructor() {\n super();\n this.isIframeLoaded = false;\n this.setupDom();\n }\n static get observedAttributes() {\n return ['videoid', 'playlistid'];\n }\n connectedCallback() {\n this.addEventListener('pointerover', LiteYTEmbed.warmConnections, {\n once: true,\n });\n this.addEventListener('click', () => this.addIframe());\n }\n get videoId() {\n return encodeURIComponent(this.getAttribute('videoid') || '');\n }\n set videoId(id) {\n this.setAttribute('videoid', id);\n }\n get playlistId() {\n return encodeURIComponent(this.getAttribute('playlistid') || '');\n }\n set playlistId(id) {\n this.setAttribute('playlistid', id);\n }\n get videoTitle() {\n return this.getAttribute('videotitle') || 'Video';\n }\n set videoTitle(title) {\n this.setAttribute('videotitle', title);\n }\n get videoPlay() {\n return this.getAttribute('videoPlay') || 'Play';\n }\n set videoPlay(name) {\n this.setAttribute('videoPlay', name);\n }\n get videoStartAt() {\n return this.getAttribute('videoStartAt') || '0';\n }\n get autoLoad() {\n return this.hasAttribute('autoload');\n }\n get noCookie() {\n return this.hasAttribute('nocookie');\n }\n get posterQuality() {\n return this.getAttribute('posterquality') || 'hqdefault';\n }\n get posterLoading() {\n return (this.getAttribute('posterloading') ||\n 'lazy');\n }\n get params() {\n return `start=${this.videoStartAt}&${this.getAttribute('params')}`;\n }\n set params(opts) {\n this.setAttribute('params', opts);\n }\n setupDom() {\n const shadowDom = this.attachShadow({ mode: 'open' });\n let nonce = '';\n if (window.liteYouTubeNonce) {\n nonce = `nonce=\"${window.liteYouTubeNonce}\"`;\n }\n shadowDom.innerHTML = `\n <style ${nonce}>\n :host {\n contain: content;\n display: block;\n position: relative;\n width: 100%;\n padding-bottom: calc(100% / (16 / 9));\n }\n\n @media (max-width: 40em) {\n :host([short]) {\n padding-bottom: calc(100% / (9 / 16));\n }\n }\n\n #frame, #fallbackPlaceholder, iframe {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n }\n\n #frame {\n cursor: pointer;\n }\n\n #fallbackPlaceholder {\n object-fit: cover;\n }\n\n #frame::before {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n background-image: linear-gradient(180deg, #111 -20%, transparent 90%);\n height: 60px;\n width: 100%;\n z-index: 1;\n }\n\n #playButton {\n width: 68px;\n height: 48px;\n background-color: transparent;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 68 48\"><path d=\"M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z\" fill=\"red\"/><path d=\"M45 24 27 14v20\" fill=\"white\"/></svg>');\n z-index: 1;\n border: 0;\n border-radius: inherit;\n }\n\n #playButton:before {\n content: '';\n border-style: solid;\n border-width: 11px 0 11px 19px;\n border-color: transparent transparent transparent #fff;\n }\n\n #playButton,\n #playButton:before {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate3d(-50%, -50%, 0);\n cursor: inherit;\n }\n\n /* Post-click styles */\n .activated {\n cursor: unset;\n }\n\n #frame.activated::before,\n #frame.activated > #playButton {\n display: none;\n }\n </style>\n <div id=\"frame\">\n <picture>\n <source id=\"webpPlaceholder\" type=\"image/webp\">\n <source id=\"jpegPlaceholder\" type=\"image/jpeg\">\n <img id=\"fallbackPlaceholder\" referrerpolicy=\"origin\" loading=\"lazy\">\n </picture>\n <button id=\"playButton\"></button>\n </div>\n `;\n this.domRefFrame = shadowDom.querySelector('#frame');\n this.domRefImg = {\n fallback: shadowDom.querySelector('#fallbackPlaceholder'),\n webp: shadowDom.querySelector('#webpPlaceholder'),\n jpeg: shadowDom.querySelector('#jpegPlaceholder'),\n };\n this.domRefPlayButton = shadowDom.querySelector('#playButton');\n }\n setupComponent() {\n this.initImagePlaceholder();\n this.domRefPlayButton.setAttribute('aria-label', `${this.videoPlay}: ${this.videoTitle}`);\n this.setAttribute('title', `${this.videoPlay}: ${this.videoTitle}`);\n if (this.autoLoad || this.isYouTubeShort()) {\n this.initIntersectionObserver();\n }\n }\n attributeChangedCallback(name, oldVal, newVal) {\n switch (name) {\n case 'videoid':\n case 'playlistid':\n case 'videoTitle':\n case 'videoPlay': {\n if (oldVal !== newVal) {\n this.setupComponent();\n if (this.domRefFrame.classList.contains('activated')) {\n this.domRefFrame.classList.remove('activated');\n this.shadowRoot.querySelector('iframe').remove();\n this.isIframeLoaded = false;\n }\n }\n break;\n }\n default:\n break;\n }\n }\n addIframe(isIntersectionObserver = false) {\n if (!this.isIframeLoaded) {\n let autoplay = isIntersectionObserver ? 0 : 1;\n const wantsNoCookie = this.noCookie ? '-nocookie' : '';\n let embedTarget;\n if (this.playlistId) {\n embedTarget = `?listType=playlist&list=${this.playlistId}&`;\n }\n else {\n embedTarget = `${this.videoId}?`;\n }\n if (this.isYouTubeShort()) {\n this.params = `loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`;\n autoplay = 1;\n }\n const iframeHTML = `\n<iframe frameborder=\"0\" title=\"${this.videoTitle}\"\n allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen\n src=\"https://www.youtube${wantsNoCookie}.com/embed/${embedTarget}autoplay=${autoplay}&${this.params}\"\n></iframe>`;\n this.domRefFrame.insertAdjacentHTML('beforeend', iframeHTML);\n this.domRefFrame.classList.add('activated');\n this.isIframeLoaded = true;\n this.attemptShortAutoPlay();\n this.dispatchEvent(new CustomEvent('liteYoutubeIframeLoaded', {\n detail: {\n videoId: this.videoId,\n },\n bubbles: true,\n cancelable: true,\n }));\n }\n }\n initImagePlaceholder() {\n const posterUrlWebp = `https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`;\n const posterUrlJpeg = `https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;\n this.domRefImg.fallback.loading = this.posterLoading;\n this.domRefImg.webp.srcset = posterUrlWebp;\n this.domRefImg.jpeg.srcset = posterUrlJpeg;\n this.domRefImg.fallback.src = posterUrlJpeg;\n this.domRefImg.fallback.setAttribute('aria-label', `${this.videoPlay}: ${this.videoTitle}`);\n this.domRefImg?.fallback?.setAttribute('alt', `${this.videoPlay}: ${this.videoTitle}`);\n }\n initIntersectionObserver() {\n const options = {\n root: null,\n rootMargin: '0px',\n threshold: 0,\n };\n const observer = new IntersectionObserver((entries, observer) => {\n entries.forEach(entry => {\n if (entry.isIntersecting && !this.isIframeLoaded) {\n LiteYTEmbed.warmConnections();\n this.addIframe(true);\n observer.unobserve(this);\n }\n });\n }, options);\n observer.observe(this);\n }\n attemptShortAutoPlay() {\n if (this.isYouTubeShort()) {\n setTimeout(() => {\n this.shadowRoot\n .querySelector('iframe')\n ?.contentWindow?.postMessage('{\"event\":\"command\",\"func\":\"' + 'playVideo' + '\",\"args\":\"\"}', '*');\n }, 2000);\n }\n }\n isYouTubeShort() {\n return (this.getAttribute('short') === '' &&\n window.matchMedia('(max-width: 40em)').matches);\n }\n static addPrefetch(kind, url) {\n const linkElem = document.createElement('link');\n linkElem.rel = kind;\n linkElem.href = url;\n linkElem.crossOrigin = 'true';\n document.head.append(linkElem);\n }\n static warmConnections() {\n if (LiteYTEmbed.isPreconnected || window.liteYouTubeIsPreconnected)\n return;\n LiteYTEmbed.addPrefetch('preconnect', 'https://i.ytimg.com/');\n LiteYTEmbed.addPrefetch('preconnect', 'https://s.ytimg.com');\n LiteYTEmbed.addPrefetch('preconnect', 'https://www.youtube.com');\n LiteYTEmbed.addPrefetch('preconnect', 'https://www.google.com');\n LiteYTEmbed.addPrefetch('preconnect', 'https://googleads.g.doubleclick.net');\n LiteYTEmbed.addPrefetch('preconnect', 'https://static.doubleclick.net');\n LiteYTEmbed.isPreconnected = true;\n window.liteYouTubeIsPreconnected = true;\n }\n}\nLiteYTEmbed.isPreconnected = false;\ncustomElements.define('lite-youtube', LiteYTEmbed);\n//# sourceMappingURL=lite-youtube.js.map","const digitLookup = new Uint8Array(128);\nfor (let i = 0; i < 83; i++) {\n digitLookup[\n '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~'.charCodeAt(\n i,\n )\n ] = i;\n}\nconst decode83 = (str, start, end) => {\n let value = 0;\n while (start < end) {\n value *= 83;\n value += digitLookup[str.charCodeAt(start++)];\n }\n return value;\n};\n\nconst pow = Math.pow;\nconst PI = Math.PI;\nconst PI2 = PI * 2;\n\nconst d = 3294.6;\nconst e = 269.025;\nconst sRGBToLinear = (value) =>\n value > 10.31475 ? pow(value / e + 0.052132, 2.4) : value / d;\n\nconst linearTosRGB = (v) =>\n ~~(v > 0.00001227 ? e * pow(v, 0.416666) - 13.025 : v * d + 1);\n\nconst signSqr = (x) => (x < 0 ? -1 : 1) * x * x;\n\n/**\n * Fast approximate cosine implementation\n * Based on FTrig https://github.com/netcell/FTrig\n */\nconst fastCos = (x) => {\n x += PI / 2;\n while (x > PI) {\n x -= PI2;\n }\n const cos = 1.27323954 * x - 0.405284735 * signSqr(x);\n return 0.225 * (signSqr(cos) - cos) + cos;\n};\n\n/**\n * Extracts average color from BlurHash image\n * @param {string} blurHash BlurHash image string\n * @returns {[number, number, number]}\n */\nexport function getBlurHashAverageColor(blurHash) {\n const val = decode83(blurHash, 2, 6);\n return [val >> 16, (val >> 8) & 255, val & 255];\n}\n\n/**\n * Decodes BlurHash image\n * @param {string} blurHash BlurHash image string\n * @param {number} width Output image width\n * @param {number} height Output image height\n * @param {?number} punch\n * @returns {Uint8ClampedArray}\n */\nexport function decodeBlurHash(blurHash, width, height, punch) {\n const sizeFlag = decode83(blurHash, 0, 1);\n const numX = (sizeFlag % 9) + 1;\n const numY = ~~(sizeFlag / 9) + 1;\n const size = numX * numY;\n\n let i = 0,\n j = 0,\n x = 0,\n y = 0,\n r = 0,\n g = 0,\n b = 0,\n basis = 0,\n basisY = 0,\n colorIndex = 0,\n pixelIndex = 0,\n value = 0;\n\n const maximumValue = ((decode83(blurHash, 1, 2) + 1) / 13446) * (punch | 1);\n\n const colors = new Float64Array(size * 3);\n\n const averageColor = getBlurHashAverageColor(blurHash);\n for (i = 0; i < 3; i++) {\n colors[i] = sRGBToLinear(averageColor[i]);\n }\n\n for (i = 1; i < size; i++) {\n value = decode83(blurHash, 4 + i * 2, 6 + i * 2);\n colors[i * 3] = signSqr(~~(value / 361) - 9) * maximumValue;\n colors[i * 3 + 1] = signSqr((~~(value / 19) % 19) - 9) * maximumValue;\n colors[i * 3 + 2] = signSqr((value % 19) - 9) * maximumValue;\n }\n\n const cosinesY = new Float64Array(numY * height);\n const cosinesX = new Float64Array(numX * width);\n for (j = 0; j < numY; j++) {\n for (y = 0; y < height; y++) {\n cosinesY[j * height + y] = fastCos((PI * y * j) / height);\n }\n }\n for (i = 0; i < numX; i++) {\n for (x = 0; x < width; x++) {\n cosinesX[i * width + x] = fastCos((PI * x * i) / width);\n }\n }\n\n const bytesPerRow = width * 4;\n const pixels = new Uint8ClampedArray(bytesPerRow * height);\n\n for (y = 0; y < height; y++) {\n for (x = 0; x < width; x++) {\n r = g = b = 0;\n for (j = 0; j < numY; j++) {\n basisY = cosinesY[j * height + y];\n for (i = 0; i < numX; i++) {\n basis = cosinesX[i * width + x] * basisY;\n colorIndex = (i + j * numX) * 3;\n r += colors[colorIndex] * basis;\n g += colors[colorIndex + 1] * basis;\n b += colors[colorIndex + 2] * basis;\n }\n }\n\n pixelIndex = 4 * x + y * bytesPerRow;\n pixels[pixelIndex] = linearTosRGB(r);\n pixels[pixelIndex + 1] = linearTosRGB(g);\n pixels[pixelIndex + 2] = linearTosRGB(b);\n pixels[pixelIndex + 3] = 255; // alpha\n }\n }\n return pixels;\n}\n","/**\n * @param {string[]} splittedHtml\n * @param {{ char?: string; count?: number}} options\n * @returns {string}\n */\nconst addIndentation = (splittedHtml, options = {}) => {\n const char = options.char || ' '\n const count = options.count || 2\n\n let level = 0\n const opened = []\n\n return splittedHtml.reverse().reduce((indented, elTag) => {\n if (opened.length\n && level\n && opened[level]\n /* if current element tag is the same as previously opened one */\n && opened[level] === elTag.substring(1, opened[level].length + 1)\n ) {\n opened.splice(level, 1)\n level--\n }\n\n const indentation = char.repeat(level ? level * count : 0)\n\n const newIndented = [\n `${indentation}${elTag}`,\n ...indented,\n ]\n\n // if current element tag is closing tag\n // add it to opened elements\n if (elTag.substring(0, 2) === '</') {\n level++\n opened[level] = elTag.substring(2, elTag.length - 1)\n }\n\n return newIndented\n }, []).join('\\n')\n}\n\nmodule.exports = addIndentation\n","/**\n * @param {string} nonFormattedString Any non formatted string\n * @returns {string[]} Array of strings separated on new lines\n */\nconst removeEmptyLines = (nonFormattedString) => (\n // Replace\n // - 1 or more spaces or tabs at the start of line\n // - 1 or more spaces or tabs at the end of line\n // - empty lines\n // with empty string\n nonFormattedString.trim().replace(/(^(\\s|\\t)+|(( |\\t)+)$)/gm, '')\n)\n\n/**\n * @param {string} markup\n * @returns {string[]} Array of strings splitted on new lines without empty lines\n */\nconst mergeAttributesWithElements = (markup) => {\n const splittedMarkup = removeEmptyLines(markup).split('\\n')\n\n const mergedLines = []\n let currentElement = ''\n for (let i = 0; i < splittedMarkup.length; i += 1) {\n const line = splittedMarkup[i]\n\n // If line is closing element/tag separate closing tag from rest of the line with space\n if (line.endsWith('/>')) {\n mergedLines.push(`${currentElement}${line.slice(0, -2)} />`)\n currentElement = ''\n // eslint-disable-next-line no-continue\n continue\n }\n\n if (line.endsWith('>')) {\n mergedLines.push(`${currentElement}${\n line.startsWith('>') || line.startsWith('<') ? '' : ' '\n }${line}`)\n currentElement = ''\n // eslint-disable-next-line no-continue\n continue\n }\n\n currentElement += currentElement.length ? ` ${line}` : line\n }\n\n return mergedLines\n}\n\nmodule.exports = {\n mergeAttributesWithElements,\n removeEmptyLines,\n}\n","const addIndentation = require('./utils/addIndentation')\nconst { mergeAttributesWithElements } = require('./utils/toLines')\n\n/**\n * @param {string} markup\n * @param {{ char?: string; count?: number }} options\n * @returns {string}\n */\nconst prettify = (markup, options = {}) => {\n const splitted = mergeAttributesWithElements(markup)\n\n return addIndentation(splitted, options)\n}\n\nmodule.exports = prettify\n","import { useRef as s, useCallback as h, useEffect as g } from \"react\";\nvar l = /* @__PURE__ */ ((e) => (e.Mouse = \"mouse\", e.Touch = \"touch\", e.Pointer = \"pointer\", e))(l || {}), d = /* @__PURE__ */ ((e) => (e.CancelledByMovement = \"cancelled-by-movement\", e.CancelledByRelease = \"cancelled-by-release\", e.CancelledOutsideElement = \"cancelled-outside-element\", e))(d || {});\nconst A = () => typeof window == \"object\" ? window?.PointerEvent ?? null : null, z = () => typeof window == \"object\" ? window?.TouchEvent ?? null : null;\nfunction U(e) {\n const { nativeEvent: t } = e, u = z();\n return u && t instanceof u || \"touches\" in e;\n}\nfunction X(e) {\n const t = A();\n return e.nativeEvent instanceof MouseEvent && !(t && e.nativeEvent instanceof t);\n}\nfunction Y(e) {\n const { nativeEvent: t } = e;\n if (!t)\n return !1;\n const u = A();\n return u && t instanceof u || \"pointerId\" in t;\n}\nfunction R(e) {\n return X(e) || U(e) || Y(e);\n}\nfunction j(e) {\n return U(e) ? {\n x: e.touches[0].pageX,\n y: e.touches[0].pageY\n } : X(e) || Y(e) ? {\n x: e.pageX,\n y: e.pageY\n } : null;\n}\nfunction G(e) {\n return {\n target: e.target,\n currentTarget: e.currentTarget,\n nativeEvent: e,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n persist: () => {\n }\n };\n}\nfunction J(e, {\n threshold: t = 400,\n captureEvent: u = !1,\n detect: y = l.Pointer,\n cancelOnMovement: w = !1,\n cancelOutsideElement: v = !0,\n filterEvents: p,\n onStart: M,\n onMove: C,\n onFinish: L,\n onCancel: b\n} = {}) {\n const P = s(!1), c = s(!1), I = s(), a = s(), T = s(e), f = s(null), E = h(\n (n) => (r) => {\n c.current || R(r) && (p !== void 0 && !p(r) || (u && r.persist(), M?.(r, { context: n }), f.current = j(r), c.current = !0, I.current = r.currentTarget, a.current = setTimeout(() => {\n T.current && (T.current(r, { context: n }), P.current = !0);\n }, t)));\n },\n [u, p, M, t]\n ), i = h(\n (n) => (r, o) => {\n R(r) && c.current && (f.current = null, u && r.persist(), P.current ? L?.(r, { context: n }) : c.current && b?.(r, { context: n, reason: o ?? d.CancelledByRelease }), P.current = !1, c.current = !1, a.current !== void 0 && clearTimeout(a.current));\n },\n [u, L, b]\n ), m = h(\n (n) => (r) => {\n if (C?.(r, { context: n }), w !== !1 && f.current) {\n const o = j(r);\n if (o) {\n const B = w === !0 ? 25 : w, D = {\n x: Math.abs(o.x - f.current.x),\n y: Math.abs(o.y - f.current.y)\n };\n (D.x > B || D.y > B) && i(n)(r, d.CancelledByMovement);\n }\n }\n },\n [i, w, C]\n ), q = h(\n (n) => {\n if (e === null)\n return {};\n switch (y) {\n case l.Mouse: {\n const r = {\n onMouseDown: E(n),\n onMouseMove: m(n),\n onMouseUp: i(n)\n };\n return v && (r.onMouseLeave = (o) => {\n i(n)(o, d.CancelledOutsideElement);\n }), r;\n }\n case l.Touch:\n return {\n onTouchStart: E(n),\n onTouchMove: m(n),\n onTouchEnd: i(n)\n };\n case l.Pointer: {\n const r = {\n onPointerDown: E(n),\n onPointerMove: m(n),\n onPointerUp: i(n)\n };\n return v && (r.onPointerLeave = (o) => i(n)(o, d.CancelledOutsideElement)), r;\n }\n }\n },\n [e, i, v, y, m, E]\n );\n return g(() => {\n if (!window)\n return;\n function n(r) {\n const o = G(r);\n i()(o);\n }\n return window.addEventListener(\"mouseup\", n), window.addEventListener(\"touchend\", n), window.addEventListener(\"pointerup\", n), () => {\n window.removeEventListener(\"mouseup\", n), window.removeEventListener(\"touchend\", n), window.removeEventListener(\"pointerup\", n);\n };\n }, [i]), g(\n () => () => {\n a.current !== void 0 && clearTimeout(a.current);\n },\n []\n ), g(() => {\n T.current = e;\n }, [e]), q;\n}\nexport {\n d as LongPressCallbackReason,\n l as LongPressEventType,\n J as useLongPress\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 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 as r,useEffect as n,useMemo as t,useReducer as e,useCallback as u}from\"react\";function c(e,u,c){var i=this,a=r(null),o=r(0),f=r(null),l=r([]),v=r(),m=r(),d=r(e),g=r(!0);d.current=e;var p=\"undefined\"!=typeof window,w=!u&&0!==u&&p;if(\"function\"!=typeof e)throw new TypeError(\"Expected a function\");u=+u||0;var s=!!(c=c||{}).leading,x=!(\"trailing\"in c)||!!c.trailing,h=\"maxWait\"in c,y=\"debounceOnServer\"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;n(function(){return g.current=!0,function(){g.current=!1}},[]);var A=t(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n)},t=function(r){if(!g.current)return!1;var n=r-a.current;return!a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f)}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null},A.isPending=function(){return!!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i(r,n){return r===n}function a(r,n){return n}function o(n,t,o){var f=o&&o.equalityFn||i,l=e(a,n),v=l[0],m=l[1],d=c(u(function(r){return m(r)},[m]),t,o),g=r(n);return f(g.current,n)||(d(n),g.current=n),f(v,n)&&d.cancel(),[v,d]}function f(r,n,t){var e=void 0===t?{}:t,u=e.leading,i=e.trailing;return c(r,n,{maxWait:n,leading:void 0===u||u,trailing:void 0===i||i})}export{o as useDebounce,c as useDebouncedCallback,f as useThrottledCallback};\n//# sourceMappingURL=index.module.js.map\n","import { useRef, useEffect, useCallback, useState, useMemo } from 'react';\n\n// This could've been more streamlined with internal state instead of abusing\n// refs to such extent, but then composing hooks and components could not opt out of unnecessary renders.\nfunction useResolvedElement(subscriber, refOrElement) {\n var lastReportRef = useRef(null);\n var refOrElementRef = useRef(null);\n refOrElementRef.current = refOrElement;\n var cbElementRef = useRef(null); // Calling re-evaluation after each render without using a dep array,\n // as the ref object's current value could've changed since the last render.\n\n useEffect(function () {\n evaluateSubscription();\n });\n var evaluateSubscription = useCallback(function () {\n var cbElement = cbElementRef.current;\n var refOrElement = refOrElementRef.current; // Ugly ternary. But smaller than an if-else block.\n\n var element = cbElement ? cbElement : refOrElement ? refOrElement instanceof Element ? refOrElement : refOrElement.current : null;\n\n if (lastReportRef.current && lastReportRef.current.element === element && lastReportRef.current.subscriber === subscriber) {\n return;\n }\n\n if (lastReportRef.current && lastReportRef.current.cleanup) {\n lastReportRef.current.cleanup();\n }\n\n lastReportRef.current = {\n element: element,\n subscriber: subscriber,\n // Only calling the subscriber, if there's an actual element to report.\n // Setting cleanup to undefined unless a subscriber returns one, as an existing cleanup function would've been just called.\n cleanup: element ? subscriber(element) : undefined\n };\n }, [subscriber]); // making sure we call the cleanup function on unmount\n\n useEffect(function () {\n return function () {\n if (lastReportRef.current && lastReportRef.current.cleanup) {\n lastReportRef.current.cleanup();\n lastReportRef.current = null;\n }\n };\n }, []);\n return useCallback(function (element) {\n cbElementRef.current = element;\n evaluateSubscription();\n }, [evaluateSubscription]);\n}\n\n// We're only using the first element of the size sequences, until future versions of the spec solidify on how\n// exactly it'll be used for fragments in multi-column scenarios:\n// From the spec:\n// > The box size properties are exposed as FrozenArray in order to support elements that have multiple fragments,\n// > which occur in multi-column scenarios. However the current definitions of content rect and border box do not\n// > mention how those boxes are affected by multi-column layout. In this spec, there will only be a single\n// > ResizeObserverSize returned in the FrozenArray, which will correspond to the dimensions of the first column.\n// > A future version of this spec will extend the returned FrozenArray to contain the per-fragment size information.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-entry-interface)\n//\n// Also, testing these new box options revealed that in both Chrome and FF everything is returned in the callback,\n// regardless of the \"box\" option.\n// The spec states the following on this:\n// > This does not have any impact on which box dimensions are returned to the defined callback when the event\n// > is fired, it solely defines which box the author wishes to observe layout changes on.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// I'm not exactly clear on what this means, especially when you consider a later section stating the following:\n// > This section is non-normative. An author may desire to observe more than one CSS box.\n// > In this case, author will need to use multiple ResizeObservers.\n// (https://drafts.csswg.org/resize-observer/#resize-observer-interface)\n// Which is clearly not how current browser implementations behave, and seems to contradict the previous quote.\n// For this reason I decided to only return the requested size,\n// even though it seems we have access to results for all box types.\n// This also means that we get to keep the current api, being able to return a simple { width, height } pair,\n// regardless of box option.\nfunction extractSize(entry, boxProp, sizeType) {\n if (!entry[boxProp]) {\n if (boxProp === \"contentBoxSize\") {\n // The dimensions in `contentBoxSize` and `contentRect` are equivalent according to the spec.\n // See the 6th step in the description for the RO algorithm:\n // https://drafts.csswg.org/resize-observer/#create-and-populate-resizeobserverentry-h\n // > Set this.contentRect to logical this.contentBoxSize given target and observedBox of \"content-box\".\n // In real browser implementations of course these objects differ, but the width/height values should be equivalent.\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"];\n }\n\n return undefined;\n } // A couple bytes smaller than calling Array.isArray() and just as effective here.\n\n\n return entry[boxProp][0] ? entry[boxProp][0][sizeType] : // TS complains about this, because the RO entry type follows the spec and does not reflect Firefox's current\n // behaviour of returning objects instead of arrays for `borderBoxSize` and `contentBoxSize`.\n // @ts-ignore\n entry[boxProp][sizeType];\n}\n\nfunction useResizeObserver(opts) {\n if (opts === void 0) {\n opts = {};\n }\n\n // Saving the callback as a ref. With this, I don't need to put onResize in the\n // effect dep array, and just passing in an anonymous function without memoising\n // will not reinstantiate the hook's ResizeObserver.\n var onResize = opts.onResize;\n var onResizeRef = useRef(undefined);\n onResizeRef.current = onResize;\n var round = opts.round || Math.round; // Using a single instance throughout the hook's lifetime\n\n var resizeObserverRef = useRef();\n\n var _useState = useState({\n width: undefined,\n height: undefined\n }),\n size = _useState[0],\n setSize = _useState[1]; // In certain edge cases the RO might want to report a size change just after\n // the component unmounted.\n\n\n var didUnmount = useRef(false);\n useEffect(function () {\n didUnmount.current = false;\n return function () {\n didUnmount.current = true;\n };\n }, []); // Using a ref to track the previous width / height to avoid unnecessary renders.\n\n var previous = useRef({\n width: undefined,\n height: undefined\n }); // This block is kinda like a useEffect, only it's called whenever a new\n // element could be resolved based on the ref option. It also has a cleanup\n // function.\n\n var refCallback = useResolvedElement(useCallback(function (element) {\n // We only use a single Resize Observer instance, and we're instantiating it on demand, only once there's something to observe.\n // This instance is also recreated when the `box` option changes, so that a new observation is fired if there was a previously observed element with a different box option.\n if (!resizeObserverRef.current || resizeObserverRef.current.box !== opts.box || resizeObserverRef.current.round !== round) {\n resizeObserverRef.current = {\n box: opts.box,\n round: round,\n instance: new ResizeObserver(function (entries) {\n var entry = entries[0];\n var boxProp = opts.box === \"border-box\" ? \"borderBoxSize\" : opts.box === \"device-pixel-content-box\" ? \"devicePixelContentBoxSize\" : \"contentBoxSize\";\n var reportedWidth = extractSize(entry, boxProp, \"inlineSize\");\n var reportedHeight = extractSize(entry, boxProp, \"blockSize\");\n var newWidth = reportedWidth ? round(reportedWidth) : undefined;\n var newHeight = reportedHeight ? round(reportedHeight) : undefined;\n\n if (previous.current.width !== newWidth || previous.current.height !== newHeight) {\n var newSize = {\n width: newWidth,\n height: newHeight\n };\n previous.current.width = newWidth;\n previous.current.height = newHeight;\n\n if (onResizeRef.current) {\n onResizeRef.current(newSize);\n } else {\n if (!didUnmount.current) {\n setSize(newSize);\n }\n }\n }\n })\n };\n }\n\n resizeObserverRef.current.instance.observe(element, {\n box: opts.box\n });\n return function () {\n if (resizeObserverRef.current) {\n resizeObserverRef.current.instance.unobserve(element);\n }\n };\n }, [opts.box, round]), opts.ref);\n return useMemo(function () {\n return {\n ref: refCallback,\n width: size.width,\n height: size.height\n };\n }, [refCallback, size.width, size.height]);\n}\n\nexport { useResizeObserver as default };\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 var styleRoot = 'kvfysmfp';\nexport var styleChild = 'ufhsfnkm';\nexport var styles = \".\".concat(styleRoot, \"{overflow:hidden;touch-action:none}.\").concat(styleChild, \"{transform-origin: 0 0}\");\n","var isSsr = typeof window === 'undefined';\nexport var isTouch = function () {\n return !isSsr && ('ontouchstart' in window || navigator.maxTouchPoints > 0);\n};\nexport var make2dTransformValue = function (_a) {\n var x = _a.x, y = _a.y, scale = _a.scale;\n return \"scale(\".concat(scale, \") translate(\").concat(x, \"px, \").concat(y, \"px)\");\n};\nexport var make3dTransformValue = function (_a) {\n var x = _a.x, y = _a.y, scale = _a.scale;\n return \"scale3d(\".concat(scale, \",\").concat(scale, \", 1) translate3d(\").concat(x, \"px, \").concat(y, \"px, 0)\");\n};\nexport var hasTranslate3DSupport = function () {\n var css = !isSsr && window.CSS;\n return css && css.supports && css.supports('transform', 'translate3d(0,0,0)');\n};\n","var min = Math.min, max = Math.max;\nexport function getOffsetBounds(_a) {\n var containerDimension = _a.containerDimension, childDimension = _a.childDimension, padding = _a.padding, centerContained = _a.centerContained;\n var diff = childDimension - containerDimension;\n if (diff + 2 * padding <= 0 && centerContained) {\n return [diff / 2, diff / 2];\n }\n else {\n return [min(diff + padding, 0) - padding, max(0, diff + padding)];\n }\n}\n","import { __assign, __extends } from \"tslib\";\nimport React, { Component, createRef, Children, cloneElement } from 'react';\nimport { styleRoot, styleChild, styles } from './styles.css';\nimport { isTouch } from '../utils';\nimport { getOffsetBounds } from './getOffsetBounds';\nvar classnames = function (base, other) {\n return other ? \"\".concat(base, \" \").concat(other) : base;\n};\nvar abs = Math.abs, min = Math.min, sqrt = Math.sqrt;\nvar isSsr = typeof window === 'undefined';\nvar isMac = isSsr ? false : /(Mac)/i.test(navigator.platform);\nvar isDragInteraction = function (i) { return i === 'drag'; };\nvar isZoomInteraction = function (i) { return i === 'zoom'; };\nvar isZoomGesture = function (wheelEvent) { return isMac && wheelEvent.ctrlKey; };\nvar cancelEvent = function (event) {\n event.stopPropagation();\n event.preventDefault();\n};\nvar getDistance = function (a, b) {\n var x = a.x - b.x;\n var y = a.y - b.y;\n return sqrt(x * x + y * y);\n};\nvar calculateScale = function (startTouches, endTouches) {\n var startDistance = getDistance(startTouches[0], startTouches[1]);\n var endDistance = getDistance(endTouches[0], endTouches[1]);\n return endDistance / startDistance;\n};\nvar isCloseTo = function (value, expected) {\n return value > expected - 0.01 && value < expected + 0.01;\n};\nvar swing = function (p) { return -Math.cos(p * Math.PI) / 2 + 0.5; };\nvar getPointByPageCoordinates = function (touch) { return ({\n x: touch.pageX,\n y: touch.pageY,\n}); };\nvar getPageCoordinatesByTouches = function (touches) {\n return Array.from(touches).map(getPointByPageCoordinates);\n};\nvar sum = function (a, b) { return a + b; };\nvar getVectorAvg = function (vectors) { return ({\n x: vectors.map(function (_a) {\n var x = _a.x;\n return x;\n }).reduce(sum, 0) / vectors.length,\n y: vectors.map(function (_a) {\n var y = _a.y;\n return y;\n }).reduce(sum, 0) / vectors.length,\n}); };\nvar clamp = function (min, max, value) {\n return value < min ? min : value > max ? max : value;\n};\nvar shouldInterceptWheel = function (event) {\n return !(event.ctrlKey || event.metaKey);\n};\nvar getElementSize = function (element) {\n if (element) {\n var offsetWidth = element.offsetWidth, offsetHeight = element.offsetHeight;\n // Any DOMElement\n if (offsetWidth && offsetHeight) {\n return { width: offsetWidth, height: offsetHeight };\n }\n // Svg support\n var style = getComputedStyle(element);\n var width = parseFloat(style.width);\n var height = parseFloat(style.height);\n if (height && width) {\n return { width: width, height: height };\n }\n }\n return { width: 0, height: 0 };\n};\nvar calculateVelocity = function (startPoint, endPoint) { return ({\n x: endPoint.x - startPoint.x,\n y: endPoint.y - startPoint.y,\n}); };\nvar comparePoints = function (p1, p2) { return p1.x === p2.x && p1.y === p2.y; };\nvar noup = function () { };\nvar zeroPoint = { x: 0, y: 0 };\nvar PinchZoom = /** @class */ (function (_super) {\n __extends(PinchZoom, _super);\n function PinchZoom() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._prevDragMovePoint = null;\n _this._containerObserver = null;\n _this._fingers = 0;\n _this._firstMove = true;\n _this._initialOffset = __assign({}, zeroPoint);\n _this._interaction = null;\n _this._isDoubleTap = false;\n _this._isOffsetsSet = false;\n _this._lastDragPosition = null;\n _this._lastScale = 1;\n _this._lastTouchStart = 0;\n _this._lastZoomCenter = null;\n _this._listenMouseMove = false;\n _this._nthZoom = 0;\n _this._offset = __assign({}, zeroPoint);\n _this._startOffset = __assign({}, zeroPoint);\n _this._startTouches = null;\n _this._updatePlaned = false;\n _this._wheelTimeOut = null;\n _this._zoomFactor = 1;\n _this._initialZoomFactor = 1;\n _this._draggingPoint = __assign({}, zeroPoint);\n // It help reduce behavior difference between touch and mouse events\n _this._ignoreNextClick = false;\n // @ts-ignore\n _this._containerRef = createRef();\n _this._handleClick = function (clickEvent) {\n if (_this._ignoreNextClick) {\n _this._ignoreNextClick = false;\n clickEvent.stopPropagation();\n }\n };\n _this._onResize = function () {\n var _a;\n if ((_a = _this._containerRef) === null || _a === void 0 ? void 0 : _a.current) {\n _this._updateInitialZoomFactor();\n _this._setupOffsets();\n _this._update();\n }\n };\n _this._handlerOnTouchEnd = _this._handlerIfEnable(function (touchEndEvent) {\n _this._fingers = touchEndEvent.touches.length;\n if (_this.props.shouldCancelHandledTouchEndEvents &&\n (isZoomInteraction(_this._interaction) ||\n (isDragInteraction(_this._interaction) &&\n (_this._startOffset.x !== _this._offset.x ||\n _this._startOffset.y !== _this._offset.y)))) {\n cancelEvent(touchEndEvent);\n }\n if (isDragInteraction(_this._interaction) && !_this._enoughToDrag()) {\n _this._handleClick(touchEndEvent);\n }\n _this._updateInteraction(touchEndEvent);\n });\n _this._handlerOnTouchStart = _this._handlerIfEnable(function (touchStartEvent) {\n _this._firstMove = true;\n _this._fingers = touchStartEvent.touches.length;\n _this._detectDoubleTap(touchStartEvent);\n });\n _this._handlerOnTouchMove = _this._handlerIfEnable(function (touchMoveEvent) {\n if (_this._isDoubleTap) {\n return;\n }\n _this._collectInertia(touchMoveEvent);\n if (_this._firstMove) {\n _this._updateInteraction(touchMoveEvent);\n if (_this._interaction) {\n cancelEvent(touchMoveEvent);\n }\n _this._startOffset = __assign({}, _this._offset);\n _this._startTouches = getPageCoordinatesByTouches(touchMoveEvent.touches);\n }\n else {\n if (isZoomInteraction(_this._interaction)) {\n if (_this._startTouches &&\n _this._startTouches.length === 2 &&\n touchMoveEvent.touches.length === 2) {\n _this._handleZoom(touchMoveEvent, calculateScale(_this._startTouches, getPageCoordinatesByTouches(touchMoveEvent.touches)));\n }\n }\n else if (isDragInteraction(_this._interaction)) {\n _this._handleDrag(touchMoveEvent);\n }\n if (_this._interaction) {\n cancelEvent(touchMoveEvent);\n _this._update();\n }\n }\n _this._firstMove = false;\n });\n _this._handlerWheel = function (wheelEvent) {\n if (_this.props.shouldInterceptWheel(wheelEvent)) {\n return;\n }\n cancelEvent(wheelEvent);\n var pageX = wheelEvent.pageX, pageY = wheelEvent.pageY, deltaY = wheelEvent.deltaY, deltaMode = wheelEvent.deltaMode;\n var scaleDelta = 1;\n if (isZoomGesture(wheelEvent) || deltaMode === 1) {\n scaleDelta = 15;\n }\n var likeTouchEvent = {\n touches: [\n // @ts-ignore\n { pageX: pageX, pageY: pageY },\n ],\n };\n var center = _this._getOffsetByFirstTouch(likeTouchEvent);\n var dScale = deltaY * scaleDelta;\n _this._stopAnimation();\n _this._scaleTo(_this._zoomFactor - dScale / _this.props.wheelScaleFactor, center);\n _this._update();\n clearTimeout(\n // @ts-ignore\n _this._wheelTimeOut);\n _this._wheelTimeOut = setTimeout(function () { return _this._sanitize(); }, 100);\n };\n // @ts-ignore\n _this._handlers = _this.props.isTouch()\n ? [\n ['touchstart', _this._handlerOnTouchStart],\n ['touchend', _this._handlerOnTouchEnd],\n ['touchmove', _this._handlerOnTouchMove],\n ]\n : [\n [\n 'mousemove',\n _this.simulate(_this._handlerOnTouchMove),\n _this.props._document,\n ],\n [\n 'mouseup',\n _this.simulate(_this._handlerOnTouchEnd),\n _this.props._document,\n ],\n ['mousedown', _this.simulate(_this._handlerOnTouchStart)],\n ['click', _this._handleClick],\n ['wheel', _this._handlerWheel],\n ];\n return _this;\n }\n PinchZoom.prototype._handleDragStart = function (event) {\n this._ignoreNextClick = true;\n this.props.onDragStart();\n this._stopAnimation();\n this._resetInertia();\n this._lastDragPosition = null;\n this._hasInteraction = true;\n this._draggingPoint = this._offset;\n this._handleDrag(event);\n };\n PinchZoom.prototype._handleDrag = function (event) {\n var touch = this._getOffsetByFirstTouch(event);\n if (this._enoughToDrag()) {\n this._drag(touch, this._lastDragPosition);\n }\n else {\n this._virtualDrag(touch, this._lastDragPosition);\n }\n this._offset = this._sanitizeOffset(this._offset);\n this._lastDragPosition = touch;\n };\n PinchZoom.prototype._resetInertia = function () {\n this._velocity = null;\n this._prevDragMovePoint = null;\n };\n PinchZoom.prototype._realizeInertia = function () {\n var _this = this;\n var _a = this.props, inertiaFriction = _a.inertiaFriction, inertia = _a.inertia;\n if (!inertia || !this._velocity) {\n return;\n }\n var _b = this._velocity, x = _b.x, y = _b.y;\n if (x || y) {\n this._stopAnimation();\n this._resetInertia();\n var renderFrame = function () {\n x *= inertiaFriction;\n y *= inertiaFriction;\n if (!x && !y) {\n return _this._stopAnimation();\n }\n var prevOffset = __assign({}, _this._offset);\n _this._addOffset({ x: x, y: y });\n _this._offset = _this._sanitizeOffset(_this._offset);\n if (comparePoints(prevOffset, _this._offset)) {\n return _this._stopAnimation();\n }\n _this._update({ isAnimation: true });\n };\n this._animate(renderFrame, { duration: 9999 });\n }\n };\n PinchZoom.prototype._collectInertia = function (_a) {\n var touches = _a.touches;\n if (!this.props.inertia) {\n return;\n }\n var currentCoordinates = getPageCoordinatesByTouches(touches)[0];\n var prevPoint = this._prevDragMovePoint;\n if (prevPoint) {\n this._velocity = calculateVelocity(currentCoordinates, prevPoint);\n }\n this._prevDragMovePoint = currentCoordinates;\n };\n PinchZoom.prototype._handleDragEnd = function () {\n this.props.onDragEnd();\n this._end();\n this._realizeInertia();\n };\n PinchZoom.prototype._handleZoomStart = function () {\n this.props.onZoomStart();\n this._stopAnimation();\n this._lastScale = 1;\n this._nthZoom = 0;\n this._lastZoomCenter = null;\n this._hasInteraction = true;\n };\n PinchZoom.prototype._handleZoom = function (event, newScale) {\n var touchCenter = getVectorAvg(this._getOffsetTouches(event));\n var scale = newScale / this._lastScale;\n this._lastScale = newScale;\n // The first touch events are thrown away since they are not precise\n this._nthZoom += 1;\n if (this._nthZoom > 3) {\n this._scale(scale, touchCenter);\n this._drag(touchCenter, this._lastZoomCenter);\n if (this.props.enforceBoundsDuringZoom) {\n this._offset = this._sanitizeOffset(this._offset);\n }\n }\n this._lastZoomCenter = touchCenter;\n };\n PinchZoom.prototype._handleZoomEnd = function () {\n this.props.onZoomEnd();\n this._end();\n };\n PinchZoom.prototype._handleDoubleTap = function (event) {\n var _this = this;\n if (this._hasInteraction || this.props.tapZoomFactor === 0) {\n return;\n }\n var needZoomOut = (this.props.doubleTapZoomOutOnMaxScale &&\n this._zoomFactor === this.props.maxZoom) ||\n (this.props.doubleTapToggleZoom && this._zoomFactor > 1);\n this.props.onDoubleTap();\n this._ignoreNextClick = true;\n var zoomFactor = this._zoomFactor + this.props.tapZoomFactor;\n var startZoomFactor = this._zoomFactor;\n var updateProgress = function (progress) {\n _this._scaleTo(startZoomFactor + progress * (zoomFactor - startZoomFactor), center);\n };\n var center = this._getOffsetByFirstTouch(event);\n this._isDoubleTap = true;\n if (startZoomFactor > zoomFactor) {\n center = this._getCurrentZoomCenter();\n }\n needZoomOut ? this._zoomOutAnimation() : this._animate(updateProgress);\n };\n PinchZoom.prototype._computeInitialOffset = function () {\n var rect = this._getContainerRect();\n var _a = this._getChildSize(), width = _a.width, height = _a.height;\n var x = -abs(width * this._getInitialZoomFactor() - rect.width) / 2;\n var y = -abs(height * this._getInitialZoomFactor() - rect.height) / 2;\n this._initialOffset = { x: x, y: y };\n };\n PinchZoom.prototype._resetOffset = function () {\n this._offset = __assign({}, this._initialOffset);\n };\n PinchZoom.prototype._setupOffsets = function () {\n if (this.props.setOffsetsOnce && this._isOffsetsSet) {\n return;\n }\n this._isOffsetsSet = true;\n this._computeInitialOffset();\n this._resetOffset();\n };\n PinchZoom.prototype._sanitizeOffset = function (offset) {\n var rect = this._getContainerRect();\n var _a = this._getChildSize(), width = _a.width, height = _a.height;\n var elWidth = width * this._getInitialZoomFactor() * this._zoomFactor;\n var elHeight = height * this._getInitialZoomFactor() * this._zoomFactor;\n var _b = getOffsetBounds({\n containerDimension: rect.width,\n childDimension: elWidth,\n padding: this.props.horizontalPadding,\n centerContained: this.props.centerContained,\n }), minOffsetX = _b[0], maxOffsetX = _b[1];\n var _c = getOffsetBounds({\n containerDimension: rect.height,\n childDimension: elHeight,\n padding: this.props.verticalPadding,\n centerContained: this.props.centerContained,\n }), minOffsetY = _c[0], maxOffsetY = _c[1];\n return {\n x: clamp(minOffsetX, maxOffsetX, offset.x),\n y: clamp(minOffsetY, maxOffsetY, offset.y),\n };\n };\n PinchZoom.prototype.alignCenter = function (options) {\n var _this = this;\n var _a = __assign({ duration: 250, animated: true }, options), __x = _a.x, __y = _a.y, scale = _a.scale, animated = _a.animated, duration = _a.duration;\n // Bug-Fix: https://github.com/retyui/react-quick-pinch-zoom/issues/58\n var x = __x * this._initialZoomFactor;\n var y = __y * this._initialZoomFactor;\n var startZoomFactor = this._zoomFactor;\n var startOffset = __assign({}, this._offset);\n var rect = this._getContainerRect();\n var containerCenter = { x: rect.width / 2, y: rect.height / 2 };\n this._zoomFactor = 1;\n this._offset = { x: -(containerCenter.x - x), y: -(containerCenter.y - y) };\n this._scaleTo(scale, containerCenter);\n this._stopAnimation();\n if (!animated) {\n return this._update();\n }\n var diffZoomFactor = this._zoomFactor - startZoomFactor;\n var diffOffset = {\n x: this._offset.x - startOffset.x,\n y: this._offset.y - startOffset.y,\n };\n this._zoomFactor = startZoomFactor;\n this._offset = __assign({}, startOffset);\n var updateFrame = function (progress) {\n var x = startOffset.x + diffOffset.x * progress;\n var y = startOffset.y + diffOffset.y * progress;\n _this._zoomFactor = startZoomFactor + diffZoomFactor * progress;\n _this._offset = _this._sanitizeOffset({ x: x, y: y });\n _this._update();\n };\n this._animate(updateFrame, {\n callback: function () { return _this._sanitize(); },\n duration: duration,\n });\n };\n PinchZoom.prototype.scaleTo = function (options) {\n var _this = this;\n var _a = __assign({ duration: 250, animated: true }, options), x = _a.x, y = _a.y, scale = _a.scale, animated = _a.animated, duration = _a.duration;\n var startZoomFactor = this._zoomFactor;\n var startOffset = __assign({}, this._offset);\n this._zoomFactor = 1;\n this._offset = { x: 0, y: 0 };\n this._scaleTo(scale, { x: x, y: y });\n this._stopAnimation();\n if (!animated) {\n return this._update();\n }\n var diffZoomFactor = this._zoomFactor - startZoomFactor;\n var diffOffset = {\n x: this._offset.x - startOffset.x,\n y: this._offset.y - startOffset.y,\n };\n this._zoomFactor = startZoomFactor;\n this._offset = __assign({}, startOffset);\n var updateFrame = function (progress) {\n var x = startOffset.x + diffOffset.x * progress;\n var y = startOffset.y + diffOffset.y * progress;\n _this._zoomFactor = startZoomFactor + diffZoomFactor * progress;\n _this._offset = { x: x, y: y };\n _this._update();\n };\n this._animate(updateFrame, { callback: function () { return _this._sanitize(); }, duration: duration });\n };\n PinchZoom.prototype._scaleTo = function (zoomFactor, center) {\n this._scale(zoomFactor / this._zoomFactor, center);\n this._offset = this._sanitizeOffset(this._offset);\n };\n PinchZoom.prototype._scale = function (scale, center) {\n scale = this._scaleZoomFactor(scale);\n this._addOffset({\n x: (scale - 1) * (center.x + this._offset.x),\n y: (scale - 1) * (center.y + this._offset.y),\n });\n this.props.onZoomUpdate();\n };\n PinchZoom.prototype._scaleZoomFactor = function (scale) {\n var originalZoomFactor = this._zoomFactor;\n this._zoomFactor *= scale;\n this._zoomFactor = clamp(this.props.minZoom, this.props.maxZoom, this._zoomFactor);\n return this._zoomFactor / originalZoomFactor;\n };\n PinchZoom.prototype._canDrag = function () {\n return this.props.draggableUnZoomed || !isCloseTo(this._zoomFactor, 1);\n };\n PinchZoom.prototype._drag = function (center, lastCenter) {\n if (lastCenter) {\n var y = -(center.y - lastCenter.y);\n var x = -(center.x - lastCenter.x);\n if (!this.props.lockDragAxis) {\n this._addOffset({\n x: x,\n y: y,\n });\n }\n else {\n // lock scroll to position that was changed the most\n if (abs(x) > abs(y)) {\n this._addOffset({\n x: x,\n y: 0,\n });\n }\n else {\n this._addOffset({\n y: y,\n x: 0,\n });\n }\n }\n this.props.onDragUpdate();\n }\n };\n PinchZoom.prototype._virtualDrag = function (center, lastCenter) {\n if (lastCenter) {\n var y = -(center.y - lastCenter.y);\n var x = -(center.x - lastCenter.x);\n this._draggingPoint = {\n x: x + this._draggingPoint.x,\n y: y + this._draggingPoint.y,\n };\n }\n };\n PinchZoom.prototype._addOffset = function (offset) {\n var _a = this._offset, x = _a.x, y = _a.y;\n this._offset = {\n x: x + offset.x,\n y: y + offset.y,\n };\n };\n PinchZoom.prototype._sanitize = function () {\n if (this._zoomFactor < this.props.zoomOutFactor) {\n this._resetInertia();\n this._zoomOutAnimation();\n }\n else if (this._isInsaneOffset()) {\n this._sanitizeOffsetAnimation();\n }\n };\n PinchZoom.prototype._isInsaneOffset = function () {\n var offset = this._offset;\n var sanitizedOffset = this._sanitizeOffset(offset);\n return sanitizedOffset.x !== offset.x || sanitizedOffset.y !== offset.y;\n };\n PinchZoom.prototype._sanitizeOffsetAnimation = function () {\n var _this = this;\n var targetOffset = this._sanitizeOffset(this._offset);\n var startOffset = __assign({}, this._offset);\n var updateProgress = function (progress) {\n var x = startOffset.x + progress * (targetOffset.x - startOffset.x);\n var y = startOffset.y + progress * (targetOffset.y - startOffset.y);\n _this._offset = { x: x, y: y };\n _this._update();\n };\n this._animate(updateProgress);\n };\n PinchZoom.prototype._zoomOutAnimation = function () {\n var _this = this;\n if (this._zoomFactor === 1) {\n return;\n }\n var startZoomFactor = this._zoomFactor;\n var zoomFactor = 1;\n var center = this._getCurrentZoomCenter();\n var updateProgress = function (progress) {\n var scaleFactor = startZoomFactor + progress * (zoomFactor - startZoomFactor);\n _this._scaleTo(scaleFactor, center);\n };\n this._animate(updateProgress);\n };\n PinchZoom.prototype._getInitialZoomFactor = function () {\n return this._initialZoomFactor;\n };\n PinchZoom.prototype._getCurrentZoomCenter = function () {\n var _a = this._offset, x = _a.x, y = _a.y;\n var offsetLeft = x - this._initialOffset.x;\n var offsetTop = y - this._initialOffset.y;\n return {\n x: -1 * x - offsetLeft / (1 / this._zoomFactor - 1),\n y: -1 * y - offsetTop / (1 / this._zoomFactor - 1),\n };\n };\n PinchZoom.prototype._getOffsetByFirstTouch = function (event) {\n return this._getOffsetTouches(event)[0];\n };\n PinchZoom.prototype._getOffsetTouches = function (event) {\n var _document = this.props._document;\n var _html = _document.documentElement;\n var _body = _document.body;\n var _a = this._getContainerRect(), top = _a.top, left = _a.left;\n var scrollTop = _html.scrollTop || _body.scrollTop;\n var scrollLeft = _html.scrollLeft || _body.scrollLeft;\n var posTop = top + scrollTop;\n var posLeft = left + scrollLeft;\n return getPageCoordinatesByTouches(event.touches).map(function (_a) {\n var x = _a.x, y = _a.y;\n return ({\n x: x - posLeft,\n y: y - posTop,\n });\n });\n };\n PinchZoom.prototype._animate = function (frameFn, options) {\n var _this = this;\n var startTime = new Date().getTime();\n var _a = __assign({ timeFn: swing, callback: function () { }, duration: this.props.animationDuration }, options), timeFn = _a.timeFn, callback = _a.callback, duration = _a.duration;\n var renderFrame = function () {\n if (!_this._inAnimation) {\n return;\n }\n var frameTime = new Date().getTime() - startTime;\n var progress = frameTime / duration;\n if (frameTime >= duration) {\n frameFn(1);\n _this._stopAnimation();\n callback();\n _this._update();\n }\n else {\n progress = timeFn(progress);\n frameFn(progress);\n _this._update({ isAnimation: true });\n requestAnimationFrame(renderFrame);\n }\n };\n this._inAnimation = true;\n requestAnimationFrame(renderFrame);\n };\n PinchZoom.prototype._stopAnimation = function () {\n this._inAnimation = false;\n };\n PinchZoom.prototype._end = function () {\n this._hasInteraction = false;\n this._sanitize();\n this._update();\n };\n PinchZoom.prototype._getContainerRect = function () {\n var div = this._containerRef.current;\n return div.getBoundingClientRect();\n };\n PinchZoom.prototype._getChildSize = function () {\n var div = this._containerRef.current;\n return getElementSize(div === null || div === void 0 ? void 0 : div.firstElementChild);\n };\n PinchZoom.prototype._updateInitialZoomFactor = function () {\n var rect = this._getContainerRect();\n var size = this._getChildSize();\n var xZoomFactor = rect.width / size.width;\n var yZoomFactor = rect.height / size.height;\n this._initialZoomFactor = min(xZoomFactor, yZoomFactor);\n };\n PinchZoom.prototype._bindEvents = function () {\n var _this = this;\n var div = this._containerRef.current;\n if (window.ResizeObserver) {\n this._containerObserver = new ResizeObserver(this._onResize);\n this._containerObserver.observe(div);\n }\n else {\n window.addEventListener('resize', this._onResize);\n }\n this._handlers.forEach(function (_a) {\n var eventName = _a[0], fn = _a[1], target = _a[2];\n (target || div).addEventListener(eventName, fn, true);\n });\n Array.from(div.querySelectorAll('img')).forEach(function (img) {\n return img.addEventListener('load', _this._onResize);\n });\n };\n PinchZoom.prototype._unSubscribe = function () {\n var _this = this;\n var div = this._containerRef.current;\n if (this._containerObserver) {\n this._containerObserver.disconnect();\n this._containerObserver = null;\n }\n window.removeEventListener('resize', this._onResize);\n this._handlers.forEach(function (_a) {\n var eventName = _a[0], fn = _a[1], target = _a[2];\n (target || div).removeEventListener(eventName, fn, true);\n });\n Array.from(div.querySelectorAll('img')).forEach(function (img) {\n return img.removeEventListener('load', _this._onResize);\n });\n };\n PinchZoom.prototype._update = function (options) {\n var _this = this;\n if (this._updatePlaned) {\n return;\n }\n var updateFrame = function () {\n var scale = _this._getInitialZoomFactor() * _this._zoomFactor;\n var x = -_this._offset.x / scale;\n var y = -_this._offset.y / scale;\n _this.props.onUpdate({ scale: scale, x: x, y: y });\n };\n if (options === null || options === void 0 ? void 0 : options.isAnimation) {\n return updateFrame();\n }\n this._updatePlaned = true;\n requestAnimationFrame(function () {\n _this._updatePlaned = false;\n updateFrame();\n });\n };\n PinchZoom.prototype._handlerIfEnable = function (fn) {\n var _this = this;\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (_this.props.enabled) {\n fn.apply(void 0, args);\n }\n };\n };\n PinchZoom.prototype._setInteraction = function (newInteraction, event) {\n var interaction = this._interaction;\n if (interaction !== newInteraction) {\n if (interaction && !newInteraction) {\n if (isZoomInteraction(interaction)) {\n this._handleZoomEnd();\n }\n else if (isDragInteraction(interaction)) {\n this._handleDragEnd();\n }\n }\n if (isZoomInteraction(newInteraction)) {\n this._handleZoomStart();\n }\n else if (isDragInteraction(newInteraction)) {\n this._handleDragStart(event);\n }\n }\n this._interaction = newInteraction;\n };\n PinchZoom.prototype._distanceBetweenNumbers = function (a, b) {\n return a > b ? a - b : b - a;\n };\n PinchZoom.prototype._enoughToDrag = function () {\n if (this._distanceBetweenNumbers(this._startOffset.x, this._draggingPoint.x) >\n 5 ||\n this._distanceBetweenNumbers(this._startOffset.y, this._draggingPoint.y) >\n 5)\n return true;\n return false;\n };\n PinchZoom.prototype._updateInteraction = function (event) {\n var fingers = this._fingers;\n if (fingers === 2) {\n return this._setInteraction('zoom', event);\n }\n if (fingers === 1 && this._canDrag()) {\n return this._setInteraction('drag', event);\n }\n this._setInteraction(null, event);\n };\n PinchZoom.prototype._detectDoubleTap = function (event) {\n var time = new Date().getTime();\n if (this._fingers > 1) {\n this._lastTouchStart = 0;\n }\n if (time - this._lastTouchStart < 300) {\n cancelEvent(event);\n this._handleDoubleTap(event);\n if (isZoomInteraction(this._interaction)) {\n this._handleZoomEnd();\n }\n else if (isDragInteraction(this._interaction)) {\n this._handleDragEnd();\n }\n }\n else {\n this._isDoubleTap = false;\n }\n if (this._fingers === 1) {\n this._lastTouchStart = time;\n }\n };\n PinchZoom.prototype.simulate = function (fn) {\n var _this = this;\n return function (mouseEvent) {\n var pageX = mouseEvent.pageX, pageY = mouseEvent.pageY, type = mouseEvent.type;\n var isEnd = type === 'mouseup';\n var isStart = type === 'mousedown';\n if (isStart) {\n mouseEvent.preventDefault();\n _this._listenMouseMove = true;\n }\n if (_this._listenMouseMove) {\n // @ts-ignore\n mouseEvent.touches = isEnd ? [] : [{ pageX: pageX, pageY: pageY }];\n fn(\n // @ts-ignore\n mouseEvent);\n }\n if (isEnd) {\n _this._listenMouseMove = false;\n }\n };\n };\n PinchZoom.prototype.componentDidMount = function () {\n this._bindEvents();\n this._update();\n };\n PinchZoom.prototype.componentWillUnmount = function () {\n this._stopAnimation();\n this._unSubscribe();\n };\n PinchZoom.prototype.render = function () {\n var _a = this.props, children = _a.children, containerProps = _a.containerProps;\n var child = Children.only(children);\n var props = containerProps || {};\n return (React.createElement(React.Fragment, null,\n React.createElement(\"style\", null, styles),\n React.createElement(\"div\", __assign({}, props, { ref: this._containerRef, className: classnames(styleRoot, props.className) }), cloneElement(child, {\n className: classnames(styleChild, child.props.className),\n }))));\n };\n PinchZoom.defaultProps = {\n animationDuration: 250,\n draggableUnZoomed: true,\n enforceBoundsDuringZoom: false,\n centerContained: false,\n enabled: true,\n inertia: true,\n inertiaFriction: 0.96,\n horizontalPadding: 0,\n isTouch: isTouch,\n lockDragAxis: false,\n maxZoom: 5,\n minZoom: 0.5,\n onDoubleTap: noup,\n onDragEnd: noup,\n onDragStart: noup,\n onDragUpdate: noup,\n onZoomEnd: noup,\n onZoomStart: noup,\n onZoomUpdate: noup,\n setOffsetsOnce: false,\n shouldInterceptWheel: shouldInterceptWheel,\n shouldCancelHandledTouchEndEvents: false,\n tapZoomFactor: 1,\n verticalPadding: 0,\n wheelScaleFactor: 1500,\n zoomOutFactor: 1.3,\n doubleTapZoomOutOnMaxScale: false,\n doubleTapToggleZoom: false,\n // @ts-expect-error\n _document: isSsr ? null : window.document,\n };\n return PinchZoom;\n}(Component));\nif (process.env.NODE_ENV !== 'production') {\n var _a = require('prop-types'), any = _a.any, element = _a.element, object = _a.object, number = _a.number, func = _a.func, bool = _a.bool;\n // @ts-ignore\n PinchZoom.propTypes = {\n children: element,\n containerProps: object,\n wheelScaleFactor: number,\n animationDuration: number,\n draggableUnZoomed: bool,\n enforceBoundsDuringZoom: bool,\n centerContained: bool,\n enabled: bool,\n horizontalPadding: number,\n lockDragAxis: bool,\n onUpdate: func.isRequired,\n maxZoom: number,\n minZoom: number,\n onDoubleTap: func,\n onDragEnd: func,\n onDragStart: func,\n onDragUpdate: func,\n onZoomEnd: func,\n onZoomStart: func,\n onZoomUpdate: func,\n setOffsetsOnce: bool,\n tapZoomFactor: number,\n verticalPadding: number,\n zoomOutFactor: number,\n doubleTapZoomOutOnMaxScale: bool,\n doubleTapToggleZoom: bool,\n isTouch: func,\n _document: any,\n };\n}\nexport default PinchZoom;\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 { memo } from 'preact/compat';\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 const [hasNaturalAspectRatio, setHasNaturalAspectRatio] = useState(undefined);\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 || undefined}\n data-has-natural-aspect-ratio={hasNaturalAspectRatio || undefined}\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 const $media = e.target.closest('.media');\n if (!hasDimensions && $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('--height', `${naturalHeight}px`);\n $media.style.aspectRatio = `${naturalWidth}/${naturalHeight}`;\n }\n\n // Check natural aspect ratio vs display aspect ratio\n if ($media) {\n const {\n clientWidth,\n clientHeight,\n naturalWidth,\n naturalHeight,\n } = e.target;\n if (\n clientWidth &&\n clientHeight &&\n naturalWidth &&\n naturalHeight\n ) {\n const minDimension = 88;\n if (\n naturalWidth < minDimension ||\n naturalHeight < minDimension\n ) {\n $media.dataset.hasSmallDimension = true;\n } else {\n const displayNaturalHeight =\n (naturalHeight * clientWidth) / naturalWidth;\n const almostSimilarHeight =\n Math.abs(displayNaturalHeight - clientHeight) < 5;\n\n if (almostSimilarHeight) {\n setHasNaturalAspectRatio(true);\n }\n }\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 ${loopable ? 'loop' : ''}\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 const videoHTML = `\n <video\n src=\"${url}\"\n poster=\"${previewUrl}\"\n width=\"${width}\"\n height=\"${height}\"\n data-orientation=\"${orientation}\"\n preload=\"auto\"\n autoplay\n playsinline\n ${loopable ? 'loop' : ''}\n controls\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={\n isGIF && !showOriginal && !autoGIFAnimate ? 'GIF' : undefined\n }\n data-has-alt={!showInlineDesc || undefined}\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\n class=\"video-container\"\n dangerouslySetInnerHTML={{ __html: videoHTML }}\n />\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 || undefined}\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 // Fake base URL if url doesn't have https:// prefix\n return URL.parse(url, location.origin);\n}\n\nexport default memo(Media, (oldProps, newProps) => {\n const oldMedia = oldProps.media || {};\n const newMedia = newProps.media || {};\n\n return (\n oldMedia?.id === newMedia?.id &&\n oldMedia.url === newMedia.url &&\n oldProps.to === newProps.to &&\n oldProps.class === newProps.class\n );\n});\n","import './status.css';\nimport '@justinribeiro/lite-youtube';\n\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 pThrottle from 'p-throttle';\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 MenuConfirm from '../components/menu-confirm';\nimport Menu2 from '../components/menu2';\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 isRTL from '../utils/is-rtl';\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, { 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\nconst throttle = pThrottle({\n limit: 1,\n interval: 1000,\n});\nfunction fetchAccount(id, masto) {\n return masto.v1.accounts.$select(id).fetch();\n}\nconst memFetchAccount = pmem(throttle(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 pinned,\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(pinned ? 'Unable to unpin post' : 'Unable to pin post');\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 (mediaAttachments.length > 1 &&\n (isSizeLarge || (withinContext && size === 'm')) ? (\n <div class=\"media-large-container\">\n {mediaAttachments.map((media, i) => (\n <div key={media.id} class={`media-container media-eq1`}>\n <Media\n media={media}\n autoAnimate\n showCaption\n allowLongerCaption={!content}\n lang={language}\n to={`/${instance}/s/${id}?${\n withinContext ? 'media' : 'media-only'\n }=${i + 1}`}\n onClick={\n onMediaClick\n ? (e) => onMediaClick(e, i, media, status)\n : undefined\n }\n />\n </div>\n ))}\n </div>\n ) : (\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(Math.abs(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:\n carouselRef.current.clientWidth *\n (currentIndex - 1) *\n (isRTL() ? -1 : 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:\n carouselRef.current.clientWidth *\n (currentIndex + 1) *\n (isRTL() ? -1 : 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 getDomain(url) {\n return punycode.toUnicode(\n URL.parse(url)\n .hostname.replace(/^www\\./, '')\n .replace(/\\/$/, ''),\n );\n}\n\n// \"Post\": Quote post + card link preview combo\n// Assume all links from these domains are \"posts\"\n// Mastodon links are \"posts\" too but they are converted to real quote posts and there's too many domains to check\n// This is just \"Progressive Enhancement\"\nfunction isCardPost(domain) {\n return ['x.com', 'twitter.com', 'threads.net', 'bsky.app'].includes(domain);\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 = getDomain(url);\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\n const isPost = isCardPost(domain);\n\n return (\n <a\n href={cardStatusURL || url}\n target={cardStatusURL ? null : '_blank'}\n rel=\"nofollow noopener noreferrer\"\n class={`card link ${isPost ? 'card-post' : ''} ${\n blurhashImage ? '' : size\n }`}\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 style={{\n '--anim-duration':\n width &&\n height &&\n `${Math.min(Math.max(Math.max(width, height) / 100, 5), 120)}s`,\n }}\n />\n </div>\n <div class=\"meta-container\" lang={language}>\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 = getDomain(url);\n const isPost = isCardPost(domain);\n return (\n <a\n href={cardStatusURL || url}\n target={cardStatusURL ? null : '_blank'}\n rel=\"nofollow noopener noreferrer\"\n class={`card link ${isPost ? 'card-post' : ''} no-image`}\n lang={language}\n dir=\"auto\"\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 ? URL.parse(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 dir=\"auto\"\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 dir=\"auto\"\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 = URL.parse(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","var IDX=36, HEX='';\nwhile (IDX--) HEX += IDX.toString(36);\n\nexport function uid(len) {\n\tvar str='', num = len || 11;\n\twhile (num--) str += HEX[Math.random() * 36 | 0];\n\treturn str;\n}\n","/**\n * Fuse.js v7.0.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2023 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfunction isArray(value) {\n return !Array.isArray\n ? getTag(value) === '[object Array]'\n : Array.isArray(value)\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nconst INFINITY = 1 / 0;\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value\n }\n let result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result\n}\n\nfunction toString(value) {\n return value == null ? '' : baseToString(value)\n}\n\nfunction isString(value) {\n return typeof value === 'string'\n}\n\nfunction isNumber(value) {\n return typeof value === 'number'\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n return (\n value === true ||\n value === false ||\n (isObjectLike(value) && getTag(value) == '[object Boolean]')\n )\n}\n\nfunction isObject(value) {\n return typeof value === 'object'\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n return isObject(value) && value !== null\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null\n}\n\nfunction isBlank(value) {\n return !value.trim().length\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n return value == null\n ? value === undefined\n ? '[object Undefined]'\n : '[object Null]'\n : Object.prototype.toString.call(value)\n}\n\nconst EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\n\nconst INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\n\nconst LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) =>\n `Invalid value for key ${key}`;\n\nconst PATTERN_LENGTH_TOO_LARGE = (max) =>\n `Pattern length exceeds max of ${max}.`;\n\nconst MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;\n\nconst INVALID_KEY_WEIGHT_VALUE = (key) =>\n `Property 'weight' in key '${key}' must be a positive integer`;\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nclass KeyStore {\n constructor(keys) {\n this._keys = [];\n this._keyMap = {};\n\n let totalWeight = 0;\n\n keys.forEach((key) => {\n let obj = createKey(key);\n\n this._keys.push(obj);\n this._keyMap[obj.id] = obj;\n\n totalWeight += obj.weight;\n });\n\n // Normalize weights so that their sum is equal to 1\n this._keys.forEach((key) => {\n key.weight /= totalWeight;\n });\n }\n get(keyId) {\n return this._keyMap[keyId]\n }\n keys() {\n return this._keys\n }\n toJSON() {\n return JSON.stringify(this._keys)\n }\n}\n\nfunction createKey(key) {\n let path = null;\n let id = null;\n let src = null;\n let weight = 1;\n let getFn = null;\n\n if (isString(key) || isArray(key)) {\n src = key;\n path = createKeyPath(key);\n id = createKeyId(key);\n } else {\n if (!hasOwn.call(key, 'name')) {\n throw new Error(MISSING_KEY_PROPERTY('name'))\n }\n\n const name = key.name;\n src = name;\n\n if (hasOwn.call(key, 'weight')) {\n weight = key.weight;\n\n if (weight <= 0) {\n throw new Error(INVALID_KEY_WEIGHT_VALUE(name))\n }\n }\n\n path = createKeyPath(name);\n id = createKeyId(name);\n getFn = key.getFn;\n }\n\n return { path, id, weight, src, getFn }\n}\n\nfunction createKeyPath(key) {\n return isArray(key) ? key : key.split('.')\n}\n\nfunction createKeyId(key) {\n return isArray(key) ? key.join('.') : key\n}\n\nfunction get(obj, path) {\n let list = [];\n let arr = false;\n\n const deepGet = (obj, path, index) => {\n if (!isDefined(obj)) {\n return\n }\n if (!path[index]) {\n // If there's no path left, we've arrived at the object we care about.\n list.push(obj);\n } else {\n let key = path[index];\n\n const value = obj[key];\n\n if (!isDefined(value)) {\n return\n }\n\n // If we're at the last value in the path, and if it's a string/number/bool,\n // add it to the list\n if (\n index === path.length - 1 &&\n (isString(value) || isNumber(value) || isBoolean(value))\n ) {\n list.push(toString(value));\n } else if (isArray(value)) {\n arr = true;\n // Search each item in the array.\n for (let i = 0, len = value.length; i < len; i += 1) {\n deepGet(value[i], path, index + 1);\n }\n } else if (path.length) {\n // An object. Recurse further.\n deepGet(value, path, index + 1);\n }\n }\n };\n\n // Backwards compatibility (since path used to be a string)\n deepGet(obj, isString(path) ? path.split('.') : path, 0);\n\n return arr ? list : list[0]\n}\n\nconst MatchOptions = {\n // Whether the matches should be included in the result set. When `true`, each record in the result\n // set will include the indices of the matched characters.\n // These can consequently be used for highlighting purposes.\n includeMatches: false,\n // When `true`, the matching function will continue to the end of a search pattern even if\n // a perfect match has already been located in the string.\n findAllMatches: false,\n // Minimum number of characters that must be matched before a result is considered a match\n minMatchCharLength: 1\n};\n\nconst BasicOptions = {\n // When `true`, the algorithm continues searching to the end of the input even if a perfect\n // match is found before the end of the same input.\n isCaseSensitive: false,\n // When true, the matching function will continue to the end of a search pattern even if\n includeScore: false,\n // List of properties that will be searched. This also supports nested properties.\n keys: [],\n // Whether to sort the result list, by score\n shouldSort: true,\n // Default sort function: sort by ascending score, ascending index\n sortFn: (a, b) =>\n a.score === b.score ? (a.idx < b.idx ? -1 : 1) : a.score < b.score ? -1 : 1\n};\n\nconst FuzzyOptions = {\n // Approximately where in the text is the pattern expected to be found?\n location: 0,\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n // (of both letters and location), a threshold of '1.0' would match anything.\n threshold: 0.6,\n // Determines how close the match must be to the fuzzy location (specified above).\n // An exact letter match which is 'distance' characters away from the fuzzy location\n // would score as a complete mismatch. A distance of '0' requires the match be at\n // the exact location specified, a threshold of '1000' would require a perfect match\n // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n distance: 100\n};\n\nconst AdvancedOptions = {\n // When `true`, it enables the use of unix-like search commands\n useExtendedSearch: false,\n // The get function to use when fetching an object's properties.\n // The default will search nested paths *ie foo.bar.baz*\n getFn: get,\n // When `true`, search will ignore `location` and `distance`, so it won't matter\n // where in the string the pattern appears.\n // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n ignoreLocation: false,\n // When `true`, the calculation for the relevance score (used for sorting) will\n // ignore the field-length norm.\n // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n ignoreFieldNorm: false,\n // The weight to determine how much field length norm effects scoring.\n fieldNormWeight: 1\n};\n\nvar Config = {\n ...BasicOptions,\n ...MatchOptions,\n ...FuzzyOptions,\n ...AdvancedOptions\n};\n\nconst SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm(weight = 1, mantissa = 3) {\n const cache = new Map();\n const m = Math.pow(10, mantissa);\n\n return {\n get(value) {\n const numTokens = value.match(SPACE).length;\n\n if (cache.has(numTokens)) {\n return cache.get(numTokens)\n }\n\n // Default function is 1/sqrt(x), weight makes that variable\n const norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n // In place of `toFixed(mantissa)`, for faster computation\n const n = parseFloat(Math.round(norm * m) / m);\n\n cache.set(numTokens, n);\n\n return n\n },\n clear() {\n cache.clear();\n }\n }\n}\n\nclass FuseIndex {\n constructor({\n getFn = Config.getFn,\n fieldNormWeight = Config.fieldNormWeight\n } = {}) {\n this.norm = norm(fieldNormWeight, 3);\n this.getFn = getFn;\n this.isCreated = false;\n\n this.setIndexRecords();\n }\n setSources(docs = []) {\n this.docs = docs;\n }\n setIndexRecords(records = []) {\n this.records = records;\n }\n setKeys(keys = []) {\n this.keys = keys;\n this._keysMap = {};\n keys.forEach((key, idx) => {\n this._keysMap[key.id] = idx;\n });\n }\n create() {\n if (this.isCreated || !this.docs.length) {\n return\n }\n\n this.isCreated = true;\n\n // List is Array<String>\n if (isString(this.docs[0])) {\n this.docs.forEach((doc, docIndex) => {\n this._addString(doc, docIndex);\n });\n } else {\n // List is Array<Object>\n this.docs.forEach((doc, docIndex) => {\n this._addObject(doc, docIndex);\n });\n }\n\n this.norm.clear();\n }\n // Adds a doc to the end of the index\n add(doc) {\n const idx = this.size();\n\n if (isString(doc)) {\n this._addString(doc, idx);\n } else {\n this._addObject(doc, idx);\n }\n }\n // Removes the doc at the specified index of the index\n removeAt(idx) {\n this.records.splice(idx, 1);\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1;\n }\n }\n getValueForItemAtKeyId(item, keyId) {\n return item[this._keysMap[keyId]]\n }\n size() {\n return this.records.length\n }\n _addString(doc, docIndex) {\n if (!isDefined(doc) || isBlank(doc)) {\n return\n }\n\n let record = {\n v: doc,\n i: docIndex,\n n: this.norm.get(doc)\n };\n\n this.records.push(record);\n }\n _addObject(doc, docIndex) {\n let record = { i: docIndex, $: {} };\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n this.keys.forEach((key, keyIndex) => {\n let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);\n\n if (!isDefined(value)) {\n return\n }\n\n if (isArray(value)) {\n let subRecords = [];\n const stack = [{ nestedArrIndex: -1, value }];\n\n while (stack.length) {\n const { nestedArrIndex, value } = stack.pop();\n\n if (!isDefined(value)) {\n continue\n }\n\n if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n i: nestedArrIndex,\n n: this.norm.get(value)\n };\n\n subRecords.push(subRecord);\n } else if (isArray(value)) {\n value.forEach((item, k) => {\n stack.push({\n nestedArrIndex: k,\n value: item\n });\n });\n } else ;\n }\n record.$[keyIndex] = subRecords;\n } else if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n n: this.norm.get(value)\n };\n\n record.$[keyIndex] = subRecord;\n }\n });\n\n this.records.push(record);\n }\n toJSON() {\n return {\n keys: this.keys,\n records: this.records\n }\n }\n}\n\nfunction createIndex(\n keys,\n docs,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys.map(createKey));\n myIndex.setSources(docs);\n myIndex.create();\n return myIndex\n}\n\nfunction parseIndex(\n data,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const { keys, records } = data;\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys);\n myIndex.setIndexRecords(records);\n return myIndex\n}\n\nfunction computeScore$1(\n pattern,\n {\n errors = 0,\n currentLocation = 0,\n expectedLocation = 0,\n distance = Config.distance,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n const accuracy = errors / pattern.length;\n\n if (ignoreLocation) {\n return accuracy\n }\n\n const proximity = Math.abs(expectedLocation - currentLocation);\n\n if (!distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n\n return accuracy + proximity / distance\n}\n\nfunction convertMaskToIndices(\n matchmask = [],\n minMatchCharLength = Config.minMatchCharLength\n) {\n let indices = [];\n let start = -1;\n let end = -1;\n let i = 0;\n\n for (let len = matchmask.length; i < len; i += 1) {\n let match = matchmask[i];\n if (match && start === -1) {\n start = i;\n } else if (!match && start !== -1) {\n end = i - 1;\n if (end - start + 1 >= minMatchCharLength) {\n indices.push([start, end]);\n }\n start = -1;\n }\n }\n\n // (i-1 - start) + 1 => i - start\n if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n indices.push([start, i - 1]);\n }\n\n return indices\n}\n\n// Machine word size\nconst MAX_BITS = 32;\n\nfunction search(\n text,\n pattern,\n patternAlphabet,\n {\n location = Config.location,\n distance = Config.distance,\n threshold = Config.threshold,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n includeMatches = Config.includeMatches,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n if (pattern.length > MAX_BITS) {\n throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))\n }\n\n const patternLen = pattern.length;\n // Set starting location at beginning text and initialize the alphabet.\n const textLen = text.length;\n // Handle the case when location > text.length\n const expectedLocation = Math.max(0, Math.min(location, textLen));\n // Highest score beyond which we give up.\n let currentThreshold = threshold;\n // Is there a nearby exact match? (speedup)\n let bestLocation = expectedLocation;\n\n // Performance: only computer matches when the minMatchCharLength > 1\n // OR if `includeMatches` is true.\n const computeMatches = minMatchCharLength > 1 || includeMatches;\n // A mask of the matches, used for building the indices\n const matchMask = computeMatches ? Array(textLen) : [];\n\n let index;\n\n // Get all exact matches, here for speed up\n while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n let score = computeScore$1(pattern, {\n currentLocation: index,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n currentThreshold = Math.min(score, currentThreshold);\n bestLocation = index + patternLen;\n\n if (computeMatches) {\n let i = 0;\n while (i < patternLen) {\n matchMask[index + i] = 1;\n i += 1;\n }\n }\n }\n\n // Reset the best location\n bestLocation = -1;\n\n let lastBitArr = [];\n let finalScore = 1;\n let binMax = patternLen + textLen;\n\n const mask = 1 << (patternLen - 1);\n\n for (let i = 0; i < patternLen; i += 1) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from the match location we can stray\n // at this error level.\n let binMin = 0;\n let binMid = binMax;\n\n while (binMin < binMid) {\n const score = computeScore$1(pattern, {\n errors: i,\n currentLocation: expectedLocation + binMid,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score <= currentThreshold) {\n binMin = binMid;\n } else {\n binMax = binMid;\n }\n\n binMid = Math.floor((binMax - binMin) / 2 + binMin);\n }\n\n // Use the result from this iteration as the maximum for the next.\n binMax = binMid;\n\n let start = Math.max(1, expectedLocation - binMid + 1);\n let finish = findAllMatches\n ? textLen\n : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n // Initialize the bit array\n let bitArr = Array(finish + 2);\n\n bitArr[finish + 1] = (1 << i) - 1;\n\n for (let j = finish; j >= start; j -= 1) {\n let currentLocation = j - 1;\n let charMatch = patternAlphabet[text.charAt(currentLocation)];\n\n if (computeMatches) {\n // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n matchMask[currentLocation] = +!!charMatch;\n }\n\n // First pass: exact match\n bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch;\n\n // Subsequent passes: fuzzy match\n if (i) {\n bitArr[j] |=\n ((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1 | lastBitArr[j + 1];\n }\n\n if (bitArr[j] & mask) {\n finalScore = computeScore$1(pattern, {\n errors: i,\n currentLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (finalScore <= currentThreshold) {\n // Indeed it is\n currentThreshold = finalScore;\n bestLocation = currentLocation;\n\n // Already passed `loc`, downhill from here on in.\n if (bestLocation <= expectedLocation) {\n break\n }\n\n // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n start = Math.max(1, 2 * expectedLocation - bestLocation);\n }\n }\n }\n\n // No hope for a (better) match at greater error levels.\n const score = computeScore$1(pattern, {\n errors: i + 1,\n currentLocation: expectedLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score > currentThreshold) {\n break\n }\n\n lastBitArr = bitArr;\n }\n\n const result = {\n isMatch: bestLocation >= 0,\n // Count exact matches (those with a score of 0) to be \"almost\" exact\n score: Math.max(0.001, finalScore)\n };\n\n if (computeMatches) {\n const indices = convertMaskToIndices(matchMask, minMatchCharLength);\n if (!indices.length) {\n result.isMatch = false;\n } else if (includeMatches) {\n result.indices = indices;\n }\n }\n\n return result\n}\n\nfunction createPatternAlphabet(pattern) {\n let mask = {};\n\n for (let i = 0, len = pattern.length; i < len; i += 1) {\n const char = pattern.charAt(i);\n mask[char] = (mask[char] || 0) | (1 << (len - i - 1));\n }\n\n return mask\n}\n\nclass BitapSearch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n this.options = {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n\n this.chunks = [];\n\n if (!this.pattern.length) {\n return\n }\n\n const addChunk = (pattern, startIndex) => {\n this.chunks.push({\n pattern,\n alphabet: createPatternAlphabet(pattern),\n startIndex\n });\n };\n\n const len = this.pattern.length;\n\n if (len > MAX_BITS) {\n let i = 0;\n const remainder = len % MAX_BITS;\n const end = len - remainder;\n\n while (i < end) {\n addChunk(this.pattern.substr(i, MAX_BITS), i);\n i += MAX_BITS;\n }\n\n if (remainder) {\n const startIndex = len - MAX_BITS;\n addChunk(this.pattern.substr(startIndex), startIndex);\n }\n } else {\n addChunk(this.pattern, 0);\n }\n }\n\n searchIn(text) {\n const { isCaseSensitive, includeMatches } = this.options;\n\n if (!isCaseSensitive) {\n text = text.toLowerCase();\n }\n\n // Exact match\n if (this.pattern === text) {\n let result = {\n isMatch: true,\n score: 0\n };\n\n if (includeMatches) {\n result.indices = [[0, text.length - 1]];\n }\n\n return result\n }\n\n // Otherwise, use Bitap algorithm\n const {\n location,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n ignoreLocation\n } = this.options;\n\n let allIndices = [];\n let totalScore = 0;\n let hasMatches = false;\n\n this.chunks.forEach(({ pattern, alphabet, startIndex }) => {\n const { isMatch, score, indices } = search(text, pattern, alphabet, {\n location: location + startIndex,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n includeMatches,\n ignoreLocation\n });\n\n if (isMatch) {\n hasMatches = true;\n }\n\n totalScore += score;\n\n if (isMatch && indices) {\n allIndices = [...allIndices, ...indices];\n }\n });\n\n let result = {\n isMatch: hasMatches,\n score: hasMatches ? totalScore / this.chunks.length : 1\n };\n\n if (hasMatches && includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n}\n\nclass BaseMatch {\n constructor(pattern) {\n this.pattern = pattern;\n }\n static isMultiMatch(pattern) {\n return getMatch(pattern, this.multiRegex)\n }\n static isSingleMatch(pattern) {\n return getMatch(pattern, this.singleRegex)\n }\n search(/*text*/) {}\n}\n\nfunction getMatch(pattern, exp) {\n const matches = pattern.match(exp);\n return matches ? matches[1] : null\n}\n\n// Token: 'file\n\nclass ExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'exact'\n }\n static get multiRegex() {\n return /^=\"(.*)\"$/\n }\n static get singleRegex() {\n return /^=(.*)$/\n }\n search(text) {\n const isMatch = text === this.pattern;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !fire\n\nclass InverseExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!(.*)$/\n }\n search(text) {\n const index = text.indexOf(this.pattern);\n const isMatch = index === -1;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: ^file\n\nclass PrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'prefix-exact'\n }\n static get multiRegex() {\n return /^\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^\\^(.*)$/\n }\n search(text) {\n const isMatch = text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !^fire\n\nclass InversePrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-prefix-exact'\n }\n static get multiRegex() {\n return /^!\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!\\^(.*)$/\n }\n search(text) {\n const isMatch = !text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: .file$\n\nclass SuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'suffix-exact'\n }\n static get multiRegex() {\n return /^\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^(.*)\\$$/\n }\n search(text) {\n const isMatch = text.endsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [text.length - this.pattern.length, text.length - 1]\n }\n }\n}\n\n// Token: !.file$\n\nclass InverseSuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-suffix-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^!(.*)\\$$/\n }\n search(text) {\n const isMatch = !text.endsWith(this.pattern);\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\nclass FuzzyMatch extends BaseMatch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n super(pattern);\n this._bitapSearch = new BitapSearch(pattern, {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n });\n }\n static get type() {\n return 'fuzzy'\n }\n static get multiRegex() {\n return /^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^(.*)$/\n }\n search(text) {\n return this._bitapSearch.searchIn(text)\n }\n}\n\n// Token: 'file\n\nclass IncludeMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'include'\n }\n static get multiRegex() {\n return /^'\"(.*)\"$/\n }\n static get singleRegex() {\n return /^'(.*)$/\n }\n search(text) {\n let location = 0;\n let index;\n\n const indices = [];\n const patternLen = this.pattern.length;\n\n // Get all exact matches\n while ((index = text.indexOf(this.pattern, location)) > -1) {\n location = index + patternLen;\n indices.push([index, location - 1]);\n }\n\n const isMatch = !!indices.length;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices\n }\n }\n}\n\n// ❗Order is important. DO NOT CHANGE.\nconst searchers = [\n ExactMatch,\n IncludeMatch,\n PrefixExactMatch,\n InversePrefixExactMatch,\n InverseSuffixExactMatch,\n SuffixExactMatch,\n InverseExactMatch,\n FuzzyMatch\n];\n\nconst searchersLen = searchers.length;\n\n// Regex to split by spaces, but keep anything in quotes together\nconst SPACE_RE = / +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;\nconst OR_TOKEN = '|';\n\n// Return a 2D array representation of the query, for simpler parsing.\n// Example:\n// \"^core go$ | rb$ | py$ xy$\" => [[\"^core\", \"go$\"], [\"rb$\"], [\"py$\", \"xy$\"]]\nfunction parseQuery(pattern, options = {}) {\n return pattern.split(OR_TOKEN).map((item) => {\n let query = item\n .trim()\n .split(SPACE_RE)\n .filter((item) => item && !!item.trim());\n\n let results = [];\n for (let i = 0, len = query.length; i < len; i += 1) {\n const queryItem = query[i];\n\n // 1. Handle multiple query match (i.e, once that are quoted, like `\"hello world\"`)\n let found = false;\n let idx = -1;\n while (!found && ++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isMultiMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n found = true;\n }\n }\n\n if (found) {\n continue\n }\n\n // 2. Handle single query matches (i.e, once that are *not* quoted)\n idx = -1;\n while (++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isSingleMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n break\n }\n }\n }\n\n return results\n })\n}\n\n// These extended matchers can return an array of matches, as opposed\n// to a singl match\nconst MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);\n\n/**\n * Command-like searching\n * ======================\n *\n * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,\n * search in a given text.\n *\n * Search syntax:\n *\n * | Token | Match type | Description |\n * | ----------- | -------------------------- | -------------------------------------- |\n * | `jscript` | fuzzy-match | Items that fuzzy match `jscript` |\n * | `=scheme` | exact-match | Items that are `scheme` |\n * | `'python` | include-match | Items that include `python` |\n * | `!ruby` | inverse-exact-match | Items that do not include `ruby` |\n * | `^java` | prefix-exact-match | Items that start with `java` |\n * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n * | `.js$` | suffix-exact-match | Items that end with `.js` |\n * | `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` |\n *\n * A single pipe character acts as an OR operator. For example, the following\n * query matches entries that start with `core` and end with either`go`, `rb`,\n * or`py`.\n *\n * ```\n * ^core go$ | rb$ | py$\n * ```\n */\nclass ExtendedSearch {\n constructor(\n pattern,\n {\n isCaseSensitive = Config.isCaseSensitive,\n includeMatches = Config.includeMatches,\n minMatchCharLength = Config.minMatchCharLength,\n ignoreLocation = Config.ignoreLocation,\n findAllMatches = Config.findAllMatches,\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance\n } = {}\n ) {\n this.query = null;\n this.options = {\n isCaseSensitive,\n includeMatches,\n minMatchCharLength,\n findAllMatches,\n ignoreLocation,\n location,\n threshold,\n distance\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n this.query = parseQuery(this.pattern, this.options);\n }\n\n static condition(_, options) {\n return options.useExtendedSearch\n }\n\n searchIn(text) {\n const query = this.query;\n\n if (!query) {\n return {\n isMatch: false,\n score: 1\n }\n }\n\n const { includeMatches, isCaseSensitive } = this.options;\n\n text = isCaseSensitive ? text : text.toLowerCase();\n\n let numMatches = 0;\n let allIndices = [];\n let totalScore = 0;\n\n // ORs\n for (let i = 0, qLen = query.length; i < qLen; i += 1) {\n const searchers = query[i];\n\n // Reset indices\n allIndices.length = 0;\n numMatches = 0;\n\n // ANDs\n for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {\n const searcher = searchers[j];\n const { isMatch, indices, score } = searcher.search(text);\n\n if (isMatch) {\n numMatches += 1;\n totalScore += score;\n if (includeMatches) {\n const type = searcher.constructor.type;\n if (MultiMatchSet.has(type)) {\n allIndices = [...allIndices, ...indices];\n } else {\n allIndices.push(indices);\n }\n }\n } else {\n totalScore = 0;\n numMatches = 0;\n allIndices.length = 0;\n break\n }\n }\n\n // OR condition, so if TRUE, return\n if (numMatches) {\n let result = {\n isMatch: true,\n score: totalScore / numMatches\n };\n\n if (includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n }\n\n // Nothing was matched\n return {\n isMatch: false,\n score: 1\n }\n }\n}\n\nconst registeredSearchers = [];\n\nfunction register(...args) {\n registeredSearchers.push(...args);\n}\n\nfunction createSearcher(pattern, options) {\n for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {\n let searcherClass = registeredSearchers[i];\n if (searcherClass.condition(pattern, options)) {\n return new searcherClass(pattern, options)\n }\n }\n\n return new BitapSearch(pattern, options)\n}\n\nconst LogicalOperator = {\n AND: '$and',\n OR: '$or'\n};\n\nconst KeyType = {\n PATH: '$path',\n PATTERN: '$val'\n};\n\nconst isExpression = (query) =>\n !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\n\nconst isPath = (query) => !!query[KeyType.PATH];\n\nconst isLeaf = (query) =>\n !isArray(query) && isObject(query) && !isExpression(query);\n\nconst convertToExplicit = (query) => ({\n [LogicalOperator.AND]: Object.keys(query).map((key) => ({\n [key]: query[key]\n }))\n});\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options, { auto = true } = {}) {\n const next = (query) => {\n let keys = Object.keys(query);\n\n const isQueryPath = isPath(query);\n\n if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n return next(convertToExplicit(query))\n }\n\n if (isLeaf(query)) {\n const key = isQueryPath ? query[KeyType.PATH] : keys[0];\n\n const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n\n if (!isString(pattern)) {\n throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key))\n }\n\n const obj = {\n keyId: createKeyId(key),\n pattern\n };\n\n if (auto) {\n obj.searcher = createSearcher(pattern, options);\n }\n\n return obj\n }\n\n let node = {\n children: [],\n operator: keys[0]\n };\n\n keys.forEach((key) => {\n const value = query[key];\n\n if (isArray(value)) {\n value.forEach((item) => {\n node.children.push(next(item));\n });\n }\n });\n\n return node\n };\n\n if (!isExpression(query)) {\n query = convertToExplicit(query);\n }\n\n return next(query)\n}\n\n// Practical scoring function\nfunction computeScore(\n results,\n { ignoreFieldNorm = Config.ignoreFieldNorm }\n) {\n results.forEach((result) => {\n let totalScore = 1;\n\n result.matches.forEach(({ key, norm, score }) => {\n const weight = key ? key.weight : null;\n\n totalScore *= Math.pow(\n score === 0 && weight ? Number.EPSILON : score,\n (weight || 1) * (ignoreFieldNorm ? 1 : norm)\n );\n });\n\n result.score = totalScore;\n });\n}\n\nfunction transformMatches(result, data) {\n const matches = result.matches;\n data.matches = [];\n\n if (!isDefined(matches)) {\n return\n }\n\n matches.forEach((match) => {\n if (!isDefined(match.indices) || !match.indices.length) {\n return\n }\n\n const { indices, value } = match;\n\n let obj = {\n indices,\n value\n };\n\n if (match.key) {\n obj.key = match.key.src;\n }\n\n if (match.idx > -1) {\n obj.refIndex = match.idx;\n }\n\n data.matches.push(obj);\n });\n}\n\nfunction transformScore(result, data) {\n data.score = result.score;\n}\n\nfunction format(\n results,\n docs,\n {\n includeMatches = Config.includeMatches,\n includeScore = Config.includeScore\n } = {}\n) {\n const transformers = [];\n\n if (includeMatches) transformers.push(transformMatches);\n if (includeScore) transformers.push(transformScore);\n\n return results.map((result) => {\n const { idx } = result;\n\n const data = {\n item: docs[idx],\n refIndex: idx\n };\n\n if (transformers.length) {\n transformers.forEach((transformer) => {\n transformer(result, data);\n });\n }\n\n return data\n })\n}\n\nclass Fuse {\n constructor(docs, options = {}, index) {\n this.options = { ...Config, ...options };\n\n if (\n this.options.useExtendedSearch &&\n !true\n ) {\n throw new Error(EXTENDED_SEARCH_UNAVAILABLE)\n }\n\n this._keyStore = new KeyStore(this.options.keys);\n\n this.setCollection(docs, index);\n }\n\n setCollection(docs, index) {\n this._docs = docs;\n\n if (index && !(index instanceof FuseIndex)) {\n throw new Error(INCORRECT_INDEX_TYPE)\n }\n\n this._myIndex =\n index ||\n createIndex(this.options.keys, this._docs, {\n getFn: this.options.getFn,\n fieldNormWeight: this.options.fieldNormWeight\n });\n }\n\n add(doc) {\n if (!isDefined(doc)) {\n return\n }\n\n this._docs.push(doc);\n this._myIndex.add(doc);\n }\n\n remove(predicate = (/* doc, idx */) => false) {\n const results = [];\n\n for (let i = 0, len = this._docs.length; i < len; i += 1) {\n const doc = this._docs[i];\n if (predicate(doc, i)) {\n this.removeAt(i);\n i -= 1;\n len -= 1;\n\n results.push(doc);\n }\n }\n\n return results\n }\n\n removeAt(idx) {\n this._docs.splice(idx, 1);\n this._myIndex.removeAt(idx);\n }\n\n getIndex() {\n return this._myIndex\n }\n\n search(query, { limit = -1 } = {}) {\n const {\n includeMatches,\n includeScore,\n shouldSort,\n sortFn,\n ignoreFieldNorm\n } = this.options;\n\n let results = isString(query)\n ? isString(this._docs[0])\n ? this._searchStringList(query)\n : this._searchObjectList(query)\n : this._searchLogical(query);\n\n computeScore(results, { ignoreFieldNorm });\n\n if (shouldSort) {\n results.sort(sortFn);\n }\n\n if (isNumber(limit) && limit > -1) {\n results = results.slice(0, limit);\n }\n\n return format(results, this._docs, {\n includeMatches,\n includeScore\n })\n }\n\n _searchStringList(query) {\n const searcher = createSearcher(query, this.options);\n const { records } = this._myIndex;\n const results = [];\n\n // Iterate over every string in the index\n records.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n results.push({\n item: text,\n idx,\n matches: [{ score, value: text, norm, indices }]\n });\n }\n });\n\n return results\n }\n\n _searchLogical(query) {\n\n const expression = parse(query, this.options);\n\n const evaluate = (node, item, idx) => {\n if (!node.children) {\n const { keyId, searcher } = node;\n\n const matches = this._findMatches({\n key: this._keyStore.get(keyId),\n value: this._myIndex.getValueForItemAtKeyId(item, keyId),\n searcher\n });\n\n if (matches && matches.length) {\n return [\n {\n idx,\n item,\n matches\n }\n ]\n }\n\n return []\n }\n\n const res = [];\n for (let i = 0, len = node.children.length; i < len; i += 1) {\n const child = node.children[i];\n const result = evaluate(child, item, idx);\n if (result.length) {\n res.push(...result);\n } else if (node.operator === LogicalOperator.AND) {\n return []\n }\n }\n return res\n };\n\n const records = this._myIndex.records;\n const resultMap = {};\n const results = [];\n\n records.forEach(({ $: item, i: idx }) => {\n if (isDefined(item)) {\n let expResults = evaluate(expression, item, idx);\n\n if (expResults.length) {\n // Dedupe when adding\n if (!resultMap[idx]) {\n resultMap[idx] = { idx, item, matches: [] };\n results.push(resultMap[idx]);\n }\n expResults.forEach(({ matches }) => {\n resultMap[idx].matches.push(...matches);\n });\n }\n }\n });\n\n return results\n }\n\n _searchObjectList(query) {\n const searcher = createSearcher(query, this.options);\n const { keys, records } = this._myIndex;\n const results = [];\n\n // List is Array<Object>\n records.forEach(({ $: item, i: idx }) => {\n if (!isDefined(item)) {\n return\n }\n\n let matches = [];\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n keys.forEach((key, keyIndex) => {\n matches.push(\n ...this._findMatches({\n key,\n value: item[keyIndex],\n searcher\n })\n );\n });\n\n if (matches.length) {\n results.push({\n idx,\n item,\n matches\n });\n }\n });\n\n return results\n }\n _findMatches({ key, value, searcher }) {\n if (!isDefined(value)) {\n return []\n }\n\n let matches = [];\n\n if (isArray(value)) {\n value.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({\n score,\n key,\n value: text,\n idx,\n norm,\n indices\n });\n }\n });\n } else {\n const { v: text, n: norm } = value;\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({ score, key, value: text, norm, indices });\n }\n }\n\n return matches\n }\n}\n\nFuse.version = '7.0.0';\nFuse.createIndex = createIndex;\nFuse.parseIndex = parseIndex;\nFuse.config = Config;\n\n{\n Fuse.parseQuery = parse;\n}\n\n{\n register(ExtendedSearch);\n}\n\nexport { Fuse as default };\n"],"file":"assets/fuse-rEcEZtAj.js"}