1import{u as m,r as b,a as k,c as f,e as $,i as y,f as U}from"./entry.FQcxE4e_.js";import{u as B}from"./useDevice.BZ9N7-Zz.js";import{g as L,h as R,j as T,k as M,f as i,c,a as n,u as t,b as P,e as d}from"./swiper-vue.CROHKin4.js";const z="https://www.facebook.com/sharer/sharer.php?u=",A="http://twitter.com/share?&url=",u=m(),h=k(),V=()=>{b(`${z}${h.public.siteUrl}${u.fullPath}`,{external:!0,open:{target:"_blank"}})},E=()=>{b(`${A}${h.public.siteUrl}${u.fullPath}`,{external:!0,open:{target:"_blank"}})},F=async()=>{if(!navigator.canShare)alert("Your browser doesn't support the Web Share API.");else try{await navigator.share({url:h.public.siteUrl+u.fullPath}).then(()=>{})}catch{}},I={key:0,class:"absolute -right-5 h-full bg-white shadow-sm rounded-xl mt-3 py-2 px-5"},N={class:"relative h-full flex items-center gap-4"},j={key:0,class:"absolute bg-white top-0 bottom-0 right-0 left-0 flex items-center justify-center"},Y=L({__name:"ShareButton",setup(_){const s=R(),o=f("show",()=>!1),r=f("copySuccess",()=>!1),S=()=>{o.value=!o.value},g=m(),{isMobile:v}=B(),w=()=>{navigator.clipboard.writeText(`${k().public.siteUrl}${g.fullPath}`),r.value=!0,setTimeout(()=>r.value=!1,2e3)},p=e=>{var a;o.value==!0&&s&&!((a=s.value)!=null&&a.contains(e.target))&&(o.value=!1)};return T(()=>{document.addEventListener("click",p)}),M(()=>{document.removeEventListener("click",p)}),(e,a)=>{const C=$,x=y,l=U;return i(),c("div",{class:"relative w-full",ref_key:"toggleRef",ref:s},[n(C,{title:"Share",icon:"share-white",iconSize:"24",class:"!rounded-full gap-2 ml-auto",onClick:a[0]||(a[0]=D=>t(v)?("handleMobileShare"in e?e.handleMobileShare:t(F))():S())}),t(o)?(i(),c("div",I,[n(x,{icon:"chevron",wrapper:"absolute -bottom-[7px] left-1/2 transform -translate-x-1/2 -rotate-90 ","icon-class":"text-white w-[17px]"}),P("div",N,[n(l,{icon:"facebook-black",iconSize:"30px",class:"cursor-pointer",onClick:"handleFacebookShare"in e?e.handleFacebookShare:t(V)},null,8,["onClick"]),n(l,{icon:"twitter-x",iconSize:"24px",class:"cursor-pointer",onClick:"handleTwitterShare"in e?e.handleTwitterShare:t(E)},null,8,["onClick"]),n(l,{icon:"link",iconSize:"23px",class:"cursor-pointer",onClick:w}),t(r)?(i(),c("div",j," Link Copied! ")):d("",!0)])])):d("",!0)],512)}}});export{Y as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.