native-fn 1.0.78 → 1.0.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/native.cjs +1 -1
  2. package/dist/native.min.cjs +1 -1
  3. package/dist/native.min.mjs +1 -1
  4. package/dist/native.mjs +1 -1
  5. package/dist/native.umd.js +1 -1
  6. package/dist/native.umd.min.js +1 -1
  7. package/dist/plugin/app/index.cjs +59 -1
  8. package/dist/plugin/app/index.min.cjs +1 -1
  9. package/dist/plugin/app/index.min.mjs +1 -1
  10. package/dist/plugin/app/index.mjs +59 -1
  11. package/dist/plugin/app/index.umd.js +59 -1
  12. package/dist/plugin/app/index.umd.min.js +1 -1
  13. package/dist/plugin/app/src/plugin/platform/types/platform.d.ts +8 -0
  14. package/dist/plugin/appearance/index.cjs +59 -1
  15. package/dist/plugin/appearance/index.min.cjs +1 -1
  16. package/dist/plugin/appearance/index.min.mjs +1 -1
  17. package/dist/plugin/appearance/index.mjs +59 -1
  18. package/dist/plugin/appearance/index.umd.js +59 -1
  19. package/dist/plugin/appearance/index.umd.min.js +1 -1
  20. package/dist/plugin/appearance/src/plugin/platform/types/platform.d.ts +8 -0
  21. package/dist/plugin/clipboard/index.cjs +59 -1
  22. package/dist/plugin/clipboard/index.min.cjs +1 -1
  23. package/dist/plugin/clipboard/index.min.mjs +1 -1
  24. package/dist/plugin/clipboard/index.mjs +59 -1
  25. package/dist/plugin/clipboard/index.umd.js +59 -1
  26. package/dist/plugin/clipboard/index.umd.min.js +1 -1
  27. package/dist/plugin/clipboard/src/plugin/platform/types/platform.d.ts +8 -0
  28. package/dist/plugin/fullscreen/index.cjs +59 -1
  29. package/dist/plugin/fullscreen/index.min.cjs +1 -1
  30. package/dist/plugin/fullscreen/index.min.mjs +1 -1
  31. package/dist/plugin/fullscreen/index.mjs +59 -1
  32. package/dist/plugin/fullscreen/index.umd.js +59 -1
  33. package/dist/plugin/fullscreen/index.umd.min.js +1 -1
  34. package/dist/plugin/fullscreen/src/plugin/platform/types/platform.d.ts +8 -0
  35. package/dist/plugin/platform/index.cjs +59 -1
  36. package/dist/plugin/platform/index.d.ts +9 -1
  37. package/dist/plugin/platform/index.min.cjs +1 -1
  38. package/dist/plugin/platform/index.min.mjs +1 -1
  39. package/dist/plugin/platform/index.mjs +59 -1
  40. package/dist/plugin/platform/index.umd.js +59 -1
  41. package/dist/plugin/platform/index.umd.min.js +1 -1
  42. package/dist/plugin/platform/src/plugin/platform/types/platform.d.ts +8 -0
  43. package/dist/plugin/theme/index.cjs +59 -1
  44. package/dist/plugin/theme/index.min.cjs +1 -1
  45. package/dist/plugin/theme/index.min.mjs +1 -1
  46. package/dist/plugin/theme/index.mjs +59 -1
  47. package/dist/plugin/theme/index.umd.js +59 -1
  48. package/dist/plugin/theme/index.umd.min.js +1 -1
  49. package/dist/plugin/theme/src/plugin/platform/types/platform.d.ts +8 -0
  50. package/dist/src/plugin/platform/types/platform.d.ts +8 -0
  51. package/package.json +1 -1
@@ -293,6 +293,9 @@ var Platform = {
293
293
  get network() {
294
294
  return getNetwork();
295
295
  },
296
+ get dimension() {
297
+ return getDimension();
298
+ },
296
299
  get device() {
297
300
  if (this.os.name === OS.iOS || this.os.name === OS.Android)
298
301
  return Devices.Mobile;
@@ -667,6 +670,7 @@ function getNetwork() {
667
670
  network.rtt = connection.rtt;
668
671
  if (typeof connection.saveData !== 'undefined')
669
672
  network.saveData = connection.saveData;
673
+ return network;
670
674
  }
671
675
  }
672
676
  if (Platform.isNode) {
@@ -731,6 +735,61 @@ function getNetwork() {
731
735
  }
732
736
  return network;
733
737
  }
738
+ function getDimension() {
739
+ var dimension = {
740
+ innerWidth: -1,
741
+ innerHeight: -1,
742
+ outerWidth: -1,
743
+ outerHeight: -1,
744
+ scale: 1,
745
+ };
746
+ if (typeof globalThis.innerWidth !== 'undefined') {
747
+ dimension.innerWidth = globalThis.innerWidth;
748
+ dimension.innerHeight = globalThis.innerHeight;
749
+ dimension.outerWidth = globalThis.outerWidth;
750
+ dimension.outerHeight = globalThis.outerHeight;
751
+ dimension.scale = globalThis.devicePixelRatio || 1;
752
+ return dimension;
753
+ }
754
+ if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
755
+ try {
756
+ var reactNative = require('react-native');
757
+ var dimensions = reactNative.Dimensions;
758
+ var pixelRatio = reactNative.PixelRatio;
759
+ var screenDimensions = dimensions.get('screen');
760
+ var windowDimensions = dimensions.get('window');
761
+ dimension.innerWidth = screenDimensions.width;
762
+ dimension.innerHeight = screenDimensions.height;
763
+ dimension.outerWidth = windowDimensions.width;
764
+ dimension.outerHeight = windowDimensions.height;
765
+ dimension.scale = pixelRatio.get();
766
+ return dimension;
767
+ }
768
+ catch (_) {
769
+ }
770
+ }
771
+ if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
772
+ try {
773
+ var electron = require('electron');
774
+ var screen_1 = electron.screen;
775
+ var browserWindow = electron.BrowserWindow;
776
+ var focusedWindow = browserWindow.getFocusedWindow();
777
+ if (focusedWindow) {
778
+ var contentSize = focusedWindow.getContentSize();
779
+ var size = focusedWindow.getSize();
780
+ dimension.innerWidth = contentSize[0];
781
+ dimension.innerHeight = contentSize[1];
782
+ dimension.outerWidth = size[0];
783
+ dimension.outerHeight = size[1];
784
+ dimension.scale = screen_1.getDisplayMatching(focusedWindow.getBounds()).scaleFactor;
785
+ }
786
+ return dimension;
787
+ }
788
+ catch (_) {
789
+ }
790
+ }
791
+ return dimension;
792
+ }
734
793
  function init() {
735
794
  if ((typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(USER_AGENT)))
736
795
  Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
@@ -863,7 +922,6 @@ function init() {
863
922
  }
864
923
  }
865
924
  if (typeof globalThis.document !== 'undefined') {
866
- incrementPendingTasks();
867
925
  if (typeof globalThis.device !== 'undefined') {
868
926
  parseOSFromCordova();
869
927
  }
@@ -299,6 +299,9 @@
299
299
  get network() {
300
300
  return getNetwork();
301
301
  },
302
+ get dimension() {
303
+ return getDimension();
304
+ },
302
305
  get device() {
303
306
  if (this.os.name === OS.iOS || this.os.name === OS.Android)
304
307
  return Devices.Mobile;
@@ -673,6 +676,7 @@
673
676
  network.rtt = connection.rtt;
674
677
  if (typeof connection.saveData !== 'undefined')
675
678
  network.saveData = connection.saveData;
679
+ return network;
676
680
  }
677
681
  }
678
682
  if (Platform.isNode) {
@@ -737,6 +741,61 @@
737
741
  }
738
742
  return network;
739
743
  }
744
+ function getDimension() {
745
+ var dimension = {
746
+ innerWidth: -1,
747
+ innerHeight: -1,
748
+ outerWidth: -1,
749
+ outerHeight: -1,
750
+ scale: 1,
751
+ };
752
+ if (typeof globalThis.innerWidth !== 'undefined') {
753
+ dimension.innerWidth = globalThis.innerWidth;
754
+ dimension.innerHeight = globalThis.innerHeight;
755
+ dimension.outerWidth = globalThis.outerWidth;
756
+ dimension.outerHeight = globalThis.outerHeight;
757
+ dimension.scale = globalThis.devicePixelRatio || 1;
758
+ return dimension;
759
+ }
760
+ if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
761
+ try {
762
+ var reactNative = require('react-native');
763
+ var dimensions = reactNative.Dimensions;
764
+ var pixelRatio = reactNative.PixelRatio;
765
+ var screenDimensions = dimensions.get('screen');
766
+ var windowDimensions = dimensions.get('window');
767
+ dimension.innerWidth = screenDimensions.width;
768
+ dimension.innerHeight = screenDimensions.height;
769
+ dimension.outerWidth = windowDimensions.width;
770
+ dimension.outerHeight = windowDimensions.height;
771
+ dimension.scale = pixelRatio.get();
772
+ return dimension;
773
+ }
774
+ catch (_) {
775
+ }
776
+ }
777
+ if (Platform.crossPlatformFramework === CrossPlatformFramework.Electron) {
778
+ try {
779
+ var electron = require('electron');
780
+ var screen_1 = electron.screen;
781
+ var browserWindow = electron.BrowserWindow;
782
+ var focusedWindow = browserWindow.getFocusedWindow();
783
+ if (focusedWindow) {
784
+ var contentSize = focusedWindow.getContentSize();
785
+ var size = focusedWindow.getSize();
786
+ dimension.innerWidth = contentSize[0];
787
+ dimension.innerHeight = contentSize[1];
788
+ dimension.outerWidth = size[0];
789
+ dimension.outerHeight = size[1];
790
+ dimension.scale = screen_1.getDisplayMatching(focusedWindow.getBounds()).scaleFactor;
791
+ }
792
+ return dimension;
793
+ }
794
+ catch (_) {
795
+ }
796
+ }
797
+ return dimension;
798
+ }
740
799
  function init() {
741
800
  if ((typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(USER_AGENT)))
742
801
  Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
@@ -869,7 +928,6 @@
869
928
  }
870
929
  }
871
930
  if (typeof globalThis.document !== 'undefined') {
872
- incrementPendingTasks();
873
931
  if (typeof globalThis.device !== 'undefined') {
874
932
  parseOSFromCordova();
875
933
  }
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Clipboard=t()}(this,(function(){"use strict";function e(e,t){if(void 0===t&&(t=!0),void 0!==globalThis.document){var n=globalThis.document.createElement(e);return"width"in n&&(n.width="0"),"height"in n&&(n.height="0"),"border"in n&&(n.border="0"),"frameBorder"in n&&(n.frameBorder="0"),"scrolling"in n&&(n.scrolling="no"),"cellPadding"in n&&(n.cellPadding="0"),"cellSpacing"in n&&(n.cellSpacing="0"),"frame"in n&&(n.frame="void"),"rules"in n&&(n.rules="none"),"noWrap"in n&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),t?(n.style.width="1px",n.style.height="1px"):(n.setAttribute("aria-hidden","true"),n.style.width="0",n.style.height="0",n.style.zIndex="-9999",n.style.display="none",n.style.visibility="hidden",n.style.pointerEvents="none"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="0",n.style.margin="0",n.style.border="none",n.style.outline="none",n.style.clip="rect(1px, 1px, 1px, 1px)",n.style.clipPath="inset(50%)",n.style.overflow="hidden",n.style.whiteSpace="nowrap",n}}function t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r="",o=0;o<t.length-2;o++){var i=t[o];void 0!==i&&(r=r+i.charAt(0).toUpperCase()+i.slice(1))}return r}function n(){this.returnValue=!1}function r(){this.cancelBubble=!0}var o,i,a,l,s,c=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,d=["","webkit","moz","ms","MS","o","O"],u={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},m={useStd:void 0!==globalThis.document&&"function"==typeof globalThis.document.addEventListener,add:function(e,t){void 0===t&&(t={callback:null,options:!1});var o=t.callback;if(void 0!==e&&null!==o){var i=m.withVender(e,t.type),a=t.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,o,a)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(o)}catch(e){}else try{return e.addListener(i,o)}catch(e){}return"function"==typeof e.attachEvent?o.__ieWrapper?e.attachEvent("on"+i,o.__ieWrapper):e.attachEvent("on"+i,o.__ieWrapper=function(t){void 0===t&&(t=globalThis.event),void 0!==t&&(t.currentTarget=e,"function"!=typeof t.preventDefault&&(t.preventDefault=n),"function"!=typeof t.stopPropagation&&(t.stopPropagation=r),"function"==typeof o?o.call(e,t):o&&"function"==typeof o.handleEvent&&o.handleEvent.call(e,t))}):void 0}},remove:function(e,t){void 0===t&&(t={callback:null,options:!1});var n=t.callback;if(void 0!==e&&null!==n){var r=m.withVender(e,t.type),o=t.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(r,n,o)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(n)}catch(e){}else try{return e.removeListener(r,n)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=n.__ieWrapper;void 0!==i&&(e.detachEvent("on"+r,i),delete n.__ieWrapper)}}},withVender:function(e,n){if(void 0===n)return"";if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(n)>-1)return n;if(void 0!==e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(n)>-1)return n;var r;r=n in u?u[n]:c.test(n)?[n,n.replace(c,t)]:[n];for(var o=0;o<d.length;o++)for(var i=0;i<r.length;i++){var a=d[o]+r[i];if(void 0!==e["on"+a])return a}return""}};!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(o||(o={})),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"}(a||(a={})),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"}(l||(l={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(s||(s={}));var f=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",v="loading",p=[],h=0,b={os:{name:o.Unknown,version:""},engine:{name:a.Unknown,version:""},browser:{name:l.Unknown,version:""},crossPlatformFramework:s.Unknown,userAgent:f,get readyState(){return v},get network(){return function(){var e={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(e.isOnline=globalThis.navigator.onLine);var t=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;void 0!==t&&(void 0!==t.effectiveType&&(e.effectiveType=t.effectiveType),void 0!==t.type&&(e.type=t.type),void 0!==t.downlink&&(e.downlink=t.downlink),void 0!==t.rtt&&(e.rtt=t.rtt),void 0!==t.saveData&&(e.saveData=t.saveData))}if(b.isNode){try{for(var n=require("os").networkInterfaces(),r=Object.keys(n),i=0;i<r.length;i++){for(var a=n[r[i]],l=0;l<a.length;l++){var s=a[l];s.internal||"IPv4"!==s.family||(e.isOnline=!0)}if(e.isOnline)break}}catch(e){}try{var c=require("child_process");if(b.os.name===o.Windows){try{(d=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&d.includes("connected")&&(e.type="wifi")}catch(e){}if(null===e.type)try{(d=c.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(e.type="ethernet")}catch(e){}null===e.type&&(e.type="other")}else if(b.os.name===o.MacOS)try{var d=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),u=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});u.includes("en0")&&d.includes("Wi-Fi")?e.type="wifi":u.includes("en")||d.includes("Ethernet")?e.type="ethernet":e.type="other"}catch(t){e.type="other"}}catch(e){}}return e}()},get device(){return this.os.name===o.iOS||this.os.name===o.Android?i.Mobile:this.os.name===o.Windows||this.os.name===o.MacOS?i.Desktop:i.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var t=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===t)return"";if(t instanceof WebGLRenderingContext||"getParameter"in t&&"function"==typeof t.getParameter){var n=t.getExtension("WEBGL_debug_renderer_info");return null===n?t.getParameter(t.RENDERER):t.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===i.Mobile},get isDesktop(){return this.device===i.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===o.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 p.push(e)}},g=[[/windows nt (6\.[23]); arm/i,o.Windows,E],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,o.Windows,E],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,o.Windows,E],[/windows nt ?([\d.)]*)(?!.+xbox)/i,o.Windows,E],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,o.Windows,E],[/windows ce\/?([\d.]*)/i,o.Windows,E],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,o.iOS,S],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,o.iOS,S],[/cfnetwork\/.+darwin/i,o.iOS,S],[/mac os x ?([\w. ]*)/i,o.MacOS,S],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,o.MacOS,S],[/droid ([\w.]+)\b.+(android[- ]x86)/i,o.Android],[/android\w*[-\/.; ]?([\d.]*)/i,o.Android]],w=[[/windows.+ edge\/([\w.]+)/i,a.EdgeHTML],[/arkweb\/([\w.]+)/i,a.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,a.Blink],[/presto\/([\w.]+)/i,a.Presto],[/webkit\/([\w.]+)/i,a.WebKit],[/trident\/([\w.]+)/i,a.Trident],[/netfront\/([\w.]+)/i,a.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,a.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,a.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,a.Gecko]],y=[[/\b(?:crmo|crios)\/([\w.]+)/i,l.Chrome],[/webview.+edge\/([\w.]+)/i,l.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,l.Edge],[/opera mini\/([-\w.]+)/i,l.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,l.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,l.Opera],[/opios[\/ ]+([\w.]+)/i,l.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,l.Opera],[/\bopr\/([\w.]+)/i,l.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,l.IE],[/(?:ms|\()ie ([\w.]+)/i,l.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,l.IE],[/\bfocus\/([\w.]+)/i,l.Firefox],[/\bopt\/([\w.]+)/i,l.Opera],[/coast\/([\w.]+)/i,l.Opera],[/fxios\/([\w.-]+)/i,l.Firefox],[/samsungbrowser\/([\w.]+)/i,l.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,l.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,l.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,l.Chrome],[/chrome\/([\w.]+) mobile/i,l.Chrome],[/chrome\/v?([\w.]+)/i,l.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/version\/([\w.,]+) .*safari/i,l.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,l.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,l.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,l.Firefox],[/firefox\/([\w.]+)/i,l.Firefox]],T={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function k(){h++}function x(){h--,j()}function j(){if(0===h&&"loading"===v){v="complete";for(var e=0;e<p.length;e++)try{p[e](b)}catch(e){}p.length=0}}function E(e){if(void 0===e)return"";var t={"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!==t?t:e}function S(e){return void 0===e?"":e.replace(/_/g,".")}function C(e,t){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":t}function O(e,t){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:t}function M(e,t){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":t}function D(e,t){return"function"==typeof t?t(e):"string"==typeof t?t:void 0===e?"":e}function P(e){var t=e.split(".");return{major:parseInt(t[0]||"0"),minor:parseInt(t[1]||"0"),build:parseInt(t[2]||"0")}}function W(){if(b.crossPlatformFramework=s.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":b.os={name:o.Android,version:globalThis.device.version};break;case"iOS":b.os={name:o.iOS,version:globalThis.device.version}}x()}function A(e){return null!==e&&"object"==typeof e}function N(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,t=location.hostname;return"https:"===e||"localhost"===t||"127.0.0.1"===t||"[::1]"===t}()&&"undefined"!=typeof navigator&&"clipboard"in navigator}function L(t){return function(t){if(!globalThis.getSelection||!globalThis.document.createRange)return!1;var n=e("div");if(void 0===n)return!1;n.contentEditable="true",n.innerHTML=t,n.style.whiteSpace="pre",n.style.userSelect="text",n.style.setProperty("-webkit-user-select","text"),n.style.setProperty("-moz-user-select","text"),n.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(n);var r=globalThis.getSelection(),o=globalThis.document.createRange(),i=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.setData&&(e.preventDefault(),e.clipboardData.setData("text/html",t),e.clipboardData.setData("text/plain",t))}catch(e){}};m.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===r)return V(n,r,i),!1;r.removeAllRanges(),o.selectNodeContents(n),r.addRange(o);var a=globalThis.document.execCommand("copy");return V(n,r,i),a}catch(e){return V(n,r,i),!1}}(t)||function(e){var t=window.clipboardData;if(void 0!==t&&"function"==typeof t.setData)try{return t.setData("Text",e)}catch(e){return!1}return!1}(t)}function I(){return function(){var t=e("div");if(void 0===t)return null;t.contentEditable="true",globalThis.document.body.appendChild(t),t.focus();var n=null,r=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.getData&&(e.preventDefault(),n=e.clipboardData.getData("text/html")||e.clipboardData.getData("text/plain")||null)}catch(e){}};m.add(globalThis.document,{type:"paste",callback:r,options:{once:!0,capture:!0}});try{return globalThis.document.execCommand("paste")||n||(n=t.innerHTML||t.textContent||null),F(t,r),n}catch(e){return F(t,r),null}}()||function(){var e=window.clipboardData;if(void 0!==e&&"function"==typeof e.getData)try{return e.getData("Text")||null}catch(e){return null}return null}()||""}function V(e,t,n){null!==t&&t.removeAllRanges(),globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"copy",callback:n})}function F(e,t){globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"paste",callback:t})}return function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(f))&&(b.crossPlatformFramework=s.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(b.crossPlatformFramework=s.ReactNative);for(var e=0;e<g.length;e++){var t=(c=g[e])[0],n=c[1],r=c[2];if(null!==(d=b.userAgent.match(t))){b.os={name:n,version:D(d[1],r)};break}}for(b.os.name===o.iOS&&0===function(e,t){for(var n=e.split("."),r=t.split("."),o=Math.max(n.length,r.length),i=0;i<o;i++){var a=void 0,l=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(l=i<r.length?parseInt(r[i],10):0))return 1;if(a<l)return-1}return 0}(b.os.version,"18.6")&&null!==(m=/\) Version\/([\d.]+)/.exec(b.userAgent))&&parseInt(m[1].substring(0,2),10)>=26&&(b.os.version=m[1]),e=0;e<w.length;e++){t=(c=w[e])[0];var a=c[1];r=c[2];if(null!==(d=b.userAgent.match(t))){b.engine={name:a,version:D(d[1],r)};break}}for(e=0;e<y.length;e++){t=(c=y[e])[0];var c,d,u=c[1];r=c[2];if(null!==(d=b.userAgent.match(t))){b.browser={name:u,version:D(d[1],r)};break}}if(b.crossPlatformFramework===s.ReactNative)try{n=(p=require("react-native").Platform).OS;var m=P(v=""+p.Version);switch(n){case"android":b.os={name:o.Android,version:M(m,v)};break;case"ios":b.os={name:o.iOS,version:v};break;case"windows":b.os={name:o.Windows,version:C(m,v)};break;case"macos":b.os={name:o.MacOS,version:v}}}catch(e){}if(b.isNode)try{var v,p=(n=require("os")).platform();m=P(v=n.release());switch(p){case"win32":b.os={name:o.Windows,version:C(m,v)};break;case"darwin":b.os={name:o.MacOS,version:O(m,v)};break;case"android":b.os={name:o.Android,version:v};break;case"linux":/android/i.test(v)&&(b.os={name:o.Android,version:v})}}catch(e){}void 0!==globalThis.document&&(k(),void 0!==globalThis.device?W():globalThis.document.addEventListener("deviceready",W,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(k(),globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){try{for(var t=e.fullVersionList||e.brands||[],n=e.platformVersion,r=e.platform,a=b.browser.name,s=null,c=0;c<t.length;c++){var d=null==(f=t[c])?{brand:"",version:""}:"string"==typeof f?{brand:f,version:""}:{brand:f.brand,version:f.version},u=d.version,m=d.brand;/not.a.brand/i.test(m)||((null===s||/Chrom/.test(s)&&"Chromium"!==m||"Edge"===s&&/WebView2/.test(m))&&(m=T[m]||m,null!==(s=a)&&!/Chrom/.test(s)&&/Chrom/.test(m)||("Chrome"===(a=m)||"Chrome WebView"===a||"Chrome Headless"===a?b.browser.name=l.Chrome:"Edge"===a||"Edge WebView2"===a?b.browser.name=l.Edge:"Opera Mobi"===a&&(b.browser.name=l.Opera),b.browser.version=u),s=m),"Chromium"===m&&(b.engine.version=u))}"string"==typeof n&&(b.os.name===o.Windows?b.os.version=parseInt(n.split(".")[0],10)>=13?"11":"10":b.os.version=n),"string"==typeof r&&(/android/i.test(r)?b.os.name=o.Android:/ios|iphone|ipad/i.test(r)?b.os.name=o.iOS:/windows|win32/i.test(r)?b.os.name=o.Windows:/macos|macintel/i.test(r)&&(b.os.name=o.MacOS)),!0===e.mobile&&(b.device=i.Mobile)}catch(e){}finally{x()}var f})).catch(x)),j()}(),{installed:!1,name:"Clipboard",module:{copy:function(e){var t=function(e){if(function(e){return A(e)&&void 0!==e.innerText}(e))return e.innerHTML;if(function(e){return A(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(t){return""+e}else if("string"!=typeof e)return""+e;return e}(e);if(b.crossPlatformFramework===s.Electron)return function(e){try{var t=require("electron");return new Promise((function(n){try{t.clipboard.writeText(e),t.clipboard.writeHTML(e),n(!0)}catch(e){n(!1)}}))}catch(e){return Promise.resolve(!1)}}(t);if(N()&&("write"in navigator.clipboard||"writeText"in navigator.clipboard))return function(e){try{if("ClipboardItem"in window&&"write"in navigator.clipboard)return navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]).then((function(){return!0})).catch((function(){return!1}));if("writeText"in navigator.clipboard)return navigator.clipboard.writeText(e).then((function(){return!0})).catch((function(){return!1}))}catch(e){return Promise.resolve(!1)}return Promise.resolve(!1)}(t).then((function(e){return!!e||L(t)})).catch((function(){return L(t)}));return Promise.resolve(L(t))},paste:function(){if(b.crossPlatformFramework===s.Electron)return function(){try{var e=require("electron");return new Promise((function(t){try{var n=e.clipboard.readHTML();return t(n?n.replace(/<meta[^>]*\bcharset\b[^>]*>/i,""):e.clipboard.readText()||"")}catch(e){t("")}}))}catch(e){return Promise.resolve("")}}();if(N()&&("read"in navigator.clipboard||"readText"in navigator.clipboard))return function(){try{if("ClipboardItem"in window&&"read"in navigator.clipboard)return navigator.clipboard.read().then((function(e){if(0===e.length)return Promise.resolve(null);for(var t=e[0],n=t.types,r=0;r<n.length;r++)if("text/html"===n[r])return t.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(r=0;r<n.length;r++)if("text/plain"===n[r])return t.getType("text/plain").then((function(e){return e.text()})).catch((function(){return null}));return Promise.resolve(null)})).catch((function(){return null}));if("readText"in navigator.clipboard)return navigator.clipboard.readText().then((function(e){return e})).catch((function(){return null}))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}().then((function(e){return null!==e?e:I()})).catch((function(){return I()}));return Promise.resolve(I())}},Constants:{},Errors:{}}}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Clipboard=t()}(this,(function(){"use strict";function e(e,t){if(void 0===t&&(t=!0),void 0!==globalThis.document){var r=globalThis.document.createElement(e);return"width"in r&&(r.width="0"),"height"in r&&(r.height="0"),"border"in r&&(r.border="0"),"frameBorder"in r&&(r.frameBorder="0"),"scrolling"in r&&(r.scrolling="no"),"cellPadding"in r&&(r.cellPadding="0"),"cellSpacing"in r&&(r.cellSpacing="0"),"frame"in r&&(r.frame="void"),"rules"in r&&(r.rules="none"),"noWrap"in r&&(r.noWrap=!0),r.tabIndex=-1,r.setAttribute("role","presentation"),t?(r.style.width="1px",r.style.height="1px"):(r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.zIndex="-9999",r.style.display="none",r.style.visibility="hidden",r.style.pointerEvents="none"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.padding="0",r.style.margin="0",r.style.border="none",r.style.outline="none",r.style.clip="rect(1px, 1px, 1px, 1px)",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",r}}function t(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n="",o=0;o<t.length-2;o++){var i=t[o];void 0!==i&&(n=n+i.charAt(0).toUpperCase()+i.slice(1))}return n}function r(){this.returnValue=!1}function n(){this.cancelBubble=!0}var o,i,a,l,s,c=/(animation)(start|iteration|end|cancel)|(transition)(start|run|end|cancel)|(fullscreen)(change|error)|(lost|got)(pointer)(capture)|(pointer)(lock)(change|error)|(pointer)(cancel|down|enter|leave|move|out|over|up)/i,d=["","webkit","moz","ms","MS","o","O"],u={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},m={useStd:void 0!==globalThis.document&&"function"==typeof globalThis.document.addEventListener,add:function(e,t){void 0===t&&(t={callback:null,options:!1});var o=t.callback;if(void 0!==e&&null!==o){var i=m.withVender(e,t.type),a=t.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,o,a)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(o)}catch(e){}else try{return e.addListener(i,o)}catch(e){}return"function"==typeof e.attachEvent?o.__ieWrapper?e.attachEvent("on"+i,o.__ieWrapper):e.attachEvent("on"+i,o.__ieWrapper=function(t){void 0===t&&(t=globalThis.event),void 0!==t&&(t.currentTarget=e,"function"!=typeof t.preventDefault&&(t.preventDefault=r),"function"!=typeof t.stopPropagation&&(t.stopPropagation=n),"function"==typeof o?o.call(e,t):o&&"function"==typeof o.handleEvent&&o.handleEvent.call(e,t))}):void 0}},remove:function(e,t){void 0===t&&(t={callback:null,options:!1});var r=t.callback;if(void 0!==e&&null!==r){var n=m.withVender(e,t.type),o=t.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(n,r,o)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(r)}catch(e){}else try{return e.removeListener(n,r)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=r.__ieWrapper;void 0!==i&&(e.detachEvent("on"+n,i),delete r.__ieWrapper)}}},withVender:function(e,r){if(void 0===r)return"";if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(r)>-1)return r;if(void 0!==e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(r)>-1)return r;var n;n=r in u?u[r]:c.test(r)?[r,r.replace(c,t)]:[r];for(var o=0;o<d.length;o++)for(var i=0;i<n.length;i++){var a=d[o]+n[i];if(void 0!==e["on"+a])return a}return""}};!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(o||(o={})),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"}(a||(a={})),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"}(l||(l={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(s||(s={}));var f=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",h="loading",v=[],p=0,g={os:{name:o.Unknown,version:""},engine:{name:a.Unknown,version:""},browser:{name:l.Unknown,version:""},crossPlatformFramework:s.Unknown,userAgent:f,get readyState(){return h},get network(){return function(){var e={isOnline:null,effectiveType:null,type:null,downlink:null,rtt:null,saveData:null};if(void 0!==globalThis.navigator){void 0!==globalThis.navigator.onLine&&(e.isOnline=globalThis.navigator.onLine);var t=globalThis.navigator.connection||globalThis.navigator.mozConnection||globalThis.navigator.webkitConnection;if(void 0!==t)return void 0!==t.effectiveType&&(e.effectiveType=t.effectiveType),void 0!==t.type&&(e.type=t.type),void 0!==t.downlink&&(e.downlink=t.downlink),void 0!==t.rtt&&(e.rtt=t.rtt),void 0!==t.saveData&&(e.saveData=t.saveData),e}if(g.isNode){try{for(var r=require("os").networkInterfaces(),n=Object.keys(r),i=0;i<n.length;i++){for(var a=r[n[i]],l=0;l<a.length;l++){var s=a[l];s.internal||"IPv4"!==s.family||(e.isOnline=!0)}if(e.isOnline)break}}catch(e){}try{var c=require("child_process");if(g.os.name===o.Windows){try{(d=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&d.includes("connected")&&(e.type="wifi")}catch(e){}if(null===e.type)try{(d=c.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(e.type="ethernet")}catch(e){}null===e.type&&(e.type="other")}else if(g.os.name===o.MacOS)try{var d=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),u=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});u.includes("en0")&&d.includes("Wi-Fi")?e.type="wifi":u.includes("en")||d.includes("Ethernet")?e.type="ethernet":e.type="other"}catch(t){e.type="other"}}catch(e){}}return e}()},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(g.crossPlatformFramework===s.ReactNative)try{var t=require("react-native"),r=t.Dimensions,n=t.PixelRatio,o=r.get("screen"),i=r.get("window");return e.innerWidth=o.width,e.innerHeight=o.height,e.outerWidth=i.width,e.outerHeight=i.height,e.scale=n.get(),e}catch(e){}if(g.crossPlatformFramework===s.Electron)try{var a=require("electron"),l=a.screen,c=a.BrowserWindow.getFocusedWindow();if(c){var d=c.getContentSize(),u=c.getSize();e.innerWidth=d[0],e.innerHeight=d[1],e.outerWidth=u[0],e.outerHeight=u[1],e.scale=l.getDisplayMatching(c.getBounds()).scaleFactor}return e}catch(e){}return e}()},get device(){return this.os.name===o.iOS||this.os.name===o.Android?i.Mobile:this.os.name===o.Windows||this.os.name===o.MacOS?i.Desktop:i.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var t=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===t)return"";if(t instanceof WebGLRenderingContext||"getParameter"in t&&"function"==typeof t.getParameter){var r=t.getExtension("WEBGL_debug_renderer_info");return null===r?t.getParameter(t.RENDERER):t.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===i.Mobile},get isDesktop(){return this.device===i.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===o.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 v.push(e)}},b=[[/windows nt (6\.[23]); arm/i,o.Windows,j],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,o.Windows,j],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,o.Windows,j],[/windows nt ?([\d.)]*)(?!.+xbox)/i,o.Windows,j],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,o.Windows,j],[/windows ce\/?([\d.]*)/i,o.Windows,j],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,o.iOS,E],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,o.iOS,E],[/cfnetwork\/.+darwin/i,o.iOS,E],[/mac os x ?([\w. ]*)/i,o.MacOS,E],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,o.MacOS,E],[/droid ([\w.]+)\b.+(android[- ]x86)/i,o.Android],[/android\w*[-\/.; ]?([\d.]*)/i,o.Android]],w=[[/windows.+ edge\/([\w.]+)/i,a.EdgeHTML],[/arkweb\/([\w.]+)/i,a.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,a.Blink],[/presto\/([\w.]+)/i,a.Presto],[/webkit\/([\w.]+)/i,a.WebKit],[/trident\/([\w.]+)/i,a.Trident],[/netfront\/([\w.]+)/i,a.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,a.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,a.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,a.Gecko]],y=[[/\b(?:crmo|crios)\/([\w.]+)/i,l.Chrome],[/webview.+edge\/([\w.]+)/i,l.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,l.Edge],[/opera mini\/([-\w.]+)/i,l.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,l.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,l.Opera],[/opios[\/ ]+([\w.]+)/i,l.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,l.Opera],[/\bopr\/([\w.]+)/i,l.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,l.IE],[/(?:ms|\()ie ([\w.]+)/i,l.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,l.IE],[/\bfocus\/([\w.]+)/i,l.Firefox],[/\bopt\/([\w.]+)/i,l.Opera],[/coast\/([\w.]+)/i,l.Opera],[/fxios\/([\w.-]+)/i,l.Firefox],[/samsungbrowser\/([\w.]+)/i,l.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,l.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,l.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,l.Chrome],[/chrome\/([\w.]+) mobile/i,l.Chrome],[/chrome\/v?([\w.]+)/i,l.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/version\/([\w.,]+) .*safari/i,l.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,l.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,l.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,l.Firefox],[/firefox\/([\w.]+)/i,l.Firefox]],T={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function k(){p--,x()}function x(){if(0===p&&"loading"===h){h="complete";for(var e=0;e<v.length;e++)try{v[e](g)}catch(e){}v.length=0}}function j(e){if(void 0===e)return"";var t={"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!==t?t:e}function E(e){return void 0===e?"":e.replace(/_/g,".")}function S(e,t){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":t}function W(e,t){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:t}function C(e,t){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":t}function O(e,t){return"function"==typeof t?t(e):"string"==typeof t?t:void 0===e?"":e}function P(e){var t=e.split(".");return{major:parseInt(t[0]||"0"),minor:parseInt(t[1]||"0"),build:parseInt(t[2]||"0")}}function D(){if(g.crossPlatformFramework=s.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":g.os={name:o.Android,version:globalThis.device.version};break;case"iOS":g.os={name:o.iOS,version:globalThis.device.version}}k()}function M(e){return null!==e&&"object"==typeof e}function A(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,t=location.hostname;return"https:"===e||"localhost"===t||"127.0.0.1"===t||"[::1]"===t}()&&"undefined"!=typeof navigator&&"clipboard"in navigator}function N(t){return function(t){if(!globalThis.getSelection||!globalThis.document.createRange)return!1;var r=e("div");if(void 0===r)return!1;r.contentEditable="true",r.innerHTML=t,r.style.whiteSpace="pre",r.style.userSelect="text",r.style.setProperty("-webkit-user-select","text"),r.style.setProperty("-moz-user-select","text"),r.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(r);var n=globalThis.getSelection(),o=globalThis.document.createRange(),i=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.setData&&(e.preventDefault(),e.clipboardData.setData("text/html",t),e.clipboardData.setData("text/plain",t))}catch(e){}};m.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===n)return H(r,n,i),!1;n.removeAllRanges(),o.selectNodeContents(r),n.addRange(o);var a=globalThis.document.execCommand("copy");return H(r,n,i),a}catch(e){return H(r,n,i),!1}}(t)||function(e){var t=window.clipboardData;if(void 0!==t&&"function"==typeof t.setData)try{return t.setData("Text",e)}catch(e){return!1}return!1}(t)}function L(){return function(){var t=e("div");if(void 0===t)return null;t.contentEditable="true",globalThis.document.body.appendChild(t),t.focus();var r=null,n=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.getData&&(e.preventDefault(),r=e.clipboardData.getData("text/html")||e.clipboardData.getData("text/plain")||null)}catch(e){}};m.add(globalThis.document,{type:"paste",callback:n,options:{once:!0,capture:!0}});try{return globalThis.document.execCommand("paste")||r||(r=t.innerHTML||t.textContent||null),F(t,n),r}catch(e){return F(t,n),null}}()||function(){var e=window.clipboardData;if(void 0!==e&&"function"==typeof e.getData)try{return e.getData("Text")||null}catch(e){return null}return null}()||""}function H(e,t,r){null!==t&&t.removeAllRanges(),globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"copy",callback:r})}function F(e,t){globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"paste",callback:t})}return function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(f))&&(g.crossPlatformFramework=s.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(g.crossPlatformFramework=s.ReactNative);for(var e=0;e<b.length;e++){var t=(c=b[e])[0],r=c[1],n=c[2];if(null!==(d=g.userAgent.match(t))){g.os={name:r,version:O(d[1],n)};break}}for(g.os.name===o.iOS&&0===function(e,t){for(var r=e.split("."),n=t.split("."),o=Math.max(r.length,n.length),i=0;i<o;i++){var a=void 0,l=void 0;if((a=i<r.length?parseInt(r[i],10):0)>(l=i<n.length?parseInt(n[i],10):0))return 1;if(a<l)return-1}return 0}(g.os.version,"18.6")&&null!==(m=/\) Version\/([\d.]+)/.exec(g.userAgent))&&parseInt(m[1].substring(0,2),10)>=26&&(g.os.version=m[1]),e=0;e<w.length;e++){t=(c=w[e])[0];var a=c[1];n=c[2];if(null!==(d=g.userAgent.match(t))){g.engine={name:a,version:O(d[1],n)};break}}for(e=0;e<y.length;e++){t=(c=y[e])[0];var c,d,u=c[1];n=c[2];if(null!==(d=g.userAgent.match(t))){g.browser={name:u,version:O(d[1],n)};break}}if(g.crossPlatformFramework===s.ReactNative)try{r=(v=require("react-native").Platform).OS;var m=P(h=""+v.Version);switch(r){case"android":g.os={name:o.Android,version:C(m,h)};break;case"ios":g.os={name:o.iOS,version:h};break;case"windows":g.os={name:o.Windows,version:S(m,h)};break;case"macos":g.os={name:o.MacOS,version:h}}}catch(e){}if(g.isNode)try{var h,v=(r=require("os")).platform();m=P(h=r.release());switch(v){case"win32":g.os={name:o.Windows,version:S(m,h)};break;case"darwin":g.os={name:o.MacOS,version:W(m,h)};break;case"android":g.os={name:o.Android,version:h};break;case"linux":/android/i.test(h)&&(g.os={name:o.Android,version:h})}}catch(e){}void 0!==globalThis.document&&(void 0!==globalThis.device?D():globalThis.document.addEventListener("deviceready",D,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(p++,globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){try{for(var t=e.fullVersionList||e.brands||[],r=e.platformVersion,n=e.platform,a=g.browser.name,s=null,c=0;c<t.length;c++){var d=null==(f=t[c])?{brand:"",version:""}:"string"==typeof f?{brand:f,version:""}:{brand:f.brand,version:f.version},u=d.version,m=d.brand;/not.a.brand/i.test(m)||((null===s||/Chrom/.test(s)&&"Chromium"!==m||"Edge"===s&&/WebView2/.test(m))&&(m=T[m]||m,null!==(s=a)&&!/Chrom/.test(s)&&/Chrom/.test(m)||("Chrome"===(a=m)||"Chrome WebView"===a||"Chrome Headless"===a?g.browser.name=l.Chrome:"Edge"===a||"Edge WebView2"===a?g.browser.name=l.Edge:"Opera Mobi"===a&&(g.browser.name=l.Opera),g.browser.version=u),s=m),"Chromium"===m&&(g.engine.version=u))}"string"==typeof r&&(g.os.name===o.Windows?g.os.version=parseInt(r.split(".")[0],10)>=13?"11":"10":g.os.version=r),"string"==typeof n&&(/android/i.test(n)?g.os.name=o.Android:/ios|iphone|ipad/i.test(n)?g.os.name=o.iOS:/windows|win32/i.test(n)?g.os.name=o.Windows:/macos|macintel/i.test(n)&&(g.os.name=o.MacOS)),!0===e.mobile&&(g.device=i.Mobile)}catch(e){}finally{k()}var f})).catch(k)),x()}(),{installed:!1,name:"Clipboard",module:{copy:function(e){var t=function(e){if(function(e){return M(e)&&void 0!==e.innerText}(e))return e.innerHTML;if(function(e){return M(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(t){return""+e}else if("string"!=typeof e)return""+e;return e}(e);if(g.crossPlatformFramework===s.Electron)return function(e){try{var t=require("electron");return new Promise((function(r){try{t.clipboard.writeText(e),t.clipboard.writeHTML(e),r(!0)}catch(e){r(!1)}}))}catch(e){return Promise.resolve(!1)}}(t);if(A()&&("write"in navigator.clipboard||"writeText"in navigator.clipboard))return function(e){try{if("ClipboardItem"in window&&"write"in navigator.clipboard)return navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]).then((function(){return!0})).catch((function(){return!1}));if("writeText"in navigator.clipboard)return navigator.clipboard.writeText(e).then((function(){return!0})).catch((function(){return!1}))}catch(e){return Promise.resolve(!1)}return Promise.resolve(!1)}(t).then((function(e){return!!e||N(t)})).catch((function(){return N(t)}));return Promise.resolve(N(t))},paste:function(){if(g.crossPlatformFramework===s.Electron)return function(){try{var e=require("electron");return new Promise((function(t){try{var r=e.clipboard.readHTML();return t(r?r.replace(/<meta[^>]*\bcharset\b[^>]*>/i,""):e.clipboard.readText()||"")}catch(e){t("")}}))}catch(e){return Promise.resolve("")}}();if(A()&&("read"in navigator.clipboard||"readText"in navigator.clipboard))return function(){try{if("ClipboardItem"in window&&"read"in navigator.clipboard)return navigator.clipboard.read().then((function(e){if(0===e.length)return Promise.resolve(null);for(var t=e[0],r=t.types,n=0;n<r.length;n++)if("text/html"===r[n])return t.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(n=0;n<r.length;n++)if("text/plain"===r[n])return t.getType("text/plain").then((function(e){return e.text()})).catch((function(){return null}));return Promise.resolve(null)})).catch((function(){return null}));if("readText"in navigator.clipboard)return navigator.clipboard.readText().then((function(e){return e})).catch((function(){return null}))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}().then((function(e){return null!==e?e:L()})).catch((function(){return L()}));return Promise.resolve(L())}},Constants:{},Errors:{}}}));
@@ -6,6 +6,7 @@ export declare interface PlatformInstance {
6
6
  device: Devices;
7
7
  crossPlatformFramework: CrossPlatformFramework;
8
8
  network: Network;
9
+ dimension: Dimension;
9
10
  renderer: string;
10
11
  userAgent: string;
11
12
  readyState: 'loading' | 'complete';
@@ -28,3 +29,10 @@ export declare interface Network {
28
29
  rtt: number | null;
29
30
  saveData: boolean | null;
30
31
  }
32
+ export declare interface Dimension {
33
+ outerWidth: number;
34
+ outerHeight: number;
35
+ innerWidth: number;
36
+ innerHeight: number;
37
+ scale: number;
38
+ }
@@ -86,6 +86,9 @@ var Platform = {
86
86
  get network() {
87
87
  return getNetwork();
88
88
  },
89
+ get dimension() {
90
+ return getDimension();
91
+ },
89
92
  get device() {
90
93
  if (this.os.name === OS.iOS || this.os.name === OS.Android)
91
94
  return Devices.Mobile;
@@ -460,6 +463,7 @@ function getNetwork() {
460
463
  network.rtt = connection.rtt;
461
464
  if (typeof connection.saveData !== 'undefined')
462
465
  network.saveData = connection.saveData;
466
+ return network;
463
467
  }
464
468
  }
465
469
  if (Platform.isNode) {
@@ -524,6 +528,61 @@ function getNetwork() {
524
528
  }
525
529
  return network;
526
530
  }
531
+ function getDimension() {
532
+ var dimension = {
533
+ innerWidth: -1,
534
+ innerHeight: -1,
535
+ outerWidth: -1,
536
+ outerHeight: -1,
537
+ scale: 1,
538
+ };
539
+ if (typeof globalThis.innerWidth !== 'undefined') {
540
+ dimension.innerWidth = globalThis.innerWidth;
541
+ dimension.innerHeight = globalThis.innerHeight;
542
+ dimension.outerWidth = globalThis.outerWidth;
543
+ dimension.outerHeight = globalThis.outerHeight;
544
+ dimension.scale = globalThis.devicePixelRatio || 1;
545
+ return dimension;
546
+ }
547
+ if (Platform.crossPlatformFramework === CrossPlatformFramework.ReactNative) {
548
+ try {
549
+ var reactNative = require('react-native');
550
+ var dimensions = reactNative.Dimensions;
551
+ var pixelRatio = reactNative.PixelRatio;
552
+ var screenDimensions = dimensions.get('screen');
553
+ var windowDimensions = dimensions.get('window');
554
+ dimension.innerWidth = screenDimensions.width;
555
+ dimension.innerHeight = screenDimensions.height;
556
+ dimension.outerWidth = windowDimensions.width;
557
+ dimension.outerHeight = windowDimensions.height;
558
+ dimension.scale = pixelRatio.get();
559
+ return dimension;
560
+ }
561
+ catch (_) {
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();
570
+ if (focusedWindow) {
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
+ }
584
+ return dimension;
585
+ }
527
586
  function init() {
528
587
  if ((typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined) || (/ electron\//i.test(USER_AGENT)))
529
588
  Platform.crossPlatformFramework = CrossPlatformFramework.Electron;
@@ -656,7 +715,6 @@ function init() {
656
715
  }
657
716
  }
658
717
  if (typeof globalThis.document !== 'undefined') {
659
- incrementPendingTasks();
660
718
  if (typeof globalThis.device !== 'undefined') {
661
719
  parseOSFromCordova();
662
720
  }
@@ -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{(m=c.execSync("netsh wlan show interfaces",{encoding:"utf8",timeout:5e3})).includes("State")&&m.includes("connected")&&(n.type="wifi")}catch(e){}if(null===n.type)try{(m=c.execSync("ipconfig",{encoding:"utf8",timeout:5e3})).includes("Ethernet adapter")&&(n.type="ethernet")}catch(e){}null===n.type&&(n.type="other")}else if(u.os.name===e.MacOS)try{var m=c.execSync("networksetup -listallhardwareports",{encoding:"utf8",timeout:5e3}),d=c.execSync("route -n get default | grep interface",{encoding:"utf8",timeout:5e3});d.includes("en0")&&m.includes("Wi-Fi")?n.type="wifi":d.includes("en")||m.includes("Ethernet")?n.type="ethernet":n.type="other"}catch(e){n.type="other"}}catch(e){}}return n}()},get device(){return this.os.name===e.iOS||this.os.name===e.Android?n.Mobile:this.os.name===e.Windows||this.os.name===e.MacOS?n.Desktop:n.Unknown},get renderer(){return function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}()},get isMobile(){return this.device===n.Mobile},get isDesktop(){return this.device===n.Desktop},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(this.userAgent)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return this.os.name===e.iOS?"standalone"in globalThis.navigator&&!!globalThis.navigator.standalone:"matchMedia"in globalThis&&globalThis.matchMedia("(display-mode: standalone)").matches},onready:function(e){if("complete"===this.readyState)try{e(this)}catch(e){}else l.push(e)}},c=[[/windows nt (6\.[23]); arm/i,e.Windows,g],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,g],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,g],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,g],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,g],[/windows ce\/?([\d.]*)/i,e.Windows,g],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,h],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,h],[/cfnetwork\/.+darwin/i,e.iOS,h],[/mac os x ?([\w. ]*)/i,e.MacOS,h],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,h],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],m=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],d=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]],f={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"};function b(){s++}function v(){s--,w()}function w(){if(0===s&&"loading"===a){a="complete";for(var e=0;e<l.length;e++)try{l[e](u)}catch(e){}l.length=0}}function g(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function h(e){return void 0===e?"":e.replace(/_/g,".")}function p(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function k(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}function T(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}function E(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function S(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}function F(){if(u.crossPlatformFramework=i.Cordova,void 0!==globalThis.device)switch(globalThis.device.platform){case"Android":u.os={name:e.Android,version:globalThis.device.version};break;case"iOS":u.os={name:e.iOS,version:globalThis.device.version}}v()}!function(){(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(u.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(u.crossPlatformFramework=i.ReactNative);for(var r=0;r<c.length;r++){var a=(h=c[r])[0],l=h[1],s=h[2];if(null!==(y=u.userAgent.match(a))){u.os={name:l,version:E(y[1],s)};break}}for(u.os.name===e.iOS&&0===function(e,n){for(var r=e.split("."),o=n.split("."),i=Math.max(r.length,o.length),t=0;t<i;t++){var a=void 0,l=void 0;if((a=t<r.length?parseInt(r[t],10):0)>(l=t<o.length?parseInt(o[t],10):0))return 1;if(a<l)return-1}return 0}(u.os.version,"18.6")&&null!==(O=/\) Version\/([\d.]+)/.exec(u.userAgent))&&parseInt(O[1].substring(0,2),10)>=26&&(u.os.version=O[1]),r=0;r<m.length;r++){a=(h=m[r])[0];var g=h[1];s=h[2];if(null!==(y=u.userAgent.match(a))){u.engine={name:g,version:E(y[1],s)};break}}for(r=0;r<d.length;r++){a=(h=d[r])[0];var h,y,j=h[1];s=h[2];if(null!==(y=u.userAgent.match(a))){u.browser={name:j,version:E(y[1],s)};break}}if(u.crossPlatformFramework===i.ReactNative)try{l=(M=require("react-native").Platform).OS;var O=S(x=""+M.Version);switch(l){case"android":u.os={name:e.Android,version:T(O,x)};break;case"ios":u.os={name:e.iOS,version:x};break;case"windows":u.os={name:e.Windows,version:p(O,x)};break;case"macos":u.os={name:e.MacOS,version:x}}}catch(e){}if(u.isNode)try{var x,M=(l=require("os")).platform();O=S(x=l.release());switch(M){case"win32":u.os={name:e.Windows,version:p(O,x)};break;case"darwin":u.os={name:e.MacOS,version:k(O,x)};break;case"android":u.os={name:e.Android,version:x};break;case"linux":/android/i.test(x)&&(u.os={name:e.Android,version:x})}}catch(e){}void 0!==globalThis.document&&(b(),void 0!==globalThis.device?F():globalThis.document.addEventListener("deviceready",F,!1)),void 0!==globalThis.navigator&&void 0!==globalThis.navigator.userAgentData&&void 0!==globalThis.navigator.userAgentData.getHighEntropyValues&&(b(),globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){try{for(var i=r.fullVersionList||r.brands||[],t=r.platformVersion,a=r.platform,l=u.browser.name,s=null,c=0;c<i.length;c++){var m=null==(w=i[c])?{brand:"",version:""}:"string"==typeof w?{brand:w,version:""}:{brand:w.brand,version:w.version},d=m.version,b=m.brand;/not.a.brand/i.test(b)||((null===s||/Chrom/.test(s)&&"Chromium"!==b||"Edge"===s&&/WebView2/.test(b))&&(b=f[b]||b,null!==(s=l)&&!/Chrom/.test(s)&&/Chrom/.test(b)||("Chrome"===(l=b)||"Chrome WebView"===l||"Chrome Headless"===l?u.browser.name=o.Chrome:"Edge"===l||"Edge WebView2"===l?u.browser.name=o.Edge:"Opera Mobi"===l&&(u.browser.name=o.Opera),u.browser.version=d),s=b),"Chromium"===b&&(u.engine.version=d))}"string"==typeof t&&(u.os.name===e.Windows?u.os.version=parseInt(t.split(".")[0],10)>=13?"11":"10":u.os.version=t),"string"==typeof a&&(/android/i.test(a)?u.os.name=e.Android:/ios|iphone|ipad/i.test(a)?u.os.name=e.iOS:/windows|win32/i.test(a)?u.os.name=e.Windows:/macos|macintel/i.test(a)&&(u.os.name=e.MacOS)),!0===r.mobile&&(u.device=n.Mobile)}catch(e){}finally{v()}var w})).catch(v)),w()}();var y={get enabled(){return function(){if(u.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===W){if(u.os.name!==e.iOS)return!1;for(var n=globalThis.document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var t=globalThis.document[W.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[W.element]}()},get element(){return N()},get isFullscreen(){return P()},request:L,exit:R,toggle:function(e,n){return P()?R():L(e,n)},onchange:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<n.length;e++)n[e]()}},onerror:function(e){var n=[];return function(r){function o(n){e(n)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(r,o,!1),n.push((function(){globalThis.document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<n.length;e++)n[e]()}}},j=null,O=null,x=null,M=!1,W=function(){if(u.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return C.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=C[o];if(t.enabled in globalThis.document||t.element in globalThis.document||t.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(t.request="webkitRequestFullScreen"),t}if("webkitCurrentFullScreenElement"in globalThis.document){var a={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:C.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),C={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function A(){null!==x&&(O.fullScreenable=x.fullScreenable,O.autoHideMenuBar=x.autoHideMenuBar,x=null),O=null}function q(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function n(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function N(){if(u.crossPlatformFramework===i.Electron){if(null!==O)return O;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||u.os.name===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===W)return j&&j.webkitDisplayingFullscreen?j:null;var t=globalThis.document[W.element];return null!=t?t:null}function P(){return null!==N()}function L(n,r){if(void 0===n&&(n=function(){if(u.crossPlatformFramework===i.Electron){var n=require("electron"),r=n.BrowserWindow.getFocusedWindow();if(null!==r)return r;var o=n.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(u.os.name===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),u.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===O&&(x={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),O=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==W){var t=n[W.request];if("function"==typeof t)try{var a=t.call(n,r);return void 0!==a&&"function"==typeof a.then?void a.then((function(){o()})).catch((function(){u.os.name===e.iOS?l():i()})):void o()}catch(n){if(u.os.name!==e.iOS)return void i()}}function l(){if(u.os.name===e.iOS&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return j=r,q(),r.webkitEnterFullscreen(),void o()}i()}l()}))}function R(){return u.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==O)O.setFullScreen(!1),A();else{var r=N();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==W){var o=globalThis.document[W.exit];if("function"==typeof o){var i=o.call(globalThis.document);return void 0!==i&&"function"==typeof i.then?void i.then((function(){n()})).catch((function(){r()})):void n()}}if(u.os.name===e.iOS&&null!==j){if("function"==typeof j.webkitExitFullscreen&&!0===j.webkitDisplayingFullscreen)return j.webkitExitFullscreen(),j=null,void n();for(var t=globalThis.document.querySelectorAll("video"),a=0;a<t.length;a++){var l=t[a];if("function"==typeof l.webkitExitFullscreen&&!0===l.webkitDisplayingFullscreen)return l.webkitExitFullscreen(),void n()}}N()?r():n()}))}!function(){if(!M){M=!0;var n=!1;if(u.crossPlatformFramework===i.Electron)try{for(var r=require("electron"),o=r.BrowserWindow.getAllWindows(),t=function(e){var n=o[e];n.on("enter-full-screen",(function(){O=n,m()})),n.on("leave-full-screen",(function(){A(),m()}))},a=0;a<o.length;a++)t(a);"function"==typeof r.BrowserWindow.on&&r.BrowserWindow.on("browser-window-created",(function(e,n){n.on("enter-full-screen",(function(){O=n,m()})),n.on("leave-full-screen",(function(){A(),m()}))}))}catch(e){}var l=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],s=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(a=0;a<l.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(l[a],m,!1);for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],d,!1);if(u.os.name===e.iOS)if(q(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){q()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){n||(n=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){n=!1})))}function m(){c("fullscreenchange")}function d(){c("fullscreenerror")}}();var B={installed:!1,name:"Fullscreen",module:y,Constants:{},Errors:{}};module.exports=B;
1
+ "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.getFocusedWindow();if(u){var d=u.getContentSize(),m=u.getSize();e.innerWidth=d[0],e.innerHeight=d[1],e.outerWidth=m[0],e.outerHeight=m[1],e.scale=s.getDisplayMatching(u.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,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](c)}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(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],b=F[2];if(null!==(y=c.userAgent.match(a))){c.os={name:l,version:T(y[1],b)};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 v=F[1];b=F[2];if(null!==(y=c.userAgent.match(a))){c.engine={name:v,version:T(y[1],b)};break}}for(r=0;r<m.length;r++){a=(F=m[r])[0];var F,y,j=F[1];b=F[2];if(null!==(y=c.userAgent.match(a))){c.browser={name:j,version:T(y[1],b)};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==(b=i[u])?{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?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 b})).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;