{"version":3,"file":"BncgqChb.js","sources":["../../../../lib/open-link.ts"],"sourcesContent":["type Props = {\r\n url: string;\r\n target?: string;\r\n};\r\n\r\nexport const openLink = ({ url, target = '_blank' }: Props) => {\r\n const anchor = document.createElement('a');\r\n anchor.style.display = 'none';\r\n anchor.target = target;\r\n anchor.href = url;\r\n document.body.appendChild(anchor);\r\n\r\n // Sarafi iOS fix\r\n window.setTimeout(() => {\r\n anchor.dispatchEvent(new MouseEvent('click'));\r\n\r\n window.setTimeout(() => {\r\n document.body.removeChild(anchor);\r\n }, 100);\r\n }, 100);\r\n};\r\n"],"names":["openLink","url","target","anchor"],"mappings":"AAKO,MAAMA,EAAW,CAAC,CAAE,IAAAC,EAAK,OAAAC,EAAS,YAAsB,CACvD,MAAAC,EAAS,SAAS,cAAc,GAAG,EACzCA,EAAO,MAAM,QAAU,OACvBA,EAAO,OAASD,EAChBC,EAAO,KAAOF,EACL,SAAA,KAAK,YAAYE,CAAM,EAGhC,OAAO,WAAW,IAAM,CACtBA,EAAO,cAAc,IAAI,WAAW,OAAO,CAAC,EAE5C,OAAO,WAAW,IAAM,CACb,SAAA,KAAK,YAAYA,CAAM,GAC/B,GAAG,GACL,GAAG,CACR"}