import"./svelte/svelte_internal_flags_async.js";import*as e from"./svelte/svelte_internal_client.js";import{B as h}from"./IconButtonWrapper-Cljb5D-5.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_svelte.js";import"./i18n-BldJSFLV.js";import{G as g}from"./utils.svelte-Ceck75cM.js";import{S as b}from"./StreamingBar-b2qVLPYU.js";import{B as y}from"./Index.svelte_svelte_type_style_lang-Bv_DpXXD.js";import"./MarkdownCode-C2b9iIxl.js";import"./index-Ds2meNS5.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_store.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";import"./prism-python-CpYAgONt.js";var x=e.from_html('<button><span class="svelte-e5lyqv"> </span> <span class="icon svelte-e5lyqv">▼</span></button> <div><!></div>',1);function $(d,r){e.push(r,!0);let s=e.prop(r,"open",15,!0),t=e.prop(r,"label",3,"");var i=x(),o=e.first_child(i);o.__click=()=>{s(!s()),s()?r.onexpand?.():r.oncollapse?.()};let m;var a=e.child(o),n=e.child(a,!0);e.reset(a);var c=e.sibling(a,2);let p;e.reset(o);var l=e.sibling(o,2);let u;var v=e.child(l);e.slot(v,r,"default",{},null),e.reset(l),e.template_effect(()=>{m=e.set_class(o,1,"label-wrap svelte-e5lyqv",null,m,{open:s()}),e.set_text(n,t()),p=e.set_style(c,"",p,{transform:s()?"rotate(0)":"rotate(90deg)"}),u=e.set_style(l,"",u,{display:s()?"block":"none"})}),e.append(d,i),e.pop()}e.delegate(["click"]);var k=e.from_html("<!> <!>",1);function V(d,r){e.push(r,!0);let s=e.rest_props(r,["$$slots","$$events","$$legacy"]);const t=new g(s);let i=e.derived(()=>t.shared.label||"");h(d,{get elem_id(){return t.shared.elem_id},get elem_classes(){return t.shared.elem_classes},get visible(){return t.shared.visible},children:(o,m)=>{var a=k(),n=e.first_child(a);{var c=l=>{b(l,e.spread_props({get autoscroll(){return t.shared.autoscroll},get i18n(){return t.i18n}},()=>t.shared.loading_status))};e.if(n,l=>{t.shared.loading_status&&l(c)})}var p=e.sibling(n,2);$(p,{get label(){return e.get(i)},get open(){return t.props.open},onexpand:()=>{t.dispatch("expand"),t.dispatch("gradio_expand")},oncollapse:()=>t.dispatch("collapse"),children:(l,u)=>{y(l,{children:(v,B)=>{var _=e.comment(),f=e.first_child(_);e.slot(f,r,"default",{},null),e.append(v,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),e.append(o,a)},$$slots:{default:!0}}),e.pop()}export{V as default};
