1 |
- import{S as i}from"./index-2AiR4orY.js";async function r(t){let o="";t.indexOf("</think>")>=0?o=t.split("</think>")[1]:o=t;const e=document.createElement("textarea");e.value=o,document.body.appendChild(e),e.select(),document.execCommand("copy")&&(i.success("已将内容复制到您的粘贴板"),document.body.removeChild(e))}const a=(t="")=>t.indexOf("office_")!=-1,l=async(t,o)=>{if(navigator.clipboard&&navigator.permissions)await navigator.clipboard.writeText(t),o&&o();else{const e=document.createElement("textArea");e.value=t,e.style.width=0,e.style.position="fixed",e.style.left="-999px",e.style.top="10px",e.setAttribute("readonly","readonly"),document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),o&&o()}};function u(t,o,e){if(!(!t||!o))if(e)fetch(t).then(n=>n.blob()).then(n=>{const d=window.URL.createObjectURL(n),c=document.createElement("a");c.href=d,c.download=o,document.body.appendChild(c),c.click(),window.URL.revokeObjectURL(d),document.body.removeChild(c)});else{const n=document.createElement("a");n.href=t,n.download=o,n.click(),n.remove()}}function m(t){if(typeof t=="string"){const o=t.split(".");return o.length>1?o.pop():null}return null}export{l as a,r as c,u as d,m as g,a as i};
|