native-fn 1.0.73 → 1.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.cjs +1 -1
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +1 -1
- package/dist/native.umd.js +1 -1
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +2 -2
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +2 -2
- package/dist/plugin/app/index.umd.js +2 -2
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/appearance/index.cjs +2 -2
- package/dist/plugin/appearance/index.min.cjs +1 -1
- package/dist/plugin/appearance/index.min.mjs +1 -1
- package/dist/plugin/appearance/index.mjs +2 -2
- package/dist/plugin/appearance/index.umd.js +2 -2
- package/dist/plugin/appearance/index.umd.min.js +1 -1
- package/dist/plugin/appearance/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/camera/index.cjs +2 -2
- package/dist/plugin/camera/index.min.cjs +1 -1
- package/dist/plugin/camera/index.min.mjs +1 -1
- package/dist/plugin/camera/index.mjs +2 -2
- package/dist/plugin/camera/index.umd.js +2 -2
- package/dist/plugin/camera/index.umd.min.js +1 -1
- package/dist/plugin/camera/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/clipboard/index.cjs +2 -2
- package/dist/plugin/clipboard/index.min.cjs +1 -1
- package/dist/plugin/clipboard/index.min.mjs +1 -1
- package/dist/plugin/clipboard/index.mjs +2 -2
- package/dist/plugin/clipboard/index.umd.js +2 -2
- package/dist/plugin/clipboard/index.umd.min.js +1 -1
- package/dist/plugin/clipboard/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/fullscreen/index.cjs +2 -2
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +2 -2
- package/dist/plugin/fullscreen/index.umd.js +2 -2
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/platform/index.cjs +2 -2
- package/dist/plugin/platform/index.d.ts +1 -1
- package/dist/plugin/platform/index.min.cjs +1 -1
- package/dist/plugin/platform/index.min.mjs +1 -1
- package/dist/plugin/platform/index.mjs +2 -2
- package/dist/plugin/platform/index.umd.js +2 -2
- package/dist/plugin/platform/index.umd.min.js +1 -1
- package/dist/plugin/platform/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/plugin/theme/index.cjs +2 -2
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +2 -2
- package/dist/plugin/theme/index.umd.js +2 -2
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/plugin/platform/constants/index.d.ts +1 -1
- package/dist/src/plugin/platform/constants/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var o=globalThis.document.createElement(e);return"width"in o&&(o.width="0"),"height"in o&&(o.height="0"),"border"in o&&(o.border="0"),"frameBorder"in o&&(o.frameBorder="0"),"scrolling"in o&&(o.scrolling="no"),"cellPadding"in o&&(o.cellPadding="0"),"cellSpacing"in o&&(o.cellSpacing="0"),"frame"in o&&(o.frame="void"),"rules"in o&&(o.rules="none"),"noWrap"in o&&(o.noWrap=!0),o.tabIndex=-1,o.setAttribute("role","presentation"),r?(o.style.width="1px",o.style.height="1px"):(o.setAttribute("aria-hidden","true"),o.style.width="0",o.style.height="0",o.style.zIndex="-9999",o.style.display="none",o.style.visibility="hidden",o.style.pointerEvents="none"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.padding="0",o.style.margin="0",o.style.border="none",o.style.outline="none",o.style.clip="rect(1px, 1px, 1px, 1px)",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",o}}function r(e){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];for(var t="",n=0;n<r.length-2;n++){var i=r[n];void 0!==i&&(t=t+i.charAt(0).toUpperCase()+i.slice(1))}return t}function o(){this.returnValue=!1}function t(){this.cancelBubble=!0}var n,i,a,s,l,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,u=["","webkit","moz","ms","MS","o","O"],d={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,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var i=m.withVender(e,r.type),a=r.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,n,a)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(n)}catch(e){}else try{return e.addListener(i,n)}catch(e){}return"function"==typeof e.attachEvent?n.__ieWrapper?e.attachEvent("on"+i,n.__ieWrapper):e.attachEvent("on"+i,n.__ieWrapper=function(r){void 0===r&&(r=globalThis.event),void 0!==r&&(r.currentTarget=e,"function"!=typeof r.preventDefault&&(r.preventDefault=o),"function"!=typeof r.stopPropagation&&(r.stopPropagation=t),"function"==typeof n?n.call(e,r):n&&"function"==typeof n.handleEvent&&n.handleEvent.call(e,r))}):void 0}},remove:function(e,r){void 0===r&&(r={callback:null,options:!1});var o=r.callback;if(void 0!==e&&null!==o){var t=m.withVender(e,r.type),n=r.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(t,o,n)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(o)}catch(e){}else try{return e.removeListener(t,o)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=o.__ieWrapper;void 0!==i&&(e.detachEvent("on"+t,i),delete o.__ieWrapper)}}},withVender:function(e,o){if(void 0===o)return"";if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(o)>-1)return o;if(void 0!==e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(o)>-1)return o;var t;t=o in d?d[o]:c.test(o)?[o,o.replace(c,r)]:[o];for(var n=0;n<u.length;n++)for(var i=0;i<t.length;i++){var a=u[n]+t[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"}(n||(n={})),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"}(s||(s={})),function(e){e.NotACrossPlatformFramework="NotACrossPlatformFramework",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(l||(l={}));var f=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",p={device:i.Unknown,os:n.Unknown,engine:a.Unknown,browser:s.Unknown,crossPlatformFramework:l.NotACrossPlatformFramework,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var o=r.getExtension("WEBGL_debug_renderer_info");return null===o?r.getParameter(r.RENDERER):r.getParameter(o.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:f,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(f)},b=[[/windows nt (6\.[23]); arm/i,n.Windows,g],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,n.Windows,g],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,n.Windows,g],[/windows nt ?([\d.)]*)(?!.+xbox)/i,n.Windows,g],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,n.Windows,g],[/windows ce\/?([\d.]*)/i,n.Windows,g],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,n.iOS,w],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,n.iOS,w],[/cfnetwork\/.+darwin/i,n.iOS,w],[/mac os x ?([\w. ]*)/i,n.MacOS,w],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,n.MacOS,w],[/droid ([\w.]+)\b.+(android[- ]x86)/i,n.Android],[/android\w*[-\/.; ]?([\d.]*)/i,n.Android]],v=[[/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]],h=[[/\b(?:crmo|crios)\/([\w.]+)/i,s.Chrome],[/webview.+edge\/([\w.]+)/i,s.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,s.Edge],[/opera mini\/([-\w.]+)/i,s.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,s.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,s.Opera],[/opios[\/ ]+([\w.]+)/i,s.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,s.Opera],[/\bopr\/([\w.]+)/i,s.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,s.IE],[/(?:ms|\()ie ([\w.]+)/i,s.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,s.IE],[/\bfocus\/([\w.]+)/i,s.Firefox],[/\bopt\/([\w.]+)/i,s.Opera],[/coast\/([\w.]+)/i,s.Opera],[/fxios\/([\w.-]+)/i,s.Firefox],[/samsungbrowser\/([\w.]+)/i,s.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,s.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,s.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,s.Chrome],[/chrome\/([\w.]+) mobile/i,s.Chrome],[/chrome\/v?([\w.]+)/i,s.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/version\/([\w.,]+) .*safari/i,s.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,s.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,s.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,s.Firefox],[/firefox\/([\w.]+)/i,s.Firefox]];function g(e){if(void 0===e)return"";var r={"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!==r?r:e}function w(e){return void 0===e?"":e.replace(/_/g,".")}function y(e,r){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":r}function T(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function k(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(f))&&(p.crossPlatformFramework=l.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(p.crossPlatformFramework=l.ReactNative);for(var x=0;x<b.length;x++){var j=(D=b[x])[0],E=D[1],S=D[2];if(null!==(A=p.userAgent.match(j))){p.os=E,p.osVersion=T(A[1],S);break}}p.os===n.iOS&&0===function(e,r){for(var o=e.split("."),t=r.split("."),n=Math.max(o.length,t.length),i=0;i<n;i++){var a=void 0,s=void 0;if((a=i<o.length?parseInt(o[i],10):0)>(s=i<t.length?parseInt(t[i],10):0))return 1;if(a<s)return-1}return 0}(p.osVersion,"18.6")&&(null!==(V=/\) Version\/([\d.]+)/.exec(p.userAgent))&&parseInt(V[1].substring(0,2),10)>=26&&(p.osVersion=V[1]));for(x=0;x<v.length;x++){j=(D=v[x])[0];var P=D[1];S=D[2];if(null!==(A=p.userAgent.match(j))){p.engine=P,p.engineVersion=T(A[1],S);break}}for(x=0;x<h.length;x++){j=(D=h[x])[0];var D,A,C=D[1];S=D[2];if(null!==(A=p.userAgent.match(j))){p.browser=C,p.browserVersion=T(A[1],S);break}}if(p.crossPlatformFramework===l.ReactNative)try{E=(O=require("react-native").Platform).OS;var V=k(M=""+O.Version);switch(E){case"android":p.os=n.Android,p.osVersion=function(e,r){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":r}(V,M);break;case"ios":p.os=n.iOS,p.osVersion=M;break;case"windows":p.os=n.Windows,p.osVersion=y(V,M);break;case"macos":p.os=n.MacOS,p.osVersion=M}}catch(e){}if(p.isNode)try{var M,O=(E=require("os")).platform();V=k(M=E.release());switch(O){case"win32":p.os=n.Windows,p.osVersion=y(V,M);break;case"darwin":p.os=n.MacOS,p.osVersion=function(e,r){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:r}(V,M);break;case"android":p.os=n.Android,p.osVersion=M;break;case"linux":/android/i.test(M)&&(p.os=n.Android,p.osVersion=M)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(p.crossPlatformFramework=l.Cordova,p.os===n.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":p.os=n.Android;break;case"iOS":p.os=n.iOS}p.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var r,o=e.fullVersionList||e.brands||[],t=e.platformVersion,i=0;i<o.length;i++){var a=null==(r=o[i])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,l=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(p.engineVersion=l)}"string"==typeof t&&(p.os===n.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?p.osVersion="11":p.osVersion=t)})),p.device=p.os===n.iOS||p.os===n.Android?i.Mobile:p.os===n.Windows||p.os===n.MacOS?i.Desktop:i.Unknown,p.isMobile=p.device===i.Mobile,p.isDesktop=p.device===i.Desktop,p.isStandalone=function(e){return"matchMedia"in globalThis&&(e===n.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(p.os);var N={copy:function(e){var r=function(e){if(function(e){return W(e)&&void 0!==e.innerText}(e))return e.innerHTML;if(function(e){return W(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(r){return""+e}else if("string"!=typeof e)return""+e;return e}(e);if(p.crossPlatformFramework===l.Electron)return function(e){try{var r=require("electron");return new Promise((function(o){try{r.clipboard.writeText(e),r.clipboard.writeHTML(e),o(!0)}catch(e){o(!1)}}))}catch(e){return Promise.resolve(!1)}}(r);if(L()&&("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)}(r).then((function(e){return!!e||F(r)})).catch((function(){return F(r)}));return Promise.resolve(F(r))},paste:function(){if(p.crossPlatformFramework===l.Electron)return function(){try{var e=require("electron");return new Promise((function(r){try{var o=e.clipboard.readHTML();return r(o?o.replace(/<meta[^>]*\bcharset\b[^>]*>/i,""):e.clipboard.readText()||"")}catch(e){r("")}}))}catch(e){return Promise.resolve("")}}();if(L()&&("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 r=e[0],o=r.types,t=0;t<o.length;t++)if("text/html"===o[t])return r.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(t=0;t<o.length;t++)if("text/plain"===o[t])return r.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())}};function W(e){return null!==e&&"object"==typeof e}function L(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,r=location.hostname;return"https:"===e||"localhost"===r||"127.0.0.1"===r||"[::1]"===r}()&&"undefined"!=typeof navigator&&"clipboard"in navigator}function F(r){return function(r){if(!globalThis.getSelection||!globalThis.document.createRange)return!1;var o=e("div");if(void 0===o)return!1;o.contentEditable="true",o.innerHTML=r,o.style.whiteSpace="pre",o.style.userSelect="text",o.style.setProperty("-webkit-user-select","text"),o.style.setProperty("-moz-user-select","text"),o.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(o);var t=globalThis.getSelection(),n=globalThis.document.createRange(),i=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.setData&&(e.preventDefault(),e.clipboardData.setData("text/html",r),e.clipboardData.setData("text/plain",r))}catch(e){}};m.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===t)return R(o,t,i),!1;t.removeAllRanges(),n.selectNodeContents(o),t.addRange(n);var a=globalThis.document.execCommand("copy");return R(o,t,i),a}catch(e){return R(o,t,i),!1}}(r)||function(e){var r=window.clipboardData;if(void 0!==r&&"function"==typeof r.setData)try{return r.setData("Text",e)}catch(e){return!1}return!1}(r)}function I(){return function(){var r=e("div");if(void 0===r)return null;r.contentEditable="true",globalThis.document.body.appendChild(r),r.focus();var o=null,t=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.getData&&(e.preventDefault(),o=e.clipboardData.getData("text/html")||e.clipboardData.getData("text/plain")||null)}catch(e){}};m.add(globalThis.document,{type:"paste",callback:t,options:{once:!0,capture:!0}});try{return globalThis.document.execCommand("paste")||o||(o=r.innerHTML||r.textContent||null),_(r,t),o}catch(e){return _(r,t),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 R(e,r,o){null!==r&&r.removeAllRanges(),globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"copy",callback:o})}function _(e,r){globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"paste",callback:r})}var U={installed:!1,name:"Clipboard",module:N,Constants:{},Errors:{}};module.exports=U;
|
|
1
|
+
"use strict";function e(e,r){if(void 0===r&&(r=!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"),r?(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 r(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];for(var o="",t=0;t<r.length-2;t++){var i=r[t];void 0!==i&&(o=o+i.charAt(0).toUpperCase()+i.slice(1))}return o}function n(){this.returnValue=!1}function o(){this.cancelBubble=!0}var t,i,a,s,l,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,u=["","webkit","moz","ms","MS","o","O"],d={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,r){void 0===r&&(r={callback:null,options:!1});var t=r.callback;if(void 0!==e&&null!==t){var i=m.withVender(e,r.type),a=r.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,t,a)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(t)}catch(e){}else try{return e.addListener(i,t)}catch(e){}return"function"==typeof e.attachEvent?t.__ieWrapper?e.attachEvent("on"+i,t.__ieWrapper):e.attachEvent("on"+i,t.__ieWrapper=function(r){void 0===r&&(r=globalThis.event),void 0!==r&&(r.currentTarget=e,"function"!=typeof r.preventDefault&&(r.preventDefault=n),"function"!=typeof r.stopPropagation&&(r.stopPropagation=o),"function"==typeof t?t.call(e,r):t&&"function"==typeof t.handleEvent&&t.handleEvent.call(e,r))}):void 0}},remove:function(e,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var o=m.withVender(e,r.type),t=r.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(o,n,t)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(n)}catch(e){}else try{return e.removeListener(o,n)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=n.__ieWrapper;void 0!==i&&(e.detachEvent("on"+o,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 o;o=n in d?d[n]:c.test(n)?[n,n.replace(c,r)]:[n];for(var t=0;t<u.length;t++)for(var i=0;i<o.length;i++){var a=u[t]+o[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"}(t||(t={})),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"}(s||(s={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(l||(l={}));var f=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",p={device:i.Unknown,os:t.Unknown,engine:a.Unknown,browser:s.Unknown,crossPlatformFramework:l.Unknown,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:f,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(f)},b=[[/windows nt (6\.[23]); arm/i,t.Windows,g],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,t.Windows,g],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,t.Windows,g],[/windows nt ?([\d.)]*)(?!.+xbox)/i,t.Windows,g],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,t.Windows,g],[/windows ce\/?([\d.]*)/i,t.Windows,g],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,t.iOS,w],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,t.iOS,w],[/cfnetwork\/.+darwin/i,t.iOS,w],[/mac os x ?([\w. ]*)/i,t.MacOS,w],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,t.MacOS,w],[/droid ([\w.]+)\b.+(android[- ]x86)/i,t.Android],[/android\w*[-\/.; ]?([\d.]*)/i,t.Android]],v=[[/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]],h=[[/\b(?:crmo|crios)\/([\w.]+)/i,s.Chrome],[/webview.+edge\/([\w.]+)/i,s.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,s.Edge],[/opera mini\/([-\w.]+)/i,s.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,s.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,s.Opera],[/opios[\/ ]+([\w.]+)/i,s.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,s.Opera],[/\bopr\/([\w.]+)/i,s.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,s.IE],[/(?:ms|\()ie ([\w.]+)/i,s.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,s.IE],[/\bfocus\/([\w.]+)/i,s.Firefox],[/\bopt\/([\w.]+)/i,s.Opera],[/coast\/([\w.]+)/i,s.Opera],[/fxios\/([\w.-]+)/i,s.Firefox],[/samsungbrowser\/([\w.]+)/i,s.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,s.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,s.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,s.Chrome],[/chrome\/([\w.]+) mobile/i,s.Chrome],[/chrome\/v?([\w.]+)/i,s.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/version\/([\w.,]+) .*safari/i,s.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,s.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,s.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,s.Firefox],[/firefox\/([\w.]+)/i,s.Firefox]];function g(e){if(void 0===e)return"";var r={"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!==r?r:e}function w(e){return void 0===e?"":e.replace(/_/g,".")}function y(e,r){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":r}function T(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function k(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(f))&&(p.crossPlatformFramework=l.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(p.crossPlatformFramework=l.ReactNative);for(var x=0;x<b.length;x++){var j=(D=b[x])[0],E=D[1],S=D[2];if(null!==(V=p.userAgent.match(j))){p.os=E,p.osVersion=T(V[1],S);break}}p.os===t.iOS&&0===function(e,r){for(var n=e.split("."),o=r.split("."),t=Math.max(n.length,o.length),i=0;i<t;i++){var a=void 0,s=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(s=i<o.length?parseInt(o[i],10):0))return 1;if(a<s)return-1}return 0}(p.osVersion,"18.6")&&(null!==(O=/\) Version\/([\d.]+)/.exec(p.userAgent))&&parseInt(O[1].substring(0,2),10)>=26&&(p.osVersion=O[1]));for(x=0;x<v.length;x++){j=(D=v[x])[0];var P=D[1];S=D[2];if(null!==(V=p.userAgent.match(j))){p.engine=P,p.engineVersion=T(V[1],S);break}}for(x=0;x<h.length;x++){j=(D=h[x])[0];var D,V,M=D[1];S=D[2];if(null!==(V=p.userAgent.match(j))){p.browser=M,p.browserVersion=T(V[1],S);break}}if(p.crossPlatformFramework===l.ReactNative)try{E=(C=require("react-native").Platform).OS;var O=k(A=""+C.Version);switch(E){case"android":p.os=t.Android,p.osVersion=function(e,r){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":r}(O,A);break;case"ios":p.os=t.iOS,p.osVersion=A;break;case"windows":p.os=t.Windows,p.osVersion=y(O,A);break;case"macos":p.os=t.MacOS,p.osVersion=A}}catch(e){}if(p.isNode)try{var A,C=(E=require("os")).platform();O=k(A=E.release());switch(C){case"win32":p.os=t.Windows,p.osVersion=y(O,A);break;case"darwin":p.os=t.MacOS,p.osVersion=function(e,r){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:r}(O,A);break;case"android":p.os=t.Android,p.osVersion=A;break;case"linux":/android/i.test(A)&&(p.os=t.Android,p.osVersion=A)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(p.crossPlatformFramework=l.Cordova,p.os===t.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":p.os=t.Android;break;case"iOS":p.os=t.iOS}p.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var r,n=e.fullVersionList||e.brands||[],o=e.platformVersion,i=0;i<n.length;i++){var a=null==(r=n[i])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,l=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(p.engineVersion=l)}"string"==typeof o&&(p.os===t.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?p.osVersion="11":p.osVersion=o)})),p.device=p.os===t.iOS||p.os===t.Android?i.Mobile:p.os===t.Windows||p.os===t.MacOS?i.Desktop:i.Unknown,p.isMobile=p.device===i.Mobile,p.isDesktop=p.device===i.Desktop,p.isStandalone=function(e){return"matchMedia"in globalThis&&(e===t.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(p.os);var N={copy:function(e){var r=function(e){if(function(e){return W(e)&&void 0!==e.innerText}(e))return e.innerHTML;if(function(e){return W(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(r){return""+e}else if("string"!=typeof e)return""+e;return e}(e);if(p.crossPlatformFramework===l.Electron)return function(e){try{var r=require("electron");return new Promise((function(n){try{r.clipboard.writeText(e),r.clipboard.writeHTML(e),n(!0)}catch(e){n(!1)}}))}catch(e){return Promise.resolve(!1)}}(r);if(L()&&("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)}(r).then((function(e){return!!e||I(r)})).catch((function(){return I(r)}));return Promise.resolve(I(r))},paste:function(){if(p.crossPlatformFramework===l.Electron)return function(){try{var e=require("electron");return new Promise((function(r){try{var n=e.clipboard.readHTML();return r(n?n.replace(/<meta[^>]*\bcharset\b[^>]*>/i,""):e.clipboard.readText()||"")}catch(e){r("")}}))}catch(e){return Promise.resolve("")}}();if(L()&&("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 r=e[0],n=r.types,o=0;o<n.length;o++)if("text/html"===n[o])return r.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(o=0;o<n.length;o++)if("text/plain"===n[o])return r.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:F()})).catch((function(){return F()}));return Promise.resolve(F())}};function W(e){return null!==e&&"object"==typeof e}function L(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,r=location.hostname;return"https:"===e||"localhost"===r||"127.0.0.1"===r||"[::1]"===r}()&&"undefined"!=typeof navigator&&"clipboard"in navigator}function I(r){return function(r){if(!globalThis.getSelection||!globalThis.document.createRange)return!1;var n=e("div");if(void 0===n)return!1;n.contentEditable="true",n.innerHTML=r,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 o=globalThis.getSelection(),t=globalThis.document.createRange(),i=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.setData&&(e.preventDefault(),e.clipboardData.setData("text/html",r),e.clipboardData.setData("text/plain",r))}catch(e){}};m.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===o)return R(n,o,i),!1;o.removeAllRanges(),t.selectNodeContents(n),o.addRange(t);var a=globalThis.document.execCommand("copy");return R(n,o,i),a}catch(e){return R(n,o,i),!1}}(r)||function(e){var r=window.clipboardData;if(void 0!==r&&"function"==typeof r.setData)try{return r.setData("Text",e)}catch(e){return!1}return!1}(r)}function F(){return function(){var r=e("div");if(void 0===r)return null;r.contentEditable="true",globalThis.document.body.appendChild(r),r.focus();var n=null,o=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:o,options:{once:!0,capture:!0}});try{return globalThis.document.execCommand("paste")||n||(n=r.innerHTML||r.textContent||null),U(r,o),n}catch(e){return U(r,o),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 R(e,r,n){null!==r&&r.removeAllRanges(),globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"copy",callback:n})}function U(e,r){globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"paste",callback:r})}var _={installed:!1,name:"Clipboard",module:N,Constants:{},Errors:{}};module.exports=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var o=globalThis.document.createElement(e);return"width"in o&&(o.width="0"),"height"in o&&(o.height="0"),"border"in o&&(o.border="0"),"frameBorder"in o&&(o.frameBorder="0"),"scrolling"in o&&(o.scrolling="no"),"cellPadding"in o&&(o.cellPadding="0"),"cellSpacing"in o&&(o.cellSpacing="0"),"frame"in o&&(o.frame="void"),"rules"in o&&(o.rules="none"),"noWrap"in o&&(o.noWrap=!0),o.tabIndex=-1,o.setAttribute("role","presentation"),r?(o.style.width="1px",o.style.height="1px"):(o.setAttribute("aria-hidden","true"),o.style.width="0",o.style.height="0",o.style.zIndex="-9999",o.style.display="none",o.style.visibility="hidden",o.style.pointerEvents="none"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.padding="0",o.style.margin="0",o.style.border="none",o.style.outline="none",o.style.clip="rect(1px, 1px, 1px, 1px)",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",o}}function r(e){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];for(var t="",n=0;n<r.length-2;n++){var i=r[n];void 0!==i&&(t=t+i.charAt(0).toUpperCase()+i.slice(1))}return t}function o(){this.returnValue=!1}function t(){this.cancelBubble=!0}var n,i,a,s,l,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,u=["","webkit","moz","ms","MS","o","O"],d={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,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var i=m.withVender(e,r.type),a=r.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,n,a)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(n)}catch(e){}else try{return e.addListener(i,n)}catch(e){}return"function"==typeof e.attachEvent?n.__ieWrapper?e.attachEvent("on"+i,n.__ieWrapper):e.attachEvent("on"+i,n.__ieWrapper=function(r){void 0===r&&(r=globalThis.event),void 0!==r&&(r.currentTarget=e,"function"!=typeof r.preventDefault&&(r.preventDefault=o),"function"!=typeof r.stopPropagation&&(r.stopPropagation=t),"function"==typeof n?n.call(e,r):n&&"function"==typeof n.handleEvent&&n.handleEvent.call(e,r))}):void 0}},remove:function(e,r){void 0===r&&(r={callback:null,options:!1});var o=r.callback;if(void 0!==e&&null!==o){var t=m.withVender(e,r.type),n=r.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(t,o,n)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(o)}catch(e){}else try{return e.removeListener(t,o)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=o.__ieWrapper;void 0!==i&&(e.detachEvent("on"+t,i),delete o.__ieWrapper)}}},withVender:function(e,o){if(void 0===o)return"";if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(o)>-1)return o;if(void 0!==e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(o)>-1)return o;var t;t=o in d?d[o]:c.test(o)?[o,o.replace(c,r)]:[o];for(var n=0;n<u.length;n++)for(var i=0;i<t.length;i++){var a=u[n]+t[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"}(n||(n={})),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"}(s||(s={})),function(e){e.NotACrossPlatformFramework="NotACrossPlatformFramework",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(l||(l={}));var f=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",p={device:i.Unknown,os:n.Unknown,engine:a.Unknown,browser:s.Unknown,crossPlatformFramework:l.NotACrossPlatformFramework,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var o=r.getExtension("WEBGL_debug_renderer_info");return null===o?r.getParameter(r.RENDERER):r.getParameter(o.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:f,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(f)},b=[[/windows nt (6\.[23]); arm/i,n.Windows,g],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,n.Windows,g],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,n.Windows,g],[/windows nt ?([\d.)]*)(?!.+xbox)/i,n.Windows,g],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,n.Windows,g],[/windows ce\/?([\d.]*)/i,n.Windows,g],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,n.iOS,w],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,n.iOS,w],[/cfnetwork\/.+darwin/i,n.iOS,w],[/mac os x ?([\w. ]*)/i,n.MacOS,w],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,n.MacOS,w],[/droid ([\w.]+)\b.+(android[- ]x86)/i,n.Android],[/android\w*[-\/.; ]?([\d.]*)/i,n.Android]],v=[[/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]],h=[[/\b(?:crmo|crios)\/([\w.]+)/i,s.Chrome],[/webview.+edge\/([\w.]+)/i,s.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,s.Edge],[/opera mini\/([-\w.]+)/i,s.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,s.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,s.Opera],[/opios[\/ ]+([\w.]+)/i,s.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,s.Opera],[/\bopr\/([\w.]+)/i,s.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,s.IE],[/(?:ms|\()ie ([\w.]+)/i,s.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,s.IE],[/\bfocus\/([\w.]+)/i,s.Firefox],[/\bopt\/([\w.]+)/i,s.Opera],[/coast\/([\w.]+)/i,s.Opera],[/fxios\/([\w.-]+)/i,s.Firefox],[/samsungbrowser\/([\w.]+)/i,s.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,s.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,s.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,s.Chrome],[/chrome\/([\w.]+) mobile/i,s.Chrome],[/chrome\/v?([\w.]+)/i,s.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/version\/([\w.,]+) .*safari/i,s.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,s.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,s.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,s.Firefox],[/firefox\/([\w.]+)/i,s.Firefox]];function g(e){if(void 0===e)return"";var r={"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!==r?r:e}function w(e){return void 0===e?"":e.replace(/_/g,".")}function y(e,r){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":r}function T(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function k(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(f))&&(p.crossPlatformFramework=l.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(p.crossPlatformFramework=l.ReactNative);for(var x=0;x<b.length;x++){var j=(D=b[x])[0],E=D[1],S=D[2];if(null!==(A=p.userAgent.match(j))){p.os=E,p.osVersion=T(A[1],S);break}}p.os===n.iOS&&0===function(e,r){for(var o=e.split("."),t=r.split("."),n=Math.max(o.length,t.length),i=0;i<n;i++){var a=void 0,s=void 0;if((a=i<o.length?parseInt(o[i],10):0)>(s=i<t.length?parseInt(t[i],10):0))return 1;if(a<s)return-1}return 0}(p.osVersion,"18.6")&&(null!==(V=/\) Version\/([\d.]+)/.exec(p.userAgent))&&parseInt(V[1].substring(0,2),10)>=26&&(p.osVersion=V[1]));for(x=0;x<v.length;x++){j=(D=v[x])[0];var P=D[1];S=D[2];if(null!==(A=p.userAgent.match(j))){p.engine=P,p.engineVersion=T(A[1],S);break}}for(x=0;x<h.length;x++){j=(D=h[x])[0];var D,A,C=D[1];S=D[2];if(null!==(A=p.userAgent.match(j))){p.browser=C,p.browserVersion=T(A[1],S);break}}if(p.crossPlatformFramework===l.ReactNative)try{E=(O=require("react-native").Platform).OS;var V=k(M=""+O.Version);switch(E){case"android":p.os=n.Android,p.osVersion=function(e,r){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":r}(V,M);break;case"ios":p.os=n.iOS,p.osVersion=M;break;case"windows":p.os=n.Windows,p.osVersion=y(V,M);break;case"macos":p.os=n.MacOS,p.osVersion=M}}catch(e){}if(p.isNode)try{var M,O=(E=require("os")).platform();V=k(M=E.release());switch(O){case"win32":p.os=n.Windows,p.osVersion=y(V,M);break;case"darwin":p.os=n.MacOS,p.osVersion=function(e,r){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:r}(V,M);break;case"android":p.os=n.Android,p.osVersion=M;break;case"linux":/android/i.test(M)&&(p.os=n.Android,p.osVersion=M)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(p.crossPlatformFramework=l.Cordova,p.os===n.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":p.os=n.Android;break;case"iOS":p.os=n.iOS}p.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var r,o=e.fullVersionList||e.brands||[],t=e.platformVersion,i=0;i<o.length;i++){var a=null==(r=o[i])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,l=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(p.engineVersion=l)}"string"==typeof t&&(p.os===n.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?p.osVersion="11":p.osVersion=t)})),p.device=p.os===n.iOS||p.os===n.Android?i.Mobile:p.os===n.Windows||p.os===n.MacOS?i.Desktop:i.Unknown,p.isMobile=p.device===i.Mobile,p.isDesktop=p.device===i.Desktop,p.isStandalone=function(e){return"matchMedia"in globalThis&&(e===n.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(p.os);var N={copy:function(e){var r=function(e){if(function(e){return W(e)&&void 0!==e.innerText}(e))return e.innerHTML;if(function(e){return W(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(r){return""+e}else if("string"!=typeof e)return""+e;return e}(e);if(p.crossPlatformFramework===l.Electron)return function(e){try{var r=require("electron");return new Promise((function(o){try{r.clipboard.writeText(e),r.clipboard.writeHTML(e),o(!0)}catch(e){o(!1)}}))}catch(e){return Promise.resolve(!1)}}(r);if(L()&&("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)}(r).then((function(e){return!!e||F(r)})).catch((function(){return F(r)}));return Promise.resolve(F(r))},paste:function(){if(p.crossPlatformFramework===l.Electron)return function(){try{var e=require("electron");return new Promise((function(r){try{var o=e.clipboard.readHTML();return r(o?o.replace(/<meta[^>]*\bcharset\b[^>]*>/i,""):e.clipboard.readText()||"")}catch(e){r("")}}))}catch(e){return Promise.resolve("")}}();if(L()&&("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 r=e[0],o=r.types,t=0;t<o.length;t++)if("text/html"===o[t])return r.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(t=0;t<o.length;t++)if("text/plain"===o[t])return r.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())}};function W(e){return null!==e&&"object"==typeof e}function L(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,r=location.hostname;return"https:"===e||"localhost"===r||"127.0.0.1"===r||"[::1]"===r}()&&"undefined"!=typeof navigator&&"clipboard"in navigator}function F(r){return function(r){if(!globalThis.getSelection||!globalThis.document.createRange)return!1;var o=e("div");if(void 0===o)return!1;o.contentEditable="true",o.innerHTML=r,o.style.whiteSpace="pre",o.style.userSelect="text",o.style.setProperty("-webkit-user-select","text"),o.style.setProperty("-moz-user-select","text"),o.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(o);var t=globalThis.getSelection(),n=globalThis.document.createRange(),i=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.setData&&(e.preventDefault(),e.clipboardData.setData("text/html",r),e.clipboardData.setData("text/plain",r))}catch(e){}};m.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===t)return R(o,t,i),!1;t.removeAllRanges(),n.selectNodeContents(o),t.addRange(n);var a=globalThis.document.execCommand("copy");return R(o,t,i),a}catch(e){return R(o,t,i),!1}}(r)||function(e){var r=window.clipboardData;if(void 0!==r&&"function"==typeof r.setData)try{return r.setData("Text",e)}catch(e){return!1}return!1}(r)}function I(){return function(){var r=e("div");if(void 0===r)return null;r.contentEditable="true",globalThis.document.body.appendChild(r),r.focus();var o=null,t=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.getData&&(e.preventDefault(),o=e.clipboardData.getData("text/html")||e.clipboardData.getData("text/plain")||null)}catch(e){}};m.add(globalThis.document,{type:"paste",callback:t,options:{once:!0,capture:!0}});try{return globalThis.document.execCommand("paste")||o||(o=r.innerHTML||r.textContent||null),_(r,t),o}catch(e){return _(r,t),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 R(e,r,o){null!==r&&r.removeAllRanges(),globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"copy",callback:o})}function _(e,r){globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"paste",callback:r})}var U={installed:!1,name:"Clipboard",module:N,Constants:{},Errors:{}};export{U as default};
|
|
1
|
+
function e(e,r){if(void 0===r&&(r=!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"),r?(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 r(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];for(var o="",t=0;t<r.length-2;t++){var i=r[t];void 0!==i&&(o=o+i.charAt(0).toUpperCase()+i.slice(1))}return o}function n(){this.returnValue=!1}function o(){this.cancelBubble=!0}var t,i,a,s,l,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,u=["","webkit","moz","ms","MS","o","O"],d={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,r){void 0===r&&(r={callback:null,options:!1});var t=r.callback;if(void 0!==e&&null!==t){var i=m.withVender(e,r.type),a=r.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,t,a)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(t)}catch(e){}else try{return e.addListener(i,t)}catch(e){}return"function"==typeof e.attachEvent?t.__ieWrapper?e.attachEvent("on"+i,t.__ieWrapper):e.attachEvent("on"+i,t.__ieWrapper=function(r){void 0===r&&(r=globalThis.event),void 0!==r&&(r.currentTarget=e,"function"!=typeof r.preventDefault&&(r.preventDefault=n),"function"!=typeof r.stopPropagation&&(r.stopPropagation=o),"function"==typeof t?t.call(e,r):t&&"function"==typeof t.handleEvent&&t.handleEvent.call(e,r))}):void 0}},remove:function(e,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var o=m.withVender(e,r.type),t=r.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(o,n,t)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(n)}catch(e){}else try{return e.removeListener(o,n)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=n.__ieWrapper;void 0!==i&&(e.detachEvent("on"+o,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 o;o=n in d?d[n]:c.test(n)?[n,n.replace(c,r)]:[n];for(var t=0;t<u.length;t++)for(var i=0;i<o.length;i++){var a=u[t]+o[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"}(t||(t={})),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"}(s||(s={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(l||(l={}));var f=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",p={device:i.Unknown,os:t.Unknown,engine:a.Unknown,browser:s.Unknown,crossPlatformFramework:l.Unknown,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:f,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(f)},b=[[/windows nt (6\.[23]); arm/i,t.Windows,g],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,t.Windows,g],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,t.Windows,g],[/windows nt ?([\d.)]*)(?!.+xbox)/i,t.Windows,g],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,t.Windows,g],[/windows ce\/?([\d.]*)/i,t.Windows,g],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,t.iOS,w],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,t.iOS,w],[/cfnetwork\/.+darwin/i,t.iOS,w],[/mac os x ?([\w. ]*)/i,t.MacOS,w],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,t.MacOS,w],[/droid ([\w.]+)\b.+(android[- ]x86)/i,t.Android],[/android\w*[-\/.; ]?([\d.]*)/i,t.Android]],v=[[/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]],h=[[/\b(?:crmo|crios)\/([\w.]+)/i,s.Chrome],[/webview.+edge\/([\w.]+)/i,s.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,s.Edge],[/opera mini\/([-\w.]+)/i,s.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,s.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,s.Opera],[/opios[\/ ]+([\w.]+)/i,s.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,s.Opera],[/\bopr\/([\w.]+)/i,s.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,s.IE],[/(?:ms|\()ie ([\w.]+)/i,s.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,s.IE],[/\bfocus\/([\w.]+)/i,s.Firefox],[/\bopt\/([\w.]+)/i,s.Opera],[/coast\/([\w.]+)/i,s.Opera],[/fxios\/([\w.-]+)/i,s.Firefox],[/samsungbrowser\/([\w.]+)/i,s.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,s.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,s.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,s.Chrome],[/chrome\/([\w.]+) mobile/i,s.Chrome],[/chrome\/v?([\w.]+)/i,s.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/version\/([\w.,]+) .*safari/i,s.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,s.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,s.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,s.Firefox],[/firefox\/([\w.]+)/i,s.Firefox]];function g(e){if(void 0===e)return"";var r={"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!==r?r:e}function w(e){return void 0===e?"":e.replace(/_/g,".")}function y(e,r){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":r}function T(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function k(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(f))&&(p.crossPlatformFramework=l.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(p.crossPlatformFramework=l.ReactNative);for(var x=0;x<b.length;x++){var j=(D=b[x])[0],E=D[1],S=D[2];if(null!==(V=p.userAgent.match(j))){p.os=E,p.osVersion=T(V[1],S);break}}p.os===t.iOS&&0===function(e,r){for(var n=e.split("."),o=r.split("."),t=Math.max(n.length,o.length),i=0;i<t;i++){var a=void 0,s=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(s=i<o.length?parseInt(o[i],10):0))return 1;if(a<s)return-1}return 0}(p.osVersion,"18.6")&&(null!==(O=/\) Version\/([\d.]+)/.exec(p.userAgent))&&parseInt(O[1].substring(0,2),10)>=26&&(p.osVersion=O[1]));for(x=0;x<v.length;x++){j=(D=v[x])[0];var P=D[1];S=D[2];if(null!==(V=p.userAgent.match(j))){p.engine=P,p.engineVersion=T(V[1],S);break}}for(x=0;x<h.length;x++){j=(D=h[x])[0];var D,V,M=D[1];S=D[2];if(null!==(V=p.userAgent.match(j))){p.browser=M,p.browserVersion=T(V[1],S);break}}if(p.crossPlatformFramework===l.ReactNative)try{E=(C=require("react-native").Platform).OS;var O=k(A=""+C.Version);switch(E){case"android":p.os=t.Android,p.osVersion=function(e,r){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":r}(O,A);break;case"ios":p.os=t.iOS,p.osVersion=A;break;case"windows":p.os=t.Windows,p.osVersion=y(O,A);break;case"macos":p.os=t.MacOS,p.osVersion=A}}catch(e){}if(p.isNode)try{var A,C=(E=require("os")).platform();O=k(A=E.release());switch(C){case"win32":p.os=t.Windows,p.osVersion=y(O,A);break;case"darwin":p.os=t.MacOS,p.osVersion=function(e,r){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:r}(O,A);break;case"android":p.os=t.Android,p.osVersion=A;break;case"linux":/android/i.test(A)&&(p.os=t.Android,p.osVersion=A)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(p.crossPlatformFramework=l.Cordova,p.os===t.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":p.os=t.Android;break;case"iOS":p.os=t.iOS}p.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var r,n=e.fullVersionList||e.brands||[],o=e.platformVersion,i=0;i<n.length;i++){var a=null==(r=n[i])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,l=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(p.engineVersion=l)}"string"==typeof o&&(p.os===t.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?p.osVersion="11":p.osVersion=o)})),p.device=p.os===t.iOS||p.os===t.Android?i.Mobile:p.os===t.Windows||p.os===t.MacOS?i.Desktop:i.Unknown,p.isMobile=p.device===i.Mobile,p.isDesktop=p.device===i.Desktop,p.isStandalone=function(e){return"matchMedia"in globalThis&&(e===t.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(p.os);var N={copy:function(e){var r=function(e){if(function(e){return W(e)&&void 0!==e.innerText}(e))return e.innerHTML;if(function(e){return W(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(r){return""+e}else if("string"!=typeof e)return""+e;return e}(e);if(p.crossPlatformFramework===l.Electron)return function(e){try{var r=require("electron");return new Promise((function(n){try{r.clipboard.writeText(e),r.clipboard.writeHTML(e),n(!0)}catch(e){n(!1)}}))}catch(e){return Promise.resolve(!1)}}(r);if(L()&&("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)}(r).then((function(e){return!!e||I(r)})).catch((function(){return I(r)}));return Promise.resolve(I(r))},paste:function(){if(p.crossPlatformFramework===l.Electron)return function(){try{var e=require("electron");return new Promise((function(r){try{var n=e.clipboard.readHTML();return r(n?n.replace(/<meta[^>]*\bcharset\b[^>]*>/i,""):e.clipboard.readText()||"")}catch(e){r("")}}))}catch(e){return Promise.resolve("")}}();if(L()&&("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 r=e[0],n=r.types,o=0;o<n.length;o++)if("text/html"===n[o])return r.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(o=0;o<n.length;o++)if("text/plain"===n[o])return r.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:F()})).catch((function(){return F()}));return Promise.resolve(F())}};function W(e){return null!==e&&"object"==typeof e}function L(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,r=location.hostname;return"https:"===e||"localhost"===r||"127.0.0.1"===r||"[::1]"===r}()&&"undefined"!=typeof navigator&&"clipboard"in navigator}function I(r){return function(r){if(!globalThis.getSelection||!globalThis.document.createRange)return!1;var n=e("div");if(void 0===n)return!1;n.contentEditable="true",n.innerHTML=r,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 o=globalThis.getSelection(),t=globalThis.document.createRange(),i=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.setData&&(e.preventDefault(),e.clipboardData.setData("text/html",r),e.clipboardData.setData("text/plain",r))}catch(e){}};m.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===o)return R(n,o,i),!1;o.removeAllRanges(),t.selectNodeContents(n),o.addRange(t);var a=globalThis.document.execCommand("copy");return R(n,o,i),a}catch(e){return R(n,o,i),!1}}(r)||function(e){var r=window.clipboardData;if(void 0!==r&&"function"==typeof r.setData)try{return r.setData("Text",e)}catch(e){return!1}return!1}(r)}function F(){return function(){var r=e("div");if(void 0===r)return null;r.contentEditable="true",globalThis.document.body.appendChild(r),r.focus();var n=null,o=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:o,options:{once:!0,capture:!0}});try{return globalThis.document.execCommand("paste")||n||(n=r.innerHTML||r.textContent||null),U(r,o),n}catch(e){return U(r,o),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 R(e,r,n){null!==r&&r.removeAllRanges(),globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"copy",callback:n})}function U(e,r){globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"paste",callback:r})}var _={installed:!1,name:"Clipboard",module:N,Constants:{},Errors:{}};export{_ as default};
|
|
@@ -271,7 +271,7 @@ var Browsers;
|
|
|
271
271
|
})(Browsers || (Browsers = {}));
|
|
272
272
|
var CrossPlatformFramework;
|
|
273
273
|
(function (CrossPlatformFramework) {
|
|
274
|
-
CrossPlatformFramework["
|
|
274
|
+
CrossPlatformFramework["Unknown"] = "Unknown";
|
|
275
275
|
CrossPlatformFramework["ReactNative"] = "ReactNative";
|
|
276
276
|
CrossPlatformFramework["Electron"] = "Electron";
|
|
277
277
|
CrossPlatformFramework["Cordova"] = "Cordova";
|
|
@@ -283,7 +283,7 @@ var Platform = {
|
|
|
283
283
|
os: OS.Unknown,
|
|
284
284
|
engine: Engines.Unknown,
|
|
285
285
|
browser: Browsers.Unknown,
|
|
286
|
-
crossPlatformFramework: CrossPlatformFramework.
|
|
286
|
+
crossPlatformFramework: CrossPlatformFramework.Unknown,
|
|
287
287
|
osVersion: '',
|
|
288
288
|
engineVersion: '',
|
|
289
289
|
browserVersion: '',
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
})(Browsers || (Browsers = {}));
|
|
278
278
|
var CrossPlatformFramework;
|
|
279
279
|
(function (CrossPlatformFramework) {
|
|
280
|
-
CrossPlatformFramework["
|
|
280
|
+
CrossPlatformFramework["Unknown"] = "Unknown";
|
|
281
281
|
CrossPlatformFramework["ReactNative"] = "ReactNative";
|
|
282
282
|
CrossPlatformFramework["Electron"] = "Electron";
|
|
283
283
|
CrossPlatformFramework["Cordova"] = "Cordova";
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
os: OS.Unknown,
|
|
290
290
|
engine: Engines.Unknown,
|
|
291
291
|
browser: Browsers.Unknown,
|
|
292
|
-
crossPlatformFramework: CrossPlatformFramework.
|
|
292
|
+
crossPlatformFramework: CrossPlatformFramework.Unknown,
|
|
293
293
|
osVersion: '',
|
|
294
294
|
engineVersion: '',
|
|
295
295
|
browserVersion: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).Clipboard=r()}(this,(function(){"use strict";function e(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var o=globalThis.document.createElement(e);return"width"in o&&(o.width="0"),"height"in o&&(o.height="0"),"border"in o&&(o.border="0"),"frameBorder"in o&&(o.frameBorder="0"),"scrolling"in o&&(o.scrolling="no"),"cellPadding"in o&&(o.cellPadding="0"),"cellSpacing"in o&&(o.cellSpacing="0"),"frame"in o&&(o.frame="void"),"rules"in o&&(o.rules="none"),"noWrap"in o&&(o.noWrap=!0),o.tabIndex=-1,o.setAttribute("role","presentation"),r?(o.style.width="1px",o.style.height="1px"):(o.setAttribute("aria-hidden","true"),o.style.width="0",o.style.height="0",o.style.zIndex="-9999",o.style.display="none",o.style.visibility="hidden",o.style.pointerEvents="none"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.padding="0",o.style.margin="0",o.style.border="none",o.style.outline="none",o.style.clip="rect(1px, 1px, 1px, 1px)",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",o}}function r(e){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];for(var t="",n=0;n<r.length-2;n++){var i=r[n];void 0!==i&&(t=t+i.charAt(0).toUpperCase()+i.slice(1))}return t}function o(){this.returnValue=!1}function t(){this.cancelBubble=!0}var n,i,a,s,l,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,u=["","webkit","moz","ms","MS","o","O"],d={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,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var i=m.withVender(e,r.type),a=r.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,n,a)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(n)}catch(e){}else try{return e.addListener(i,n)}catch(e){}return"function"==typeof e.attachEvent?n.__ieWrapper?e.attachEvent("on"+i,n.__ieWrapper):e.attachEvent("on"+i,n.__ieWrapper=function(r){void 0===r&&(r=globalThis.event),void 0!==r&&(r.currentTarget=e,"function"!=typeof r.preventDefault&&(r.preventDefault=o),"function"!=typeof r.stopPropagation&&(r.stopPropagation=t),"function"==typeof n?n.call(e,r):n&&"function"==typeof n.handleEvent&&n.handleEvent.call(e,r))}):void 0}},remove:function(e,r){void 0===r&&(r={callback:null,options:!1});var o=r.callback;if(void 0!==e&&null!==o){var t=m.withVender(e,r.type),n=r.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(t,o,n)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(o)}catch(e){}else try{return e.removeListener(t,o)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=o.__ieWrapper;void 0!==i&&(e.detachEvent("on"+t,i),delete o.__ieWrapper)}}},withVender:function(e,o){if(void 0===o)return"";if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(o)>-1)return o;if(void 0!==e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(o)>-1)return o;var t;t=o in d?d[o]:c.test(o)?[o,o.replace(c,r)]:[o];for(var n=0;n<u.length;n++)for(var i=0;i<t.length;i++){var a=u[n]+t[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"}(n||(n={})),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"}(s||(s={})),function(e){e.NotACrossPlatformFramework="NotACrossPlatformFramework",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(l||(l={}));var f=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",p={device:i.Unknown,os:n.Unknown,engine:a.Unknown,browser:s.Unknown,crossPlatformFramework:l.NotACrossPlatformFramework,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var o=r.getExtension("WEBGL_debug_renderer_info");return null===o?r.getParameter(r.RENDERER):r.getParameter(o.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:f,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(f)},b=[[/windows nt (6\.[23]); arm/i,n.Windows,g],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,n.Windows,g],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,n.Windows,g],[/windows nt ?([\d.)]*)(?!.+xbox)/i,n.Windows,g],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,n.Windows,g],[/windows ce\/?([\d.]*)/i,n.Windows,g],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,n.iOS,w],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,n.iOS,w],[/cfnetwork\/.+darwin/i,n.iOS,w],[/mac os x ?([\w. ]*)/i,n.MacOS,w],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,n.MacOS,w],[/droid ([\w.]+)\b.+(android[- ]x86)/i,n.Android],[/android\w*[-\/.; ]?([\d.]*)/i,n.Android]],v=[[/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]],h=[[/\b(?:crmo|crios)\/([\w.]+)/i,s.Chrome],[/webview.+edge\/([\w.]+)/i,s.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,s.Edge],[/opera mini\/([-\w.]+)/i,s.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,s.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,s.Opera],[/opios[\/ ]+([\w.]+)/i,s.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,s.Opera],[/\bopr\/([\w.]+)/i,s.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,s.IE],[/(?:ms|\()ie ([\w.]+)/i,s.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,s.IE],[/\bfocus\/([\w.]+)/i,s.Firefox],[/\bopt\/([\w.]+)/i,s.Opera],[/coast\/([\w.]+)/i,s.Opera],[/fxios\/([\w.-]+)/i,s.Firefox],[/samsungbrowser\/([\w.]+)/i,s.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,s.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,s.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,s.Chrome],[/chrome\/([\w.]+) mobile/i,s.Chrome],[/chrome\/v?([\w.]+)/i,s.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/version\/([\w.,]+) .*safari/i,s.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,s.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,s.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,s.Firefox],[/firefox\/([\w.]+)/i,s.Firefox]];function g(e){if(void 0===e)return"";var r={"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!==r?r:e}function w(e){return void 0===e?"":e.replace(/_/g,".")}function y(e,r){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":r}function T(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function k(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(f))&&(p.crossPlatformFramework=l.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(p.crossPlatformFramework=l.ReactNative);for(var x=0;x<b.length;x++){var j=(D=b[x])[0],E=D[1],S=D[2];if(null!==(C=p.userAgent.match(j))){p.os=E,p.osVersion=T(C[1],S);break}}p.os===n.iOS&&0===function(e,r){for(var o=e.split("."),t=r.split("."),n=Math.max(o.length,t.length),i=0;i<n;i++){var a=void 0,s=void 0;if((a=i<o.length?parseInt(o[i],10):0)>(s=i<t.length?parseInt(t[i],10):0))return 1;if(a<s)return-1}return 0}(p.osVersion,"18.6")&&(null!==(V=/\) Version\/([\d.]+)/.exec(p.userAgent))&&parseInt(V[1].substring(0,2),10)>=26&&(p.osVersion=V[1]));for(x=0;x<v.length;x++){j=(D=v[x])[0];var P=D[1];S=D[2];if(null!==(C=p.userAgent.match(j))){p.engine=P,p.engineVersion=T(C[1],S);break}}for(x=0;x<h.length;x++){j=(D=h[x])[0];var D,C,A=D[1];S=D[2];if(null!==(C=p.userAgent.match(j))){p.browser=A,p.browserVersion=T(C[1],S);break}}if(p.crossPlatformFramework===l.ReactNative)try{E=(O=require("react-native").Platform).OS;var V=k(M=""+O.Version);switch(E){case"android":p.os=n.Android,p.osVersion=function(e,r){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":r}(V,M);break;case"ios":p.os=n.iOS,p.osVersion=M;break;case"windows":p.os=n.Windows,p.osVersion=y(V,M);break;case"macos":p.os=n.MacOS,p.osVersion=M}}catch(e){}if(p.isNode)try{var M,O=(E=require("os")).platform();V=k(M=E.release());switch(O){case"win32":p.os=n.Windows,p.osVersion=y(V,M);break;case"darwin":p.os=n.MacOS,p.osVersion=function(e,r){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:r}(V,M);break;case"android":p.os=n.Android,p.osVersion=M;break;case"linux":/android/i.test(M)&&(p.os=n.Android,p.osVersion=M)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(p.crossPlatformFramework=l.Cordova,p.os===n.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":p.os=n.Android;break;case"iOS":p.os=n.iOS}p.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var r,o=e.fullVersionList||e.brands||[],t=e.platformVersion,i=0;i<o.length;i++){var a=null==(r=o[i])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,l=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(p.engineVersion=l)}"string"==typeof t&&(p.os===n.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?p.osVersion="11":p.osVersion=t)})),p.device=p.os===n.iOS||p.os===n.Android?i.Mobile:p.os===n.Windows||p.os===n.MacOS?i.Desktop:i.Unknown,p.isMobile=p.device===i.Mobile,p.isDesktop=p.device===i.Desktop,p.isStandalone=function(e){return"matchMedia"in globalThis&&(e===n.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(p.os);var N={copy:function(e){var r=function(e){if(function(e){return W(e)&&void 0!==e.innerText}(e))return e.innerHTML;if(function(e){return W(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(r){return""+e}else if("string"!=typeof e)return""+e;return e}(e);if(p.crossPlatformFramework===l.Electron)return function(e){try{var r=require("electron");return new Promise((function(o){try{r.clipboard.writeText(e),r.clipboard.writeHTML(e),o(!0)}catch(e){o(!1)}}))}catch(e){return Promise.resolve(!1)}}(r);if(L()&&("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)}(r).then((function(e){return!!e||F(r)})).catch((function(){return F(r)}));return Promise.resolve(F(r))},paste:function(){if(p.crossPlatformFramework===l.Electron)return function(){try{var e=require("electron");return new Promise((function(r){try{var o=e.clipboard.readHTML();return r(o?o.replace(/<meta[^>]*\bcharset\b[^>]*>/i,""):e.clipboard.readText()||"")}catch(e){r("")}}))}catch(e){return Promise.resolve("")}}();if(L()&&("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 r=e[0],o=r.types,t=0;t<o.length;t++)if("text/html"===o[t])return r.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(t=0;t<o.length;t++)if("text/plain"===o[t])return r.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())}};function W(e){return null!==e&&"object"==typeof e}function L(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,r=location.hostname;return"https:"===e||"localhost"===r||"127.0.0.1"===r||"[::1]"===r}()&&"undefined"!=typeof navigator&&"clipboard"in navigator}function F(r){return function(r){if(!globalThis.getSelection||!globalThis.document.createRange)return!1;var o=e("div");if(void 0===o)return!1;o.contentEditable="true",o.innerHTML=r,o.style.whiteSpace="pre",o.style.userSelect="text",o.style.setProperty("-webkit-user-select","text"),o.style.setProperty("-moz-user-select","text"),o.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(o);var t=globalThis.getSelection(),n=globalThis.document.createRange(),i=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.setData&&(e.preventDefault(),e.clipboardData.setData("text/html",r),e.clipboardData.setData("text/plain",r))}catch(e){}};m.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===t)return R(o,t,i),!1;t.removeAllRanges(),n.selectNodeContents(o),t.addRange(n);var a=globalThis.document.execCommand("copy");return R(o,t,i),a}catch(e){return R(o,t,i),!1}}(r)||function(e){var r=window.clipboardData;if(void 0!==r&&"function"==typeof r.setData)try{return r.setData("Text",e)}catch(e){return!1}return!1}(r)}function I(){return function(){var r=e("div");if(void 0===r)return null;r.contentEditable="true",globalThis.document.body.appendChild(r),r.focus();var o=null,t=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.getData&&(e.preventDefault(),o=e.clipboardData.getData("text/html")||e.clipboardData.getData("text/plain")||null)}catch(e){}};m.add(globalThis.document,{type:"paste",callback:t,options:{once:!0,capture:!0}});try{return globalThis.document.execCommand("paste")||o||(o=r.innerHTML||r.textContent||null),_(r,t),o}catch(e){return _(r,t),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 R(e,r,o){null!==r&&r.removeAllRanges(),globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"copy",callback:o})}function _(e,r){globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"paste",callback:r})}return{installed:!1,name:"Clipboard",module:N,Constants:{},Errors:{}}}));
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).Clipboard=r()}(this,(function(){"use strict";function e(e,r){if(void 0===r&&(r=!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"),r?(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 r(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];for(var o="",t=0;t<r.length-2;t++){var i=r[t];void 0!==i&&(o=o+i.charAt(0).toUpperCase()+i.slice(1))}return o}function n(){this.returnValue=!1}function o(){this.cancelBubble=!0}var t,i,a,s,l,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,u=["","webkit","moz","ms","MS","o","O"],d={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,r){void 0===r&&(r={callback:null,options:!1});var t=r.callback;if(void 0!==e&&null!==t){var i=m.withVender(e,r.type),a=r.options;if("function"==typeof e.addEventListener)try{return e.addEventListener(i,t,a)}catch(e){}if("function"==typeof e.addListener)if("boolean"==typeof e.matches)try{return e.addListener(t)}catch(e){}else try{return e.addListener(i,t)}catch(e){}return"function"==typeof e.attachEvent?t.__ieWrapper?e.attachEvent("on"+i,t.__ieWrapper):e.attachEvent("on"+i,t.__ieWrapper=function(r){void 0===r&&(r=globalThis.event),void 0!==r&&(r.currentTarget=e,"function"!=typeof r.preventDefault&&(r.preventDefault=n),"function"!=typeof r.stopPropagation&&(r.stopPropagation=o),"function"==typeof t?t.call(e,r):t&&"function"==typeof t.handleEvent&&t.handleEvent.call(e,r))}):void 0}},remove:function(e,r){void 0===r&&(r={callback:null,options:!1});var n=r.callback;if(void 0!==e&&null!==n){var o=m.withVender(e,r.type),t=r.options;if("function"==typeof e.removeEventListener)try{return e.removeEventListener(o,n,t)}catch(e){}if("function"==typeof e.removeListener)if("boolean"==typeof e.matches)try{return e.removeListener(n)}catch(e){}else try{return e.removeListener(o,n)}catch(e){}if("function"!=typeof e.detachEvent);else{var i=n.__ieWrapper;void 0!==i&&(e.detachEvent("on"+o,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 o;o=n in d?d[n]:c.test(n)?[n,n.replace(c,r)]:[n];for(var t=0;t<u.length;t++)for(var i=0;i<o.length;i++){var a=u[t]+o[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"}(t||(t={})),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"}(s||(s={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(l||(l={}));var f=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",p={device:i.Unknown,os:t.Unknown,engine:a.Unknown,browser:s.Unknown,crossPlatformFramework:l.Unknown,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:f,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(f)},b=[[/windows nt (6\.[23]); arm/i,t.Windows,g],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,t.Windows,g],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,t.Windows,g],[/windows nt ?([\d.)]*)(?!.+xbox)/i,t.Windows,g],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,t.Windows,g],[/windows ce\/?([\d.]*)/i,t.Windows,g],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,t.iOS,w],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,t.iOS,w],[/cfnetwork\/.+darwin/i,t.iOS,w],[/mac os x ?([\w. ]*)/i,t.MacOS,w],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,t.MacOS,w],[/droid ([\w.]+)\b.+(android[- ]x86)/i,t.Android],[/android\w*[-\/.; ]?([\d.]*)/i,t.Android]],v=[[/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]],h=[[/\b(?:crmo|crios)\/([\w.]+)/i,s.Chrome],[/webview.+edge\/([\w.]+)/i,s.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,s.Edge],[/opera mini\/([-\w.]+)/i,s.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,s.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,s.Opera],[/opios[\/ ]+([\w.]+)/i,s.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,s.Opera],[/\bopr\/([\w.]+)/i,s.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,s.IE],[/(?:ms|\()ie ([\w.]+)/i,s.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,s.IE],[/\bfocus\/([\w.]+)/i,s.Firefox],[/\bopt\/([\w.]+)/i,s.Opera],[/coast\/([\w.]+)/i,s.Opera],[/fxios\/([\w.-]+)/i,s.Firefox],[/samsungbrowser\/([\w.]+)/i,s.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,s.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,s.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,s.Chrome],[/chrome\/([\w.]+) mobile/i,s.Chrome],[/chrome\/v?([\w.]+)/i,s.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,s.Safari],[/version\/([\w.,]+) .*safari/i,s.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,s.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,s.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,s.Firefox],[/firefox\/([\w.]+)/i,s.Firefox]];function g(e){if(void 0===e)return"";var r={"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!==r?r:e}function w(e){return void 0===e?"":e.replace(/_/g,".")}function y(e,r){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":r}function T(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function k(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(f))&&(p.crossPlatformFramework=l.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(p.crossPlatformFramework=l.ReactNative);for(var x=0;x<b.length;x++){var j=(D=b[x])[0],E=D[1],S=D[2];if(null!==(V=p.userAgent.match(j))){p.os=E,p.osVersion=T(V[1],S);break}}p.os===t.iOS&&0===function(e,r){for(var n=e.split("."),o=r.split("."),t=Math.max(n.length,o.length),i=0;i<t;i++){var a=void 0,s=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(s=i<o.length?parseInt(o[i],10):0))return 1;if(a<s)return-1}return 0}(p.osVersion,"18.6")&&(null!==(O=/\) Version\/([\d.]+)/.exec(p.userAgent))&&parseInt(O[1].substring(0,2),10)>=26&&(p.osVersion=O[1]));for(x=0;x<v.length;x++){j=(D=v[x])[0];var P=D[1];S=D[2];if(null!==(V=p.userAgent.match(j))){p.engine=P,p.engineVersion=T(V[1],S);break}}for(x=0;x<h.length;x++){j=(D=h[x])[0];var D,V,M=D[1];S=D[2];if(null!==(V=p.userAgent.match(j))){p.browser=M,p.browserVersion=T(V[1],S);break}}if(p.crossPlatformFramework===l.ReactNative)try{E=(A=require("react-native").Platform).OS;var O=k(C=""+A.Version);switch(E){case"android":p.os=t.Android,p.osVersion=function(e,r){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":r}(O,C);break;case"ios":p.os=t.iOS,p.osVersion=C;break;case"windows":p.os=t.Windows,p.osVersion=y(O,C);break;case"macos":p.os=t.MacOS,p.osVersion=C}}catch(e){}if(p.isNode)try{var C,A=(E=require("os")).platform();O=k(C=E.release());switch(A){case"win32":p.os=t.Windows,p.osVersion=y(O,C);break;case"darwin":p.os=t.MacOS,p.osVersion=function(e,r){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:r}(O,C);break;case"android":p.os=t.Android,p.osVersion=C;break;case"linux":/android/i.test(C)&&(p.os=t.Android,p.osVersion=C)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(p.crossPlatformFramework=l.Cordova,p.os===t.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":p.os=t.Android;break;case"iOS":p.os=t.iOS}p.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){for(var r,n=e.fullVersionList||e.brands||[],o=e.platformVersion,i=0;i<n.length;i++){var a=null==(r=n[i])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,l=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(p.engineVersion=l)}"string"==typeof o&&(p.os===t.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?p.osVersion="11":p.osVersion=o)})),p.device=p.os===t.iOS||p.os===t.Android?i.Mobile:p.os===t.Windows||p.os===t.MacOS?i.Desktop:i.Unknown,p.isMobile=p.device===i.Mobile,p.isDesktop=p.device===i.Desktop,p.isStandalone=function(e){return"matchMedia"in globalThis&&(e===t.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(p.os);var N={copy:function(e){var r=function(e){if(function(e){return W(e)&&void 0!==e.innerText}(e))return e.innerHTML;if(function(e){return W(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(r){return""+e}else if("string"!=typeof e)return""+e;return e}(e);if(p.crossPlatformFramework===l.Electron)return function(e){try{var r=require("electron");return new Promise((function(n){try{r.clipboard.writeText(e),r.clipboard.writeHTML(e),n(!0)}catch(e){n(!1)}}))}catch(e){return Promise.resolve(!1)}}(r);if(L()&&("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)}(r).then((function(e){return!!e||I(r)})).catch((function(){return I(r)}));return Promise.resolve(I(r))},paste:function(){if(p.crossPlatformFramework===l.Electron)return function(){try{var e=require("electron");return new Promise((function(r){try{var n=e.clipboard.readHTML();return r(n?n.replace(/<meta[^>]*\bcharset\b[^>]*>/i,""):e.clipboard.readText()||"")}catch(e){r("")}}))}catch(e){return Promise.resolve("")}}();if(L()&&("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 r=e[0],n=r.types,o=0;o<n.length;o++)if("text/html"===n[o])return r.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(o=0;o<n.length;o++)if("text/plain"===n[o])return r.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:F()})).catch((function(){return F()}));return Promise.resolve(F())}};function W(e){return null!==e&&"object"==typeof e}function L(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,r=location.hostname;return"https:"===e||"localhost"===r||"127.0.0.1"===r||"[::1]"===r}()&&"undefined"!=typeof navigator&&"clipboard"in navigator}function I(r){return function(r){if(!globalThis.getSelection||!globalThis.document.createRange)return!1;var n=e("div");if(void 0===n)return!1;n.contentEditable="true",n.innerHTML=r,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 o=globalThis.getSelection(),t=globalThis.document.createRange(),i=function(e){try{null!==e.clipboardData&&"function"==typeof e.clipboardData.setData&&(e.preventDefault(),e.clipboardData.setData("text/html",r),e.clipboardData.setData("text/plain",r))}catch(e){}};m.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===o)return R(n,o,i),!1;o.removeAllRanges(),t.selectNodeContents(n),o.addRange(t);var a=globalThis.document.execCommand("copy");return R(n,o,i),a}catch(e){return R(n,o,i),!1}}(r)||function(e){var r=window.clipboardData;if(void 0!==r&&"function"==typeof r.setData)try{return r.setData("Text",e)}catch(e){return!1}return!1}(r)}function F(){return function(){var r=e("div");if(void 0===r)return null;r.contentEditable="true",globalThis.document.body.appendChild(r),r.focus();var n=null,o=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:o,options:{once:!0,capture:!0}});try{return globalThis.document.execCommand("paste")||n||(n=r.innerHTML||r.textContent||null),U(r,o),n}catch(e){return U(r,o),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 R(e,r,n){null!==r&&r.removeAllRanges(),globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"copy",callback:n})}function U(e,r){globalThis.document.body.removeChild(e),m.remove(globalThis.document,{type:"paste",callback:r})}return{installed:!1,name:"Clipboard",module:N,Constants:{},Errors:{}}}));
|
|
@@ -34,7 +34,7 @@ export declare enum Browsers {
|
|
|
34
34
|
SamsungInternet = "SamsungInternet"
|
|
35
35
|
}
|
|
36
36
|
export declare enum CrossPlatformFramework {
|
|
37
|
-
|
|
37
|
+
Unknown = "Unknown",
|
|
38
38
|
ReactNative = "ReactNative",
|
|
39
39
|
Electron = "Electron",
|
|
40
40
|
Cordova = "Cordova"
|
|
@@ -64,7 +64,7 @@ var Browsers;
|
|
|
64
64
|
})(Browsers || (Browsers = {}));
|
|
65
65
|
var CrossPlatformFramework;
|
|
66
66
|
(function (CrossPlatformFramework) {
|
|
67
|
-
CrossPlatformFramework["
|
|
67
|
+
CrossPlatformFramework["Unknown"] = "Unknown";
|
|
68
68
|
CrossPlatformFramework["ReactNative"] = "ReactNative";
|
|
69
69
|
CrossPlatformFramework["Electron"] = "Electron";
|
|
70
70
|
CrossPlatformFramework["Cordova"] = "Cordova";
|
|
@@ -76,7 +76,7 @@ var Platform = {
|
|
|
76
76
|
os: OS.Unknown,
|
|
77
77
|
engine: Engines.Unknown,
|
|
78
78
|
browser: Browsers.Unknown,
|
|
79
|
-
crossPlatformFramework: CrossPlatformFramework.
|
|
79
|
+
crossPlatformFramework: CrossPlatformFramework.Unknown,
|
|
80
80
|
osVersion: '',
|
|
81
81
|
engineVersion: '',
|
|
82
82
|
browserVersion: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,r,n,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"}(r||(r={})),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"}(n||(n={})),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.NotACrossPlatformFramework="NotACrossPlatformFramework",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:"",l={device:r.Unknown,os:e.Unknown,engine:n.Unknown,browser:o.Unknown,crossPlatformFramework:i.NotACrossPlatformFramework,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:t,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(t)},a=[[/windows nt (6\.[23]); arm/i,e.Windows,c],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,c],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,c],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,c],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,c],[/windows ce\/?([\d.]*)/i,e.Windows,c],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,d],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,d],[/cfnetwork\/.+darwin/i,e.iOS,d],[/mac os x ?([\w. ]*)/i,e.MacOS,d],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,d],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,n.EdgeHTML],[/arkweb\/([\w.]+)/i,n.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,n.Blink],[/presto\/([\w.]+)/i,n.Presto],[/webkit\/([\w.]+)/i,n.WebKit],[/trident\/([\w.]+)/i,n.Trident],[/netfront\/([\w.]+)/i,n.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,n.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,n.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,n.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function c(e){if(void 0===e)return"";var r={"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!==r?r:e}function d(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,r){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":r}function f(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function b(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(l.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(l.crossPlatformFramework=i.ReactNative);for(var w=0;w<a.length;w++){var v=(p=a[w])[0],g=p[1],h=p[2];if(null!==(E=l.userAgent.match(v))){l.os=g,l.osVersion=f(E[1],h);break}}l.os===e.iOS&&0===function(e,r){for(var n=e.split("."),o=r.split("."),i=Math.max(n.length,o.length),t=0;t<i;t++){var l=void 0,a=void 0;if((l=t<n.length?parseInt(n[t],10):0)>(a=t<o.length?parseInt(o[t],10):0))return 1;if(l<a)return-1}return 0}(l.osVersion,"18.6")&&(null!==(F=/\) Version\/([\d.]+)/.exec(l.userAgent))&&parseInt(F[1].substring(0,2),10)>=26&&(l.osVersion=F[1]));for(w=0;w<s.length;w++){v=(p=s[w])[0];var k=p[1];h=p[2];if(null!==(E=l.userAgent.match(v))){l.engine=k,l.engineVersion=f(E[1],h);break}}for(w=0;w<u.length;w++){v=(p=u[w])[0];var p,E,T=p[1];h=p[2];if(null!==(E=l.userAgent.match(v))){l.browser=T,l.browserVersion=f(E[1],h);break}}if(l.crossPlatformFramework===i.ReactNative)try{g=(j=require("react-native").Platform).OS;var F=b(S=""+j.Version);switch(g){case"android":l.os=e.Android,l.osVersion=function(e,r){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":r}(F,S);break;case"ios":l.os=e.iOS,l.osVersion=S;break;case"windows":l.os=e.Windows,l.osVersion=m(F,S);break;case"macos":l.os=e.MacOS,l.osVersion=S}}catch(e){}if(l.isNode)try{var S,j=(g=require("os")).platform();F=b(S=g.release());switch(j){case"win32":l.os=e.Windows,l.osVersion=m(F,S);break;case"darwin":l.os=e.MacOS,l.osVersion=function(e,r){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:r}(F,S);break;case"android":l.os=e.Android,l.osVersion=S;break;case"linux":/android/i.test(S)&&(l.os=e.Android,l.osVersion=S)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(l.crossPlatformFramework=i.Cordova,l.os===e.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":l.os=e.Android;break;case"iOS":l.os=e.iOS}l.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){for(var n,o=r.fullVersionList||r.brands||[],i=r.platformVersion,t=0;t<o.length;t++){var a=null==(n=o[t])?{brand:"",version:""}:"string"==typeof n?{brand:n,version:""}:{brand:n.brand,version:n.version},s=a.brand,u=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(l.engineVersion=u)}"string"==typeof i&&(l.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?l.osVersion="11":l.osVersion=i)})),l.device=l.os===e.iOS||l.os===e.Android?r.Mobile:l.os===e.Windows||l.os===e.MacOS?r.Desktop:r.Unknown,l.isMobile=l.device===r.Mobile,l.isDesktop=l.device===r.Desktop,l.isStandalone=function(r){return"matchMedia"in globalThis&&(r===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(l.os);var x={get enabled(){return function(){if(l.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===W){if(e.iOS!==l.os)return!1;for(var r=globalThis.document.querySelectorAll("video"),n=0;n<r.length;n++){var o=r[n];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 q()},get isFullscreen(){return C()},request:R,exit:L,toggle:function(e,r){return C()?L():R(e,r)},onchange:function(e){var r=[];return function(n){function o(r){e(r)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(n,o,!1),r.push((function(){globalThis.document.removeEventListener(n,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<r.length;e++)r[e]()}},onerror:function(e){var r=[];return function(n){function o(r){e(r)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(n,o,!1),r.push((function(){globalThis.document.removeEventListener(n,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<r.length;e++)r[e]()}}},O=null,y=null,M=null,A=!1,W=function(){if(l.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return N.standard;for(var r=["webkit","moz","ms"],n=0;n<r.length;n++){var o=r[n],t=N[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:N.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),N={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 V(){null!==M&&(y.fullScreenable=M.fullScreenable,y.autoHideMenuBar=M.autoHideMenuBar,M=null),y=null}function P(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function r(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",r,!1),e.addEventListener("webkitendfullscreen",r,!1),e.__fsBridged__=!0)}))}function q(){if(l.crossPlatformFramework===i.Electron){if(null!==y)return y;try{for(var r=require("electron").BrowserWindow.getAllWindows(),n=0;n<r.length;n++){var o=r[n];if(o.isFullScreen()||l.os===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===W)return O&&O.webkitDisplayingFullscreen?O:null;var t=globalThis.document[W.element];return null!=t?t:null}function C(){return null!==q()}function R(r,n){if(void 0===r&&(r=function(){if(l.crossPlatformFramework===i.Electron){var r=require("electron"),n=r.BrowserWindow.getFocusedWindow();if(null!==n)return n;var o=r.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(l.os===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),l.crossPlatformFramework===i.Electron){var o=r;return new Promise((function(e,r){try{return null===y&&(M={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),y=o,void e()}catch(e){r()}}))}return new Promise((function(o,i){if(null!==W){var t=r[W.request];if("function"==typeof t)try{var a=t.call(r,n);return void 0!==a&&"function"==typeof a.then?void a.then((function(){o()})).catch((function(){e.iOS===l.os?s():i()})):void o()}catch(r){if(e.iOS!==l.os)return void i()}}function s(){if(e.iOS===l.os&&"VIDEO"===r.tagName.toUpperCase()){var n=r;if(n.webkitSupportsFullscreen&&"function"==typeof n.webkitEnterFullscreen)return O=n,P(),n.webkitEnterFullscreen(),void o()}i()}s()}))}function L(){return l.crossPlatformFramework===i.Electron?new Promise((function(e,r){try{if(null!==y)y.setFullScreen(!1),V();else{var n=q();null!==n&&n.setFullScreen(!1)}e()}catch(e){r()}})):new Promise((function(r,n){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(){r()})).catch((function(){n()})):void r()}}if(e.iOS===l.os&&null!==O){if("function"==typeof O.webkitExitFullscreen&&!0===O.webkitDisplayingFullscreen)return O.webkitExitFullscreen(),O=null,void r();for(var t=globalThis.document.querySelectorAll("video"),a=0;a<t.length;a++){var s=t[a];if("function"==typeof s.webkitExitFullscreen&&!0===s.webkitDisplayingFullscreen)return s.webkitExitFullscreen(),void r()}}q()?n():r()}))}!function(){if(!A){A=!0;var r=!1;if(l.crossPlatformFramework===i.Electron)try{for(var n=require("electron"),o=n.BrowserWindow.getAllWindows(),t=function(e){var r=o[e];r.on("enter-full-screen",(function(){y=r,d()})),r.on("leave-full-screen",(function(){V(),d()}))},a=0;a<o.length;a++)t(a);"function"==typeof n.BrowserWindow.on&&n.BrowserWindow.on("browser-window-created",(function(e,r){r.on("enter-full-screen",(function(){y=r,d()})),r.on("leave-full-screen",(function(){V(),d()}))}))}catch(e){}var s=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],u=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],d,!1);for(a=0;a<u.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(u[a],m,!1);if(e.iOS===l.os)if(P(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){P()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){r||(r=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){r=!1})))}function d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}();var B={installed:!1,name:"Fullscreen",module:x,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:"",l={device:n.Unknown,os:e.Unknown,engine:r.Unknown,browser:o.Unknown,crossPlatformFramework:i.Unknown,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:t,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(t)},a=[[/windows nt (6\.[23]); arm/i,e.Windows,c],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,c],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,c],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,c],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,c],[/windows ce\/?([\d.]*)/i,e.Windows,c],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,d],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,d],[/cfnetwork\/.+darwin/i,e.iOS,d],[/mac os x ?([\w. ]*)/i,e.MacOS,d],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,d],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function c(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function d(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function f(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function b(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(l.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(l.crossPlatformFramework=i.ReactNative);for(var w=0;w<a.length;w++){var v=(p=a[w])[0],g=p[1],h=p[2];if(null!==(E=l.userAgent.match(v))){l.os=g,l.osVersion=f(E[1],h);break}}l.os===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 l=void 0,a=void 0;if((l=t<r.length?parseInt(r[t],10):0)>(a=t<o.length?parseInt(o[t],10):0))return 1;if(l<a)return-1}return 0}(l.osVersion,"18.6")&&(null!==(F=/\) Version\/([\d.]+)/.exec(l.userAgent))&&parseInt(F[1].substring(0,2),10)>=26&&(l.osVersion=F[1]));for(w=0;w<s.length;w++){v=(p=s[w])[0];var k=p[1];h=p[2];if(null!==(E=l.userAgent.match(v))){l.engine=k,l.engineVersion=f(E[1],h);break}}for(w=0;w<u.length;w++){v=(p=u[w])[0];var p,E,T=p[1];h=p[2];if(null!==(E=l.userAgent.match(v))){l.browser=T,l.browserVersion=f(E[1],h);break}}if(l.crossPlatformFramework===i.ReactNative)try{g=(j=require("react-native").Platform).OS;var F=b(S=""+j.Version);switch(g){case"android":l.os=e.Android,l.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||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}(F,S);break;case"ios":l.os=e.iOS,l.osVersion=S;break;case"windows":l.os=e.Windows,l.osVersion=m(F,S);break;case"macos":l.os=e.MacOS,l.osVersion=S}}catch(e){}if(l.isNode)try{var S,j=(g=require("os")).platform();F=b(S=g.release());switch(j){case"win32":l.os=e.Windows,l.osVersion=m(F,S);break;case"darwin":l.os=e.MacOS,l.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(F,S);break;case"android":l.os=e.Android,l.osVersion=S;break;case"linux":/android/i.test(S)&&(l.os=e.Android,l.osVersion=S)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(l.crossPlatformFramework=i.Cordova,l.os===e.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":l.os=e.Android;break;case"iOS":l.os=e.iOS}l.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,t=0;t<o.length;t++){var a=null==(r=o[t])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,u=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(l.engineVersion=u)}"string"==typeof i&&(l.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?l.osVersion="11":l.osVersion=i)})),l.device=l.os===e.iOS||l.os===e.Android?n.Mobile:l.os===e.Windows||l.os===e.MacOS?n.Desktop:n.Unknown,l.isMobile=l.device===n.Mobile,l.isDesktop=l.device===n.Desktop,l.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(l.os);var x={get enabled(){return function(){if(l.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===V){if(e.iOS!==l.os)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[V.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[V.element]}()},get element(){return P()},get isFullscreen(){return C()},request:R,exit:L,toggle:function(e,n){return C()?L():R(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]()}}},O=null,y=null,M=null,W=!1,V=function(){if(l.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return A.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=A[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:A.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),A={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 N(){null!==M&&(y.fullScreenable=M.fullScreenable,y.autoHideMenuBar=M.autoHideMenuBar,M=null),y=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 P(){if(l.crossPlatformFramework===i.Electron){if(null!==y)return y;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||l.os===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===V)return O&&O.webkitDisplayingFullscreen?O:null;var t=globalThis.document[V.element];return null!=t?t:null}function C(){return null!==P()}function R(n,r){if(void 0===n&&(n=function(){if(l.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(l.os===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),l.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===y&&(M={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),y=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==V){var t=n[V.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(){e.iOS===l.os?s():i()})):void o()}catch(n){if(e.iOS!==l.os)return void i()}}function s(){if(e.iOS===l.os&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return O=r,q(),r.webkitEnterFullscreen(),void o()}i()}s()}))}function L(){return l.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==y)y.setFullScreen(!1),N();else{var r=P();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==V){var o=globalThis.document[V.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(e.iOS===l.os&&null!==O){if("function"==typeof O.webkitExitFullscreen&&!0===O.webkitDisplayingFullscreen)return O.webkitExitFullscreen(),O=null,void n();for(var t=globalThis.document.querySelectorAll("video"),a=0;a<t.length;a++){var s=t[a];if("function"==typeof s.webkitExitFullscreen&&!0===s.webkitDisplayingFullscreen)return s.webkitExitFullscreen(),void n()}}P()?r():n()}))}!function(){if(!W){W=!0;var n=!1;if(l.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(){y=n,d()})),n.on("leave-full-screen",(function(){N(),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(){y=n,d()})),n.on("leave-full-screen",(function(){N(),d()}))}))}catch(e){}var s=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],u=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],d,!1);for(a=0;a<u.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(u[a],m,!1);if(e.iOS===l.os)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 d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}();var B={installed:!1,name:"Fullscreen",module:x,Constants:{},Errors:{}};module.exports=B;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,r,n,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"}(r||(r={})),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"}(n||(n={})),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.NotACrossPlatformFramework="NotACrossPlatformFramework",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:"",l={device:r.Unknown,os:e.Unknown,engine:n.Unknown,browser:o.Unknown,crossPlatformFramework:i.NotACrossPlatformFramework,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:t,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(t)},a=[[/windows nt (6\.[23]); arm/i,e.Windows,c],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,c],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,c],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,c],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,c],[/windows ce\/?([\d.]*)/i,e.Windows,c],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,d],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,d],[/cfnetwork\/.+darwin/i,e.iOS,d],[/mac os x ?([\w. ]*)/i,e.MacOS,d],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,d],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,n.EdgeHTML],[/arkweb\/([\w.]+)/i,n.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,n.Blink],[/presto\/([\w.]+)/i,n.Presto],[/webkit\/([\w.]+)/i,n.WebKit],[/trident\/([\w.]+)/i,n.Trident],[/netfront\/([\w.]+)/i,n.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,n.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,n.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,n.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function c(e){if(void 0===e)return"";var r={"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!==r?r:e}function d(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,r){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":r}function f(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function b(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(l.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(l.crossPlatformFramework=i.ReactNative);for(var w=0;w<a.length;w++){var v=(p=a[w])[0],g=p[1],h=p[2];if(null!==(E=l.userAgent.match(v))){l.os=g,l.osVersion=f(E[1],h);break}}l.os===e.iOS&&0===function(e,r){for(var n=e.split("."),o=r.split("."),i=Math.max(n.length,o.length),t=0;t<i;t++){var l=void 0,a=void 0;if((l=t<n.length?parseInt(n[t],10):0)>(a=t<o.length?parseInt(o[t],10):0))return 1;if(l<a)return-1}return 0}(l.osVersion,"18.6")&&(null!==(F=/\) Version\/([\d.]+)/.exec(l.userAgent))&&parseInt(F[1].substring(0,2),10)>=26&&(l.osVersion=F[1]));for(w=0;w<s.length;w++){v=(p=s[w])[0];var k=p[1];h=p[2];if(null!==(E=l.userAgent.match(v))){l.engine=k,l.engineVersion=f(E[1],h);break}}for(w=0;w<u.length;w++){v=(p=u[w])[0];var p,E,T=p[1];h=p[2];if(null!==(E=l.userAgent.match(v))){l.browser=T,l.browserVersion=f(E[1],h);break}}if(l.crossPlatformFramework===i.ReactNative)try{g=(j=require("react-native").Platform).OS;var F=b(S=""+j.Version);switch(g){case"android":l.os=e.Android,l.osVersion=function(e,r){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":r}(F,S);break;case"ios":l.os=e.iOS,l.osVersion=S;break;case"windows":l.os=e.Windows,l.osVersion=m(F,S);break;case"macos":l.os=e.MacOS,l.osVersion=S}}catch(e){}if(l.isNode)try{var S,j=(g=require("os")).platform();F=b(S=g.release());switch(j){case"win32":l.os=e.Windows,l.osVersion=m(F,S);break;case"darwin":l.os=e.MacOS,l.osVersion=function(e,r){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:r}(F,S);break;case"android":l.os=e.Android,l.osVersion=S;break;case"linux":/android/i.test(S)&&(l.os=e.Android,l.osVersion=S)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(l.crossPlatformFramework=i.Cordova,l.os===e.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":l.os=e.Android;break;case"iOS":l.os=e.iOS}l.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){for(var n,o=r.fullVersionList||r.brands||[],i=r.platformVersion,t=0;t<o.length;t++){var a=null==(n=o[t])?{brand:"",version:""}:"string"==typeof n?{brand:n,version:""}:{brand:n.brand,version:n.version},s=a.brand,u=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(l.engineVersion=u)}"string"==typeof i&&(l.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?l.osVersion="11":l.osVersion=i)})),l.device=l.os===e.iOS||l.os===e.Android?r.Mobile:l.os===e.Windows||l.os===e.MacOS?r.Desktop:r.Unknown,l.isMobile=l.device===r.Mobile,l.isDesktop=l.device===r.Desktop,l.isStandalone=function(r){return"matchMedia"in globalThis&&(r===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(l.os);var x={get enabled(){return function(){if(l.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===W){if(e.iOS!==l.os)return!1;for(var r=globalThis.document.querySelectorAll("video"),n=0;n<r.length;n++){var o=r[n];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 q()},get isFullscreen(){return C()},request:R,exit:L,toggle:function(e,r){return C()?L():R(e,r)},onchange:function(e){var r=[];return function(n){function o(r){e(r)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(n,o,!1),r.push((function(){globalThis.document.removeEventListener(n,o,!1)}))}("fullscreenchange"),function(){for(var e=0;e<r.length;e++)r[e]()}},onerror:function(e){var r=[];return function(n){function o(r){e(r)}if(void 0===globalThis.document)return;globalThis.document.addEventListener(n,o,!1),r.push((function(){globalThis.document.removeEventListener(n,o,!1)}))}("fullscreenerror"),function(){for(var e=0;e<r.length;e++)r[e]()}}},O=null,y=null,M=null,A=!1,W=function(){if(l.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return N.standard;for(var r=["webkit","moz","ms"],n=0;n<r.length;n++){var o=r[n],t=N[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:N.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),N={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 V(){null!==M&&(y.fullScreenable=M.fullScreenable,y.autoHideMenuBar=M.autoHideMenuBar,M=null),y=null}function P(){void 0!==globalThis.document&&globalThis.document.querySelectorAll("video").forEach((function(e){function r(){globalThis.document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",r,!1),e.addEventListener("webkitendfullscreen",r,!1),e.__fsBridged__=!0)}))}function q(){if(l.crossPlatformFramework===i.Electron){if(null!==y)return y;try{for(var r=require("electron").BrowserWindow.getAllWindows(),n=0;n<r.length;n++){var o=r[n];if(o.isFullScreen()||l.os===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===W)return O&&O.webkitDisplayingFullscreen?O:null;var t=globalThis.document[W.element];return null!=t?t:null}function C(){return null!==q()}function R(r,n){if(void 0===r&&(r=function(){if(l.crossPlatformFramework===i.Electron){var r=require("electron"),n=r.BrowserWindow.getFocusedWindow();if(null!==n)return n;var o=r.BrowserWindow.getAllWindows();if(0===o.length)throw new Error;return o[0]}if(l.os===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),l.crossPlatformFramework===i.Electron){var o=r;return new Promise((function(e,r){try{return null===y&&(M={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),y=o,void e()}catch(e){r()}}))}return new Promise((function(o,i){if(null!==W){var t=r[W.request];if("function"==typeof t)try{var a=t.call(r,n);return void 0!==a&&"function"==typeof a.then?void a.then((function(){o()})).catch((function(){e.iOS===l.os?s():i()})):void o()}catch(r){if(e.iOS!==l.os)return void i()}}function s(){if(e.iOS===l.os&&"VIDEO"===r.tagName.toUpperCase()){var n=r;if(n.webkitSupportsFullscreen&&"function"==typeof n.webkitEnterFullscreen)return O=n,P(),n.webkitEnterFullscreen(),void o()}i()}s()}))}function L(){return l.crossPlatformFramework===i.Electron?new Promise((function(e,r){try{if(null!==y)y.setFullScreen(!1),V();else{var n=q();null!==n&&n.setFullScreen(!1)}e()}catch(e){r()}})):new Promise((function(r,n){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(){r()})).catch((function(){n()})):void r()}}if(e.iOS===l.os&&null!==O){if("function"==typeof O.webkitExitFullscreen&&!0===O.webkitDisplayingFullscreen)return O.webkitExitFullscreen(),O=null,void r();for(var t=globalThis.document.querySelectorAll("video"),a=0;a<t.length;a++){var s=t[a];if("function"==typeof s.webkitExitFullscreen&&!0===s.webkitDisplayingFullscreen)return s.webkitExitFullscreen(),void r()}}q()?n():r()}))}!function(){if(!A){A=!0;var r=!1;if(l.crossPlatformFramework===i.Electron)try{for(var n=require("electron"),o=n.BrowserWindow.getAllWindows(),t=function(e){var r=o[e];r.on("enter-full-screen",(function(){y=r,d()})),r.on("leave-full-screen",(function(){V(),d()}))},a=0;a<o.length;a++)t(a);"function"==typeof n.BrowserWindow.on&&n.BrowserWindow.on("browser-window-created",(function(e,r){r.on("enter-full-screen",(function(){y=r,d()})),r.on("leave-full-screen",(function(){V(),d()}))}))}catch(e){}var s=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],u=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],d,!1);for(a=0;a<u.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(u[a],m,!1);if(e.iOS===l.os)if(P(),void 0!==globalThis.MutationObserver)new MutationObserver((function(){P()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function c(e){r||(r=!0,void 0!==globalThis.document&&globalThis.document.dispatchEvent(new Event(e,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){r=!1})))}function d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}();var B={installed:!1,name:"Fullscreen",module:x,Constants:{},Errors:{}};export{B as default};
|
|
1
|
+
var e,n,r,o,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={})),function(e){e.Unknown="Unknown",e.ReactNative="ReactNative",e.Electron="Electron",e.Cordova="Cordova"}(i||(i={}));var t=void 0!==globalThis.navigator&&"string"==typeof globalThis.navigator.userAgent?globalThis.navigator.userAgent:"",l={device:n.Unknown,os:e.Unknown,engine:r.Unknown,browser:o.Unknown,crossPlatformFramework:i.Unknown,osVersion:"",engineVersion:"",browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:t,isNode:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(t)},a=[[/windows nt (6\.[23]); arm/i,e.Windows,c],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,c],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,c],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,c],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,c],[/windows ce\/?([\d.]*)/i,e.Windows,c],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,d],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,d],[/cfnetwork\/.+darwin/i,e.iOS,d],[/mac os x ?([\w. ]*)/i,e.MacOS,d],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,d],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function c(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function d(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function f(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function b(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}(void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron||/ electron\//i.test(t))&&(l.crossPlatformFramework=i.Electron),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product&&(l.crossPlatformFramework=i.ReactNative);for(var w=0;w<a.length;w++){var v=(p=a[w])[0],g=p[1],h=p[2];if(null!==(E=l.userAgent.match(v))){l.os=g,l.osVersion=f(E[1],h);break}}l.os===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 l=void 0,a=void 0;if((l=t<r.length?parseInt(r[t],10):0)>(a=t<o.length?parseInt(o[t],10):0))return 1;if(l<a)return-1}return 0}(l.osVersion,"18.6")&&(null!==(F=/\) Version\/([\d.]+)/.exec(l.userAgent))&&parseInt(F[1].substring(0,2),10)>=26&&(l.osVersion=F[1]));for(w=0;w<s.length;w++){v=(p=s[w])[0];var k=p[1];h=p[2];if(null!==(E=l.userAgent.match(v))){l.engine=k,l.engineVersion=f(E[1],h);break}}for(w=0;w<u.length;w++){v=(p=u[w])[0];var p,E,T=p[1];h=p[2];if(null!==(E=l.userAgent.match(v))){l.browser=T,l.browserVersion=f(E[1],h);break}}if(l.crossPlatformFramework===i.ReactNative)try{g=(j=require("react-native").Platform).OS;var F=b(S=""+j.Version);switch(g){case"android":l.os=e.Android,l.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major||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}(F,S);break;case"ios":l.os=e.iOS,l.osVersion=S;break;case"windows":l.os=e.Windows,l.osVersion=m(F,S);break;case"macos":l.os=e.MacOS,l.osVersion=S}}catch(e){}if(l.isNode)try{var S,j=(g=require("os")).platform();F=b(S=g.release());switch(j){case"win32":l.os=e.Windows,l.osVersion=m(F,S);break;case"darwin":l.os=e.MacOS,l.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(F,S);break;case"android":l.os=e.Android,l.osVersion=S;break;case"linux":/android/i.test(S)&&(l.os=e.Android,l.osVersion=S)}}catch(e){}void 0!==globalThis.document&&globalThis.document.addEventListener("deviceready",(function(){if(l.crossPlatformFramework=i.Cordova,l.os===e.Unknown&&void 0!==globalThis.device){switch(globalThis.device.platform){case"Android":l.os=e.Android;break;case"iOS":l.os=e.iOS}l.osVersion=globalThis.device.version}}),!1),void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,t=0;t<o.length;t++){var a=null==(r=o[t])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},s=a.brand,u=a.version;/not.a.brand/i.test(s)||"Chromium"===s&&(l.engineVersion=u)}"string"==typeof i&&(l.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?l.osVersion="11":l.osVersion=i)})),l.device=l.os===e.iOS||l.os===e.Android?n.Mobile:l.os===e.Windows||l.os===e.MacOS?n.Desktop:n.Unknown,l.isMobile=l.device===n.Mobile,l.isDesktop=l.device===n.Desktop,l.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(l.os);var x={get enabled(){return function(){if(l.crossPlatformFramework===i.Electron)try{return"function"==typeof require("electron").BrowserWindow.prototype.setFullScreen}catch(e){return!1}if(null===V){if(e.iOS!==l.os)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[V.enabled];return"boolean"==typeof t?t:void 0!==globalThis.document[V.element]}()},get element(){return P()},get isFullscreen(){return C()},request:R,exit:L,toggle:function(e,n){return C()?L():R(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]()}}},O=null,y=null,M=null,W=!1,V=function(){if(l.crossPlatformFramework===i.Electron)return null;var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return A.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r],t=A[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:A.webkit.events};return"webkitRequestFullScreen"in e&&(a.request="webkitRequestFullScreen"),a}return null}(),A={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 N(){null!==M&&(y.fullScreenable=M.fullScreenable,y.autoHideMenuBar=M.autoHideMenuBar,M=null),y=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 P(){if(l.crossPlatformFramework===i.Electron){if(null!==y)return y;try{for(var n=require("electron").BrowserWindow.getAllWindows(),r=0;r<n.length;r++){var o=n[r];if(o.isFullScreen()||l.os===e.MacOS&&"function"==typeof o.isSimpleFullScreen&&o.isSimpleFullScreen())return o}return null}catch(e){return null}}if(null===V)return O&&O.webkitDisplayingFullscreen?O:null;var t=globalThis.document[V.element];return null!=t?t:null}function C(){return null!==P()}function R(n,r){if(void 0===n&&(n=function(){if(l.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(l.os===e.iOS){var t=globalThis.document.querySelector("video");if(null===t)throw new Error;return t}return globalThis.document.documentElement}()),l.crossPlatformFramework===i.Electron){var o=n;return new Promise((function(e,n){try{return null===y&&(M={fullScreenable:o.fullScreenable,autoHideMenuBar:o.autoHideMenuBar},o.fullScreenable=!0,o.autoHideMenuBar=!0),o.setFullScreen(!0),y=o,void e()}catch(e){n()}}))}return new Promise((function(o,i){if(null!==V){var t=n[V.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(){e.iOS===l.os?s():i()})):void o()}catch(n){if(e.iOS!==l.os)return void i()}}function s(){if(e.iOS===l.os&&"VIDEO"===n.tagName.toUpperCase()){var r=n;if(r.webkitSupportsFullscreen&&"function"==typeof r.webkitEnterFullscreen)return O=r,q(),r.webkitEnterFullscreen(),void o()}i()}s()}))}function L(){return l.crossPlatformFramework===i.Electron?new Promise((function(e,n){try{if(null!==y)y.setFullScreen(!1),N();else{var r=P();null!==r&&r.setFullScreen(!1)}e()}catch(e){n()}})):new Promise((function(n,r){if(null!==V){var o=globalThis.document[V.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(e.iOS===l.os&&null!==O){if("function"==typeof O.webkitExitFullscreen&&!0===O.webkitDisplayingFullscreen)return O.webkitExitFullscreen(),O=null,void n();for(var t=globalThis.document.querySelectorAll("video"),a=0;a<t.length;a++){var s=t[a];if("function"==typeof s.webkitExitFullscreen&&!0===s.webkitDisplayingFullscreen)return s.webkitExitFullscreen(),void n()}}P()?r():n()}))}!function(){if(!W){W=!0;var n=!1;if(l.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(){y=n,d()})),n.on("leave-full-screen",(function(){N(),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(){y=n,d()})),n.on("leave-full-screen",(function(){N(),d()}))}))}catch(e){}var s=["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],u=["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"];for(a=0;a<s.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(s[a],d,!1);for(a=0;a<u.length;a++)void 0!==globalThis.document&&globalThis.document.addEventListener(u[a],m,!1);if(e.iOS===l.os)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 d(){c("fullscreenchange")}function m(){c("fullscreenerror")}}();var B={installed:!1,name:"Fullscreen",module:x,Constants:{},Errors:{}};export{B as default};
|