"use strict";const e=require("../../../../../common/vendor.js"),t=require("../../../../../common/assets.js");Math||n();const n=()=>"../../../common/Icon.js",o=e.defineComponent({__name:"message-file",props:{content:{default:()=>({})},messageItem:{default:()=>({})}},setup(n){const o=n,c=()=>{if(o.messageItem.hasRiskContent)return;const e={mode:"cors",headers:new Headers({"Content-Type":"application/x-www-form-urlencoded"})};if(null==window?void 0:window.fetch)fetch(o.content.url,e).then((e=>e.blob())).then((e=>{const t=document.createElement("a"),n=window.URL.createObjectURL(e);t.href=n,t.download=o.content.name,t.click()}));else{const e=document.createElement("a");e.href=o.content.url,e.target="_blank",e.download=o.content.name,e.click()}};return(n,s)=>({a:e.p({file:e.unref(t.files)}),b:e.t(o.content.name),c:e.t(o.content.size),d:e.unref(e.Wt).t("TUIChat.单击下载"),e:e.o$1(c)})}}),c=e._export_sfc(o,[["__scopeId","data-v-e7e6191d"]]);wx.createComponent(c);
