var w=Object.defineProperty;var m=(i,o)=>w(i,"name",{value:o,configurable:!0});import{defineComponent as c,mergeModels as v,useModel as g,ref as l,computed as k,openBlock as V,createElementBlock as x,createElementVNode as M,normalizeClass as b,withDirectives as $,createVNode as a,unref as y,withModifiers as n,vShow as T,nextTick as h}from"vue";import B from"primevue/textarea";import{aX as E,L as H}from"./index-CU6LcO2W.js";import"@primevue/themes";import"@primevue/themes/aura";import"./vendor-other-BpgYsL4Z.js";import"./vendor-vue-C7sAPp8E.js";import"primevue/config";import"primevue/confirmationservice";import"primevue/toastservice";import"primevue/tooltip";import"primevue/button";import"vue-i18n";import"primevue/message";import"primevue/skeleton";import"primevue/multiselect";import"primevue/inputtext";import"primevue/select";import"primevue/checkbox";import"primevue/divider";import"primevue/scrollpanel";import"primevue/usetoast";import"primevue/card";import"primevue/listbox";import"primevue/progressbar";import"primevue/floatlabel";import"@primevue/forms";import"@primevue/forms/resolvers/zod";import"primevue/password";import"primevue/progressspinner";import"primevue/tag";import"primevue/inputnumber";import"primevue/tabpanels";import"primevue/tabs";import"primevue/iconfield";import"primevue/inputicon";import"primevue/badge";import"primevue/chip";import"primevue/tabpanel";import"primevue/toggleswitch";import"primevue/colorpicker";import"primevue/radiobutton";import"primevue/knob";import"primevue/slider";import"primevue/panel";import"primevue/tabmenu";import"primevue/popover";import"primevue/tab";import"primevue/tablist";import"primevue";import"primevue/autocomplete";import"primevue/dropdown";import"./vendor-xterm-DV1MVhAx.js";import"./vendor-three-zdhtZbSm.js";import"primevue/galleria";import"primevue/contextmenu";import"primevue/tree";import"primevue/toolbar";import"primevue/selectbutton";import"primevue/dialog";import"primevue/confirmpopup";import"primevue/useconfirm";import"primevue/confirmdialog";import"./vendor-tiptap-mfowjb53.js";import"primevue/blockui";const L=["innerHTML"],jt=c({__name:"WidgetMarkdown",props:v({widget:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const o=g(i,"modelValue"),e=l(!1),p=l(),s=k(()=>E(o.value||"")),d=m(async()=>{e.value||(e.value=!0,await h(),p.value?.$el?.focus())},"startEditing"),u=m(()=>{e.value=!1},"handleBlur");return(r,t)=>(V(),x("div",{class:"widget-expands widget-markdown relative w-full",onDblclick:d},[M("div",{class:b(["comfy-markdown-content lod-toggle size-full min-h-[60px] overflow-y-auto rounded-lg px-4 py-2 text-sm",e.value===!1?"visible":"invisible"]),innerHTML:s.value},null,10,L),$(a(y(B),{ref_key:"textareaRef",ref:p,modelValue:o.value,"onUpdate:modelValue":t[0]||(t[0]=f=>o.value=f),"aria-label":`${r.$t("g.edit")} ${r.widget.name||r.$t("g.markdown")} ${r.$t("g.content")}`,class:"absolute inset-0 min-h-[60px] w-full resize-none",pt:{root:{class:"text-sm w-full h-full",onBlur:u}},"data-capture-wheel":"true",onClick:t[1]||(t[1]=n(()=>{},["stop"])),onKeydown:t[2]||(t[2]=n(()=>{},["stop"]))},null,8,["modelValue","aria-label","pt"]),[[T,e.value]]),a(H)],32))}});export{jt as default};
//# sourceMappingURL=WidgetMarkdown-DneEm08j.js.map
