native-fn 1.0.46 → 1.0.48
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 +173 -92
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +173 -92
- package/dist/native.umd.js +173 -92
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +192 -90
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +192 -90
- package/dist/plugin/app/index.umd.js +192 -90
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/types/platform.d.ts +3 -1
- package/dist/plugin/app/src/utils/require.d.ts +1 -1
- package/dist/plugin/camera/index.cjs +171 -90
- package/dist/plugin/camera/index.min.cjs +1 -1
- package/dist/plugin/camera/index.min.mjs +1 -1
- package/dist/plugin/camera/index.mjs +171 -90
- package/dist/plugin/camera/index.umd.js +171 -90
- package/dist/plugin/camera/index.umd.min.js +1 -1
- package/dist/plugin/camera/src/types/platform.d.ts +3 -1
- package/dist/plugin/camera/src/utils/require.d.ts +1 -1
- package/dist/plugin/clipboard/src/types/platform.d.ts +3 -1
- package/dist/plugin/clipboard/src/utils/require.d.ts +1 -1
- package/dist/plugin/fullscreen/index.cjs +171 -90
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +171 -90
- package/dist/plugin/fullscreen/index.umd.js +171 -90
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/types/platform.d.ts +3 -1
- package/dist/plugin/fullscreen/src/utils/require.d.ts +1 -1
- package/dist/plugin/theme/index.cjs +171 -90
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +171 -90
- package/dist/plugin/theme/index.umd.js +171 -90
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/types/platform.d.ts +3 -1
- package/dist/plugin/theme/src/utils/require.d.ts +1 -1
- package/dist/src/types/platform.d.ts +3 -1
- package/dist/src/utils/require.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(e="undefined"!=typeof globalThis?globalThis:e||self).Camera=i()}(this,(function(){"use strict";var e,i,o,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"}(i||(i={})),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"}(o||(o={})),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"}(n||(n={}));var r={device:i.Unknown,os:e.Unknown,osVersion:"",engine:o.Unknown,engineVersion:"",browser:n.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var i=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===i)return"";if(i instanceof WebGLRenderingContext||"getParameter"in i&&"function"==typeof i.getParameter){var o=i.getExtension("WEBGL_debug_renderer_info");return null===o?i.getParameter(i.RENDERER):i.getParameter(o.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},t=[[/windows nt (6\.[23]); arm/i,e.Windows,l],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,l],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,l],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,l],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,l],[/windows ce\/?([\d.]*)/i,e.Windows,l],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,d],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,d],[/cfnetwork\/.+darwin/i,e.iOS,d],[/mac os x ?([\w. ]*)/i,e.MacOS,d],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,d],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],a=[[/windows.+ edge\/([\w.]+)/i,o.EdgeHTML],[/arkweb\/([\w.]+)/i,o.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,o.Blink],[/presto\/([\w.]+)/i,o.Presto],[/webkit\/([\w.]+)/i,o.WebKit],[/trident\/([\w.]+)/i,o.Trident],[/netfront\/([\w.]+)/i,o.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,o.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,o.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,o.Gecko]],s=[[/\b(?:crmo|crios)\/([\w.]+)/i,n.Chrome],[/webview.+edge\/([\w.]+)/i,n.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,n.Edge],[/opera mini\/([-\w.]+)/i,n.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,n.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,n.Opera],[/opios[\/ ]+([\w.]+)/i,n.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,n.Opera],[/\bopr\/([\w.]+)/i,n.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,n.IE],[/(?:ms|\()ie ([\w.]+)/i,n.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,n.IE],[/\bfocus\/([\w.]+)/i,n.Firefox],[/\bopt\/([\w.]+)/i,n.Opera],[/coast\/([\w.]+)/i,n.Opera],[/fxios\/([\w.-]+)/i,n.Firefox],[/samsungbrowser\/([\w.]+)/i,n.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,n.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,n.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,n.Chrome],[/chrome\/([\w.]+) mobile/i,n.Chrome],[/chrome\/v?([\w.]+)/i,n.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,n.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,n.Safari],[/version\/([\w.,]+) .*safari/i,n.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,n.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,n.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,n.Firefox],[/firefox\/([\w.]+)/i,n.Firefox]];function l(e){if(void 0===e)return"";var i={"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!==i?i:e}function d(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,i){return"function"==typeof i?i(e):"string"==typeof i?i:void 0===e?"":e}for(var c=0;c<t.length;c++){var u=(b=t[c])[0],w=b[1],f=b[2];if(null!==(g=r.userAgent.match(u))){r.os=w,r.osVersion=m(g[1],f),w===e.iOS||w===e.Android?r.device=i.Mobile:w!==e.Windows&&w!==e.MacOS||(r.device=i.Desktop);break}}for(c=0;c<a.length;c++){u=(b=a[c])[0];var p=b[1];f=b[2];if(null!==(g=r.userAgent.match(u))){r.engine=p,r.engineVersion=m(g[1],f);break}}for(c=0;c<s.length;c++){u=(b=s[c])[0];var b,g,v=b[1];f=b[2];if(null!==(g=r.userAgent.match(u))){r.browser=v,r.browserVersion=m(g[1],f);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{import("react-native").then((function(e){console.log(e.Platform)}))}catch(e){}else r.isNodeJS&&function(e){if("require"in globalThis&&"function"==typeof globalThis.require)try{return Promise.resolve(globalThis.require(e))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}("os").then((function(i){if(null!==i){var o,n=i.platform(),t=i.release(),a=(o=t.split("."),{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")});switch(n){case"win32":r.os=e.Windows,r.osVersion=10===a.major&&0===a.minor&&a.build>=22e3?"11":10===a.major&&0===a.minor&&a.build<22e3?"10":6===a.major&&3===a.minor?"8.1":6===a.major&&2===a.minor?"8":6===a.major&&1===a.minor?"7":6===a.major&&0===a.minor?"Vista":5===a.major&&1===a.minor||5===a.major&&2===a.minor?"XP":5===a.major&&0===a.minor?"2000":4===a.major&&90===a.minor?"ME":4===a.major&&0===a.minor?"NT 4.0":3===a.major&&51===a.minor?"NT 3.11":t;break;case"darwin":r.os=e.MacOS,r.osVersion=a.major>=24?a.major-9+"."+a.minor+"."+a.build:23===a.major?"14."+a.minor+"."+a.build:22===a.major?"13."+a.minor+"."+a.build:21===a.major?"12."+a.minor+"."+a.build:20===a.major?"11."+a.minor+"."+a.build:19===a.major?"10.15."+a.minor:18===a.major?"10.14."+a.minor:17===a.major?"10.13."+a.minor:16===a.major?"10.12."+a.minor:15===a.major?"10.11."+a.minor:14===a.major?"10.10."+a.minor:13===a.major?"10.9."+a.minor:a.major>=5&&a.major<=12?"10."+(a.major-4)+"."+a.minor:t;break;case"android":r.os=e.Android,r.osVersion=t;break;case"linux":/android/i.test(t)&&(r.os=e.Android,r.osVersion=t)}}}));function h(i){var o,n=function(){try{if(globalThis.top&&globalThis.top!==window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}(),t=n.document;try{if(void 0===(o=function(e,i){if(void 0===i&&(i=!0),void 0!==globalThis.document){var o=globalThis.document.createElement(e);return"width"in o&&(o.width="0"),"height"in o&&(o.height="0"),"border"in o&&(o.border="0"),"frameBorder"in o&&(o.frameBorder="0"),"scrolling"in o&&(o.scrolling="no"),"cellPadding"in o&&(o.cellPadding="0"),"cellSpacing"in o&&(o.cellSpacing="0"),"frame"in o&&(o.frame="void"),"rules"in o&&(o.rules="none"),"noWrap"in o&&(o.noWrap=!0),o.tabIndex=-1,o.setAttribute("role","presentation"),i?(o.style.width="1px",o.style.height="1px"):(o.setAttribute("aria-hidden","true"),o.style.width="0",o.style.height="0",o.style.zIndex="-9999",o.style.display="none",o.style.visibility="hidden",o.style.pointerEvents="none"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.padding="0",o.style.margin="0",o.style.border="none",o.style.outline="none",o.style.clip="rect(1px, 1px, 1px, 1px)",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",o}}("input")))return;if(o.type="file",o.tabIndex=-1,o.accept=i+"/*","capture"in HTMLInputElement.prototype)o.capture="user";else if(r.os===e.Android){var a="";"image"===i?a="camera":"video"===i&&(a="camcorder"),o.accept=i+"/*;capture="+a}t.body.appendChild(o),function(e,i){var o;void 0===i&&(i=window);try{o=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:i})}catch(e){(o=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,i,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(o)}(o,n)}catch(e){}}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(i){for(var o,n=i.fullVersionList||i.brands||[],t=i.platformVersion,a=0;a<n.length;a++){var s=null==(o=n[a])?{brand:"",version:""}:"string"==typeof o?{brand:o,version:""}:{brand:o.brand,version:o.version},l=s.brand,d=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(r.engineVersion=d)}"string"==typeof t&&(r.os===e.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?r.osVersion="11":r.osVersion=t)})),r.isMobile=r.device===i.Mobile,r.isDesktop=r.device===i.Desktop,r.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(r.userAgent),r.isStandalone=function(i){return"matchMedia"in globalThis&&(i===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(r.os);var T,k={open:function(i){switch(r.os){case e.Android:h(i);break;case e.iOS:(function(e,i){for(var o=e.split("."),n=i.split("."),r=Math.max(o.length,n.length),t=0;t<r;t++){var a=void 0,s=void 0;if((a=t<o.length?parseInt(o[t],10):0)>(s=t<n.length?parseInt(n[t],10):0))return 1;if(a<s)return-1}return 0})(r.osVersion,"10.3")>=0?h(i):alert(r.osVersion);case e.Windows:case e.MacOS:}}};return function(e){e.Image="image",e.Video="video"}(T||(T={})),{installed:!1,name:"Camera",module:k,Constants:{CameraType:T},Errors:{}}}));
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).Camera=o()}(this,(function(){"use strict";var e,o,i,r;!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={}));var n="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",a={device:o.Unknown,os:e.Unknown,osVersion:"",engine:i.Unknown,engineVersion:"",browser:r.Unknown,browserVersion:"",renderer: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""}(),userAgent:n,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(n),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron,isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},t=[[/windows nt (6\.[23]); arm/i,e.Windows,l],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,l],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,l],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,l],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,l],[/windows ce\/?([\d.]*)/i,e.Windows,l],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,m],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,m],[/cfnetwork\/.+darwin/i,e.iOS,m],[/mac os x ?([\w. ]*)/i,e.MacOS,m],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,m],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/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]],d=[[/\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]];function l(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 m(e){return void 0===e?"":e.replace(/_/g,".")}function c(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 w(e,o){return"function"==typeof o?o(e):"string"==typeof o?o:void 0===e?"":e}function u(e){var o=e.split(".");return{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")}}for(var p=0;p<t.length;p++){var b=(h=t[p])[0],f=h[1],g=h[2];if(null!==(j=a.userAgent.match(b))){a.os=f,a.osVersion=w(j[1],g),f===e.iOS||f===e.Android?a.device=o.Mobile:f!==e.Windows&&f!==e.MacOS||(a.device=o.Desktop);break}}for(p=0;p<s.length;p++){b=(h=s[p])[0];var v=h[1];g=h[2];if(null!==(j=a.userAgent.match(b))){a.engine=v,a.engineVersion=w(j[1],g);break}}for(p=0;p<d.length;p++){b=(h=d[p])[0];var h,j,k=h[1];g=h[2];if(null!==(j=a.userAgent.match(b))){a.browser=k,a.browserVersion=w(j[1],g);break}}if(a.isReactNative)try{f=(x=require("react-native").Platform).OS;var T=u(y=x.Version);switch(f){case"android":a.os=e.Android,a.osVersion=function(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?"4.4W":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}(T,y);break;case"ios":a.os=e.iOS,a.osVersion=y;break;case"windows":a.os=e.Windows,a.osVersion=c(T,y);break;case"macos":a.os=e.MacOS,a.osVersion=y}}catch(e){}if(a.isNodeJS)try{var y,x=(f=require("os")).platform();T=u(y=f.release());switch(x){case"win32":a.os=e.Windows,a.osVersion=c(T,y);break;case"darwin":a.os=e.MacOS,a.osVersion=function(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}(T,y);break;case"android":a.os=e.Android,a.osVersion=y;break;case"linux":/android/i.test(y)&&(a.os=e.Android,a.osVersion=y)}}catch(e){}function E(o){var i,r=function(){try{if(globalThis.top&&globalThis.top!==window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}(),n=r.document;try{if(void 0===(i=function(e,o){if(void 0===o&&(o=!0),void 0!==globalThis.document){var i=globalThis.document.createElement(e);return"width"in i&&(i.width="0"),"height"in i&&(i.height="0"),"border"in i&&(i.border="0"),"frameBorder"in i&&(i.frameBorder="0"),"scrolling"in i&&(i.scrolling="no"),"cellPadding"in i&&(i.cellPadding="0"),"cellSpacing"in i&&(i.cellSpacing="0"),"frame"in i&&(i.frame="void"),"rules"in i&&(i.rules="none"),"noWrap"in i&&(i.noWrap=!0),i.tabIndex=-1,i.setAttribute("role","presentation"),o?(i.style.width="1px",i.style.height="1px"):(i.setAttribute("aria-hidden","true"),i.style.width="0",i.style.height="0",i.style.zIndex="-9999",i.style.display="none",i.style.visibility="hidden",i.style.pointerEvents="none"),i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.padding="0",i.style.margin="0",i.style.border="none",i.style.outline="none",i.style.clip="rect(1px, 1px, 1px, 1px)",i.style.clipPath="inset(50%)",i.style.overflow="hidden",i.style.whiteSpace="nowrap",i}}("input")))return;if(i.type="file",i.tabIndex=-1,i.accept=o+"/*","capture"in HTMLInputElement.prototype)i.capture="user";else if(a.os===e.Android){var t="";"image"===o?t="camera":"video"===o&&(t="camcorder"),i.accept=o+"/*;capture="+t}n.body.appendChild(i),function(e,o){var i;void 0===o&&(o=window);try{i=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:o})}catch(e){(i=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,o,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(i)}(i,r)}catch(e){}}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(o){for(var i,r=o.fullVersionList||o.brands||[],n=o.platformVersion,t=0;t<r.length;t++){var s=null==(i=r[t])?{brand:"",version:""}:"string"==typeof i?{brand:i,version:""}:{brand:i.brand,version:i.version},d=s.brand,l=s.version;/not.a.brand/i.test(d)||"Chromium"===d&&(a.engineVersion=l)}"string"==typeof n&&(a.os===e.Windows&&parseInt(n.replace(/[^\d.]/g,"").split(".")[0],10)>=13?a.osVersion="11":a.osVersion=n)})),a.isMobile=a.device===o.Mobile,a.isDesktop=a.device===o.Desktop,a.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(a.userAgent),a.isStandalone=function(o){return"matchMedia"in globalThis&&(o===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(a.os);var S,M={open:function(o){switch(a.os){case e.Android:E(o);break;case e.iOS:(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})(a.osVersion,"10.3")>=0?E(o):alert(a.osVersion);case e.Windows:case e.MacOS:}}};return function(e){e.Image="image",e.Video="video"}(S||(S={})),{installed:!1,name:"Camera",module:M,Constants:{CameraType:S},Errors:{}}}));
|
|
@@ -9,9 +9,11 @@ export declare interface PlatformInstance {
|
|
|
9
9
|
browserVersion: string;
|
|
10
10
|
renderer: string;
|
|
11
11
|
userAgent: string;
|
|
12
|
-
isWebview: boolean;
|
|
13
12
|
isStandalone: boolean;
|
|
14
13
|
isMobile: boolean;
|
|
15
14
|
isDesktop: boolean;
|
|
15
|
+
isWebview: boolean;
|
|
16
16
|
isNodeJS: boolean;
|
|
17
|
+
isElectron: boolean;
|
|
18
|
+
isReactNative: boolean;
|
|
17
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function require<T = any>(moduleName: string):
|
|
1
|
+
export default function require<T = any>(moduleName: string): T | null;
|
|
@@ -9,9 +9,11 @@ export declare interface PlatformInstance {
|
|
|
9
9
|
browserVersion: string;
|
|
10
10
|
renderer: string;
|
|
11
11
|
userAgent: string;
|
|
12
|
-
isWebview: boolean;
|
|
13
12
|
isStandalone: boolean;
|
|
14
13
|
isMobile: boolean;
|
|
15
14
|
isDesktop: boolean;
|
|
15
|
+
isWebview: boolean;
|
|
16
16
|
isNodeJS: boolean;
|
|
17
|
+
isElectron: boolean;
|
|
18
|
+
isReactNative: boolean;
|
|
17
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function require<T = any>(moduleName: string):
|
|
1
|
+
export default function require<T = any>(moduleName: string): T | null;
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
function require$1(moduleName) {
|
|
4
|
-
if ('require' in globalThis && typeof globalThis.require === 'function') {
|
|
5
|
-
try {
|
|
6
|
-
return Promise.resolve(globalThis.require(moduleName));
|
|
7
|
-
}
|
|
8
|
-
catch (_) {
|
|
9
|
-
return Promise.resolve(null);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return Promise.resolve(null);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
3
|
var OS;
|
|
16
4
|
(function (OS) {
|
|
17
5
|
OS["Unknown"] = "Unknown";
|
|
@@ -51,6 +39,7 @@ var Browsers;
|
|
|
51
39
|
Browsers["IE"] = "IE";
|
|
52
40
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
53
41
|
})(Browsers || (Browsers = {}));
|
|
42
|
+
var userAgent = typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' ? navigator.userAgent : '';
|
|
54
43
|
var Platform = {
|
|
55
44
|
device: Devices.Unknown,
|
|
56
45
|
os: OS.Unknown,
|
|
@@ -60,12 +49,14 @@ var Platform = {
|
|
|
60
49
|
browser: Browsers.Unknown,
|
|
61
50
|
browserVersion: '',
|
|
62
51
|
renderer: getRenderer(),
|
|
63
|
-
userAgent:
|
|
64
|
-
isWebview: false,
|
|
52
|
+
userAgent: userAgent,
|
|
65
53
|
isMobile: false,
|
|
66
54
|
isDesktop: false,
|
|
67
55
|
isStandalone: false,
|
|
68
|
-
|
|
56
|
+
isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(userAgent),
|
|
57
|
+
isNodeJS: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
|
|
58
|
+
isElectron: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined,
|
|
59
|
+
isReactNative: typeof navigator !== 'undefined' && navigator.product === 'ReactNative'
|
|
69
60
|
};
|
|
70
61
|
var OS_RESOLVER_MAP = [
|
|
71
62
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -152,6 +143,137 @@ function resolveUnderscoreVersion(string) {
|
|
|
152
143
|
return '';
|
|
153
144
|
return string.replace(/_/g, '.');
|
|
154
145
|
}
|
|
146
|
+
function resolveSemanticWindowsVersion(version, defaultValue) {
|
|
147
|
+
if (version.major === 10 && version.minor === 0 && version.build >= 22000)
|
|
148
|
+
return '11';
|
|
149
|
+
if (version.major === 10 && version.minor === 0 && version.build < 22000)
|
|
150
|
+
return '10';
|
|
151
|
+
if (version.major === 6 && version.minor === 3)
|
|
152
|
+
return '8.1';
|
|
153
|
+
if (version.major === 6 && version.minor === 2)
|
|
154
|
+
return '8';
|
|
155
|
+
if (version.major === 6 && version.minor === 1)
|
|
156
|
+
return '7';
|
|
157
|
+
if (version.major === 6 && version.minor === 0)
|
|
158
|
+
return 'Vista';
|
|
159
|
+
if (version.major === 5 && version.minor === 1)
|
|
160
|
+
return 'XP';
|
|
161
|
+
if (version.major === 5 && version.minor === 2)
|
|
162
|
+
return 'XP';
|
|
163
|
+
if (version.major === 5 && version.minor === 0)
|
|
164
|
+
return '2000';
|
|
165
|
+
if (version.major === 4 && version.minor === 90)
|
|
166
|
+
return 'ME';
|
|
167
|
+
if (version.major === 4 && version.minor === 0)
|
|
168
|
+
return 'NT 4.0';
|
|
169
|
+
if (version.major === 3 && version.minor === 51)
|
|
170
|
+
return 'NT 3.11';
|
|
171
|
+
return defaultValue;
|
|
172
|
+
}
|
|
173
|
+
function resolveSemanticDarwinVersion(version, defaultValue) {
|
|
174
|
+
if (version.major >= 24)
|
|
175
|
+
return '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
|
|
176
|
+
if (version.major === 23)
|
|
177
|
+
return '14.' + version.minor + '.' + version.build;
|
|
178
|
+
if (version.major === 22)
|
|
179
|
+
return '13.' + version.minor + '.' + version.build;
|
|
180
|
+
if (version.major === 21)
|
|
181
|
+
return '12.' + version.minor + '.' + version.build;
|
|
182
|
+
if (version.major === 20)
|
|
183
|
+
return '11.' + version.minor + '.' + version.build;
|
|
184
|
+
if (version.major === 19)
|
|
185
|
+
return '10.15.' + version.minor;
|
|
186
|
+
if (version.major === 18)
|
|
187
|
+
return '10.14.' + version.minor;
|
|
188
|
+
if (version.major === 17)
|
|
189
|
+
return '10.13.' + version.minor;
|
|
190
|
+
if (version.major === 16)
|
|
191
|
+
return '10.12.' + version.minor;
|
|
192
|
+
if (version.major === 15)
|
|
193
|
+
return '10.11.' + version.minor;
|
|
194
|
+
if (version.major === 14)
|
|
195
|
+
return '10.10.' + version.minor;
|
|
196
|
+
if (version.major === 13)
|
|
197
|
+
return '10.9.' + version.minor;
|
|
198
|
+
if (version.major >= 5 && version.major <= 12)
|
|
199
|
+
return '10.' + (version.major - 4) + '.' + version.minor;
|
|
200
|
+
return defaultValue;
|
|
201
|
+
}
|
|
202
|
+
function resolveSemanticAndroidVersion(version, defaultValue) {
|
|
203
|
+
if (version.major >= 36)
|
|
204
|
+
return '16';
|
|
205
|
+
if (version.major === 35)
|
|
206
|
+
return '15';
|
|
207
|
+
if (version.major === 34)
|
|
208
|
+
return '14';
|
|
209
|
+
if (version.major === 33)
|
|
210
|
+
return '13';
|
|
211
|
+
if (version.major === 32)
|
|
212
|
+
return '12.1';
|
|
213
|
+
if (version.major === 31)
|
|
214
|
+
return '12';
|
|
215
|
+
if (version.major === 30)
|
|
216
|
+
return '11';
|
|
217
|
+
if (version.major === 29)
|
|
218
|
+
return '10';
|
|
219
|
+
if (version.major === 28)
|
|
220
|
+
return '9';
|
|
221
|
+
if (version.major === 27)
|
|
222
|
+
return '8.1';
|
|
223
|
+
if (version.major === 26)
|
|
224
|
+
return '8.0';
|
|
225
|
+
if (version.major === 25)
|
|
226
|
+
return '7.1';
|
|
227
|
+
if (version.major === 24)
|
|
228
|
+
return '7.0';
|
|
229
|
+
if (version.major === 23)
|
|
230
|
+
return '6.0';
|
|
231
|
+
if (version.major === 22)
|
|
232
|
+
return '5.1';
|
|
233
|
+
if (version.major === 21)
|
|
234
|
+
return '5.0';
|
|
235
|
+
if (version.major === 20)
|
|
236
|
+
return '4.4W';
|
|
237
|
+
if (version.major === 19)
|
|
238
|
+
return '4.4';
|
|
239
|
+
if (version.major === 18)
|
|
240
|
+
return '4.3';
|
|
241
|
+
if (version.major === 17)
|
|
242
|
+
return '4.2';
|
|
243
|
+
if (version.major === 16)
|
|
244
|
+
return '4.1';
|
|
245
|
+
if (version.major === 15)
|
|
246
|
+
return '4.0.3';
|
|
247
|
+
if (version.major === 14)
|
|
248
|
+
return '4.0';
|
|
249
|
+
if (version.major === 13)
|
|
250
|
+
return '3.2';
|
|
251
|
+
if (version.major === 12)
|
|
252
|
+
return '3.1';
|
|
253
|
+
if (version.major === 11)
|
|
254
|
+
return '3.0';
|
|
255
|
+
if (version.major === 10)
|
|
256
|
+
return '2.3.3';
|
|
257
|
+
if (version.major === 9)
|
|
258
|
+
return '2.3';
|
|
259
|
+
if (version.major === 8)
|
|
260
|
+
return '2.2';
|
|
261
|
+
if (version.major === 7)
|
|
262
|
+
return '2.1';
|
|
263
|
+
if (version.major === 6)
|
|
264
|
+
return '2.0.1';
|
|
265
|
+
if (version.major === 5)
|
|
266
|
+
return '2.0';
|
|
267
|
+
if (version.major === 4)
|
|
268
|
+
return '1.6';
|
|
269
|
+
if (version.major === 3)
|
|
270
|
+
return '1.5';
|
|
271
|
+
if (version.major === 2)
|
|
272
|
+
return '1.1';
|
|
273
|
+
if (version.major === 1)
|
|
274
|
+
return '1.0';
|
|
275
|
+
return defaultValue;
|
|
276
|
+
}
|
|
155
277
|
function resolveVersion(string, resolver) {
|
|
156
278
|
if (typeof resolver === 'function')
|
|
157
279
|
return resolver(string);
|
|
@@ -168,11 +290,6 @@ function normalizeBrand(entry) {
|
|
|
168
290
|
return { brand: entry, version: '' };
|
|
169
291
|
return { brand: entry.brand, version: entry.version };
|
|
170
292
|
}
|
|
171
|
-
function getUserAgent() {
|
|
172
|
-
if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string')
|
|
173
|
-
return navigator.userAgent;
|
|
174
|
-
return '';
|
|
175
|
-
}
|
|
176
293
|
function getRenderer() {
|
|
177
294
|
if (typeof globalThis.document === 'undefined')
|
|
178
295
|
return '';
|
|
@@ -203,10 +320,7 @@ function getIsStandalone(os) {
|
|
|
203
320
|
function getIsWebview() {
|
|
204
321
|
return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
|
|
205
322
|
}
|
|
206
|
-
function
|
|
207
|
-
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined;
|
|
208
|
-
}
|
|
209
|
-
function getNodeOSVersion(string) {
|
|
323
|
+
function getSemanticVersion(string) {
|
|
210
324
|
var parts = string.split('.');
|
|
211
325
|
return {
|
|
212
326
|
major: parseInt(parts[0] || '0'),
|
|
@@ -254,84 +368,49 @@ for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
|
254
368
|
break;
|
|
255
369
|
}
|
|
256
370
|
}
|
|
257
|
-
if (
|
|
371
|
+
if (Platform.isReactNative) {
|
|
258
372
|
try {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
373
|
+
var reactNative = require('react-native');
|
|
374
|
+
var platform = reactNative.Platform;
|
|
375
|
+
var os = platform.OS;
|
|
376
|
+
var release = platform.Version;
|
|
377
|
+
var version = getSemanticVersion(release);
|
|
378
|
+
switch (os) {
|
|
379
|
+
case 'android':
|
|
380
|
+
Platform.os = OS.Android;
|
|
381
|
+
Platform.osVersion = resolveSemanticAndroidVersion(version, release);
|
|
382
|
+
break;
|
|
383
|
+
case 'ios':
|
|
384
|
+
Platform.os = OS.iOS;
|
|
385
|
+
Platform.osVersion = release;
|
|
386
|
+
break;
|
|
387
|
+
case 'windows':
|
|
388
|
+
Platform.os = OS.Windows;
|
|
389
|
+
Platform.osVersion = resolveSemanticWindowsVersion(version, release);
|
|
390
|
+
break;
|
|
391
|
+
case 'macos':
|
|
392
|
+
Platform.os = OS.MacOS;
|
|
393
|
+
Platform.osVersion = release;
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
263
396
|
}
|
|
264
397
|
catch (_) {
|
|
265
398
|
}
|
|
266
399
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
if (os === null)
|
|
271
|
-
return;
|
|
400
|
+
if (Platform.isNodeJS) {
|
|
401
|
+
try {
|
|
402
|
+
var os = require('os');
|
|
272
403
|
var platform = os.platform();
|
|
273
404
|
var release = os.release();
|
|
274
|
-
var version =
|
|
405
|
+
var version = getSemanticVersion(release);
|
|
275
406
|
switch (platform) {
|
|
276
407
|
case 'win32':
|
|
277
408
|
Platform.os = OS.Windows;
|
|
278
|
-
|
|
279
|
-
Platform.osVersion = '11';
|
|
280
|
-
else if (version.major === 10 && version.minor === 0 && version.build < 22000)
|
|
281
|
-
Platform.osVersion = '10';
|
|
282
|
-
else if (version.major === 6 && version.minor === 3)
|
|
283
|
-
Platform.osVersion = '8.1';
|
|
284
|
-
else if (version.major === 6 && version.minor === 2)
|
|
285
|
-
Platform.osVersion = '8';
|
|
286
|
-
else if (version.major === 6 && version.minor === 1)
|
|
287
|
-
Platform.osVersion = '7';
|
|
288
|
-
else if (version.major === 6 && version.minor === 0)
|
|
289
|
-
Platform.osVersion = 'Vista';
|
|
290
|
-
else if (version.major === 5 && version.minor === 1)
|
|
291
|
-
Platform.osVersion = 'XP';
|
|
292
|
-
else if (version.major === 5 && version.minor === 2)
|
|
293
|
-
Platform.osVersion = 'XP';
|
|
294
|
-
else if (version.major === 5 && version.minor === 0)
|
|
295
|
-
Platform.osVersion = '2000';
|
|
296
|
-
else if (version.major === 4 && version.minor === 90)
|
|
297
|
-
Platform.osVersion = 'ME';
|
|
298
|
-
else if (version.major === 4 && version.minor === 0)
|
|
299
|
-
Platform.osVersion = 'NT 4.0';
|
|
300
|
-
else if (version.major === 3 && version.minor === 51)
|
|
301
|
-
Platform.osVersion = 'NT 3.11';
|
|
302
|
-
else
|
|
303
|
-
Platform.osVersion = release;
|
|
409
|
+
Platform.osVersion = resolveSemanticWindowsVersion(version, release);
|
|
304
410
|
break;
|
|
305
411
|
case 'darwin':
|
|
306
412
|
Platform.os = OS.MacOS;
|
|
307
|
-
|
|
308
|
-
Platform.osVersion = '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
|
|
309
|
-
else if (version.major === 23)
|
|
310
|
-
Platform.osVersion = '14.' + version.minor + '.' + version.build;
|
|
311
|
-
else if (version.major === 22)
|
|
312
|
-
Platform.osVersion = '13.' + version.minor + '.' + version.build;
|
|
313
|
-
else if (version.major === 21)
|
|
314
|
-
Platform.osVersion = '12.' + version.minor + '.' + version.build;
|
|
315
|
-
else if (version.major === 20)
|
|
316
|
-
Platform.osVersion = '11.' + version.minor + '.' + version.build;
|
|
317
|
-
else if (version.major === 19)
|
|
318
|
-
Platform.osVersion = '10.15.' + version.minor;
|
|
319
|
-
else if (version.major === 18)
|
|
320
|
-
Platform.osVersion = '10.14.' + version.minor;
|
|
321
|
-
else if (version.major === 17)
|
|
322
|
-
Platform.osVersion = '10.13.' + version.minor;
|
|
323
|
-
else if (version.major === 16)
|
|
324
|
-
Platform.osVersion = '10.12.' + version.minor;
|
|
325
|
-
else if (version.major === 15)
|
|
326
|
-
Platform.osVersion = '10.11.' + version.minor;
|
|
327
|
-
else if (version.major === 14)
|
|
328
|
-
Platform.osVersion = '10.10.' + version.minor;
|
|
329
|
-
else if (version.major === 13)
|
|
330
|
-
Platform.osVersion = '10.9.' + version.minor;
|
|
331
|
-
else if (version.major >= 5 && version.major <= 12)
|
|
332
|
-
Platform.osVersion = '10.' + (version.major - 4) + '.' + version.minor;
|
|
333
|
-
else
|
|
334
|
-
Platform.osVersion = release;
|
|
413
|
+
Platform.osVersion = resolveSemanticDarwinVersion(version, release);
|
|
335
414
|
break;
|
|
336
415
|
case 'android':
|
|
337
416
|
Platform.os = OS.Android;
|
|
@@ -344,7 +423,9 @@ else if (Platform.isNodeJS) {
|
|
|
344
423
|
}
|
|
345
424
|
break;
|
|
346
425
|
}
|
|
347
|
-
}
|
|
426
|
+
}
|
|
427
|
+
catch (_) {
|
|
428
|
+
}
|
|
348
429
|
}
|
|
349
430
|
if (navigator.userAgentData !== undefined && navigator.userAgentData.getHighEntropyValues !== undefined) {
|
|
350
431
|
navigator
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,n,r,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"}(i||(i={}));var o={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer: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""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},t=[[/windows nt (6\.[23]); arm/i,e.Windows,a],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,a],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,a],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,a],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,a],[/windows ce\/?([\d.]*)/i,e.Windows,a],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,u],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,u],[/cfnetwork\/.+darwin/i,e.iOS,u],[/mac os x ?([\w. ]*)/i,e.MacOS,u],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,u],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],l=[[/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]],s=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function a(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 u(e){return void 0===e?"":e.replace(/_/g,".")}function c(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var d=0;d<t.length;d++){var m=(v=t[d])[0],f=v[1],b=v[2];if(null!==(g=o.userAgent.match(m))){o.os=f,o.osVersion=c(g[1],b),f===e.iOS||f===e.Android?o.device=n.Mobile:f!==e.Windows&&f!==e.MacOS||(o.device=n.Desktop);break}}for(d=0;d<l.length;d++){m=(v=l[d])[0];var w=v[1];b=v[2];if(null!==(g=o.userAgent.match(m))){o.engine=w,o.engineVersion=c(g[1],b);break}}for(d=0;d<s.length;d++){m=(v=s[d])[0];var v,g,h=v[1];b=v[2];if(null!==(g=o.userAgent.match(m))){o.browser=h,o.browserVersion=c(g[1],b);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{import("react-native").then((function(e){console.log(e.Platform)}))}catch(e){}else o.isNodeJS&&function(e){if("require"in globalThis&&"function"==typeof globalThis.require)try{return Promise.resolve(globalThis.require(e))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}("os").then((function(n){if(null!==n){var r,i=n.platform(),t=n.release(),l=(r=t.split("."),{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")});switch(i){case"win32":o.os=e.Windows,o.osVersion=10===l.major&&0===l.minor&&l.build>=22e3?"11":10===l.major&&0===l.minor&&l.build<22e3?"10":6===l.major&&3===l.minor?"8.1":6===l.major&&2===l.minor?"8":6===l.major&&1===l.minor?"7":6===l.major&&0===l.minor?"Vista":5===l.major&&1===l.minor||5===l.major&&2===l.minor?"XP":5===l.major&&0===l.minor?"2000":4===l.major&&90===l.minor?"ME":4===l.major&&0===l.minor?"NT 4.0":3===l.major&&51===l.minor?"NT 3.11":t;break;case"darwin":o.os=e.MacOS,o.osVersion=l.major>=24?l.major-9+"."+l.minor+"."+l.build:23===l.major?"14."+l.minor+"."+l.build:22===l.major?"13."+l.minor+"."+l.build:21===l.major?"12."+l.minor+"."+l.build:20===l.major?"11."+l.minor+"."+l.build:19===l.major?"10.15."+l.minor:18===l.major?"10.14."+l.minor:17===l.major?"10.13."+l.minor:16===l.major?"10.12."+l.minor:15===l.major?"10.11."+l.minor:14===l.major?"10.10."+l.minor:13===l.major?"10.9."+l.minor:l.major>=5&&l.major<=12?"10."+(l.major-4)+"."+l.minor:t;break;case"android":o.os=e.Android,o.osVersion=t;break;case"linux":/android/i.test(t)&&(o.os=e.Android,o.osVersion=t)}}}));void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],t=n.platformVersion,l=0;l<i.length;l++){var s=null==(r=i[l])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},a=s.brand,u=s.version;/not.a.brand/i.test(a)||"Chromium"===a&&(o.engineVersion=u)}"string"==typeof t&&(o.os===e.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?o.osVersion="11":o.osVersion=t)})),o.isMobile=o.device===n.Mobile,o.isDesktop=o.device===n.Desktop,o.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(o.userAgent),o.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(o.os);var p={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 k(){return e.iOS===o.os}var E=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return p.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=p[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:p.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){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 o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function l(r,o){return new Promise((function(t,l){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var a=s.call(r,o);return void 0!==a&&"function"==typeof a.then?void a.then((function(){t()})).catch((function(){k()?u():l()})):void t()}catch(e){if(!k())return void l()}}function u(){if(k()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}l()}u()}))}function s(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var l=t.call(document);return void 0!==l&&"function"==typeof l.then?void l.then((function(){r()})).catch((function(){i()})):void r()}}if(k()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),a=0;a<s.length;a++){var u=s[a];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),k())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!k())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:l,exit:s,toggle:function(e,n){return t()?s():l(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),F={installed:!1,name:"Fullscreen",module:E,Constants:{},Errors:{}};module.exports=F;
|
|
1
|
+
"use strict";var e,n,r,o;!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={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer: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""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron,isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/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,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\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]];function u(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 c(e){return void 0===e?"":e.replace(/_/g,".")}function m(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 d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=d(k[1],g),v===e.iOS||v===e.Android?t.device=n.Mobile:v!==e.Windows&&v!==e.MacOS||(t.device=n.Desktop);break}}for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=d(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=d(k[1],g);break}}if(t.isReactNative)try{v=(S=require("react-native").Platform).OS;var j=f(F=S.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(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?"4.4W":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}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=m(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,S=(v=require("os")).platform();j=f(F=v.release());switch(S){case"win32":t.os=e.Windows,t.osVersion=m(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(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}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var T={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 x(){return e.iOS===t.os}var M=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return T.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=T[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:T.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){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 i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),y={installed:!1,name:"Fullscreen",module:M,Constants:{},Errors:{}};module.exports=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,n,r,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"}(i||(i={}));var o={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer: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""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},t=[[/windows nt (6\.[23]); arm/i,e.Windows,s],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,s],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,s],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,s],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,s],[/windows ce\/?([\d.]*)/i,e.Windows,s],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,u],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,u],[/cfnetwork\/.+darwin/i,e.iOS,u],[/mac os x ?([\w. ]*)/i,e.MacOS,u],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,u],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],l=[[/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]],a=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function s(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 u(e){return void 0===e?"":e.replace(/_/g,".")}function c(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var d=0;d<t.length;d++){var m=(v=t[d])[0],f=v[1],b=v[2];if(null!==(g=o.userAgent.match(m))){o.os=f,o.osVersion=c(g[1],b),f===e.iOS||f===e.Android?o.device=n.Mobile:f!==e.Windows&&f!==e.MacOS||(o.device=n.Desktop);break}}for(d=0;d<l.length;d++){m=(v=l[d])[0];var w=v[1];b=v[2];if(null!==(g=o.userAgent.match(m))){o.engine=w,o.engineVersion=c(g[1],b);break}}for(d=0;d<a.length;d++){m=(v=a[d])[0];var v,g,h=v[1];b=v[2];if(null!==(g=o.userAgent.match(m))){o.browser=h,o.browserVersion=c(g[1],b);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{import("react-native").then((function(e){console.log(e.Platform)}))}catch(e){}else o.isNodeJS&&function(e){if("require"in globalThis&&"function"==typeof globalThis.require)try{return Promise.resolve(globalThis.require(e))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}("os").then((function(n){if(null!==n){var r,i=n.platform(),t=n.release(),l=(r=t.split("."),{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")});switch(i){case"win32":o.os=e.Windows,o.osVersion=10===l.major&&0===l.minor&&l.build>=22e3?"11":10===l.major&&0===l.minor&&l.build<22e3?"10":6===l.major&&3===l.minor?"8.1":6===l.major&&2===l.minor?"8":6===l.major&&1===l.minor?"7":6===l.major&&0===l.minor?"Vista":5===l.major&&1===l.minor||5===l.major&&2===l.minor?"XP":5===l.major&&0===l.minor?"2000":4===l.major&&90===l.minor?"ME":4===l.major&&0===l.minor?"NT 4.0":3===l.major&&51===l.minor?"NT 3.11":t;break;case"darwin":o.os=e.MacOS,o.osVersion=l.major>=24?l.major-9+"."+l.minor+"."+l.build:23===l.major?"14."+l.minor+"."+l.build:22===l.major?"13."+l.minor+"."+l.build:21===l.major?"12."+l.minor+"."+l.build:20===l.major?"11."+l.minor+"."+l.build:19===l.major?"10.15."+l.minor:18===l.major?"10.14."+l.minor:17===l.major?"10.13."+l.minor:16===l.major?"10.12."+l.minor:15===l.major?"10.11."+l.minor:14===l.major?"10.10."+l.minor:13===l.major?"10.9."+l.minor:l.major>=5&&l.major<=12?"10."+(l.major-4)+"."+l.minor:t;break;case"android":o.os=e.Android,o.osVersion=t;break;case"linux":/android/i.test(t)&&(o.os=e.Android,o.osVersion=t)}}}));void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],t=n.platformVersion,l=0;l<i.length;l++){var a=null==(r=i[l])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,u=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(o.engineVersion=u)}"string"==typeof t&&(o.os===e.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?o.osVersion="11":o.osVersion=t)})),o.isMobile=o.device===n.Mobile,o.isDesktop=o.device===n.Desktop,o.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(o.userAgent),o.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(o.os);var p={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 k(){return e.iOS===o.os}var E=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return p.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=p[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:p.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){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 o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function l(r,o){return new Promise((function(t,l){if(null!==e){var a=r[e.request];if("function"==typeof a)try{var s=a.call(r,o);return void 0!==s&&"function"==typeof s.then?void s.then((function(){t()})).catch((function(){k()?u():l()})):void t()}catch(e){if(!k())return void l()}}function u(){if(k()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}l()}u()}))}function a(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var l=t.call(document);return void 0!==l&&"function"==typeof l.then?void l.then((function(){r()})).catch((function(){i()})):void r()}}if(k()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var a=document.querySelectorAll("video"),s=0;s<a.length;s++){var u=a[s];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),k())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!k())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:l,exit:a,toggle:function(e,n){return t()?a():l(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),F={installed:!1,name:"Fullscreen",module:E,Constants:{},Errors:{}};export{F as default};
|
|
1
|
+
var e,n,r,o;!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={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer: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""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron,isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/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,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\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]];function u(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 c(e){return void 0===e?"":e.replace(/_/g,".")}function m(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 d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=d(k[1],g),v===e.iOS||v===e.Android?t.device=n.Mobile:v!==e.Windows&&v!==e.MacOS||(t.device=n.Desktop);break}}for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=d(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=d(k[1],g);break}}if(t.isReactNative)try{v=(S=require("react-native").Platform).OS;var j=f(F=S.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(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?"4.4W":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}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=m(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,S=(v=require("os")).platform();j=f(F=v.release());switch(S){case"win32":t.os=e.Windows,t.osVersion=m(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(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}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var T={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 x(){return e.iOS===t.os}var M=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return T.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=T[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:T.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){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 i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),y={installed:!1,name:"Fullscreen",module:M,Constants:{},Errors:{}};export{y as default};
|