import"./svelte/svelte_internal_flags_async.js";import*as t from"./svelte/svelte_internal_client.js";import{I as q}from"./Image-Bdf4wQSw.js";import"./ImagePreview-BMFpVSQw.js";import{V as w}from"./Video-BrnW2L40.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_svelte.js";import"./i18n-CqG9A4Dp.js";import"./svelte/svelte_store.js";import"./index-aMLoRFR_.js";import"./svelte/svelte_animate.js";import"./svelte/svelte_attachments.js";import"./svelte/svelte_easing.js";import"./svelte/svelte_internal_flags_tracing.js";import"./svelte/svelte_internal_server.js";import"./svelte/svelte_legacy.js";import"./svelte/svelte_motion.js";import"./svelte/svelte_reactivity.js";import"./svelte/svelte_reactivity_window.js";import"./svelte/svelte_server.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";import"./utils.svelte-kG009vb9.js";import"./ScrollFade-DGw40oqj.js";import"./MarkdownCode-VTUoaX6K.js";import"./prism-python-BRxZ6l4O.js";import"./ShareButton-LQS1LEKZ.js";import"./FullscreenButton-C4AREqtB.js";var A=t.from_html("<audio controls></audio>"),B=t.from_html("<div><p> </p> <!></div>");function st(g,p){t.push(p,!0);let l=t.prop(p,"value",19,()=>({text:"",files:[]})),x=t.prop(p,"selected",3,!1),d=t.state(0),n;function y(r,e){r.style.setProperty("--local-text-width",`${e&&e<150?e:200}px`),r.style.whiteSpace="unset"}t.user_effect(()=>{n&&t.get(d)&&y(n,t.get(d))});var i=B();let _;var c=t.child(i),h=t.child(c,!0);t.reset(c);var b=t.sibling(c,2);t.each(b,17,()=>l().files,t.index,(r,e)=>{var f=t.comment(),z=t.first_child(f);{var I=a=>{q(a,{get src(){return t.get(e).url},alt:""})},V=a=>{var u=t.comment(),E=t.first_child(u);{var P=m=>{w(m,{get src(){return t.get(e).url},alt:"",loop:!0,is_stream:!1})},S=m=>{var v=t.comment(),W=t.first_child(v);{var j=o=>{var s=A();t.template_effect(()=>t.set_attribute(s,"src",t.get(e).url)),t.append(o,s)},k=o=>{var s=t.text();t.template_effect(()=>t.set_text(s,t.get(e).orig_name)),t.append(o,s)};t.if(W,o=>{t.get(e).mime_type&&t.get(e).mime_type.includes("audio")?o(j):o(k,!1)},!0)}t.append(m,v)};t.if(E,m=>{t.get(e).mime_type&&t.get(e).mime_type.includes("video")?m(P):m(S,!1)},!0)}t.append(a,u)};t.if(z,a=>{t.get(e).mime_type&&t.get(e).mime_type.includes("image")?a(I):a(V,!1)})}t.append(r,f)}),t.reset(i),t.bind_this(i,r=>n=r,()=>n),t.template_effect(()=>{_=t.set_class(i,1,"container svelte-xz0m7l",null,_,{table:p.type==="table",gallery:p.type==="gallery",selected:x(),border:l()}),t.set_text(h,l().text?l().text:"")}),t.bind_element_size(i,"clientWidth",r=>t.set(d,r)),t.append(g,i),t.pop()}export{st as default};
