native-fn 1.0.76 → 1.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/native.cjs +1 -1
  2. package/dist/native.min.cjs +1 -1
  3. package/dist/native.min.mjs +1 -1
  4. package/dist/native.mjs +1 -1
  5. package/dist/native.umd.js +1 -1
  6. package/dist/native.umd.min.js +1 -1
  7. package/dist/plugin/app/index.cjs +95 -51
  8. package/dist/plugin/app/index.min.cjs +1 -1
  9. package/dist/plugin/app/index.min.mjs +1 -1
  10. package/dist/plugin/app/index.mjs +95 -51
  11. package/dist/plugin/app/index.umd.js +95 -51
  12. package/dist/plugin/app/index.umd.min.js +1 -1
  13. package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +2 -0
  14. package/dist/plugin/appearance/index.cjs +95 -51
  15. package/dist/plugin/appearance/index.min.cjs +1 -1
  16. package/dist/plugin/appearance/index.min.mjs +1 -1
  17. package/dist/plugin/appearance/index.mjs +95 -51
  18. package/dist/plugin/appearance/index.umd.js +95 -51
  19. package/dist/plugin/appearance/index.umd.min.js +1 -1
  20. package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +2 -0
  21. package/dist/plugin/clipboard/index.cjs +95 -51
  22. package/dist/plugin/clipboard/index.min.cjs +1 -1
  23. package/dist/plugin/clipboard/index.min.mjs +1 -1
  24. package/dist/plugin/clipboard/index.mjs +95 -51
  25. package/dist/plugin/clipboard/index.umd.js +95 -51
  26. package/dist/plugin/clipboard/index.umd.min.js +1 -1
  27. package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +2 -0
  28. package/dist/plugin/fullscreen/index.cjs +95 -51
  29. package/dist/plugin/fullscreen/index.min.cjs +1 -1
  30. package/dist/plugin/fullscreen/index.min.mjs +1 -1
  31. package/dist/plugin/fullscreen/index.mjs +95 -51
  32. package/dist/plugin/fullscreen/index.umd.js +95 -51
  33. package/dist/plugin/fullscreen/index.umd.min.js +1 -1
  34. package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +2 -0
  35. package/dist/plugin/platform/index.cjs +95 -51
  36. package/dist/plugin/platform/index.d.ts +2 -0
  37. package/dist/plugin/platform/index.min.cjs +1 -1
  38. package/dist/plugin/platform/index.min.mjs +1 -1
  39. package/dist/plugin/platform/index.mjs +95 -51
  40. package/dist/plugin/platform/index.umd.js +95 -51
  41. package/dist/plugin/platform/index.umd.min.js +1 -1
  42. package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +2 -0
  43. package/dist/plugin/theme/index.cjs +95 -51
  44. package/dist/plugin/theme/index.min.cjs +1 -1
  45. package/dist/plugin/theme/index.min.mjs +1 -1
  46. package/dist/plugin/theme/index.mjs +95 -51
  47. package/dist/plugin/theme/index.umd.js +95 -51
  48. package/dist/plugin/theme/index.umd.min.js +1 -1
  49. package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +2 -0
  50. package/dist/src/plugin/platform/types/platform.d.ts +2 -0
  51. package/package.json +7 -7
@@ -1 +1 @@
1
- "use strict";var e,n,r,o,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(i||(i={}));var t=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",a={os:{name:e.Unknown,version:""},engine:{name:r.Unknown,version:""},browser:{name:o.Unknown,version:""},crossPlatformFramework:i.Unknown,userAgent:t,get network(){return function(){var n={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(n.isOnline=globalThis.navigator.onLine);var r=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;void 0!==r&&(void 0!==r.effectiveType&&(n.effectiveType=r.effectiveType),void 0!==r.type&&(n.type=r.type),void 0!==r.downlink&&(n.downlink=r.downlink),void 0!==r.rtt&&(n.rtt=r.rtt),void 0!==r.saveData&&(n.saveData=r.saveData))}if(a.isNode){try{for(var o=require("os").networkInterfaces(),i=Object.keys(o),t=0;t<i.length;t++){for(var l=o[i[t]],s=0;s<l.length;s++){var u=l[s];u.internal||"IPv4"!==u.family||(n.isOnline=!0)}if(n.isOnline)break}}catch(e){}try{var c=require("child_process");if(a.os.name===e.Windows){try{(m=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&m.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(m=c.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(n.type="ethernet")}catch(e){}null===n.type&&(n.type="other")}else if(a.os.name===e.MacOS)try{var m=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),d=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});d.includes("en0")&&m.includes("Wi-Fi")?n.type="wifi":d.includes("en")||m.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get device(){return this.os.name===e.iOS||this.os.name===e.Android?n.Mobile:this.os.name===e.Windows||this.os.name===e.MacOS?n.Desktop:n.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===n.Mobile},get isDesktop(){return this.device===n.Desktop},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return this.os.name===e.iOS?"standalone"in globalThis.navigator&&!!globalThis.navigator.standalone:"matchMedia"in globalThis&&globalThis.matchMedia("(display-mode: standalone)").matches}},l=[[/windows nt (6\.[23]); arm/i,e.Windows,m],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,m],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,m],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,m],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,m],[/windows ce\/?([\d.]*)/i,e.Windows,m],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,d],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,d],[/cfnetwork\/.+darwin/i,e.iOS,d],[/mac os x ?([\w. ]*)/i,e.MacOS,d],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,d],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]],c={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function m(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function d(e){return void 0===e?"":e.replace(/_/g,".")}function f(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function b(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}function v(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}function w(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function g(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function h(){if(a.crossPlatformFramework=i.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":a.os={name:e.Android,version:globalThis.device.version};break;case"iOS":a.os={name:e.iOS,version:globalThis.device.version}}}!function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(a.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(a.crossPlatformFramework=i.ReactNative);for(var r=0;r<l.length;r++){var m=(E=l[r])[0],d=E[1],p=E[2];if(null!==(S=a.userAgent.match(m))){a.os={name:d,version:w(S[1],p)};break}}var k;for(a.os.name===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var a=void 0,l=void 0;if((a=t<r.length?parseInt(r[t],10):0)>(l=t<o.length?parseInt(o[t],10):0))return 1;if(a<l)return-1}return 0}(a.os.version,"18.6")&&null!==(j=/\) Version\/([\d.]+)/.exec(a.userAgent))&&parseInt(j[1].substring(0,2),10)>=26&&(a.os.version=j[1]),r=0;r<s.length;r++){m=(E=s[r])[0];var T=E[1];p=E[2];if(null!==(S=a.userAgent.match(m))){a.engine={name:T,version:w(S[1],p)};break}}for(r=0;r<u.length;r++){m=(E=u[r])[0];var E,S,F=E[1];p=E[2];if(null!==(S=a.userAgent.match(m))){a.browser={name:F,version:w(S[1],p)};break}}if(a.crossPlatformFramework===i.ReactNative)try{d=(O=require("react-native").Platform).OS;var j=g(y=""+O.Version);switch(d){case"android":a.os={name:e.Android,version:v(j,y)};break;case"ios":a.os={name:e.iOS,version:y};break;case"windows":a.os={name:e.Windows,version:f(j,y)};break;case"macos":a.os={name:e.MacOS,version:y}}}catch(e){}if(a.isNode)try{var y,O=(d=require("os")).platform();j=g(y=d.release());switch(O){case"win32":a.os={name:e.Windows,version:f(j,y)};break;case"darwin":a.os={name:e.MacOS,version:b(j,y)};break;case"android":a.os={name:e.Android,version:y};break;case"linux":/android/i.test(y)&&(a.os={name:e.Android,version:y})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?h():globalThis.document.addEventListener("deviceready",h,!1)),k=globalThis.navigator,void 0!==globalThis.navigator&&void 0!==k.userAgentData&&void 0!==k.userAgentData.getHighEntropyValues&&globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){for(var i,t=r.fullVersionList||r.brands||[],l=r.platformVersion,s=r.platform,u=a.browser.name,m=null,d=0;d<t.length;d++){var f=null==(i=t[d])?{brand:"",version:""}:"string"==typeof i?{brand:i,version:""}:{brand:i.brand,version:i.version},b=f.version,v=f.brand;/not.a.brand/i.test(v)||((null===m||/Chrom/.test(m)&&"Chromium"!==v||"Edge"===m&&/WebView2/.test(v))&&(v=c[v]||v,null!==(m=u)&&!/Chrom/.test(m)&&/Chrom/.test(v)||("Chrome"===(u=v)||"Chrome WebView"===u||"Chrome Headless"===u?a.browser.name=o.Chrome:"Edge"===u||"Edge WebView2"===u?a.browser.name=o.Edge:"Opera Mobi"===u&&(a.browser.name=o.Opera),a.browser.version=b),m=v),"Chromium"===v&&(a.engine.version=b))}"string"==typeof l&&(a.os.name===e.Windows?a.os.version=parseInt(l.split(".")[0],10)>=13?"11":"10":a.os.version=l),"string"==typeof s&&(/android/i.test(s)?a.os.name=e.Android:/ios|iphone|ipad/i.test(s)?a.os.name=e.iOS:/windows|win32/i.test(s)?a.os.name=e.Windows:/macos|macintel/i.test(s)&&(a.os.name=e.MacOS)),!0===r.mobile&&(a.device=n.Mobile)}))}();var p={get enabled(){return function(){if(a.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===F){if(a.os.name!==e.iOS)return!1;for(var n=globalThis.document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var t=globalThis.document[F.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[F.element]}()},get element(){return x()},get isFullscreen(){return M()},request:W,exit:C,toggle:function(e,n){return M()?C():W(e,n)},onchange:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<n.length;e++)n[e]()}},onerror:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<n.length;e++)n[e]()}}},k=null,T=null,E=null,S=!1,F=function(){if(a.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return j.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=j[o];if(t.enabled in globalThis.document||t.element in globalThis.document||t.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(t.request="webkitRequestFullScreen"),t}if("webkitCurrentFullScreenElement"in globalThis.document){var l={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:j.webkit.events};return"webkitRequestFullScreen"in e&&(l.request="webkitRequestFullScreen"),l}return null}(),j={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function y(){null!==E&&(T.fullScreenable=E.fullScreenable,T.autoHideMenuBar=E.autoHideMenuBar,E=null),T=null}function O(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function x(){if(a.crossPlatformFramework===i.Electron){if(null!==T)return T;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||a.os.name===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===F)return k&&k.webkitDisplayingFullscreen?k:null;var t=globalThis.document[F.element];return null!=t?t:null}function M(){return null!==x()}function W(n,r){if(void 0===n&&(n=function(){if(a.crossPlatformFramework===i.Electron){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(a.os.name===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),a.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===T&&(E={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),T=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==F){var t=n[F.request];if("function"==typeof t)try{var l=t.call(n,r);return void 0!==l&&"function"==typeof l.then?void l.then((function(){o()})).catch((function(){a.os.name===e.iOS?s():i()})):void o()}catch(n){if(a.os.name!==e.iOS)return void i()}}function s(){if(a.os.name===e.iOS&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return k=r,O(),r.webkitEnterFullscreen(),void o()}i()}s()}))}function C(){return a.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==T)T.setFullScreen(!1),y();else{var r=x();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==F){var o=globalThis.document[F.exit];if("function"==typeof o){var i=o.call(globalThis.document);return void 0!==i&&"function"==typeof i.then?void i.then((function(){n()})).catch((function(){r()})):void n()}}if(a.os.name===e.iOS&&null!==k){if("function"==typeof k.webkitExitFullscreen&&!0===k.webkitDisplayingFullscreen)return k.webkitExitFullscreen(),k=null,void n();for(var t=globalThis.document.querySelectorAll("video"),l=0;l<t.length;l++){var s=t[l];if("function"==typeof s.webkitExitFullscreen&&!0===s.webkitDisplayingFullscreen)return s.webkitExitFullscreen(),void n()}}x()?r():n()}))}!function(){if(!S){S=!0;var n=!1;if(a.crossPlatformFramework===i.Electron)try{for(var r=require("electron"),o=r.BrowserWindow.getAllWindows(),t=function(e){var n=o[e];n.on("enter-full-screen",(function(){T=n,m()})),n.on("leave-full-screen",(function(){y(),m()}))},l=0;l<o.length;l++)t(l);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){T=n,m()})),n.on("leave-full-screen",(function(){y(),m()}))}))}catch(e){}var s=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],u=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(l=0;l<s.length;l++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[l],m,!1);for(l=0;l<u.length;l++)void 0!==globalThis.document&&globalThis.document.addEventListener(u[l],d,!1);if(a.os.name===e.iOS)if(O(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){O()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function m(){c("fullscreenchange")}function d(){c("fullscreenerror")}}();var A={installed:!1,name:"Fullscreen",module:p,Constants:{},Errors:{}};module.exports=A;
1
+ "use strict";var e,n,r,o,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(i||(i={}));var t=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",a="loading",l=[],s=0,u={os:{name:e.Unknown,version:""},engine:{name:r.Unknown,version:""},browser:{name:o.Unknown,version:""},crossPlatformFramework:i.Unknown,userAgent:t,get readyState(){return a},get network(){return function(){var n={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(n.isOnline=globalThis.navigator.onLine);var r=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;void 0!==r&&(void 0!==r.effectiveType&&(n.effectiveType=r.effectiveType),void 0!==r.type&&(n.type=r.type),void 0!==r.downlink&&(n.downlink=r.downlink),void 0!==r.rtt&&(n.rtt=r.rtt),void 0!==r.saveData&&(n.saveData=r.saveData))}if(u.isNode){try{for(var o=require("os").networkInterfaces(),i=Object.keys(o),t=0;t<i.length;t++){for(var a=o[i[t]],l=0;l<a.length;l++){var s=a[l];s.internal||"IPv4"!==s.family||(n.isOnline=!0)}if(n.isOnline)break}}catch(e){}try{var c=require("child_process");if(u.os.name===e.Windows){try{(m=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&m.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(m=c.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(n.type="ethernet")}catch(e){}null===n.type&&(n.type="other")}else if(u.os.name===e.MacOS)try{var m=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),d=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});d.includes("en0")&&m.includes("Wi-Fi")?n.type="wifi":d.includes("en")||m.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get device(){return this.os.name===e.iOS||this.os.name===e.Android?n.Mobile:this.os.name===e.Windows||this.os.name===e.MacOS?n.Desktop:n.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===n.Mobile},get isDesktop(){return this.device===n.Desktop},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return this.os.name===e.iOS?"standalone"in globalThis.navigator&&!!globalThis.navigator.standalone:"matchMedia"in globalThis&&globalThis.matchMedia("(display-mode: standalone)").matches},onready:function(e){if("complete"===this.readyState)try{e(this)}catch(e){}else l.push(e)}},c=[[/windows nt (6\.[23]); arm/i,e.Windows,g],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,g],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,g],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,g],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,g],[/windows ce\/?([\d.]*)/i,e.Windows,g],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,h],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,h],[/cfnetwork\/.+darwin/i,e.iOS,h],[/mac os x ?([\w. ]*)/i,e.MacOS,h],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,h],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],m=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],d=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]],f={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function b(){s++}function v(){s--,w()}function w(){if(0===s&&"loading"===a){a="complete";for(var e=0;e<l.length;e++)try{l[e](u)}catch(e){}l.length=0}}function g(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function h(e){return void 0===e?"":e.replace(/_/g,".")}function p(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function k(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}function T(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}function E(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function S(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function F(){if(u.crossPlatformFramework=i.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":u.os={name:e.Android,version:globalThis.device.version};break;case"iOS":u.os={name:e.iOS,version:globalThis.device.version}}v()}!function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(u.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(u.crossPlatformFramework=i.ReactNative);for(var r=0;r<c.length;r++){var a=(h=c[r])[0],l=h[1],s=h[2];if(null!==(y=u.userAgent.match(a))){u.os={name:l,version:E(y[1],s)};break}}for(u.os.name===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var a=void 0,l=void 0;if((a=t<r.length?parseInt(r[t],10):0)>(l=t<o.length?parseInt(o[t],10):0))return 1;if(a<l)return-1}return 0}(u.os.version,"18.6")&&null!==(O=/\) Version\/([\d.]+)/.exec(u.userAgent))&&parseInt(O[1].substring(0,2),10)>=26&&(u.os.version=O[1]),r=0;r<m.length;r++){a=(h=m[r])[0];var g=h[1];s=h[2];if(null!==(y=u.userAgent.match(a))){u.engine={name:g,version:E(y[1],s)};break}}for(r=0;r<d.length;r++){a=(h=d[r])[0];var h,y,j=h[1];s=h[2];if(null!==(y=u.userAgent.match(a))){u.browser={name:j,version:E(y[1],s)};break}}if(u.crossPlatformFramework===i.ReactNative)try{l=(M=require("react-native").Platform).OS;var O=S(x=""+M.Version);switch(l){case"android":u.os={name:e.Android,version:T(O,x)};break;case"ios":u.os={name:e.iOS,version:x};break;case"windows":u.os={name:e.Windows,version:p(O,x)};break;case"macos":u.os={name:e.MacOS,version:x}}}catch(e){}if(u.isNode)try{var x,M=(l=require("os")).platform();O=S(x=l.release());switch(M){case"win32":u.os={name:e.Windows,version:p(O,x)};break;case"darwin":u.os={name:e.MacOS,version:k(O,x)};break;case"android":u.os={name:e.Android,version:x};break;case"linux":/android/i.test(x)&&(u.os={name:e.Android,version:x})}}catch(e){}void 0!==globalThis.document&&(b(),void 0!==globalThis.device?F():globalThis.document.addEventListener("deviceready",F,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(b(),globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){try{for(var i=r.fullVersionList||r.brands||[],t=r.platformVersion,a=r.platform,l=u.browser.name,s=null,c=0;c<i.length;c++){var m=null==(w=i[c])?{brand:"",version:""}:"string"==typeof w?{brand:w,version:""}:{brand:w.brand,version:w.version},d=m.version,b=m.brand;/not.a.brand/i.test(b)||((null===s||/Chrom/.test(s)&&"Chromium"!==b||"Edge"===s&&/WebView2/.test(b))&&(b=f[b]||b,null!==(s=l)&&!/Chrom/.test(s)&&/Chrom/.test(b)||("Chrome"===(l=b)||"Chrome WebView"===l||"Chrome Headless"===l?u.browser.name=o.Chrome:"Edge"===l||"Edge WebView2"===l?u.browser.name=o.Edge:"Opera Mobi"===l&&(u.browser.name=o.Opera),u.browser.version=d),s=b),"Chromium"===b&&(u.engine.version=d))}"string"==typeof t&&(u.os.name===e.Windows?u.os.version=parseInt(t.split(".")[0],10)>=13?"11":"10":u.os.version=t),"string"==typeof a&&(/android/i.test(a)?u.os.name=e.Android:/ios|iphone|ipad/i.test(a)?u.os.name=e.iOS:/windows|win32/i.test(a)?u.os.name=e.Windows:/macos|macintel/i.test(a)&&(u.os.name=e.MacOS)),!0===r.mobile&&(u.device=n.Mobile)}catch(e){}finally{v()}var w})).catch(v)),w()}();var y={get enabled(){return function(){if(u.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===W){if(u.os.name!==e.iOS)return!1;for(var n=globalThis.document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var t=globalThis.document[W.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[W.element]}()},get element(){return N()},get isFullscreen(){return P()},request:L,exit:R,toggle:function(e,n){return P()?R():L(e,n)},onchange:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<n.length;e++)n[e]()}},onerror:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<n.length;e++)n[e]()}}},j=null,O=null,x=null,M=!1,W=function(){if(u.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return C.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=C[o];if(t.enabled in globalThis.document||t.element in globalThis.document||t.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(t.request="webkitRequestFullScreen"),t}if("webkitCurrentFullScreenElement"in globalThis.document){var a={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:C.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),C={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function A(){null!==x&&(O.fullScreenable=x.fullScreenable,O.autoHideMenuBar=x.autoHideMenuBar,x=null),O=null}function q(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function N(){if(u.crossPlatformFramework===i.Electron){if(null!==O)return O;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||u.os.name===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===W)return j&&j.webkitDisplayingFullscreen?j:null;var t=globalThis.document[W.element];return null!=t?t:null}function P(){return null!==N()}function L(n,r){if(void 0===n&&(n=function(){if(u.crossPlatformFramework===i.Electron){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(u.os.name===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),u.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===O&&(x={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),O=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==W){var t=n[W.request];if("function"==typeof t)try{var a=t.call(n,r);return void 0!==a&&"function"==typeof a.then?void a.then((function(){o()})).catch((function(){u.os.name===e.iOS?l():i()})):void o()}catch(n){if(u.os.name!==e.iOS)return void i()}}function l(){if(u.os.name===e.iOS&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return j=r,q(),r.webkitEnterFullscreen(),void o()}i()}l()}))}function R(){return u.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==O)O.setFullScreen(!1),A();else{var r=N();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==W){var o=globalThis.document[W.exit];if("function"==typeof o){var i=o.call(globalThis.document);return void 0!==i&&"function"==typeof i.then?void i.then((function(){n()})).catch((function(){r()})):void n()}}if(u.os.name===e.iOS&&null!==j){if("function"==typeof j.webkitExitFullscreen&&!0===j.webkitDisplayingFullscreen)return j.webkitExitFullscreen(),j=null,void n();for(var t=globalThis.document.querySelectorAll("video"),a=0;a<t.length;a++){var l=t[a];if("function"==typeof l.webkitExitFullscreen&&!0===l.webkitDisplayingFullscreen)return l.webkitExitFullscreen(),void n()}}N()?r():n()}))}!function(){if(!M){M=!0;var n=!1;if(u.crossPlatformFramework===i.Electron)try{for(var r=require("electron"),o=r.BrowserWindow.getAllWindows(),t=function(e){var n=o[e];n.on("enter-full-screen",(function(){O=n,m()})),n.on("leave-full-screen",(function(){A(),m()}))},a=0;a<o.length;a++)t(a);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){O=n,m()})),n.on("leave-full-screen",(function(){A(),m()}))}))}catch(e){}var l=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],s=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(a=0;a<l.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(l[a],m,!1);for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],d,!1);if(u.os.name===e.iOS)if(q(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){q()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function m(){c("fullscreenchange")}function d(){c("fullscreenerror")}}();var B={installed:!1,name:"Fullscreen",module:y,Constants:{},Errors:{}};module.exports=B;
@@ -1 +1 @@
1
- var e,n,r,o,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(i||(i={}));var t=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",a={os:{name:e.Unknown,version:""},engine:{name:r.Unknown,version:""},browser:{name:o.Unknown,version:""},crossPlatformFramework:i.Unknown,userAgent:t,get network(){return function(){var n={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(n.isOnline=globalThis.navigator.onLine);var r=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;void 0!==r&&(void 0!==r.effectiveType&&(n.effectiveType=r.effectiveType),void 0!==r.type&&(n.type=r.type),void 0!==r.downlink&&(n.downlink=r.downlink),void 0!==r.rtt&&(n.rtt=r.rtt),void 0!==r.saveData&&(n.saveData=r.saveData))}if(a.isNode){try{for(var o=require("os").networkInterfaces(),i=Object.keys(o),t=0;t<i.length;t++){for(var l=o[i[t]],s=0;s<l.length;s++){var u=l[s];u.internal||"IPv4"!==u.family||(n.isOnline=!0)}if(n.isOnline)break}}catch(e){}try{var c=require("child_process");if(a.os.name===e.Windows){try{(m=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&m.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(m=c.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(n.type="ethernet")}catch(e){}null===n.type&&(n.type="other")}else if(a.os.name===e.MacOS)try{var m=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),d=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});d.includes("en0")&&m.includes("Wi-Fi")?n.type="wifi":d.includes("en")||m.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get device(){return this.os.name===e.iOS||this.os.name===e.Android?n.Mobile:this.os.name===e.Windows||this.os.name===e.MacOS?n.Desktop:n.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===n.Mobile},get isDesktop(){return this.device===n.Desktop},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return this.os.name===e.iOS?"standalone"in globalThis.navigator&&!!globalThis.navigator.standalone:"matchMedia"in globalThis&&globalThis.matchMedia("(display-mode: standalone)").matches}},l=[[/windows nt (6\.[23]); arm/i,e.Windows,m],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,m],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,m],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,m],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,m],[/windows ce\/?([\d.]*)/i,e.Windows,m],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,d],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,d],[/cfnetwork\/.+darwin/i,e.iOS,d],[/mac os x ?([\w. ]*)/i,e.MacOS,d],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,d],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]],c={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function m(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function d(e){return void 0===e?"":e.replace(/_/g,".")}function f(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function b(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}function v(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}function w(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function g(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function h(){if(a.crossPlatformFramework=i.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":a.os={name:e.Android,version:globalThis.device.version};break;case"iOS":a.os={name:e.iOS,version:globalThis.device.version}}}!function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(a.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(a.crossPlatformFramework=i.ReactNative);for(var r=0;r<l.length;r++){var m=(E=l[r])[0],d=E[1],p=E[2];if(null!==(S=a.userAgent.match(m))){a.os={name:d,version:w(S[1],p)};break}}var k;for(a.os.name===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var a=void 0,l=void 0;if((a=t<r.length?parseInt(r[t],10):0)>(l=t<o.length?parseInt(o[t],10):0))return 1;if(a<l)return-1}return 0}(a.os.version,"18.6")&&null!==(j=/\) Version\/([\d.]+)/.exec(a.userAgent))&&parseInt(j[1].substring(0,2),10)>=26&&(a.os.version=j[1]),r=0;r<s.length;r++){m=(E=s[r])[0];var T=E[1];p=E[2];if(null!==(S=a.userAgent.match(m))){a.engine={name:T,version:w(S[1],p)};break}}for(r=0;r<u.length;r++){m=(E=u[r])[0];var E,S,F=E[1];p=E[2];if(null!==(S=a.userAgent.match(m))){a.browser={name:F,version:w(S[1],p)};break}}if(a.crossPlatformFramework===i.ReactNative)try{d=(O=require("react-native").Platform).OS;var j=g(y=""+O.Version);switch(d){case"android":a.os={name:e.Android,version:v(j,y)};break;case"ios":a.os={name:e.iOS,version:y};break;case"windows":a.os={name:e.Windows,version:f(j,y)};break;case"macos":a.os={name:e.MacOS,version:y}}}catch(e){}if(a.isNode)try{var y,O=(d=require("os")).platform();j=g(y=d.release());switch(O){case"win32":a.os={name:e.Windows,version:f(j,y)};break;case"darwin":a.os={name:e.MacOS,version:b(j,y)};break;case"android":a.os={name:e.Android,version:y};break;case"linux":/android/i.test(y)&&(a.os={name:e.Android,version:y})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?h():globalThis.document.addEventListener("deviceready",h,!1)),k=globalThis.navigator,void 0!==globalThis.navigator&&void 0!==k.userAgentData&&void 0!==k.userAgentData.getHighEntropyValues&&globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){for(var i,t=r.fullVersionList||r.brands||[],l=r.platformVersion,s=r.platform,u=a.browser.name,m=null,d=0;d<t.length;d++){var f=null==(i=t[d])?{brand:"",version:""}:"string"==typeof i?{brand:i,version:""}:{brand:i.brand,version:i.version},b=f.version,v=f.brand;/not.a.brand/i.test(v)||((null===m||/Chrom/.test(m)&&"Chromium"!==v||"Edge"===m&&/WebView2/.test(v))&&(v=c[v]||v,null!==(m=u)&&!/Chrom/.test(m)&&/Chrom/.test(v)||("Chrome"===(u=v)||"Chrome WebView"===u||"Chrome Headless"===u?a.browser.name=o.Chrome:"Edge"===u||"Edge WebView2"===u?a.browser.name=o.Edge:"Opera Mobi"===u&&(a.browser.name=o.Opera),a.browser.version=b),m=v),"Chromium"===v&&(a.engine.version=b))}"string"==typeof l&&(a.os.name===e.Windows?a.os.version=parseInt(l.split(".")[0],10)>=13?"11":"10":a.os.version=l),"string"==typeof s&&(/android/i.test(s)?a.os.name=e.Android:/ios|iphone|ipad/i.test(s)?a.os.name=e.iOS:/windows|win32/i.test(s)?a.os.name=e.Windows:/macos|macintel/i.test(s)&&(a.os.name=e.MacOS)),!0===r.mobile&&(a.device=n.Mobile)}))}();var p={get enabled(){return function(){if(a.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===F){if(a.os.name!==e.iOS)return!1;for(var n=globalThis.document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var t=globalThis.document[F.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[F.element]}()},get element(){return x()},get isFullscreen(){return M()},request:W,exit:C,toggle:function(e,n){return M()?C():W(e,n)},onchange:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<n.length;e++)n[e]()}},onerror:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<n.length;e++)n[e]()}}},k=null,T=null,E=null,S=!1,F=function(){if(a.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return j.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=j[o];if(t.enabled in globalThis.document||t.element in globalThis.document||t.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(t.request="webkitRequestFullScreen"),t}if("webkitCurrentFullScreenElement"in globalThis.document){var l={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:j.webkit.events};return"webkitRequestFullScreen"in e&&(l.request="webkitRequestFullScreen"),l}return null}(),j={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function y(){null!==E&&(T.fullScreenable=E.fullScreenable,T.autoHideMenuBar=E.autoHideMenuBar,E=null),T=null}function O(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function x(){if(a.crossPlatformFramework===i.Electron){if(null!==T)return T;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||a.os.name===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===F)return k&&k.webkitDisplayingFullscreen?k:null;var t=globalThis.document[F.element];return null!=t?t:null}function M(){return null!==x()}function W(n,r){if(void 0===n&&(n=function(){if(a.crossPlatformFramework===i.Electron){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(a.os.name===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),a.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===T&&(E={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),T=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==F){var t=n[F.request];if("function"==typeof t)try{var l=t.call(n,r);return void 0!==l&&"function"==typeof l.then?void l.then((function(){o()})).catch((function(){a.os.name===e.iOS?s():i()})):void o()}catch(n){if(a.os.name!==e.iOS)return void i()}}function s(){if(a.os.name===e.iOS&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return k=r,O(),r.webkitEnterFullscreen(),void o()}i()}s()}))}function C(){return a.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==T)T.setFullScreen(!1),y();else{var r=x();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==F){var o=globalThis.document[F.exit];if("function"==typeof o){var i=o.call(globalThis.document);return void 0!==i&&"function"==typeof i.then?void i.then((function(){n()})).catch((function(){r()})):void n()}}if(a.os.name===e.iOS&&null!==k){if("function"==typeof k.webkitExitFullscreen&&!0===k.webkitDisplayingFullscreen)return k.webkitExitFullscreen(),k=null,void n();for(var t=globalThis.document.querySelectorAll("video"),l=0;l<t.length;l++){var s=t[l];if("function"==typeof s.webkitExitFullscreen&&!0===s.webkitDisplayingFullscreen)return s.webkitExitFullscreen(),void n()}}x()?r():n()}))}!function(){if(!S){S=!0;var n=!1;if(a.crossPlatformFramework===i.Electron)try{for(var r=require("electron"),o=r.BrowserWindow.getAllWindows(),t=function(e){var n=o[e];n.on("enter-full-screen",(function(){T=n,m()})),n.on("leave-full-screen",(function(){y(),m()}))},l=0;l<o.length;l++)t(l);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){T=n,m()})),n.on("leave-full-screen",(function(){y(),m()}))}))}catch(e){}var s=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],u=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(l=0;l<s.length;l++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[l],m,!1);for(l=0;l<u.length;l++)void 0!==globalThis.document&&globalThis.document.addEventListener(u[l],d,!1);if(a.os.name===e.iOS)if(O(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){O()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function m(){c("fullscreenchange")}function d(){c("fullscreenerror")}}();var A={installed:!1,name:"Fullscreen",module:p,Constants:{},Errors:{}};export{A as default};
1
+ var e,n,r,o,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(i||(i={}));var t=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",a="loading",l=[],s=0,u={os:{name:e.Unknown,version:""},engine:{name:r.Unknown,version:""},browser:{name:o.Unknown,version:""},crossPlatformFramework:i.Unknown,userAgent:t,get readyState(){return a},get network(){return function(){var n={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(n.isOnline=globalThis.navigator.onLine);var r=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;void 0!==r&&(void 0!==r.effectiveType&&(n.effectiveType=r.effectiveType),void 0!==r.type&&(n.type=r.type),void 0!==r.downlink&&(n.downlink=r.downlink),void 0!==r.rtt&&(n.rtt=r.rtt),void 0!==r.saveData&&(n.saveData=r.saveData))}if(u.isNode){try{for(var o=require("os").networkInterfaces(),i=Object.keys(o),t=0;t<i.length;t++){for(var a=o[i[t]],l=0;l<a.length;l++){var s=a[l];s.internal||"IPv4"!==s.family||(n.isOnline=!0)}if(n.isOnline)break}}catch(e){}try{var c=require("child_process");if(u.os.name===e.Windows){try{(m=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&m.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(m=c.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(n.type="ethernet")}catch(e){}null===n.type&&(n.type="other")}else if(u.os.name===e.MacOS)try{var m=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),d=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});d.includes("en0")&&m.includes("Wi-Fi")?n.type="wifi":d.includes("en")||m.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get device(){return this.os.name===e.iOS||this.os.name===e.Android?n.Mobile:this.os.name===e.Windows||this.os.name===e.MacOS?n.Desktop:n.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===n.Mobile},get isDesktop(){return this.device===n.Desktop},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return this.os.name===e.iOS?"standalone"in globalThis.navigator&&!!globalThis.navigator.standalone:"matchMedia"in globalThis&&globalThis.matchMedia("(display-mode: standalone)").matches},onready:function(e){if("complete"===this.readyState)try{e(this)}catch(e){}else l.push(e)}},c=[[/windows nt (6\.[23]); arm/i,e.Windows,g],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,g],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,g],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,g],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,g],[/windows ce\/?([\d.]*)/i,e.Windows,g],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,h],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,h],[/cfnetwork\/.+darwin/i,e.iOS,h],[/mac os x ?([\w. ]*)/i,e.MacOS,h],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,h],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],m=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],d=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]],f={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function b(){s++}function v(){s--,w()}function w(){if(0===s&&"loading"===a){a="complete";for(var e=0;e<l.length;e++)try{l[e](u)}catch(e){}l.length=0}}function g(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function h(e){return void 0===e?"":e.replace(/_/g,".")}function p(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function k(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}function T(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}function E(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function S(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function F(){if(u.crossPlatformFramework=i.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":u.os={name:e.Android,version:globalThis.device.version};break;case"iOS":u.os={name:e.iOS,version:globalThis.device.version}}v()}!function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(u.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(u.crossPlatformFramework=i.ReactNative);for(var r=0;r<c.length;r++){var a=(h=c[r])[0],l=h[1],s=h[2];if(null!==(y=u.userAgent.match(a))){u.os={name:l,version:E(y[1],s)};break}}for(u.os.name===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var a=void 0,l=void 0;if((a=t<r.length?parseInt(r[t],10):0)>(l=t<o.length?parseInt(o[t],10):0))return 1;if(a<l)return-1}return 0}(u.os.version,"18.6")&&null!==(O=/\) Version\/([\d.]+)/.exec(u.userAgent))&&parseInt(O[1].substring(0,2),10)>=26&&(u.os.version=O[1]),r=0;r<m.length;r++){a=(h=m[r])[0];var g=h[1];s=h[2];if(null!==(y=u.userAgent.match(a))){u.engine={name:g,version:E(y[1],s)};break}}for(r=0;r<d.length;r++){a=(h=d[r])[0];var h,y,j=h[1];s=h[2];if(null!==(y=u.userAgent.match(a))){u.browser={name:j,version:E(y[1],s)};break}}if(u.crossPlatformFramework===i.ReactNative)try{l=(M=require("react-native").Platform).OS;var O=S(x=""+M.Version);switch(l){case"android":u.os={name:e.Android,version:T(O,x)};break;case"ios":u.os={name:e.iOS,version:x};break;case"windows":u.os={name:e.Windows,version:p(O,x)};break;case"macos":u.os={name:e.MacOS,version:x}}}catch(e){}if(u.isNode)try{var x,M=(l=require("os")).platform();O=S(x=l.release());switch(M){case"win32":u.os={name:e.Windows,version:p(O,x)};break;case"darwin":u.os={name:e.MacOS,version:k(O,x)};break;case"android":u.os={name:e.Android,version:x};break;case"linux":/android/i.test(x)&&(u.os={name:e.Android,version:x})}}catch(e){}void 0!==globalThis.document&&(b(),void 0!==globalThis.device?F():globalThis.document.addEventListener("deviceready",F,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(b(),globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){try{for(var i=r.fullVersionList||r.brands||[],t=r.platformVersion,a=r.platform,l=u.browser.name,s=null,c=0;c<i.length;c++){var m=null==(w=i[c])?{brand:"",version:""}:"string"==typeof w?{brand:w,version:""}:{brand:w.brand,version:w.version},d=m.version,b=m.brand;/not.a.brand/i.test(b)||((null===s||/Chrom/.test(s)&&"Chromium"!==b||"Edge"===s&&/WebView2/.test(b))&&(b=f[b]||b,null!==(s=l)&&!/Chrom/.test(s)&&/Chrom/.test(b)||("Chrome"===(l=b)||"Chrome WebView"===l||"Chrome Headless"===l?u.browser.name=o.Chrome:"Edge"===l||"Edge WebView2"===l?u.browser.name=o.Edge:"Opera Mobi"===l&&(u.browser.name=o.Opera),u.browser.version=d),s=b),"Chromium"===b&&(u.engine.version=d))}"string"==typeof t&&(u.os.name===e.Windows?u.os.version=parseInt(t.split(".")[0],10)>=13?"11":"10":u.os.version=t),"string"==typeof a&&(/android/i.test(a)?u.os.name=e.Android:/ios|iphone|ipad/i.test(a)?u.os.name=e.iOS:/windows|win32/i.test(a)?u.os.name=e.Windows:/macos|macintel/i.test(a)&&(u.os.name=e.MacOS)),!0===r.mobile&&(u.device=n.Mobile)}catch(e){}finally{v()}var w})).catch(v)),w()}();var y={get enabled(){return function(){if(u.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===W){if(u.os.name!==e.iOS)return!1;for(var n=globalThis.document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var t=globalThis.document[W.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[W.element]}()},get element(){return N()},get isFullscreen(){return P()},request:L,exit:R,toggle:function(e,n){return P()?R():L(e,n)},onchange:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<n.length;e++)n[e]()}},onerror:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<n.length;e++)n[e]()}}},j=null,O=null,x=null,M=!1,W=function(){if(u.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return C.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=C[o];if(t.enabled in globalThis.document||t.element in globalThis.document||t.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(t.request="webkitRequestFullScreen"),t}if("webkitCurrentFullScreenElement"in globalThis.document){var a={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:C.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),C={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function A(){null!==x&&(O.fullScreenable=x.fullScreenable,O.autoHideMenuBar=x.autoHideMenuBar,x=null),O=null}function q(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function N(){if(u.crossPlatformFramework===i.Electron){if(null!==O)return O;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||u.os.name===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===W)return j&&j.webkitDisplayingFullscreen?j:null;var t=globalThis.document[W.element];return null!=t?t:null}function P(){return null!==N()}function L(n,r){if(void 0===n&&(n=function(){if(u.crossPlatformFramework===i.Electron){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(u.os.name===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),u.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===O&&(x={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),O=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==W){var t=n[W.request];if("function"==typeof t)try{var a=t.call(n,r);return void 0!==a&&"function"==typeof a.then?void a.then((function(){o()})).catch((function(){u.os.name===e.iOS?l():i()})):void o()}catch(n){if(u.os.name!==e.iOS)return void i()}}function l(){if(u.os.name===e.iOS&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return j=r,q(),r.webkitEnterFullscreen(),void o()}i()}l()}))}function R(){return u.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==O)O.setFullScreen(!1),A();else{var r=N();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==W){var o=globalThis.document[W.exit];if("function"==typeof o){var i=o.call(globalThis.document);return void 0!==i&&"function"==typeof i.then?void i.then((function(){n()})).catch((function(){r()})):void n()}}if(u.os.name===e.iOS&&null!==j){if("function"==typeof j.webkitExitFullscreen&&!0===j.webkitDisplayingFullscreen)return j.webkitExitFullscreen(),j=null,void n();for(var t=globalThis.document.querySelectorAll("video"),a=0;a<t.length;a++){var l=t[a];if("function"==typeof l.webkitExitFullscreen&&!0===l.webkitDisplayingFullscreen)return l.webkitExitFullscreen(),void n()}}N()?r():n()}))}!function(){if(!M){M=!0;var n=!1;if(u.crossPlatformFramework===i.Electron)try{for(var r=require("electron"),o=r.BrowserWindow.getAllWindows(),t=function(e){var n=o[e];n.on("enter-full-screen",(function(){O=n,m()})),n.on("leave-full-screen",(function(){A(),m()}))},a=0;a<o.length;a++)t(a);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){O=n,m()})),n.on("leave-full-screen",(function(){A(),m()}))}))}catch(e){}var l=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],s=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(a=0;a<l.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(l[a],m,!1);for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],d,!1);if(u.os.name===e.iOS)if(q(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){q()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function m(){c("fullscreenchange")}function d(){c("fullscreenerror")}}();var B={installed:!1,name:"Fullscreen",module:y,Constants:{},Errors:{}};export{B as default};
@@ -69,12 +69,18 @@ var CrossPlatformFramework;
69
69
  })(CrossPlatformFramework || (CrossPlatformFramework = {}));
70
70
  var USER_AGENT = typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgent === 'string' ? globalThis.navigator.userAgent : '';
71
71
 
72
+ var readyState = 'loading';
73
+ var readyCallback = [];
74
+ var pendingTasks = 0;
72
75
  var Platform = {
73
76
  os: { name: OS.Unknown, version: '' },
74
77
  engine: { name: Engines.Unknown, version: '' },
75
78
  browser: { name: Browsers.Unknown, version: '' },
76
79
  crossPlatformFramework: CrossPlatformFramework.Unknown,
77
80
  userAgent: USER_AGENT,
81
+ get readyState() {
82
+ return readyState;
83
+ },
78
84
  get network() {
79
85
  return getNetwork();
80
86
  },
@@ -107,6 +113,18 @@ var Platform = {
107
113
  return false;
108
114
  return globalThis.matchMedia('(display-mode: standalone)').matches;
109
115
  },
116
+ onready: function (callback) {
117
+ if (this.readyState === 'complete') {
118
+ try {
119
+ callback(this);
120
+ }
121
+ catch (_) {
122
+ }
123
+ }
124
+ else {
125
+ readyCallback.push(callback);
126
+ }
127
+ }
110
128
  };
111
129
  var OS_RESOLVER_MAP = [
112
130
  [/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
@@ -174,6 +192,26 @@ var HIGH_ENTROPY_BRAND_NAME_MAP = {
174
192
  'HeadlessChrome': 'Chrome Headless',
175
193
  'OperaMobile': 'Opera Mobi',
176
194
  };
195
+ function incrementPendingTasks() {
196
+ pendingTasks++;
197
+ }
198
+ function decrementPendingTasks() {
199
+ pendingTasks--;
200
+ checkReady();
201
+ }
202
+ function checkReady() {
203
+ if (pendingTasks === 0 && readyState === 'loading') {
204
+ readyState = 'complete';
205
+ for (var i = 0; i < readyCallback.length; i++) {
206
+ try {
207
+ readyCallback[i](Platform);
208
+ }
209
+ catch (_) {
210
+ }
211
+ }
212
+ readyCallback.length = 0;
213
+ }
214
+ }
177
215
  function resolveWindowsVersion(string) {
178
216
  if (string === undefined)
179
217
  return '';
@@ -374,6 +412,7 @@ function parseOSFromCordova() {
374
412
  break;
375
413
  }
376
414
  }
415
+ decrementPendingTasks();
377
416
  }
378
417
  function getRenderer() {
379
418
  if (typeof globalThis.document === 'undefined')
@@ -483,9 +522,6 @@ function getNetwork() {
483
522
  }
484
523
  return network;
485
524
  }
486
- function canUseHighEntropyValues(navigator) {
487
- return typeof globalThis.navigator !== 'undefined' && typeof navigator.userAgentData !== 'undefined' && typeof navigator.userAgentData.getHighEntropyValues !== 'undefined';
488
- }
489
525
  function init() {
490
526
  if ((typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(USER_AGENT)))
491
527
  Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
@@ -618,6 +654,7 @@ function init() {
618
654
  }
619
655
  }
620
656
  if (typeof globalThis.document !== 'undefined') {
657
+ incrementPendingTasks();
621
658
  if (typeof globalThis.device !== 'undefined') {
622
659
  parseOSFromCordova();
623
660
  }
@@ -625,61 +662,68 @@ function init() {
625
662
  globalThis.document.addEventListener("deviceready", parseOSFromCordova, false);
626
663
  }
627
664
  }
628
- if (canUseHighEntropyValues(globalThis.navigator)) {
629
- globalThis
630
- .navigator
631
- .userAgentData
632
- .getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
665
+ if (typeof globalThis.navigator !== 'undefined' && typeof globalThis.navigator.userAgentData !== 'undefined' && typeof globalThis.navigator.userAgentData.getHighEntropyValues !== 'undefined') {
666
+ incrementPendingTasks();
667
+ globalThis.navigator.userAgentData.getHighEntropyValues(['brands', 'fullVersionList', 'mobile', 'model', 'platform', 'platformVersion', 'architecture', 'formFactors', 'bitness', 'uaFullVersion', 'wow64'])
633
668
  .then(function (result) {
634
- var brands = result.fullVersionList || result.brands || [];
635
- var platformVersion = result.platformVersion;
636
- var platform = result.platform;
637
- var browserName = Platform.browser.name;
638
- var prevBrandName = null;
639
- for (var i = 0; i < brands.length; i++) {
640
- var brand = normalizeBrand(brands[i]);
641
- var brandVersion = brand.version;
642
- var brandName = brand.brand;
643
- if (/not.a.brand/i.test(brandName))
644
- continue;
645
- if (prevBrandName === null || (/Chrom/.test(prevBrandName) && brandName !== 'Chromium') || (prevBrandName === 'Edge' && /WebView2/.test(brandName))) {
646
- brandName = HIGH_ENTROPY_BRAND_NAME_MAP[brandName] || brandName;
647
- prevBrandName = browserName;
648
- if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
649
- browserName = brandName;
650
- if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
651
- Platform.browser.name = Browsers.Chrome;
652
- else if (browserName === 'Edge' || browserName === 'Edge WebView2')
653
- Platform.browser.name = Browsers.Edge;
654
- else if (browserName === 'Opera Mobi')
655
- Platform.browser.name = Browsers.Opera;
656
- Platform.browser.version = brandVersion;
669
+ try {
670
+ var brands = result.fullVersionList || result.brands || [];
671
+ var platformVersion = result.platformVersion;
672
+ var platform = result.platform;
673
+ var browserName = Platform.browser.name;
674
+ var prevBrandName = null;
675
+ for (var i = 0; i < brands.length; i++) {
676
+ var brand = normalizeBrand(brands[i]);
677
+ var brandVersion = brand.version;
678
+ var brandName = brand.brand;
679
+ if (/not.a.brand/i.test(brandName))
680
+ continue;
681
+ if (prevBrandName === null || (/Chrom/.test(prevBrandName) && brandName !== 'Chromium') || (prevBrandName === 'Edge' && /WebView2/.test(brandName))) {
682
+ brandName = HIGH_ENTROPY_BRAND_NAME_MAP[brandName] || brandName;
683
+ prevBrandName = browserName;
684
+ if (prevBrandName === null || /Chrom/.test(prevBrandName) || !/Chrom/.test(brandName)) {
685
+ browserName = brandName;
686
+ if (browserName === 'Chrome' || browserName === 'Chrome WebView' || browserName === 'Chrome Headless')
687
+ Platform.browser.name = Browsers.Chrome;
688
+ else if (browserName === 'Edge' || browserName === 'Edge WebView2')
689
+ Platform.browser.name = Browsers.Edge;
690
+ else if (browserName === 'Opera Mobi')
691
+ Platform.browser.name = Browsers.Opera;
692
+ Platform.browser.version = brandVersion;
693
+ }
694
+ prevBrandName = brandName;
657
695
  }
658
- prevBrandName = brandName;
696
+ if (brandName === 'Chromium')
697
+ Platform.engine.version = brandVersion;
698
+ }
699
+ if (typeof platformVersion === 'string') {
700
+ if (Platform.os.name === OS.Windows)
701
+ Platform.os.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
702
+ else
703
+ Platform.os.version = platformVersion;
659
704
  }
660
- if (brandName === 'Chromium')
661
- Platform.engine.version = brandVersion;
705
+ if (typeof platform === 'string') {
706
+ if (/android/i.test(platform))
707
+ Platform.os.name = OS.Android;
708
+ else if (/ios|iphone|ipad/i.test(platform))
709
+ Platform.os.name = OS.iOS;
710
+ else if (/windows|win32/i.test(platform))
711
+ Platform.os.name = OS.Windows;
712
+ else if (/macos|macintel/i.test(platform))
713
+ Platform.os.name = OS.MacOS;
714
+ }
715
+ if (result.mobile === true)
716
+ Platform.device = Devices.Mobile;
662
717
  }
663
- if (typeof platformVersion === 'string') {
664
- if (Platform.os.name === OS.Windows)
665
- Platform.os.version = parseInt(platformVersion.split('.')[0], 10) >= 13 ? '11' : '10';
666
- else
667
- Platform.os.version = platformVersion;
718
+ catch (_) {
668
719
  }
669
- if (typeof platform === 'string') {
670
- if (/android/i.test(platform))
671
- Platform.os.name = OS.Android;
672
- else if (/ios|iphone|ipad/i.test(platform))
673
- Platform.os.name = OS.iOS;
674
- else if (/windows|win32/i.test(platform))
675
- Platform.os.name = OS.Windows;
676
- else if (/macos|macintel/i.test(platform))
677
- Platform.os.name = OS.MacOS;
720
+ finally {
721
+ decrementPendingTasks();
678
722
  }
679
- if (result.mobile === true)
680
- Platform.device = Devices.Mobile;
681
- });
723
+ })
724
+ .catch(decrementPendingTasks);
682
725
  }
726
+ checkReady();
683
727
  }
684
728
  init();
685
729