182 lines
189 KiB
JavaScript
182 lines
189 KiB
JavaScript
import{ab as lt,Q as Ne,c as r,h as Y,r as Ce,A as $,_ as gn,y as ee,ac as ya,E as fr,i as S,ad as I,ae as ba,af as ro,ag as Ta,j as le,P as Pt,p as zi,ah as wa,ai as Vi,O as Hi,k as N,x as ut,V as Ke,o as Ea,s as B,aj as xa,f as mo,a as io,z as vn,B as Sa,T as D,ak as Bi,al as ka,am as Ui,q as hr,v as ji,g as pr,an as Ia,ao as De,ap as Aa,aq as Ca,ar as Bn,J as st,u as xn,d as Gr,b as ht,W as Wi,as as Pa,at as La,au as Ma}from"./useTitle-SRT6j-GL.js";import{e as Ra}from"./tinyld-light-PxOyhYWY.js";function qo(){return qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},qo.apply(this,arguments)}var Ki=["shift","alt","meta","mod","ctrl"],Oa={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function mt(e){return(Oa[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Da(e){return Ki.includes(e)}function ko(e,t){return t===void 0&&(t=","),e.split(t)}function Io(e,t,n){t===void 0&&(t="+");var o=e.toLocaleLowerCase().split(t).map(function(a){return mt(a)}),i={alt:o.includes("alt"),ctrl:o.includes("ctrl")||o.includes("control"),shift:o.includes("shift"),meta:o.includes("meta"),mod:o.includes("mod")},s=o.filter(function(a){return!Ki.includes(a)});return qo({},i,{keys:s,description:n})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Zi([mt(e.key),mt(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&qi([mt(e.key),mt(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){gt.clear()})})();var gt=new Set;function mr(e){return Array.isArray(e)}function $a(e,t){t===void 0&&(t=",");var n=mr(e)?e:e.split(t);return n.every(function(o){return gt.has(o.trim().toLowerCase())})}function Zi(e){var t=Array.isArray(e)?e:[e];gt.has("meta")&>.forEach(function(n){return!Da(n)&>.delete(n.toLowerCase())}),t.forEach(function(n){return gt.add(n.toLowerCase())})}function qi(e){var t=Array.isArray(e)?e:[e];e==="meta"?gt.clear():t.forEach(function(n){return gt.delete(n.toLowerCase())})}function Na(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Fa(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function za(e){return Yi(e,["input","textarea","select"])}function Yi(e,t){var n=e.target;t===void 0&&(t=!1);var o=n&&n.tagName;return mr(t)?!!(o&&t&&t.some(function(i){return i.toLowerCase()===o.toLowerCase()})):!!(o&&t&&t===!0)}function Va(e,t){return e.length===0&&t?(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>'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var Ha=function(t,n,o){o===void 0&&(o=!1);var i=n.alt,s=n.meta,a=n.mod,c=n.shift,l=n.ctrl,u=n.keys,f=t.key,d=t.code,p=t.ctrlKey,m=t.metaKey,h=t.shiftKey,g=t.altKey,_=mt(d),T=f.toLowerCase();if(!(u!=null&&u.includes(_))&&!(u!=null&&u.includes(T))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(_))return!1;if(!o){if(i===!g&&T!=="alt"||c===!h&&T!=="shift")return!1;if(a){if(!m&&!p)return!1}else if(s===!m&&T!=="meta"&&T!=="os"||l===!p&&T!=="ctrl"&&T!=="control")return!1}return u&&u.length===1&&(u.includes(T)||u.includes(_))?!0:u?$a(u):!u},Ba=lt(void 0),Ua=function(){return Ne(Ba)};function Gi(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,o){return n&&Gi(e[o],t[o])},!0):e===t}var ja=lt({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Wa=function(){return Ne(ja)};function Ka(e){var t=$(void 0);return Gi(t.current,e)||(t.current=e),t.current}var Xr=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Za=typeof window<"u"?gn:ee;function Ht(e,t,n,o){var i=$(null),s=$(!1),a=n instanceof Array?o instanceof Array?void 0:o:n,c=mr(e)?e.join(a==null?void 0:a.splitKey):e,l=n instanceof Array?n:o instanceof Array?o:void 0,u=Ce(t,l??[]),f=$(u);l?f.current=u:f.current=t;var d=Ka(a),p=Wa(),m=p.enabledScopes,h=Ua();return Za(function(){if(!((d==null?void 0:d.enabled)===!1||!Va(m,d==null?void 0:d.scopes))){var g=function(b,w){var E;if(w===void 0&&(w=!1),!(za(b)&&!Yi(b,d==null?void 0:d.enableOnFormTags))){if(i.current!==null){var A=i.current.getRootNode();if((A instanceof Document||A instanceof ShadowRoot)&&A.activeElement!==i.current&&!i.current.contains(A.activeElement)){Xr(b);return}}(E=b.target)!=null&&E.isContentEditable&&!(d!=null&&d.enableOnContentEditable)||ko(c,d==null?void 0:d.splitKey).forEach(function(O){var M,k=Io(O,d==null?void 0:d.combinationKey);if(Ha(b,k,d==null?void 0:d.ignoreModifiers)||(M=k.keys)!=null&&M.includes("*")){if(d!=null&&d.ignoreEventWhen!=null&&d.ignoreEventWhen(b)||w&&s.current)return;if(Na(b,k,d==null?void 0:d.preventDefault),!Fa(b,k,d==null?void 0:d.enabled)){Xr(b);return}f.current(b,k),w||(s.current=!0)}})}},_=function(b){b.key!==void 0&&(Zi(mt(b.code)),((d==null?void 0:d.keydown)===void 0&&(d==null?void 0:d.keyup)!==!0||d!=null&&d.keydown)&&g(b))},T=function(b){b.key!==void 0&&(qi(mt(b.code)),s.current=!1,d!=null&&d.keyup&&g(b,!0))},y=i.current||(a==null?void 0:a.document)||document;return y.addEventListener("keyup",T),y.addEventListener("keydown",_),h&&ko(c,d==null?void 0:d.splitKey).forEach(function(x){return h.addHotkey(Io(x,d==null?void 0:d.combinationKey,d==null?void 0:d.description))}),function(){y.removeEventListener("keyup",T),y.removeEventListener("keydown",_),h&&ko(c,d==null?void 0:d.splitKey).forEach(function(x){return h.removeHotkey(Io(x,d==null?void 0:d.combinationKey,d==null?void 0:d.description))})}}},[c,d,m]),i}var gr={exports:{}};/*!
|
|
* Toastify js 1.12.0
|
|
* https://github.com/apvarun/toastify-js
|
|
* @license MIT licensed
|
|
*
|
|
* Copyright (C) 2018 Varun A P
|
|
*/var uf=gr.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(ya,function(t){var n=function(a){return new n.lib.init(a)},o="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:o,constructor:n,init:function(a){return a||(a={}),this.options={},this.toastElement=null,this.options.text=a.text||n.defaults.text,this.options.node=a.node||n.defaults.node,this.options.duration=a.duration===0?0:a.duration||n.defaults.duration,this.options.selector=a.selector||n.defaults.selector,this.options.callback=a.callback||n.defaults.callback,this.options.destination=a.destination||n.defaults.destination,this.options.newWindow=a.newWindow||n.defaults.newWindow,this.options.close=a.close||n.defaults.close,this.options.gravity=a.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=a.positionLeft||n.defaults.positionLeft,this.options.position=a.position||n.defaults.position,this.options.backgroundColor=a.backgroundColor||n.defaults.backgroundColor,this.options.avatar=a.avatar||n.defaults.avatar,this.options.className=a.className||n.defaults.className,this.options.stopOnFocus=a.stopOnFocus===void 0?n.defaults.stopOnFocus:a.stopOnFocus,this.options.onClick=a.onClick||n.defaults.onClick,this.options.offset=a.offset||n.defaults.offset,this.options.escapeMarkup=a.escapeMarkup!==void 0?a.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=a.ariaLive||n.defaults.ariaLive,this.options.style=a.style||n.defaults.style,a.backgroundColor&&(this.options.style.background=a.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var a=document.createElement("div");a.className="toastify on "+this.options.className,this.options.position?a.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(a.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):a.className+=" toastify-right",a.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var c in this.options.style)a.style[c]=this.options.style[c];if(this.options.ariaLive&&a.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)a.appendChild(this.options.node);else if(this.options.escapeMarkup?a.innerText=this.options.text:a.innerHTML=this.options.text,this.options.avatar!==""){var l=document.createElement("img");l.src=this.options.avatar,l.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?a.appendChild(l):a.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var u=document.createElement("button");u.type="button",u.setAttribute("aria-label","Close"),u.className="toast-close",u.innerHTML="✖",u.addEventListener("click",(function(_){_.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var f=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&f>360?a.insertAdjacentElement("afterbegin",u):a.appendChild(u)}if(this.options.stopOnFocus&&this.options.duration>0){var d=this;a.addEventListener("mouseover",function(_){window.clearTimeout(a.timeOutValue)}),a.addEventListener("mouseleave",function(){a.timeOutValue=window.setTimeout(function(){d.removeElement(a)},d.options.duration)})}if(typeof this.options.destination<"u"&&a.addEventListener("click",(function(_){_.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}).bind(this)),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&a.addEventListener("click",(function(_){_.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var p=i("x",this.options),m=i("y",this.options),h=this.options.position=="left"?p:"-"+p,g=this.options.gravity=="toastify-top"?m:"-"+m;a.style.transform="translate("+h+","+g+")"}return a},showToast:function(){this.toastElement=this.buildToast();var a;if(typeof this.options.selector=="string"?a=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?a=this.options.selector:a=document.body,!a)throw"Root element is not defined";var c=n.defaults.oldestFirst?a.firstChild:a.lastChild;return a.insertBefore(this.toastElement,c),n.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout((function(){this.removeElement(this.toastElement)}).bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(a){a.className=a.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),a.parentNode&&a.parentNode.removeChild(a),this.options.callback.call(a),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var a={top:15,bottom:15},c={top:15,bottom:15},l={top:15,bottom:15},u=document.getElementsByClassName("toastify"),f,d=0;d<u.length;d++){s(u[d],"toastify-top")===!0?f="toastify-top":f="toastify-bottom";var p=u[d].offsetHeight;f=f.substr(9,f.length-1);var m=15,h=window.innerWidth>0?window.innerWidth:screen.width;h<=360?(u[d].style[f]=l[f]+"px",l[f]+=p+m):s(u[d],"toastify-left")===!0?(u[d].style[f]=a[f]+"px",a[f]+=p+m):(u[d].style[f]=c[f]+"px",c[f]+=p+m)}return this};function i(a,c){return c.offset[a]?isNaN(c.offset[a])?c.offset[a]:c.offset[a]+"px":"0px"}function s(a,c){return!a||typeof c!="string"?!1:!!(a.className&&a.className.trim().split(/\s+/gi).indexOf(c)>-1)}return n.lib.init.prototype=n.lib,n})})(gr);var qa=gr.exports;const Ya=fr(qa);window._showToast=Pe;function Pe(e){typeof e=="string"&&(e={text:e});const{onClick:t,delay:n,...o}=e,i=Ya({className:`${t||e.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...o,onClick:()=>{t==null||t(i)}});return n?setTimeout(()=>{i.showToast()},n):i.showToast(),i}function df(e,t,n,o){const i=$(e);ee(()=>{i.current=e},[e,n]),ee(()=>{!o||t===null||t===!1||i.current()},[o]),ee(()=>{if(t===null||t===!1)return;const a=setInterval(()=>i.current(),t);return()=>clearInterval(a)},[t])}function Ga(e){const t=URL.parse("/compose/",window.location),{width:n,height:o}=window.screen,i=Math.max(0,(n-600)/2),s=Math.max(0,(o-450)/2),a=Math.min(n,600),c=Math.min(o,450),l=(e==null?void 0:e.uid)||Math.random(),u=window.open(t,"compose"+l,`width=${a},height=${c},left=${i},top=${s}`);return u?u.__COMPOSE__=e:alert(S._({id:"4S86wI"})),u}const Xa=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function Qa(){if(Xa){const e=document.createElement("input");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.opacity="0",document.body.appendChild(e),e.focus(),setTimeout(()=>{document.body.removeChild(e)},500)}}const Xi={x:()=>I(()=>import("./icons/close-line-YTE7hIJE.js"),[],import.meta.url),heart:()=>I(()=>import("./icons/heart-line-VwvWYh8h.js"),[],import.meta.url),bookmark:()=>I(()=>import("./icons/bookmark-line-D6jQ7QFs.js"),[],import.meta.url),"check-circle":()=>I(()=>import("./icons/check-circle-line-sE41WGxF.js"),[],import.meta.url),"x-circle":()=>I(()=>import("./icons/close-circle-line-qd3g541O.js"),[],import.meta.url),transfer:()=>I(()=>import("./icons/transfer-4-line-Q9QJoxz3.js"),[],import.meta.url),rocket:()=>I(()=>import("./icons/rocket-line-rZbVYYCZ.js"),[],import.meta.url),"arrow-left":{module:()=>I(()=>import("./icons/arrow-left-line-_YC6-XGG.js"),[],import.meta.url),rtl:!0},"arrow-right":{module:()=>I(()=>import("./icons/arrow-right-line-PypiEqpu.js"),[],import.meta.url),rtl:!0},"arrow-up":()=>I(()=>import("./icons/arrow-up-line-fcuKqhVE.js"),[],import.meta.url),"arrow-down":()=>I(()=>import("./icons/arrow-down-line-0TRJUP_K.js"),[],import.meta.url),earth:()=>I(()=>import("./icons/earth-line-t1Um8wpQ.js"),[],import.meta.url),lock:()=>I(()=>import("./icons/lock-line-0jNHqZpm.js"),[],import.meta.url),unlock:()=>I(()=>import("./icons/unlock-line-w3piJMVb.js"),[],import.meta.url),"eye-close":()=>I(()=>import("./icons/eye-close-line-lBiePPv9.js"),[],import.meta.url),"eye-open":()=>I(()=>import("./icons/eye-2-line-vz_Kw-rK.js"),[],import.meta.url),message:()=>I(()=>import("./icons/mail-line-5XLS6FEo.js"),[],import.meta.url),comment:{module:()=>I(()=>import("./icons/chat-3-line-F0xcdpXY.js"),[],import.meta.url),rtl:!0},comment2:{module:()=>I(()=>import("./icons/comment-2-line-xEXuT-Ip.js"),[],import.meta.url),rtl:!0},home:()=>I(()=>import("./icons/home-3-line-qJiZhXUH.js"),[],import.meta.url),notification:()=>I(()=>import("./icons/notification-line-olNPLtgS.js"),[],import.meta.url),follow:()=>I(()=>import("./icons/user-follow-line-k_GCWTtp.js"),[],import.meta.url),"follow-add":()=>I(()=>import("./icons/user-add-line-zzW9OULB.js"),[],import.meta.url),poll:[()=>I(()=>import("./icons/chart-bar-line-5r_DfN2w.js"),[],import.meta.url),"90deg"],pencil:()=>I(()=>import("./icons/pencil-line-bKXqElLR.js"),[],import.meta.url),quill:()=>I(()=>import("./icons/quill-pen-line-h_5-FsGz.js"),[],import.meta.url),at:()=>I(()=>import("./icons/at-line-9vJS_Hnl.js"),[],import.meta.url),attachment:()=>I(()=>import("./icons/attachment-line-C2PUa1Ke.js"),[],import.meta.url),upload:()=>I(()=>import("./icons/upload-3-line-Qsjvubiw.js"),[],import.meta.url),gear:()=>I(()=>import("./icons/settings-3-line-kt4MSpRv.js"),[],import.meta.url),more:()=>I(()=>import("./icons/more-3-line-wUD-Yhmj.js"),[],import.meta.url),more2:()=>I(()=>import("./icons/more-1-fill-je1-slyh.js"),[],import.meta.url),external:{module:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rtl:!0},popout:{module:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rtl:!0},popin:{module:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rotate:"180deg",rtl:!0},plus:()=>I(()=>import("./icons/add-circle-line--O-MfyNy.js"),[],import.meta.url),"chevron-left":{module:()=>I(()=>import("./icons/left-line-Jck0yVmC.js"),[],import.meta.url),rtl:!0},"chevron-right":{module:()=>I(()=>import("./icons/right-line-7VBoqLdz.js"),[],import.meta.url),rtl:!0},"chevron-down":()=>I(()=>import("./icons/down-line-9PeS5YhF.js"),[],import.meta.url),reply:{module:()=>I(()=>import("./icons/share-forward-line-4jL-2Q4u.js"),[],import.meta.url),rotate:"180deg",flip:"horizontal",rtl:!0},thread:()=>I(()=>import("./icons/route-line-2YYy3958.js"),[],import.meta.url),group:{module:()=>I(()=>import("./icons/group-line-JvhJklhQ.js"),[],import.meta.url),rtl:!0},bot:()=>I(()=>import("./icons/android-2-line-uPwvVubH.js"),[],import.meta.url),menu:()=>I(()=>import("./icons/rows-4-line-SxGPYpTa.js"),[],import.meta.url),list:{module:()=>I(()=>import("./icons/list-check-line-qNqx9Mm4.js"),[],import.meta.url),rtl:!0},search:()=>I(()=>import("./icons/search-2-line-G39AynEw.js"),[],import.meta.url),hashtag:()=>I(()=>import("./icons/hashtag-line-SS3QMu1R.js"),[],import.meta.url),info:()=>I(()=>import("./icons/information-line-8SOch6cR.js"),[],import.meta.url),shortcut:()=>I(()=>import("./icons/lightning-line-JMYUlCZM.js"),[],import.meta.url),user:()=>I(()=>import("./icons/user-4-line-zT_bpOrS.js"),[],import.meta.url),following:()=>I(()=>import("./icons/walk-line-CF7a5s4t.js"),[],import.meta.url),pin:()=>I(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),unpin:[()=>I(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),"180deg"],bus:()=>I(()=>import("./icons/bus-2-line-XuQdDZ_w.js"),[],import.meta.url),link:()=>I(()=>import("./icons/link-2-line-BUqp1EwN.js"),[],import.meta.url),history:()=>I(()=>import("./icons/history-line-yoG7K8wL.js"),[],import.meta.url),share:()=>I(()=>import("./icons/share-2-line-PYo-zN94.js"),[],import.meta.url),sparkles:()=>I(()=>import("./icons/sparkles-line-wjZWGZ1a.js"),[],import.meta.url),sparkles2:()=>I(()=>import("./icons/sparkles-2-line-g2FqdZ0R.js"),[],import.meta.url),exit:{module:()=>I(()=>import("./icons/exit-line-l-1uUgI7.js"),[],import.meta.url),rtl:!0},translate:()=>I(()=>import("./icons/translate-line-HpDtlqS2.js"),[],import.meta.url),play:()=>I(()=>import("./icons/play-fill-Ey-zv2eL.js"),[],import.meta.url),trash:()=>I(()=>import("./icons/delete-2-line-pjUduCFs.js"),[],import.meta.url),mute:{module:()=>I(()=>import("./icons/volume-mute-line-WthBoXru.js"),[],import.meta.url),rtl:!0},unmute:{module:()=>I(()=>import("./icons/volume-line-PZujbN8h.js"),[],import.meta.url),rtl:!0},block:()=>I(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),unblock:[()=>I(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),"180deg"],flag:()=>I(()=>import("./icons/flag-1-line-xvcg7G7Q.js"),[],import.meta.url),time:()=>I(()=>import("./icons/time-line-ThP0kTRr.js"),[],import.meta.url),refresh:()=>I(()=>import("./icons/refresh-2-line-t42qqclb.js"),[],import.meta.url),emoji2:()=>I(()=>import("./icons/emoji-2-line--uNVc2IC.js"),[],import.meta.url),filter:()=>I(()=>import("./icons/filter-2-line-KyjbFYlO.js"),[],import.meta.url),filters:()=>I(()=>import("./icons/filter-line-1KEfnWDm.js"),[],import.meta.url),chart:()=>I(()=>import("./icons/chart-line-line-pHaLt6yC.js"),[],import.meta.url),react:()=>I(()=>import("./icons/react-line-YfZPqZem.js"),[],import.meta.url),layout4:{module:()=>I(()=>import("./icons/layout-4-line-FOdnyEcZ.js"),[],import.meta.url),rtl:!0},layout5:()=>I(()=>import("./icons/layout-5-line-9Kks7dle.js"),[],import.meta.url),announce:{module:()=>I(()=>import("./icons/announcement-line-MSlAmDH1.js"),[],import.meta.url),rtl:!0},alert:()=>I(()=>import("./icons/alert-line-zyc6hy8V.js"),[],import.meta.url),round:()=>I(()=>import("./icons/round-fill-a0rplSmV.js"),[],import.meta.url),"arrow-up-circle":()=>I(()=>import("./icons/arrow-up-circle-line-e3kZqEZN.js"),[],import.meta.url),"arrow-down-circle":()=>I(()=>import("./icons/arrow-down-circle-line-mpqFtRtO.js"),[],import.meta.url),clipboard:{module:()=>I(()=>import("./icons/clipboard-line-9F_Yeo71.js"),[],import.meta.url),rtl:!0},"account-edit":()=>I(()=>import("./icons/user-edit-line-9VnWCh0X.js"),[],import.meta.url),"account-warning":()=>I(()=>import("./icons/user-warning-line-gL3RGb1N.js"),[],import.meta.url),keyboard:()=>I(()=>import("./icons/keyboard-line-10AZQcVH.js"),[],import.meta.url),cloud:()=>I(()=>import("./icons/cloud-line-abe0HgFS.js"),[],import.meta.url),month:{module:()=>I(()=>import("./icons/calendar-month-line-VoXZVWAe.js"),[],import.meta.url),rtl:!0},media:()=>I(()=>import("./icons/photo-album-line--GdJqjfq.js"),[],import.meta.url),speak:()=>I(()=>import("./icons/radar-line-ndI8IhOG.js"),[],import.meta.url),building:()=>I(()=>import("./icons/building-5-line-ew7lu83B.js"),[],import.meta.url),history2:{module:()=>I(()=>import("./icons/history-2-line-3yIVzoWo.js"),[],import.meta.url),rtl:!0},document:()=>I(()=>import("./icons/document-line--D6ooZg1.js"),[],import.meta.url),"arrows-right":{module:()=>I(()=>import("./icons/arrows-right-line-HF4HILdT.js"),[],import.meta.url),rtl:!0},code:()=>I(()=>import("./icons/code-line-h4RWLaak.js"),[],import.meta.url),copy:()=>I(()=>import("./icons/copy-2-line-mPSDKieb.js"),[],import.meta.url),quote:{module:()=>I(()=>import("./icons/quote-left-line-NQzeELMO.js"),[],import.meta.url),rtl:!0},settings:()=>I(()=>import("./icons/settings-6-line-ZgCBilgF.js"),[],import.meta.url),"heart-break":()=>I(()=>import("./icons/heart-crack-line-P3DoKfTT.js"),[],import.meta.url),"user-x":()=>I(()=>import("./icons/user-x-line-zIdph-gu.js"),[],import.meta.url),minimize:()=>I(()=>import("./icons/arrows-down-line-ovOF9r0o.js"),[],import.meta.url)},Ja={s:12,m:16,l:20,xl:24,xxl:32},Qr={},ec=ba(function({width:e,height:t,body:n,rotate:o,flip:i}){return r("svg",{viewBox:`0 0 ${e} ${t}`,dangerouslySetInnerHTML:{__html:n},style:{transform:`${o?`rotate(${o})`:""} ${i?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(Xi).length,matchesArg:(e,t)=>e.icon===t.icon&&e.body===t.body});function L({icon:e,size:t="m",alt:n,title:o,class:i="",style:s={}}){if(!e)return null;const a=Ja[t];let c=Xi[e];if(!c)return null;let l,u,f=!1;Array.isArray(c)?[c,l,u]=c:typeof c=="object"&&({rotate:l,flip:u,rtl:f}=c,c=c.module);const[d,p]=Y(Qr[e]),m=$(e);return ee(()=>{d&&m.current===e||((async()=>{const h=await c();p(h.default),Qr[e]=h.default})(),m.current=e)},[e]),r("span",{class:`icon ${i} ${f?"rtl-flip":""}`,title:o||n,style:{width:`${a}px`,height:`${a}px`,...s},"data-icon":e,children:d&&r(ec,{icon:e,width:d.width,height:d.height,body:d.body,rotate:l,flip:u})})}function tc(e,t=[]){!e||typeof e!="function"||ee(()=>{const n=new CloseWatcher;return n.addEventListener("close",e),()=>{n.destroy()}},t)}const nc=window.CloseWatcher?tc:()=>{},oc=document.getElementById("modal-container");function Yo({children:e,onClose:t,onClick:n,class:o,minimized:i}){if(!e)return null;const s=$();ee(()=>{let u=setTimeout(()=>{var d;const f=(d=s.current)==null?void 0:d.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(u)},[]);const a=window.CloseWatcher,c=Ht("esc",()=>{setTimeout(()=>{t==null||t()},0)},{enabled:!a&&!!t,keydown:!1,keyup:!0},[t]);nc(t,[t]),ee(()=>{const u=document.querySelectorAll(".deck-container");if(i){const f=u[u.length-1];f&&f.tabIndex===-1&&f.focus()}else e?u.forEach(f=>{f.setAttribute("inert","")}):u.forEach(f=>{f.removeAttribute("inert")});return()=>{u.forEach(f=>{f.removeAttribute("inert")})}},[e,i]);const l=r("div",{ref:u=>{var f;s.current=u,c.current=((f=u==null?void 0:u.querySelector)==null?void 0:f.call(u,'[tabindex="-1"]'))||u},className:o,onClick:u=>{n==null||n(u),u.target===u.currentTarget&&(t==null||t(u))},tabIndex:i?0:"-1",inert:i,onFocus:u=>{var f,d;try{if(u.target===u.currentTarget){const p=(f=s.current)==null?void 0:f.querySelector('[tabindex="-1"]'),m=!!p&&((d=getComputedStyle(p))==null?void 0:d.pointerEvents)!=="none";p&&m&&p.focus()}}catch{}},children:e});return ro(l,oc)}var vr={exports:{}},rc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ic=rc;var sc=ic;function Qi(){}function Ji(){}Ji.resetWarningCache=Qi;var ac=function(){function e(o,i,s,a,c,l){if(l!==sc){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Ji,resetWarningCache:Qi};return n.PropTypes=n,n};var ff=vr.exports;if(0)var hf,pf;else vr.exports=ac();var U=vr.exports;const _r=e=>!!e&&e[0]==="o",Go=Ta||(e=>e());const _n=(e,t)=>e===!0||!!(e&&e[t]),Ve=(e,t)=>typeof e=="function"?e(t):e,cc="_szhsinMenu",lc=e=>e[cc];const Xt=(e,t)=>(t&&Object.keys(t).forEach(n=>{const o=e[n],i=t[n];typeof i=="function"&&o?e[n]=(...s)=>{i(...s),o(...s)}:e[n]=i}),e),uc=e=>{if(typeof e!="string")return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],o=isNaN(t[1])?n:t[1];return{top:n,right:o,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?o:t[3]}},Ao=e=>{for(;e;){if(e=e.parentNode,!e||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:o}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+o+n))return e}};function go(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function Jr(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const dc=e=>({[e?`${e}ClassName`:"className"]:U.oneOfType([U.string,U.func])}),fc={className:U.string,...dc("menu"),arrowProps:U.object,focusProps:U.object,menuStyle:U.object,arrow:U.bool,setDownOverflow:U.bool,gap:U.number,shift:U.number,align:U.oneOf(["start","center","end"]),direction:U.oneOf(["left","right","top","bottom"]),position:U.oneOf(["auto","anchor","initial"]),overflow:U.oneOf(["auto","visible","hidden"])},mf={...fc,containerProps:U.object,initialMounted:U.bool,unmountOnClose:U.bool,transition:U.oneOfType([U.bool,U.exact({open:U.bool,close:U.bool,item:U.bool})]),transitionTimeout:U.number,boundingBoxRef:U.object,boundingBoxPadding:U.string,reposition:U.oneOf(["auto","initial"]),repositionFlag:U.oneOfType([U.string,U.number]),viewScroll:U.oneOf(["auto","close","initial"]),submenuOpenDelay:U.number,submenuCloseDelay:U.number,portal:U.oneOfType([U.bool,U.exact({target:U.object,stablePosition:U.bool})]),theming:U.string,onItemClick:U.func},gf={instanceRef:U.oneOfType([U.object,U.func]),onMenuChange:U.func},et=({block:e,element:t,modifiers:n,className:o})=>le(()=>{const i=t?`${e}__${t}`:e;let s=i;n&&Object.keys(n).forEach(c=>{const l=n[c];l&&(s+=` ${i}--${l===!0?c:`${c}-${l}`}`)});let a=typeof o=="function"?o(n):o;return typeof a=="string"&&(a=a.trim(),a&&(s+=` ${a}`)),s},[e,t,n,o]),hc="szh-menu-container",Je="szh-menu";const pc="arrow",yr="item",mc="divider",gc="header",vc="group",_c="submenu";const es=lt(),br=lt({}),so=lt({}),Tr=lt({}),yc=lt({}),vo=lt({}),$e=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Te=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),yn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Ut=Object.freeze({FIRST:"first",LAST:"last"}),bc=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Co="absolute",bn="none",wr="menuitem";const Tc=({className:e,containerRef:t,containerProps:n,children:o,isOpen:i,theming:s,transition:a,onClose:c})=>{const l=_n(a,"item");return r("div",{...Xt({onKeyDown:({key:d})=>{switch(d){case $e.ESC:Ve(c,{key:d,reason:yn.CANCEL});break}},onBlur:d=>{i&&!d.currentTarget.contains(d.relatedTarget)&&Ve(c,{reason:yn.BLUR})}},n),className:et({block:hc,modifiers:le(()=>({theme:s,itemTransition:l}),[s,l]),className:e}),style:{position:"absolute",...n==null?void 0:n.style},ref:t,children:o})},wc=()=>{let e,t=0;return{toggle:n=>{n?t++:t--,t=Math.max(t,0)},on:(n,o,i)=>{t?e||(e=setTimeout(()=>{e=0,o()},n)):i==null||i()},off:()=>{e&&(clearTimeout(e),e=0)}}},Ec=(e,t)=>{const[n,o]=Y(),s=$({items:[],hoverIndex:-1,sorted:!1}).current,a=Ce((l,u)=>{const{items:f}=s;if(!l)s.items=[];else if(u)f.push(l);else{const d=f.indexOf(l);d>-1&&(f.splice(d,1),l.contains(document.activeElement)&&(t.current.focus(),o()))}s.hoverIndex=-1,s.sorted=!1},[s,t]),c=Ce((l,u,f)=>{const{items:d,hoverIndex:p}=s,m=()=>{if(s.sorted)return;const _=e.current.querySelectorAll(".szh-menu__item");d.sort((T,y)=>Jr(_,T)-Jr(_,y)),s.sorted=!0};let h=-1,g;switch(l){case Te.RESET:break;case Te.SET:g=u;break;case Te.UNSET:g=_=>_===u?void 0:_;break;case Te.FIRST:m(),h=0,g=d[h];break;case Te.LAST:m(),h=d.length-1,g=d[h];break;case Te.SET_INDEX:m(),h=f,g=d[h];break;case Te.INCREASE:m(),h=p,h<0&&(h=d.indexOf(u)),h++,h>=d.length&&(h=0),g=d[h];break;case Te.DECREASE:m(),h=p,h<0&&(h=d.indexOf(u)),h--,h<0&&(h=d.length-1),g=d[h];break;default:}g||(h=-1),o(g),s.hoverIndex=h},[e,s]);return{hoverItem:n,dispatch:c,updateItems:a}},ei=(e,t)=>Math.round(e)===t?e:t,ts=e=>{const t=e.getBoundingClientRect();return t.width=ei(t.width,e.offsetWidth),t.height=ei(t.height,e.offsetHeight),t},xc=(e,t,n,o)=>{const i=ts(t.current),s=e.current.getBoundingClientRect(),a=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=uc(o),l=h=>h+s.left-a.left-c.left,u=h=>h+s.left+i.width-a.right+c.right,f=h=>h+s.top-a.top-c.top,d=h=>h+s.top+i.height-a.bottom+c.bottom;return{menuRect:i,containerRect:s,getLeftOverflow:l,getRightOverflow:u,getTopOverflow:f,getBottomOverflow:d,confineHorizontally:h=>{let g=l(h);if(g<0)h-=g;else{const _=u(h);_>0&&(h-=_,g=l(h),g<0&&(h-=g))}return h},confineVertically:h=>{let g=f(h);if(g<0)h-=g;else{const _=d(h);_>0&&(h-=_,g=f(h),g<0&&(h-=g))}return h}}},Sc=({arrowRef:e,menuY:t,anchorRect:n,containerRect:o,menuRect:i})=>{let s=n.top-o.top-t+n.height/2;const a=e.current.offsetHeight*1.25;return s=Math.max(a,s),s=Math.min(s,i.height-a),s},kc=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:o,placeLeftX:i,placeRightX:s,getLeftOverflow:a,getRightOverflow:c,confineHorizontally:l,confineVertically:u,arrowRef:f,arrow:d,direction:p,position:m})=>{let h=p,g=o;m!=="initial"&&(g=u(g),m==="anchor"&&(g=Math.min(g,e.bottom-t.top),g=Math.max(g,e.top-t.top-n.height)));let _,T,y;return h==="left"?(_=i,m!=="initial"&&(T=a(_),T<0&&(y=c(s),(y<=0||-T>y)&&(_=s,h="right")))):(_=s,m!=="initial"&&(y=c(_),y>0&&(T=a(i),(T>=0||-T<y)&&(_=i,h="left")))),m==="auto"&&(_=l(_)),{arrowY:d?Sc({menuY:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:_,y:g,computedDirection:h}},Ic=({arrowRef:e,menuX:t,anchorRect:n,containerRect:o,menuRect:i})=>{let s=n.left-o.left-t+n.width/2;const a=e.current.offsetWidth*1.25;return s=Math.max(a,s),s=Math.min(s,i.width-a),s},Ac=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:o,placeTopY:i,placeBottomY:s,getTopOverflow:a,getBottomOverflow:c,confineHorizontally:l,confineVertically:u,arrowRef:f,arrow:d,direction:p,position:m})=>{let h=p==="top"?"top":"bottom",g=o;m!=="initial"&&(g=l(g),m==="anchor"&&(g=Math.min(g,e.right-t.left),g=Math.max(g,e.left-t.left-n.width)));let _,T,y;return h==="top"?(_=i,m!=="initial"&&(T=a(_),T<0&&(y=c(s),(y<=0||-T>y)&&(_=s,h="bottom")))):(_=s,m!=="initial"&&(y=c(_),y>0&&(T=a(i),(T>=0||-T<y)&&(_=i,h="top")))),m==="auto"&&(_=u(_)),{arrowX:d?Ic({menuX:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:g,y:_,computedDirection:h}},Cc=({arrow:e,align:t,direction:n,gap:o,shift:i,position:s,anchorRect:a,arrowRef:c,positionHelpers:l})=>{const{menuRect:u,containerRect:f}=l,d=n==="left"||n==="right";let p=d?o:i,m=d?i:o;if(e){const w=c.current;d?p+=w.offsetWidth:m+=w.offsetHeight}const h=a.left-f.left-u.width-p,g=a.right-f.left+p,_=a.top-f.top-u.height-m,T=a.bottom-f.top+m;let y,x;t==="end"?(y=a.right-f.left-u.width,x=a.bottom-f.top-u.height):t==="center"?(y=a.left-f.left-(u.width-a.width)/2,x=a.top-f.top-(u.height-a.height)/2):(y=a.left-f.left,x=a.top-f.top),y+=p,x+=m;const b={...l,anchorRect:a,placeLeftX:h,placeRightX:g,placeLeftorRightY:x,placeTopY:_,placeBottomY:T,placeToporBottomX:y,arrowRef:c,arrow:e,direction:n,position:s};switch(n){case"left":case"right":return kc(b);case"top":case"bottom":default:return Ac(b)}},jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?gn:ee;function ti(e,t){typeof e=="function"?e(t):e.current=t}const Qt=(e,t)=>le(()=>e?t?n=>{ti(e,n),ti(t,n)}:e:t,[e,t]),ni=-9999,ns=({ariaLabel:e,menuClassName:t,menuStyle:n,arrow:o,arrowProps:i={},anchorPoint:s,anchorRef:a,containerRef:c,containerProps:l,focusProps:u,externalRef:f,parentScrollingRef:d,align:p="start",direction:m="bottom",position:h="auto",overflow:g="visible",setDownOverflow:_,repositionFlag:T,captureFocus:y=!0,state:x,endTransition:b,isDisabled:w,menuItemFocus:E,gap:A=0,shift:O=0,children:M,onClose:k,...C})=>{const[R,z]=Y({x:ni,y:ni}),[F,se]=Y({}),[Q,we]=Y(),[X,ue]=Y(m),[te]=Y(wc),[ae,V]=zi(G=>G+1,1),{transition:pe,boundingBoxRef:ce,boundingBoxPadding:Fe,rootMenuRef:Ae,rootAnchorRef:Ee,scrollNodesRef:Le,reposition:be,viewScroll:Me,submenuCloseDelay:Re}=Ne(vo),{submenuCtx:J,reposSubmenu:H=T}=Ne(so),xe=$(null),Ze=$(),ie=$(),Z=$(!1),{hoverItem:ne,dispatch:K,updateItems:he}=Ec(xe,Ze),q=_r(x),ze=_n(pe,"open"),oe=_n(pe,"close"),me=Le.current,kn=G=>{switch(G.key){case $e.HOME:K(Te.FIRST);break;case $e.END:K(Te.LAST);break;case $e.UP:K(Te.DECREASE,ne);break;case $e.DOWN:K(Te.INCREASE,ne);break;case $e.SPACE:G.target&&G.target.className.indexOf(Je)!==-1&&G.preventDefault();return;default:return}G.preventDefault(),G.stopPropagation()},fe=()=>{x==="closing"&&we(),Ve(b)},ge=G=>{G.stopPropagation(),te.on(Re,()=>{K(Te.RESET),Ze.current.focus()})},qe=G=>{G.target===G.currentTarget&&te.off()},ve=Ce(G=>{var ye;const Ie=a?(ye=a.current)==null?void 0:ye.getBoundingClientRect():s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0,height:0}:null;if(!Ie)return;me.menu||(me.menu=(ce?ce.current:Ao(Ae.current))||window);const He=xc(c,xe,me.menu,Fe);let{arrowX:Se,arrowY:ot,x:Cn,y:bt,computedDirection:Ye}=Cc({arrow:o,align:p,direction:m,gap:A,shift:O,position:h,anchorRect:Ie,arrowRef:ie,positionHelpers:He});const{menuRect:Pn}=He,je=Pn.height;if(!G&&g!=="visible"){const{getTopOverflow:Tt,getBottomOverflow:yo}=He;let wt,de;const Et=yo(bt);if(Et>0)wt=je-Et,de=Et;else{const Ot=Tt(bt);Ot<0&&(wt=je+Ot,de=0-Ot,wt>=0&&(bt-=Ot))}wt>=0&&we({height:wt,overflowAmt:de})}o&&se({x:Se,y:ot}),z({x:Cn,y:bt}),ue(Ye)},[o,p,Fe,m,A,O,h,g,s,a,c,ce,Ae,me]);jt(()=>{q&&(ve(),Z.current&&V()),Z.current=q},[q,ve,H]),jt(()=>{Q&&!_&&(xe.current.scrollTop=0)},[Q,_]),jt(()=>he,[he]),ee(()=>{let{menu:G}=me;if(!q||!G)return;if(G=G.addEventListener?G:window,!me.anchors){me.anchors=[];let Se=Ao(Ee&&Ee.current);for(;Se&&Se!==G;)me.anchors.push(Se),Se=Ao(Se)}let ye=Me;if(me.anchors.length&&ye==="initial"&&(ye="auto"),ye==="initial")return;const Ie=()=>{ye==="auto"?Go(()=>ve(!0)):Ve(k,{reason:yn.SCROLL})},He=me.anchors.concat(Me!=="initial"?G:[]);return He.forEach(Se=>Se.addEventListener("scroll",Ie)),()=>He.forEach(Se=>Se.removeEventListener("scroll",Ie))},[Ee,me,q,k,Me,ve]);const tt=!!Q&&Q.overflowAmt>0;ee(()=>{if(tt||!q||!d)return;const G=()=>Go(ve),ye=d.current;return ye.addEventListener("scroll",G),()=>ye.removeEventListener("scroll",G)},[q,tt,d,ve]),ee(()=>{if(!q||typeof ResizeObserver!="function"||be==="initial")return;const G=[],ye=new ResizeObserver(Se=>Se.forEach(({target:ot})=>{G.indexOf(ot)<0?G.push(ot):wa(()=>{ve(),V()})})),Ie={box:"border-box"};ye.observe(xe.current,Ie);const He=a==null?void 0:a.current;return He&&ye.observe(He,Ie),()=>ye.disconnect()},[q,be,a,ve]),ee(()=>{if(!q){K(Te.RESET),oe||we();return}const{position:G,alwaysUpdate:ye}=E||{},Ie=()=>{G===Ut.FIRST?K(Te.FIRST):G===Ut.LAST?K(Te.LAST):G>=-1&&K(Te.SET_INDEX,void 0,G)};if(ye)Ie();else if(y){const He=setTimeout(()=>{const Se=xe.current;Se&&!Se.contains(document.activeElement)&&(Ze.current.focus(),Ie())},ze?170:100);return()=>clearTimeout(He)}},[q,ze,oe,y,E,K]);const In=le(()=>({isParentOpen:q,submenuCtx:te,dispatch:K,updateItems:he}),[q,te,K,he]);let ft,Mt;Q&&(_?Mt=Q.overflowAmt:ft=Q.height);const _o=le(()=>({reposSubmenu:ae,submenuCtx:te,overflow:g,overflowAmt:Mt,parentMenuRef:xe,parentDir:X}),[ae,te,g,Mt,X]),_e=ft>=0?{maxHeight:ft,overflow:g}:void 0,Rt=le(()=>({state:x,align:p,dir:X}),[x,p,X]),yt=le(()=>({dir:X}),[X]),nt=et({block:Je,element:pc,modifiers:yt,className:i.className}),An=r("ul",{role:"menu","aria-label":e,...go(w),...Xt({onPointerEnter:J==null?void 0:J.off,onPointerMove:ge,onPointerLeave:qe,onKeyDown:kn,onAnimationEnd:fe},C),ref:Qt(f,xe),className:et({block:Je,modifiers:Rt,className:t}),style:{...n,..._e,margin:0,display:x==="closed"?"none":void 0,position:Co,left:R.x,top:R.y},children:[r("li",{tabIndex:-1,role:bn,style:{position:Co,left:0,top:0,display:"block",outline:"none"},ref:Ze,...u}),o&&r("li",{role:bn,...i,className:nt,style:{display:"block",position:Co,left:F.x,top:F.y,...i.style},ref:ie}),r(so.Provider,{value:_o,children:r(br.Provider,{value:In,children:r(es.Provider,{value:ne,children:Ve(M,Rt)})})})]});return l?r(Tc,{...l,isOpen:q,children:An}):An},os=Pt(function({"aria-label":t,className:n,containerProps:o,initialMounted:i,unmountOnClose:s,transition:a,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:u,reposition:f="auto",submenuOpenDelay:d=300,submenuCloseDelay:p=150,viewScroll:m="initial",portal:h,theming:g,onItemClick:_,...T},y){const x=$(null),b=$({}),{anchorRef:w,state:E,onClose:A}=T,O=le(()=>({initialMounted:i,unmountOnClose:s,transition:a,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:u,rootMenuRef:x,rootAnchorRef:w,scrollNodesRef:b,reposition:f,viewScroll:m,submenuOpenDelay:d,submenuCloseDelay:p}),[i,s,a,c,w,l,u,f,m,d,p]),M=le(()=>({handleClick(C,R){C.stopPropagation||Ve(_,C);let z=C.keepOpen;z===void 0&&(z=R&&C.key===$e.SPACE),z||Ve(A,{value:C.value,key:C.key,reason:yn.CLICK})},handleClose(C){Ve(A,{key:C,reason:yn.CLICK})}}),[_,A]);if(!E)return null;const k=r(vo.Provider,{value:O,children:r(Tr.Provider,{value:M,children:r(ns,{...T,ariaLabel:t||"Menu",externalRef:y,containerRef:x,containerProps:{className:n,containerRef:x,containerProps:o,theming:g,transition:a,onClose:A}})})});return h===!0&&typeof document<"u"?ro(k,document.body):h?h.target?ro(k,h.target):h.stablePosition?null:k:k}),Xo=0,Qo=1,ao=2,co=3,lo=4,Pc=5,rs=6,Lc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],is=e=>({_s:e,status:Lc[e],isEnter:e<co,isMounted:e!==rs,isResolved:e===ao||e>lo}),Jo=e=>e?rs:Pc,Mc=(e,t)=>{switch(e){case Qo:case Xo:return ao;case lo:case co:return Jo(t)}},Rc=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],oi=(e,t,n,o,i)=>{clearTimeout(o.current);const s=is(e);t(s),n.current=s,i&&i({current:s})},Oc=({enter:e=!0,exit:t=!0,preEnter:n,preExit:o,timeout:i,initialEntered:s,mountOnEnter:a,unmountOnExit:c,onStateChange:l}={})=>{const[u,f]=Y(()=>is(s?ao:Jo(a))),d=$(u),p=$(),[m,h]=Rc(i),g=Ce(()=>{const T=Mc(d.current._s,c);T&&oi(T,f,d,p,l)},[l,c]),_=Ce(T=>{const y=b=>{switch(oi(b,f,d,p,l),b){case Qo:m>=0&&(p.current=setTimeout(g,m));break;case lo:h>=0&&(p.current=setTimeout(g,h));break;case Xo:case co:p.current=setTimeout(()=>y(b+1),0);break}},x=d.current.isEnter;typeof T!="boolean"&&(T=!x),T?!x&&y(e?n?Xo:Qo:ao):x&&y(t?o?co:lo:Jo(c))},[g,l,e,t,n,o,m,h,c]);return ee(()=>()=>clearTimeout(p.current),[]),[u,_,g]};const Dc=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:o,transitionTimeout:i=500}={})=>{const[{status:s},a,c]=Oc({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:i,enter:_n(o,"open"),exit:_n(o,"close")});return[{state:bc[s],endTransition:c},a]},ss=e=>{const[t,n]=Dc(e),[o,i]=Y(),s=(a,c)=>{i({position:a,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:o,...t},n,s]},$c=(e,t)=>{const[n]=Y({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:o=>n.v?n.v=!1:t(!0,o)}},as=(e,t)=>{const n=$(t);ee(()=>{n.current!==t&&Ve(e,{open:t}),n.current=t},[e,t])},Nc=Pt(function({"aria-label":t,captureFocus:n,initialOpen:o,menuButton:i,instanceRef:s,onMenuChange:a,...c},l){const[u,f,d]=ss(c),{state:p}=u,m=_r(p),h=$(null),g=$c(p,(w,E)=>d(E.detail?void 0:Ut.FIRST)),_=Ce(w=>{f(!1),w.key&&h.current.focus()},[f]),T=w=>{switch(w.key){case $e.UP:d(Ut.LAST);break;case $e.DOWN:d(Ut.FIRST);break;default:return}w.preventDefault()},y=Ve(i,{open:m});if(!y||!y.type)throw new Error("Menu requires a menuButton prop.");const x={ref:Qt(y.ref,h),...Xt({onKeyDown:T,...g},y.props)};lc(y.type)==="MenuButton"&&(x.isOpen=m);const b=Vi(y,x);return as(a,m),Hi(s,()=>({openMenu:d,closeMenu:()=>f(!1)})),r(N,{children:[b,r(os,{...c,...u,"aria-label":t||(typeof y.props.children=="string"?y.props.children:"Menu"),anchorRef:h,ref:l,onClose:_})]})}),Er=(e,t)=>{const n=ut(t),o=Pt((i,s)=>{const a=$(null);return r(n,{...i,itemRef:a,externalRef:s,isHovering:Ne(es)===a.current})});return o.displayName=`WithHovering(${e})`,o},cs=(e,t,n)=>{jt(()=>{if(e)return;const o=t.current;return n(o,!0),()=>{n(o)}},[e,t,n])},Fc=Er("SubMenu",function({"aria-label":t,className:n,disabled:o,direction:i,label:s,openTrigger:a,onMenuChange:c,isHovering:l,instanceRef:u,itemRef:f,captureFocus:d,repositionFlag:p,itemProps:m={},...h}){const g=Ne(vo),{rootMenuRef:_,submenuOpenDelay:T,submenuCloseDelay:y}=g,{parentMenuRef:x,parentDir:b,overflow:w}=Ne(so),{isParentOpen:E,submenuCtx:A,dispatch:O,updateItems:M}=Ne(br),k=w!=="visible",[C,R,z]=ss(g),{state:F}=C,se=!!o,Q=_r(F),we=$(null),[X]=Y({v:0}),ue=()=>{A.off(),X.v&&(clearTimeout(X.v),X.v=0)},te=(...H)=>{ue(),ae(),!se&&z(...H)},ae=()=>!l&&!se&&O(Te.SET,f.current),V=H=>{ae(),a||(X.v=setTimeout(()=>Go(te),Math.max(H,0)))},pe=H=>{se||(H.stopPropagation(),!(X.v||Q)&&A.on(y,()=>V(T-y),()=>V(T)))},ce=()=>{ue(),Q||O(Te.UNSET,f.current)},Fe=H=>{if(l)switch(H.key){case $e.ENTER:H.preventDefault();case $e.SPACE:case $e.RIGHT:a!=="none"&&te(Ut.FIRST)}},Ae=H=>{let xe=!1;switch(H.key){case $e.LEFT:Q&&(f.current.focus(),R(!1),xe=!0);break;case $e.RIGHT:Q||(xe=!0);break}xe&&(H.preventDefault(),H.stopPropagation())};cs(se,f,M),as(c,Q),ee(()=>A.toggle(Q),[A,Q]),ee(()=>()=>clearTimeout(X.v),[X]),ee(()=>{l&&E?f.current.focus():R(!1)},[l,E,R,f]),Hi(u,()=>({openMenu:(...H)=>{E&&te(...H)},closeMenu:()=>{Q&&(f.current.focus(),R(!1))}}));const Ee=le(()=>({open:Q,hover:l,disabled:se,submenu:!0}),[Q,l,se]),{ref:Le,className:be,...Me}=m,Re=Xt({onPointerEnter:A.off,onPointerMove:pe,onPointerLeave:ce,onKeyDown:Fe,onClick:()=>a!=="none"&&te()},Me),J=()=>{const H=r(ns,{...h,...C,ariaLabel:t||(typeof s=="string"?s:"Submenu"),anchorRef:f,containerRef:k?_:we,direction:i||(b==="right"||b==="left"?b:"right"),parentScrollingRef:k&&x,isDisabled:se}),xe=_.current;return k&&xe?ro(H,xe):H};return r("li",{className:et({block:Je,element:_c,className:n}),style:{position:"relative"},role:bn,ref:we,onKeyDown:Ae,children:[r("div",{role:wr,"aria-haspopup":!0,"aria-expanded":Q,...go(se,l),...Re,ref:Qt(Le,f),className:et({block:Je,element:yr,modifiers:Ee,className:be}),children:le(()=>Ve(s,Ee),[s,Ee])}),F&&J()]})}),ls=(e,t,n,o)=>{const{submenuCloseDelay:i}=Ne(vo),{isParentOpen:s,submenuCtx:a,dispatch:c,updateItems:l}=Ne(br),u=()=>{!n&&!o&&c(Te.SET,e.current)},f=()=>{!o&&c(Te.UNSET,e.current)},d=h=>{n&&!h.currentTarget.contains(h.relatedTarget)&&f()},p=h=>{o||(h.stopPropagation(),a.on(i,u,u))},m=(h,g)=>{a.off(),!g&&f()};return cs(o,e,l),ee(()=>{n&&s&&t.current&&t.current.focus()},[t,n,s]),{setHover:u,onBlur:d,onPointerMove:p,onPointerLeave:m}},ke=Er("MenuItem",function({className:t,value:n,href:o,type:i,checked:s,disabled:a,children:c,onClick:l,isHovering:u,itemRef:f,externalRef:d,...p}){const m=!!a,{setHover:h,...g}=ls(f,f,u,m),_=Ne(Tr),T=Ne(yc),y=i==="radio",x=i==="checkbox",b=!!o&&!m&&!y&&!x,w=y?T.value===n:x?!!s:!1,E=C=>{if(m){C.stopPropagation(),C.preventDefault();return}const R={value:n,syntheticEvent:C};C.key!==void 0&&(R.key=C.key),x&&(R.checked=!w),y&&(R.name=T.name),Ve(l,R),y&&Ve(T.onRadioChange,R),_.handleClick(R,x||y)},A=C=>{if(u)switch(C.key){case $e.ENTER:C.preventDefault();case $e.SPACE:b?f.current.click():E(C)}},O=le(()=>({type:i,disabled:m,hover:u,checked:w,anchor:b}),[i,m,u,w,b]),M=Xt({...g,onPointerDown:h,onKeyDown:A,onClick:E},p),k={role:y?"menuitemradio":x?"menuitemcheckbox":wr,"aria-checked":y||x?w:void 0,...go(m,u),...M,ref:Qt(d,f),className:et({block:Je,element:yr,modifiers:O,className:t}),children:le(()=>Ve(c,O),[c,O])};return b?r("li",{role:bn,children:r("a",{href:o,...k})}):r("li",{...k})}),zc=Er("FocusableItem",function({className:t,disabled:n,children:o,isHovering:i,itemRef:s,externalRef:a,...c}){const l=!!n,u=$(null),{setHover:f,onPointerLeave:d,...p}=ls(s,u,i,l),{handleClose:m}=Ne(Tr),h=le(()=>({disabled:l,hover:i,focusable:!0}),[l,i]),g=le(()=>Ve(o,{...h,ref:u,closeMenu:m}),[o,h,m]),_=Xt({...p,onPointerLeave:T=>d(T,!0),onFocus:f},c);return r("li",{role:wr,...go(l),..._,ref:Qt(a,s),className:et({block:Je,element:yr,modifiers:h,className:t}),children:g})}),nn=ut(Pt(function({className:t,...n},o){return r("li",{role:"separator",...n,ref:o,className:et({block:Je,element:mc,className:t})})})),vf=ut(Pt(function({className:t,...n},o){return r("li",{role:bn,...n,ref:o,className:et({block:Je,element:gc,className:t})})})),_f=Pt(function({className:t,style:n,takeOverflow:o,...i},s){const a=$(null),[c,l]=Y(),{overflow:u,overflowAmt:f}=Ne(so);return jt(()=>{let d;o&&f>=0&&(d=ts(a.current).height-f,d<0&&(d=0)),l(d>=0?{maxHeight:d,overflow:u}:void 0)},[o,u,f]),jt(()=>{c&&(a.current.scrollTop=0)},[c]),r("div",{...i,ref:Qt(s,a),className:et({block:Je,element:vc,className:t}),style:{...n,...c}})});const ri={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},on={},cn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),eo=cn.getContext("2d",{willReadFrequently:!0});eo.imageSmoothingEnabled=!1;function Vc({url:e,size:t,alt:n="",squircle:o,...i}){t=ri[t]||t||ri.m;const s=$(),a=/missing\.png$/.test(e);return r("span",{ref:s,class:`avatar ${o?"squircle":""} ${on[e]?"has-alpha":""}`,style:{width:t,height:t},title:n,...i,children:!!e&&r("img",{src:e,width:t,height:t,alt:n,loading:"lazy",decoding:"async",crossOrigin:on[e]===void 0&&!a?"anonymous":void 0,onError:c=>{c.target.crossOrigin&&(c.target.crossOrigin=null,c.target.src=e)},onLoad:c=>{s.current&&(s.current.dataset.loaded=!0),on[e]===void 0&&(a||setTimeout(()=>{try{const{width:l,height:u}=c.target;cn.width!==l&&(cn.width=l),cn.height!==u&&(cn.height=u),eo.drawImage(c.target,0,0);const f=eo.getImageData(0,0,l,u),d=f.data.filter((p,m)=>m%4===3&&p<=128).length/(f.data.length/4)>.1;d&&s.current.classList.add("has-alpha"),on[e]=d,eo.clearRect(0,0,l,u)}catch{on[e]=!1}},1))}})})}const at=Ke(Vc),Kt=Pt((e,t)=>{var c;let n;try{n=Ea()}catch{}let o=(location.hash||"").replace(/^#/,"").trim();o===""&&(o="/");const{to:i,...s}=e;if(o&&o!=="/"&&o.includes("?")){const l=URL.parse(o,location.origin);if((c=l==null?void 0:l.searchParams)!=null&&c.size){const u=Array.from(l.searchParams.entries()).map(([f,d])=>`${f}=${encodeURIComponent(d)}`).join("&");o=l.pathname+"?"+u}}const a=o===i||decodeURIComponent(o)===i;return r("a",{ref:t,href:`#${i}`,...s,class:`${e.class||""} ${a?"is-active":""}`,onClick:l=>{var u,f,d;(f=(u=l.currentTarget)==null?void 0:u.parentNode)!=null&&f.closest("a")&&l.stopPropagation(),n&&(B.prevLocation=n),(d=e.onClick)==null||d.call(e,l)}})});let er=!1;const Hc=new MutationObserver(e=>{e.forEach(t=>{if(t.type==="attributes"){const{dir:n}=t.target;n==="rtl"?er=!0:er=!1}})});Hc.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function tr(){return er}const Bc=document.documentElement,Un=getComputedStyle(Bc),Uc=8;let us=[0,0,0,0];function ds(){const e=Un.getPropertyValue("--sai-top"),t=Un.getPropertyValue("--sai-right"),n=Un.getPropertyValue("--sai-bottom"),o=Un.getPropertyValue("--sai-left");us=[Math.max(0,parseInt(e,10)),Math.max(0,parseInt(t,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(o,10))]}requestAnimationFrame(ds);function fs(e=[]){return us.map((n,o)=>(n||Uc)+(e[o]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",ds,{passive:!0});function jc(){const[e,t]=Y({width:null,height:null});return gn(()=>{const n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),e}function hs(e){const{containerProps:t,instanceRef:n,align:o}=e,i=jc(),s=n!=null&&n.current?n:$(),a=tr()?o==="end"?"start":o==="start"?"end":o:o;return r(Nc,{boundingBoxPadding:fs(),repositionFlag:`${i.width}x${i.height}`,unmountOnClose:!0,...e,align:a,instanceRef:s,containerProps:{onClick:c=>{var l,u,f;c.target===c.currentTarget&&((u=(l=s.current)==null?void 0:l.closeMenu)==null||u.call(l)),(f=t==null?void 0:t.onClick)==null||f.call(t,c)},...t}})}function Wc(e){const t=$();return r(Fc,{...e,instanceRef:t,itemProps:{onPointerMove:n=>{var o,i;n.pointerType==="touch"&&((i=(o=t.current)==null?void 0:o.openMenu)==null||i.call(o))},onPointerLeave:n=>{var o,i;n.pointerType==="touch"&&((i=(o=t.current)==null?void 0:o.openMenu)==null||i.call(o))}}})}function Po({subMenu:e=!1,confirm:t=!0,confirmLabel:n,menuItemClassName:o,menuFooter:i,menuExtras:s,...a}){const{children:c,onClick:l,...u}=a;return t?r(e?Wc:hs,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...u,menuButton:e?void 0:c,label:e?c:void 0,children:[r(ke,{className:o,onClick:l,children:n}),s,i]}):e?r(ke,{...a}):l?xa(c,{onClick:l}):c}function ii(e){const{className:t,disabled:n,...o}=e;return r(zc,{className:t,disabled:n,children:({ref:i,closeMenu:s})=>r(Kt,{...o,ref:i,onClick:({detail:a})=>s(a===0?"Enter":void 0)})})}function nr({staticUrl:e,alt:t,url:n}){return r("picture",{children:[e&&r("source",{srcset:e,media:"(prefers-reduced-motion: reduce)"}),r("img",{src:n,alt:t,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async"},t||n)]})}function Kc({text:e,emojis:t}){if(!e)return"";if(!(t!=null&&t.length)||e.indexOf(":")===-1)return e;const n=new RegExp(`:(${t.map(i=>i.shortcode).join("|")}):`,"g");return e.split(n).map(i=>{const s=t.find(a=>a.shortcode===i);if(s){const{url:a,staticUrl:c}=s;return r(nr,{staticUrl:c,alt:i,url:a})}return i})}const Zt=ut(Kc,(e,t)=>{var n,o;return e.text===t.text&&((n=e.emojis)==null?void 0:n.length)===((o=t.emojis)==null?void 0:o.length)}),Zc=Ke(e=>{const t={sensitivity:"base"};try{return new Intl.Collator(e||void 0,t)}catch{return new Intl.Collator(void 0,t)}});function qc({account:e,instance:t,showAvatar:n,showAcct:o,short:i,external:s,onClick:a}){const{i18n:c}=mo(),{acct:l,avatar:u,avatarStatic:f,id:d,url:p,displayName:m,emojis:h,bot:g,username:_}=e,[T,y,x]=l.match(/([^@]+)(@.+)/i)||[,l];t||(t=io().instance);const b=_.toLowerCase().trim(),w=(m||"").toLowerCase().trim(),E=w.replace(/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,"").replace(/\s+/g,""),A=E.replace(/[^a-z0-9@\.]/gi,""),O=!i&&(b===w||b===E||b===A||Zc(c.locale).compare(b,E)===0)||A===l.toLowerCase();return r("a",{class:`name-text ${o?"show-acct":""} ${i?"short":""}`,href:p,target:s?"_blank":null,title:m?`${m} (${x?"":"@"}${l})`:`${x?"":"@"}${l}`,onClick:M=>{if(!s&&!M.shiftKey){if(M.preventDefault(),M.stopPropagation(),a)return a(M);if(M.metaKey||M.ctrlKey||M.shiftKey||M.which===2){const k=`#/${t}/a/${d}`;window.open(k,"_blank");return}B.showAccount={account:e,instance:t}}},children:[n&&r(N,{children:[r(at,{url:f||u,squircle:g})," "]}),m&&!i?r(N,{children:[r("b",{dir:"auto",children:r(Zt,{text:m,emojis:h})}),!o&&!O&&r(N,{children:[" ",r("i",{class:"bidi-isolate",children:["@",_]})]})]}):i?r("i",{children:_}):r("b",{children:_}),o&&r(N,{children:[r("br",{}),r("i",{class:"bidi-isolate",children:[x?"":"@",y,!!x&&r("span",{class:"ib",children:x})]})]})]})}const At=ut(qc,(e,t)=>{const{account:n}=e,{account:o}=t;return(n==null?void 0:n.acct)===(o==null?void 0:o.acct)}),jn={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},Lo=Ke(e=>new Intl.DisplayNames(e||void 0,{type:"language"}));function Yc(e){let t,n;typeof e=="object"&&({code:e,locale:t,fallback:n}=e);try{const o=Lo(t||S.locale).of(e);if(o!==e)return o;if(!n){const i=Lo(e).of(e);if(i!==e)return i}return n||""}catch{if(jn[e])try{const i=Lo(jn[t]||t||S.locale).of(jn[e]);return i!==jn[e]?i:n||""}catch{}return n||""}}const rn=Ke(Yc);function si(e){if(e instanceof Date)return!isNaN(e.getTime());{const t=new Date(e);return!isNaN(t.getTime())}}const Gc=new Intl.DateTimeFormat().resolvedOptions().locale,ai=Ke((e,t={})=>{const n=e.replace(/-[a-z]+$/i,""),o=vn([n],[Gc],e);try{return new Intl.DateTimeFormat(o,t)}catch{}try{return new Intl.DateTimeFormat(e,t)}catch{}return new Intl.DateTimeFormat(void 0,t)}),Xc=Ke(e=>new Intl.RelativeTimeFormat(e||void 0)),qt=60,Yt=60*qt,or=24*Yt,Qc=e=>{const t=Xc(S.locale),n=(e.getTime()-Date.now())/1e3,o=Math.abs(n);return o<qt?t.format(n,"second"):o<Yt?t.format(Math.floor(n/qt),"minute"):o<or?t.format(Math.floor(n/Yt),"hour"):t.format(Math.floor(n/or),"day")},Jc=e=>{const t=(Date.now()-e.getTime())/1e3;return t<qt?S._({values:{0:t<1?1:Math.floor(t)},id:"NnRCUm"}):t<Yt?S._({values:{0:Math.floor(t/qt)},id:"ZSWUwq"}):S._({values:{0:Math.floor(t/Yt)},id:"NSSJsj"})};function vt({datetime:e,format:t}){if(!e)return null;const[n,o]=zi(l=>l+1,0),i=le(()=>new Date(e),[e]),[s,a,c]=le(()=>{if(!si(i))return[""+e,"",""];let l;if(t==="micro"){const u=new Date;(u.getTime()-i.getTime())/1e3/or<=1?l=Jc(i):u.getFullYear()===i.getFullYear()?l=ai(S.locale,{year:void 0,month:"short",day:"numeric"}).format(i):l=ai(S.locale,{dateStyle:"short"}).format(i)}return l||(l=Qc(i)),[l,i.toISOString(),i.toLocaleString()]},[i,t,n]);return ee(()=>{if(!si(i))return;let l,u;function f(){u=requestAnimationFrame(()=>{o(),d()})}function d(){const p=(Date.now()-i.getTime())/1e3;p<qt?l=setTimeout(f,1e4):p<Yt&&(l=setTimeout(f,6e4))}return d(),()=>{clearTimeout(l),cancelAnimationFrame(u)}},[]),r("time",{datetime:a,title:c,children:s})}const el=[{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"zh_HANT",name:"Chinese (Traditional)"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}],tl=[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages],nl=vn(tl,el.map(e=>e.code.replace("_","-")),"en");function ps(e=!1){if(e){const{contentTranslationTargetLanguage:t}=B.settings;if(t)return t}return nl}const ol=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,uo=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(ol);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},ci=e=>e==="*"||e==="x"||e==="X",li=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},rl=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],il=(e,t)=>{if(ci(e)||ci(t))return 0;const[n,o]=rl(li(e),li(t));return n>o?1:n<o?-1:0},Bt=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const o=il(e[n]||"0",t[n]||"0");if(o!==0)return o}return 0},sl=(e,t)=>{const n=uo(e),o=uo(t),i=n.pop(),s=o.pop(),a=Bt(n,o);return a!==0?a:i&&s?Bt(i.split("."),s.split(".")):i||s?i?-1:1:0},al=(e,t,n)=>{cl(n);const o=sl(e,t);return ms[n].includes(o)},ms={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ui=Object.keys(ms),cl=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(ui.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${ui.join("|")}`)},to=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(_=>to(e,_));if(t.includes(" - ")){const[_,T]=t.split(" - ",2);return to(e,`>=${_} <=${T}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(_=>to(e,_));const n=t.match(/^([<>=~^]+)/),o=n?n[1]:"=";if(o!=="^"&&o!=="~")return al(e,t,o);const[i,s,a,,c]=uo(e),[l,u,f,,d]=uo(t),p=[i,s,a],m=[l,u??"x",f??"x"];if(d&&(!c||Bt(p,m)!==0||Bt(c.split("."),d.split("."))===-1))return!1;const h=m.findIndex(_=>_!=="0")+1,g=o==="~"?2:h>1?h:1;return!(Bt(p.slice(0,g),m.slice(0,g))!==0||Bt(p.slice(g),m.slice(g))===-1)};const ll={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3","@mastodon/trending-link-posts":"~4.3 || >=4.3","@mastodon/grouped-notifications":"~4.3 || >=4.3"},Mo=/pixelfed/i,rt=/^(?!.*pixelfed).*$/i,di={"@mastodon/lists":rt,"@mastodon/filters":rt,"@mastodon/mentions":rt,"@mastodon/trending-hashtags":rt,"@mastodon/trending-links":rt,"@mastodon/post-bookmark":rt,"@mastodon/post-edit":rt,"@mastodon/profile-edit":rt,"@mastodon/profile-private-note":rt,"@pixelfed/trending":Mo,"@pixelfed/home-include-reblogs":Mo,"@pixelfed/global-feed":Mo},Wn={};function Kn(e){try{const{version:t,domain:n}=Sa(),o=`${n}-${e}`;if(Wn[o])return Wn[o];if(di[e])return Wn[o]=di[e].test(t);const i=ll[e];return i?Wn[o]=to(t,i,{includePrerelease:!0,loose:!0}):!1}catch{return!1}}const Wt=2147483647,Ge=36,xr=1,Tn=26,ul=38,dl=700,gs=72,vs=128,_s="-",fl=/^xn--/,hl=/[^\0-\x7F]/,pl=/[\x2E\u3002\uFF0E\uFF61]/g,ml={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ro=Ge-xr,Xe=Math.floor,Oo=String.fromCharCode;function pt(e){throw new RangeError(ml[e])}function gl(e,t){const n=[];let o=e.length;for(;o--;)n[o]=t(e[o]);return n}function ys(e,t){const n=e.split("@");let o="";n.length>1&&(o=n[0]+"@",e=n[1]),e=e.replace(pl,".");const i=e.split("."),s=gl(i,t).join(".");return o+s}function bs(e){const t=[];let n=0;const o=e.length;for(;n<o;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<o){const s=e.charCodeAt(n++);(s&64512)==56320?t.push(((i&1023)<<10)+(s&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}const vl=e=>String.fromCodePoint(...e),_l=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ge},fi=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Ts=function(e,t,n){let o=0;for(e=n?Xe(e/dl):e>>1,e+=Xe(e/t);e>Ro*Tn>>1;o+=Ge)e=Xe(e/Ro);return Xe(o+(Ro+1)*e/(e+ul))},ws=function(e){const t=[],n=e.length;let o=0,i=vs,s=gs,a=e.lastIndexOf(_s);a<0&&(a=0);for(let c=0;c<a;++c)e.charCodeAt(c)>=128&&pt("not-basic"),t.push(e.charCodeAt(c));for(let c=a>0?a+1:0;c<n;){const l=o;for(let f=1,d=Ge;;d+=Ge){c>=n&&pt("invalid-input");const p=_l(e.charCodeAt(c++));p>=Ge&&pt("invalid-input"),p>Xe((Wt-o)/f)&&pt("overflow"),o+=p*f;const m=d<=s?xr:d>=s+Tn?Tn:d-s;if(p<m)break;const h=Ge-m;f>Xe(Wt/h)&&pt("overflow"),f*=h}const u=t.length+1;s=Ts(o-l,u,l==0),Xe(o/u)>Wt-i&&pt("overflow"),i+=Xe(o/u),o%=u,t.splice(o++,0,i)}return String.fromCodePoint(...t)},Es=function(e){const t=[];e=bs(e);const n=e.length;let o=vs,i=0,s=gs;for(const l of e)l<128&&t.push(Oo(l));const a=t.length;let c=a;for(a&&t.push(_s);c<n;){let l=Wt;for(const f of e)f>=o&&f<l&&(l=f);const u=c+1;l-o>Xe((Wt-i)/u)&&pt("overflow"),i+=(l-o)*u,o=l;for(const f of e)if(f<o&&++i>Wt&&pt("overflow"),f===o){let d=i;for(let p=Ge;;p+=Ge){const m=p<=s?xr:p>=s+Tn?Tn:p-s;if(d<m)break;const h=d-m,g=Ge-m;t.push(Oo(fi(m+h%g,0))),d=Xe(h/g)}t.push(Oo(fi(d,0))),s=Ts(i,u,c===a),i=0,++c}++i,++o}return t.join("")},yl=function(e){return ys(e,function(t){return fl.test(t)?ws(t.slice(4).toLowerCase()):t})},bl=function(e){return ys(e,function(t){return hl.test(t)?"xn--"+Es(t):t})},xs={version:"2.3.1",ucs2:{decode:bs,encode:vl},decode:ws,encode:Es,toASCII:bl,toUnicode:yl};function fo(e,t=[]){return e?(!t.length||e.indexOf(":")===-1||t.forEach(n=>{const{shortcode:o,staticUrl:i,url:s}=n;e=e.replace(new RegExp(`:${o}:`,"g"),`<picture><source srcset="${i}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${s}" alt=":${o}:" width="16" height="16" loading="lazy" decoding="async" /></picture>`)}),e):""}const Nt=document.createElement("div"),Tl=["u-url","mention","hashtag"];function wl(e,t={}){const{emojis:n,postEnhanceDOM:o=()=>{}}=t;let i=e;const s=document.createElement("div");s.innerHTML=i;const a=/<a/i.test(i),c=i.includes("```");if(a&&(s.querySelectorAll('a:not([target="_blank"])').forEach(d=>{d.setAttribute("target","_blank")}),s.querySelectorAll("a[class]").forEach(d=>{d.classList.forEach(p=>{Tl.includes(p)||d.classList.remove(p)})})),a&&s.querySelectorAll("a[href]").forEach(f=>{/^https?:\/\//i.test(f.textContent.trim())&&(f.classList.add("has-url-text"),kl(f))}),a){const u=s.querySelectorAll("a[href]"),f=[];u.forEach(d=>{const p=d.innerText.trim(),m=d.querySelector("*");if(/^@[^@]+(@[^@]+)?$/g.test(p)){const[h,g,_]=p.split("@");m||(!f.some(([T])=>T===g)||f.some(([T,y])=>T===g&&y===_)?(d.innerHTML=`@<span>${g}</span>`,f.push([g,_])):d.innerHTML=`@<span>${g}@${_}</span>`),d.classList.add("mention")}/^#[^#]+$/g.test(p)&&(m||(d.innerHTML=`#<span>${p.slice(1)}</span>`),d.classList.add("mention","hashtag"))})}let l;if(i.includes(":")&&(l=$o(s),l.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");n&&(f=fo(f,n)),Nt.innerHTML=f,u.replaceWith(...Nt.childNodes)})),c&&[...s.querySelectorAll("p")].filter(f=>/^```[^]+```$/g.test(f.innerText.trim())).forEach(f=>{const d=document.createElement("pre");f.querySelectorAll("br").forEach(p=>p.replaceWith(`
|
|
`)),d.innerHTML=`<code>${f.innerHTML.trim()}</code>`,f.replaceWith(d)}),c&&[...s.querySelectorAll("p")].filter(d=>/^```/g.test(d.innerText)).forEach(d=>{const p=[d];let m=!1,h=d;for(;h.nextElementSibling;){const g=h.nextElementSibling;if(g&&g.tagName==="P")if(/```$/g.test(g.innerText)){p.push(g),m=!0;break}else p.push(g);else break;h=g}if(m){const g=document.createElement("pre");p.forEach(T=>{T.querySelectorAll("br").forEach(y=>y.replaceWith(`
|
|
`))});const _=p.map(T=>T.innerHTML).join(`
|
|
|
|
`);g.innerHTML=`<code tabindex="0">${_}</code>`,d.replaceWith(g),p.forEach(T=>T.remove())}}),i.includes("`")&&(l=$o(s),l.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");/`[^`]+`/g.test(f)&&(f=f.replaceAll(/(`[^]+?`)/g,"<code>$1</code>")),Nt.innerHTML=f,u.replaceWith(...Nt.childNodes)})),/twitter\.com/i.test(i)&&(l=$o(s,{rejectFilter:["A"]}),l.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");/@[a-zA-Z0-9_]+@twitter\.com/g.test(f)&&(f=f.replaceAll(/(@([a-zA-Z0-9_]+)@twitter\.com)/g,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),Nt.innerHTML=f,u.replaceWith(...Nt.childNodes)})),i.includes("#")){let u=null;const f=[...s.querySelectorAll("p")].filter((d,p)=>{let m=0;for(let h=0;h<d.childNodes.length;h++){const g=d.childNodes[h];if(g.nodeType===Node.TEXT_NODE){if(g.textContent.trim()!=="")return!1}else if(g.tagName!=="BR")if(g.tagName==="A"){const _=g.textContent.trim();if(!_||!_.startsWith("#"))return!1;m++}else return!1}if(m>3||m>1&&u&&p===u+1)return u=p,!0});f!=null&&f.length&&f.forEach(d=>{d.classList.add("hashtag-stuffing"),d.title=d.innerText})}return i.includes("<img")&&s.querySelectorAll("img").forEach(u=>{const f=u.getAttribute("width")||u.naturalWidth,d=u.getAttribute("height")||u.naturalHeight;f&&d&&u.style.setProperty("--original-aspect-ratio",`${f}/${d}`)}),o&&queueMicrotask(()=>o(s)),i=s.innerHTML,i}const Ss=Ke(wl),El=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],xl=Object.fromEntries(El.map(e=>[e,!0])),Sl=/^(https?:\/\/(www\.)?|xmpp:)/,Do=30;function kl(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),o=(n.match(Sl)||[])[0]||"";if(!o)return;const i=n.slice(o.length,o.length+Do),s=n.slice(o.length+Do),a=n.slice(o.length).length>Do;e.innerHTML=`<span class="invisible">${o}</span><span class=${a?"ellipsis":""}>${i}</span><span class="invisible">${s}</span>`}catch{}}function $o(e,t={}){var a;const n=[],o=Object.assign({},xl,(a=t.rejectFilter)==null?void 0:a.reduce((c,l)=>(c[l]=!0,c),{})),i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(c){return o[c.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let s;for(;s=i.nextNode();)n.push(s);return n}const Ft=document.createElement("div");function Il(e,t){if(!e)return"";const{preProcess:n}=t||{};return Ft.innerHTML=e.replace(/<\/p>/g,`</p>
|
|
|
|
`).replace(/<\/li>/g,`</li>
|
|
`),Ft.querySelectorAll("br").forEach(o=>{o.replaceWith(`
|
|
`)}),n==null||n(Ft),Ft.querySelectorAll(".invisible").forEach(o=>{o.remove()}),Ft.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),Ft.innerText.replace(/[\r\n]{3,}/g,`
|
|
|
|
`).trim()}const ho=Ke(Il);function Al(e){const{mentions:t=[],instance:n,previewMode:o,statusURL:i}=e||{};return s=>{var f,d;let{target:a}=s;if(a=a.closest("a"),!a||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.which===2)return;const c=(f=a.previousSibling)==null?void 0:f.textContent,l=c==null?void 0:c.endsWith("@"),u=a.innerText.startsWith("@");if((a.classList.contains("u-url")||a.classList.contains("mention"))&&u||l&&!u){const p=(a.querySelector("span")||a).innerText.trim(),m=p.replace(/^@/,""),h=a.getAttribute("href"),g=t.find(_=>_.url===h)||t.find(_=>_.acct===m||_.username===m);if(g)s.preventDefault(),s.stopPropagation(),B.showAccount={account:g.acct,instance:n};else if(!/^http/i.test(p)){s.preventDefault(),s.stopPropagation();const _=a.getAttribute("href");B.showAccount={account:_,instance:n}}}else if(!o){const p=c==null?void 0:c.endsWith("#");if(a.classList.contains("hashtag")||p){s.preventDefault(),s.stopPropagation();const m=a.innerText.replace(/^#/,"").trim(),h=n?`#/${n}/t/${m}`:`#/t/${m}`;location.hash=h}else(d=B.unfurledLinks[a.href])!=null&&d.url&&i!==a.href&&(s.preventDefault(),s.stopPropagation(),B.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${B.unfurledLinks[a.href].url}`)}}}function yf(e,t){return()=>S.number(e,{style:"unit",unit:t,unitDisplay:"long"})}const Cl=new Intl.DateTimeFormat().resolvedOptions().locale,Pl=e=>{const{locale:t,dateYear:n,hideTime:o,formatOpts:i}=e||{},s=t.replace(/-[a-z]+$/i,""),a=vn([s],[Cl],t),c=new Date().getFullYear(),l={year:n===c?void 0:"numeric",month:"short",day:"numeric",hour:o?void 0:"numeric",minute:o?void 0:"numeric",...i};try{return Intl.DateTimeFormat(a,l)}catch{}try{return Intl.DateTimeFormat(t,l)}catch{}return Intl.DateTimeFormat(void 0,l)},Ll=Ke(Pl);function wn(e,t){return e instanceof Date||(e=new Date(e)),Ll({dateYear:e.getFullYear(),locale:S.locale,...t}).format(e)}function it(e){try{return S.number(e,{notation:"compact",roundingMode:"floor"})}catch{return e}}const hi=5e3;function Zn(e){if(e||(e=!0),B.showCompose){B.composerState.minimized?Pe({duration:hi,text:S._({id:"/4fHR1"})}):Pe({duration:hi,text:S._({id:"vvl08N"})});return}Qa(),B.showCompose=e}function bf({skeleton:e,account:t,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:s,internal:a,onClick:c,showActivity:l=!1,showStats:u=!1,accountInstance:f,hideDisplayName:d=!1,relationship:p={},excludeRelationshipAttrs:m=[]}){if(e)return r("div",{class:"account-block skeleton",children:[r(at,{size:n}),r("span",{children:[r("b",{children:"████████"}),r("br",{}),r("span",{class:"account-block-acct",children:"██████"})]})]});if(!t)return null;const{id:h,acct:g,avatar:_,avatarStatic:T,displayName:y,username:x,emojis:b,url:w,statusesCount:E,lastStatusAt:A,bot:O,fields:M,note:k,group:C,followersCount:R,createdAt:z,locked:F}=t;let[se,Q,we]=g.match(/([^@]+)(@.+)/i)||[,g];f&&(we=`@${f}`);const X=M==null?void 0:M.find(ae=>!!ae.verifiedAt&&!!ae.value),ue={};for(const ae in p)m.includes(ae)||(ue[ae]=p[ae]);const te=ue.following||ue.followedBy||ue.requested;return r("a",{class:"account-block",href:w,target:s?"_blank":null,title:we?g:`@${g}`,onClick:ae=>{if(!s){if(ae.preventDefault(),c)return c(ae);a?location.hash=`/${i}/a/${h}`:B.showAccount={account:t,instance:i}}},children:[r(at,{url:o?T:_||T,size:n,squircle:O}),r("span",{class:"account-block-content",children:[!d&&r(N,{children:y?r("b",{children:r(Zt,{text:y,emojis:b})}):r("b",{children:x})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[we?"":"@",Q,r("wbr",{}),we,F&&r(N,{children:[" ",r(L,{icon:"lock",size:"s",alt:S._({id:"G2fuEb"})})]})]}),l&&r("div",{class:"account-block-stats",children:[r(D,{id:"ajzDof",values:{0:it(E)}}),!!A&&r(N,{children:[" ","·"," ",r(D,{id:"f8bJ3C",values:{0:wn(A,{hideTime:!0})}})]})]}),u&&r("div",{class:"account-block-stats",children:[O&&r(N,{children:r("span",{class:"tag collapsed",children:[r(L,{icon:"bot"})," ",r(D,{id:"9Vdq+j"})]})}),!!C&&r(N,{children:r("span",{class:"tag collapsed",children:[r(L,{icon:"group"})," ",r(D,{id:"L8fEEm"})]})}),te&&r("div",{class:"shazam-container-horizontal",children:r("div",{class:"shazam-container-inner",children:ue.following&&ue.followedBy?r("span",{class:"tag minimal",children:r(D,{id:"7oRLbi"})}):ue.requested?r("span",{class:"tag minimal",children:r(D,{id:"Yx0Ud8"})}):ue.following?r("span",{class:"tag minimal",children:r(D,{id:"y6sq5j"})}):ue.followedBy?r("span",{class:"tag minimal",children:r(D,{id:"p3UO/y"})}):null})},p.id),!!R&&r("span",{class:"ib",children:r(D,{id:"Mn1E9C",values:{followersCount:R}})}),!!X&&r("span",{class:"verified-field",children:[r(L,{icon:"check-circle",size:"s",alt:S._({id:"QDEWii"})})," ",r("span",{dangerouslySetInnerHTML:{__html:Ss(X.value,{emojis:b})}})]}),!O&&!C&&!te&&!R&&!X&&!!z&&r("span",{class:"created-at",children:r(D,{id:"PCcEFZ",values:{0:wn(z,{hideTime:!0})},components:{0:r("time",{datetime:z})}})})]})]})]})}var ks={};function We(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var Ml=We;We.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};We.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};We.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},n),this._options.unref&&this._timer.unref(),!0};We.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};We.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};We.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};We.prototype.start=We.prototype.try;We.prototype.errors=function(){return this._errors};We.prototype.attempts=function(){return this._attempts};We.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,o=0;o<this._errors.length;o++){var i=this._errors[o],s=i.message,a=(e[s]||0)+1;e[s]=a,a>=n&&(t=i,n=a)}return t};(function(e){var t=Ml;e.operation=function(n){var o=e.timeouts(n);return new t(o,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(n){if(n instanceof Array)return[].concat(n);var o={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)o[i]=n[i];if(o.minTimeout>o.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var s=[],a=0;a<o.retries;a++)s.push(this.createTimeout(a,o));return n&&n.forever&&!s.length&&s.push(this.createTimeout(a,o)),s.sort(function(c,l){return c-l}),s},e.createTimeout=function(n,o){var i=o.randomize?Math.random()+1:1,s=Math.round(i*Math.max(o.minTimeout,1)*Math.pow(o.factor,n));return s=Math.min(s,o.maxTimeout),s},e.wrap=function(n,o,i){if(o instanceof Array&&(i=o,o=null),!i){i=[];for(var s in n)typeof n[s]=="function"&&i.push(s)}for(var a=0;a<i.length;a++){var c=i[a],l=n[c];n[c]=(function(f){var d=e.operation(o),p=Array.prototype.slice.call(arguments,1),m=p.pop();p.push(function(h){d.retry(h)||(h&&(arguments[0]=d.mainError()),m.apply(this,arguments))}),d.attempt(function(){f.apply(n,p)})}).bind(n,l),n[c].options=o}}})(ks);var Rl=ks;const Ol=fr(Rl),Dl=Object.prototype.toString,$l=e=>Dl.call(e)==="[object Error]",Nl=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed"]);function Fl(e){return e&&$l(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:Nl.has(e.message):!1}class zl extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const pi=(e,t,n)=>{const o=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=o,e};async function Vl(e,t){return new Promise((n,o)=>{t={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...t};const i=Ol.operation(t),s=()=>{var c;i.stop(),o((c=t.signal)==null?void 0:c.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",s,{once:!0});const a=()=>{var c;(c=t.signal)==null||c.removeEventListener("abort",s),i.stop()};i.attempt(async c=>{try{const l=await e(c);a(),n(l)}catch(l){try{if(!(l instanceof Error))throw new TypeError(`Non-error was thrown: "${l}". You should only throw errors.`);if(l instanceof zl)throw l.originalError;if(l instanceof TypeError&&!Fl(l))throw l;if(pi(l,c,t),await t.shouldRetry(l)||(i.stop(),o(l)),await t.onFailedAttempt(l),!i.retry(l))throw i.mainError()}catch(u){pi(u,c,t),a(),o(u)}}})})}const Hl=[{code:"auto",name:"Detect"},{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}];var Bl=Object.defineProperty,Ul=(e,t,n)=>t in e?Bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qn=(e,t,n)=>Ul(e,typeof t!="symbol"?t+"":t,n),rr=new Map,Yn=new WeakMap,mi=0,jl=void 0;function Wl(e){return e?(Yn.has(e)||(mi+=1,Yn.set(e,mi.toString())),Yn.get(e)):"0"}function Kl(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?Wl(e.root):e[t]}`).toString()}function Zl(e){const t=Kl(e);let n=rr.get(t);if(!n){const o=new Map;let i;const s=new IntersectionObserver(a=>{a.forEach(c=>{var l;const u=c.isIntersecting&&i.some(f=>c.intersectionRatio>=f);e.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=u),(l=o.get(c.target))==null||l.forEach(f=>{f(u,c)})})},e);i=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:s,elements:o},rr.set(t,n)}return n}function Is(e,t,n={},o=jl){if(typeof window.IntersectionObserver>"u"&&o!==void 0){const l=e.getBoundingClientRect();return t(o,{isIntersecting:o,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:i,observer:s,elements:a}=Zl(n),c=a.get(e)||[];return a.has(e)||a.set(e,c),c.push(t),s.observe(e),function(){c.splice(c.indexOf(t),1),c.length===0&&(a.delete(e),s.unobserve(e)),a.size===0&&(s.disconnect(),rr.delete(i))}}function ql(e){return typeof e.children!="function"}var Tf=class extends Bi{constructor(e){super(e),qn(this,"node",null),qn(this,"_unobserveCb",null),qn(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=t||null,this.observeNode()}),qn(this,"handleChange",(t,n)=>{t&&this.props.triggerOnce&&this.unobserve(),ql(this.props)||this.setState({inView:t,entry:n}),this.props.onChange&&this.props.onChange(t,n)}),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:n,trackVisibility:o,delay:i,fallbackInView:s}=this.props;this._unobserveCb=Is(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:o,delay:i},s)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:e}=this.props;if(typeof e=="function"){const{inView:m,entry:h}=this.state;return e({inView:m,entry:h,ref:this.handleNode})}const{as:t,triggerOnce:n,threshold:o,root:i,rootMargin:s,onChange:a,skip:c,trackVisibility:l,delay:u,initialInView:f,fallbackInView:d,...p}=this.props;return ka(t||"div",{ref:this.handleNode,...p},e)}};function Yl({threshold:e,delay:t,trackVisibility:n,rootMargin:o,root:i,triggerOnce:s,skip:a,initialInView:c,fallbackInView:l,onChange:u}={}){var f;const[d,p]=Y(null),m=$(),[h,g]=Y({inView:!!c,entry:void 0});m.current=u,ee(()=>{if(a||!d)return;let x;return x=Is(d,(b,w)=>{g({inView:b,entry:w}),m.current&&m.current(b,w),w.isIntersecting&&s&&x&&(x(),x=void 0)},{root:i,rootMargin:o,threshold:e,trackVisibility:n,delay:t},l),()=>{x&&x()}},[Array.isArray(e)?e.toString():e,d,i,o,s,a,n,l,t]);const _=(f=h.entry)==null?void 0:f.target,T=$();!d&&_&&!s&&!a&&T.current!==_&&(T.current=_,g({inView:!!c,entry:void 0}));const y=[p,h.inView,h.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}const gi=48,No={};function As({id:e,children:t}){const n=$(),o=!!No[e],[i,s]=Y(!1),[a,c]=Y(o||!1),{ref:l}=Yl({root:null,rootMargin:`-${gi}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:u=>{u&&(s(!0),e&&(No[e]=!0))},triggerOnce:!0,skip:a||i});return ee(()=>{if(!n.current)return;const u=n.current.getBoundingClientRect();u.bottom>gi&&(u.top<window.innerHeight?s(!0):c(!0),e&&(No[e]=!0))},[]),a?t:r("div",{ref:n,class:"shazam-container no-animation",hidden:!i,children:r("div",{ref:l,class:"shazam-container-inner",children:t})})}const Gl={BASE_URL:"./",DEV:!1,MODE:"production",PHANPY_CLIENT_NAME:"Phanpy",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",PHANPY_WEBSITE:"https://phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"},{PHANPY_LINGVA_INSTANCES:vi}=Gl,fn=vi?vi.split(/\s+/):[],Xl=Ui({limit:1,interval:2e3});let Fo=0;function Ql(e,t,n){return Vl(()=>{let i=fn[Fo];return fetch(`https://${i}/api/v1/${t}/${n}/${encodeURIComponent(e)}`).then(s=>{if(!s.ok)throw new Error(s.statusText);return s.json()}).then(s=>{var a;return{provider:"lingva",content:s.translation,detectedSourceLanguage:(a=s.info)==null?void 0:a.detectedSource,info:s.info}})},{retries:3,onFailedAttempt:i=>{Fo=(Fo+1)%fn.length}})}const Cs=1e3*60*60,Ps=hr(Ql,{maxAge:Cs}),Jl=hr(Xl(Ps),{maxAge:Cs});function eu({forceTranslate:e,sourceLanguage:t,onTranslate:n,text:o="",mini:i,autoDetected:s}){const a=ps(!0),[c,l]=Y("default"),[u,f]=Y(null),[d,p]=Y(null),[m,h]=Y(null),g=$(),_=t?rn(t):null,T=rn(a),y=$("auto");n||(n=i?Jl:Ps);const x=async()=>{var b,w;l("loading");try{const{content:E,detectedSourceLanguage:A,provider:O,error:M,...k}=await n(o,y.current,a);if(E){if(A){const C=rn(A);h(C)}if(O==="lingva"){const C=(w=(b=k==null?void 0:k.info)==null?void 0:b.pronunciation)==null?void 0:w.query;C&&f(C)}p(E),l("default"),!i&&E.trim()!==o.trim()&&(g.current.open=!0,g.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else l("error")}catch{l("error")}};return ee(()=>{e&&x()},[e]),i?d&&d.trim()!==o.trim()&&m!==T?r(As,{children:r("div",{class:"status-translation-block-mini",children:[r(L,{icon:"translate",alt:S._({id:"zVJKbG",values:{sourceLangText:_}})}),r("output",{lang:a,dir:"auto",title:u||"",children:d})]})}):null:r("div",{class:"status-translation-block",onClick:b=>{b.preventDefault()},children:r("details",{ref:g,children:[r("summary",{children:r("button",{type:"button",onClick:async b=>{b.preventDefault(),b.stopPropagation(),g.current.open=!g.current.open,c!=="loading"&&(d||x())},children:[r(L,{icon:"translate"})," ",r("span",{children:c==="loading"?S._({id:"Zxkt/v"}):t&&_&&!m?s?S._({id:"R20Yf9",values:{sourceLangText:_}}):S._({id:"h8zDAI",values:{sourceLangText:_}}):S._({id:"pi8x/S"})})]})}),r("div",{class:"translated-block",children:[r("div",{class:"translation-info insignificant",children:[r("select",{class:"translated-source-select",disabled:c==="loading",onChange:b=>{y.current=b.target.value,x()},children:Hl.map(b=>{const w=rn({code:b.code,fallback:b.name}),E=rn({code:b.code,locale:b.code}),A=w!==E;return r("option",{value:b.code,children:b.code==="auto"?S._({id:"Bze3gr",values:{0:m??"…"}}):A?`${E} - ${w}`:E})})})," ",r("span",{children:["→ ",T]}),r(ji,{abrupt:!0,hidden:c!=="loading"})]}),c==="error"?r("p",{class:"ui-state",children:r(D,{id:"m5LihO"})}):!!d&&r(N,{children:[r("output",{class:"translated-content",lang:a,dir:"auto",children:d}),!!u&&r("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:b=>{b.target.classList.toggle("expand")},children:u})]})]})]})})}const tu=fn!=null&&fn.length?eu:()=>null;function dt(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ls(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const o=dt(n);return(i,s)=>o.then(a=>s(a.transaction(t,i).objectStore(t)))}let zo;function Lt(){return zo||(zo=Ls("keyval-store","keyval")),zo}function nu(e,t=Lt()){return t("readonly",n=>dt(n.get(e)))}function ou(e,t,n=Lt()){return n("readwrite",o=>(o.put(t,e),dt(o.transaction)))}function ru(e,t=Lt()){return t("readonly",n=>Promise.all(e.map(o=>dt(n.get(o)))))}function iu(e,t=Lt()){return t("readwrite",n=>(n.delete(e),dt(n.transaction)))}function su(e,t=Lt()){return t("readwrite",n=>(e.forEach(o=>n.delete(o)),dt(n.transaction)))}function au(e=Lt()){return e("readwrite",t=>(t.clear(),dt(t.transaction)))}function cu(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},dt(e.transaction)}function lu(e=Lt()){return e("readonly",t=>{if(t.getAllKeys)return dt(t.getAllKeys());const n=[];return cu(t,o=>n.push(o.key)).then(()=>n)})}function _i(e,t){const n=Ls(e,t);return{set:(o,i)=>ou(o,i,n),get:o=>nu(o,n),getMany:o=>ru(o,n),del:o=>iu(o,n),delMany:o=>su(o,n),clear:()=>au(n),keys:()=>lu(n)}}const wf={drafts:_i("drafts-db","drafts-store"),catchup:_i("catchup-db","catchup-store")};async function Ef(e,t={}){if(!(e!=null&&e.length))return;const{masto:n}=io(),o=pr(),i=e.reduce((s,a)=>(!s.includes(a.id)&&!t[a.id]&&a.id!==o&&s.push(a.id),s),[]);if(!i.length)return null;try{return(await n.v1.accounts.relationships.fetch({id:i})).reduce((c,l)=>(c[l.id]=l,c),{})}catch{return null}}class Be extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid"]}connectedCallback(){this.addEventListener("pointerover",Be.warmConnections,{once:!0}),this.addEventListener("click",()=>this.addIframe())}get videoId(){return encodeURIComponent(this.getAttribute("videoid")||"")}set videoId(t){this.setAttribute("videoid",t)}get playlistId(){return encodeURIComponent(this.getAttribute("playlistid")||"")}set playlistId(t){this.setAttribute("playlistid",t)}get videoTitle(){return this.getAttribute("videotitle")||"Video"}set videoTitle(t){this.setAttribute("videotitle",t)}get videoPlay(){return this.getAttribute("videoPlay")||"Play"}set videoPlay(t){this.setAttribute("videoPlay",t)}get videoStartAt(){return this.getAttribute("videoStartAt")||"0"}get autoLoad(){return this.hasAttribute("autoload")}get noCookie(){return this.hasAttribute("nocookie")}get posterQuality(){return this.getAttribute("posterquality")||"hqdefault"}get posterLoading(){return this.getAttribute("posterloading")||"lazy"}get params(){return`start=${this.videoStartAt}&${this.getAttribute("params")}`}set params(t){this.setAttribute("params",t)}setupDom(){const t=this.attachShadow({mode:"open"});let n="";window.liteYouTubeNonce&&(n=`nonce="${window.liteYouTubeNonce}"`),t.innerHTML=`
|
|
<style ${n}>
|
|
:host {
|
|
contain: content;
|
|
display: block;
|
|
position: relative;
|
|
width: 100%;
|
|
padding-bottom: calc(100% / (16 / 9));
|
|
}
|
|
|
|
@media (max-width: 40em) {
|
|
:host([short]) {
|
|
padding-bottom: calc(100% / (9 / 16));
|
|
}
|
|
}
|
|
|
|
#frame, #fallbackPlaceholder, iframe {
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
left: 0;
|
|
}
|
|
|
|
#frame {
|
|
cursor: pointer;
|
|
}
|
|
|
|
#fallbackPlaceholder {
|
|
object-fit: cover;
|
|
}
|
|
|
|
#frame::before {
|
|
content: '';
|
|
display: block;
|
|
position: absolute;
|
|
top: 0;
|
|
background-image: linear-gradient(180deg, #111 -20%, transparent 90%);
|
|
height: 60px;
|
|
width: 100%;
|
|
z-index: 1;
|
|
}
|
|
|
|
#playButton {
|
|
width: 68px;
|
|
height: 48px;
|
|
background-color: transparent;
|
|
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>');
|
|
z-index: 1;
|
|
border: 0;
|
|
border-radius: inherit;
|
|
}
|
|
|
|
#playButton:before {
|
|
content: '';
|
|
border-style: solid;
|
|
border-width: 11px 0 11px 19px;
|
|
border-color: transparent transparent transparent #fff;
|
|
}
|
|
|
|
#playButton,
|
|
#playButton:before {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate3d(-50%, -50%, 0);
|
|
cursor: inherit;
|
|
}
|
|
|
|
/* Post-click styles */
|
|
.activated {
|
|
cursor: unset;
|
|
}
|
|
|
|
#frame.activated::before,
|
|
#frame.activated > #playButton {
|
|
display: none;
|
|
}
|
|
</style>
|
|
<div id="frame">
|
|
<picture>
|
|
<source id="webpPlaceholder" type="image/webp">
|
|
<source id="jpegPlaceholder" type="image/jpeg">
|
|
<img id="fallbackPlaceholder" referrerpolicy="origin" loading="lazy">
|
|
</picture>
|
|
<button id="playButton"></button>
|
|
</div>
|
|
`,this.domRefFrame=t.querySelector("#frame"),this.domRefImg={fallback:t.querySelector("#fallbackPlaceholder"),webp:t.querySelector("#webpPlaceholder"),jpeg:t.querySelector("#jpegPlaceholder")},this.domRefPlayButton=t.querySelector("#playButton")}setupComponent(){this.initImagePlaceholder(),this.domRefPlayButton.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.setAttribute("title",`${this.videoPlay}: ${this.videoTitle}`),(this.autoLoad||this.isYouTubeShort())&&this.initIntersectionObserver()}attributeChangedCallback(t,n,o){switch(t){case"videoid":case"playlistid":case"videoTitle":case"videoPlay":{n!==o&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1));break}default:break}}addIframe(t=!1){if(!this.isIframeLoaded){let n=t?0:1;const o=this.noCookie?"-nocookie":"";let i;this.playlistId?i=`?listType=playlist&list=${this.playlistId}&`:i=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1);const s=`
|
|
<iframe frameborder="0" title="${this.videoTitle}"
|
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
|
|
src="https://www.youtube${o}.com/embed/${i}autoplay=${n}&${this.params}"
|
|
></iframe>`;this.domRefFrame.insertAdjacentHTML("beforeend",s),this.domRefFrame.classList.add("activated"),this.isIframeLoaded=!0,this.attemptShortAutoPlay(),this.dispatchEvent(new CustomEvent("liteYoutubeIframeLoaded",{detail:{videoId:this.videoId},bubbles:!0,cancelable:!0}))}}initImagePlaceholder(){var o,i;const t=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,n=`https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;this.domRefImg.fallback.loading=this.posterLoading,this.domRefImg.webp.srcset=t,this.domRefImg.jpeg.srcset=n,this.domRefImg.fallback.src=n,this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),(i=(o=this.domRefImg)==null?void 0:o.fallback)==null||i.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}initIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((o,i)=>{o.forEach(s=>{s.isIntersecting&&!this.isIframeLoaded&&(Be.warmConnections(),this.addIframe(!0),i.unobserve(this))})},t).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{var t,n;(n=(t=this.shadowRoot.querySelector("iframe"))==null?void 0:t.contentWindow)==null||n.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(t,n){const o=document.createElement("link");o.rel=t,o.href=n,o.crossOrigin="true",document.head.append(o)}static warmConnections(){Be.isPreconnected||window.liteYouTubeIsPreconnected||(Be.addPrefetch("preconnect","https://i.ytimg.com/"),Be.addPrefetch("preconnect","https://s.ytimg.com"),Be.addPrefetch("preconnect","https://www.youtube.com"),Be.addPrefetch("preconnect","https://www.google.com"),Be.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Be.addPrefetch("preconnect","https://static.doubleclick.net"),Be.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Be.isPreconnected=!1;customElements.define("lite-youtube",Be);const Ms=new Uint8Array(128);for(let e=0;e<83;e++)Ms["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(e)]=e;const no=(e,t,n)=>{let o=0;for(;t<n;)o*=83,o+=Ms[e.charCodeAt(t++)];return o},Rs=Math.pow,En=Math.PI,uu=En*2,Os=3294.6,Ds=269.025,du=e=>e>10.31475?Rs(e/Ds+.052132,2.4):e/Os,Vo=e=>~~(e>1227e-8?Ds*Rs(e,.416666)-13.025:e*Os+1),hn=e=>(e<0?-1:1)*e*e,yi=e=>{for(e+=En/2;e>En;)e-=uu;const t=1.27323954*e-.405284735*hn(e);return .225*(hn(t)-t)+t};function Sr(e){const t=no(e,2,6);return[t>>16,t>>8&255,t&255]}function fu(e,t,n,o){const i=no(e,0,1),s=i%9+1,a=~~(i/9)+1,c=s*a;let l=0,u=0,f=0,d=0,p=0,m=0,h=0,g=0,_=0,T=0,y=0,x=0;const b=(no(e,1,2)+1)/13446*(o|1),w=new Float64Array(c*3),E=Sr(e);for(l=0;l<3;l++)w[l]=du(E[l]);for(l=1;l<c;l++)x=no(e,4+l*2,6+l*2),w[l*3]=hn(~~(x/361)-9)*b,w[l*3+1]=hn(~~(x/19)%19-9)*b,w[l*3+2]=hn(x%19-9)*b;const A=new Float64Array(a*n),O=new Float64Array(s*t);for(u=0;u<a;u++)for(d=0;d<n;d++)A[u*n+d]=yi(En*d*u/n);for(l=0;l<s;l++)for(f=0;f<t;f++)O[l*t+f]=yi(En*f*l/t);const M=t*4,k=new Uint8ClampedArray(M*n);for(d=0;d<n;d++)for(f=0;f<t;f++){for(p=m=h=0,u=0;u<a;u++)for(_=A[u*n+d],l=0;l<s;l++)g=O[l*t+f]*_,T=(l+u*s)*3,p+=w[T]*g,m+=w[T+1]*g,h+=w[T+2]*g;y=4*f+d*M,k[y]=Vo(p),k[y+1]=Vo(m),k[y+2]=Vo(h),k[y+3]=255}return k}const hu=(e,t={})=>{const n=t.char||" ",o=t.count||2;let i=0;const s=[];return e.reverse().reduce((a,c)=>{s.length&&i&&s[i]&&s[i]===c.substring(1,s[i].length+1)&&(s.splice(i,1),i--);const u=[`${n.repeat(i?i*o:0)}${c}`,...a];return c.substring(0,2)==="</"&&(i++,s[i]=c.substring(2,c.length-1)),u},[]).join(`
|
|
`)};var pu=hu;const $s=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),mu=e=>{const t=$s(e).split(`
|
|
`),n=[];let o="";for(let i=0;i<t.length;i+=1){const s=t[i];if(s.endsWith("/>")){n.push(`${o}${s.slice(0,-2)} />`),o="";continue}if(s.endsWith(">")){n.push(`${o}${s.startsWith(">")||s.startsWith("<")?"":" "}${s}`),o="";continue}o+=o.length?` ${s}`:s}return n};var gu={mergeAttributesWithElements:mu,removeEmptyLines:$s};const vu=pu,{mergeAttributesWithElements:_u}=gu,yu=(e,t={})=>{const n=_u(e);return vu(n,t)};var bu=yu;const Tu=fr(bu);var ln=(e=>(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(ln||{}),un=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(un||{});const Ns=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,wu=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Fs(e){const{nativeEvent:t}=e,n=wu();return n&&t instanceof n||"touches"in e}function zs(e){const t=Ns();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Vs(e){const{nativeEvent:t}=e;if(!t)return!1;const n=Ns();return n&&t instanceof n||"pointerId"in t}function bi(e){return zs(e)||Fs(e)||Vs(e)}function Ti(e){return Fs(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:zs(e)||Vs(e)?{x:e.pageX,y:e.pageY}:null}function Eu(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Hs(e,{threshold:t=400,captureEvent:n=!1,detect:o=ln.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:s=!0,filterEvents:a,onStart:c,onMove:l,onFinish:u,onCancel:f}={}){const d=$(!1),p=$(!1),m=$(),h=$(),g=$(e),_=$(null),T=Ce(w=>E=>{p.current||bi(E)&&(a!==void 0&&!a(E)||(n&&E.persist(),c==null||c(E,{context:w}),_.current=Ti(E),p.current=!0,m.current=E.currentTarget,h.current=setTimeout(()=>{g.current&&(g.current(E,{context:w}),d.current=!0)},t)))},[n,a,c,t]),y=Ce(w=>(E,A)=>{bi(E)&&p.current&&(_.current=null,n&&E.persist(),d.current?u==null||u(E,{context:w}):p.current&&(f==null||f(E,{context:w,reason:A??un.CancelledByRelease})),d.current=!1,p.current=!1,h.current!==void 0&&clearTimeout(h.current))},[n,u,f]),x=Ce(w=>E=>{if(l==null||l(E,{context:w}),i!==!1&&_.current){const A=Ti(E);if(A){const O=i===!0?25:i,M={x:Math.abs(A.x-_.current.x),y:Math.abs(A.y-_.current.y)};(M.x>O||M.y>O)&&y(w)(E,un.CancelledByMovement)}}},[y,i,l]),b=Ce(w=>{if(e===null)return{};switch(o){case ln.Mouse:{const E={onMouseDown:T(w),onMouseMove:x(w),onMouseUp:y(w)};return s&&(E.onMouseLeave=A=>{y(w)(A,un.CancelledOutsideElement)}),E}case ln.Touch:return{onTouchStart:T(w),onTouchMove:x(w),onTouchEnd:y(w)};case ln.Pointer:{const E={onPointerDown:T(w),onPointerMove:x(w),onPointerUp:y(w)};return s&&(E.onPointerLeave=A=>y(w)(A,un.CancelledOutsideElement)),E}}},[e,y,s,o,x,T]);return ee(()=>{if(!window)return;function w(E){const A=Eu(E);y()(A)}return window.addEventListener("mouseup",w),window.addEventListener("touchend",w),window.addEventListener("pointerup",w),()=>{window.removeEventListener("mouseup",w),window.removeEventListener("touchend",w),window.removeEventListener("pointerup",w)}},[y]),ee(()=>()=>{h.current!==void 0&&clearTimeout(h.current)},[]),ee(()=>{g.current=e},[e]),b}function xu({poll:e,lang:t,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const[s,a]=Y("default"),{expired:c,expiresAt:l,id:u,multiple:f,options:d,ownVotes:p,voted:m,votersCount:h,votesCount:g,emojis:_}=e,T=!!l&&new Date(l),y=h||g;let x=0;y<=1e3?x=0:y<=1e4?x=1:y<=1e5&&(x=2);const[b,w]=Y(!1),E=d.every(A=>A.votesCount!==null);return r("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[b&&E||m||c?r(N,{children:[r("div",{class:"poll-options",children:d.map((A,O)=>{const{title:M,votesCount:k}=A,C=y?k/y:0,R=C?C.toLocaleString(S.locale||void 0,{style:"percent",maximumFractionDigits:x}):"0%",z=k>0&&k===Math.max(...d.map(F=>F.votesCount));return r("div",{class:`poll-option poll-result ${z?"poll-option-leading":""}`,style:{"--percentage":`${C*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(Zt,{text:M,emojis:_})}),m&&p.includes(O)&&r(N,{children:[" ",r(L,{icon:"check-circle",alt:S._({id:"IeO7us"})})]})]}),r("div",{class:"poll-option-votes",title:`${k} vote${k===1?"":"s"}`,children:R})]},`${O}-${M}-${k}`)})}),!c&&!m&&r("button",{class:"poll-vote-button plain2",disabled:s==="loading",onClick:A=>{A.preventDefault(),w(!1)},children:[r(L,{icon:"arrow-left",size:"s"})," ",r(D,{id:"L96xSt"})]})]}):r("form",{onSubmit:async A=>{A.preventDefault();const O=A.target,M=new FormData(O),k=[];M.forEach((C,R)=>{R==="poll"&&k.push(C)}),k.length&&(a("loading"),await i(k),a("default"))},children:[r("div",{class:"poll-options",children:d.map((A,O)=>{const{title:M}=A;return r("div",{class:"poll-option",children:r("label",{class:"poll-label",children:[r("input",{type:f?"checkbox":"radio",name:"poll",value:O,disabled:s==="loading",readOnly:n}),r("span",{class:"poll-option-title",children:r(Zt,{text:M,emojis:_})})]})})})}),!n&&r("button",{class:"poll-vote-button",type:"submit",disabled:s==="loading",children:r(D,{id:"lQXQKs"})})]}),r("p",{class:"poll-meta",children:[!c&&!n&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:A=>{A.preventDefault(),a("loading"),(async()=>(await o(),a("default")))()},title:S._({id:"lCF0wC"}),children:r(L,{icon:"refresh",alt:S._({id:"lCF0wC"})})}),!m&&!c&&!n&&E&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:A=>{A.preventDefault(),w(!b)},title:b?S._({id:"L96xSt"}):S._({id:"zCjei3"}),children:[r(L,{icon:b?"eye-open":"eye-close",alt:b?S._({id:"L96xSt"}):S._({id:"zCjei3"})})," "]}),!c&&!n&&" ",r(D,{id:"k7v0Rh",values:{0:it(g),1:it(g),votesCount:g},components:{0:r("span",{title:g}),1:r("span",{title:g})}}),!!h&&h!==g&&r(N,{children:[" ","•"," ",r(D,{id:"jf1i1L",values:{0:it(h),1:it(h),votersCount:h},components:{0:r("span",{title:h}),1:r("span",{title:h})}})]})," ","•"," ",c?T?r(D,{id:"5LwCCI",components:{0:r(vt,{datetime:T})}}):S._({id:"237hSL"}):T?r(D,{id:"ooHDPY",components:{0:r(vt,{datetime:T})}}):S._({id:"O2tNG0"})]})]})}const Bs=lt();function Su(e,t){if(!(e!=null&&e.length))return!1;const n=e.filter(s=>{const{filter:a}=s,c=a.context.includes(t);return c?a.expiresAt?new Date(a.expiresAt)>new Date:c:!1});if(!n.length)return!1;if(n.some(s=>s.filter.filterAction==="hide"))return{action:"hide"};if(n.some(s=>s.filter.filterAction==="warn")){const s=n.map(a=>a.filter.title);return{action:"warn",titles:s,titlesStr:s.join(" • ")}}return!1}const kr=Ke(Su);function ku(e,t,n){var a;const{filtered:o}=e;if(!(o!=null&&o.length)||n&&((a=e.account)==null?void 0:a.id)===n)return!0;const s=kr(o,t);return s?s.action!=="hide":!0}function xf(e,t){if(!(e!=null&&e.length))return[];if(!t)return e;const n=pr();return e.filter(o=>ku(o,t,n))}const Ho=document.createElement("div");function Bo(e){return e?(Ho.innerHTML=e,Ho.querySelectorAll(".invisible").forEach(t=>{t.remove()}),Ho.innerText.length):0}const dn="speechSynthesis"in window;function wi(e,t){if(dn)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(e);t&&(n.lang=t),speechSynthesis.speak(n)}catch(n){alert(n)}}function Us(e){var a;const{spoilerText:t,content:n,poll:o,mediaAttachments:i}=e;let s="";return t!=null&&t.trim()?s+=t:s+=ho(n),s=s.trim(),(a=o==null?void 0:o.options)!=null&&a.length&&(s+=`
|
|
|
|
📊:
|
|
${o.options.map(c=>`${o.multiple?"▪️":"•"} ${c.title}`).join(`
|
|
`)}`),i!=null&&i.length&&(s+=" "+i.map(c=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[c.type]||"").join("")),s}function Iu(e,t,n){var o=this,i=$(null),s=$(0),a=$(null),c=$([]),l=$(),u=$(),f=$(e),d=$(!0);f.current=e;var p=typeof window<"u",m=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var h=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,_="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,y=_?Math.max(+n.maxWait||0,t):null;ee(function(){return d.current=!0,function(){d.current=!1}},[]);var x=le(function(){var b=function(k){var C=c.current,R=l.current;return c.current=l.current=null,s.current=k,u.current=f.current.apply(R,C)},w=function(k,C){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(k):setTimeout(k,C)},E=function(k){if(!d.current)return!1;var C=k-i.current;return!i.current||C>=t||C<0||_&&k-s.current>=y},A=function(k){return a.current=null,g&&c.current?b(k):(c.current=l.current=null,u.current)},O=function k(){var C=Date.now();if(E(C))return A(C);if(d.current){var R=t-(C-i.current),z=_?Math.min(R,y-(C-s.current)):R;w(k,z)}},M=function(){if(p||T){var k=Date.now(),C=E(k);if(c.current=[].slice.call(arguments),l.current=o,i.current=k,C){if(!a.current&&d.current)return s.current=i.current,w(O,t),h?b(i.current):u.current;if(_)return w(O,t),b(i.current)}return a.current||w(O,t),u.current}};return M.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),s.current=0,c.current=i.current=l.current=a.current=null},M.isPending=function(){return!!a.current},M.flush=function(){return a.current?A(Date.now()):u.current},M},[h,_,t,y,g,m,p,T]);return x}function Au(e,t,n){var o=n===void 0?{}:n,i=o.leading,s=o.trailing;return Iu(e,t,{maxWait:t,leading:i===void 0||i,trailing:s===void 0||s})}function Cu(e,t){var n=$(null),o=$(null);o.current=t;var i=$(null);ee(function(){s()});var s=Ce(function(){var a=i.current,c=o.current,l=a||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===l&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:e,cleanup:l?e(l):void 0})},[e]);return ee(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Ce(function(a){i.current=a,s()},[s])}function Ei(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function Pu(e){e===void 0&&(e={});var t=e.onResize,n=$(void 0);n.current=t;var o=e.round||Math.round,i=$(),s=Y({width:void 0,height:void 0}),a=s[0],c=s[1],l=$(!1);ee(function(){return l.current=!1,function(){l.current=!0}},[]);var u=$({width:void 0,height:void 0}),f=Cu(Ce(function(d){return(!i.current||i.current.box!==e.box||i.current.round!==o)&&(i.current={box:e.box,round:o,instance:new ResizeObserver(function(p){var m=p[0],h=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=Ei(m,h,"inlineSize"),_=Ei(m,h,"blockSize"),T=g?o(g):void 0,y=_?o(_):void 0;if(u.current.width!==T||u.current.height!==y){var x={width:T,height:y};u.current.width=T,u.current.height=y,n.current?n.current(x):l.current||c(x)}})}),i.current.instance.observe(d,{box:e.box}),function(){i.current&&i.current.instance.unobserve(d)}},[e.box,o]),e.ref);return le(function(){return{ref:f,width:a.width,height:a.height}},[f,a.width,a.height])}function oo({className:e="truncated"}={}){const t=$(),n=Au(({height:o})=>{if(t.current){const{scrollHeight:i}=t.current;let s=i>o;if(s){const{height:a,maxHeight:c}=getComputedStyle(t.current),l=parseInt(c||a,10);s=i>l}t.current.classList.toggle(e,s)}},300);return Pu({ref:t,box:"border-box",onResize:n}),t}const pn={public:"earth",unlisted:"group",private:"lock",direct:"message"};var js="kvfysmfp",Ws="ufhsfnkm",Lu=".".concat(js,"{overflow:hidden;touch-action:none}.").concat(Ws,"{transform-origin: 0 0}"),Mu=typeof window>"u",Ru=function(){return!Mu&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Ou=function(e){var t=e.x,n=e.y,o=e.scale;return"scale3d(".concat(o,",").concat(o,", 1) translate3d(").concat(t,"px, ").concat(n,"px, 0)")};var Du=Math.min,$u=Math.max;function xi(e){var t=e.containerDimension,n=e.childDimension,o=e.padding,i=e.centerContained,s=n-t;return s+2*o<=0&&i?[s/2,s/2]:[Du(s+o,0)-o,$u(0,s+o)]}var Si=function(e,t){return t?"".concat(e," ").concat(t):e},Gn=Math.abs,Nu=Math.min,Fu=Math.sqrt,Ks=typeof window>"u",zu=Ks?!1:/(Mac)/i.test(navigator.platform),zt=function(e){return e==="drag"},sn=function(e){return e==="zoom"},Vu=function(e){return zu&&e.ctrlKey},an=function(e){e.stopPropagation(),e.preventDefault()},ki=function(e,t){var n=e.x-t.x,o=e.y-t.y;return Fu(n*n+o*o)},Hu=function(e,t){var n=ki(e[0],e[1]),o=ki(t[0],t[1]);return o/n},Bu=function(e,t){return e>t-.01&&e<t+.01},Uu=function(e){return-Math.cos(e*Math.PI)/2+.5},ju=function(e){return{x:e.pageX,y:e.pageY}},Xn=function(e){return Array.from(e).map(ju)},Ii=function(e,t){return e+t},Wu=function(e){return{x:e.map(function(t){var n=t.x;return n}).reduce(Ii,0)/e.length,y:e.map(function(t){var n=t.y;return n}).reduce(Ii,0)/e.length}},Uo=function(e,t,n){return n<e?e:n>t?t:n},Ku=function(e){return!(e.ctrlKey||e.metaKey)},Zu=function(e){if(e){var t=e.offsetWidth,n=e.offsetHeight;if(t&&n)return{width:t,height:n};var o=getComputedStyle(e),i=parseFloat(o.width),s=parseFloat(o.height);if(s&&i)return{width:i,height:s}}return{width:0,height:0}},qu=function(e,t){return{x:t.x-e.x,y:t.y-e.y}},Yu=function(e,t){return e.x===t.x&&e.y===t.y},kt=function(){},Qn={x:0,y:0},Ai=function(e){Ia(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._prevDragMovePoint=null,n._containerObserver=null,n._fingers=0,n._firstMove=!0,n._initialOffset=De({},Qn),n._interaction=null,n._isDoubleTap=!1,n._isOffsetsSet=!1,n._lastDragPosition=null,n._lastScale=1,n._lastTouchStart=0,n._lastZoomCenter=null,n._listenMouseMove=!1,n._nthZoom=0,n._offset=De({},Qn),n._startOffset=De({},Qn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=De({},Qn),n._ignoreNextClick=!1,n._containerRef=Aa(),n._handleClick=function(o){n._ignoreNextClick&&(n._ignoreNextClick=!1,o.stopPropagation())},n._onResize=function(){var o;!((o=n._containerRef)===null||o===void 0)&&o.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(o){n._fingers=o.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(sn(n._interaction)||zt(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&an(o),zt(n._interaction)&&!n._enoughToDrag()&&n._handleClick(o),n._updateInteraction(o)}),n._handlerOnTouchStart=n._handlerIfEnable(function(o){n._firstMove=!0,n._fingers=o.touches.length,n._detectDoubleTap(o)}),n._handlerOnTouchMove=n._handlerIfEnable(function(o){n._isDoubleTap||(n._collectInertia(o),n._firstMove?(n._updateInteraction(o),n._interaction&&an(o),n._startOffset=De({},n._offset),n._startTouches=Xn(o.touches)):(sn(n._interaction)?n._startTouches&&n._startTouches.length===2&&o.touches.length===2&&n._handleZoom(o,Hu(n._startTouches,Xn(o.touches))):zt(n._interaction)&&n._handleDrag(o),n._interaction&&(an(o),n._update())),n._firstMove=!1)}),n._handlerWheel=function(o){if(!n.props.shouldInterceptWheel(o)){an(o);var i=o.pageX,s=o.pageY,a=o.deltaY,c=o.deltaMode,l=1;(Vu(o)||c===1)&&(l=15);var u={touches:[{pageX:i,pageY:s}]},f=n._getOffsetByFirstTouch(u),d=a*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-d/n.props.wheelScaleFactor,f),n._update(),clearTimeout(n._wheelTimeOut),n._wheelTimeOut=setTimeout(function(){return n._sanitize()},100)}},n._handlers=n.props.isTouch()?[["touchstart",n._handlerOnTouchStart],["touchend",n._handlerOnTouchEnd],["touchmove",n._handlerOnTouchMove]]:[["mousemove",n.simulate(n._handlerOnTouchMove),n.props._document],["mouseup",n.simulate(n._handlerOnTouchEnd),n.props._document],["mousedown",n.simulate(n._handlerOnTouchStart)],["click",n._handleClick],["wheel",n._handlerWheel]],n}return t.prototype._handleDragStart=function(n){this._ignoreNextClick=!0,this.props.onDragStart(),this._stopAnimation(),this._resetInertia(),this._lastDragPosition=null,this._hasInteraction=!0,this._draggingPoint=this._offset,this._handleDrag(n)},t.prototype._handleDrag=function(n){var o=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(o,this._lastDragPosition):this._virtualDrag(o,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=o},t.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},t.prototype._realizeInertia=function(){var n=this,o=this.props,i=o.inertiaFriction,s=o.inertia;if(!(!s||!this._velocity)){var a=this._velocity,c=a.x,l=a.y;if(c||l){this._stopAnimation(),this._resetInertia();var u=function(){if(c*=i,l*=i,!c&&!l)return n._stopAnimation();var f=De({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),Yu(f,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(u,{duration:9999})}}},t.prototype._collectInertia=function(n){var o=n.touches;if(this.props.inertia){var i=Xn(o)[0],s=this._prevDragMovePoint;s&&(this._velocity=qu(i,s)),this._prevDragMovePoint=i}},t.prototype._handleDragEnd=function(){this.props.onDragEnd(),this._end(),this._realizeInertia()},t.prototype._handleZoomStart=function(){this.props.onZoomStart(),this._stopAnimation(),this._lastScale=1,this._nthZoom=0,this._lastZoomCenter=null,this._hasInteraction=!0},t.prototype._handleZoom=function(n,o){var i=Wu(this._getOffsetTouches(n)),s=o/this._lastScale;this._lastScale=o,this._nthZoom+=1,this._nthZoom>3&&(this._scale(s,i),this._drag(i,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=i},t.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},t.prototype._handleDoubleTap=function(n){var o=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var i=this.props.doubleTapZoomOutOnMaxScale&&this._zoomFactor===this.props.maxZoom||this.props.doubleTapToggleZoom&&this._zoomFactor>1;this.props.onDoubleTap(),this._ignoreNextClick=!0;var s=this._zoomFactor+this.props.tapZoomFactor,a=this._zoomFactor,c=function(u){o._scaleTo(a+u*(s-a),l)},l=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,a>s&&(l=this._getCurrentZoomCenter()),i?this._zoomOutAnimation():this._animate(c)}},t.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=o.width,s=o.height,a=-Gn(i*this._getInitialZoomFactor()-n.width)/2,c=-Gn(s*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:a,y:c}},t.prototype._resetOffset=function(){this._offset=De({},this._initialOffset)},t.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},t.prototype._sanitizeOffset=function(n){var o=this._getContainerRect(),i=this._getChildSize(),s=i.width,a=i.height,c=s*this._getInitialZoomFactor()*this._zoomFactor,l=a*this._getInitialZoomFactor()*this._zoomFactor,u=xi({containerDimension:o.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),f=u[0],d=u[1],p=xi({containerDimension:o.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),m=p[0],h=p[1];return{x:Uo(f,d,n.x),y:Uo(m,h,n.y)}},t.prototype.alignCenter=function(n){var o=this,i=De({duration:250,animated:!0},n),s=i.x,a=i.y,c=i.scale,l=i.animated,u=i.duration,f=s*this._initialZoomFactor,d=a*this._initialZoomFactor,p=this._zoomFactor,m=De({},this._offset),h=this._getContainerRect(),g={x:h.width/2,y:h.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-f),y:-(g.y-d)},this._scaleTo(c,g),this._stopAnimation(),!l)return this._update();var _=this._zoomFactor-p,T={x:this._offset.x-m.x,y:this._offset.y-m.y};this._zoomFactor=p,this._offset=De({},m);var y=function(x){var b=m.x+T.x*x,w=m.y+T.y*x;o._zoomFactor=p+_*x,o._offset=o._sanitizeOffset({x:b,y:w}),o._update()};this._animate(y,{callback:function(){return o._sanitize()},duration:u})},t.prototype.scaleTo=function(n){var o=this,i=De({duration:250,animated:!0},n),s=i.x,a=i.y,c=i.scale,l=i.animated,u=i.duration,f=this._zoomFactor,d=De({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(c,{x:s,y:a}),this._stopAnimation(),!l)return this._update();var p=this._zoomFactor-f,m={x:this._offset.x-d.x,y:this._offset.y-d.y};this._zoomFactor=f,this._offset=De({},d);var h=function(g){var _=d.x+m.x*g,T=d.y+m.y*g;o._zoomFactor=f+p*g,o._offset={x:_,y:T},o._update()};this._animate(h,{callback:function(){return o._sanitize()},duration:u})},t.prototype._scaleTo=function(n,o){this._scale(n/this._zoomFactor,o),this._offset=this._sanitizeOffset(this._offset)},t.prototype._scale=function(n,o){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(o.x+this._offset.x),y:(n-1)*(o.y+this._offset.y)}),this.props.onZoomUpdate()},t.prototype._scaleZoomFactor=function(n){var o=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=Uo(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/o},t.prototype._canDrag=function(){return this.props.draggableUnZoomed||!Bu(this._zoomFactor,1)},t.prototype._drag=function(n,o){if(o){var i=-(n.y-o.y),s=-(n.x-o.x);this.props.lockDragAxis?Gn(s)>Gn(i)?this._addOffset({x:s,y:0}):this._addOffset({y:i,x:0}):this._addOffset({x:s,y:i}),this.props.onDragUpdate()}},t.prototype._virtualDrag=function(n,o){if(o){var i=-(n.y-o.y),s=-(n.x-o.x);this._draggingPoint={x:s+this._draggingPoint.x,y:i+this._draggingPoint.y}}},t.prototype._addOffset=function(n){var o=this._offset,i=o.x,s=o.y;this._offset={x:i+n.x,y:s+n.y}},t.prototype._sanitize=function(){this._zoomFactor<this.props.zoomOutFactor?(this._resetInertia(),this._zoomOutAnimation()):this._isInsaneOffset()&&this._sanitizeOffsetAnimation()},t.prototype._isInsaneOffset=function(){var n=this._offset,o=this._sanitizeOffset(n);return o.x!==n.x||o.y!==n.y},t.prototype._sanitizeOffsetAnimation=function(){var n=this,o=this._sanitizeOffset(this._offset),i=De({},this._offset),s=function(a){var c=i.x+a*(o.x-i.x),l=i.y+a*(o.y-i.y);n._offset={x:c,y:l},n._update()};this._animate(s)},t.prototype._zoomOutAnimation=function(){var n=this;if(this._zoomFactor!==1){var o=this._zoomFactor,i=1,s=this._getCurrentZoomCenter(),a=function(c){var l=o+c*(i-o);n._scaleTo(l,s)};this._animate(a)}},t.prototype._getInitialZoomFactor=function(){return this._initialZoomFactor},t.prototype._getCurrentZoomCenter=function(){var n=this._offset,o=n.x,i=n.y,s=o-this._initialOffset.x,a=i-this._initialOffset.y;return{x:-1*o-s/(1/this._zoomFactor-1),y:-1*i-a/(1/this._zoomFactor-1)}},t.prototype._getOffsetByFirstTouch=function(n){return this._getOffsetTouches(n)[0]},t.prototype._getOffsetTouches=function(n){var o=this.props._document,i=o.documentElement,s=o.body,a=this._getContainerRect(),c=a.top,l=a.left,u=i.scrollTop||s.scrollTop,f=i.scrollLeft||s.scrollLeft,d=c+u,p=l+f;return Xn(n.touches).map(function(m){var h=m.x,g=m.y;return{x:h-p,y:g-d}})},t.prototype._animate=function(n,o){var i=this,s=new Date().getTime(),a=De({timeFn:Uu,callback:function(){},duration:this.props.animationDuration},o),c=a.timeFn,l=a.callback,u=a.duration,f=function(){if(i._inAnimation){var d=new Date().getTime()-s,p=d/u;d>=u?(n(1),i._stopAnimation(),l(),i._update()):(p=c(p),n(p),i._update({isAnimation:!0}),requestAnimationFrame(f))}};this._inAnimation=!0,requestAnimationFrame(f)},t.prototype._stopAnimation=function(){this._inAnimation=!1},t.prototype._end=function(){this._hasInteraction=!1,this._sanitize(),this._update()},t.prototype._getContainerRect=function(){var n=this._containerRef.current;return n.getBoundingClientRect()},t.prototype._getChildSize=function(){var n=this._containerRef.current;return Zu(n==null?void 0:n.firstElementChild)},t.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=n.width/o.width,s=n.height/o.height;this._initialZoomFactor=Nu(i,s)},t.prototype._bindEvents=function(){var n=this,o=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(o)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(i){var s=i[0],a=i[1],c=i[2];(c||o).addEventListener(s,a,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.addEventListener("load",n._onResize)})},t.prototype._unSubscribe=function(){var n=this,o=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(i){var s=i[0],a=i[1],c=i[2];(c||o).removeEventListener(s,a,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.removeEventListener("load",n._onResize)})},t.prototype._update=function(n){var o=this;if(!this._updatePlaned){var i=function(){var s=o._getInitialZoomFactor()*o._zoomFactor,a=-o._offset.x/s,c=-o._offset.y/s;o.props.onUpdate({scale:s,x:a,y:c})};if(n!=null&&n.isAnimation)return i();this._updatePlaned=!0,requestAnimationFrame(function(){o._updatePlaned=!1,i()})}},t.prototype._handlerIfEnable=function(n){var o=this;return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];o.props.enabled&&n.apply(void 0,i)}},t.prototype._setInteraction=function(n,o){var i=this._interaction;i!==n&&(i&&!n&&(sn(i)?this._handleZoomEnd():zt(i)&&this._handleDragEnd()),sn(n)?this._handleZoomStart():zt(n)&&this._handleDragStart(o)),this._interaction=n},t.prototype._distanceBetweenNumbers=function(n,o){return n>o?n-o:o-n},t.prototype._enoughToDrag=function(){return this._distanceBetweenNumbers(this._startOffset.x,this._draggingPoint.x)>5||this._distanceBetweenNumbers(this._startOffset.y,this._draggingPoint.y)>5},t.prototype._updateInteraction=function(n){var o=this._fingers;if(o===2)return this._setInteraction("zoom",n);if(o===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},t.prototype._detectDoubleTap=function(n){var o=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),o-this._lastTouchStart<300?(an(n),this._handleDoubleTap(n),sn(this._interaction)?this._handleZoomEnd():zt(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=o)},t.prototype.simulate=function(n){var o=this;return function(i){var s=i.pageX,a=i.pageY,c=i.type,l=c==="mouseup",u=c==="mousedown";u&&(i.preventDefault(),o._listenMouseMove=!0),o._listenMouseMove&&(i.touches=l?[]:[{pageX:s,pageY:a}],n(i)),l&&(o._listenMouseMove=!1)}},t.prototype.componentDidMount=function(){this._bindEvents(),this._update()},t.prototype.componentWillUnmount=function(){this._stopAnimation(),this._unSubscribe()},t.prototype.render=function(){var n=this.props,o=n.children,i=n.containerProps,s=Ca.only(o),a=i||{};return Bn.createElement(Bn.Fragment,null,Bn.createElement("style",null,Lu),Bn.createElement("div",De({},a,{ref:this._containerRef,className:Si(js,a.className)}),Vi(s,{className:Si(Ws,s.props.className)})))},t.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Ru,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:kt,onDragEnd:kt,onDragStart:kt,onDragUpdate:kt,onZoomEnd:kt,onZoomStart:kt,onZoomUpdate:kt,setOffsetsOnce:!1,shouldInterceptWheel:Ku,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:Ks?null:window.document},t}(Bi);if(0)var Sf,kf,If,Af,Cf,Pf,Lf;function jo(e){if(!e)return;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=Math.round(e%60);return t===0?`${n}:${o.toString().padStart(2,"0")}`:`${t}:${n.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}const Gu=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Xu="ALT",Wo=e=>{const{alt:t,lang:n,index:o,...i}=e;return!t||!t.trim()?null:r("button",{type:"button",class:"alt-badge clickable",...i,onClick:s=>{s.stopPropagation(),s.preventDefault(),B.showMediaAlt={alt:t,lang:n}},title:S._({id:"5gfDMm"}),children:[Xu,!!o&&r("sup",{children:o})]})},Qu=140,Ju=280,Zs=Ke(e=>e!=null&&e.length?e.length>Qu||/[\n\r].*[\n\r]/.test(e.trim()):!1);function ed({class:e="",media:t,to:n,lang:o,showOriginal:i,autoAnimate:s,showCaption:a,allowLongerCaption:c,altIndex:l,onClick:u=()=>{}}){let{blurhash:f,description:d,meta:p,previewRemoteUrl:m,previewUrl:h,remoteUrl:g,url:_,type:T}=t;/no\-preview\./i.test(h)&&(h=null);const{original:y={},small:x,focus:b}=p||{},w=i?y==null?void 0:y.width:(x==null?void 0:x.width)||(y==null?void 0:y.width),E=i?y==null?void 0:y.height:(x==null?void 0:x.height)||(y==null?void 0:y.height),A=i?_:h||_,O=i?g:m||g,M=w&&E,k=M?w>E?"landscape":"portrait":null,C=f?Sr(f):null,R=$();let z;if(b){const ie=(b.x+1)/2*100,Z=(1-b.y)/2*100;z=`${ie.toFixed(0)}% ${Z.toFixed(0)}%`}const F=$(),se=Ce(({x:ie,y:Z,scale:ne})=>{const{current:K}=F;if(K){const he=Ou({x:ie,y:Z,scale:ne});ne===1?K.style.removeProperty("transform"):K.style.setProperty("transform",he),K.closest(".media-zoom").style.touchAction=ne<=1.01?"pan-x":""}},[]),[Q,we]=Y(!1),X={enabled:Q,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:se},ue=le(()=>n?ie=>r(Kt,{to:n,...ie}):"div",[n]),te=O?td(O):null,ae=T==="unknown"&&te&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(te.pathname),V=T==="unknown"&&te&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(te.pathname),pe=T==="image"||T==="unknown"&&h&&!ae&&!V,ce=$(),[Fe,Ae]=Y(!1);gn(()=>{if(!pe||!i||!ce.current)return;const{offsetWidth:ie,offsetHeight:Z}=ce.current,ne=w<ie&&E<Z;ne&&Ae(ne)},[w,E]);const Ee=window.innerHeight*(k==="portrait"?.45:.33),Le=k==="portrait"?0:160,be={"--average-color":C&&`rgb(${C.join(",")})`},Me=w&&E?{"--width":`${w}px`,"--height":`${E}px`,"--aspectWidth":`${w/E*Math.max(Le,Ee)}px`,aspectRatio:`${w} / ${E}`,...be}:{...be},Re=Zs(d);let J=!!a&&!i&&!!d&&!Re;c&&!J&&(d==null?void 0:d.length)<=Ju&&(J=!0);const H=J?ie=>{const{children:Z,...ne}=ie;return r("figure",{...ne,children:[Z,r("figcaption",{class:"media-caption",lang:o,dir:"auto",onClick:K=>{K.preventDefault(),K.stopPropagation(),B.showMediaAlt={alt:d,lang:o}},children:d})]})}:N,[xe,Ze]=Y(void 0);if(pe)return X.containerProps.style.display="inherit",gn(()=>{Gu&&i&&(async()=>{try{await fetch(A,{mode:"no-cors"}),F.current.src=A}catch{}})()},[A]),r(H,{children:r(ue,{ref:ce,class:`media media-image ${e}`,onClick:u,"data-orientation":k,"data-has-alt":!J||void 0,"data-has-natural-aspect-ratio":xe||void 0,style:i?{backgroundImage:`url(${h})`,backgroundSize:Fe?`${w}px ${E}px`:void 0,...be}:Me,children:i?r(Ai,{...X,children:r("img",{ref:F,src:A,alt:d,width:w,height:E,"data-orientation":k,loading:"eager",decoding:"sync",onLoad:ie=>{ie.target.closest(".media-image").style.backgroundImage="",ie.target.closest(".media-zoom").style.display="",we(!0)},onError:ie=>{const{src:Z}=ie.target;Z===A&&O&&A!==O&&(ie.target.src=O)}})}):r(N,{children:[r("img",{src:A,alt:J?"":d,width:w,height:E,"data-orientation":k,loading:"lazy",style:{objectPosition:z||"center","--anim-duration":`${Math.min(Math.max(Math.max(w,E)/100,5),120)}s`},onLoad:ie=>{ie.target.dataset.loaded=!0;const Z=ie.target.closest(".media");if(!M&&Z){const{naturalWidth:ne,naturalHeight:K}=ie.target;Z.dataset.orientation=ne>K?"landscape":"portrait",Z.style.setProperty("--width",`${ne}px`),Z.style.setProperty("--height",`${K}px`),Z.style.aspectRatio=`${ne}/${K}`}if(Z){const{clientWidth:ne,clientHeight:K,naturalWidth:he,naturalHeight:q}=ie.target;if(ne&&K&&he&&q)if(he<88||q<88)Z.dataset.hasSmallDimension=!0;else{const oe=q*ne/he;Math.abs(oe-K)<5&&Ze(!0)}}},onError:ie=>{const{src:Z}=ie.target;Z===A&&A!==O&&(ie.target.src=O)}}),!J&&r(Wo,{alt:d,lang:o,index:l})]})})});if(T==="gifv"||T==="video"||ae){const ie=y.duration>0,Z=y.duration<31,ne=T==="gifv"&&Z,K=y.duration<61,he=jo(y.duration),q=!i&&!s&&ne,ze=!i&&s&&ne,oe=y.duration>5,me=`
|
|
<video
|
|
src="${_}"
|
|
poster="${h}"
|
|
width="${w}"
|
|
height="${E}"
|
|
data-orientation="${k}"
|
|
preload="auto"
|
|
autoplay
|
|
muted
|
|
playsinline
|
|
${K?"loop":""}
|
|
ondblclick="this.paused ? this.play() : this.pause()"
|
|
${oe?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
|
|
></video>
|
|
`,kn=`
|
|
<video
|
|
src="${_}"
|
|
poster="${h}"
|
|
width="${w}"
|
|
height="${E}"
|
|
data-orientation="${k}"
|
|
preload="auto"
|
|
autoplay
|
|
playsinline
|
|
${K?"loop":""}
|
|
controls
|
|
></video>
|
|
`;return r(H,{children:r(ue,{class:`media ${e} media-${ne?"gif":"video"} ${ze?"media-contain":""} ${q?"media-hover-animate":""}`,"data-orientation":k,"data-formatted-duration":i?void 0:he,"data-label":ne&&!i&&!ze?"GIF":void 0,"data-has-alt":!J||void 0,style:!i&&Me,onClick:fe=>{if(q)try{R.current.pause()}catch{}u(fe)},onMouseEnter:()=>{if(q)try{R.current.play()}catch{}},onMouseLeave:()=>{if(q)try{R.current.pause()}catch{}},onFocus:()=>{if(q)try{R.current.play()}catch{}},onBlur:()=>{if(q)try{R.current.pause()}catch{}},children:[i||ze?ne&&i?r(Ai,{...X,enabled:!0,children:r("div",{ref:F,dangerouslySetInnerHTML:{__html:me}})}):ne?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:me}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:kn}}):ne?r("video",{ref:R,src:_,poster:h,width:w,height:E,"data-orientation":k,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:oe?fe=>{const{target:ge}=fe,qe=ge==null?void 0:ge.closest(".media-gif");if(qe){const ve=ge.currentTime/ge.duration*100;qe.style.setProperty("--progress",`${ve}%`)}}:void 0}):r(N,{children:[h?r("img",{src:h,alt:J?"":d,width:w,height:E,"data-orientation":k,loading:"lazy",decoding:"async",onLoad:fe=>{if(!M){const ge=fe.target.closest(".media");if(ge){const{naturalHeight:qe,naturalWidth:ve}=fe.target;ge.dataset.orientation=ve>qe?"landscape":"portrait",ge.style.setProperty("--width",`${ve}px`),ge.style.setProperty("--height",`${qe}px`),ge.style.aspectRatio=`${ve}/${qe}`}}}}):r("video",{src:_+"#t=0.1",width:w,height:E,"data-orientation":k,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:fe=>{if(!ie){const{duration:ge}=fe.target;if(ge){const qe=jo(ge),ve=fe.target.closest(".media-video");ve&&(ve.dataset.formattedDuration=qe)}}}}),r("div",{class:"media-play",children:r(L,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!J&&r(Wo,{alt:d,lang:o,index:l})]})})}else if(T==="audio"||V){const ie=jo(y.duration);return r(H,{children:r(ue,{class:`media media-audio ${e}`,"data-formatted-duration":i?void 0:ie,"data-has-alt":!J||void 0,onClick:u,style:!i&&Me,children:[i?r("audio",{src:g||_,preload:"none",controls:!0,autoPlay:!0}):h?r("img",{src:h,alt:J?"":d,width:w,height:E,"data-orientation":k,loading:"lazy",onError:Z=>{var ne,K;try{(K=(ne=Z.target)==null?void 0:ne.remove)==null||K.call(ne)}catch{}}}):null,!i&&r(N,{children:[r("div",{class:"media-play",children:r(L,{icon:"play",size:"xl",alt:"▶"})}),!J&&r(Wo,{alt:d,lang:o,index:l})]})]})})}}function td(e){return URL.parse(e,location.origin)}const ir=ut(ed,(e,t)=>{const n=e.media||{},o=t.media||{};return(n==null?void 0:n.id)===(o==null?void 0:o.id)&&n.url===o.url&&e.to===t.to&&e.class===t.class}),nd=280,od=140,rd=Ui({limit:1,interval:1e3});function id(e,t){return t.v1.accounts.$select(e).fetch()}const sd=hr(rd(id)),Ct={public:{id:"7d1a0d"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},ad=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),cd=new Intl.RelativeTimeFormat,Ci=80;function ld(e){var t;return(t=e==null?void 0:e.options)!=null&&t.length?`📊:
|
|
${e.options.map(n=>`- ${n.title}${n.votesCount>=0?` (${n.votesCount})`:""}`).join(`
|
|
`)}`:""}function Ko(e){const{spoilerText:t,content:n,poll:o}=e;return(t?`${t}
|
|
|
|
`:"")+ho(n)+ld(o)}const Pi=ut(({post:e,instance:t,previewMode:n})=>{const{content:o,emojis:i,language:s,mentions:a,url:c}=e;return r("div",{lang:s,dir:"auto",class:"inner-content",onClick:Al({mentions:a,instance:t,previewMode:n,statusURL:c}),dangerouslySetInnerHTML:{__html:Ss(o,{emojis:i,postEnhanceDOM:l=>{l.querySelectorAll('a.u-url[target="_blank"]').forEach(u=>{/http/i.test(u.innerText.trim())||u.removeAttribute("target")})}})}})},(e,t)=>{const{post:n}=e,{post:o}=t;return n.content===o.content}),ud={s:"small",m:"medium",l:"large"},dd=Ke(e=>{if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const n=Ra(e)[0];return n!=null&&n.lang&&(n==null?void 0:n.accuracy)>.5?n.lang:null}),mn={id:"8fZueG"};function Gt({statusID:e,status:t,instance:n,size:o="m",contentTextWeight:i,readOnly:s,enableCommentHint:a,withinContext:c,skeleton:l,enableTranslate:u,forceTranslate:f,previewMode:d,onMediaClick:p,quoted:m,onStatusLinkClick:h=()=>{},showFollowedTags:g,allowContextMenu:_,showActionsBar:T,showReplyParent:y,mediaFirst:x}){var Zr,qr,Yr;const{_:b}=mo();if(l)return r("div",{class:`status skeleton ${x?"status-media-first small":""}`,children:[!x&&r(at,{size:"xxl"}),r("div",{class:"container",children:[r("div",{class:"meta",children:[(o==="s"||x)&&r(at,{size:"m"})," ███ ████████"]}),r("div",{class:"content-container",children:[x&&r("div",{class:"media-first-container"}),r("div",{class:`content ${x?"media-first-content":""}`,children:r("p",{children:"████ ████████"})})]})]})]});const{masto:w,instance:E,authenticated:A}=io({instance:n}),{instance:O}=io(),M=E===O;let k=st(e||(t==null?void 0:t.id),E);const C=xn(B);if(t||(t=C.statuses[k]||C.statuses[e],k=st(t==null?void 0:t.id,E)),!t)return null;const{account:{acct:R,avatar:z,avatarStatic:F,id:se,url:Q,displayName:we,username:X,emojis:ue,bot:te,group:ae},id:V,repliesCount:pe,reblogged:ce,reblogsCount:Fe,favourited:Ae,favouritesCount:Ee,bookmarked:Le,poll:be,muted:Me,sensitive:Re,spoilerText:J,visibility:H,language:xe,editedAt:Ze,filtered:ie,card:Z,createdAt:ne,inReplyToId:K,inReplyToAccountId:he,content:q,mentions:ze,mediaAttachments:oe,reblog:me,uri:kn,url:fe,emojis:ge,tags:qe,pinned:ve,_deleted:tt,_pinned:In,emojiReactions:ft}=t,[Mt,_o]=Y(null);ee(()=>{if(!q||xe)return;let v;return v=setTimeout(()=>{let P=dd(ho(q,{preProcess:W=>{W.querySelectorAll(".mention, .hashtag, pre, code, a:has(.invisible)").forEach(re=>{re.remove()}),W.querySelectorAll("a").forEach(re=>{const Oe=re.innerText.trim();(Oe.startsWith("https://")||Oe.startsWith("http://"))&&re.remove()})}}));_o(P)},1e3),()=>clearTimeout(v)},[q,xe]);const _e=xe||Mt,Rt=!!(oe!=null&&oe.length);x&&Rt&&(o="s");const yt=le(()=>pr(),[]),nt=le(()=>yt&&yt===se,[se,yt]),An=Ne(Bs),G=!nt&&!s&&!d&&kr(ie,An);if((G==null?void 0:G.action)==="hide")return null;const ye=v=>{v.shiftKey};if(o!=="l"&&G)return r(yd,{status:t,filterInfo:G,instance:E,containerProps:{onMouseEnter:ye},showFollowedTags:!0,quoted:m});const Ie=new Date(ne),He=new Date(Ze);let Se=ze==null?void 0:ze.find(v=>v.id===he);!Se&&he===V&&(Se={url:Q,username:X,displayName:we});const[ot,Cn]=Y(Se);if(!c&&!ot&&he){const v=B.accounts[he];v?Cn(v):sd(he,w).then(P=>{Cn(P),B.accounts[P.id]=P}).catch(P=>{})}const bt=he===yt||(ze==null?void 0:ze.find(v=>v.id===yt)),Ye=le(()=>!!(Gr.account.get("preferences")||{})["reading:expand:spoilers"],[]),Pn=le(()=>{var P;return((P=(Gr.account.get("preferences")||{})["reading:expand:media"])==null?void 0:P.toLowerCase())||"default"},[]),je=d||Ye||!!C.spoilers[V],Tt=d||Pn==="show_all"||!!C.spoilersMedia[V];if(me)return ae?r("div",{"data-state-post-id":k,class:"status-group",onMouseEnter:ye,children:[r("div",{class:"status-pre-meta",children:[r(L,{icon:"group",size:"l",alt:S._({id:"L8fEEm"})})," ",r(At,{account:t.account,instance:E,showAvatar:!0})]}),r(Gt,{status:e?null:me,statusID:e?me.id:null,instance:E,size:o,contentTextWeight:i,readOnly:s,mediaFirst:x})]}):r("div",{"data-state-post-id":k,class:"status-reblog",onMouseEnter:ye,children:[r("div",{class:"status-pre-meta",children:[r(L,{icon:"rocket",size:"l"})," ",r(D,{id:"DlhB4J",components:{0:r(At,{account:t.account,instance:E,showAvatar:!0}),1:r("span",{})}})]}),r(Gt,{status:e?null:me,statusID:e?me.id:null,instance:E,size:o,contentTextWeight:i,readOnly:s,enableCommentHint:!0,mediaFirst:x})]});const yo=Ce(({children:v})=>r("div",{"data-state-post-id":k,class:"status-followed-tags",onMouseEnter:ye,children:[r("div",{class:"status-pre-meta",children:[r(L,{icon:"hashtag",size:"l"})," ",C.statusFollowedTags[k].slice(0,3).map(P=>r(Kt,{to:E?`/${E}/t/${P}`:`/t/${P}`,class:"status-followed-tag-item",children:P},P))]}),v]}),[k,E,C.statusFollowedTags[k]]),wt=g&&((Zr=C.statusFollowedTags[k])!=null&&Zr.length)?yo:N,de=o==="l",[Et,Ot]=Y(f),Ar=ps(!0),ia=C.settings.contentTranslationHideLanguages||[],{contentTranslation:bo,contentTranslationAutoInline:Cr}=C.settings;bo||(u=!1);const Pr=le(()=>{if(!bo||!Cr||s||c&&!de||d||J||Re||be||Z||oe!=null&&oe.length)return!1;const v=Bo(q);return v>0&&v<=od},[bo,Cr,s,c,de,d,J,Re,be,Z,oe,q]),[To,Ln]=Y(!1),[sa,wo]=Y(!1),Lr=oo(),Mr=oo(),aa=oo(),Dt=$(null),Mn=S._({id:"7jyUKe"}),Rr=Ce(()=>Math.max(Math.round((J.length+Bo(q))/140)||1,1),[J,q]),Or=wn(Ie),Dr=Ze&&wn(He);let Jt=A&&H!=="direct"&&H!=="private";H==="private"&&nt&&(Jt=!0);const Rn=v=>{var P;if(!M||!A)return alert(Mn);(v!=null&&v.shiftKey||(P=v==null?void 0:v.syntheticEvent)!=null&&P.shiftKey)&&Ga({replyToStatus:t})||Zn({replyToStatus:t})},$r=le(()=>oe.some(v=>{var P,W;return!((W=(P=v.description)==null?void 0:P.trim)!=null&&W.call(P))}),[oe]),Nr=le(()=>Math.floor((new Date-Ie)/(1e3*60*60*24*30)),[Ie]),Eo=async()=>{if(!M||!A)return alert(Mn),!1;try{if(B.statuses[k]={...t,reblogged:!ce,reblogsCount:Fe+(ce?-1:1)},ce){const v=await w.v1.statuses.$select(V).unreblog();ht(v,E)}else{const v=await w.v1.statuses.$select(V).reblog();ht(v,E)}return!0}catch{return B.statuses[k]=t,!1}},Fr=async()=>{if(!M||!A)return alert(Mn),!1;try{if(B.statuses[k]={...t,favourited:!Ae,favouritesCount:Ee+(Ae?-1:1)},Ae){const v=await w.v1.statuses.$select(V).unfavourite();ht(v,E)}else{const v=await w.v1.statuses.$select(V).favourite();ht(v,E)}return!0}catch{return B.statuses[k]=t,!1}},xo=async()=>{try{const v=await Fr();!de&&v&&Pe(Ae?S._({id:"sZvpIt",values:{0:X||R}}):S._({id:"yUngDO",values:{0:X||R}}))}catch{}},zr=async()=>{if(Kn("@mastodon/post-bookmark")){if(!M||!A)return alert(Mn),!1;try{if(B.statuses[k]={...t,bookmarked:!Le},Le){const v=await w.v1.statuses.$select(V).unbookmark();ht(v,E)}else{const v=await w.v1.statuses.$select(V).bookmark();ht(v,E)}return!0}catch{return B.statuses[k]=t,!1}}},Vr=async()=>{try{const v=await zr();!de&&v&&Pe(Le?S._({id:"lWQguj",values:{0:X||R}}):S._({id:"Fb2K8h",values:{0:X||R}}))}catch{}},On=!!_e&&_e!==Ar&&!vn([_e],[Ar])&&!ia.find(v=>_e===v||vn([_e],[v])),Hr=$(),Br=$();async function ca(v){var re,Oe,$t,So;v&&(Hr.current=w.v1.statuses.$select(e).rebloggedBy.list({limit:Ci}),Br.current=w.v1.statuses.$select(e).favouritedBy.list({limit:Ci}));const[{value:P},{value:W}]=await Promise.allSettled([Hr.current.next(),Br.current.next()]);if((re=P.value)!=null&&re.length||(Oe=W.value)!=null&&Oe.length){const xt=[];return($t=P.value)!=null&&$t.length&&xt.push(...P.value.map(St=>(St._types=["reblog"],St))),(So=W.value)!=null&&So.length&&xt.push(...W.value.map(St=>(St._types=["favourite"],St))),{value:xt,done:P.done&&W.done}}return{value:[],done:!0}}const la=$(),Ur=["public","unlisted"].includes(H),ua=["public","unlisted","private"].includes(H),jr=r(N,{children:[!de&&M&&r(N,{children:r("div",{class:"menu-control-group-horizontal status-menu",children:[r(ke,{onClick:Rn,children:[r(L,{icon:"comment"}),r("span",{children:pe>0?it(pe):S._({id:"ImOQa9"})})]}),r(Po,{subMenu:!0,confirmLabel:r(N,{children:[r(L,{icon:"rocket"}),r("span",{children:ce?S._({id:"QzzGsY"}):S._({id:"kulphB"})})]}),className:`menu-reblog ${ce?"checked":""}`,menuExtras:r(ke,{onClick:()=>{Zn({draftStatus:{status:`
|
|
${fe}`}})},children:[r(L,{icon:"quote"}),r("span",{children:r(D,{id:"ZhhOwV"})})]}),menuFooter:$r&&!ce?r("div",{class:"footer",children:[r(L,{icon:"alert"}),r(D,{id:"MB+wJL"})]}):Nr>=3&&r("div",{class:"footer",children:[r(L,{icon:"info"}),r("span",{children:r(D,{id:"dBme/4",values:{0:cd.format(-Nr,"month")},components:{0:r("strong",{})}})})]}),disabled:!Jt,onClick:async()=>{try{const v=await Eo();!de&&v&&Pe(ce?S._({id:"bpDheH",values:{0:X||R}}):S._({id:"dbNZdP",values:{0:X||R}}))}catch{}},children:[r(L,{icon:"rocket"}),r("span",{children:Fe>0?it(Fe):ce?S._({id:"QzzGsY"}):S._({id:"PiVIlD"})})]}),r(ke,{onClick:xo,className:`menu-favourite ${Ae?"checked":""}`,children:[r(L,{icon:"heart"}),r("span",{children:Ee>0?it(Ee):Ae?S._({id:"OcUmcH"}):S._({id:"W9FRBT"})})]}),Kn("@mastodon/post-bookmark")&&r(ke,{onClick:Vr,className:`menu-bookmark ${Le?"checked":""}`,children:[r(L,{icon:"bookmark"}),r("span",{children:Le?S._({id:"q8EQYI"}):S._({id:"PZlHt8"})})]})]})}),!de&&M&&(de||T)&&r(nn,{}),(de||T)&&r(N,{children:r(ke,{onClick:()=>{B.showGenericAccounts={heading:S._({id:"+XOeb+"}),fetchAccounts:ca,instance:E,showReactions:!0,postID:k}},children:[r(L,{icon:"react"}),r("span",{children:r(D,{id:"+XOeb+"})})]})}),!x&&r(N,{children:[(u||!_e||On)&&r(nn,{}),u?r("div",{class:dn?"menu-horizontal":"",children:[r(ke,{disabled:Et,onClick:()=>{Ot(!0)},children:[r(L,{icon:"translate"}),r("span",{children:r(D,{id:"pi8x/S"})})]}),dn&&r(ke,{onClick:()=>{const v=Ko(t);v&&wi(v,_e)},children:[r(L,{icon:"speak"}),r("span",{children:r(D,{id:"yIBLq8"})})]})]}):(!_e||On)&&r("div",{class:dn?"menu-horizontal":"",children:[r(ii,{to:`${E?`/${E}`:""}/s/${V}?translate=1`,children:[r(L,{icon:"translate"}),r("span",{children:r(D,{id:"pi8x/S"})})]}),dn&&r(ke,{onClick:()=>{const v=Ko(t);v&&wi(v,_e)},children:[r(L,{icon:"speak"}),r("span",{children:r(D,{id:"yIBLq8"})})]})]})]}),(!de&&M||u||!_e||On)&&r(nn,{}),!de&&r(N,{children:r(ii,{to:E?`/${E}/s/${V}`:`/s/${V}`,onClick:v=>{h(v,t)},children:[r(L,{icon:"arrows-right"}),r("small",{children:[r(D,{id:"8MkSAW",values:{0:X||R},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[b(Ct[H])," • ",Or]})]})]})}),!!Ze&&r(N,{children:r(ke,{onClick:()=>{Ln(V)},children:[r(L,{icon:"history"}),r("small",{children:[r(D,{id:"QL+7Jw"}),r("br",{}),r("span",{class:"more-insignificant",children:r(D,{id:"DuJJm9",values:{editedDateText:Dr}})})]})]})}),r(ke,{href:fe,target:"_blank",children:[r(L,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:vd(fe)})]}),r("div",{class:"menu-horizontal",children:[r(ke,{onClick:()=>{try{navigator.clipboard.writeText(fe),Pe(S._({id:"edWbV6"}))}catch{Pe(S._({id:"W1ewR0"}))}},children:[r(L,{icon:"link"}),r("span",{children:r(D,{id:"he3ygx"})})]}),Ur&&(navigator==null?void 0:navigator.share)&&((qr=navigator==null?void 0:navigator.canShare)==null?void 0:qr.call(navigator,{url:fe}))&&r(ke,{onClick:()=>{try{navigator.share({url:fe})}catch{alert(S._({id:"TtG3Uh"}))}},children:[r(L,{icon:"share"}),r("span",{children:r(D,{id:"LFKLqp"})})]})]}),Ur&&de&&r(ke,{onClick:()=>{wo(!0)},children:[r(L,{icon:"code"}),r("span",{children:r(D,{id:"jdVwsS"})})]}),(nt||bt)&&r(nn,{}),(nt||bt)&&r(ke,{onClick:async()=>{try{const v=await w.v1.statuses.$select(V)[Me?"unmute":"mute"]();ht(v,E),Pe(Me?S._({id:"Pm+5jw"}):S._({id:"ywB7JM"}))}catch{Pe(Me?S._({id:"c6jxNY"}):S._({id:"8SN9kN"}))}},children:Me?r(N,{children:[r(L,{icon:"unmute"}),r("span",{children:r(D,{id:"i51zUR"})})]}):r(N,{children:[r(L,{icon:"mute"}),r("span",{children:r(D,{id:"OiUYO5"})})]})}),nt&&ua&&r(ke,{onClick:async()=>{try{const v=await w.v1.statuses.$select(V)[ve?"unpin":"pin"]();ht(v,E),Pe(ve?S._({id:"Yx809+"}):S._({id:"S6P6E+"}))}catch{Pe(ve?S._({id:"A6cs15"}):S._({id:"vgUfWO"}))}},children:ve?r(N,{children:[r(L,{icon:"unpin"}),r("span",{children:r(D,{id:"XQMQZw"})})]}):r(N,{children:[r(L,{icon:"pin"}),r("span",{children:r(D,{id:"lfHLsx"})})]})}),nt&&r("div",{class:"menu-horizontal",children:[Kn("@mastodon/post-edit")&&r(ke,{onClick:()=>{Zn({editStatus:t})},children:[r(L,{icon:"pencil"}),r("span",{children:r(D,{id:"ePK91l"})})]}),de&&r(Po,{subMenu:!0,confirmLabel:r(N,{children:[r(L,{icon:"trash"}),r("span",{children:r(D,{id:"FbPNuJ"})})]}),menuItemClassName:"danger",onClick:()=>{(async()=>{try{await w.v1.statuses.$select(V).remove();const v=Wi(V,E);v._deleted=!0,Pe(S._({id:"KiyvHV"}))}catch{Pe(S._({id:"Yb6p2q"}))}})()},children:[r(L,{icon:"trash"}),r("span",{children:r(D,{id:"Jb6/SB"})})]})]}),!nt&&de&&r(N,{children:[r(nn,{}),r(ke,{className:"danger",onClick:()=>{B.showReportModal={account:t.account,post:t}},children:[r(L,{icon:"flag"}),r("span",{children:r(D,{id:"7PQAMY"})})]})]})]}),Wr=$(),[Dn,en]=Y(!1),[$n,Nn]=Y({}),Fn=_||!de&&!d&&!tt&&!m,da=Hs(ad&&Fn?v=>{var Oe;if(v.pointerType==="mouse")return;const{clientX:P,clientY:W}=((Oe=v.touches)==null?void 0:Oe[0])||v,re=v.target.closest("a");re&&Dt.current.contains(re)&&!re.getAttribute("href").startsWith("#")||(v.preventDefault(),Nn({anchorPoint:{x:P,y:W},direction:"right"}),en(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),zn=!s&&!d&&!m,fa=Ht("r, shift+r",Rn,{enabled:zn}),ha=Ht("f, l",xo,{enabled:zn}),pa=Ht("d",Vr,{enabled:zn}),ma=Ht("shift+b",()=>{(async()=>{try{const v=await Eo();!de&&v&&Pe(ce?S._({id:"bpDheH",values:{0:X||R}}):S._({id:"dbNZdP",values:{0:X||R}}))}catch{}})()},{enabled:zn&&Jt}),ga=Ht("x",v=>{const P=document.activeElement.closest(".status-link, .status-focus");if(P){const W=P.querySelector(".spoiler-button:not(.spoiling)");if(W)v.stopPropagation(),W.click();else{const re=P.querySelector(".spoiler-media-button:not(.spoiling)");re&&(v.stopPropagation(),re.click())}}}),Vn=oe.slice(0,de?void 0:4),Hn=oe.length>1&&Vn.some(v=>!!v.description&&!Zs(v.description)),va=le(()=>{if(!Hn)return null;const v=[];return Vn.forEach((P,W)=>{if(!P.description)return;const re=v.findIndex(Oe=>Oe.media.description===P.description);re===-1?v.push({media:P,indices:[W]}):v[re].indices.push(W)}),v.map(({media:P,indices:W})=>r("div",{"data-caption-index":W.map(re=>re+1).join(" "),onClick:re=>{re.preventDefault(),re.stopPropagation(),B.showMediaAlt={alt:P.description,lang:_e}},title:P.description,children:[r("sup",{children:W.map(re=>re+1).join(" ")})," ",P.description]},P.id))},[Hn,Vn,_e]),tn=le(()=>{var v;return!!K&&he===((v=t.account)==null?void 0:v.id)||!!C.statusThreadNumber[k]},[K,he,(Yr=t.account)==null?void 0:Yr.id,C.statusThreadNumber[k]]),_a=le(()=>a&&!tn&&!c&&!K&&H==="public"&&pe>0,[a,tn,c,K,pe,H]),Kr=le(()=>{if(Z||be||Re||J||oe!=null&&oe.length||tn||c||K||pe<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(q))return!1;const W=Bo(q);if(W>0&&W<=nd)return!0},[Z,be,Re,J,oe,me,tn,c,K,pe,q]);return r(wt,{children:[y&&!!(K&&he)&&r(_d,{sKey:k}),r("article",{"data-state-post-id":k,ref:v=>{var W;Dt.current=v;const P=((W=v==null?void 0:v.closest)==null?void 0:W.call(v,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||v;fa.current=P,ha.current=P,pa.current=P,ma.current=P,ga.current=P},tabindex:"-1",class:`status ${!c&&K&&ot?"status-reply-to":""} visibility-${H} ${In?"status-pinned":""} ${ud[o]} ${tt?"status-deleted":""} ${m?"status-card":""} ${Dn?"status-menu-open":""} ${x&&Rt?"status-media-first":""}`,onMouseEnter:ye,onContextMenu:v=>{var re,Oe;if(!Fn||v.metaKey)return;const P=v.target.closest("a");if(P&&Dt.current.contains(P)&&!P.getAttribute("href").startsWith("#"))return;const W=(re=window.getSelection)==null?void 0:re.call(window);if(W.toString().length>0){const{anchorNode:$t}=W;if((Oe=Dt.current)!=null&&Oe.contains($t))return}v.preventDefault(),Nn({anchorPoint:{x:v.clientX,y:v.clientY},direction:"right"}),en(!0)},...Fn?da():{},children:[Fn&&r(os,{ref:Wr,state:Dn?"open":void 0,...$n,onClose:v=>{var P,W,re;en(!1),(v==null?void 0:v.reason)==="click"&&((re=(W=(P=Dt.current)==null?void 0:P.closest("[tabindex]"))==null?void 0:W.focus)==null||re.call(W))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var v,P;(P=(v=Wr.current)==null?void 0:v.closeMenu)==null||P.call(v)}},overflow:"auto",boundingBoxPadding:fs(),unmountOnClose:!0,children:jr}),T&&o!=="l"&&!d&&!s&&!tt&&!m&&r("div",{class:`status-actions ${Dn==="actions-bar"?"open":""}`,ref:la,children:[r(Vt,{size:"s",title:S._({id:"ImOQa9"}),alt:S._({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:Rn}),r(Vt,{size:"s",checked:Ae,title:[S._({id:"W9FRBT"}),S._({id:"OcUmcH"})],alt:[S._({id:"W9FRBT"}),S._({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:Ee,onClick:xo}),r("button",{type:"button",title:S._({id:"2FYpfJ"}),class:"plain more-button",onClick:v=>{v.preventDefault(),v.stopPropagation(),Nn({anchorRef:{current:v.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),en("actions-bar")},children:r(L,{icon:"more2",size:"m",alt:S._({id:"2FYpfJ"})})})]}),o!=="l"&&r("div",{class:"status-badge",children:[ce&&r(L,{class:"reblog",icon:"rocket",size:"s",alt:S._({id:"b7T5Zj"})}),Ae&&r(L,{class:"favourite",icon:"heart",size:"s",alt:S._({id:"8ab1sR"})}),Le&&r(L,{class:"bookmark",icon:"bookmark",size:"s",alt:S._({id:"1C/9Sa"})}),In&&r(L,{class:"pin",icon:"pin",size:"s",alt:S._({id:"kNiQp6"})})]}),o!=="s"&&r("a",{href:Q,tabindex:"-1",title:`@${R}`,onClick:v=>{v.preventDefault(),v.stopPropagation(),B.showAccount={account:t.account,instance:E}},children:r(at,{url:F||z,size:"xxl",squircle:te})}),r("div",{class:"container",children:[r("div",{class:"meta",children:[r("span",{class:"meta-name",children:r(At,{account:t.account,instance:E,showAvatar:o==="s",showAcct:de})})," ",o!=="l"&&(tt?r("span",{class:"status-deleted-tag",children:r(D,{id:"vGjmyl"})}):fe&&!d&&!s&&!m?r(Kt,{to:E?`/${E}/s/${V}`:`/s/${V}`,onClick:v=>{v.metaKey||v.ctrlKey||v.shiftKey||v.altKey||v.which===2||(v.preventDefault(),v.stopPropagation(),h==null||h(v,t),Nn({anchorRef:{current:v.currentTarget},align:"end",direction:"bottom",gap:4}),en(!0))},class:`time ${Dn&&($n!=null&&$n.anchorRef)?"is-open":""}`,children:[_a&&!Kr?r(L,{icon:"comment2",size:"s",alt:S._({id:"RXmXDR",values:{repliesCount:pe}})}):H!=="public"&&H!=="direct"&&r(L,{icon:pn[H],alt:b(Ct[H]),size:"s"})," ",r(vt,{datetime:Ie,format:"micro"}),!d&&!s&&r(L,{icon:"more2",class:"more",alt:S._({id:"2FYpfJ"})})]}):r("span",{class:"time",children:[H!=="public"&&H!=="direct"&&r(N,{children:[r(L,{icon:pn[H],alt:b(Ct[H]),size:"s"})," "]}),r(vt,{datetime:Ie,format:"micro"})]}))]}),H==="direct"&&r(N,{children:[r("div",{class:"status-direct-badge",children:r(D,{id:"IV4QaU"})})," "]}),!c&&r(N,{children:tn?r("div",{class:"status-thread-badge",children:[r(L,{icon:"thread",size:"s"}),r(D,{id:"lQ8zCz",values:{0:C.statusThreadNumber[k]?` ${C.statusThreadNumber[k]}/X`:""}})]}):!!K&&!!ot&&(!!J||!ze.find(v=>v.id===he))&&r("div",{class:"status-reply-badge",children:[r(L,{icon:"reply"})," ",r(At,{account:ot,instance:E,short:!0})]})}),r("div",{class:`content-container ${J||Re?"has-spoiler":""} ${je?"show-spoiler":""} ${Tt?"show-media":""}`,"data-content-text-weight":i?Rr():null,style:(de||i)&&{"--content-text-weight":Rr()},children:x&&Rt?r(N,{children:[(!!J||!!Re)&&!Ye&&r(N,{children:[!!J&&r("span",{class:"spoiler-content media-first-spoiler-content",lang:_e,dir:"auto",ref:Lr,"data-read-more":b(mn),children:[r(Zt,{text:J,emojis:ge})," "]}),r("button",{class:`light spoiler-button media-first-spoiler-button ${je?"spoiling":""}`,type:"button",onClick:v=>{v.preventDefault(),v.stopPropagation(),je?(delete B.spoilers[V],Ye||delete B.spoilersMedia[V]):(B.spoilers[V]=!0,Ye||(B.spoilersMedia[V]=!0))},children:[r(L,{icon:je?"eye-open":"eye-close"})," ",je?S._({id:"6lGV3K"}):S._({id:"lqBX03"})]})]}),r(hd,{mediaAttachments:oe,language:_e,postID:V,instance:E}),!!q&&r("div",{class:"media-first-content content",ref:Mr,children:r(Pi,{post:t,instance:E,previewMode:d})})]}):r(N,{children:[!!J&&r(N,{children:[r("div",{class:"content spoiler-content",lang:_e,dir:"auto",ref:Lr,"data-read-more":b(mn),children:r("p",{children:r(Zt,{text:J,emojis:ge})})}),Ye||d?r("div",{class:"spoiler-divider",children:[r(L,{icon:"eye-open"})," ",r(D,{id:"gnKo7f"})]}):r("button",{class:`light spoiler-button ${je?"spoiling":""}`,type:"button",onClick:v=>{v.preventDefault(),v.stopPropagation(),je?(delete B.spoilers[V],Ye||delete B.spoilersMedia[V]):(B.spoilers[V]=!0,Ye||(B.spoilersMedia[V]=!0))},children:[r(L,{icon:je?"eye-open":"eye-close"})," ",je?S._({id:"6lGV3K"}):S._({id:"lqBX03"})]})]}),!!q&&r("div",{class:"content",ref:Mr,"data-read-more":b(mn),children:[r(Pi,{post:t,instance:E,previewMode:d}),r(bd,{id:V,instance:E,level:m})]}),!!be&&r(xu,{lang:_e,poll:be,readOnly:s||!M||!A,onUpdate:v=>{B.statuses[k].poll=v},refresh:()=>w.v1.polls.$select(be.id).fetch().then(v=>{B.statuses[k].poll=v}).catch(v=>{}),votePoll:v=>w.v1.polls.$select(be.id).votes.create({choices:v}).then(P=>{B.statuses[k].poll=P}).catch(P=>{})}),((u||Pr)&&!!q.trim()&&!!ho(fo(q,ge))&&On||Et)&&r(tu,{forceTranslate:Et||Pr,mini:!de&&!c,sourceLanguage:_e,autoDetected:Mt,text:Ko(t)}),!d&&Re&&!!oe.length&&Pn!=="show_all"&&r("button",{class:`plain spoiler-media-button ${Tt?"spoiling":""}`,type:"button",hidden:!Ye&&!!J,onClick:v=>{v.preventDefault(),v.stopPropagation(),Tt?delete B.spoilersMedia[V]:B.spoilersMedia[V]=!0},children:[r(L,{icon:Tt?"eye-open":"eye-close"})," ",Tt?S._({id:"6lGV3K"}):S._({id:"9ZCilh"})]}),!!oe.length&&(oe.length>1&&(de||c&&o==="m")?r("div",{class:"media-large-container",children:oe.map((v,P)=>r("div",{class:"media-container media-eq1",children:r(ir,{media:v,autoAnimate:!0,showCaption:!0,allowLongerCaption:!q,lang:_e,to:`/${E}/s/${V}?${c?"media":"media-only"}=${P+1}`,onClick:p?W=>p(W,P,v,t):void 0})},v.id))}):r(fd,{lang:_e,enabled:Hn,captionChildren:va,children:r("div",{ref:aa,class:`media-container media-eq${oe.length} ${oe.length>2?"media-gt2":""} ${oe.length>4?"media-gt4":""}`,children:Vn.map((v,P)=>r(ir,{media:v,autoAnimate:de,showCaption:oe.length===1,allowLongerCaption:!q&&oe.length===1,lang:_e,altIndex:Hn&&!!v.description&&P+1,to:`/${E}/s/${V}?${c?"media":"media-only"}=${P+1}`,onClick:p?W=>{p(W,P,v,t)}:void 0},v.id))})})),!!Z&&/^https/i.test(Z==null?void 0:Z.url)&&!Re&&!J&&!be&&!oe.length&&!C.statusQuotes[k]&&r(pd,{card:Z,selfReferential:(Z==null?void 0:Z.url)===t.url||(Z==null?void 0:Z.url)===t.uri,instance:O})]})}),!de&&Kr&&r("div",{class:"content-comment-hint insignificant",children:[r(L,{icon:"comment2",alt:S._({id:"N8UzTV"})})," ",pe]}),de&&r(N,{children:[r("div",{class:"extra-meta",children:tt?r("span",{class:"status-deleted-tag",children:r(D,{id:"vGjmyl"})}):r(N,{children:[r("span",{children:b(Ct[H])})," •"," ",r("a",{href:fe,target:"_blank",rel:"noopener noreferrer",children:r("time",{class:"created",datetime:Ie.toISOString(),title:Ie.toLocaleString(),children:Or})}),Ze&&r(N,{children:[" ","• ",r(L,{icon:"pencil",alt:S._({id:"MRZxAn"})})," ",r("time",{tabIndex:"0",class:"edited",datetime:He.toISOString(),onClick:()=>{Ln(V)},children:Dr})]})]})}),!!(ft!=null&&ft.length)&&r("div",{class:"emoji-reactions",children:ft.map(v=>{const{name:P,count:W,me:re,url:Oe,staticUrl:$t}=v;if(Oe)return r("span",{class:`emoji-reaction tag ${re?"":"insignificant"}`,children:[r(nr,{alt:P,url:Oe,staticUrl:$t})," ",W]});if(/^:.+?:$/.test(P)){const xt=ge.find(St=>St.shortcode===P.replace(/^:/,"").replace(/:$/,""));if(xt)return r("span",{class:`emoji-reaction tag ${re?"":"insignificant"}`,children:[r(nr,{alt:P,url:xt.url,staticUrl:xt.staticUrl})," ",W]})}return r("span",{class:`emoji-reaction tag ${re?"":"insignificant"}`,children:[P," ",W]})})}),r("div",{class:`actions ${tt?"disabled":""}`,children:[r("div",{class:"action has-count",children:r(Vt,{title:S._({id:"ImOQa9"}),alt:S._({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:pe,onClick:Rn})}),r(Po,{disabled:!Jt,onClick:Eo,confirmLabel:r(N,{children:[r(L,{icon:"rocket"}),r("span",{children:ce?S._({id:"QzzGsY"}):S._({id:"kulphB"})})]}),menuExtras:r(ke,{onClick:()=>{Zn({draftStatus:{status:`
|
|
${fe}`}})},children:[r(L,{icon:"quote"}),r("span",{children:r(D,{id:"ZhhOwV"})})]}),menuFooter:$r&&!ce&&r("div",{class:"footer",children:[r(L,{icon:"alert"}),r(D,{id:"MB+wJL"})]}),children:r("div",{class:"action has-count",children:r(Vt,{checked:ce,title:[S._({id:"kulphB"}),S._({id:"QzzGsY"})],alt:[S._({id:"kulphB"}),S._({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:Fe,disabled:!Jt})})}),r("div",{class:"action has-count",children:r(Vt,{checked:Ae,title:[S._({id:"W9FRBT"}),S._({id:"OcUmcH"})],alt:[S._({id:"W9FRBT"}),S._({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:Ee,onClick:Fr})}),Kn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(Vt,{checked:Le,title:[S._({id:"PZlHt8"}),S._({id:"q8EQYI"})],alt:[S._({id:"PZlHt8"}),S._({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:zr})}),r(hs,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:r("div",{class:"action",children:r("button",{type:"button",title:S._({id:"2FYpfJ"}),class:"plain more-button",children:r(L,{icon:"more",size:"l",alt:S._({id:"2FYpfJ"})})})}),children:jr})]})]})]}),!!To&&r(Yo,{onClick:v=>{v.target===v.currentTarget&&Ln(!1)},children:r(md,{statusID:To,instance:E,fetchStatusHistory:()=>w.v1.statuses.$select(To).history.list(),onClose:()=>{var v;Ln(!1),(v=Dt.current)==null||v.focus()}})}),!!sa&&r(Yo,{onClick:v=>{v.target===v.currentTarget&&wo(!1)},children:r(gd,{post:t,instance:E,onClose:()=>{wo(!1)}})})]})]})}function fd(e){const{enabled:t,children:n,lang:o,captionChildren:i}=e;return!t||!i?n:r("figure",{class:"media-figure-multiple",children:[n,r("figcaption",{lang:o,dir:"auto",children:i})]})}function hd(e){const{mediaAttachments:t,language:n,postID:o,instance:i}=e,s=t.length>1,a=$(),[c,l]=Y(0);return ee(()=>{let u=()=>{const{clientWidth:f,scrollLeft:d}=a.current,p=Math.round(Math.abs(d)/f);l(p)};return a.current&&a.current.addEventListener("scroll",u,{passive:!0}),()=>{a.current&&a.current.removeEventListener("scroll",u)}},[]),r(N,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:a,children:t.map((u,f)=>r("div",{class:"media-first-item",children:r(ir,{media:u,lang:n,to:`/${i}/s/${o}?media=${f+1}`})},u.id))}),s&&r("div",{class:"media-carousel-controls",children:[r("div",{class:"carousel-indexer",children:[c+1,"/",t.length]}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===0,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c-1)*(tr()?-1:1),behavior:"smooth"})},children:r(L,{icon:"arrow-left"})})}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===t.length-1,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c+1)*(tr()?-1:1),behavior:"smooth"})},children:r(L,{icon:"arrow-right"})})})]})]}),s&&r("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((u,f)=>r("span",{class:`carousel-dot ${f===c?"active":""}`},u.id))})]})}function Li(e){return xs.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function Mi(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function pd({card:e,selfReferential:t,instance:n}){var R;const o=xn(B),{blurhash:i,title:s,description:a,html:c,providerName:l,providerUrl:u,authorName:f,authorUrl:d,width:p,height:m,image:h,imageDescription:g,url:_,type:T,embedUrl:y,language:x,publishedAt:b}=e,w=s||l||f,A=p/m>=1.2?"large":"",[O,M]=Y(null);if(ee(()=>{w&&h&&!t&&Pa(_)&&La(n,_).then(z=>{if(!z)return;const{id:F,url:se}=z;M("#"+se)})},[w,h,t]),o.unfurledLinks[_])return null;const k=/<iframe/i.test(c),C=Ce(z=>{k&&(z.preventDefault(),B.showEmbedModal={html:c,url:_||y,width:p,height:m})},[k]);if(w&&(h||T==="photo"&&i)){const z=Li(_);let F;const se=h&&i?Sr(i):null;if(!h){const ue=fu(i,44,44),te=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");te.width=44,te.height=44;const ae=te.getContext("2d");ae.imageSmoothingEnabled=!1;const V=ae.createImageData(44,44);if(V.data.set(ue),ae.putImageData(V,0,0),window.OffscreenCanvas){const pe=te.convertToBlob();F=URL.createObjectURL(pe)}else F=te.toDataURL()}const Q=Mi(z);return r("a",{href:O||_,target:O?null:"_blank",rel:"nofollow noopener noreferrer",class:`card link ${Q?"card-post":""} ${F?"":A}`,style:{"--average-color":se&&`rgb(${se.join(",")})`},onClick:C,children:[r("div",{class:"card-image",children:r("img",{src:h||F,width:p,height:m,loading:"lazy",alt:g||"",onError:we=>{try{we.target.style.display="none"}catch{}},style:{"--anim-duration":p&&m&&`${Math.min(Math.max(Math.max(p,m)/100,5),120)}s`}})}),r("div",{class:"meta-container",lang:x,children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:z})," ",!!b&&r(N,{children:"· "}),!!b&&r(N,{children:r(vt,{datetime:b,format:"micro"})})]}),r("p",{class:"title",dir:"auto",title:s,children:s}),r("p",{class:"meta",dir:"auto",title:a,children:a||!!b&&r(vt,{datetime:b,format:"micro"})})]})]})}else{if(T==="photo")return r("a",{href:_,target:"_blank",rel:"nofollow noopener noreferrer",class:"card photo",onClick:C,children:r("img",{src:y,width:p,height:m,alt:s||a,loading:"lazy",style:{height:"auto",aspectRatio:`${p}/${m}`}})});if(T==="video"&&/youtube/i.test(l)){const z=(R=_.match(/watch\?v=([^&]+)/))==null?void 0:R[1];if(z)return r("a",{class:"card video",onClick:C,children:r("lite-youtube",{videoid:z,nocookie:!0})})}if(w&&!h){const z=Li(_),F=Mi(z);return r("a",{href:O||_,target:O?null:"_blank",rel:"nofollow noopener noreferrer",class:`card link ${F?"card-post":""} no-image`,lang:x,dir:"auto",onClick:C,children:r("div",{class:"meta-container",children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:[r(L,{icon:"link",size:"s"})," ",r("span",{children:z})]})," ",!!b&&r(N,{children:"· "}),!!b&&r(N,{children:r(vt,{datetime:b,format:"micro"})})]}),r("p",{class:"title",title:s,children:s}),r("p",{class:"meta",title:a||l||f,children:a||l||f})]})})}}}function md({statusID:e,instance:t,fetchStatusHistory:n=()=>{},onClose:o}){const[i,s]=Y("default"),[a,c]=Y([]);return ee(()=>{s("loading"),(async()=>{try{const l=await n();c(l),s("default")}catch{s("error")}})()},[]),r("div",{id:"edit-history",class:"sheet",children:[!!o&&r("button",{type:"button",class:"sheet-close",onClick:o,children:r(L,{icon:"x",alt:S._({id:"yz7wBu"})})}),r("header",{children:[r("h2",{children:r(D,{id:"OKiofn"})}),i==="error"&&r("p",{children:r(D,{id:"EANWES"})}),i==="loading"&&r("p",{children:[r(ji,{abrupt:!0})," ",r(D,{id:"Pwqkdw"})]})]}),r("main",{tabIndex:"-1",children:a.length>0&&r("ol",{children:a.map(l=>{const{createdAt:u}=l,f=new Date(u);return r("li",{class:"history-item",children:[r("h3",{children:r("time",{children:wn(f,{formatOpts:{weekday:"short",second:"numeric"}})})}),r(Gt,{status:l,instance:t,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},u)})})})]})}function qs(e,t,n=0){var C;const{account:{url:o,displayName:i,acct:s,username:a,emojis:c,bot:l,group:u},id:f,poll:d,spoilerText:p,language:m,editedAt:h,createdAt:g,content:_,mediaAttachments:T,url:y,emojis:x}=e,b=st(f,t),E=(B.statusQuotes[b]||[]).filter((R,z,F)=>F.findIndex(se=>se.url===R.url)===z),A=E.length&&n<=2?E.map(R=>{const{id:z,instance:F}=R,se=st(z,F),Q=B.statuses[se];if(Q)return qs(Q,F,++n)}).join(""):"",O=new Date(g),M=fo(_,x)+`
|
|
`+A+`
|
|
`+((C=d==null?void 0:d.options)!=null&&C.length?`
|
|
<p>📊:</p>
|
|
<ul>
|
|
${d.options.map(R=>`
|
|
<li>
|
|
${R.title}
|
|
${R.votesCount>=0?` (${R.votesCount})`:""}
|
|
</li>
|
|
`).join("")}
|
|
</ul>`:"")+(T.length>0?`
|
|
`+T.map(R=>{const{description:z,meta:F,previewRemoteUrl:se,previewUrl:Q,remoteUrl:we,url:X,type:ue}=R,{original:te={},small:ae}=F||{},V=(ae==null?void 0:ae.width)||(te==null?void 0:te.width),pe=(ae==null?void 0:ae.height)||(te==null?void 0:te.height),ce=we||X,Fe=se||Q,Ae=Fe||ce,Ee=ce?URL.parse(ce):null,Le=ue==="unknown"&&Ee&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(Ee.pathname),be=ue==="unknown"&&Ee&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(Ee.pathname),Me=ue==="image"||ue==="unknown"&&Fe&&!Le&&!be,Re=ue==="gifv"||ue==="video"||Le,J=ue==="audio"||be;let H="";return Me?H=`<img src="${Ae}" width="${V}" height="${pe}" alt="${z}" loading="lazy" />`:Re?H=`
|
|
<video src="${ce}" width="${V}" height="${pe}" controls preload="auto" poster="${Fe}" loading="lazy"></video>
|
|
${z?`<figcaption>${z}</figcaption>`:""}
|
|
`:J?H=`
|
|
<audio src="${ce}" controls preload="auto"></audio>
|
|
${z?`<figcaption>${z}</figcaption>`:""}
|
|
`:H=`
|
|
<a href="${ce}">📄 ${z||ce}</a>
|
|
`,`<figure>${H}</figure>`}).join(`
|
|
`):""),k=`
|
|
<blockquote lang="${m}" cite="${y}">
|
|
${p?`
|
|
<details>
|
|
<summary>${p}</summary>
|
|
${M}
|
|
</details>
|
|
`:M}
|
|
<footer>
|
|
— ${fo(i,c)} (@${s}) <a href="${y}"><time datetime="${O.toISOString()}">${O.toLocaleString()}</time></a>
|
|
</footer>
|
|
</blockquote>
|
|
`;return Tu(k)}function gd({post:e,instance:t,onClose:n}){const{account:{url:o,displayName:i,username:s,emojis:a,bot:c,group:l},id:u,poll:f,spoilerText:d,language:p,editedAt:m,createdAt:h,content:g,mediaAttachments:_,url:T,emojis:y}=e,x=qs(e,t);return r("div",{id:"embed-post",class:"sheet",children:[!!n&&r("button",{type:"button",class:"sheet-close",onClick:n,children:r(L,{icon:"x",alt:S._({id:"yz7wBu"})})}),r("header",{children:r("h2",{children:r(D,{id:"jdVwsS"})})}),r("main",{tabIndex:"-1",children:[r("h3",{children:r(D,{id:"GkS6YG"})}),r("textarea",{class:"embed-code",readonly:!0,onClick:b=>{b.target.select()},dir:"auto",children:x}),r("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(x),Pe(S._({id:"bl7nrg"}))}catch{Pe(S._({id:"/KEBaP"}))}},children:[r(L,{icon:"clipboard"})," ",r("span",{children:r(D,{id:"he3ygx"})})]}),!!(_!=null&&_.length)&&r("section",{children:[r("p",{children:r(D,{id:"/2mUza"})}),r("ol",{class:"links-list",children:_.map(b=>r("li",{children:r("a",{href:b.remoteUrl||b.url,target:"_blank",download:!0,children:b.remoteUrl||b.url})},b.id))})]}),!!(a!=null&&a.length)&&r("section",{children:[r("p",{children:r(D,{id:"AeM/di"})}),r("ul",{children:a.map(b=>r("li",{children:[r("picture",{children:[r("source",{srcset:b.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:b.url,alt:`:${b.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",b.shortcode,":"]})," (",r("a",{href:b.url,target:"_blank",download:!0,children:"URL"}),")",b.staticUrl?r(N,{children:[" ","(",r("a",{href:b.staticUrl,target:"_blank",download:!0,children:r(D,{id:"xiropL"})}),")"]}):null]},b.shortcode))})]}),!!(y!=null&&y.length)&&r("section",{children:[r("p",{children:r(D,{id:"jzjjJh"})}),r("ul",{children:y.map(b=>r("li",{children:[r("picture",{children:[r("source",{srcset:b.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:b.url,alt:`:${b.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",b.shortcode,":"]})," (",r("a",{href:b.url,target:"_blank",download:!0,children:"URL"}),")",b.staticUrl?r(N,{children:[" ","(",r("a",{href:b.staticUrl,target:"_blank",download:!0,children:r(D,{id:"xiropL"})}),")"]}):null]},b.shortcode))})]}),r("section",{children:r("small",{children:[r("p",{children:r(D,{id:"TnJgwX"})}),r("ul",{children:[r("li",{children:r(D,{id:"0OHPem"})}),r("li",{children:r(D,{id:"AzZ5zv"})}),r("li",{children:r(D,{id:"NU7wa/"})}),r("li",{children:r(D,{id:"R4PmPA"})})]})]})}),r("h3",{children:r(D,{id:"rdUucN"})}),r("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:x},dir:"auto"}),r("p",{children:r("small",{children:r(D,{id:"j0kZfi"})})})]})]})}function Vt({checked:e,count:t,class:n,title:o,alt:i,size:s,icon:a,iconSize:c="l",onClick:l,...u}){typeof o=="string"&&(o=[o,o]),typeof i=="string"&&(i=[i,i]);const[f,d]=Y(o[0]||""),[p,m]=Y(i[0]||"");return ee(()=>{e?(d(o[1]||""),m(i[1]||"")):(d(o[0]||""),m(i[0]||""))},[e,o,i]),r("button",{type:"button",title:f,class:`plain ${s?"small":""} ${n} ${e?"checked":""}`,onClick:h=>{l&&(h.preventDefault(),h.stopPropagation(),l(h))},...u,children:[r(L,{icon:a,size:c,alt:p}),!!t&&r(N,{children:[" ",r("small",{title:t,children:it(t)})]})]})}function vd(e){if(!e)return;const t=URL.parse(e),{host:n,pathname:o}=t,i=o.replace(/\/$/,""),[s,a,c]=i.match(/\/(@[^\/]+)\/(.*)/)||[];return r(N,{children:[xs.toUnicode(n),a?r(N,{children:["/",a,r("wbr",{}),r("span",{class:"more-insignificant",children:["/",c]})]}):r("span",{class:"more-insignificant",children:i})]})}function _d({sKey:e}){const n=xn(B).statusReply[e];if(!n)return null;const{id:o,instance:i}=n,s=Wi(o,i);if(!s)return null;const{sensitive:a,spoilerText:c,account:{avatar:l,avatarStatic:u,bot:f}={},visibility:d,content:p,language:m,filtered:h}=s;if(a||c||!p)return null;const g=st(o,i),_=Us(s),T=Ne(Bs),y=kr(h,T);if((y==null?void 0:y.action)==="hide")return null;const x=(y==null?void 0:y.titlesStr)||"";return r("article",{class:`status compact-reply ${d==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":g,children:[r(at,{url:u||l,squircle:f}),r("div",{class:"content-compact",title:_,lang:m,dir:"auto",children:y?r("b",{class:"status-filtered-badge badge-meta",title:x,children:[r("span",{children:r(D,{id:"03Qqf9"})}),r("span",{children:x})]}):r("span",{children:_})})]})}function yd({status:e,filterInfo:t,instance:n,containerProps:o={},showFollowedTags:i,quoted:s}){var z;const{_:a}=mo(),c=xn(B),{id:l,account:{avatar:u,avatarStatic:f,bot:d,group:p},createdAt:m,visibility:h,reblog:g}=e,_=!!g,T=(t==null?void 0:t.titlesStr)||"",y=new Date(m),x=Us(e.reblog||e),[b,w]=Y(!1),E=Hs(()=>{w(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),A=oo(),O=st(e.id,n),M=st(e.id,n)+" "+(st(g==null?void 0:g.id,n)||""),k=(g==null?void 0:g.id)||l,C=n?`/${n}/s/${k}`:`/s/${k}`,R=i&&!!((z=c.statusFollowedTags[O])!=null&&z.length);return r("div",{class:s?"":_?p?"status-group":"status-reblog":R?"status-followed-tags":"",...o,onContextMenu:F=>{F.preventDefault(),w(!0)},...E(),children:[r("article",{"data-state-post-id":M,class:`status filtered ${s?"status-card":""}`,tabindex:"-1",children:[r("b",{class:"status-filtered-badge clickable badge-meta",title:T,onClick:F=>{F.preventDefault(),w(!0)},children:[r("span",{children:r(D,{id:"03Qqf9"})}),r("span",{children:T})]})," ",r(at,{url:f||u,squircle:d}),r("span",{class:"status-filtered-info",children:[r("span",{class:"status-filtered-info-1",children:_?r(D,{id:"zJyf/5",components:{0:r(At,{account:e.account,instance:n}),1:r(L,{icon:pn[h],alt:a(Ct[h]),size:"s"})}}):R?r(N,{children:[r(At,{account:e.account,instance:n})," ",r(L,{icon:pn[h],alt:a(Ct[h]),size:"s"})," ",r("span",{children:c.statusFollowedTags[O].slice(0,3).map(F=>r("span",{class:"status-followed-tag-item",children:["#",F]},F))})]}):r(N,{children:[r(At,{account:e.account,instance:n})," ",r(L,{icon:pn[h],alt:a(Ct[h]),size:"s"})," ",r(vt,{datetime:y,format:"micro"})]})}),r("span",{class:"status-filtered-info-2",children:[_&&r(N,{children:[r(at,{url:g.account.avatarStatic||g.account.avatar,squircle:d})," "]}),x]})]})]}),!!b&&r(Yo,{onClick:F=>{F.target===F.currentTarget&&w(!1)},children:r("div",{id:"filtered-status-peek",class:"sheet",children:[r("button",{type:"button",class:"sheet-close",onClick:()=>w(!1),children:r(L,{icon:"x",alt:S._({id:"yz7wBu"})})}),r("header",{children:[r("b",{class:"status-filtered-badge",children:r(D,{id:"03Qqf9"})})," ",T]}),r("main",{tabIndex:"-1",children:r(Kt,{ref:A,class:"status-link",to:C,onClick:()=>{w(!1)},"data-read-more":a(mn),children:r(Gt,{status:e,instance:n,size:"s",readOnly:!0})})})]})})]})}const bd=ut(({id:e,instance:t,level:n=0})=>{if(!e||!t)return;const{_:o}=mo(),i=xn(B),s=st(e,t),a=i.statusQuotes[s],c=a==null?void 0:a.filter((l,u,f)=>f.findIndex(d=>d.url===l.url)===u);if(c!=null&&c.length&&!(n>2))return c.map(l=>r(As,{id:l.instance+l.id,children:r(Kt,{to:`${l.instance?`/${l.instance}`:""}/s/${l.id}`,class:"status-card-link","data-read-more":o(mn),children:r(Gt,{statusID:l.id,instance:l.instance,size:"s",quoted:n+1,enableCommentHint:!0})},l.instance+l.id)}))}),Mf=ut(Gt,(e,t)=>{const{status:n,...o}=e,{status:i,...s}=t;return(n==null?void 0:n.id)===(i==null?void 0:i.id)&&Ma(o,s)});var Ri=36,Ys="";for(;Ri--;)Ys+=Ri.toString(36);function Rf(e){for(var t="",n=e||11;n--;)t+=Ys[Math.random()*36|0];return t}function ct(e){return Array.isArray?Array.isArray(e):Qs(e)==="[object Array]"}const Td=1/0;function wd(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-Td?"-0":t}function Ed(e){return e==null?"":wd(e)}function Qe(e){return typeof e=="string"}function Gs(e){return typeof e=="number"}function xd(e){return e===!0||e===!1||Sd(e)&&Qs(e)=="[object Boolean]"}function Xs(e){return typeof e=="object"}function Sd(e){return Xs(e)&&e!==null}function Ue(e){return e!=null}function Zo(e){return!e.trim().length}function Qs(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const kd="Incorrect 'index' type",Id=e=>`Invalid value for key ${e}`,Ad=e=>`Pattern length exceeds max of ${e}.`,Cd=e=>`Missing ${e} property in key`,Pd=e=>`Property 'weight' in key '${e}' must be a positive integer`,Oi=Object.prototype.hasOwnProperty;class Ld{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(o=>{let i=Js(o);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(o=>{o.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Js(e){let t=null,n=null,o=null,i=1,s=null;if(Qe(e)||ct(e))o=e,t=Di(e),n=sr(e);else{if(!Oi.call(e,"name"))throw new Error(Cd("name"));const a=e.name;if(o=a,Oi.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(Pd(a));t=Di(a),n=sr(a),s=e.getFn}return{path:t,id:n,weight:i,src:o,getFn:s}}function Di(e){return ct(e)?e:e.split(".")}function sr(e){return ct(e)?e.join("."):e}function Md(e,t){let n=[],o=!1;const i=(s,a,c)=>{if(Ue(s))if(!a[c])n.push(s);else{let l=a[c];const u=s[l];if(!Ue(u))return;if(c===a.length-1&&(Qe(u)||Gs(u)||xd(u)))n.push(Ed(u));else if(ct(u)){o=!0;for(let f=0,d=u.length;f<d;f+=1)i(u[f],a,c+1)}else a.length&&i(u,a,c+1)}};return i(e,Qe(t)?t.split("."):t,0),o?n:n[0]}const Rd={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Od={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Dd={location:0,threshold:.6,distance:100},$d={useExtendedSearch:!1,getFn:Md,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var j={...Od,...Rd,...Dd,...$d};const Nd=/[^ ]+/g;function Fd(e=1,t=3){const n=new Map,o=Math.pow(10,t);return{get(i){const s=i.match(Nd).length;if(n.has(s))return n.get(s);const a=1/Math.pow(s,.5*e),c=parseFloat(Math.round(a*o)/o);return n.set(s,c),c},clear(){n.clear()}}}class Ir{constructor({getFn:t=j.getFn,fieldNormWeight:n=j.fieldNormWeight}={}){this.norm=Fd(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,o)=>{this._keysMap[n.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Qe(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();Qe(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,o=this.size();n<o;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Ue(t)||Zo(t))return;let o={v:t,i:n,n:this.norm.get(t)};this.records.push(o)}_addObject(t,n){let o={i:n,$:{}};this.keys.forEach((i,s)=>{let a=i.getFn?i.getFn(t):this.getFn(t,i.path);if(Ue(a)){if(ct(a)){let c=[];const l=[{nestedArrIndex:-1,value:a}];for(;l.length;){const{nestedArrIndex:u,value:f}=l.pop();if(Ue(f))if(Qe(f)&&!Zo(f)){let d={v:f,i:u,n:this.norm.get(f)};c.push(d)}else ct(f)&&f.forEach((d,p)=>{l.push({nestedArrIndex:p,value:d})})}o.$[s]=c}else if(Qe(a)&&!Zo(a)){let c={v:a,n:this.norm.get(a)};o.$[s]=c}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function ea(e,t,{getFn:n=j.getFn,fieldNormWeight:o=j.fieldNormWeight}={}){const i=new Ir({getFn:n,fieldNormWeight:o});return i.setKeys(e.map(Js)),i.setSources(t),i.create(),i}function zd(e,{getFn:t=j.getFn,fieldNormWeight:n=j.fieldNormWeight}={}){const{keys:o,records:i}=e,s=new Ir({getFn:t,fieldNormWeight:n});return s.setKeys(o),s.setIndexRecords(i),s}function Jn(e,{errors:t=0,currentLocation:n=0,expectedLocation:o=0,distance:i=j.distance,ignoreLocation:s=j.ignoreLocation}={}){const a=t/e.length;if(s)return a;const c=Math.abs(o-n);return i?a+c/i:c?1:a}function Vd(e=[],t=j.minMatchCharLength){let n=[],o=-1,i=-1,s=0;for(let a=e.length;s<a;s+=1){let c=e[s];c&&o===-1?o=s:!c&&o!==-1&&(i=s-1,i-o+1>=t&&n.push([o,i]),o=-1)}return e[s-1]&&s-o>=t&&n.push([o,s-1]),n}const It=32;function Hd(e,t,n,{location:o=j.location,distance:i=j.distance,threshold:s=j.threshold,findAllMatches:a=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,includeMatches:l=j.includeMatches,ignoreLocation:u=j.ignoreLocation}={}){if(t.length>It)throw new Error(Ad(It));const f=t.length,d=e.length,p=Math.max(0,Math.min(o,d));let m=s,h=p;const g=c>1||l,_=g?Array(d):[];let T;for(;(T=e.indexOf(t,h))>-1;){let A=Jn(t,{currentLocation:T,expectedLocation:p,distance:i,ignoreLocation:u});if(m=Math.min(A,m),h=T+f,g){let O=0;for(;O<f;)_[T+O]=1,O+=1}}h=-1;let y=[],x=1,b=f+d;const w=1<<f-1;for(let A=0;A<f;A+=1){let O=0,M=b;for(;O<M;)Jn(t,{errors:A,currentLocation:p+M,expectedLocation:p,distance:i,ignoreLocation:u})<=m?O=M:b=M,M=Math.floor((b-O)/2+O);b=M;let k=Math.max(1,p-M+1),C=a?d:Math.min(p+M,d)+f,R=Array(C+2);R[C+1]=(1<<A)-1;for(let F=C;F>=k;F-=1){let se=F-1,Q=n[e.charAt(se)];if(g&&(_[se]=+!!Q),R[F]=(R[F+1]<<1|1)&Q,A&&(R[F]|=(y[F+1]|y[F])<<1|1|y[F+1]),R[F]&w&&(x=Jn(t,{errors:A,currentLocation:se,expectedLocation:p,distance:i,ignoreLocation:u}),x<=m)){if(m=x,h=se,h<=p)break;k=Math.max(1,2*p-h)}}if(Jn(t,{errors:A+1,currentLocation:p,expectedLocation:p,distance:i,ignoreLocation:u})>m)break;y=R}const E={isMatch:h>=0,score:Math.max(.001,x)};if(g){const A=Vd(_,c);A.length?l&&(E.indices=A):E.isMatch=!1}return E}function Bd(e){let t={};for(let n=0,o=e.length;n<o;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<o-n-1}return t}class ta{constructor(t,{location:n=j.location,threshold:o=j.threshold,distance:i=j.distance,includeMatches:s=j.includeMatches,findAllMatches:a=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,isCaseSensitive:l=j.isCaseSensitive,ignoreLocation:u=j.ignoreLocation}={}){if(this.options={location:n,threshold:o,distance:i,includeMatches:s,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:u},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(p,m)=>{this.chunks.push({pattern:p,alphabet:Bd(p),startIndex:m})},d=this.pattern.length;if(d>It){let p=0;const m=d%It,h=d-m;for(;p<h;)f(this.pattern.substr(p,It),p),p+=It;if(m){const g=d-It;f(this.pattern.substr(g),g)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:o}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let h={isMatch:!0,score:0};return o&&(h.indices=[[0,t.length-1]]),h}const{location:i,distance:s,threshold:a,findAllMatches:c,minMatchCharLength:l,ignoreLocation:u}=this.options;let f=[],d=0,p=!1;this.chunks.forEach(({pattern:h,alphabet:g,startIndex:_})=>{const{isMatch:T,score:y,indices:x}=Hd(t,h,g,{location:i+_,distance:s,threshold:a,findAllMatches:c,minMatchCharLength:l,includeMatches:o,ignoreLocation:u});T&&(p=!0),d+=y,T&&x&&(f=[...f,...x])});let m={isMatch:p,score:p?d/this.chunks.length:1};return p&&o&&(m.indices=f),m}}class _t{constructor(t){this.pattern=t}static isMultiMatch(t){return $i(t,this.multiRegex)}static isSingleMatch(t){return $i(t,this.singleRegex)}search(){}}function $i(e,t){const n=e.match(t);return n?n[1]:null}class Ud extends _t{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class jd extends _t{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const o=t.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,t.length-1]}}}class Wd extends _t{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class Kd extends _t{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Zd extends _t{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class qd extends _t{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class na extends _t{constructor(t,{location:n=j.location,threshold:o=j.threshold,distance:i=j.distance,includeMatches:s=j.includeMatches,findAllMatches:a=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,isCaseSensitive:l=j.isCaseSensitive,ignoreLocation:u=j.ignoreLocation}={}){super(t),this._bitapSearch=new ta(t,{location:n,threshold:o,distance:i,includeMatches:s,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class oa extends _t{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,o;const i=[],s=this.pattern.length;for(;(o=t.indexOf(this.pattern,n))>-1;)n=o+s,i.push([o,n-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const ar=[Ud,oa,Wd,Kd,qd,Zd,jd,na],Ni=ar.length,Yd=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Gd="|";function Xd(e,t={}){return e.split(Gd).map(n=>{let o=n.trim().split(Yd).filter(s=>s&&!!s.trim()),i=[];for(let s=0,a=o.length;s<a;s+=1){const c=o[s];let l=!1,u=-1;for(;!l&&++u<Ni;){const f=ar[u];let d=f.isMultiMatch(c);d&&(i.push(new f(d,t)),l=!0)}if(!l)for(u=-1;++u<Ni;){const f=ar[u];let d=f.isSingleMatch(c);if(d){i.push(new f(d,t));break}}}return i})}const Qd=new Set([na.type,oa.type]);class Jd{constructor(t,{isCaseSensitive:n=j.isCaseSensitive,includeMatches:o=j.includeMatches,minMatchCharLength:i=j.minMatchCharLength,ignoreLocation:s=j.ignoreLocation,findAllMatches:a=j.findAllMatches,location:c=j.location,threshold:l=j.threshold,distance:u=j.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:o,minMatchCharLength:i,findAllMatches:a,ignoreLocation:s,location:c,threshold:l,distance:u},this.pattern=n?t:t.toLowerCase(),this.query=Xd(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let s=0,a=[],c=0;for(let l=0,u=n.length;l<u;l+=1){const f=n[l];a.length=0,s=0;for(let d=0,p=f.length;d<p;d+=1){const m=f[d],{isMatch:h,indices:g,score:_}=m.search(t);if(h){if(s+=1,c+=_,o){const T=m.constructor.type;Qd.has(T)?a=[...a,...g]:a.push(g)}}else{c=0,s=0,a.length=0;break}}if(s){let d={isMatch:!0,score:c/s};return o&&(d.indices=a),d}}return{isMatch:!1,score:1}}}const cr=[];function ef(...e){cr.push(...e)}function lr(e,t){for(let n=0,o=cr.length;n<o;n+=1){let i=cr[n];if(i.condition(e,t))return new i(e,t)}return new ta(e,t)}const po={AND:"$and",OR:"$or"},ur={PATH:"$path",PATTERN:"$val"},dr=e=>!!(e[po.AND]||e[po.OR]),tf=e=>!!e[ur.PATH],nf=e=>!ct(e)&&Xs(e)&&!dr(e),Fi=e=>({[po.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function ra(e,t,{auto:n=!0}={}){const o=i=>{let s=Object.keys(i);const a=tf(i);if(!a&&s.length>1&&!dr(i))return o(Fi(i));if(nf(i)){const l=a?i[ur.PATH]:s[0],u=a?i[ur.PATTERN]:i[l];if(!Qe(u))throw new Error(Id(l));const f={keyId:sr(l),pattern:u};return n&&(f.searcher=lr(u,t)),f}let c={children:[],operator:s[0]};return s.forEach(l=>{const u=i[l];ct(u)&&u.forEach(f=>{c.children.push(o(f))})}),c};return dr(e)||(e=Fi(e)),o(e)}function of(e,{ignoreFieldNorm:t=j.ignoreFieldNorm}){e.forEach(n=>{let o=1;n.matches.forEach(({key:i,norm:s,score:a})=>{const c=i?i.weight:null;o*=Math.pow(a===0&&c?Number.EPSILON:a,(c||1)*(t?1:s))}),n.score=o})}function rf(e,t){const n=e.matches;t.matches=[],Ue(n)&&n.forEach(o=>{if(!Ue(o.indices)||!o.indices.length)return;const{indices:i,value:s}=o;let a={indices:i,value:s};o.key&&(a.key=o.key.src),o.idx>-1&&(a.refIndex=o.idx),t.matches.push(a)})}function sf(e,t){t.score=e.score}function af(e,t,{includeMatches:n=j.includeMatches,includeScore:o=j.includeScore}={}){const i=[];return n&&i.push(rf),o&&i.push(sf),e.map(s=>{const{idx:a}=s,c={item:t[a],refIndex:a};return i.length&&i.forEach(l=>{l(s,c)}),c})}class Sn{constructor(t,n={},o){this.options={...j,...n},this.options.useExtendedSearch,this._keyStore=new Ld(this.options.keys),this.setCollection(t,o)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Ir))throw new Error(kd);this._myIndex=n||ea(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Ue(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let o=0,i=this._docs.length;o<i;o+=1){const s=this._docs[o];t(s,o)&&(this.removeAt(o),o-=1,i-=1,n.push(s))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:o,includeScore:i,shouldSort:s,sortFn:a,ignoreFieldNorm:c}=this.options;let l=Qe(t)?Qe(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return of(l,{ignoreFieldNorm:c}),s&&l.sort(a),Gs(n)&&n>-1&&(l=l.slice(0,n)),af(l,this._docs,{includeMatches:o,includeScore:i})}_searchStringList(t){const n=lr(t,this.options),{records:o}=this._myIndex,i=[];return o.forEach(({v:s,i:a,n:c})=>{if(!Ue(s))return;const{isMatch:l,score:u,indices:f}=n.searchIn(s);l&&i.push({item:s,idx:a,matches:[{score:u,value:s,norm:c,indices:f}]})}),i}_searchLogical(t){const n=ra(t,this.options),o=(c,l,u)=>{if(!c.children){const{keyId:d,searcher:p}=c,m=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:p});return m&&m.length?[{idx:u,item:l,matches:m}]:[]}const f=[];for(let d=0,p=c.children.length;d<p;d+=1){const m=c.children[d],h=o(m,l,u);if(h.length)f.push(...h);else if(c.operator===po.AND)return[]}return f},i=this._myIndex.records,s={},a=[];return i.forEach(({$:c,i:l})=>{if(Ue(c)){let u=o(n,c,l);u.length&&(s[l]||(s[l]={idx:l,item:c,matches:[]},a.push(s[l])),u.forEach(({matches:f})=>{s[l].matches.push(...f)}))}}),a}_searchObjectList(t){const n=lr(t,this.options),{keys:o,records:i}=this._myIndex,s=[];return i.forEach(({$:a,i:c})=>{if(!Ue(a))return;let l=[];o.forEach((u,f)=>{l.push(...this._findMatches({key:u,value:a[f],searcher:n}))}),l.length&&s.push({idx:c,item:a,matches:l})}),s}_findMatches({key:t,value:n,searcher:o}){if(!Ue(n))return[];let i=[];if(ct(n))n.forEach(({v:s,i:a,n:c})=>{if(!Ue(s))return;const{isMatch:l,score:u,indices:f}=o.searchIn(s);l&&i.push({score:u,key:t,value:s,idx:a,norm:c,indices:f})});else{const{v:s,n:a}=n,{isMatch:c,score:l,indices:u}=o.searchIn(s);c&&i.push({score:l,key:t,value:s,norm:a,indices:u})}return i}}Sn.version="7.0.0";Sn.createIndex=ea;Sn.parseIndex=zd;Sn.config=j;Sn.parseQuery=ra;ef(Jd);export{Bo as $,at as A,Tf as B,dn as C,wi as D,Zt as E,tr as F,Sr as G,ir as H,L as I,nr as J,oo as K,Kt as L,Yo as M,At as N,Au as O,Bs as P,kr as Q,vt as R,Wc as S,tu as T,Hs as U,fs as V,os as W,Iu as X,xf as Y,Us as Z,Rf as _,Ht as a,fo as a0,vf as a1,zc as a2,_f as a3,Sn as a4,Vl as a5,Ya as a6,Xi as a7,nc as a8,pn as a9,Ga as b,hs as c,ke as d,ii as e,nn as f,Po as g,ps as h,Kn as i,yf as j,bf as k,rn as l,Al as m,Ss as n,Qa as o,xs as p,it as q,wn as r,Pe as s,el as t,df as u,Zn as v,ho as w,wf as x,Ef as y,Mf as z};
|
|
//# sourceMappingURL=fuse-MwQ_F2cO.js.map
|