phanpy-cz/assets/compose-oSeoicVc.js

27 lines
81 KiB
JavaScript
Raw Permalink Normal View History

var Bt=s=>{throw TypeError(s)};var pt=(s,t,n)=>t.has(s)||Bt("Cannot "+n);var I=(s,t,n)=>(pt(s,t,"read from private field"),n?n.call(s):t.get(s)),re=(s,t,n)=>t.has(s)?Bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,n),me=(s,t,n,a)=>(pt(s,t,"write to private field"),a?a.call(s,n):t.set(s,n),n),Q=(s,t,n)=>(pt(s,t,"access private method"),n);import{i as ge,z as mn,s as oe,V as gn,f as Ke,a as Ct,h as U,A as G,M as fn,aA as Yt,d as Se,y as ne,w as vn,aB as bn,j as Pe,c as e,T as V,b as xn,k as De,v as st,q as yn,P as wn,u as kn,r as Tt,x as Zt}from"./useTitle-SRT6j-GL.js";import{j as Ee,F as En,_ as Fn,a as Oe,a8 as Cn,x as Rt,u as zn,k as Xt,b as _n,I as Z,z as Dt,i as Jt,a9 as Ln,l as xt,M as Je,s as Ce,a4 as An,a0 as Sn,q as In,O as Mn,X as at,c as Bn,d as $t,y as Tn}from"./fuse-MwQ_F2cO.js";import{e as Rn}from"./tinyld-light-PxOyhYWY.js";class Dn{constructor(t,n,{tabInsertsSuggestions:a,defaultFirstOption:c}={}){this.input=t,this.list=n,this.tabInsertsSuggestions=a??!0,this.defaultFirstOption=c??!1,this.isComposing=!1,n.id||(n.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=o=>$n(o,this),this.compositionEventHandler=o=>On(o,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",n.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",jt),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",jt)}indicateDefaultOption(){var t;this.defaultFirstOption&&((t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(mt)[0])===null||t===void 0||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const n=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(mt)[0],a=Array.from(this.list.querySelectorAll('[role="option"]')).filter(mt),c=a.indexOf(n);if(c===a.length-1&&t===1||c===0&&t===-1){this.clearSelection(),this.input.focus();return}let o=t===1?0:a.length-1;if(n&&c>=0){const y=c+t;y>=0&&y<a.length&&(o=y)}const l=a[o];if(l)for(const y of a)y.removeAttribute("data-combobox-option-default"),l===y?(this.input.setAttribute("aria-activedescendant",l.id),l.setAttribute("aria-selected","true"),Pn(this.list,l)):y.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function $n(s,t){if(!(s.shiftKey||s.metaKey||s.altKey)&&!(!t.ctrlBindings&&s.ctrlKey)&&!t.isComposing)switch(s.key){case"Enter":Ot(t.input,t.list)&&s.preventDefault();break;case"Tab":t.tabInsertsSuggestions&&Ot(t.input,t.list)&&s.preventDefault();break;case"Escape":t.clearSelection();break;case"ArrowDown":t.navigate(1),s.preventDefault();break;case"ArrowUp":t.navigate(-1),s.preventDefault();break;case"n":t.ctrlBindings&&s.ctrlKey&&(t.navigate(1),s.preventDefault());break;case"p":
`,n-1)>l||s.lastIndexOf(".",n-1)>l)return}else if(s.lastIndexOf(" ",n-1)>l)return;const y=s[l-1];return y&&!Nn.test(y)?void 0:{text:s.substring(l+t.length,n),position:l+t.length}}class Kn extends HTMLElement{}class Wn extends Event{constructor(){super("update")}}const gt=new WeakMap;var He,Ne,ze,ye,ee,$e,Ie,Me,yt,Be,Qe,et,tt,qe,_e;const _t=class _t extends Kn{constructor(n){super();re(this,ee);re(this,He,new MutationObserver(()=>Q(this,ee,et).call(this)));re(this,Ne,new ResizeObserver(()=>Q(this,ee,Qe).call(this)));re(this,ze);re(this,ye);re(this,Ie,0);re(this,Me,0);re(this,Be,!1);re(this,qe,()=>Q(this,ee,tt).call(this));re(this,_e,n=>{Q(this,ee,$e).call(this,a=>{(n.target===document||n.target===window||n.target instanceof Node&&n.target.contains(a))&&Q(this,ee,Qe).call(this)})});me(this,ze,new WeakRef(n)),me(this,ye,document.createElement("div")),I(this,ye).style.position="absolute",I(this,ye).style.pointerEvents="none",n.after(I(this,ye)),I(this,ye).appendChild(this)}static for(n){const a=gt.get(n)??new _t(n);return gt.set(n,a),a}forceUpdate(){Q(this,ee,et).call(this),Q(this,ee,tt).call(this)}connectedCallback(){const n=I(this,ze).deref();if(!n)return this.remove();this.style.pointerEvents="none",this.style.userSelect="none",this.style.overflow="hidden",this.style.display="block",this.style.visibility="hidden",n instanceof HTMLTextAreaElement?(this.style.whiteSpace="pre-wrap",this.style.wordWrap="break-word"):(this.style.whiteSpace="nowrap",this.style.display="table-cell",this.style.verticalAlign="middle"),this.setAttribute("aria-hidden","true"),Q(this,ee,et).call(this),Q(this,ee,tt).call(this),I(this,He).observe(n,{attributeFilter:["style","dir"]}),I(this,Ne).observe(n),document.addEventListener("scroll",I(this,_e),{capture:!0}),window.addEventListener("resize",I(this,_e),{capture:!0}),n.addEventListener("input",I(this,qe),{capture:!0})}disconnectedCallback(){I(this,ye).remove(),I(this,He).disconnect(),I(this,Ne).disconnect(),document.removeEventListener("scroll",I(this,_e),{capture:!0}),window.removeEventListener("resize",I(this,_e),{capture:!0});const n=I(this,ze).deref();n&&(n.removeEventListener("input",I(this,qe),{capture:!0}),gt.delete(n))}};He=new WeakMap,Ne=new WeakMap,ze=new WeakMap,ye=new WeakMap,ee=new WeakSet,$e=function(n){const a=I(this,ze).deref();return a?n(a):this.remove()},Ie=new WeakMap,Me=new WeakMap,yt=function(){Q(this,ee,$e).call(this,n=>{const a=window.getComputedStyle(n);this.style.height=a.height,this.style.width=a.width,n.clientHeight!==this.clientHeight&&(this.style.height=`calc(${a.height} + ${n.clientHeight-this.clientHeight}px)`),n.clientWidth!==this.clientWidth&&(this.style.width=`calc(${a.width} + ${n.clientWidth-this.clientWidth}px)`);const c=n.getBoundingClientRect(),o=this.getBoundingClientRect();me(this,Ie,I(this,Ie)+c.left-o.left),me(this,Me,I(this,Me)+c.top-o.top),this.style.transform=`translate(${I(this,Ie)}px, ${I(this,Me)}px)`,this.scrollTop=n.scrollTop,this.scrollLeft=n.scrollLeft,this.dispatchEvent(new Wn)})},Be=new WeakMap,Qe=function(){I(this,Be)||(me(this,Be,!0),requestAnimationFrame(()=>{Q(this,ee,yt).call(this),me(this,Be,!1)}))},et=function(){Q(this,ee,$e).call(this,n=>{const a=window.getComputedStyle(n);for(const c of Un)this.style[c]=a[c];Q(this,ee,Qe).call(this)})},tt=function(){Q(this,ee,$e).call(this,n=>{this.textContent=n.value,Q(this,ee,yt).call(this)})},qe=new WeakMap,_e=new WeakMap;let nt=_t;const Un=["direction","writingMode","unicodeBidi","textOrientation","boxSizing","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];try{customElements.define("input-style-clone",nt)}catch(s){if(!(s instanceof DOMException&&s.name==="NotSupportedError"))throw s}var be,Te,Re,le,kt,Qt,Et,je;const it=class it{constructor(t,n=0,a=n){re(this,le);re(this,be);re(this,Te);r
`)&&($.current.selectionStart=0,$.current.selectionEnd=0),(x=$.current)==null||x.focus())},300)};ne(()=>{var r,u;if(t){const{spoilerText:x,visibility:h,language:A,sensitive:C}=t;x&&W.current&&(W.current.value=x);const b=[...new Set([t.account.acct,...t.mentions.map(_=>_.acct)])].filter(_=>_!==T.acct);b.length>0&&($.current.value=`${b.map(_=>`@${_}`).join(" ")} `,de()),pe(),te(h==="public"&&N["posting:default:visibility"]?N["posting:default:visibility"].toLowerCase():h),se(A||((r=N["posting:default:language"])==null?void 0:r.toLowerCase())||Fe),ue(C&&!!x)}else if(n){const{visibility:x,language:h,sensitive:A,poll:C,mediaAttachments:D}=n,b=!!(C!=null&&C.options)&&{...C,options:C.options.map(_=>(_==null?void 0:_.title)||_),expiresIn:(C==null?void 0:C.expiresIn)||Wt(C.expiresAt)};v("loading"),(async()=>{var _;try{const q=await E.v1.statuses.$select(n.id).source.fetch(),{text:he,spoilerText:ve}=q;$.current.value=he,$.current.dataset.source=he,de(),pe(),W.current.value=ve,te(x),se(h||((_=N["posting:default:language"])==null?void 0:_.toLowerCase())||Fe),ue(A),b&&J(b),S(D),v("default")}catch(q){alert((q==null?void 0:q.reason)||q),v("error")}})()}else pe(),N["posting:default:visibility"]&&te(N["posting:default:visibility"].toLowerCase()),N["posting:default:language"]&&se(N["posting:default:language"].toLowerCase()),N["posting:default:sensitive"]&&ue(!!N["posting:default:sensitive"]);if(a){const{status:x,spoilerText:h,visibility:A,language:C,sensitive:D,poll:b,mediaAttachments:_}=a,q=!!(b!=null&&b.options)&&{...b,options:b.options.map(he=>(he==null?void 0:he.title)||he),expiresIn:(b==null?void 0:b.expiresIn)||Wt(b.expiresAt)};$.current.value=x,de(),pe(),h&&(W.current.value=h),A&&te(A),se(C||((u=N["posting:default:language"])==null?void 0:u.toLowerCase())||Fe),D!==null&&ue(D),q&&J(q),_&&S(_)}},[a,n,t]);const Le=G(),Ae=l._({id:"hR9gtK"}),rt=()=>{const{value:r,dataset:u}=$.current;if(F==="loading")return!1;const x=(r||"").trim().replace(new RegExp("^\\p{White_Space}+|\\p{White_Space}+$","gu"),""),h=g.length>0;if(!x&&!h||g.length>0&&g.every(_=>_.id))return!0;const C=(t==null?void 0:t.account.id)===T.id,D=t&&r.trim()===`@${t.account.acct}`;return!!(!C&&D||r===(u==null?void 0:u.source))},We=()=>rt()?!0:confirm(Ae);ne(()=>{const r=u=>{rt()||(u.preventDefault(),u.returnValue=Ae)};return window.addEventListener("beforeunload",r,{capture:!0}),()=>window.removeEventListener("beforeunload",r,{capture:!0})},[]);const an=()=>{const{value:r}=$.current,{value:u}=W.current;return Ht(ci(r))+Ht(u)},ot=()=>{const r=an();oe.composerCharacterCount=r};ne(ot,[]);const Lt=window.CloseWatcher,lt=G(!1);Oe("esc",()=>{lt.current=!0},{enabled:!Lt,enableOnFormTags:!0}),Oe("esc",()=>{!c&&lt.current&&We()&&s(),lt.current=!1},{enabled:!Lt,enableOnFormTags:!0,keyup:!0,ignoreEventWhen:r=>{const u=document.querySelectorAll("#modal-container > *"),x=!!u,h=u.length===1&&u[0].querySelector("#compose-container");return x&&!h}}),Cn(()=>{!c&&We()&&s()},[c,We,s]);const At=G({}),St=()=>`${vn()}#${B.current}`,ct=()=>{if(n||oe.composerState.minimized)return;const r=St(),u={key:r,replyTo:t?{id:t.id,account:{id:t.account.id,username:t.account.username,acct:t.account.acct}}:null,draftStatus:{uid:B.current,status:$.current.value,spoilerText:W.current.value,visibility:H,language:P,sensitive:Y,poll:z,mediaAttachments:g}};!bn(u,At.current)&&!rt()&&(Rt.drafts.set(r,{...u,state:"unsaved",updatedAt:Date.now()}).then(()=>{}).catch(x=>{}),At.current=structuredClone(u))};zn(ct,5e3),ne(()=>(ct(),()=>{Rt.drafts.del(St())}),[]),ne(()=>{const r=x=>{const{items:h}=x.clipboardData||x.dataTransfer,A=[];for(let C=0;C<h.length;C++){const D=h[C];if(D.kind==="file"){const b=D.getAsFile();b&&d.includes(b.type)&&A.push(b)}}if(A.length>0&&g.length>=O){alert(l._({id:"ctFhjs",values:{maxMediaAttachments:O}}));return}if(A.length>0){x.preventDefault(),x.stopPropagation();const C=O-g.length,D=A.slice(0,C);if(D.length<=0){alert(l._({id:"ctFhjs",values:{maxMediaAttachments:O}}));return}const b=D.map(_=>({file:_,type:_.type,size:_.size,url:URL.createObjectURL(_),id:null,description:null}));S([...g,...b])}};wind
<li role="option" data-value="${we(W)}">
<img src="${we(H)}" width="16" height="16" alt="" loading="lazy" />
${we(W)}
</li>`}),X+=`<li role="option" data-value="" data-more="${k}">${ge._({id:"24misb"})}</li>`,ke.innerHTML=X,R(Promise.resolve({matched:ce.length>0,fragment:ke}));return}const K={"@":"accounts","#":"hashtags"}[f];R(new Promise(ce=>{y({type:K,q:k,limit:5}).then($=>{if(k!==B.current)return;const W=$[K]||$;let H="";W.forEach(te=>{var J;const{name:Y,avatarStatic:ue,displayName:P,username:se,acct:fe,emojis:g,history:S}=te,z=Sn(P,g);if(fe)H+=`
<li role="option" data-value="${we(fe)}">
<span class="avatar">
<img src="${we(ue)}" width="16" height="16" alt="" loading="lazy" />
</span>
<span>
<b>${z||se}</b>
<br><span class="bidi-isolate">@${we(fe)}</span>
</span>
</li>
`;else{const N=(J=S==null?void 0:S.reduce)==null?void 0:J.call(S,(de,pe)=>de+ +pe.uses,0);H+=`
<li role="option" data-value="${we(Y)}">
<span class="grow">#<b>${we(Y)}</b></span>
${N?`<span class="count">${In(N)}</span>`:""}
</li>
`}}),K==="accounts"&&(H+=`<li role="option" data-value="" data-more="${k}">${ge._({id:"24misb"})}</li>`),ke.innerHTML=H,ce({matched:W.length>0,fragment:ke})})}))},v.current.addEventListener("text-expander-change",p),d=w=>{const{key:f,item:R}=w.detail,{value:k,more:K}=R.dataset;f===":"?(w.detail.value=k?`:${k}:`:"",K&&(w.detail.continue=!0,setTimeout(()=>{E==null||E({name:"custom-emojis",defaultSearchTerm:K})},300))):f==="@"?(w.detail.value=k?`@${k} `:"",K&&(w.detail.continue=!0,setTimeout(()=>{E==null||E({name:"mention",defaultSearchTerm:K})},300))):w.detail.value=`${f}${k}`},v.current.addEventListener("text-expander-value",d),m=w=>{const{input:f}=w.detail;if(o(f.value),t.current){const R=new Event("input",{bubbles:!0});t.current.dispatchEvent(R)}},v.current.addEventListener("text-expander-committed",m)),()=>{v.current&&(v.current.removeEventListener("text-expander-change",p),v.current.removeEventListener("text-expander-value",d),v.current.removeEventListener("text-expander-committed",m))}},[]),ne(()=>{const p=t.current;if(!p)return;new ResizeObserver(()=>{if(v.current){const{height:m}=p.getBoundingClientRect();v.current.style.height=m+"px"}}).observe(p)},[]);const L=G(0),T=G(),j=Mn(p=>{var w;if(!T.current)return;if(L.current>3){T.current.innerHTML="",T.current=null,(w=j==null?void 0:j.cancel)==null||w.call(j);return}let d,m;L.current<=3&&(d=Date.now()),T.current.innerHTML=fi(p,{maxCharacters:l})+`
`,L.current<=3&&(m=Date.now()),d&&m&&m-d>50&&L.current++},500),ie=at(()=>{var w,f;const p=(w=T.current)==null?void 0:w.cloneNode(!0);if(!p)return;p.querySelectorAll("mark").forEach(R=>{R.remove()});const d=(f=p.innerText)==null?void 0:f.trim();if(!d)return;const m=xi(d);m!=null&&m.length&&(E==null||E({name:"auto-detect-language",languages:m}))},2e3);return e("text-expander",{ref:v,keys:"@ # :",class:"compose-field-container",children:[e("textarea",{class:"compose-field",autoCapitalize:"sentences",autoComplete:"on",autoCorrect:"on",spellCheck:"true",dir:"auto",rows:"6",cols:"50",...M,ref:t,name:"status",value:c,onKeyDown:p=>{const{key:d,target:m}=p;if(d==="Enter"&&!(p.ctrlKey||p.metaKey))try{const{value:w,selectionStart:f}=m,k=w.slice(0,f).split(`
`).slice(-1)[0];if(k&&/^\s*(-|\d+\.)\s/.test(k)){const[K,ae,ce,X,$]=k.match(/^(\s*)(-|\d+\.)(\s+)(.+)?/)||[];if($){p.preventDefault();const[W]=ce.match(/\d+/)||[],H=W?`${+W+1}.`:"-",te=`
${ae}${H}${X}`;m.setRangeText(te,f,f);const Y=f+te.length;m.setSelectionRange(Y,Y)}else{const W=f-k.length;m.setRangeText("",W,f)}Ut(m),m.dispatchEvent(new Event("input"))}}catch{}T.current&&(T.current.scrollTop=m.scrollTop)},onInput:p=>{var w;const{target:d}=p,m=d.value.replace(/\u200b/g,"");o(m),Ut(d),(w=s.onInput)==null||w.call(s,p),j(m),ie()},style:{width:"100%",height:"4em"},onScroll:p=>{if(T.current){const{scrollTop:d}=p.target;T.current.scrollTop=d}}}),e("div",{ref:T,class:"compose-highlight","aria-hidden":"true"})]})});function wi({maxCharacters:s=500,hidden:t}){const a=kn(oe).composerCharacterCount,c=s-a;return t?e("span",{class:"char-counter",hidden:!0}):e("span",{class:"char-counter",title:`${c}/${s}`,style:{"--percentage":a/s*100},children:[e("meter",{class:`${c<=-10?"explode":c<=0?"danger":c<=20?"warning":""}`,value:a,max:s}),e("span",{class:"counter",children:c})]})}function Vt(s,t,n,a){const c=Math.sqrt(t/s),o=Math.floor(n*c),l=Math.floor(a*c);return{newWidth:o,newHeight:l}}function ki({attachment:s,disabled:t,lang:n,onDescriptionChange:a=()=>{},onRemove:c=()=>{}}){const{i18n:o}=Ke(),[l,y]=U("default"),E=Jt("@mastodon/edit-media-attributes"),{type:M,id:F,file:v}=s,B=Pe(()=>v?URL.createObjectURL(v):s.url,[v,s.url]),L=!!(v!=null&&v.size),T=L?Yt():{},{mediaAttachments:{imageSizeLimit:j,imageMatrixLimit:ie,videoSizeLimit:O,videoMatrixLimit:p,videoFrameRateLimit:d}={}}=T||{},[m,w]=U(()=>L?M.startsWith("image")&&j&&v.size>j?{type:"imageSizeLimit",details:{imageSize:v.size,imageSizeLimit:j}}:M.startsWith("video")&&O&&v.size>O?{type:"videoSizeLimit",details:{videoSize:v.size,videoSizeLimit:O}}:null:null),[f,R]=U({});ne(()=>{!L||!ie||(f==null?void 0:f.matrix)>ie&&w({type:"imageMatrixLimit",details:{imageMatrix:f==null?void 0:f.matrix,imageMatrixLimit:ie,width:f==null?void 0:f.width,height:f==null?void 0:f.height}})},[f,ie,L]);const[k,K]=U({});ne(()=>{!L||!p||(k==null?void 0:k.matrix)>p&&w({type:"videoMatrixLimit",details:{videoMatrix:k==null?void 0:k.matrix,videoMatrixLimit:p,width:k==null?void 0:k.width,height:k==null?void 0:k.height}})},[k,p,L]);const[ae,ce]=U(s.description),[X,$]=M.split("/"),W=at(a,250);ne(()=>{W(ae)},[ae,W]);const[H,te]=U(!1),Y=G(null);ne(()=>{let g;return H&&Y.current&&(g=setTimeout(()=>{Y.current.focus()},100)),()=>{clearTimeout(g)}},[H]);const ue=e(De,{children:F&&!E?e("div",{class:"media-desc",children:[e("span",{class:"tag",children:e(V,{id:"3wG7HI"})}),e("p",{title:ae,children:s.description||e("i",{children:"No description"})})]}):e("textarea",{ref:Y,value:ae||"",lang:n,placeholder:{image:o._({id:"Lh8B0N"}),video:o._({id:"mN4S+e"}),audio:o._({id:"ieZytw"})}[X],autoCapitalize:"sentences",autoComplete:"on",autoCorrect:"on",spellCheck:"true",dir:"auto",disabled:t||l==="loading",class:l==="loading"?"loading":"",maxlength:"1500",onInput:g=>{const{value:S}=g.target;ce(S)}})}),P=G(null);ne(()=>()=>{var g,S;(S=(g=P.current)==null?void 0:g.hideToast)==null||S.call(g)},[]);const se=G(null),fe=g=>{const{type:S,details:z}=g;switch(S){case"imageSizeLimit":{const{imageSize:J,imageSizeLimit:N}=z;return o._({id:"d83/LB",values:{0:Xe(J),1:Xe(N)}})}case"imageMatrixLimit":{const{imageMatrix:J,imageMatrixLimit:N,width:de,height:pe}=z,{newWidth:Le,newHeight:Ae}=Vt(J,N,de,pe);return o._({id:"DuvOX/",values:{0:o.number(de),1:o.number(pe),2:o.number(Le),3:o.number(Ae)}})}case"videoSizeLimit":{const{videoSize:J,videoSizeLimit:N}=z;return o._({id:"d83/LB",values:{0:Xe(J),1:Xe(N)}})}case"videoMatrixLimit":{const{videoMatrix:J,videoMatrixLimit:N,width:de,height:pe}=z,{newWidth:Le,newHeight:Ae}=Vt(J,N,de,pe);return o._({id:"DuvOX/",values:{0:o.number(de),1:o.number(pe),2:o.number(Le),3:o.number(Ae)}})}case"videoFrameRateLimit":return o._({id:"S1fBwy"})}};return e(De,{children:[e("div",{class:"media-attachment",children:[e("div",{class:"media-preview",tabIndex:"0",onClick:()=>{te(!0)},children:X==="image"?e("img",{src:B,alt:"",onLoad:g=>{if(!L)return;const{naturalWidth:S,naturalHeight:z}=g.target;R({matrix:S*z,width:S,height:z})}}):X==="video"||X==="gifv"?e("video",{src:B+"#t=0.1",playsinline:!0,muted:!0,disablePict
//# sourceMappingURL=compose-oSeoicVc.js.map