import{l as e,g as n}from"./p-f021dfd0.js";const o="undefined"!=typeof window,i=o?window.navigator.userAgent.toLowerCase():"",t=/iphone|ipad|ipod|ios|CriOS|FxiOS/.test(i),d=/android/.test(i),r=t||d,s=o&&/(iPhone|iPod)/gi.test(window.navigator.platform),a=(/firefox/.test(i),o&&(window.safari||t||/Apple/.test(i)),n=>{if(!o)return()=>{};let i=0;const t=e(document,"touchstart",(()=>{i=(new Date).getTime(),n(!0)}),!0),d=e(document,"mousemove",(()=>{(new Date).getTime()-i<500||n(!1)}),!0);return()=>{t(),d()}}),u=()=>{if(!o)return!1;const e=document.createElement("video");return n(e.webkitEnterFullscreen)},c=()=>o&&window.screen.orientation&&window.screen.orientation.lock,m=()=>!!o&&document.createElement("video").canPlayType("application/vnd.apple.mpegurl").length>0,w=()=>{if(!o)return!1;const e=document.createElement("video");return!!document.pictureInPictureEnabled&&!e.disablePictureInPicture},p=()=>{if(!o)return!1;const e=document.createElement("video");return n(e.webkitSupportsPresentationMode)&&n(e.webkitSetPresentationMode)&&!s},f=()=>w()||p(),l=(e=!0,n=!0)=>{if(!o)return Promise.resolve(!1);const i=document.createElement("video");return e&&(i.setAttribute("muted",""),i.muted=!0),n&&(i.setAttribute("playsinline",""),i.setAttribute("webkit-playsinline","")),i.setAttribute("height","0"),i.setAttribute("width","0"),i.style.position="fixed",i.style.top="0",i.style.width="0",i.style.height="0",i.style.opacity="0",new Promise((e=>e(i.play()))).catch((()=>{})),Promise.resolve(!i.paused)};export{o as I,r as a,l as b,m as c,c as d,t as e,w as f,p as g,f as h,u as i,a as o}