native-fn 1.0.79 → 1.0.81
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.
- package/dist/native.cjs +1 -1
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +1 -1
- package/dist/native.umd.js +1 -1
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +21 -0
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +21 -0
- package/dist/plugin/app/index.umd.js +21 -0
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/appearance/index.cjs +21 -0
- package/dist/plugin/appearance/index.min.cjs +1 -1
- package/dist/plugin/appearance/index.min.mjs +1 -1
- package/dist/plugin/appearance/index.mjs +21 -0
- package/dist/plugin/appearance/index.umd.js +21 -0
- package/dist/plugin/appearance/index.umd.min.js +1 -1
- package/dist/plugin/clipboard/index.cjs +21 -0
- package/dist/plugin/clipboard/index.min.cjs +1 -1
- package/dist/plugin/clipboard/index.min.mjs +1 -1
- package/dist/plugin/clipboard/index.mjs +21 -0
- package/dist/plugin/clipboard/index.umd.js +21 -0
- package/dist/plugin/clipboard/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/index.cjs +21 -0
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +21 -0
- package/dist/plugin/fullscreen/index.umd.js +21 -0
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/platform/index.cjs +21 -0
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +21 -0
- package/dist/plugin/platform/index.umd.js +21 -0
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/theme/index.cjs +21 -0
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +21 -0
- package/dist/plugin/theme/index.umd.js +21 -0
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/package.json +1 -1
|
@@ -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="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{(d=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&d.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(d=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 d=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),m=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});m.includes("en0")&&d.includes("Wi-Fi")?n.type="wifi":m.includes("en")||d.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get dimension(){return function(){var e={innerWidth:-1,innerHeight:-1,outerWidth:-1,outerHeight:-1,scale:1};if(void 0!==globalThis.innerWidth)return e.innerWidth=globalThis.innerWidth,e.innerHeight=globalThis.innerHeight,e.outerWidth=globalThis.outerWidth,e.outerHeight=globalThis.outerHeight,e.scale=globalThis.devicePixelRatio||1,e;if(u.crossPlatformFramework===i.ReactNative)try{var n=require("react-native"),r=n.Dimensions,o=n.PixelRatio,t=r.get("screen"),a=r.get("window");return e.innerWidth=t.width,e.innerHeight=t.height,e.outerWidth=a.width,e.outerHeight=a.height,e.scale=o.get(),e}catch(e){}return e}()},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,h],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,h],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,h],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,h],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,h],[/windows ce\/?([\d.]*)/i,e.Windows,h],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,v],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,v],[/cfnetwork\/.+darwin/i,e.iOS,v],[/mac os x ?([\w. ]*)/i,e.MacOS,v],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,v],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],d=[[/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]],m=[[/\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 g(){s--,b()}function b(){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 h(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 v(e){return void 0===e?"":e.replace(/_/g,".")}function w(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 p(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 k(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 T(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function E(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function S(){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}}g()}!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=(F=c[r])[0],l=F[1],h=F[2];if(null!==(y=u.userAgent.match(a))){u.os={name:l,version:T(y[1],h)};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!==(x=/\) Version\/([\d.]+)/.exec(u.userAgent))&&parseInt(x[1].substring(0,2),10)>=26&&(u.os.version=x[1]),r=0;r<d.length;r++){a=(F=d[r])[0];var v=F[1];h=F[2];if(null!==(y=u.userAgent.match(a))){u.engine={name:v,version:T(y[1],h)};break}}for(r=0;r<m.length;r++){a=(F=m[r])[0];var F,y,j=F[1];h=F[2];if(null!==(y=u.userAgent.match(a))){u.browser={name:j,version:T(y[1],h)};break}}if(u.crossPlatformFramework===i.ReactNative)try{l=(W=require("react-native").Platform).OS;var x=E(O=""+W.Version);switch(l){case"android":u.os={name:e.Android,version:k(x,O)};break;case"ios":u.os={name:e.iOS,version:O};break;case"windows":u.os={name:e.Windows,version:w(x,O)};break;case"macos":u.os={name:e.MacOS,version:O}}}catch(e){}if(u.isNode)try{var O,W=(l=require("os")).platform();x=E(O=l.release());switch(W){case"win32":u.os={name:e.Windows,version:w(x,O)};break;case"darwin":u.os={name:e.MacOS,version:p(x,O)};break;case"android":u.os={name:e.Android,version:O};break;case"linux":/android/i.test(O)&&(u.os={name:e.Android,version:O})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?S():globalThis.document.addEventListener("deviceready",S,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(s++,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 d=null==(h=i[c])?{brand:"",version:""}:"string"==typeof h?{brand:h,version:""}:{brand:h.brand,version:h.version},m=d.version,b=d.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=m),s=b),"Chromium"===b&&(u.engine.version=m))}"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{g()}var h})).catch(g)),b()}();var F={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 P()},get isFullscreen(){return q()},request:N,exit:R,toggle:function(e,n){return q()?R():N(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]()}}},y=null,j=null,x=null,O=!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 M.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=M[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:M.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),M={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 C(){null!==x&&(j.fullScreenable=x.fullScreenable,j.autoHideMenuBar=x.autoHideMenuBar,x=null),j=null}function A(){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 P(){if(u.crossPlatformFramework===i.Electron){if(null!==j)return j;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 y&&y.webkitDisplayingFullscreen?y:null;var t=globalThis.document[W.element];return null!=t?t:null}function q(){return null!==P()}function N(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===j&&(x={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),j=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 y=r,A(),r.webkitEnterFullscreen(),void o()}i()}l()}))}function R(){return u.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==j)j.setFullScreen(!1),C();else{var r=P();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!==y){if("function"==typeof y.webkitExitFullscreen&&!0===y.webkitDisplayingFullscreen)return y.webkitExitFullscreen(),y=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()}}P()?r():n()}))}!function(){if(!O){O=!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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))},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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))}))}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],d,!1);for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],m,!1);if(u.os.name===e.iOS)if(A(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){A()})).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 d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}();var H={installed:!1,name:"Fullscreen",module:F,Constants:{},Errors:{}};module.exports=H;
|
|
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,c={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;if(void 0!==r)return 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),n}if(c.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 u=require("child_process");if(c.os.name===e.Windows){try{(d=u.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&d.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(d=u.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(n.type="ethernet")}catch(e){}null===n.type&&(n.type="other")}else if(c.os.name===e.MacOS)try{var d=u.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),m=u.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});m.includes("en0")&&d.includes("Wi-Fi")?n.type="wifi":m.includes("en")||d.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get dimension(){return function(){var e={innerWidth:-1,innerHeight:-1,outerWidth:-1,outerHeight:-1,scale:1};if(void 0!==globalThis.innerWidth)return e.innerWidth=globalThis.innerWidth,e.innerHeight=globalThis.innerHeight,e.outerWidth=globalThis.outerWidth,e.outerHeight=globalThis.outerHeight,e.scale=globalThis.devicePixelRatio||1,e;if(c.crossPlatformFramework===i.ReactNative)try{var n=require("react-native"),r=n.Dimensions,o=n.PixelRatio,t=r.get("screen"),a=r.get("window");return e.innerWidth=t.width,e.innerHeight=t.height,e.outerWidth=a.width,e.outerHeight=a.height,e.scale=o.get(),e}catch(e){}if(c.crossPlatformFramework===i.Electron)try{var l=require("electron"),s=l.screen,u=l.BrowserWindow,d=u.getFocusedWindow()||u.getAllWindows()[0];if(void 0!==d){var m=d.getContentSize(),f=d.getSize();e.innerWidth=m[0],e.innerHeight=m[1],e.outerWidth=f[0],e.outerHeight=f[1],e.scale=s.getDisplayMatching(d.getBounds()).scaleFactor}return e}catch(e){}return e}()},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)}},u=[[/windows nt (6\.[23]); arm/i,e.Windows,v],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,v],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,v],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,v],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,v],[/windows ce\/?([\d.]*)/i,e.Windows,v],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,b],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,b],[/cfnetwork\/.+darwin/i,e.iOS,b],[/mac os x ?([\w. ]*)/i,e.MacOS,b],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,b],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],d=[[/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]],m=[[/\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 g(){s--,h()}function h(){if(0===s&&"loading"===a){a="complete";for(var e=0;e<l.length;e++)try{l[e](c)}catch(e){}l.length=0}}function v(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 b(e){return void 0===e?"":e.replace(/_/g,".")}function w(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 p(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 k(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 T(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function E(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function S(){if(c.crossPlatformFramework=i.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":c.os={name:e.Android,version:globalThis.device.version};break;case"iOS":c.os={name:e.iOS,version:globalThis.device.version}}g()}!function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(c.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(c.crossPlatformFramework=i.ReactNative);for(var r=0;r<u.length;r++){var a=(F=u[r])[0],l=F[1],v=F[2];if(null!==(y=c.userAgent.match(a))){c.os={name:l,version:T(y[1],v)};break}}for(c.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}(c.os.version,"18.6")&&null!==(W=/\) Version\/([\d.]+)/.exec(c.userAgent))&&parseInt(W[1].substring(0,2),10)>=26&&(c.os.version=W[1]),r=0;r<d.length;r++){a=(F=d[r])[0];var b=F[1];v=F[2];if(null!==(y=c.userAgent.match(a))){c.engine={name:b,version:T(y[1],v)};break}}for(r=0;r<m.length;r++){a=(F=m[r])[0];var F,y,j=F[1];v=F[2];if(null!==(y=c.userAgent.match(a))){c.browser={name:j,version:T(y[1],v)};break}}if(c.crossPlatformFramework===i.ReactNative)try{l=(O=require("react-native").Platform).OS;var W=E(x=""+O.Version);switch(l){case"android":c.os={name:e.Android,version:k(W,x)};break;case"ios":c.os={name:e.iOS,version:x};break;case"windows":c.os={name:e.Windows,version:w(W,x)};break;case"macos":c.os={name:e.MacOS,version:x}}}catch(e){}if(c.isNode)try{var x,O=(l=require("os")).platform();W=E(x=l.release());switch(O){case"win32":c.os={name:e.Windows,version:w(W,x)};break;case"darwin":c.os={name:e.MacOS,version:p(W,x)};break;case"android":c.os={name:e.Android,version:x};break;case"linux":/android/i.test(x)&&(c.os={name:e.Android,version:x})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?S():globalThis.document.addEventListener("deviceready",S,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(s++,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=c.browser.name,s=null,u=0;u<i.length;u++){var d=null==(v=i[u])?{brand:"",version:""}:"string"==typeof v?{brand:v,version:""}:{brand:v.brand,version:v.version},m=d.version,h=d.brand;/not.a.brand/i.test(h)||((null===s||/Chrom/.test(s)&&"Chromium"!==h||"Edge"===s&&/WebView2/.test(h))&&(h=f[h]||h,null!==(s=l)&&!/Chrom/.test(s)&&/Chrom/.test(h)||("Chrome"===(l=h)||"Chrome WebView"===l||"Chrome Headless"===l?c.browser.name=o.Chrome:"Edge"===l||"Edge WebView2"===l?c.browser.name=o.Edge:"Opera Mobi"===l&&(c.browser.name=o.Opera),c.browser.version=m),s=h),"Chromium"===h&&(c.engine.version=m))}"string"==typeof t&&(c.os.name===e.Windows?c.os.version=parseInt(t.split(".")[0],10)>=13?"11":"10":c.os.version=t),"string"==typeof a&&(/android/i.test(a)?c.os.name=e.Android:/ios|iphone|ipad/i.test(a)?c.os.name=e.iOS:/windows|win32/i.test(a)?c.os.name=e.Windows:/macos|macintel/i.test(a)&&(c.os.name=e.MacOS)),!0===r.mobile&&(c.device=n.Mobile)}catch(e){}finally{g()}var v})).catch(g)),h()}();var F={get enabled(){return function(){if(c.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===O){if(c.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[O.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[O.element]}()},get element(){return P()},get isFullscreen(){return q()},request:N,exit:H,toggle:function(e,n){return q()?H():N(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]()}}},y=null,j=null,W=null,x=!1,O=function(){if(c.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return M.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=M[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:M.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),M={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 C(){null!==W&&(j.fullScreenable=W.fullScreenable,j.autoHideMenuBar=W.autoHideMenuBar,W=null),j=null}function A(){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 P(){if(c.crossPlatformFramework===i.Electron){if(null!==j)return j;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||c.os.name===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===O)return y&&y.webkitDisplayingFullscreen?y:null;var t=globalThis.document[O.element];return null!=t?t:null}function q(){return null!==P()}function N(n,r){if(void 0===n&&(n=function(){if(c.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(c.os.name===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),c.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===j&&(W={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),j=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==O){var t=n[O.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(){c.os.name===e.iOS?l():i()})):void o()}catch(n){if(c.os.name!==e.iOS)return void i()}}function l(){if(c.os.name===e.iOS&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return y=r,A(),r.webkitEnterFullscreen(),void o()}i()}l()}))}function H(){return c.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==j)j.setFullScreen(!1),C();else{var r=P();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==O){var o=globalThis.document[O.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(c.os.name===e.iOS&&null!==y){if("function"==typeof y.webkitExitFullscreen&&!0===y.webkitDisplayingFullscreen)return y.webkitExitFullscreen(),y=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()}}P()?r():n()}))}!function(){if(!x){x=!0;var n=!1;if(c.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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))},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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))}))}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],d,!1);for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],m,!1);if(c.os.name===e.iOS)if(A(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){A()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function u(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 d(){u("fullscreenchange")}function m(){u("fullscreenerror")}}();var R={installed:!1,name:"Fullscreen",module:F,Constants:{},Errors:{}};module.exports=R;
|
|
@@ -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="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{(d=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&d.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(d=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 d=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),m=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});m.includes("en0")&&d.includes("Wi-Fi")?n.type="wifi":m.includes("en")||d.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get dimension(){return function(){var e={innerWidth:-1,innerHeight:-1,outerWidth:-1,outerHeight:-1,scale:1};if(void 0!==globalThis.innerWidth)return e.innerWidth=globalThis.innerWidth,e.innerHeight=globalThis.innerHeight,e.outerWidth=globalThis.outerWidth,e.outerHeight=globalThis.outerHeight,e.scale=globalThis.devicePixelRatio||1,e;if(u.crossPlatformFramework===i.ReactNative)try{var n=require("react-native"),r=n.Dimensions,o=n.PixelRatio,t=r.get("screen"),a=r.get("window");return e.innerWidth=t.width,e.innerHeight=t.height,e.outerWidth=a.width,e.outerHeight=a.height,e.scale=o.get(),e}catch(e){}return e}()},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,h],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,h],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,h],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,h],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,h],[/windows ce\/?([\d.]*)/i,e.Windows,h],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,v],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,v],[/cfnetwork\/.+darwin/i,e.iOS,v],[/mac os x ?([\w. ]*)/i,e.MacOS,v],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,v],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],d=[[/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]],m=[[/\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 g(){s--,b()}function b(){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 h(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 v(e){return void 0===e?"":e.replace(/_/g,".")}function w(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 p(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 k(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 T(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function E(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function S(){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}}g()}!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=(F=c[r])[0],l=F[1],h=F[2];if(null!==(y=u.userAgent.match(a))){u.os={name:l,version:T(y[1],h)};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!==(x=/\) Version\/([\d.]+)/.exec(u.userAgent))&&parseInt(x[1].substring(0,2),10)>=26&&(u.os.version=x[1]),r=0;r<d.length;r++){a=(F=d[r])[0];var v=F[1];h=F[2];if(null!==(y=u.userAgent.match(a))){u.engine={name:v,version:T(y[1],h)};break}}for(r=0;r<m.length;r++){a=(F=m[r])[0];var F,y,j=F[1];h=F[2];if(null!==(y=u.userAgent.match(a))){u.browser={name:j,version:T(y[1],h)};break}}if(u.crossPlatformFramework===i.ReactNative)try{l=(W=require("react-native").Platform).OS;var x=E(O=""+W.Version);switch(l){case"android":u.os={name:e.Android,version:k(x,O)};break;case"ios":u.os={name:e.iOS,version:O};break;case"windows":u.os={name:e.Windows,version:w(x,O)};break;case"macos":u.os={name:e.MacOS,version:O}}}catch(e){}if(u.isNode)try{var O,W=(l=require("os")).platform();x=E(O=l.release());switch(W){case"win32":u.os={name:e.Windows,version:w(x,O)};break;case"darwin":u.os={name:e.MacOS,version:p(x,O)};break;case"android":u.os={name:e.Android,version:O};break;case"linux":/android/i.test(O)&&(u.os={name:e.Android,version:O})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?S():globalThis.document.addEventListener("deviceready",S,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(s++,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 d=null==(h=i[c])?{brand:"",version:""}:"string"==typeof h?{brand:h,version:""}:{brand:h.brand,version:h.version},m=d.version,b=d.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=m),s=b),"Chromium"===b&&(u.engine.version=m))}"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{g()}var h})).catch(g)),b()}();var F={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 P()},get isFullscreen(){return q()},request:N,exit:R,toggle:function(e,n){return q()?R():N(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]()}}},y=null,j=null,x=null,O=!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 M.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=M[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:M.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),M={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 C(){null!==x&&(j.fullScreenable=x.fullScreenable,j.autoHideMenuBar=x.autoHideMenuBar,x=null),j=null}function A(){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 P(){if(u.crossPlatformFramework===i.Electron){if(null!==j)return j;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 y&&y.webkitDisplayingFullscreen?y:null;var t=globalThis.document[W.element];return null!=t?t:null}function q(){return null!==P()}function N(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===j&&(x={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),j=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 y=r,A(),r.webkitEnterFullscreen(),void o()}i()}l()}))}function R(){return u.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==j)j.setFullScreen(!1),C();else{var r=P();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!==y){if("function"==typeof y.webkitExitFullscreen&&!0===y.webkitDisplayingFullscreen)return y.webkitExitFullscreen(),y=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()}}P()?r():n()}))}!function(){if(!O){O=!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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))},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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))}))}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],d,!1);for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],m,!1);if(u.os.name===e.iOS)if(A(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){A()})).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 d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}();var H={installed:!1,name:"Fullscreen",module:F,Constants:{},Errors:{}};export{H 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,c={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;if(void 0!==r)return 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),n}if(c.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 u=require("child_process");if(c.os.name===e.Windows){try{(d=u.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&d.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(d=u.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(n.type="ethernet")}catch(e){}null===n.type&&(n.type="other")}else if(c.os.name===e.MacOS)try{var d=u.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),m=u.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});m.includes("en0")&&d.includes("Wi-Fi")?n.type="wifi":m.includes("en")||d.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get dimension(){return function(){var e={innerWidth:-1,innerHeight:-1,outerWidth:-1,outerHeight:-1,scale:1};if(void 0!==globalThis.innerWidth)return e.innerWidth=globalThis.innerWidth,e.innerHeight=globalThis.innerHeight,e.outerWidth=globalThis.outerWidth,e.outerHeight=globalThis.outerHeight,e.scale=globalThis.devicePixelRatio||1,e;if(c.crossPlatformFramework===i.ReactNative)try{var n=require("react-native"),r=n.Dimensions,o=n.PixelRatio,t=r.get("screen"),a=r.get("window");return e.innerWidth=t.width,e.innerHeight=t.height,e.outerWidth=a.width,e.outerHeight=a.height,e.scale=o.get(),e}catch(e){}if(c.crossPlatformFramework===i.Electron)try{var l=require("electron"),s=l.screen,u=l.BrowserWindow,d=u.getFocusedWindow()||u.getAllWindows()[0];if(void 0!==d){var m=d.getContentSize(),f=d.getSize();e.innerWidth=m[0],e.innerHeight=m[1],e.outerWidth=f[0],e.outerHeight=f[1],e.scale=s.getDisplayMatching(d.getBounds()).scaleFactor}return e}catch(e){}return e}()},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)}},u=[[/windows nt (6\.[23]); arm/i,e.Windows,v],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,v],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,v],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,v],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,v],[/windows ce\/?([\d.]*)/i,e.Windows,v],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,b],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,b],[/cfnetwork\/.+darwin/i,e.iOS,b],[/mac os x ?([\w. ]*)/i,e.MacOS,b],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,b],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],d=[[/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]],m=[[/\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 g(){s--,h()}function h(){if(0===s&&"loading"===a){a="complete";for(var e=0;e<l.length;e++)try{l[e](c)}catch(e){}l.length=0}}function v(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 b(e){return void 0===e?"":e.replace(/_/g,".")}function w(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 p(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 k(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 T(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function E(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function S(){if(c.crossPlatformFramework=i.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":c.os={name:e.Android,version:globalThis.device.version};break;case"iOS":c.os={name:e.iOS,version:globalThis.device.version}}g()}!function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(c.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(c.crossPlatformFramework=i.ReactNative);for(var r=0;r<u.length;r++){var a=(F=u[r])[0],l=F[1],v=F[2];if(null!==(y=c.userAgent.match(a))){c.os={name:l,version:T(y[1],v)};break}}for(c.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}(c.os.version,"18.6")&&null!==(W=/\) Version\/([\d.]+)/.exec(c.userAgent))&&parseInt(W[1].substring(0,2),10)>=26&&(c.os.version=W[1]),r=0;r<d.length;r++){a=(F=d[r])[0];var b=F[1];v=F[2];if(null!==(y=c.userAgent.match(a))){c.engine={name:b,version:T(y[1],v)};break}}for(r=0;r<m.length;r++){a=(F=m[r])[0];var F,y,j=F[1];v=F[2];if(null!==(y=c.userAgent.match(a))){c.browser={name:j,version:T(y[1],v)};break}}if(c.crossPlatformFramework===i.ReactNative)try{l=(O=require("react-native").Platform).OS;var W=E(x=""+O.Version);switch(l){case"android":c.os={name:e.Android,version:k(W,x)};break;case"ios":c.os={name:e.iOS,version:x};break;case"windows":c.os={name:e.Windows,version:w(W,x)};break;case"macos":c.os={name:e.MacOS,version:x}}}catch(e){}if(c.isNode)try{var x,O=(l=require("os")).platform();W=E(x=l.release());switch(O){case"win32":c.os={name:e.Windows,version:w(W,x)};break;case"darwin":c.os={name:e.MacOS,version:p(W,x)};break;case"android":c.os={name:e.Android,version:x};break;case"linux":/android/i.test(x)&&(c.os={name:e.Android,version:x})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?S():globalThis.document.addEventListener("deviceready",S,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(s++,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=c.browser.name,s=null,u=0;u<i.length;u++){var d=null==(v=i[u])?{brand:"",version:""}:"string"==typeof v?{brand:v,version:""}:{brand:v.brand,version:v.version},m=d.version,h=d.brand;/not.a.brand/i.test(h)||((null===s||/Chrom/.test(s)&&"Chromium"!==h||"Edge"===s&&/WebView2/.test(h))&&(h=f[h]||h,null!==(s=l)&&!/Chrom/.test(s)&&/Chrom/.test(h)||("Chrome"===(l=h)||"Chrome WebView"===l||"Chrome Headless"===l?c.browser.name=o.Chrome:"Edge"===l||"Edge WebView2"===l?c.browser.name=o.Edge:"Opera Mobi"===l&&(c.browser.name=o.Opera),c.browser.version=m),s=h),"Chromium"===h&&(c.engine.version=m))}"string"==typeof t&&(c.os.name===e.Windows?c.os.version=parseInt(t.split(".")[0],10)>=13?"11":"10":c.os.version=t),"string"==typeof a&&(/android/i.test(a)?c.os.name=e.Android:/ios|iphone|ipad/i.test(a)?c.os.name=e.iOS:/windows|win32/i.test(a)?c.os.name=e.Windows:/macos|macintel/i.test(a)&&(c.os.name=e.MacOS)),!0===r.mobile&&(c.device=n.Mobile)}catch(e){}finally{g()}var v})).catch(g)),h()}();var F={get enabled(){return function(){if(c.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===O){if(c.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[O.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[O.element]}()},get element(){return P()},get isFullscreen(){return q()},request:N,exit:H,toggle:function(e,n){return q()?H():N(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]()}}},y=null,j=null,W=null,x=!1,O=function(){if(c.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return M.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=M[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:M.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),M={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 C(){null!==W&&(j.fullScreenable=W.fullScreenable,j.autoHideMenuBar=W.autoHideMenuBar,W=null),j=null}function A(){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 P(){if(c.crossPlatformFramework===i.Electron){if(null!==j)return j;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||c.os.name===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===O)return y&&y.webkitDisplayingFullscreen?y:null;var t=globalThis.document[O.element];return null!=t?t:null}function q(){return null!==P()}function N(n,r){if(void 0===n&&(n=function(){if(c.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(c.os.name===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),c.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===j&&(W={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),j=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==O){var t=n[O.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(){c.os.name===e.iOS?l():i()})):void o()}catch(n){if(c.os.name!==e.iOS)return void i()}}function l(){if(c.os.name===e.iOS&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return y=r,A(),r.webkitEnterFullscreen(),void o()}i()}l()}))}function H(){return c.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==j)j.setFullScreen(!1),C();else{var r=P();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==O){var o=globalThis.document[O.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(c.os.name===e.iOS&&null!==y){if("function"==typeof y.webkitExitFullscreen&&!0===y.webkitDisplayingFullscreen)return y.webkitExitFullscreen(),y=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()}}P()?r():n()}))}!function(){if(!x){x=!0;var n=!1;if(c.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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))},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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))}))}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],d,!1);for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],m,!1);if(c.os.name===e.iOS)if(A(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){A()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function u(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 d(){u("fullscreenchange")}function m(){u("fullscreenerror")}}();var R={installed:!1,name:"Fullscreen",module:F,Constants:{},Errors:{}};export{R as default};
|
|
@@ -461,6 +461,7 @@ function getNetwork() {
|
|
|
461
461
|
network.rtt = connection.rtt;
|
|
462
462
|
if (typeof connection.saveData !== 'undefined')
|
|
463
463
|
network.saveData = connection.saveData;
|
|
464
|
+
return network;
|
|
464
465
|
}
|
|
465
466
|
}
|
|
466
467
|
if (Platform.isNode) {
|
|
@@ -558,6 +559,26 @@ function getDimension() {
|
|
|
558
559
|
catch (_) {
|
|
559
560
|
}
|
|
560
561
|
}
|
|
562
|
+
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
563
|
+
try {
|
|
564
|
+
var electron = require('electron');
|
|
565
|
+
var screen_1 = electron.screen;
|
|
566
|
+
var browserWindow = electron.BrowserWindow;
|
|
567
|
+
var focusedWindow = browserWindow.getFocusedWindow() || browserWindow.getAllWindows()[0];
|
|
568
|
+
if (focusedWindow !== undefined) {
|
|
569
|
+
var contentSize = focusedWindow.getContentSize();
|
|
570
|
+
var size = focusedWindow.getSize();
|
|
571
|
+
dimension.innerWidth = contentSize[0];
|
|
572
|
+
dimension.innerHeight = contentSize[1];
|
|
573
|
+
dimension.outerWidth = size[0];
|
|
574
|
+
dimension.outerHeight = size[1];
|
|
575
|
+
dimension.scale = screen_1.getDisplayMatching(focusedWindow.getBounds()).scaleFactor;
|
|
576
|
+
}
|
|
577
|
+
return dimension;
|
|
578
|
+
}
|
|
579
|
+
catch (_) {
|
|
580
|
+
}
|
|
581
|
+
}
|
|
561
582
|
return dimension;
|
|
562
583
|
}
|
|
563
584
|
function init() {
|
|
@@ -467,6 +467,7 @@
|
|
|
467
467
|
network.rtt = connection.rtt;
|
|
468
468
|
if (typeof connection.saveData !== 'undefined')
|
|
469
469
|
network.saveData = connection.saveData;
|
|
470
|
+
return network;
|
|
470
471
|
}
|
|
471
472
|
}
|
|
472
473
|
if (Platform.isNode) {
|
|
@@ -564,6 +565,26 @@
|
|
|
564
565
|
catch (_) {
|
|
565
566
|
}
|
|
566
567
|
}
|
|
568
|
+
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
569
|
+
try {
|
|
570
|
+
var electron = require('electron');
|
|
571
|
+
var screen_1 = electron.screen;
|
|
572
|
+
var browserWindow = electron.BrowserWindow;
|
|
573
|
+
var focusedWindow = browserWindow.getFocusedWindow() || browserWindow.getAllWindows()[0];
|
|
574
|
+
if (focusedWindow !== undefined) {
|
|
575
|
+
var contentSize = focusedWindow.getContentSize();
|
|
576
|
+
var size = focusedWindow.getSize();
|
|
577
|
+
dimension.innerWidth = contentSize[0];
|
|
578
|
+
dimension.innerHeight = contentSize[1];
|
|
579
|
+
dimension.outerWidth = size[0];
|
|
580
|
+
dimension.outerHeight = size[1];
|
|
581
|
+
dimension.scale = screen_1.getDisplayMatching(focusedWindow.getBounds()).scaleFactor;
|
|
582
|
+
}
|
|
583
|
+
return dimension;
|
|
584
|
+
}
|
|
585
|
+
catch (_) {
|
|
586
|
+
}
|
|
587
|
+
}
|
|
567
588
|
return dimension;
|
|
568
589
|
}
|
|
569
590
|
function init() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Fullscreen=n()}(this,(function(){"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{(d=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&d.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(d=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 d=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),m=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});m.includes("en0")&&d.includes("Wi-Fi")?n.type="wifi":m.includes("en")||d.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get dimension(){return function(){var e={innerWidth:-1,innerHeight:-1,outerWidth:-1,outerHeight:-1,scale:1};if(void 0!==globalThis.innerWidth)return e.innerWidth=globalThis.innerWidth,e.innerHeight=globalThis.innerHeight,e.outerWidth=globalThis.outerWidth,e.outerHeight=globalThis.outerHeight,e.scale=globalThis.devicePixelRatio||1,e;if(u.crossPlatformFramework===i.ReactNative)try{var n=require("react-native"),r=n.Dimensions,o=n.PixelRatio,t=r.get("screen"),a=r.get("window");return e.innerWidth=t.width,e.innerHeight=t.height,e.outerWidth=a.width,e.outerHeight=a.height,e.scale=o.get(),e}catch(e){}return e}()},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,h],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,h],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,h],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,h],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,h],[/windows ce\/?([\d.]*)/i,e.Windows,h],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,v],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,v],[/cfnetwork\/.+darwin/i,e.iOS,v],[/mac os x ?([\w. ]*)/i,e.MacOS,v],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,v],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],d=[[/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]],m=[[/\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--,g()}function g(){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 h(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 v(e){return void 0===e?"":e.replace(/_/g,".")}function w(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 p(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 k(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 T(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function E(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function S(){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}}b()}!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=(y=c[r])[0],l=y[1],h=y[2];if(null!==(F=u.userAgent.match(a))){u.os={name:l,version:T(F[1],h)};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!==(x=/\) Version\/([\d.]+)/.exec(u.userAgent))&&parseInt(x[1].substring(0,2),10)>=26&&(u.os.version=x[1]),r=0;r<d.length;r++){a=(y=d[r])[0];var v=y[1];h=y[2];if(null!==(F=u.userAgent.match(a))){u.engine={name:v,version:T(F[1],h)};break}}for(r=0;r<m.length;r++){a=(y=m[r])[0];var y,F,j=y[1];h=y[2];if(null!==(F=u.userAgent.match(a))){u.browser={name:j,version:T(F[1],h)};break}}if(u.crossPlatformFramework===i.ReactNative)try{l=(W=require("react-native").Platform).OS;var x=E(O=""+W.Version);switch(l){case"android":u.os={name:e.Android,version:k(x,O)};break;case"ios":u.os={name:e.iOS,version:O};break;case"windows":u.os={name:e.Windows,version:w(x,O)};break;case"macos":u.os={name:e.MacOS,version:O}}}catch(e){}if(u.isNode)try{var O,W=(l=require("os")).platform();x=E(O=l.release());switch(W){case"win32":u.os={name:e.Windows,version:w(x,O)};break;case"darwin":u.os={name:e.MacOS,version:p(x,O)};break;case"android":u.os={name:e.Android,version:O};break;case"linux":/android/i.test(O)&&(u.os={name:e.Android,version:O})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?S():globalThis.document.addEventListener("deviceready",S,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(s++,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 d=null==(h=i[c])?{brand:"",version:""}:"string"==typeof h?{brand:h,version:""}:{brand:h.brand,version:h.version},m=d.version,g=d.brand;/not.a.brand/i.test(g)||((null===s||/Chrom/.test(s)&&"Chromium"!==g||"Edge"===s&&/WebView2/.test(g))&&(g=f[g]||g,null!==(s=l)&&!/Chrom/.test(s)&&/Chrom/.test(g)||("Chrome"===(l=g)||"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=m),s=g),"Chromium"===g&&(u.engine.version=m))}"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{b()}var h})).catch(b)),g()}();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 P()},get isFullscreen(){return q()},request:N,exit:R,toggle:function(e,n){return q()?R():N(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]()}}},F=null,j=null,x=null,O=!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 M.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=M[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:M.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),M={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 C(){null!==x&&(j.fullScreenable=x.fullScreenable,j.autoHideMenuBar=x.autoHideMenuBar,x=null),j=null}function A(){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 P(){if(u.crossPlatformFramework===i.Electron){if(null!==j)return j;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 F&&F.webkitDisplayingFullscreen?F:null;var t=globalThis.document[W.element];return null!=t?t:null}function q(){return null!==P()}function N(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===j&&(x={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),j=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 F=r,A(),r.webkitEnterFullscreen(),void o()}i()}l()}))}function R(){return u.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==j)j.setFullScreen(!1),C();else{var r=P();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!==F){if("function"==typeof F.webkitExitFullscreen&&!0===F.webkitDisplayingFullscreen)return F.webkitExitFullscreen(),F=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()}}P()?r():n()}))}return function(){if(!O){O=!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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))},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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))}))}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],d,!1);for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],m,!1);if(u.os.name===e.iOS)if(A(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){A()})).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 d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}(),{installed:!1,name:"Fullscreen",module:y,Constants:{},Errors:{}}}));
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Fullscreen=n()}(this,(function(){"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;if(void 0!==r)return 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),n}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{(d=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&d.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(d=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 d=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),m=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});m.includes("en0")&&d.includes("Wi-Fi")?n.type="wifi":m.includes("en")||d.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get dimension(){return function(){var e={innerWidth:-1,innerHeight:-1,outerWidth:-1,outerHeight:-1,scale:1};if(void 0!==globalThis.innerWidth)return e.innerWidth=globalThis.innerWidth,e.innerHeight=globalThis.innerHeight,e.outerWidth=globalThis.outerWidth,e.outerHeight=globalThis.outerHeight,e.scale=globalThis.devicePixelRatio||1,e;if(u.crossPlatformFramework===i.ReactNative)try{var n=require("react-native"),r=n.Dimensions,o=n.PixelRatio,t=r.get("screen"),a=r.get("window");return e.innerWidth=t.width,e.innerHeight=t.height,e.outerWidth=a.width,e.outerHeight=a.height,e.scale=o.get(),e}catch(e){}if(u.crossPlatformFramework===i.Electron)try{var l=require("electron"),s=l.screen,c=l.BrowserWindow,d=c.getFocusedWindow()||c.getAllWindows()[0];if(void 0!==d){var m=d.getContentSize(),f=d.getSize();e.innerWidth=m[0],e.innerHeight=m[1],e.outerWidth=f[0],e.outerHeight=f[1],e.scale=s.getDisplayMatching(d.getBounds()).scaleFactor}return e}catch(e){}return e}()},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,b],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,b],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,b],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,b],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,b],[/windows ce\/?([\d.]*)/i,e.Windows,b],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,v],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,v],[/cfnetwork\/.+darwin/i,e.iOS,v],[/mac os x ?([\w. ]*)/i,e.MacOS,v],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,v],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],d=[[/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]],m=[[/\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 g(){s--,h()}function h(){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 b(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 v(e){return void 0===e?"":e.replace(/_/g,".")}function w(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 p(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 k(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 T(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function E(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function S(){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}}g()}!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=(y=c[r])[0],l=y[1],b=y[2];if(null!==(F=u.userAgent.match(a))){u.os={name:l,version:T(F[1],b)};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!==(W=/\) Version\/([\d.]+)/.exec(u.userAgent))&&parseInt(W[1].substring(0,2),10)>=26&&(u.os.version=W[1]),r=0;r<d.length;r++){a=(y=d[r])[0];var v=y[1];b=y[2];if(null!==(F=u.userAgent.match(a))){u.engine={name:v,version:T(F[1],b)};break}}for(r=0;r<m.length;r++){a=(y=m[r])[0];var y,F,j=y[1];b=y[2];if(null!==(F=u.userAgent.match(a))){u.browser={name:j,version:T(F[1],b)};break}}if(u.crossPlatformFramework===i.ReactNative)try{l=(O=require("react-native").Platform).OS;var W=E(x=""+O.Version);switch(l){case"android":u.os={name:e.Android,version:k(W,x)};break;case"ios":u.os={name:e.iOS,version:x};break;case"windows":u.os={name:e.Windows,version:w(W,x)};break;case"macos":u.os={name:e.MacOS,version:x}}}catch(e){}if(u.isNode)try{var x,O=(l=require("os")).platform();W=E(x=l.release());switch(O){case"win32":u.os={name:e.Windows,version:w(W,x)};break;case"darwin":u.os={name:e.MacOS,version:p(W,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&&(void 0!==globalThis.device?S():globalThis.document.addEventListener("deviceready",S,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(s++,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 d=null==(b=i[c])?{brand:"",version:""}:"string"==typeof b?{brand:b,version:""}:{brand:b.brand,version:b.version},m=d.version,h=d.brand;/not.a.brand/i.test(h)||((null===s||/Chrom/.test(s)&&"Chromium"!==h||"Edge"===s&&/WebView2/.test(h))&&(h=f[h]||h,null!==(s=l)&&!/Chrom/.test(s)&&/Chrom/.test(h)||("Chrome"===(l=h)||"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=m),s=h),"Chromium"===h&&(u.engine.version=m))}"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{g()}var b})).catch(g)),h()}();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===O){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[O.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[O.element]}()},get element(){return P()},get isFullscreen(){return q()},request:N,exit:H,toggle:function(e,n){return q()?H():N(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]()}}},F=null,j=null,W=null,x=!1,O=function(){if(u.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return M.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=M[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:M.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),M={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 C(){null!==W&&(j.fullScreenable=W.fullScreenable,j.autoHideMenuBar=W.autoHideMenuBar,W=null),j=null}function A(){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 P(){if(u.crossPlatformFramework===i.Electron){if(null!==j)return j;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===O)return F&&F.webkitDisplayingFullscreen?F:null;var t=globalThis.document[O.element];return null!=t?t:null}function q(){return null!==P()}function N(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===j&&(W={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),j=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==O){var t=n[O.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 F=r,A(),r.webkitEnterFullscreen(),void o()}i()}l()}))}function H(){return u.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==j)j.setFullScreen(!1),C();else{var r=P();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==O){var o=globalThis.document[O.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!==F){if("function"==typeof F.webkitExitFullscreen&&!0===F.webkitDisplayingFullscreen)return F.webkitExitFullscreen(),F=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()}}P()?r():n()}))}return function(){if(!x){x=!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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))},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(){j=n,d()})),n.on("leave-full-screen",(function(){C(),d()}))}))}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],d,!1);for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],m,!1);if(u.os.name===e.iOS)if(A(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){A()})).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 d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}(),{installed:!1,name:"Fullscreen",module:y,Constants:{},Errors:{}}}));
|
|
@@ -463,6 +463,7 @@ function getNetwork() {
|
|
|
463
463
|
network.rtt = connection.rtt;
|
|
464
464
|
if (typeof connection.saveData !== 'undefined')
|
|
465
465
|
network.saveData = connection.saveData;
|
|
466
|
+
return network;
|
|
466
467
|
}
|
|
467
468
|
}
|
|
468
469
|
if (Platform.isNode) {
|
|
@@ -560,6 +561,26 @@ function getDimension() {
|
|
|
560
561
|
catch (_) {
|
|
561
562
|
}
|
|
562
563
|
}
|
|
564
|
+
if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
|
|
565
|
+
try {
|
|
566
|
+
var electron = require('electron');
|
|
567
|
+
var screen_1 = electron.screen;
|
|
568
|
+
var browserWindow = electron.BrowserWindow;
|
|
569
|
+
var focusedWindow = browserWindow.getFocusedWindow() || browserWindow.getAllWindows()[0];
|
|
570
|
+
if (focusedWindow !== undefined) {
|
|
571
|
+
var contentSize = focusedWindow.getContentSize();
|
|
572
|
+
var size = focusedWindow.getSize();
|
|
573
|
+
dimension.innerWidth = contentSize[0];
|
|
574
|
+
dimension.innerHeight = contentSize[1];
|
|
575
|
+
dimension.outerWidth = size[0];
|
|
576
|
+
dimension.outerHeight = size[1];
|
|
577
|
+
dimension.scale = screen_1.getDisplayMatching(focusedWindow.getBounds()).scaleFactor;
|
|
578
|
+
}
|
|
579
|
+
return dimension;
|
|
580
|
+
}
|
|
581
|
+
catch (_) {
|
|
582
|
+
}
|
|
583
|
+
}
|
|
563
584
|
return dimension;
|
|
564
585
|
}
|
|
565
586
|
function init() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,o,i,r,n;!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"}(o||(o={})),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"}(i||(i={})),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"}(r||(r={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(n||(n={}));var a=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"";var t="loading",s=[],l=0,m={os:{name:e.Unknown,version:""},engine:{name:i.Unknown,version:""},browser:{name:r.Unknown,version:""},crossPlatformFramework:n.Unknown,userAgent:a,get readyState(){return t},get network(){return function(){var o={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(o.isOnline=globalThis.navigator.onLine);var i=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;void 0!==i&&(void 0!==i.effectiveType&&(o.effectiveType=i.effectiveType),void 0!==i.type&&(o.type=i.type),void 0!==i.downlink&&(o.downlink=i.downlink),void 0!==i.rtt&&(o.rtt=i.rtt),void 0!==i.saveData&&(o.saveData=i.saveData))}if(m.isNode){try{for(var r=require("os").networkInterfaces(),n=Object.keys(r),a=0;a<n.length;a++){for(var t=r[n[a]],s=0;s<t.length;s++){var l=t[s];l.internal||"IPv4"!==l.family||(o.isOnline=!0)}if(o.isOnline)break}}catch(e){}try{var d=require("child_process");if(m.os.name===e.Windows){try{(c=d.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&c.includes("connected")&&(o.type="wifi")}catch(e){}if(null===o.type)try{(c=d.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(o.type="ethernet")}catch(e){}null===o.type&&(o.type="other")}else if(m.os.name===e.MacOS)try{var c=d.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),g=d.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});g.includes("en0")&&c.includes("Wi-Fi")?o.type="wifi":g.includes("en")||c.includes("Ethernet")?o.type="ethernet":o.type="other"}catch(e){o.type="other"}}catch(e){}}return o}()},get dimension(){return function(){var e={innerWidth:-1,innerHeight:-1,outerWidth:-1,outerHeight:-1,scale:1};if(void 0!==globalThis.innerWidth)return e.innerWidth=globalThis.innerWidth,e.innerHeight=globalThis.innerHeight,e.outerWidth=globalThis.outerWidth,e.outerHeight=globalThis.outerHeight,e.scale=globalThis.devicePixelRatio||1,e;if(m.crossPlatformFramework===n.ReactNative)try{var o=require("react-native"),i=o.Dimensions,r=o.PixelRatio,a=i.get("screen"),t=i.get("window");return e.innerWidth=a.width,e.innerHeight=a.height,e.outerWidth=t.width,e.outerHeight=t.height,e.scale=r.get(),e}catch(e){}return e}()},get device(){return this.os.name===e.iOS||this.os.name===e.Android?o.Mobile:this.os.name===e.Windows||this.os.name===e.MacOS?o.Desktop:o.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var o=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===o)return"";if(o instanceof WebGLRenderingContext||"getParameter"in o&&"function"==typeof o.getParameter){var i=o.getExtension("WEBGL_debug_renderer_info");return null===i?o.getParameter(o.RENDERER):o.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===o.Mobile},get isDesktop(){return this.device===o.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 s.push(e)}},d=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,b],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,b],[/cfnetwork\/.+darwin/i,e.iOS,b],[/mac os x ?([\w. ]*)/i,e.MacOS,b],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,b],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],c=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],g=[[/\b(?:crmo|crios)\/([\w.]+)/i,r.Chrome],[/webview.+edge\/([\w.]+)/i,r.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,r.Edge],[/opera mini\/([-\w.]+)/i,r.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,r.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,r.Opera],[/opios[\/ ]+([\w.]+)/i,r.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,r.Opera],[/\bopr\/([\w.]+)/i,r.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,r.IE],[/(?:ms|\()ie ([\w.]+)/i,r.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,r.IE],[/\bfocus\/([\w.]+)/i,r.Firefox],[/\bopt\/([\w.]+)/i,r.Opera],[/coast\/([\w.]+)/i,r.Opera],[/fxios\/([\w.-]+)/i,r.Firefox],[/samsungbrowser\/([\w.]+)/i,r.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,r.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,r.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,r.Chrome],[/chrome\/([\w.]+) mobile/i,r.Chrome],[/chrome\/v?([\w.]+)/i,r.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,r.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,r.Safari],[/version\/([\w.,]+) .*safari/i,r.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,r.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,r.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,r.Firefox],[/firefox\/([\w.]+)/i,r.Firefox]],h={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function v(){l--,w()}function w(){if(0===l&&"loading"===t){t="complete";for(var e=0;e<s.length;e++)try{s[e](m)}catch(e){}s.length=0}}function u(e){if(void 0===e)return"";var o={"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!==o?o:e}function b(e){return void 0===e?"":e.replace(/_/g,".")}function f(e,o){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":o}function p(e,o){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:o}function T(e,o){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":o}function k(e,o){return"function"==typeof o?o(e):"string"==typeof o?o:void 0===e?"":e}function j(e){var o=e.split(".");return{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")}}function y(){if(m.crossPlatformFramework=n.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":m.os={name:e.Android,version:globalThis.device.version};break;case"iOS":m.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(a))&&(m.crossPlatformFramework=n.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(m.crossPlatformFramework=n.ReactNative);for(var i=0;i<d.length;i++){var t=(E=d[i])[0],s=E[1],u=E[2];if(null!==(O=m.userAgent.match(t))){m.os={name:s,version:k(O[1],u)};break}}for(m.os.name===e.iOS&&0===function(e,o){for(var i=e.split("."),r=o.split("."),n=Math.max(i.length,r.length),a=0;a<n;a++){var t=void 0,s=void 0;if((t=a<i.length?parseInt(i[a],10):0)>(s=a<r.length?parseInt(r[a],10):0))return 1;if(t<s)return-1}return 0}(m.os.version,"18.6")&&null!==(W=/\) Version\/([\d.]+)/.exec(m.userAgent))&&parseInt(W[1].substring(0,2),10)>=26&&(m.os.version=W[1]),i=0;i<c.length;i++){t=(E=c[i])[0];var b=E[1];u=E[2];if(null!==(O=m.userAgent.match(t))){m.engine={name:b,version:k(O[1],u)};break}}for(i=0;i<g.length;i++){t=(E=g[i])[0];var E,O,S=E[1];u=E[2];if(null!==(O=m.userAgent.match(t))){m.browser={name:S,version:k(O[1],u)};break}}if(m.crossPlatformFramework===n.ReactNative)try{s=(C=require("react-native").Platform).OS;var W=j(x=""+C.Version);switch(s){case"android":m.os={name:e.Android,version:T(W,x)};break;case"ios":m.os={name:e.iOS,version:x};break;case"windows":m.os={name:e.Windows,version:f(W,x)};break;case"macos":m.os={name:e.MacOS,version:x}}}catch(e){}if(m.isNode)try{var x,C=(s=require("os")).platform();W=j(x=s.release());switch(C){case"win32":m.os={name:e.Windows,version:f(W,x)};break;case"darwin":m.os={name:e.MacOS,version:p(W,x)};break;case"android":m.os={name:e.Android,version:x};break;case"linux":/android/i.test(x)&&(m.os={name:e.Android,version:x})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?y():globalThis.document.addEventListener("deviceready",y,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(l++,globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(i){try{for(var n=i.fullVersionList||i.brands||[],a=i.platformVersion,t=i.platform,s=m.browser.name,l=null,d=0;d<n.length;d++){var c=null==(u=n[d])?{brand:"",version:""}:"string"==typeof u?{brand:u,version:""}:{brand:u.brand,version:u.version},g=c.version,w=c.brand;/not.a.brand/i.test(w)||((null===l||/Chrom/.test(l)&&"Chromium"!==w||"Edge"===l&&/WebView2/.test(w))&&(w=h[w]||w,null!==(l=s)&&!/Chrom/.test(l)&&/Chrom/.test(w)||("Chrome"===(s=w)||"Chrome WebView"===s||"Chrome Headless"===s?m.browser.name=r.Chrome:"Edge"===s||"Edge WebView2"===s?m.browser.name=r.Edge:"Opera Mobi"===s&&(m.browser.name=r.Opera),m.browser.version=g),l=w),"Chromium"===w&&(m.engine.version=g))}"string"==typeof a&&(m.os.name===e.Windows?m.os.version=parseInt(a.split(".")[0],10)>=13?"11":"10":m.os.version=a),"string"==typeof t&&(/android/i.test(t)?m.os.name=e.Android:/ios|iphone|ipad/i.test(t)?m.os.name=e.iOS:/windows|win32/i.test(t)?m.os.name=e.Windows:/macos|macintel/i.test(t)&&(m.os.name=e.MacOS)),!0===i.mobile&&(m.device=o.Mobile)}catch(e){}finally{v()}var u})).catch(v)),w()}();var E={installed:!1,name:"Platform",module:m,Constants:{OS:e,Devices:o,Engines:i,Browsers:r,CrossPlatformFramework:n},Errors:{}};module.exports=E;
|
|
1
|
+
"use strict";var e,o,i,r,n;!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"}(o||(o={})),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"}(i||(i={})),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"}(r||(r={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(n||(n={}));var a=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"";var t="loading",s=[],l=0,m={os:{name:e.Unknown,version:""},engine:{name:i.Unknown,version:""},browser:{name:r.Unknown,version:""},crossPlatformFramework:n.Unknown,userAgent:a,get readyState(){return t},get network(){return function(){var o={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(o.isOnline=globalThis.navigator.onLine);var i=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;if(void 0!==i)return void 0!==i.effectiveType&&(o.effectiveType=i.effectiveType),void 0!==i.type&&(o.type=i.type),void 0!==i.downlink&&(o.downlink=i.downlink),void 0!==i.rtt&&(o.rtt=i.rtt),void 0!==i.saveData&&(o.saveData=i.saveData),o}if(m.isNode){try{for(var r=require("os").networkInterfaces(),n=Object.keys(r),a=0;a<n.length;a++){for(var t=r[n[a]],s=0;s<t.length;s++){var l=t[s];l.internal||"IPv4"!==l.family||(o.isOnline=!0)}if(o.isOnline)break}}catch(e){}try{var d=require("child_process");if(m.os.name===e.Windows){try{(c=d.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&c.includes("connected")&&(o.type="wifi")}catch(e){}if(null===o.type)try{(c=d.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(o.type="ethernet")}catch(e){}null===o.type&&(o.type="other")}else if(m.os.name===e.MacOS)try{var c=d.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),g=d.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});g.includes("en0")&&c.includes("Wi-Fi")?o.type="wifi":g.includes("en")||c.includes("Ethernet")?o.type="ethernet":o.type="other"}catch(e){o.type="other"}}catch(e){}}return o}()},get dimension(){return function(){var e={innerWidth:-1,innerHeight:-1,outerWidth:-1,outerHeight:-1,scale:1};if(void 0!==globalThis.innerWidth)return e.innerWidth=globalThis.innerWidth,e.innerHeight=globalThis.innerHeight,e.outerWidth=globalThis.outerWidth,e.outerHeight=globalThis.outerHeight,e.scale=globalThis.devicePixelRatio||1,e;if(m.crossPlatformFramework===n.ReactNative)try{var o=require("react-native"),i=o.Dimensions,r=o.PixelRatio,a=i.get("screen"),t=i.get("window");return e.innerWidth=a.width,e.innerHeight=a.height,e.outerWidth=t.width,e.outerHeight=t.height,e.scale=r.get(),e}catch(e){}if(m.crossPlatformFramework===n.Electron)try{var s=require("electron"),l=s.screen,d=s.BrowserWindow,c=d.getFocusedWindow()||d.getAllWindows()[0];if(void 0!==c){var g=c.getContentSize(),h=c.getSize();e.innerWidth=g[0],e.innerHeight=g[1],e.outerWidth=h[0],e.outerHeight=h[1],e.scale=l.getDisplayMatching(c.getBounds()).scaleFactor}return e}catch(e){}return e}()},get device(){return this.os.name===e.iOS||this.os.name===e.Android?o.Mobile:this.os.name===e.Windows||this.os.name===e.MacOS?o.Desktop:o.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var o=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===o)return"";if(o instanceof WebGLRenderingContext||"getParameter"in o&&"function"==typeof o.getParameter){var i=o.getExtension("WEBGL_debug_renderer_info");return null===i?o.getParameter(o.RENDERER):o.getParameter(i.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===o.Mobile},get isDesktop(){return this.device===o.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 s.push(e)}},d=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,b],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,b],[/cfnetwork\/.+darwin/i,e.iOS,b],[/mac os x ?([\w. ]*)/i,e.MacOS,b],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,b],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],c=[[/windows.+ edge\/([\w.]+)/i,i.EdgeHTML],[/arkweb\/([\w.]+)/i,i.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,i.Blink],[/presto\/([\w.]+)/i,i.Presto],[/webkit\/([\w.]+)/i,i.WebKit],[/trident\/([\w.]+)/i,i.Trident],[/netfront\/([\w.]+)/i,i.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,i.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,i.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,i.Gecko]],g=[[/\b(?:crmo|crios)\/([\w.]+)/i,r.Chrome],[/webview.+edge\/([\w.]+)/i,r.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,r.Edge],[/opera mini\/([-\w.]+)/i,r.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,r.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,r.Opera],[/opios[\/ ]+([\w.]+)/i,r.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,r.Opera],[/\bopr\/([\w.]+)/i,r.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,r.IE],[/(?:ms|\()ie ([\w.]+)/i,r.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,r.IE],[/\bfocus\/([\w.]+)/i,r.Firefox],[/\bopt\/([\w.]+)/i,r.Opera],[/coast\/([\w.]+)/i,r.Opera],[/fxios\/([\w.-]+)/i,r.Firefox],[/samsungbrowser\/([\w.]+)/i,r.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,r.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,r.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,r.Chrome],[/chrome\/([\w.]+) mobile/i,r.Chrome],[/chrome\/v?([\w.]+)/i,r.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,r.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,r.Safari],[/version\/([\w.,]+) .*safari/i,r.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,r.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,r.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,r.Firefox],[/firefox\/([\w.]+)/i,r.Firefox]],h={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function v(){l--,w()}function w(){if(0===l&&"loading"===t){t="complete";for(var e=0;e<s.length;e++)try{s[e](m)}catch(e){}s.length=0}}function u(e){if(void 0===e)return"";var o={"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!==o?o:e}function b(e){return void 0===e?"":e.replace(/_/g,".")}function f(e,o){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":o}function p(e,o){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:o}function T(e,o){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":o}function k(e,o){return"function"==typeof o?o(e):"string"==typeof o?o:void 0===e?"":e}function j(e){var o=e.split(".");return{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")}}function y(){if(m.crossPlatformFramework=n.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":m.os={name:e.Android,version:globalThis.device.version};break;case"iOS":m.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(a))&&(m.crossPlatformFramework=n.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(m.crossPlatformFramework=n.ReactNative);for(var i=0;i<d.length;i++){var t=(W=d[i])[0],s=W[1],u=W[2];if(null!==(E=m.userAgent.match(t))){m.os={name:s,version:k(E[1],u)};break}}for(m.os.name===e.iOS&&0===function(e,o){for(var i=e.split("."),r=o.split("."),n=Math.max(i.length,r.length),a=0;a<n;a++){var t=void 0,s=void 0;if((t=a<i.length?parseInt(i[a],10):0)>(s=a<r.length?parseInt(r[a],10):0))return 1;if(t<s)return-1}return 0}(m.os.version,"18.6")&&null!==(O=/\) Version\/([\d.]+)/.exec(m.userAgent))&&parseInt(O[1].substring(0,2),10)>=26&&(m.os.version=O[1]),i=0;i<c.length;i++){t=(W=c[i])[0];var b=W[1];u=W[2];if(null!==(E=m.userAgent.match(t))){m.engine={name:b,version:k(E[1],u)};break}}for(i=0;i<g.length;i++){t=(W=g[i])[0];var W,E,S=W[1];u=W[2];if(null!==(E=m.userAgent.match(t))){m.browser={name:S,version:k(E[1],u)};break}}if(m.crossPlatformFramework===n.ReactNative)try{s=(C=require("react-native").Platform).OS;var O=j(x=""+C.Version);switch(s){case"android":m.os={name:e.Android,version:T(O,x)};break;case"ios":m.os={name:e.iOS,version:x};break;case"windows":m.os={name:e.Windows,version:f(O,x)};break;case"macos":m.os={name:e.MacOS,version:x}}}catch(e){}if(m.isNode)try{var x,C=(s=require("os")).platform();O=j(x=s.release());switch(C){case"win32":m.os={name:e.Windows,version:f(O,x)};break;case"darwin":m.os={name:e.MacOS,version:p(O,x)};break;case"android":m.os={name:e.Android,version:x};break;case"linux":/android/i.test(x)&&(m.os={name:e.Android,version:x})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?y():globalThis.document.addEventListener("deviceready",y,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(l++,globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(i){try{for(var n=i.fullVersionList||i.brands||[],a=i.platformVersion,t=i.platform,s=m.browser.name,l=null,d=0;d<n.length;d++){var c=null==(u=n[d])?{brand:"",version:""}:"string"==typeof u?{brand:u,version:""}:{brand:u.brand,version:u.version},g=c.version,w=c.brand;/not.a.brand/i.test(w)||((null===l||/Chrom/.test(l)&&"Chromium"!==w||"Edge"===l&&/WebView2/.test(w))&&(w=h[w]||w,null!==(l=s)&&!/Chrom/.test(l)&&/Chrom/.test(w)||("Chrome"===(s=w)||"Chrome WebView"===s||"Chrome Headless"===s?m.browser.name=r.Chrome:"Edge"===s||"Edge WebView2"===s?m.browser.name=r.Edge:"Opera Mobi"===s&&(m.browser.name=r.Opera),m.browser.version=g),l=w),"Chromium"===w&&(m.engine.version=g))}"string"==typeof a&&(m.os.name===e.Windows?m.os.version=parseInt(a.split(".")[0],10)>=13?"11":"10":m.os.version=a),"string"==typeof t&&(/android/i.test(t)?m.os.name=e.Android:/ios|iphone|ipad/i.test(t)?m.os.name=e.iOS:/windows|win32/i.test(t)?m.os.name=e.Windows:/macos|macintel/i.test(t)&&(m.os.name=e.MacOS)),!0===i.mobile&&(m.device=o.Mobile)}catch(e){}finally{v()}var u})).catch(v)),w()}();var W={installed:!1,name:"Platform",module:m,Constants:{OS:e,Devices:o,Engines:i,Browsers:r,CrossPlatformFramework:n},Errors:{}};module.exports=W;
|