native-fn 1.3.1 → 1.3.2

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.
@@ -1 +1 @@
1
- var e,t,n="1.3.1",r={matches:!1,media:"not all",onchange:null,addListener:function(){},removeListener:function(){},addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){return!1}};!function(e){e.Unknown="unknown",e.Light="light",e.Dark="dark"}(e||(e={})),t=void 0!==globalThis.matchMedia?globalThis.matchMedia("(prefers-color-scheme: dark)"):r;var o,i,a,l,c,s=globalThis.document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function u(e,t){for(var n=e.split("."),r=t.split("."),o=Math.max(n.length,r.length),i=0;i<o;i++){var a=void 0,l=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(l=i<r.length?parseInt(r[i],10):0))return 1;if(a<l)return-1}return 0}function d(e){if(void 0===e)return"";var t={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==t?t:e}function p(e){return void 0===e?"":e.replace(/_/g,".")}!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(o||(o={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(i||(i={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(a||(a={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(l||(l={})),c=void 0!==globalThis.navigator.userAgent?globalThis.navigator.userAgent:"";var f={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"},g=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","iw","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],v=[[/windows nt (6\.[23]); arm/i,o.Windows,d],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,o.Windows,d],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,o.Windows,d],[/windows nt ?([\d.)]*)(?!.+xbox)/i,o.Windows,d],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,o.Windows,d],[/windows ce\/?([\d.]*)/i,o.Windows,d],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,o.iOS,p],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,o.iOS,p],[/cfnetwork\/.+darwin/i,o.iOS,p],[/mac os x ?([\w. ]*)/i,o.MacOS,p],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,o.MacOS,p],[/droid ([\w.]+)\b.+(android[- ]x86)/i,o.Android],[/android\w*[-\/.; ]?([\d.]*)/i,o.Android]],h=[[/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]],b=[[/\b(?:crmo|crios)\/([\w.]+)/i,l.Chrome],[/webview.+edge\/([\w.]+)/i,l.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,l.Edge],[/opera mini\/([-\w.]+)/i,l.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,l.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,l.Opera],[/opios[\/ ]+([\w.]+)/i,l.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,l.Opera],[/\bopr\/([\w.]+)/i,l.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,l.IE],[/(?:ms|\()ie ([\w.]+)/i,l.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,l.IE],[/\bfocus\/([\w.]+)/i,l.Firefox],[/\bopt\/([\w.]+)/i,l.Opera],[/coast\/([\w.]+)/i,l.Opera],[/fxios\/([\w.-]+)/i,l.Firefox],[/samsungbrowser\/([\w.]+)/i,l.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,l.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,l.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,l.Chrome],[/chrome\/([\w.]+) mobile/i,l.Chrome],[/chrome\/v?([\w.]+)/i,l.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/version\/([\w.,]+) .*safari/i,l.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,l.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,l.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,l.Firefox],[/firefox\/([\w.]+)/i,l.Firefox]],m=[],y=[];function w(e){return"function"==typeof e||"object"==typeof e&&null!==e&&"function"==typeof e.handleEvent}function T(e){return"string"==typeof e.media&&"boolean"==typeof e.matches}function k(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r="",o=0;o<t.length-2;o++){var i=t[o];void 0!==i&&(r=r+i.charAt(0).toUpperCase()+i.slice(1))}return r}function S(e,t){if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(t)>-1)return t;if("function"==typeof e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(t)>-1)return t;var n;n=void 0!==O[t]?O[t]:I.test(t)?[t,t.replace(I,k)]:[t];for(var r=0;r<A.length;r++)for(var o=0;o<n.length;o++){var i=A[r]+n[o];if(void 0!==e["on"+i])return i}return t}function E(){this.returnValue=!1}function P(){this.cancelBubble=!0}var x,I=/(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,A=["","webkit","moz","ms","MS","o","O"],O={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},D={useStd:"function"==typeof globalThis.document.addEventListener,add:function(e,t){if(void 0!==t.type&&void 0!==e){var n=t.callback,r=S(e,t.type),o=t.options;if(T(e)&&"function"==typeof e.addListener)try{var i=function(e,t,n){for(var r=0;r<y.length;r++){var o=y[r];if(o.target===e&&o.type===t&&o.callback===n)return o.wrapper}}(e,r,n);return void 0===i&&function(e,t,n,r){y.push({target:e,type:t,callback:n,wrapper:r})}(e,r,n,i=function(e){return function(t){"function"==typeof e?e.call(this,t):e&&"function"==typeof e.handleEvent&&e.handleEvent(t)}}(n)),e.addListener(i)}catch(e){}if("function"==typeof e.addEventListener)try{if(w(n))return e.addEventListener(r,n,o)}catch(e){}if("function"==typeof e.attachEvent){var a=function(e,t,n){for(var r=0;r<m.length;r++){var o=m[r];if(o.target===e&&o.type===t&&o.callback===n)return o.wrapper}}(e,r,n);if("function"==typeof a)return;i=function(t){if(void 0===t&&(t=globalThis.event),void 0!==t){try{Object.defineProperty(t,"currentTarget",{value:e,configurable:!0})}catch(e){}"function"!=typeof t.preventDefault&&(t.preventDefault=E.bind(t)),"function"!=typeof t.stopPropagation&&(t.stopPropagation=P.bind(t)),"function"==typeof n?n.call(e,t):n&&"function"==typeof n.handleEvent&&n.handleEvent(t)}};return function(e,t,n,r){m.push({target:e,type:t,callback:n,wrapper:r})}(e,r,n,i),e.attachEvent("on"+r,i)}}},remove:function(e,t){if(void 0!==t.type&&void 0!==e){var n=t.callback,r=S(e,t.type),o=t.options;if(T(e)){if("function"==typeof e.removeListener)try{var i=function(e,t,n){for(var r=0;r<y.length;r++){var o=y[r];if(o.target===e&&o.type===t&&o.callback===n)return y.splice(r,1),o.wrapper}}(e,r,n);if("function"==typeof i)return e.removeListener(i)}catch(e){}}else{if("function"==typeof e.removeEventListener)try{if(w(n))return e.removeEventListener(r,n,o)}catch(e){}if("function"!=typeof e.detachEvent);else{i=function(e,t,n){for(var r=0;r<m.length;r++){var o=m[r];if(o.target===e&&o.type===t&&o.callback===n)return m.splice(r,1),o.wrapper}}(e,r,n);"function"==typeof i&&e.detachEvent("on"+r,i)}}}}},M=c,C=null,N=void 0,L=void 0,F=void 0,U=void 0,_=void 0,q=void 0,W=null,R={},G=null;function B(e,t){return"function"==typeof t?t(e):"string"==typeof t?t:void 0===e?"":e}function H(e){if(null==e)return e;if(0===e.length)return null;if("C"===(e=e.replace(/_/g,"-"))||"posix"===e.toLowerCase())return"en-US";if(-1!==e.indexOf("."))return H(e.split(".")[0]);if(-1!==e.indexOf("@"))return H(e.split("@")[0]);var t=e.split("-");return 0===t.length?null:(t[0]=t[0].toLowerCase(),t.length>1&&2===t[1].length&&(t[1]=t[1].toUpperCase()),t.length>2&&4===t[1].length&&(t[1]=t[1].charAt(0).toUpperCase()+t[1].slice(1).toLowerCase()),t.join("-"))}function j(){return null!==C&&C.userAgent===M?C:C={userAgent:M,os:V(),browser:z(),engine:Y()}}function V(){for(var e=o.Unknown,t="",n=0;n<v.length;n++){var r=v[n],i=M.match(r[0]);if(null!==i){e=r[1],t=B(i[1],r[2]);break}}if(e===o.iOS&&0===u(t,"18.6")){var a=/\) Version\/([\d.]+)/.exec(M);if(null!==a)parseInt(a[1].split(".")[0],10)>=26&&(t=a[1])}return M===c&&(void 0!==N&&(e=N),void 0!==L&&(t=L),e===o.MacOS&&void 0!==globalThis.navigator.standalone&&globalThis.navigator.maxTouchPoints>2&&(e=o.iOS)),{name:e,version:t}}function z(){for(var e=l.Unknown,t="",n=0;n<b.length;n++){var r=b[n],o=M.match(r[0]);if(null!==o){e=r[1],t=B(o[1],r[2]);break}}return M===c&&(void 0!==F&&(e=F),void 0!==U&&(t=U)),{name:e,version:t}}function Y(){for(var e=a.Unknown,t="",n=0;n<h.length;n++){var r=h[n],o=M.match(r[0]);if(null!==o){e=r[1],t=B(o[1],r[2]);break}}return M===c&&(void 0!==_&&(e=_),void 0!==q&&(t=q)),{name:e,version:t}}function K(){if(null!==G)return G;var e=null,t=[],n=null,r=0,o=!1,i=null;function a(n){"string"==typeof(n=H(n))&&-1===t.indexOf(n)&&(null===e&&(e=n),t.push(n))}if("undefined"!=typeof Intl){try{a(Intl.DateTimeFormat().resolvedOptions().locale)}catch(e){}try{n=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}}void 0!==globalThis.navigator&&(void 0!==globalThis.navigator.languages&&function(e){for(var t=0;t<e.length;t++)a(e[t])}(globalThis.navigator.languages),void 0!==globalThis.navigator.language&&a(globalThis.navigator.language),void 0!==globalThis.navigator.userLanguage&&a(globalThis.navigator.userLanguage),void 0!==globalThis.navigator.browserLanguage&&a(globalThis.navigator.browserLanguage),void 0!==globalThis.navigator.systemLanguage&&a(globalThis.navigator.systemLanguage));try{r=-1*(new Date).getTimezoneOffset()}catch(e){}if("string"==typeof e){if("undefined"!=typeof Intl&&void 0!==Intl.Locale)try{var l=new Intl.Locale(e);"function"==typeof l.getTextInfo?i="rtl"===l.getTextInfo().direction:void 0!==l.textInfo&&(i="rtl"===l.textInfo.direction)}catch(e){}if("boolean"!=typeof i){var c=/^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(e);if(null!==c)for(var s=c[1].toLowerCase(),u=0;u<g.length;u++)if(g[u]===s){i=!0;break}}}return"boolean"==typeof i&&(o=i),G={language:e,languages:t,timezone:n,offset:r,isRTL:o}}function Z(){return void 0===globalThis.navigator||void 0===globalThis.navigator.userAgentData||void 0===globalThis.navigator.userAgentData.getHighEntropyValues?Promise.resolve():globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){try{for(var t=e.fullVersionList||e.brands||[],n=e.platformVersion,r=e.platform,a=j().browser.name,c=null,s=0;s<t.length;s++){var u=null==(g=t[s])?{brand:"",version:""}:"string"==typeof g?{brand:g,version:""}:{brand:g.brand,version:g.version},d=u.version,p=u.brand;/not.a.brand/i.test(p)||((null===c||/Chrom/.test(c)&&"Chromium"!==p||"Edge"===c&&/WebView2/.test(p))&&(p=f[p]||p,null!==(c=a)&&!/Chrom/.test(c)&&/Chrom/.test(p)||("Chrome"===(a=p)||"Chrome WebView"===a||"Chrome Headless"===a?F=l.Chrome:"Edge"===a||"Edge WebView2"===a?F=l.Edge:"Opera Mobi"===a&&(F=l.Opera),U=d),c=p),"Chromium"===p&&(q=d))}"string"==typeof n&&(L=j().os.name===o.Windows?parseInt(n.split(".")[0],10)>=13?"11":"10":n),"string"==typeof r&&(/android/i.test(r)?N=o.Android:/ios|iphone|ipad/i.test(r)?N=o.iOS:/windows|win32/i.test(r)?N=o.Windows:/macos|macintel/i.test(r)&&(N=o.MacOS)),!0===e.mobile&&(W=i.Mobile),C=null}catch(e){}var g})).catch((function(){}))}function X(){return void 0===globalThis.navigator||void 0===globalThis.navigator.gpu?Promise.resolve():globalThis.navigator.gpu.requestAdapter().then((function(e){if(null!==e){var t=e.info;R.architecture=t.architecture,R.description=t.description,R.device=t.device,R.vendor=t.vendor}})).catch((function(){}))}x=Promise.all([Z(),X()]).then((function(){})),D.add(globalThis,{type:"languagechange",callback:function(){G=null}});var J={get ready(){return x},get os(){return j().os},get engine(){return j().engine},get browser(){return j().browser},get userAgent(){return M},set userAgent(e){M!==e&&(M=e,C=null,G=null,N=void 0,L=void 0,F=void 0,U=void 0,_=void 0,q=void 0,W=null,R={},e===c&&(x=Promise.all([Z(),X()]).then((function(){}))))},get locale(){return K()},get device(){return function(){if(M===c&&null!==W)return W;var e=j().os.name;return e===o.iOS||e===o.Android?i.Mobile:e===o.Windows||e===o.MacOS?i.Desktop:i.Unknown}()},get gpu(){return{architecture:R.architecture,description:R.description,device:R.device,vendor:R.vendor}},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(M)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return j().os.name===o.iOS?!0===globalThis.navigator.standalone:void 0!==globalThis.matchMedia&&globalThis.matchMedia("(display-mode: standalone)").matches},Constants:{OS:o,Engines:a,Browsers:l,Devices:i},Errors:{}};function Q(e,t){var n=[];function r(e){var r=o(e);-1!==r&&(n.splice(r,1),0===n.length&&t())}function o(e){for(var t=0;t<n.length;t++)if(n[t].fn===e.fn)return t;return-1}return{emit:function(e){for(var t=n.slice(),o=0;o<t.length;o++)t[o].fn(e),t[o].once&&r(t[o])},subscribe:function(t,i){if(void 0===i&&(i={}),void 0!==i.signal&&i.signal.aborted)return function(){};var a={fn:t,once:!1};void 0!==i.once&&(a.once=i.once),void 0!==i.signal&&(a.signal=i.signal);var l=o(a);-1===l?(n.push(a),1===n.length&&e()):n[l].once&&!a.once&&(n[l].once=!1);var c=function(){D.remove(a.signal,{type:"abort",callback:c}),r(a)};return void 0!==a.signal&&D.add(a.signal,{type:"abort",callback:c}),function(){r(a)}}}}var $=Q((function(){ee=oe(),D.add(t,{type:"change",callback:ie}),J.browser.name===l.SamsungInternet&&(ee=re(),te=globalThis.setInterval((function(){var e=re();e!==ee&&(ee=e,$.emit(e))}),2e3))}),(function(){ee=null,D.remove(t,{type:"change",callback:ie}),J.browser.name===l.SamsungInternet&&(ee=null,null!==te&&(clearInterval(te),te=null))})),ee=null,te=null,ne={get value(){return J.browser.name===l.SamsungInternet?re():oe()},onChange:$.subscribe,Constants:{Appearances:e},Errors:{}};function re(){var t=new Image;if(t.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxIiBoZWlnaHQ9IjEiPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0wIDBoMXYxSDB6Ii8+PC9zdmc+",null===s)return e.Light;s.drawImage(t,0,0);var n=s.getImageData(0,0,1,1).data;return(n[0]&n[1]&n[2])<255?e.Dark:e.Light}function oe(){return"not all"===t.media?e.Unknown:t.matches?e.Dark:e.Light}function ie(t){var n;(n=t.matches?e.Dark:e.Light)!==ee&&$.emit(ee=n)}function ae(e,t){var n=e.style;for(var r in t){var o=t[r];void 0!==o&&(n[r]=o)}}function le(e,t){void 0===t&&(t=!0);var n=globalThis.document.createElement(e);return void 0!==n.width&&(n.width="0"),void 0!==n.height&&(n.height="0"),void 0!==n.border&&(n.border="0"),void 0!==n.frameBorder&&(n.frameBorder="0"),void 0!==n.scrolling&&(n.scrolling="no"),void 0!==n.cellPadding&&(n.cellPadding="0"),void 0!==n.cellSpacing&&(n.cellSpacing="0"),void 0!==n.frame&&(n.frame="void"),void 0!==n.rules&&(n.rules="none"),void 0!==n.noWrap&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),t?ae(n,{width:"1px",height:"1px"}):(n.setAttribute("aria-hidden","true"),ae(n,{width:"0",height:"0",zIndex:"-9999",display:"none",visibility:"hidden",pointerEvents:"none"})),ae(n,{position:"absolute",top:"0",left:"0",padding:"0",margin:"0",border:"none",outline:"hidden",clip:"rect(1px, 1px, 1px, 1px)",clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap"}),n}var ce,se={copy:function(e){var t=function(e){if(ue(e)){var t=e.textContent;return null!==t?t:""}if(de(e))return e.toString();if(function(e){return function(e){return null!==e&&"object"==typeof e}(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(t){return""+e}else if("string"!=typeof e)return""+e;return e}(e),n=function(e){var t=null;ue(e)&&(t=e.outerHTML);if(de(e)&&e.rangeCount>0){for(var n=globalThis.document.createElement("div"),r=0;r<e.rangeCount;r++)n.appendChild(e.getRangeAt(r).cloneContents());t=n.innerHTML}if(null===t)return;return t}(e);if(pe()&&(void 0!==globalThis.navigator.clipboard.write||void 0!==globalThis.navigator.clipboard.writeText))return function(e,t){try{if(void 0!==globalThis.ClipboardItem&&void 0!==globalThis.navigator.clipboard.write){var n={};return void 0!==t&&(n["text/html"]=new Blob([t],{type:"text/html"})),n["text/plain"]=new Blob([e],{type:"text/plain"}),globalThis.navigator.clipboard.write([new ClipboardItem(n)]).then((function(){return!0})).catch((function(){return!1}))}if(void 0!==globalThis.navigator.clipboard.writeText)return globalThis.navigator.clipboard.writeText(e).then((function(){return!0})).catch((function(){return!1}))}catch(e){return Promise.resolve(!1)}return Promise.resolve(!1)}(t,n).then((function(e){return!!e||fe(t,n)})).catch((function(){return fe(t,n)}));return Promise.resolve(fe(t,n))},paste:function(){if(pe()&&(void 0!==globalThis.navigator.clipboard.read||void 0!==globalThis.navigator.clipboard.readText))return function(){try{if(void 0!==globalThis.ClipboardItem&&void 0!==globalThis.navigator.clipboard.read)return globalThis.navigator.clipboard.read().then((function(e){if(0===e.length)return Promise.resolve(null);for(var t=0;t<e.length;t++)for(var n=(o=e[t]).types,r=0;r<n.length;r++)if("text/html"===n[r])return o.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(t=0;t<e.length;t++){var o;for(n=(o=e[t]).types,r=0;r<n.length;r++)if("text/plain"===n[r])return o.getType("text/plain").then((function(e){return e.text()})).catch((function(){return null}))}return Promise.resolve(null)})).catch((function(){return null}));if(void 0!==globalThis.navigator.clipboard.readText)return globalThis.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:ge()})).catch((function(){return ge()}));return Promise.resolve(ge())},Constants:{},Errors:{}};function ue(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&(1===e.nodeType&&("string"==typeof e.nodeName&&"function"==typeof e.getAttribute))}function de(e){return"[object Selection]"===Object.prototype.toString.call(e)}function pe(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,t=location.hostname;return"https:"===e||"localhost"===t||"127.0.0.1"===t||"[::1]"===t}()&&void 0!==globalThis.navigator.clipboard}function fe(e,t){return function(e,t){if(void 0===globalThis.getSelection||void 0===globalThis.document.createRange)return!1;var n=le("div");n.contentEditable="true",void 0!==t?n.innerHTML=t:n.textContent=e,n.style.whiteSpace="pre",n.style.userSelect="text",n.style.setProperty("-webkit-user-select","text"),n.style.setProperty("-moz-user-select","text"),n.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(n);var r=globalThis.getSelection(),o=globalThis.document.createRange(),i=function(n){try{null!==n.clipboardData&&"function"==typeof n.clipboardData.setData&&(n.preventDefault(),void 0!==t&&n.clipboardData.setData("text/html",t),n.clipboardData.setData("text/plain",e))}catch(e){}};D.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===r)return ve(n,r,i),!1;r.removeAllRanges(),o.selectNodeContents(n),r.addRange(o);var a=globalThis.document.execCommand("copy");return ve(n,r,i),a}catch(e){return ve(n,r,i),!1}}(e,t)||function(e,t){var n=globalThis.clipboardData;if(void 0!==n&&"function"==typeof n.setData)try{return void 0!==t&&n.setData("HTML",t),n.setData("Text",e)}catch(e){return!1}return!1}(e,t)}function ge(){var e=function(){var e=le("div");e.contentEditable="true",globalThis.document.body.appendChild(e),e.focus();var t=null,n=function(e){try{if(null!==e.clipboardData&&"function"==typeof e.clipboardData.getData){e.preventDefault();var n=e.clipboardData.getData("text/html"),r=e.clipboardData.getData("text/plain");""!==n&&(t=n),""!==r&&(t=r)}}catch(e){}};D.add(globalThis.document,{type:"paste",callback:n,options:{once:!0,capture:!0}});try{if(!globalThis.document.execCommand("paste")&&null===t){var r=e.innerHTML;if(""!==r)t=r;else{var o=e.textContent;null!==o&&""!==o&&(t=o)}}return he(e,n),t}catch(t){return he(e,n),null}}();if(null!==e)return e;var t=function(){var e=globalThis.clipboardData;if(void 0!==e&&"function"==typeof e.getData)try{var t=e.getData("Text");return""!==t?t:null}catch(e){return null}return null}();return null!==t?t:""}function ve(e,t,n){null!==t&&t.removeAllRanges(),globalThis.document.body.removeChild(e),D.remove(globalThis.document,{type:"copy",callback:n})}function he(e,t){globalThis.document.body.removeChild(e),D.remove(globalThis.document,{type:"paste",callback:t})}!function(e){e.PortraitPrimary="portrait-primary",e.PortraitSecondary="portrait-secondary",e.LandscapePrimary="landscape-primary",e.LandscapeSecondary="landscape-secondary"}(ce||(ce={})),function(e){e.isLandscape=function(t){return t===e.LandscapePrimary||t===e.LandscapeSecondary},e.isPortrait=function(t){return t===e.PortraitPrimary||t===e.PortraitSecondary}}(ce||(ce={}));var be,me,ye={"safe-area-inset":{top:"safe-area-inset-top",right:"safe-area-inset-right",bottom:"safe-area-inset-bottom",left:"safe-area-inset-left"},"safe-area-max-inset":{top:"safe-area-max-inset-top",right:"safe-area-max-inset-right",bottom:"safe-area-max-inset-bottom",left:"safe-area-max-inset-left"},"titlebar-area":{x:"titlebar-area-x",y:"titlebar-area-y",width:"titlebar-area-width",height:"titlebar-area-height"},"keyboard-inset":{top:"keyboard-inset-top",right:"keyboard-inset-right",bottom:"keyboard-inset-bottom",left:"keyboard-inset-left",width:"keyboard-inset-width",height:"keyboard-inset-height"},"viewport-segment":{width:"viewport-segment-width",height:"viewport-segment-height",top:"viewport-segment-top",right:"viewport-segment-right",bottom:"viewport-segment-bottom",left:"viewport-segment-left"}};function we(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}be=void 0!==globalThis.matchMedia?globalThis.matchMedia("(orientation: portrait)"):r,me=void 0!==globalThis.matchMedia?globalThis.matchMedia("(device-posture: folded)"):r;function Te(){}function ke(){if(void 0!==globalThis.CSS&&"function"==typeof globalThis.CSS.supports){if(globalThis.CSS.supports("x: env(x)"))return"env";if(globalThis.CSS.supports("x: constant(x)"))return"constant"}}function Se(){var e=globalThis.viewport,t=globalThis.visualViewport,n=globalThis.navigator.devicePosture,r=void 0!==e,o=!r&&null!=t&&void 0!==t.segments,i=void 0!==n,a=Q((function(){D.add(globalThis,{type:"resize",callback:h}),r?p():o?(g(),p()):(null!==c||(c=b(),globalThis.document.body.appendChild(c)),g())}),(function(){D.remove(globalThis,{type:"resize",callback:h}),r?f():o?(v(),f()):(v(),null!==c&&(null!==c.parentNode&&c.parentNode.removeChild(c),c=null))})),l=ke(),c=null,s=[],u=null;function d(){s=function(){if("function"!=typeof globalThis.matchMedia)return[];for(var e=[],t=2;t<=4;t++)e.push(globalThis.matchMedia("(horizontal-viewport-segments: "+t+")")),e.push(globalThis.matchMedia("(vertical-viewport-segments: "+t+")"));return e}();for(var e=0;e<s.length;e++)D.add(s[e],{type:"change",callback:h});"not all"!==me.media&&D.add(me,{type:"change",callback:h})}function p(){i&&D.add(n,{type:"change",callback:h}),d()}function f(){i&&D.remove(n,{type:"change",callback:h}),function(){for(var e=0;e<s.length;e++)D.remove(s[e],{type:"change",callback:h});s=[],"not all"!==me.media&&D.remove(me,{type:"change",callback:h})}()}function g(){D.add(t,{type:"resize",callback:h,options:{passive:!0}})}function v(){D.remove(t,{type:"resize",callback:h,options:{passive:!0}})}function h(){var e=w();null!==u&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],o=t[n];if(r.width!==o.width||r.height!==o.height||r.top!==o.top||r.left!==o.left||r.bottom!==o.bottom||r.right!==o.right)return!1}return!0}(u,e)||(u=e,a.emit(e))}function b(){var e=le("div");return e.setAttribute("data-viewport-segment-observer",""),e.style.setProperty("position","fixed","important"),e.style.setProperty("top","0","important"),e.style.setProperty("left","0","important"),e.style.setProperty("visibility","hidden","important"),e.style.setProperty("pointer-events","none","important"),e.style.setProperty("z-index","-1","important"),e.style.setProperty("box-sizing","content-box","important"),e.style.setProperty("padding","0","important"),e.style.setProperty("margin","0","important"),e.style.setProperty("border","0","important"),e.style.setProperty("width","0","important"),e.style.setProperty("height","0","important"),e.style.setProperty("min-width","0","important"),e.style.setProperty("min-height","0","important"),e.style.setProperty("max-width","none","important"),e.style.setProperty("max-height","none","important"),e.style.setProperty("transition","none","important"),e.style.setProperty("animation","none","important"),e.style.setProperty("display","block","important"),e.style.setProperty("float","none","important"),e.style.setProperty("transform","none","important"),e}function m(){var e=globalThis.innerWidth,t=globalThis.innerHeight;return{width:e,height:t,top:0,left:0,bottom:t,right:e}}function y(e){var t=function(){if("function"!=typeof globalThis.matchMedia)return{rows:1,cols:1};for(var e=1,t=1,n=4;n>=2;n--)if(globalThis.matchMedia("(horizontal-viewport-segments: "+n+")").matches){e=n;break}for(n=4;n>=2;n--)if(globalThis.matchMedia("(vertical-viewport-segments: "+n+")").matches){t=n;break}return{rows:t,cols:e}}();if(1===t.rows&&1===t.cols)return[m()];if(void 0===l||void 0===e.style.setProperty)return[m()];for(var n=[],r=0;r<t.rows;r++)for(var o=0;o<t.cols;o++){e.style.setProperty("width",l+"(viewport-segment-width "+r+" "+o+", -1px)","important"),e.style.setProperty("height",l+"(viewport-segment-height "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-top",l+"(viewport-segment-top "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-left",l+"(viewport-segment-left "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-bottom",l+"(viewport-segment-bottom "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-right",l+"(viewport-segment-right "+r+" "+o+", -1px)","important");var i=globalThis.getComputedStyle(e),a=globalThis.parseFloat(i.marginTop);if(!(a<0)){var c=globalThis.parseFloat(i.marginLeft),s=globalThis.parseFloat(i.marginBottom),u=globalThis.parseFloat(i.marginRight),d=globalThis.parseFloat(i.width),p=globalThis.parseFloat(i.height);n.push({width:d,height:p,top:a,left:c,bottom:s,right:u})}}return n}function w(){if(r||o)return function(){var n;if(null==(n=r?e.segments:t.segments))return[];for(var o=[],i=0;i<n.length;i++){var a=n[i];o.push({width:a.width,height:a.height,top:a.top,left:a.left,bottom:a.bottom,right:a.right})}return o}();if(null!==c)return y(c);var n=b();globalThis.document.body.appendChild(n);var i=y(n);return globalThis.document.body.removeChild(n),i}return{get value(){return w()},onChange:a.subscribe,useCssVariable:function(e){if(void 0===globalThis.document)return Te;var t=we(ye["viewport-segment"]),n=globalThis.document.documentElement,r=0;function o(o){for(var i=o.length;i<r;i++)for(var a=0;a<t.length;a++)n.style.removeProperty("--"+e+"-"+i+"-"+t[a]);r=o.length;for(i=0;i<o.length;i++){var l=o[i];for(a=0;a<t.length;a++){var c=t[a];n.style.setProperty("--"+e+"-"+i+"-"+c,l[c]+"px")}}}o(w());var i=a.subscribe((function(e){o(e)}));return function(){i();for(var o=0;o<r;o++)for(var a=0;a<t.length;a++)n.style.removeProperty("--"+e+"-"+o+"-"+t[a]);r=0}}}}function Ee(e){if("keyboard-inset"===e&&void 0!==globalThis.navigator.virtualKeyboard)return function(){var e=Q((function(){D.add(globalThis.navigator.virtualKeyboard,{type:"geometrychange",callback:t,options:{passive:!0}})}),(function(){D.remove(globalThis.navigator.virtualKeyboard,{type:"geometrychange",callback:t,options:{passive:!0}})}));function t(){e.emit(n())}function n(){var e=globalThis.navigator.virtualKeyboard.boundingRect,t=e.x,n=e.y,r=e.width,o=e.height;return{top:n,right:0===r?0:Math.max(0,globalThis.innerWidth-(t+r)),bottom:0===o?0:Math.max(0,globalThis.innerHeight-(n+o)),left:t,width:r,height:o}}return{get value(){return n()},onChange:e.subscribe,useCssVariable:function(t){if(void 0===globalThis.document)return Te;var r=we(ye["keyboard-inset"]),o=globalThis.document.documentElement;function i(e){for(var n=0;n<r.length;n++){var i=r[n];o.style.setProperty("--"+t+"-"+i,e[i]+"px")}}i(n());var a=e.subscribe((function(e){i(e)}));return function(){a();for(var e=0;e<r.length;e++)o.style.removeProperty("--"+t+"-"+r[e])}}}}();if("viewport-segment"===e)return Se();var t=ye[e],n=we(t),r=ke(),o=[],i=Q((function(){if(void 0===r)return;null===c&&v()}),(function(){h()})),a={},l=void 0,c=null,s=!1,u=null;try{var d=Object.defineProperty({},"passive",{get:function(){l={passive:!0}}});D.add(globalThis,{type:"test",callback:Te,options:d})}catch(e){}function p(){var e;s||(s=!0,e=function(){s=!1;var e=m();null!==u&&function(e,t){for(var r=0;r<n.length;r++){var o=n[r];if(e[o]!==t[o])return!1}return!0}(u,e)||(u=e,i.emit(e))},void 0===globalThis.queueMicrotask?"function"!=typeof globalThis.Promise?globalThis.setTimeout(e,0):Promise.resolve().then(e):globalThis.queueMicrotask(e))}function f(e){if(void 0!==e)o.push(e);else for(var t=0;t<o.length;t++)o[t]()}function g(e,n){var o=t[n],i=globalThis.document.createElement("div"),c=globalThis.document.createElement("div"),s=globalThis.document.createElement("div"),u=globalThis.document.createElement("div"),d={position:"absolute",width:"100px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:r+"("+o+")"};ae(i,d),ae(c,d),ae(s,{transition:"0s",animation:"none",width:"400px",height:"400px"}),ae(u,{transition:"0s",animation:"none",width:"250%",height:"250%"}),i.appendChild(s),c.appendChild(u),e.appendChild(i),e.appendChild(c),f((function(){i.scrollTop=c.scrollTop=1e4;var e=i.scrollTop,t=c.scrollTop;function n(){var n;n=this===i?e:t,this.scrollTop!==n&&(i.scrollTop=c.scrollTop=1e4,e=i.scrollTop,t=c.scrollTop,p())}D.add(i,{type:"scroll",callback:n,options:l}),D.add(c,{type:"scroll",callback:n,options:l})}));var g=globalThis.getComputedStyle(i);Object.defineProperty(a,n,{configurable:!0,get:function(){return globalThis.parseFloat(g.paddingBottom)}})}function v(){if(void 0!==r){a={},(c=globalThis.document.createElement("div")).setAttribute("data-"+e+"-observer",""),ae(c,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"});for(t=0;t<n.length;t++)g(c,n[t]);globalThis.document.body.appendChild(c),u=m(),f()}else for(var t=0;t<n.length;t++)a[n[t]]=0}function h(){null!==c&&(null!==c.parentNode&&c.parentNode.removeChild(c),c=null),o.length=0,a={},u=null}function b(e){return a[e]}function m(){for(var e={},t=0;t<n.length;t++){var r=n[t];e[r]=b(r)}return e}return{get value(){if(null!==c)return m();v();var e=m();return h(),e},onChange:function(e,t){return void 0===t&&(t={}),void 0===r?Te:i.subscribe(e,t)},useCssVariable:function(e){if(void 0===r||void 0===globalThis.document)return Te;var t=globalThis.document.documentElement;function o(r){for(var o=0;o<n.length;o++){var i=n[o];t.style.setProperty("--"+e+"-"+String(n[o]),r[i]+"px")}}var a=i.subscribe((function(e){o(e)}));return o(m()),function(){a();for(var r=0;r<n.length;r++)t.style.removeProperty("--"+e+"-"+String(n[r]))}}}}function Pe(e,t){function n(r){if(!(this instanceof n))return new n(r);var o=new t(void 0===r?"":r);if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,n.prototype):o.__proto__=n.prototype,o.name=e,void 0!==r&&(o.message=r),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(o,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(o,n);else if(t.captureStackTrace&&"function"==typeof t.captureStackTrace)t.captureStackTrace(o,n);else try{var i=new t;i.stack&&(o.stack=i.stack)}catch(e){}return o}void 0===t&&(t=Error),n.prototype=Object.create(t.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(t){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}var xe=Pe("PermissionNotGrantedError"),Ie=Pe("NotSupportedError"),Ae=Ee("safe-area-inset"),Oe=Ee("safe-area-max-inset"),De=Ee("keyboard-inset"),Me=Ee("titlebar-area"),Ce=Ee("viewport-segment"),Ne=Q((function(){Ue=Ge(),D.add(globalThis,{type:"resize",callback:Be})}),(function(){Ue=null,D.remove(globalThis,{type:"resize",callback:Be})})),Le=Q((function(){void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&"function"==typeof globalThis.screen.orientation.addEventListener?D.add(globalThis.screen.orientation,{type:"change",callback:He}):void 0!==globalThis.orientation?D.add(globalThis,{type:"orientationchange",callback:He}):"not all"!==be.media&&D.add(be,{type:"change",callback:He});throw new Ie("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported")}),(function(){void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&"function"==typeof globalThis.screen.orientation.removeEventListener?D.remove(globalThis.screen.orientation,{type:"change",callback:He}):void 0!==globalThis.orientation?D.remove(globalThis,{type:"orientationchange",callback:He}):"not all"!==be.media&&D.remove(be,{type:"change",callback:He});throw new Ie("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported")})),Fe=Q((function(){return new Promise((function(e,t){if(!je())return t(new Ie("'window.DeviceOrientationEvent' does not supported."));var n=DeviceOrientationEvent;if("function"!=typeof n.requestPermission)return D.add(globalThis,{type:"deviceorientation",callback:Ve}),e();n.requestPermission().then((function(n){return"granted"===n?(D.add(globalThis,{type:"deviceorientation",callback:Ve}),e()):t(new xe("'deviceorientation' permission is not granted."))})).catch((function(e){return t(new Ie("'window.DeviceOrientationEvent' does not supported."))}))}))}),(function(){D.remove(globalThis,{type:"deviceorientation",callback:Ve})})),Ue=null,_e=null,qe=null,We={get value(){return Ge()},environment:{safeAreaInset:Ae,safeAreaMaxInset:Oe,keyboardInset:De,titlebarArea:Me,viewportSegment:Ce},screenOrientation:{get supported(){return void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&void 0!==globalThis.screen.orientation.type||void 0!==globalThis.orientation||"not all"!==be.media},get value(){return Re()},onChange:Le.subscribe},deviceOrientation:{get supported(){return je()},get value(){return new Promise((function(e,t){if(null!==qe)return e(qe);if(!je())return t(new Ie("'window.DeviceOrientationEvent' does not supported."));var n=DeviceOrientationEvent,r=function(t){var n={alpha:t.alpha,beta:t.beta,gamma:t.gamma,absolute:t.absolute};return qe=n,D.remove(globalThis,{type:"deviceorientation",callback:r}),e(n)};"function"==typeof n.requestPermission?n.requestPermission().then((function(e){if("granted"!==e)return t(new xe("'deviceorientation' permission is not granted."));D.add(globalThis,{type:"deviceorientation",callback:r})})).catch((function(e){return t(new Ie("'window.DeviceOrientationEvent' does not supported."))})):D.add(globalThis,{type:"deviceorientation",callback:r})}))},onChange:Fe.subscribe},onChange:Ne.subscribe,Constants:{Orientation:ce},Errors:{NotSupportedError:Ie,PermissionNotGrantedError:xe}};function Re(){if(void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&void 0!==globalThis.screen.orientation.type)switch(globalThis.screen.orientation.type){case"portrait-primary":return ce.PortraitPrimary;case"portrait-secondary":return ce.PortraitSecondary;case"landscape-primary":return ce.LandscapePrimary;case"landscape-secondary":return ce.LandscapeSecondary}if(void 0!==globalThis.orientation)switch(globalThis.orientation){case 0:return ce.PortraitPrimary;case 180:return ce.PortraitSecondary;case 90:return ce.LandscapePrimary;case-90:case 270:return ce.LandscapeSecondary}if("not all"===be.media)throw new Ie("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported");return be.matches?ce.PortraitPrimary:ce.LandscapePrimary}function Ge(){var e=0,t=0,n=0,r=0,o=void 0!==globalThis.devicePixelRatio?globalThis.devicePixelRatio:-1;return void 0!==globalThis.innerWidth&&(e=globalThis.innerWidth,t=globalThis.innerHeight,n=globalThis.outerWidth,r=globalThis.outerHeight),{innerWidth:e,innerHeight:t,outerWidth:n,outerHeight:r,scale:o}}function Be(){var e=Ge();null!==Ue&&e.innerWidth===Ue.innerWidth&&e.innerHeight===Ue.innerHeight&&e.outerWidth===Ue.outerWidth&&e.outerHeight===Ue.outerHeight&&e.scale===Ue.scale||Ne.emit(Ue=e)}function He(){var e=Re();null!==_e&&e===_e||Le.emit(_e=e)}function je(){return void 0!==globalThis.DeviceOrientationEvent}function Ve(e){qe={alpha:e.alpha,beta:e.beta,gamma:e.gamma,absolute:e.absolute},Fe.emit(qe)}var ze,Ye,Ke=Pe("InvalidStateError"),Ze=null,Xe=null,Je=!1,Qe=function(){if("function"==typeof Symbol){var e=globalThis.__nativeFnFsBridgeKey__;return"symbol"==typeof e?e:globalThis.__nativeFnFsBridgeKey__=Symbol("native.fn.fs.bridged")}return"__nativeFnFsBridged__"}(),$e={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"}}},et=function(){var e=globalThis.document.documentElement;if(void 0!==globalThis.document.fullscreenEnabled||void 0!==globalThis.document.exitFullscreen)return $e.standard;for(var t=["webkit","moz","ms"],n=0;n<t.length;n++){var r=t[n],o=$e[r];if(void 0!==globalThis.document[o.enabled]||void 0!==globalThis.document[o.element]||void 0!==globalThis.document[o.exit])return"webkit"===r&&void 0!==e.webkitRequestFullScreen&&(o.request="webkitRequestFullScreen"),o}return null}(),tt=Q((function(){null!=et&&D.add(globalThis.document,{type:et.events.change,callback:st,options:!1});J.os.name===o.iOS&&gt()}),(function(){null!=et&&D.remove(globalThis.document,{type:et.events.change,callback:st,options:!1});if(J.os.name!==o.iOS)return;for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)D.remove(e[t],{type:"webkitbeginfullscreen",callback:dt,options:!1}),D.remove(e[t],{type:"webkitendfullscreen",callback:pt,options:!1}),e[t][Qe]=!1})),nt=Q((function(){null!=et&&D.add(globalThis.document,{type:et.events.error,callback:ut,options:!1})}),(function(){null!=et&&D.remove(globalThis.document,{type:et.events.error,callback:ut,options:!1})})),rt={get supported(){return function(){if(null!==et)return!0===globalThis.document[et.enabled];if(J.os.name!==o.iOS)return!1;var e=(t=globalThis.document.querySelector("video"),null!==t?t:null===Ze?Ze=globalThis.document.createElement("video"):Ze);var t;return!0===e.webkitSupportsFullscreen||"function"==typeof e.webkitEnterFullscreen}()},get element(){return ot()},get isActive(){return it()},request:function(e,t){return new Promise((function(n,r){if(void 0===e&&(e=function(){if(J.os.name===o.iOS){var e=globalThis.document.querySelector("video");return null!==e?e:void 0}return globalThis.document.documentElement}()),void 0===e)return r(new Ie("Failed to enter fullscreen mode."));if(it()&&ot()!==e&&J.browser.name===l.Safari&&J.os.name===o.iOS)return r(new Ie("There is already a Fullscreen element in this document."));var i=e.tagName.toLowerCase(),a=null!==Xe&&!0===Xe.webkitDisplayingFullscreen;if(null!==et){var c=e[et.request];if("function"==typeof c&&!a){var s=c.call(e,t);return void 0!==s&&"function"==typeof s.then?void s.then(n).catch((function(){try{if(J.os.name!==o.iOS)return r(new Ie('The "'+i+'" element does not support fullscreen requests.'));u()}catch(e){r(new Ie('The "'+i+'" element does not support fullscreen requests.'))}})):n()}}function u(){if(J.os.name===o.iOS&&void 0!==e&&"VIDEO"===e.tagName.toUpperCase()){var t=e;if(t.webkitSupportsFullscreen&&"function"==typeof t.webkitEnterFullscreen){if(null===et&&ft(t),0===t.played.length)t.play().then((function(){try{t.webkitSupportsFullscreen&&"function"==typeof t.webkitEnterFullscreen&&t.webkitEnterFullscreen()}catch(e){return r(new Ke("The object is in an invalid state."))}}));else try{t.webkitEnterFullscreen()}catch(e){return r(new Ke("The object is in an invalid state."))}return Xe=t,n()}}r(new Ie('The "'+i+'" element does not support fullscreen requests.'))}u()}))},exit:function(){return new Promise((function(e,t){if(null!==et){var n=globalThis.document[et.exit];if("function"==typeof n){var r=n.call(globalThis.document);return void 0!==r&&"function"==typeof r.then?void r.then(e).catch(e):e()}}!function(){if(J.os.name===o.iOS){var n=Xe;if(null!==n&&"function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n.webkitDisplayingFullscreen?t(new Ie("Failed to exit fullscreen mode.")):(Xe=null,e());for(var r=globalThis.document.querySelectorAll("video"),i=0;i<r.length;i++){var a=r[i];if("function"==typeof a.webkitExitFullscreen&&!0===a.webkitDisplayingFullscreen)return a.webkitExitFullscreen(),a.webkitDisplayingFullscreen?t(new Ie("Failed to exit fullscreen mode.")):(Xe=null,e())}if(null===ot())return e();t(new Ie("Failed to exit fullscreen mode."))}else t(new Ie("Failed to exit fullscreen mode."))}()}))},toggle:function(e,t){var n=ot();if(void 0!==e)return n===e?this.exit():this.request(e,t);return null!==n?this.exit():this.request(void 0,t)},onChange:function(e,t,n){if("function"==typeof e)return tt.subscribe(e,t);var r=e,o=t;return tt.subscribe((function(e){e.element===r&&o(e)}),n)},onError:function(e,t,n){if("function"==typeof e)return nt.subscribe(e,t);var r=e,o=t;return nt.subscribe((function(e){e.element===r&&o(e)}),n)},Constants:{},Errors:{NotSupportedError:Ie,InvalidStateError:Ke}};function ot(){if(null===et)return null!==Xe&&!0===Xe.webkitDisplayingFullscreen?Xe:null;var e=globalThis.document[et.element];return void 0!==e?e:null}function it(){return null!==ot()}function at(e,t,n){return{nativeEvent:e,element:t,isActive:n}}function lt(e,t,n){tt.emit(at(e,t,n))}function ct(e,t,n){nt.emit(at(e,t,n))}function st(e){var t=e.target;t instanceof globalThis.Element&&lt(e,t,it()),t instanceof globalThis.Document&&lt(e,globalThis.document.documentElement,it())}function ut(e){var t=e.target;t instanceof globalThis.Element&&ct(e,t,it()),t instanceof globalThis.Document&&ct(e,globalThis.document.documentElement,it())}function dt(e){Xe=this,lt(e,this,!0)}function pt(e){Xe===this&&(Xe=null),lt(e,this,!1)}function ft(e){e[Qe]||void 0===e.webkitEnterFullscreen&&void 0===e.onwebkitbeginfullscreen||(D.add(e,{type:"webkitbeginfullscreen",callback:dt,options:!1}),D.add(e,{type:"webkitendfullscreen",callback:pt,options:!1}),e[Qe]=!0)}function gt(){for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)ft(e[t])}Je||(Je=!0,J.os.name===o.iOS&&(gt(),void 0!==globalThis.MutationObserver&&new globalThis.MutationObserver((function(e){if(null!==Xe){for(var t=!1,n=0;n<e.length;n++){for(var r=e[n].removedNodes,o=0;o<r.length;o++)if((a=r[o])===Xe||a.nodeType===Node.ELEMENT_NODE&&a.contains(Xe)){t=!0;break}if(t)break}t&&!globalThis.document.contains(Xe)&&(Xe=null)}for(n=0;n<e.length;n++){var i=e[n].addedNodes;for(o=0;o<i.length;o++){var a;if((a=i[o]).nodeType===Node.ELEMENT_NODE){var l=a;if("VIDEO"!==l.tagName)for(var c=l.querySelectorAll("video"),s=0;s<c.length;s++)ft(c[s]);else ft(l)}}}})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0}))),function(e){e.Notification="notifications",e.Geolocation="geolocation",e.Camera="camera",e.ClipboardRead="clipboard-read",e.Microphone="microphone",e.MIDI="midi",e.DeviceOrientation="device-orientation",e.DeviceMotion="device-motion"}(ze||(ze={})),function(e){e.Grant="grant",e.Denied="denied",e.Prompt="prompt",e.Unsupported="unsupported"}(Ye||(Ye={}));var vt=function(){if(void 0!==globalThis.navigator.mediaDevices&&void 0!==globalThis.navigator.mediaDevices.getUserMedia)return globalThis.navigator.mediaDevices.getUserMedia.bind(globalThis.navigator.mediaDevices);var e=void 0!==globalThis.navigator.getUserMedia?globalThis.navigator.getUserMedia:void 0!==globalThis.navigator.webkitGetUserMedia?globalThis.navigator.webkitGetUserMedia:void 0!==globalThis.navigator.mozGetUserMedia?globalThis.navigator.mozGetUserMedia:void 0!==globalThis.navigator.msGetUserMedia?globalThis.navigator.msGetUserMedia:void 0;return void 0!==e?function(t){return void 0===t&&(t={}),new Promise((function(n,r){e.call(globalThis.navigator,t,n,r)}))}:void 0}(),ht={get supported(){return void 0!==globalThis.navigator.permissions},request:function(e){var t=this;return new Promise((function(n,r){function o(){t.check(e).then(n)}t.check(e).then((function(t){if(t===Ye.Grant)return n(t);switch(e){case ze.Notification:if(void 0===globalThis.Notification)return n(Ye.Unsupported);globalThis.Notification.requestPermission().then((function(e){n(bt(e))}));break;case ze.Geolocation:if(void 0===globalThis.navigator.geolocation)return n(Ye.Unsupported);globalThis.navigator.geolocation.getCurrentPosition(o,o);break;case ze.Microphone:case ze.Camera:if(void 0===vt)return n(Ye.Unsupported);vt({video:e===ze.Camera,audio:e===ze.Microphone}).then((function(e){for(var t=e.getTracks(),n=0;n<t.length;n++)t[n].stop();o()})).catch(o);break;case ze.ClipboardRead:if(void 0===globalThis.navigator.clipboard||void 0===globalThis.navigator.clipboard.read)return n(Ye.Unsupported);globalThis.navigator.clipboard.read().then(o).catch(o);break;case ze.MIDI:if(void 0===globalThis.navigator.requestMIDIAccess)return n(Ye.Unsupported);globalThis.navigator.requestMIDIAccess().then(o).catch(o);break;case ze.DeviceOrientation:case ze.DeviceMotion:var i=mt(e);if(void 0===i||void 0===i.event)return n(Ye.Unsupported);if("function"!=typeof i.event.requestPermission)return n(Ye.Grant);try{i.event.requestPermission().then((function(e){n(bt(e))}))}catch(e){return r(new Ie("'DeviceOrientationEvent.requestPermission()' must be called within a user gesture context."))}break;default:return n(Ye.Unsupported)}}))}))},check:function(e){if(e===ze.DeviceOrientation||e===ze.DeviceMotion)return new Promise((function(t){var n=mt(e);if(void 0===n||void 0===n.event)return t(Ye.Unsupported);if("function"!=typeof n.event.requestPermission)return t(Ye.Grant);var r=!1;D.add(globalThis,{type:n.type,callback:function(){r=!0},options:{once:!0}}),setTimeout((function(){if(r)return t(Ye.Grant);n.event.requestPermission().then((function(e){t(bt(e))})).catch((function(){t(Ye.Prompt)}))}),50)}));return new Promise((function(t){if(void 0===globalThis.navigator.permissions)return t(Ye.Unsupported);globalThis.navigator.permissions.query({name:e}).then((function(e){switch(e.state){case"prompt":return t(Ye.Prompt);case"granted":return t(Ye.Grant);case"denied":return t(Ye.Denied);default:return t(Ye.Unsupported)}}))}))},Constants:{PermissionType:ze,PermissionState:Ye},Errors:{NotSupportedError:Ie}};function bt(e){switch(e){case"granted":return Ye.Grant;case"denied":return Ye.Denied;case"prompt":case"default":return Ye.Prompt;default:return Ye.Unsupported}}function mt(e){switch(e){case ze.DeviceOrientation:return{event:globalThis.DeviceOrientationEvent,type:"deviceorientation"};case ze.DeviceMotion:return{event:globalThis.DeviceMotionEvent,type:"devicemotion"};default:return}}var yt,wt,Tt,kt,St,Et,Pt,xt,It,At,Ot,Dt=Q((function(){if(!Nt())return;ht.request(ze.Geolocation).then((function(e){e===Ye.Grant&&(Mt=globalThis.navigator.geolocation.watchPosition((function(e){var t;t=e.coords,Dt.emit(t)})))}))}),(function(){if(!Nt()||null===Mt)return;globalThis.navigator.geolocation.clearWatch(Mt)})),Mt=null,Ct={get value(){return new Promise((function(e,t){function n(n){(function(e){return new Promise((function(t,n){var r;(r="http://ip-api.com/json?fields=lat,lon",new Promise((function(e){var t={},n=void 0;if(void 0===globalThis.fetch){if("undefined"!=typeof XMLHttpRequest){var o=new XMLHttpRequest;o.open("GET",r,!0);for(var i=we(t),a=0;a<i.length;a++){var l=i[a];o.setRequestHeader(l,t[l])}return o.onreadystatechange=function(){if(4===o.readyState)if(o.status>=200&&o.status<300)try{e(JSON.parse(o.responseText))}catch(t){e(void 0)}else e(void 0)},o.onerror=function(){e(void 0)},void o.send(n)}e(void 0)}else fetch(r,{method:"GET",headers:t,body:n}).then((function(t){return t.ok?t.json().then((function(t){e(t)})).catch((function(){e(void 0)})):(e(void 0),Promise.resolve())})).catch((function(){e(void 0)}))}))).then((function(r){if(void 0!==r){var o={latitude:r.lat,longitude:r.lon,accuracy:-1,altitude:null,altitudeAccuracy:null,heading:null,speed:null};t(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=Object(e[0]),r=1;r<e.length;r++){var o=e[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&"__proto__"!==i&&"constructor"!==i&&"prototype"!==i&&(n[i]=o[i])}return n}(o,{toJSON:function(){return o}}))}else n(e)})).catch((function(){n(e)}))}))})(n).then(e).catch(t)}if(!Nt())return n(new Ie("'navigator.geolocation' does not supported."));ht.request(ze.Geolocation).then((function(t){if(t!==Ye.Grant)return n(new xe("'geolocation' permission is not granted."));globalThis.navigator.geolocation.getCurrentPosition((function(t){e(t.coords)}),(function(e){return n(function(e){switch(e.code){case GeolocationPositionError.PERMISSION_DENIED:return new xe("'geolocation' permission is not granted.");case GeolocationPositionError.POSITION_UNAVAILABLE:return new Ie("The acquisition of the geolocation failed because at least one internal source of position returned an internal error.");case GeolocationPositionError.TIMEOUT:return new Ie("The time allowed to acquire the geolocation was reached before the information was obtained.");default:return new Ie("Unknown error.")}}(e))}))}))}))},get supported(){return Nt()},onChange:Dt.subscribe,Constants:{},Errors:{NotSupportedError:Ie,PermissionNotGrantedError:xe}};function Nt(){return void 0!==globalThis.navigator.geolocation}!function(e){e[e.Scheme=0]="Scheme",e[e.Universal=1]="Universal",e[e.Intent=2]="Intent",e[e.Fallback=3]="Fallback",e[e.Store=4]="Store"}(Et||(Et={})),function(e){e.General="general",e.Network="network",e.Display="display",e.Appearance="appearance",e.Accessibility="accessibility",e.Battery="battery",e.Datetime="datetime",e.Language="language",e.Accounts="accounts",e.Storage="storage"}(Pt||(Pt={})),function(e){e.Image="image",e.Video="video"}(xt||(xt={})),function(e){e.User="user",e.Environment="environment"}(It||(It={})),function(e){e.Desktop="desktop",e.Documents="documents",e.Downloads="downloads",e.Music="music",e.Pictures="pictures",e.Videos="videos"}(At||(At={})),function(e){e.Read="read",e.ReadWrite="readwrite"}(Ot||(Ot={}));var Lt=((yt={})[o.Android]=((wt={})[Pt.General]="intent:#Intent;action=android.settings.SETTINGS;end",wt[Pt.Network]="intent:#Intent;action=android.settings.WIFI_SETTINGS;end",wt[Pt.Display]="intent:#Intent;action=android.settings.DISPLAY_SETTINGS;end",wt[Pt.Appearance]="intent:#Intent;action=android.settings.DISPLAY_SETTINGS;end",wt[Pt.Accessibility]="intent:#Intent;action=android.settings.ACCESSIBILITY_SETTINGS;end",wt[Pt.Battery]="intent:#Intent;action=android.settings.BATTERY_SAVER_SETTINGS;end",wt[Pt.Datetime]="intent:#Intent;action=android.settings.DATE_SETTINGS;end",wt[Pt.Language]="intent:#Intent;action=android.settings.LOCALE_SETTINGS;end",wt[Pt.Accounts]="intent:#Intent;action=android.settings.SYNC_SETTINGS;end",wt[Pt.Storage]="intent:#Intent;action=android.settings.INTERNAL_STORAGE_SETTINGS;end",wt),yt[o.Windows]=((Tt={})[Pt.General]="ms-settings:system",Tt[Pt.Network]="ms-settings:network",Tt[Pt.Display]="ms-settings:display",Tt[Pt.Appearance]="ms-settings:colors",Tt[Pt.Accessibility]="ms-settings:easeofaccess",Tt[Pt.Battery]="ms-settings:batterysaver",Tt[Pt.Datetime]="ms-settings:dateandtime",Tt[Pt.Language]="ms-settings:regionlanguage",Tt[Pt.Accounts]="ms-settings:emailandaccounts",Tt[Pt.Storage]="ms-settings:storagesense",Tt),yt[o.MacOS]=((kt={})[Pt.General]="x-apple.systempreferences:",kt[Pt.Network]="x-apple.systempreferences:com.apple.preference.network",kt[Pt.Display]="x-apple.systempreferences:com.apple.preference.displays",kt[Pt.Appearance]="x-apple.systempreferences:com.apple.preference.general",kt[Pt.Accessibility]="x-apple.systempreferences:com.apple.preference.universalaccess",kt[Pt.Battery]="x-apple.systempreferences:com.apple.preference.energysaver",kt[Pt.Datetime]="x-apple.systempreferences:com.apple.preference.datetime",kt[Pt.Language]="x-apple.systempreferences:com.apple.Localization",kt[Pt.Accounts]="x-apple.systempreferences:com.apple.preferences.internetaccounts",kt[Pt.Storage]="x-apple.systempreferences:",kt),yt["MacOS13+"]=((St={})[Pt.General]="x-apple.systempreferences:com.apple.General-Settings.extension",St[Pt.Network]="x-apple.systempreferences:com.apple.Network-Settings.extension",St[Pt.Display]="x-apple.systempreferences:com.apple.Displays-Settings.extension",St[Pt.Appearance]="x-apple.systempreferences:com.apple.Appearance-Settings.extension",St[Pt.Accessibility]="x-apple.systempreferences:com.apple.Accessibility-Settings.extension",St[Pt.Battery]="x-apple.systempreferences:com.apple.Battery-Settings.extension",St[Pt.Datetime]="x-apple.systempreferences:com.apple.Date-Time-Settings.extension",St[Pt.Language]="x-apple.systempreferences:com.apple.Localization-Settings.extension",St[Pt.Accounts]="x-apple.systempreferences:com.apple.Internet-Accounts-Settings.extension",St[Pt.Storage]="x-apple.systempreferences:com.apple.settings.Storage",St),yt);function Ft(){try{if(null!==globalThis.top&&globalThis.top!==globalThis.window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}function Ut(e,t){var n;void 0===t&&(t=globalThis);try{n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:t})}catch(e){(n=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(n)}function _t(e){for(var t="",n=(new Date).getTime(),r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt((n=(9301*n+49297)%233280)%62);return t}function qt(e,t,n){return t|=0,"string"!=typeof e&&(e=String(e)),e.length>=t?e:((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),n.slice(0,t)+e)}var Wt=Pe("URLOpenError"),Rt=Pe("UserCancelledError"),Gt={app:function(e){var t,n=J.os.name,r=[],i=[],a={};if(n===o.Android){var l=function(e){return void 0!==e[o.Android]?e[o.Android]:e.android}(e);if(void 0===l)return Promise.reject(un(i));if(t=l.timeout,a.scheme=cn(l.scheme),a.intent=cn(l.intent),a.packageName=l.packageName,a.fallback=cn(l.fallback),a.appStore=Vt(a.packageName,o.Android),a.webStore=zt(a.packageName,o.Android),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.intent&&(void 0===a.scheme||void 0===a.packageName||void 0===a.fallback)){var c=function(e){for(var t={},n=e.split("#Intent;"),r=n[0].substring(9),o=n[1],i=o.substring(0,o.length-4).split(";"),a={},l=0;l<i.length;l++){var c=i[l],s=c.indexOf("=");-1!==s&&(a[c.substring(0,s)]=c.substring(s+1))}void 0!==a.scheme&&(t.scheme=a.scheme+"://"+r);void 0!==a.package&&(t.packageName=a.package);void 0!==a["S.browser_fallback_url"]&&(t.fallback=a["S.browser_fallback_url"]);return t}(a.intent);void 0!==c.scheme&&void 0===a.scheme&&(a.scheme=c.scheme),void 0!==c.packageName&&void 0===a.packageName&&(a.packageName=c.packageName),void 0!==c.fallback&&void 0===a.fallback&&(a.fallback=c.fallback)}void 0!==a.scheme&&void 0===a.intent&&(a.intent=function(e,t,n){var r=e.split("://"),i=r[0],a=r[1],l="intent://";void 0!==a&&(l+=a);l+="#Intent;scheme="+i+";action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;",void 0!==t&&(l+="package="+t+";");void 0!==n&&"string"==typeof n?l+="S.browser_fallback_url="+globalThis.encodeURIComponent(n)+";":void 0!==t&&(l+="S.browser_fallback_url="+globalThis.encodeURIComponent(Vt(t,o.Android))+";");return l+"end"}(a.scheme,a.packageName,a.fallback))}else if(n===o.iOS){l=function(e){return void 0!==e[o.iOS]?e[o.iOS]:e.ios}(e);if(void 0===l)return Promise.reject(un(i));t=l.timeout,a.scheme=cn(l.scheme),a.bundleId=l.bundleId,a.trackId=l.trackId,a.universal=cn(l.universal),a.fallback=cn(l.fallback),a.appStore=Vt(a.trackId,o.iOS),a.webStore=zt(a.trackId,o.iOS),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.bundleId&&void 0===a.trackId&&(a.trackId=jt(a.bundleId))}else if(n===o.Windows){l=function(e){return void 0!==e[o.Windows]?e[o.Windows]:e.windows}(e);if(void 0===l)return Promise.reject(un(i));t=l.timeout,a.scheme=cn(l.scheme),a.productId=l.productId,a.fallback=cn(l.fallback),a.appStore=Vt(a.productId,o.Windows),a.webStore=zt(a.productId,o.Windows),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore}else if(n===o.MacOS){l=function(e){return void 0!==e[o.MacOS]?e[o.MacOS]:e.macos}(e);if(void 0===l)return Promise.reject(un(i));t=l.timeout,a.scheme=cn(l.scheme),a.bundleId=l.bundleId,a.trackId=l.trackId,a.fallback=cn(l.fallback),a.appStore=Vt(a.trackId,o.MacOS),a.webStore=zt(a.trackId,o.MacOS),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.bundleId&&void 0===a.trackId&&(a.trackId=jt(a.bundleId))}en(r,a.intent,Et.Intent,Kt()),en(r,a.universal,Et.Universal,Zt()),en(r,a.scheme,Et.Scheme,!0),en(r,a.fallback,Et.Fallback,!0),en(r,a.appStore,Et.Store,a.allowAppStore),en(r,a.webStore,Et.Store,a.allowWebStore),void 0===t&&(t=Yt(n));return new Promise((function(e,n){return function o(a){if(void 0===a&&(a=0),a>=r.length)return n(un(i));var l=r[a],c=l[0],s=l[1];if("string"==typeof s)return i[a]=s,hn(s,a,t).then((function(){e(c)})).catch((function(){o(a+1)}));i[a]="[function fallback]",s(),e(c)}()}))},telephone:function(e){return bn(e,"tel")},message:function(e){return bn(e,"sms")},mail:function(e){return bn(e,"mailto")},file:function(e){if(void 0!==globalThis.showOpenFilePicker){var t={};if(void 0!==e&&(void 0!==e.multiple&&(t.multiple=e.multiple),void 0!==e.id&&(t.id=e.id),void 0!==e.startIn&&(t.startIn=e.startIn),void 0!==e.accept)){var n={};t.excludeAcceptAllOption=!0,t.types=[{description:"",accept:n}];for(var r=0;r<e.accept.length;r++){var o=e.accept[r];/^\.\w+/i.test(o)?(void 0===n["application/octet-stream"]&&(n["application/octet-stream"]=[]),n["application/octet-stream"].push(o)):/^\w+\/\w+$/i.test(o)&&(n[o]=[])}}return gn(globalThis.showOpenFilePicker(t))}var i=le("input");i.type="file",void 0!==e&&(void 0!==e.multiple&&(i.multiple=e.multiple),void 0!==e.accept&&(i.accept=tn(e.accept)));return gn(i)},directory:function(e){if(!Jt())return Promise.reject(new Ie("'window.showDirectoryPicker' and 'HTMLInputElement.prototype.webkitdirectory' does not supported."));if(void 0!==globalThis.showDirectoryPicker){var t={};return void 0!==e&&(void 0!==e.id&&(t.id=e.id),void 0!==e.startIn&&(t.startIn=e.startIn),void 0!==e.mode&&(t.mode=e.mode)),vn(globalThis.showDirectoryPicker(t))}var n=le("input");return n.type="file",n.webkitdirectory=!0,vn(n)},setting:function(e){var t=J.os.name,n=J.os.version;if(!Xt())return Promise.reject(un([]));var r=[];switch(t){case o.Android:e!==Pt.General&&(e===Pt.Accessibility&&u(n,"1.6")>=0?r.push(Lt.Android[Pt.Accessibility]):e===Pt.Battery&&u(n,"5.1")>=0?r.push(Lt.Android[Pt.Battery]):e===Pt.Accounts&&u(n,"1.5")>=0?r.push(Lt.Android[Pt.Accounts]):e===Pt.Storage&&u(n,"3.0")>=0?r.push(Lt.Android[Pt.Storage]):r.push(Lt.Android[e])),r.push(Lt.Android[Pt.General]);break;case o.Windows:r.push(Lt.Windows[e]);break;case o.MacOS:if(e===Pt.Appearance&&u(n,"10.14")<0){r.push(Lt.MacOS[Pt.General]);break}u(n,"13.0")<0?r.push(Lt.MacOS[e]):r.push(Lt["MacOS13+"][e])}return new Promise((function(e,t){return function n(o){return void 0===o&&(o=0),o>=r.length?t(un([])):hn(r[o],o,750).then((function(){e()})).catch((function(){n(o+1)}))}()}))},camera:function(e){var t=le("input");t.type="file",t.accept="image/*;capture=camera",t.capture="environment",void 0!==e&&(void 0!==e.type&&(e.type===xt.Image?t.accept="image/*;capture=camera":t.accept="video/*;capture=camcorder"),void 0!==e.capture&&(e.capture===It.Environment?t.capture="environment":t.capture="user"));return gn(t)},contact:function(e){return new Promise((function(t,n){if(!Qt())return n(new Ie("'navigator.contacts' does not supported."));var r=!1;void 0!==e&&void 0!==e.multiple&&(r=e.multiple),globalThis.navigator.contacts.getProperties().then((function(e){globalThis.navigator.contacts.select(e,{multiple:r}).then((function(e){t(e)}))}))}))},share:function(e){return new Promise((function(t,n){return $t()?globalThis.navigator.canShare(e)?void globalThis.navigator.share(e).then((function(){t()})).catch((function(e){return"AbortError"===e.name?n(new Rt("User cancelled the operation.")):n(new Ie(e.message))})):n(new Ie("The provided data cannot be shared on this device.")):n(new Ie("'navigator.share' does not supported."))}))},calendar:function(e){var t="function"==typeof Date.now?Date.now():(new Date).getTime(),n="BEGIN:VCALENDAR\r\nVERSION:2.0\r\n";""!==globalThis.document.title?n+=ln("PRODID:-//"+on(globalThis.document.title)+"//EN")+"\r\n":n+=ln("PRODID:-//"+on(globalThis.location.host)+"//EN")+"\r\n";n+="BEGIN:VEVENT\r\nUID:"+t+"-"+_t(10)+"\r\nDTSTAMP:"+sn(new Date)+"\r\n",!0===e.allDay?n+="DTSTART;VALUE=DATE:"+sn(e.startDate,!0)+"\r\nDTEND;VALUE=DATE:"+sn(e.endDate,!0)+"\r\n":n+="DTSTART:"+sn(e.startDate)+"\r\nDTEND:"+sn(e.endDate)+"\r\n";void 0!==e.title&&(n+=ln("SUMMARY:"+on(e.title))+"\r\n");void 0!==e.description&&(n+=ln("DESCRIPTION:"+on(e.description))+"\r\n");void 0!==e.location&&(n+=ln("LOCATION:"+on(e.location))+"\r\n");if(void 0!==e.recur){var r="FREQ="+e.recur.frequency;void 0!==e.recur.interval&&e.recur.interval>1&&(r+=";INTERVAL="+String(e.recur.interval)),void 0!==e.recur.count&&(r+=";COUNT="+String(e.recur.count)),void 0!==e.recur.until&&(r+=";UNTIL="+sn(e.recur.until)),void 0!==e.recur.byMonth&&e.recur.byMonth.length>0&&(r+=";BYMONTH="+tn(e.recur.byMonth)),void 0!==e.recur.byWeekNo&&e.recur.byWeekNo.length>0&&(r+=";BYWEEKNO="+tn(e.recur.byWeekNo)),void 0!==e.recur.byYearDay&&e.recur.byYearDay.length>0&&(r+=";BYYEARDAY="+tn(e.recur.byYearDay)),void 0!==e.recur.byMonthDay&&e.recur.byMonthDay.length>0&&(r+=";BYMONTHDAY="+tn(e.recur.byMonthDay)),void 0!==e.recur.byDay&&e.recur.byDay.length>0&&(r+=";BYDAY="+tn(e.recur.byDay)),void 0!==e.recur.byHour&&e.recur.byHour.length>0&&(r+=";BYHOUR="+tn(e.recur.byHour)),void 0!==e.recur.byMinute&&e.recur.byMinute.length>0&&(r+=";BYMINUTE="+tn(e.recur.byMinute)),void 0!==e.recur.bySecond&&e.recur.bySecond.length>0&&(r+=";BYSECOND="+tn(e.recur.bySecond)),void 0!==e.recur.bySetPos&&e.recur.bySetPos.length>0&&(r+=";BYSETPOS="+tn(e.recur.bySetPos)),void 0!==e.recur.weekStart&&"MO"!==e.recur.weekStart&&(r+=";WKST="+e.recur.weekStart),n+=ln("RRULE:"+r)+"\r\n"}if(void 0!==e.alarm)for(var o=0;o<e.alarm.length;o++){var i=e.alarm[o];if(n+="BEGIN:VALARM\r\nACTION:DISPLAY\r\n",void 0!==i.datetime)n+="TRIGGER;VALUE=DATE-TIME:"+sn(i.datetime)+"\r\n";else{var a="";if((void 0===i.before||i.before)&&(a+="-"),a+="P",void 0!==i.weeks&&i.weeks>0)a+=String(i.weeks)+"W";else{void 0!==i.days&&i.days>0&&(a+=String(i.days)+"D");var l=void 0!==i.hours&&i.hours>0,c=void 0!==i.minutes&&i.minutes>0,s=void 0!==i.seconds&&i.seconds>0;(l||c||s)&&(a+="T",l&&(a+=String(i.hours)+"H"),c&&(a+=String(i.minutes)+"M"),s&&(a+=String(i.seconds)+"S"))}n+="TRIGGER:"+a+"\r\n"}void 0!==i.description?n+=ln("DESCRIPTION:"+on(i.description))+"\r\n":n+="DESCRIPTION:Reminder\r\n",void 0===i.datetime&&void 0!==i.repeat&&void 0!==i.repeatDuration&&(n+="REPEAT:"+String(i.repeat)+"\r\n",n+="DURATION:PT"+String(i.repeatDuration)+"M\r\n"),n+="END:VALARM\r\n"}n+="END:VEVENT\r\nEND:VCALENDAR";var u=le("a");u.href="data:text/calendar;charset=utf-8,"+globalThis.encodeURIComponent(n),u.download="event-"+t+".ics",Ut(u)},supported:{get intent(){return Kt()},get universal(){return Zt()},get setting(){return Xt()},get directory(){return Jt()},get camera(){return function(){var e=J.os.name,t=J.os.version;return!J.isWebview&&(e===o.iOS&&0===u(t,"10.3.1")||e===o.Android&&u(t,"3.0")>=0)}()},get contact(){return Qt()},get share(){return $t()},get calendar(){return J.os.name===o.iOS&&u(J.os.version,"15.0")>=0&&J.browser.name===l.Safari&&!J.isWebview}},Constants:{AppOpenState:Et,SettingType:Pt,CameraType:xt,CaptureType:It},Errors:{URLOpenError:Wt,NotSupportedError:Ie,UserCancelledError:Rt}},Bt=void 0;function Ht(){var e=Ft(),t=e.document,n={},r={},i=void 0!==globalThis.cordova,a=J.os.name===o.iOS,l=a&&u(J.os.version,"8.0")>=0,c=a&&!l,s=D.useStd;return i?(n.focus="resume",n.blur="pause",r.focus=t,r.blur=t):l?(n.visibilitychange="visibilitychange",r.visibilitychange=t):c?(n.focus="pageshow",n.blur="pagehide",r.focus=e,r.blur=e):s?(n.focus="focus",n.blur="blur",n.visibilitychange="visibilitychange",r.focus=e,r.blur=e,r.visibilitychange=t):(n.focus="focus",n.blur="blur",n.visibilitychange="visibilitychange",r.focus=t,r.blur=t,r.visibilitychange=t),{type:n,target:r}}function jt(e){try{var t=new XMLHttpRequest;if(t.open("GET","https://itunes.apple.com/lookup?bundleId="+e,!1),t.send(),200===t.status)try{return function(e){if(void 0===e.results)return;var t=e.results;if(0===t.length)return;var n=t[0];return void 0===n?void 0:""+n.trackId}(JSON.parse(t.response))}catch(e){return}return}catch(e){return}}function Vt(e,t){if(void 0!==e)switch(t){case o.Android:return"market://details?id="+e;case o.iOS:return"itms-apps://itunes.apple.com/app/id"+e+"?mt=8";case o.Windows:return"ms-windows-store://pdp/?ProductId="+e;case o.MacOS:return"macappstore://itunes.apple.com/app/id"+e+"?mt=12";default:throw new Wt('Unsupported OS: "'+J.userAgent+'"')}}function zt(e,t){if(void 0!==e)switch(t){case o.Android:return"https://play.google.com/store/apps/details?id="+e;case o.iOS:return"https://itunes.apple.com/app/id"+e+"?mt=8";case o.Windows:return"https://apps.microsoft.com/detail/"+e;case o.MacOS:return"https://apps.apple.com/app/id"+e+"?mt=12";default:throw new Wt('Unsupported OS: "'+J.userAgent+'"')}}function Yt(e){switch(e){case o.iOS:return 2e3;case o.Android:return 1e3;default:return 750}}function Kt(){if(J.os.name!==o.Android)return!1;var e=J.browser.version;return!(J.browser.name===l.SamsungInternet&&u(e,"17.0.1.69")>=0&&u(e,"17.0.7.34")<0)&&(!(J.browser.name===l.Firefox&&u(e,"41.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"59.0")>=0&&u(e,"68.11.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"80.0")>=0&&u(e,"82.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"96.0")>=0&&u(e,"107.0")<0)&&(!(J.browser.name===l.Opera&&u(e,"14.0")<0)&&!(/(?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/[\w.]+;/i.test(J.userAgent)||/instagram[\/ ][-\w.]+/i.test(J.userAgent)||/micromessenger\/([\w.]+)/i.test(J.userAgent)||/musical_ly(?:.+app_?version\/|_)[\w.]+/i.test(J.userAgent)||/ultralite app_version\/[\w.]+/i.test(J.userAgent)))))))}function Zt(){return J.os.name===o.iOS&&u(J.os.version,"9.0")>=0}function Xt(){var e=J.os.name,t=J.os.version;return e!==o.Unknown&&(!(e===o.Android&&!Kt())&&(e!==o.iOS&&((e!==o.Windows||!("Vista"===t||"XP"===t||"2000"===t||"NT 4.0"===t||"NT 3.11"===t||"ME"===t||u(t,"10")<0))&&!(e===o.MacOS&&u(t,"10.10")<0))))}function Jt(){return void 0!==globalThis.showDirectoryPicker||void 0!==le("input").webkitdirectory}function Qt(){return void 0!==globalThis.navigator.contacts}function $t(){return void 0!==globalThis.navigator.share}function en(e,t,n,r){void 0===r&&(r=!1),"function"!=typeof t&&"string"!=typeof t||!r||e.push([n,t])}function tn(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=",");for(var r=e.length,o="",i=0;i<r;i++)0!==i&&(o+=n),o+=void 0!==t?t(e[i]):e[i];return o}function nn(e){return globalThis.encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function rn(e){return nn(e).replace(/%22/g,'"').replace(/%40/g,"@").replace(/%2C/gi,",")}function on(e){return e.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\r\n|\n|\r/g,"\\n")}function an(e){return void 0!==globalThis.TextEncoder?(new TextEncoder).encode(e).length:globalThis.unescape(globalThis.encodeURIComponent(e)).length}function ln(e){if(an(e)<=75)return e;for(var t="",n="",r=0,o=0;o<e.length;o++){var i=e[o],a=an(e[o]);""!==n&&r+a>75?(t+=n+"\r\n ",n=i,r=a):(n+=i,r+=a)}return t+=n}function cn(e){return e instanceof URL?e.toString():e}function sn(e,t){return void 0===t&&(t=!1),t?e.getUTCFullYear()+qt(e.getUTCMonth()+1,2,"0")+qt(e.getUTCDate(),2,"0"):e.getUTCFullYear()+qt(e.getUTCMonth()+1,2,"0")+qt(e.getUTCDate(),2,"0")+"T"+qt(e.getUTCHours(),2,"0")+qt(e.getUTCMinutes(),2,"0")+qt(e.getUTCSeconds(),2,"0")+"Z"}function un(e){for(var t="",n=0;n<e.length;n++)t+="\n"+(n+1)+": "+e[n];return t.length>0&&(t="\n"+t+"\n"),new Wt("Failed to open any of the provided URLs: "+t)}function dn(){var e=Ft().document;return"hidden"===e.visibilityState||("hidden"===e.webkitVisibilityState||("hidden"===e.mozVisibilityState||("hidden"===e.msVisibilityState||(void 0!==e.hidden?e.hidden:void 0!==e.webkitHidden?e.webkitHidden:void 0!==e.mozHidden?e.mozHidden:void 0!==e.msHidden?e.msHidden:"function"!=typeof e.hasFocus||!e.hasFocus()))))}function pn(e){return"function"==typeof e.hasFocus&&e.hasFocus()}function fn(e){try{e.focus({preventScroll:!0})}catch(t){try{e.focus()}catch(e){}}}function gn(e){if("[object Promise]"===Object.prototype.toString.call(e)){var t=e;return new Promise((function(e,n){t.then((function(t){for(var r=[],o=0;o<t.length;o++)r[o]=t[o].getFile();Promise.all(r).then(e).catch(n)})).catch((function(e){return"AbortError"===e.name?n(new Rt("User cancelled the operation.")):n(new Ie(e.message))}))}))}var n=e,r=Ht(),o=Ft().document;return new Promise((function(e,t){var i=!1;function a(a){if(!i){i=!0;var u=n.files,d=[];if(null===u)return e(d);for(var p=0;p<u.length;p++)d.push(u[p]);!function(){Bt=void 0;try{D.remove(r.target.focus,{type:r.type.focus,callback:l}),D.remove(r.target.visibilitychange,{type:r.type.visibilitychange,callback:c}),D.remove(o,{type:"click",callback:s})}catch(e){}}(),a?e(d):t(new Rt("User cancelled the operation."))}}function l(){globalThis.setTimeout((function(){n.value.length>0?a(!0):a(!1)}),1e3)}function c(){dn()||l()}function s(){a(!1)}n.onchange=function(){a(!0)},void 0!==Bt&&Bt(),void 0!==n.oncancel?n.oncancel=function(){a(!1)}:n.onclick=function(){D.add(r.target.visibilitychange,{type:r.type.visibilitychange,callback:c}),D.add(r.target.focus,{type:r.type.focus,callback:l}),globalThis.setTimeout((function(){D.add(o,{type:"click",callback:s})}),100),Bt=function(){a(!1)}},Ut(n)}))}function vn(e){if("[object Promise]"===Object.prototype.toString.call(e)){var t=e;return new Promise((function(e,n){t.then((function(t){var r=[],o=[];(function e(t,n){return void 0===n&&(n=""),new Promise((function(i,a){var l=t.entries();!function t(){l.next().then((function(a){if(a.done)return i();var l,c=a.value[0],s=a.value[1];l=""===n?c:n+"/"+c,"file"===s.kind?r.push(s.getFile().then((function(e){o.push({file:e,relativePath:l})}))):r.push(e(s,l)),t()})).catch(a)}()}))})(t,t.name).then((function(){Promise.all(r).then((function(){e(o)})).catch(n)})).catch(n)})).catch((function(e){return"AbortError"===e.name?n(new Rt("User cancelled the operation.")):n(new Ie(e.message))}))}))}var n=e;return new Promise((function(e,t){gn(n).then((function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r];n.push({file:o,relativePath:o.webkitRelativePath})}e(n)})).catch(t)}))}function hn(e,t,n){var r=Ht(),o=Ft().document,i=void 0,a=void 0;return new Promise((function(l,c){var s,u=!1;function d(e){u||(u=!0,function(){void 0!==s&&(clearTimeout(s),s=void 0);try{D.remove(r.target.blur,{type:r.type.blur,callback:p}),D.remove(r.target.focus,{type:r.type.focus,callback:f}),D.remove(r.target.visibilitychange,{type:r.type.visibilitychange,callback:g})}catch(e){}if(void 0!==i)try{o.body.removeChild(i)}catch(e){}if(void 0!==a)try{o.body.removeChild(a)}catch(e){}}(),e?l():c())}function p(){void 0!==s&&(clearTimeout(s),s=void 0),D.remove(r.target.blur,{type:r.type.blur,callback:p}),D.add(r.target.focus,{type:r.type.focus,callback:f})}function f(){d(!0)}function g(){dn()?p():f()}s=globalThis.setTimeout((function(){d(!1)}),n),D.add(r.target.blur,{type:r.type.blur,callback:p}),D.add(r.target.visibilitychange,{type:r.type.visibilitychange,callback:g}),pn(o)||function(){var e=Ft(),t=e.document;if(fn(e),pn(t))return!0;if(t.body.tabIndex<0&&(t.body.tabIndex=-1),fn(t.body),pn(t))return!0;var n=void 0;try{if(void 0===(n=le("input")))return!1;n.type="text",n.readOnly=!0,t.body.appendChild(n),fn(n);try{n.select()}catch(e){}if(pn(t))return!0}catch(e){}finally{if(null!=n){try{n.blur()}catch(e){}try{t.body.removeChild(n)}catch(e){}}}pn(t)}();try{void 0!==globalThis.cordova?globalThis.open(e,"_system"):(i=function(e,t){var n=Ft(),r=n.document,o=void 0;try{return 0===t?void(n.location.href=e):((o=le("a")).href=e,r.body.appendChild(o),Ut(o,n),o)}catch(e){}finally{if(void 0!==o)try{r.body.removeChild(o)}catch(e){}}}(e,t),a=function(e){var t=Ft().document,n=void 0;try{if(void 0===(n=le("iframe")))return;n.src=e,t.body.appendChild(n),globalThis.setTimeout((function(){if(void 0!==n)try{t.body.removeChild(n)}catch(e){}}),500)}catch(e){}return n}(e))}catch(e){d(!1)}}))}function bn(e,t){"string"==typeof e.to&&(e.to=rn(e.to)),"string"==typeof e.cc&&(e.cc=rn(e.cc)),"string"==typeof e.bcc&&(e.bcc=rn(e.bcc)),"string"==typeof e.subject&&(e.subject=nn(e.subject)),"string"==typeof e.body&&(e.body=nn(e.body)),"object"==typeof e.to&&(e.to=tn(e.to,rn)),"object"==typeof e.cc&&(e.cc=tn(e.cc,rn)),"object"==typeof e.bcc&&(e.bcc=tn(e.bcc,rn));var n=[],r=t+":";return"string"==typeof e.to&&(r+=e.to),"string"==typeof e.cc&&n.push("cc="+e.cc),"string"==typeof e.bcc&&n.push("bcc="+e.bcc),"string"==typeof e.subject&&n.push("subject="+e.subject),"string"==typeof e.body&&n.push("body="+e.body),hn(r+"?"+tn(n,void 0,"&"),0,Yt(J.os.name))}var mn=/iemobile/i.test(J.userAgent),yn=/windows phone/i.test(J.userAgent),wn=null,Tn={get value(){return function(){var e=Sn();if(!e)return;var t=e.getAttribute("content");return"string"==typeof t?t:void 0}()},set value(e){var t;void 0===e?(t=Sn())&&(t.remove(),wn=null):function(e){var t=Sn();null===t&&(t=function(){var e=globalThis.document.createElement("meta");return e.setAttribute("name",kn()),globalThis.document.head.prepend(e),wn=e}());t.setAttribute("content",e)}(e)},Constants:{},Errors:{}};function kn(){return mn?"msapplication-navbutton-color":yn?"msapplication-TileColor":"theme-color"}function Sn(){return null!==wn&&wn.isConnected?wn:wn=globalThis.document.querySelector('meta[name="'+kn()+'"]')}var En={get supported(){return Pn()},run:function(e){if(Pn())return globalThis.navigator.vibrate(e);throw new Ie("'navigator.vibrate' does not supported.")},stop:function(){return this.run(0)},Constants:{},Errors:{NotSupportedError:Ie}};function Pn(){return void 0!==globalThis.navigator.vibrate}var xn="picture-in-picture",In="inline",An=null,On=null,Dn=!1,Mn=function(){if("function"==typeof Symbol){var e=globalThis.__nativeFnPipBridgeKey__;return"symbol"==typeof e?e:globalThis.__nativeFnPipBridgeKey__=Symbol("native.fn.pip.bridged")}return"__nativeFnPipBridged__"}(),Cn=Q((function(){if(Un())return D.add(globalThis.document,{type:"enterpictureinpicture",callback:Rn,options:!1}),void D.add(globalThis.document,{type:"leavepictureinpicture",callback:Gn,options:!1});Vn()}),(function(){if(Un())return D.remove(globalThis.document,{type:"enterpictureinpicture",callback:Rn,options:!1}),void D.remove(globalThis.document,{type:"leavepictureinpicture",callback:Gn,options:!1});for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)D.remove(e[t],{type:"webkitpresentationmodechanged",callback:Hn,options:!1}),e[t][Mn]=!1})),Nn=Q((function(){D.add(globalThis.document,{type:"pictureinpictureerror",callback:Bn,options:!1})}),(function(){D.remove(globalThis.document,{type:"pictureinpictureerror",callback:Bn,options:!1})})),Ln={get supported(){return function(){if("boolean"==typeof globalThis.document.pictureInPictureEnabled)return globalThis.document.pictureInPictureEnabled;var e=Fn();return"function"==typeof e.webkitSupportsPresentationMode&&e.webkitSupportsPresentationMode(xn)}()},get element(){return zn()},get isActive(){return Yn()},request:function(e){return new Promise((function(t,n){var r;if(void 0===e&&(r=globalThis.document.querySelector("video"),e=null!==r?r:void 0),void 0===e)return n(new Ie("Failed to enter Picture-in-Picture mode."));if(Yn()&&zn()!==e&&J.browser.name===l.Safari&&J.os.name===o.iOS)return n(new Ie("There is already a Picture-in-Picture element in this document."));var i=e.tagName.toLowerCase();if("video"!==i)return n(new Ie('The "'+i+'" element does not support Picture-in-Picture requests.'));var a=e.requestPictureInPicture,c=null!==On&&On.webkitPresentationMode===xn;if("function"==typeof a&&!_n()&&!c){var s=a.call(e);return void 0!==s&&"function"==typeof s.then?void s.then(t).catch((function(){try{u()}catch(e){n(new Ie('The "'+i+'" element does not support Picture-in-Picture requests.'))}})):t()}function u(){if(void 0!==e&&"function"==typeof e.webkitSupportsPresentationMode&&e.webkitSupportsPresentationMode(xn)&&"function"==typeof e.webkitSetPresentationMode)return e.disablePictureInPicture?n(new Ie("Picture-in-Picture is disabled on this element.")):(jn(e),e.webkitSetPresentationMode(xn),t());n(new Ie('The "'+i+'" element does not support Picture-in-Picture requests.'))}u()}))},exit:function(){return new Promise((function(e,t){var n=globalThis.document.exitPictureInPicture;if("function"==typeof n&&!_n()){var r=n.call(globalThis.document);return void 0!==r&&"function"==typeof r.then?void r.then(e).catch((function(){try{o()}catch(e){t(new Ie("Failed to exit Picture-in-Picture mode."))}})):e()}function o(){if(null!==On&&"function"==typeof On.webkitSetPresentationMode)return On.webkitSetPresentationMode(In),e();for(var t=globalThis.document.querySelectorAll("video"),n=0;n<t.length;n++){var r=t[n];if("function"==typeof r.webkitSetPresentationMode&&r.webkitPresentationMode===xn)return r.webkitSetPresentationMode(In),e()}return e()}o()}))},toggle:function(e){var t=zn();if(void 0!==e)return t===e?this.exit():this.request(e);return null!==t?this.exit():this.request(e)},onChange:function(e,t,n){if("function"==typeof e)return Cn.subscribe(e,t);var r=e,o=t;return Cn.subscribe((function(e){e.element===r&&o(e)}),n)},onError:function(e,t,n){if("function"==typeof e)return Nn.subscribe(e,t);var r=e,o=t;return Nn.subscribe((function(e){e.element===r&&o(e)}),n)},Constants:{},Errors:{NotSupportedError:Ie,InvalidStateError:Ke}};function Fn(){var e=globalThis.document.querySelector("video");return null!==e?e:null===An?An=globalThis.document.createElement("video"):An}function Un(){return void 0!==globalThis.document.pictureInPictureEnabled}function _n(){return"function"==typeof Fn().webkitSetPresentationMode}function qn(e,t,n){return{nativeEvent:e,element:t,isActive:n}}function Wn(e,t,n){Cn.emit(qn(e,t,n))}function Rn(e){var t=e.target;t instanceof globalThis.HTMLVideoElement&&Wn(e,t,!0)}function Gn(e){var t=e.target;t instanceof globalThis.HTMLVideoElement&&Wn(e,t,!1)}function Bn(e){var t,n,r,o=e.target;o instanceof globalThis.HTMLVideoElement&&(t=e,n=o,r=Yn(),Nn.emit(qn(t,n,r)))}function Hn(e){if(this.webkitPresentationMode===xn)return On=this,void Wn(e,this,!0);this.webkitPresentationMode===In&&On===this&&(On=null,Wn(e,this,!1))}function jn(e){e[Mn]||void 0===e.webkitSetPresentationMode&&void 0===e.onwebkitpresentationmodechanged||(D.add(e,{type:"webkitpresentationmodechanged",callback:Hn,options:!1}),e[Mn]=!0)}function Vn(){for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)jn(e[t])}function zn(){var e=globalThis.document.pictureInPictureElement;return null!=e?e:null!==On&&On.webkitPresentationMode===xn?On:null}function Yn(){return null!==zn()}Dn||(Dn=!0,(!Un()||_n())&&(Vn(),void 0!==globalThis.MutationObserver&&new globalThis.MutationObserver((function(e){if(null!==On){for(var t=!1,n=0;n<e.length;n++){for(var r=e[n].removedNodes,o=0;o<r.length;o++)if((a=r[o])===On||a.nodeType===Node.ELEMENT_NODE&&a.contains(On)){t=!0;break}if(t)break}t&&!globalThis.document.contains(On)&&(On=null)}for(n=0;n<e.length;n++){var i=e[n].addedNodes;for(o=0;o<i.length;o++){var a;if((a=i[o]).nodeType===Node.ELEMENT_NODE){var l=a;if("VIDEO"!==l.tagName)for(var c=l.querySelectorAll("video"),s=0;s<c.length;s++)jn(c[s]);else jn(l)}}}})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})));var Kn={get supported(){return Zn()},set:function(e){return Zn()?globalThis.navigator.setAppBadge(e):Promise.reject(new Ie("'navigator.setAppBadge' does not supported."))},clear:function(){return this.set(0)},Constants:{},Errors:{NotSupportedError:Ie}};function Zn(){return void 0!==globalThis.navigator.setAppBadge}var Xn={send:function(e){return new Promise((function(t,n){if(!Jn())return n(new Ie("'window.Notification' does not supported."));ht.request(ze.Notification).then((function(r){if(r===Ye.Grant){var o={badge:e.badge,body:e.body,data:e.data,dir:e.dir,icon:e.icon,lang:e.lang,requireInteraction:e.requireInteraction,silent:e.silent,tag:e.tag},i=new globalThis.Notification(e.title,o);void 0!==e.onClick&&(i.onclick=e.onClick),void 0!==e.onShow&&(i.onshow=e.onShow),void 0!==e.onClose&&(i.onclose=e.onClose),void 0!==e.onError&&(i.onerror=e.onError),t(i)}else n(new xe("'notification' permission is not granted."))}))}))},get supported(){return Jn()},Constants:{},Errors:{NotSupportedError:Ie,PermissionNotGrantedError:xe}};function Jn(){return void 0!==globalThis.Notification}var Qn=Q((function(){if(!nr())return;globalThis.navigator.getBattery().then((function(e){$n=e,D.add(e,{type:"chargingchange",callback:tr}),D.add(e,{type:"levelchange",callback:tr}),D.add(e,{type:"chargingtimechange",callback:tr}),D.add(e,{type:"dischargingtimechange",callback:tr})}))}),(function(){if(!nr()||null===$n)return;D.remove($n,{type:"chargingchange",callback:tr}),D.remove($n,{type:"levelchange",callback:tr}),D.remove($n,{type:"chargingtimechange",callback:tr}),D.remove($n,{type:"dischargingtimechange",callback:tr}),$n=null})),$n=null,er={get supported(){return nr()},get value(){return new Promise((function(e,t){if(!nr())return t(new Ie("'navigator.getBattery' does not supported."));globalThis.navigator.getBattery().then(e)}))},onChange:Qn.subscribe,Constants:{},Errors:{NotSupportedError:Ie}};function tr(){Qn.emit($n)}function nr(){return void 0!==globalThis.navigator.getBattery}!function(){if("object"!=typeof globalThis){Object.defineProperty(Object.prototype,"__getGlobalThis__",{get:function(){return this},configurable:!0});try{var e=__getGlobalThis__;Object.defineProperty(e,"globalThis",{value:e,writable:!0,configurable:!0})}finally{delete Object.prototype.__getGlobalThis__}}}();var rr={version:n,appearance:ne,badge:Kn,battery:er,clipboard:se,dimension:We,fullscreen:rt,geolocation:Ct,notification:Xn,open:Gt,permission:ht,pip:Ln,platform:J,theme:Tn,vibration:En};export{rr as default};
1
+ var e,t,n="1.3.2",r={matches:!1,media:"not all",onchange:null,addListener:function(){},removeListener:function(){},addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){return!1}};!function(e){e.Unknown="unknown",e.Light="light",e.Dark="dark"}(e||(e={})),t=void 0!==globalThis.matchMedia?globalThis.matchMedia("(prefers-color-scheme: dark)"):r;var o,i,a,l,c,s=globalThis.document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function u(e,t){for(var n=e.split("."),r=t.split("."),o=Math.max(n.length,r.length),i=0;i<o;i++){var a=void 0,l=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(l=i<r.length?parseInt(r[i],10):0))return 1;if(a<l)return-1}return 0}function d(e){if(void 0===e)return"";var t={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==t?t:e}function p(e){return void 0===e?"":e.replace(/_/g,".")}!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(o||(o={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(i||(i={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(a||(a={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(l||(l={})),c=void 0!==globalThis.navigator.userAgent?globalThis.navigator.userAgent:"";var f={"Google Chrome":"Chrome","Microsoft Edge":"Edge","Microsoft Edge WebView2":"Edge WebView2","Android WebView":"Chrome WebView",HeadlessChrome:"Chrome Headless",OperaMobile:"Opera Mobi"},g=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","iw","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],v=[[/windows nt (6\.[23]); arm/i,o.Windows,d],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,o.Windows,d],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,o.Windows,d],[/windows nt ?([\d.)]*)(?!.+xbox)/i,o.Windows,d],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,o.Windows,d],[/windows ce\/?([\d.]*)/i,o.Windows,d],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,o.iOS,p],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,o.iOS,p],[/cfnetwork\/.+darwin/i,o.iOS,p],[/mac os x ?([\w. ]*)/i,o.MacOS,p],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,o.MacOS,p],[/droid ([\w.]+)\b.+(android[- ]x86)/i,o.Android],[/android\w*[-\/.; ]?([\d.]*)/i,o.Android]],h=[[/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]],b=[[/\b(?:crmo|crios)\/([\w.]+)/i,l.Chrome],[/webview.+edge\/([\w.]+)/i,l.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,l.Edge],[/opera mini\/([-\w.]+)/i,l.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,l.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,l.Opera],[/opios[\/ ]+([\w.]+)/i,l.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,l.Opera],[/\bopr\/([\w.]+)/i,l.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,l.IE],[/(?:ms|\()ie ([\w.]+)/i,l.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,l.IE],[/\bfocus\/([\w.]+)/i,l.Firefox],[/\bopt\/([\w.]+)/i,l.Opera],[/coast\/([\w.]+)/i,l.Opera],[/fxios\/([\w.-]+)/i,l.Firefox],[/samsungbrowser\/([\w.]+)/i,l.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,l.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,l.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,l.Chrome],[/chrome\/([\w.]+) mobile/i,l.Chrome],[/chrome\/v?([\w.]+)/i,l.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,l.Safari],[/version\/([\w.,]+) .*safari/i,l.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,l.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,l.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,l.Firefox],[/firefox\/([\w.]+)/i,l.Firefox]],m=[],y=[];function w(e){return"function"==typeof e||"object"==typeof e&&null!==e&&"function"==typeof e.handleEvent}function T(e){return"string"==typeof e.media&&"boolean"==typeof e.matches}function k(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r="",o=0;o<t.length-2;o++){var i=t[o];void 0!==i&&(r=r+i.charAt(0).toUpperCase()+i.slice(1))}return r}function S(e,t){if(e===globalThis.document&&["deviceready","pause","resume","backbutton","menubutton","searchbutton","startcallbutton","endcallbutton","volumedownbutton","volumeupbutton","activated","cordovacallbackerror"].indexOf(t)>-1)return t;if("function"==typeof e.webkitEnterFullscreen&&["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"].indexOf(t)>-1)return t;var n;n=void 0!==O[t]?O[t]:I.test(t)?[t,t.replace(I,k)]:[t];for(var r=0;r<A.length;r++)for(var o=0;o<n.length;o++){var i=A[r]+n[o];if(void 0!==e["on"+i])return i}return t}function E(){this.returnValue=!1}function P(){this.cancelBubble=!0}var x,I=/(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,A=["","webkit","moz","ms","MS","o","O"],O={wheel:["wheel","mousewheel","DOMMouseScroll"],focus:["focus","focusin"],blur:["blur","focusout"],beforeinput:["beforeinput","textInput"]},D={useStd:"function"==typeof globalThis.document.addEventListener,add:function(e,t){if(void 0!==t.type&&void 0!==e){var n=t.callback,r=S(e,t.type),o=t.options;if(T(e)&&"function"==typeof e.addListener)try{var i=function(e,t,n){for(var r=0;r<y.length;r++){var o=y[r];if(o.target===e&&o.type===t&&o.callback===n)return o.wrapper}}(e,r,n);return void 0===i&&function(e,t,n,r){y.push({target:e,type:t,callback:n,wrapper:r})}(e,r,n,i=function(e){return function(t){"function"==typeof e?e.call(this,t):e&&"function"==typeof e.handleEvent&&e.handleEvent(t)}}(n)),e.addListener(i)}catch(e){}if("function"==typeof e.addEventListener)try{if(w(n))return e.addEventListener(r,n,o)}catch(e){}if("function"==typeof e.attachEvent){var a=function(e,t,n){for(var r=0;r<m.length;r++){var o=m[r];if(o.target===e&&o.type===t&&o.callback===n)return o.wrapper}}(e,r,n);if("function"==typeof a)return;i=function(t){if(void 0===t&&(t=globalThis.event),void 0!==t){try{Object.defineProperty(t,"currentTarget",{value:e,configurable:!0})}catch(e){}"function"!=typeof t.preventDefault&&(t.preventDefault=E.bind(t)),"function"!=typeof t.stopPropagation&&(t.stopPropagation=P.bind(t)),"function"==typeof n?n.call(e,t):n&&"function"==typeof n.handleEvent&&n.handleEvent(t)}};return function(e,t,n,r){m.push({target:e,type:t,callback:n,wrapper:r})}(e,r,n,i),e.attachEvent("on"+r,i)}}},remove:function(e,t){if(void 0!==t.type&&void 0!==e){var n=t.callback,r=S(e,t.type),o=t.options;if(T(e)){if("function"==typeof e.removeListener)try{var i=function(e,t,n){for(var r=0;r<y.length;r++){var o=y[r];if(o.target===e&&o.type===t&&o.callback===n)return y.splice(r,1),o.wrapper}}(e,r,n);if("function"==typeof i)return e.removeListener(i)}catch(e){}}else{if("function"==typeof e.removeEventListener)try{if(w(n))return e.removeEventListener(r,n,o)}catch(e){}if("function"!=typeof e.detachEvent);else{i=function(e,t,n){for(var r=0;r<m.length;r++){var o=m[r];if(o.target===e&&o.type===t&&o.callback===n)return m.splice(r,1),o.wrapper}}(e,r,n);"function"==typeof i&&e.detachEvent("on"+r,i)}}}}},M=c,C=null,N=void 0,L=void 0,F=void 0,U=void 0,_=void 0,q=void 0,W=null,R={},G=null;function B(e,t){return"function"==typeof t?t(e):"string"==typeof t?t:void 0===e?"":e}function H(e){if(null==e)return e;if(0===e.length)return null;if("C"===(e=e.replace(/_/g,"-"))||"posix"===e.toLowerCase())return"en-US";if(-1!==e.indexOf("."))return H(e.split(".")[0]);if(-1!==e.indexOf("@"))return H(e.split("@")[0]);var t=e.split("-");return 0===t.length?null:(t[0]=t[0].toLowerCase(),t.length>1&&2===t[1].length&&(t[1]=t[1].toUpperCase()),t.length>2&&4===t[1].length&&(t[1]=t[1].charAt(0).toUpperCase()+t[1].slice(1).toLowerCase()),t.join("-"))}function j(){return null!==C&&C.userAgent===M?C:C={userAgent:M,os:V(),browser:z(),engine:Y()}}function V(){for(var e=o.Unknown,t="",n=0;n<v.length;n++){var r=v[n],i=M.match(r[0]);if(null!==i){e=r[1],t=B(i[1],r[2]);break}}if(e===o.iOS&&0===u(t,"18.6")){var a=/\) Version\/([\d.]+)/.exec(M);if(null!==a)parseInt(a[1].split(".")[0],10)>=26&&(t=a[1])}return M===c&&(void 0!==N&&(e=N),void 0!==L&&(t=L),e===o.MacOS&&void 0!==globalThis.navigator.standalone&&globalThis.navigator.maxTouchPoints>2&&(e=o.iOS)),{name:e,version:t}}function z(){for(var e=l.Unknown,t="",n=0;n<b.length;n++){var r=b[n],o=M.match(r[0]);if(null!==o){e=r[1],t=B(o[1],r[2]);break}}return M===c&&(void 0!==F&&(e=F),void 0!==U&&(t=U)),{name:e,version:t}}function Y(){for(var e=a.Unknown,t="",n=0;n<h.length;n++){var r=h[n],o=M.match(r[0]);if(null!==o){e=r[1],t=B(o[1],r[2]);break}}return M===c&&(void 0!==_&&(e=_),void 0!==q&&(t=q)),{name:e,version:t}}function K(){if(null!==G)return G;var e=null,t=[],n=null,r=0,o=!1,i=null;function a(n){"string"==typeof(n=H(n))&&-1===t.indexOf(n)&&(null===e&&(e=n),t.push(n))}if("undefined"!=typeof Intl){try{a(Intl.DateTimeFormat().resolvedOptions().locale)}catch(e){}try{n=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}}void 0!==globalThis.navigator&&(void 0!==globalThis.navigator.languages&&function(e){for(var t=0;t<e.length;t++)a(e[t])}(globalThis.navigator.languages),void 0!==globalThis.navigator.language&&a(globalThis.navigator.language),void 0!==globalThis.navigator.userLanguage&&a(globalThis.navigator.userLanguage),void 0!==globalThis.navigator.browserLanguage&&a(globalThis.navigator.browserLanguage),void 0!==globalThis.navigator.systemLanguage&&a(globalThis.navigator.systemLanguage));try{r=-1*(new Date).getTimezoneOffset()}catch(e){}if("string"==typeof e){if("undefined"!=typeof Intl&&void 0!==Intl.Locale)try{var l=new Intl.Locale(e);"function"==typeof l.getTextInfo?i="rtl"===l.getTextInfo().direction:void 0!==l.textInfo&&(i="rtl"===l.textInfo.direction)}catch(e){}if("boolean"!=typeof i){var c=/^([A-Za-z]{1,8})(?:[-_][A-Za-z0-9]{1,8})*$/.exec(e);if(null!==c)for(var s=c[1].toLowerCase(),u=0;u<g.length;u++)if(g[u]===s){i=!0;break}}}return"boolean"==typeof i&&(o=i),G={language:e,languages:t,timezone:n,offset:r,isRTL:o}}function Z(){return void 0===globalThis.navigator||void 0===globalThis.navigator.userAgentData||void 0===globalThis.navigator.userAgentData.getHighEntropyValues?Promise.resolve():globalThis.navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(e){try{for(var t=e.fullVersionList||e.brands||[],n=e.platformVersion,r=e.platform,a=j().browser.name,c=null,s=0;s<t.length;s++){var u=null==(g=t[s])?{brand:"",version:""}:"string"==typeof g?{brand:g,version:""}:{brand:g.brand,version:g.version},d=u.version,p=u.brand;/not.a.brand/i.test(p)||((null===c||/Chrom/.test(c)&&"Chromium"!==p||"Edge"===c&&/WebView2/.test(p))&&(p=f[p]||p,null!==(c=a)&&!/Chrom/.test(c)&&/Chrom/.test(p)||("Chrome"===(a=p)||"Chrome WebView"===a||"Chrome Headless"===a?F=l.Chrome:"Edge"===a||"Edge WebView2"===a?F=l.Edge:"Opera Mobi"===a&&(F=l.Opera),U=d),c=p),"Chromium"===p&&(q=d))}"string"==typeof n&&(L=j().os.name===o.Windows?parseInt(n.split(".")[0],10)>=13?"11":"10":n),"string"==typeof r&&(/android/i.test(r)?N=o.Android:/ios|iphone|ipad/i.test(r)?N=o.iOS:/windows|win32/i.test(r)?N=o.Windows:/macos|macintel/i.test(r)&&(N=o.MacOS)),!0===e.mobile&&(W=i.Mobile),C=null}catch(e){}var g})).catch((function(){}))}function X(){return void 0===globalThis.navigator||void 0===globalThis.navigator.gpu?Promise.resolve():globalThis.navigator.gpu.requestAdapter().then((function(e){if(null!==e){var t=e.info;R.architecture=t.architecture,R.description=t.description,R.device=t.device,R.vendor=t.vendor}})).catch((function(){}))}x=Promise.all([Z(),X()]).then((function(){})),D.add(globalThis,{type:"languagechange",callback:function(){G=null}});var J={get ready(){return x},get os(){return j().os},get engine(){return j().engine},get browser(){return j().browser},get userAgent(){return M},set userAgent(e){M!==e&&(M=e,C=null,G=null,N=void 0,L=void 0,F=void 0,U=void 0,_=void 0,q=void 0,W=null,R={},e===c&&(x=Promise.all([Z(),X()]).then((function(){}))))},get locale(){return K()},get device(){return function(){if(M===c&&null!==W)return W;var e=j().os.name;return e===o.iOS||e===o.Android?i.Mobile:e===o.Windows||e===o.MacOS?i.Desktop:i.Unknown}()},get gpu(){return{architecture:R.architecture,description:R.description,device:R.device,vendor:R.vendor}},get isWebview(){return/; ?wv|applewebkit(?!.*safari)/i.test(M)},get isNode(){return void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},get isStandalone(){return j().os.name===o.iOS?!0===globalThis.navigator.standalone:void 0!==globalThis.matchMedia&&globalThis.matchMedia("(display-mode: standalone)").matches},Constants:{OS:o,Engines:a,Browsers:l,Devices:i},Errors:{}};function Q(e,t){var n=[];function r(e){var r=o(e);-1!==r&&(n.splice(r,1),0===n.length&&t())}function o(e){for(var t=0;t<n.length;t++)if(n[t].fn===e.fn)return t;return-1}return{emit:function(e){for(var t=n.slice(),o=0;o<t.length;o++)t[o].fn(e),t[o].once&&r(t[o])},subscribe:function(t,i){if(void 0===i&&(i={}),void 0!==i.signal&&i.signal.aborted)return function(){};var a={fn:t,once:!1};void 0!==i.once&&(a.once=i.once),void 0!==i.signal&&(a.signal=i.signal);var l=o(a);-1===l?(n.push(a),1===n.length&&e()):n[l].once&&!a.once&&(n[l].once=!1);var c=function(){D.remove(a.signal,{type:"abort",callback:c}),r(a)};return void 0!==a.signal&&D.add(a.signal,{type:"abort",callback:c}),function(){r(a)}}}}var $=Q((function(){ee=oe(),D.add(t,{type:"change",callback:ie}),J.browser.name===l.SamsungInternet&&(ee=re(),te=globalThis.setInterval((function(){var e=re();e!==ee&&(ee=e,$.emit(e))}),2e3))}),(function(){ee=null,D.remove(t,{type:"change",callback:ie}),J.browser.name===l.SamsungInternet&&(ee=null,null!==te&&(clearInterval(te),te=null))})),ee=null,te=null,ne={get value(){return J.browser.name===l.SamsungInternet?re():oe()},onChange:$.subscribe,Constants:{Appearances:e},Errors:{}};function re(){var t=new Image;if(t.src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxIiBoZWlnaHQ9IjEiPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0wIDBoMXYxSDB6Ii8+PC9zdmc+",null===s)return e.Light;s.drawImage(t,0,0);var n=s.getImageData(0,0,1,1).data;return(n[0]&n[1]&n[2])<255?e.Dark:e.Light}function oe(){return"not all"===t.media?e.Unknown:t.matches?e.Dark:e.Light}function ie(t){var n;(n=t.matches?e.Dark:e.Light)!==ee&&$.emit(ee=n)}function ae(e,t){var n=e.style;for(var r in t){var o=t[r];void 0!==o&&(n[r]=o)}}function le(e,t){void 0===t&&(t=!0);var n=globalThis.document.createElement(e);return void 0!==n.width&&(n.width="0"),void 0!==n.height&&(n.height="0"),void 0!==n.border&&(n.border="0"),void 0!==n.frameBorder&&(n.frameBorder="0"),void 0!==n.scrolling&&(n.scrolling="no"),void 0!==n.cellPadding&&(n.cellPadding="0"),void 0!==n.cellSpacing&&(n.cellSpacing="0"),void 0!==n.frame&&(n.frame="void"),void 0!==n.rules&&(n.rules="none"),void 0!==n.noWrap&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),t?ae(n,{width:"1px",height:"1px"}):(n.setAttribute("aria-hidden","true"),ae(n,{width:"0",height:"0",zIndex:"-9999",display:"none",visibility:"hidden",pointerEvents:"none"})),ae(n,{position:"absolute",top:"0",left:"0",padding:"0",margin:"0",border:"none",outline:"hidden",clip:"rect(1px, 1px, 1px, 1px)",clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap"}),n}var ce,se={copy:function(e){var t=function(e){if(ue(e)){var t=e.textContent;return null!==t?t:""}if(de(e))return e.toString();if(function(e){return function(e){return null!==e&&"object"==typeof e}(e)||function(e){return Array.isArray(e)}(e)}(e))try{return JSON.stringify(e)}catch(t){return""+e}else if("string"!=typeof e)return""+e;return e}(e),n=function(e){var t=null;ue(e)&&(t=e.outerHTML);if(de(e)&&e.rangeCount>0){for(var n=globalThis.document.createElement("div"),r=0;r<e.rangeCount;r++)n.appendChild(e.getRangeAt(r).cloneContents());t=n.innerHTML}if(null===t)return;return t}(e);if(pe()&&(void 0!==globalThis.navigator.clipboard.write||void 0!==globalThis.navigator.clipboard.writeText))return function(e,t){try{if(void 0!==globalThis.ClipboardItem&&void 0!==globalThis.navigator.clipboard.write){var n={};return void 0!==t&&(n["text/html"]=new Blob([t],{type:"text/html"})),n["text/plain"]=new Blob([e],{type:"text/plain"}),globalThis.navigator.clipboard.write([new ClipboardItem(n)]).then((function(){return!0})).catch((function(){return!1}))}if(void 0!==globalThis.navigator.clipboard.writeText)return globalThis.navigator.clipboard.writeText(e).then((function(){return!0})).catch((function(){return!1}))}catch(e){return Promise.resolve(!1)}return Promise.resolve(!1)}(t,n).then((function(e){return!!e||fe(t,n)})).catch((function(){return fe(t,n)}));return Promise.resolve(fe(t,n))},paste:function(){if(pe()&&(void 0!==globalThis.navigator.clipboard.read||void 0!==globalThis.navigator.clipboard.readText))return function(){try{if(void 0!==globalThis.ClipboardItem&&void 0!==globalThis.navigator.clipboard.read)return globalThis.navigator.clipboard.read().then((function(e){if(0===e.length)return Promise.resolve(null);for(var t=0;t<e.length;t++)for(var n=(o=e[t]).types,r=0;r<n.length;r++)if("text/html"===n[r])return o.getType("text/html").then((function(e){return e.text()})).catch((function(){return null}));for(t=0;t<e.length;t++){var o;for(n=(o=e[t]).types,r=0;r<n.length;r++)if("text/plain"===n[r])return o.getType("text/plain").then((function(e){return e.text()})).catch((function(){return null}))}return Promise.resolve(null)})).catch((function(){return null}));if(void 0!==globalThis.navigator.clipboard.readText)return globalThis.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:ge()})).catch((function(){return ge()}));return Promise.resolve(ge())},Constants:{},Errors:{}};function ue(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&(1===e.nodeType&&("string"==typeof e.nodeName&&"function"==typeof e.getAttribute))}function de(e){return"[object Selection]"===Object.prototype.toString.call(e)}function pe(){return function(){if(void 0!==globalThis.isSecureContext)return globalThis.isSecureContext;var e=location.protocol,t=location.hostname;return"https:"===e||"localhost"===t||"127.0.0.1"===t||"[::1]"===t}()&&void 0!==globalThis.navigator.clipboard}function fe(e,t){return function(e,t){if(void 0===globalThis.getSelection||void 0===globalThis.document.createRange)return!1;var n=le("div");n.contentEditable="true",void 0!==t?n.innerHTML=t:n.textContent=e,n.style.whiteSpace="pre",n.style.userSelect="text",n.style.setProperty("-webkit-user-select","text"),n.style.setProperty("-moz-user-select","text"),n.style.setProperty("-ms-user-select","text"),globalThis.document.body.appendChild(n);var r=globalThis.getSelection(),o=globalThis.document.createRange(),i=function(n){try{null!==n.clipboardData&&"function"==typeof n.clipboardData.setData&&(n.preventDefault(),void 0!==t&&n.clipboardData.setData("text/html",t),n.clipboardData.setData("text/plain",e))}catch(e){}};D.add(globalThis.document,{type:"copy",callback:i,options:{once:!0,capture:!0}});try{if(null===r)return ve(n,r,i),!1;r.removeAllRanges(),o.selectNodeContents(n),r.addRange(o);var a=globalThis.document.execCommand("copy");return ve(n,r,i),a}catch(e){return ve(n,r,i),!1}}(e,t)||function(e,t){var n=globalThis.clipboardData;if(void 0!==n&&"function"==typeof n.setData)try{return void 0!==t&&n.setData("HTML",t),n.setData("Text",e)}catch(e){return!1}return!1}(e,t)}function ge(){var e=function(){var e=le("div");e.contentEditable="true",globalThis.document.body.appendChild(e),e.focus();var t=null,n=function(e){try{if(null!==e.clipboardData&&"function"==typeof e.clipboardData.getData){e.preventDefault();var n=e.clipboardData.getData("text/html"),r=e.clipboardData.getData("text/plain");""!==n&&(t=n),""!==r&&(t=r)}}catch(e){}};D.add(globalThis.document,{type:"paste",callback:n,options:{once:!0,capture:!0}});try{if(!globalThis.document.execCommand("paste")&&null===t){var r=e.innerHTML;if(""!==r)t=r;else{var o=e.textContent;null!==o&&""!==o&&(t=o)}}return he(e,n),t}catch(t){return he(e,n),null}}();if(null!==e)return e;var t=function(){var e=globalThis.clipboardData;if(void 0!==e&&"function"==typeof e.getData)try{var t=e.getData("Text");return""!==t?t:null}catch(e){return null}return null}();return null!==t?t:""}function ve(e,t,n){null!==t&&t.removeAllRanges(),globalThis.document.body.removeChild(e),D.remove(globalThis.document,{type:"copy",callback:n})}function he(e,t){globalThis.document.body.removeChild(e),D.remove(globalThis.document,{type:"paste",callback:t})}!function(e){e.PortraitPrimary="portrait-primary",e.PortraitSecondary="portrait-secondary",e.LandscapePrimary="landscape-primary",e.LandscapeSecondary="landscape-secondary"}(ce||(ce={})),function(e){e.isLandscape=function(t){return t===e.LandscapePrimary||t===e.LandscapeSecondary},e.isPortrait=function(t){return t===e.PortraitPrimary||t===e.PortraitSecondary}}(ce||(ce={}));var be,me,ye={"safe-area-inset":{top:"safe-area-inset-top",right:"safe-area-inset-right",bottom:"safe-area-inset-bottom",left:"safe-area-inset-left"},"safe-area-max-inset":{top:"safe-area-max-inset-top",right:"safe-area-max-inset-right",bottom:"safe-area-max-inset-bottom",left:"safe-area-max-inset-left"},"titlebar-area":{x:"titlebar-area-x",y:"titlebar-area-y",width:"titlebar-area-width",height:"titlebar-area-height"},"keyboard-inset":{top:"keyboard-inset-top",right:"keyboard-inset-right",bottom:"keyboard-inset-bottom",left:"keyboard-inset-left",width:"keyboard-inset-width",height:"keyboard-inset-height"},"viewport-segment":{width:"viewport-segment-width",height:"viewport-segment-height",top:"viewport-segment-top",right:"viewport-segment-right",bottom:"viewport-segment-bottom",left:"viewport-segment-left"}};function we(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}be=void 0!==globalThis.matchMedia?globalThis.matchMedia("(orientation: portrait)"):r,me=void 0!==globalThis.matchMedia?globalThis.matchMedia("(device-posture: folded)"):r;function Te(){}function ke(){if(void 0!==globalThis.CSS&&"function"==typeof globalThis.CSS.supports){if(globalThis.CSS.supports("x: env(x)"))return"env";if(globalThis.CSS.supports("x: constant(x)"))return"constant"}}function Se(){var e=globalThis.viewport,t=globalThis.visualViewport,n=globalThis.navigator.devicePosture,r=void 0!==e,o=!r&&null!=t&&void 0!==t.segments,i=void 0!==n,a=Q((function(){D.add(globalThis,{type:"resize",callback:h}),r?p():o?(g(),p()):(null!==c||(c=b(),globalThis.document.body.appendChild(c)),g())}),(function(){D.remove(globalThis,{type:"resize",callback:h}),r?f():o?(v(),f()):(v(),null!==c&&(null!==c.parentNode&&c.parentNode.removeChild(c),c=null))})),l=ke(),c=null,s=[],u=null;function d(){s=function(){if("function"!=typeof globalThis.matchMedia)return[];for(var e=[],t=2;t<=4;t++)e.push(globalThis.matchMedia("(horizontal-viewport-segments: "+t+")")),e.push(globalThis.matchMedia("(vertical-viewport-segments: "+t+")"));return e}();for(var e=0;e<s.length;e++)D.add(s[e],{type:"change",callback:h});"not all"!==me.media&&D.add(me,{type:"change",callback:h})}function p(){i&&D.add(n,{type:"change",callback:h}),d()}function f(){i&&D.remove(n,{type:"change",callback:h}),function(){for(var e=0;e<s.length;e++)D.remove(s[e],{type:"change",callback:h});s=[],"not all"!==me.media&&D.remove(me,{type:"change",callback:h})}()}function g(){D.add(t,{type:"resize",callback:h,options:{passive:!0}})}function v(){D.remove(t,{type:"resize",callback:h,options:{passive:!0}})}function h(){var e=w();null!==u&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],o=t[n];if(r.width!==o.width||r.height!==o.height||r.top!==o.top||r.left!==o.left||r.bottom!==o.bottom||r.right!==o.right)return!1}return!0}(u,e)||(u=e,a.emit(e))}function b(){var e=le("div");return e.setAttribute("data-viewport-segment-observer",""),e.style.setProperty("position","fixed","important"),e.style.setProperty("top","0","important"),e.style.setProperty("left","0","important"),e.style.setProperty("visibility","hidden","important"),e.style.setProperty("pointer-events","none","important"),e.style.setProperty("z-index","-1","important"),e.style.setProperty("box-sizing","content-box","important"),e.style.setProperty("padding","0","important"),e.style.setProperty("margin","0","important"),e.style.setProperty("border","0","important"),e.style.setProperty("width","0","important"),e.style.setProperty("height","0","important"),e.style.setProperty("min-width","0","important"),e.style.setProperty("min-height","0","important"),e.style.setProperty("max-width","none","important"),e.style.setProperty("max-height","none","important"),e.style.setProperty("transition","none","important"),e.style.setProperty("animation","none","important"),e.style.setProperty("display","block","important"),e.style.setProperty("float","none","important"),e.style.setProperty("transform","none","important"),e}function m(){var e=globalThis.innerWidth,t=globalThis.innerHeight;return{width:e,height:t,top:0,left:0,bottom:t,right:e}}function y(e){var t=function(){if("function"!=typeof globalThis.matchMedia)return{rows:1,cols:1};for(var e=1,t=1,n=4;n>=2;n--)if(globalThis.matchMedia("(horizontal-viewport-segments: "+n+")").matches){e=n;break}for(n=4;n>=2;n--)if(globalThis.matchMedia("(vertical-viewport-segments: "+n+")").matches){t=n;break}return{rows:t,cols:e}}();if(1===t.rows&&1===t.cols)return[m()];if(void 0===l||void 0===e.style.setProperty)return[m()];for(var n=[],r=0;r<t.rows;r++)for(var o=0;o<t.cols;o++){e.style.setProperty("width",l+"(viewport-segment-width "+r+" "+o+", -1px)","important"),e.style.setProperty("height",l+"(viewport-segment-height "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-top",l+"(viewport-segment-top "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-left",l+"(viewport-segment-left "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-bottom",l+"(viewport-segment-bottom "+r+" "+o+", -1px)","important"),e.style.setProperty("margin-right",l+"(viewport-segment-right "+r+" "+o+", -1px)","important");var i=globalThis.getComputedStyle(e),a=globalThis.parseFloat(i.marginTop);if(!(a<0)){var c=globalThis.parseFloat(i.marginLeft),s=globalThis.parseFloat(i.marginBottom),u=globalThis.parseFloat(i.marginRight),d=globalThis.parseFloat(i.width),p=globalThis.parseFloat(i.height);n.push({width:d,height:p,top:a,left:c,bottom:s,right:u})}}return n}function w(){if(r||o)return function(){var n;if(null==(n=r?e.segments:t.segments))return[];for(var o=[],i=0;i<n.length;i++){var a=n[i];o.push({width:a.width,height:a.height,top:a.top,left:a.left,bottom:a.bottom,right:a.right})}return o}();if(null!==c)return y(c);var n=b();globalThis.document.body.appendChild(n);var i=y(n);return globalThis.document.body.removeChild(n),i}return{get value(){return w()},onChange:a.subscribe,useCssVariable:function(e){if(void 0===globalThis.document)return Te;var t=we(ye["viewport-segment"]),n=globalThis.document.documentElement,r=0;function o(o){for(var i=o.length;i<r;i++)for(var a=0;a<t.length;a++)n.style.removeProperty("--"+e+"-"+i+"-"+t[a]);r=o.length;for(i=0;i<o.length;i++){var l=o[i];for(a=0;a<t.length;a++){var c=t[a];n.style.setProperty("--"+e+"-"+i+"-"+c,l[c]+"px")}}}o(w());var i=a.subscribe((function(e){o(e)}));return function(){i();for(var o=0;o<r;o++)for(var a=0;a<t.length;a++)n.style.removeProperty("--"+e+"-"+o+"-"+t[a]);r=0}}}}function Ee(e){if("keyboard-inset"===e&&void 0!==globalThis.navigator.virtualKeyboard)return function(){var e=Q((function(){D.add(globalThis.navigator.virtualKeyboard,{type:"geometrychange",callback:t,options:{passive:!0}})}),(function(){D.remove(globalThis.navigator.virtualKeyboard,{type:"geometrychange",callback:t,options:{passive:!0}})}));function t(){e.emit(n())}function n(){var e=globalThis.navigator.virtualKeyboard.boundingRect,t=e.x,n=e.y,r=e.width,o=e.height;return{top:n,right:0===r?0:Math.max(0,globalThis.innerWidth-(t+r)),bottom:0===o?0:Math.max(0,globalThis.innerHeight-(n+o)),left:t,width:r,height:o}}return{get value(){return n()},onChange:e.subscribe,useCssVariable:function(t){if(void 0===globalThis.document)return Te;var r=we(ye["keyboard-inset"]),o=globalThis.document.documentElement;function i(e){for(var n=0;n<r.length;n++){var i=r[n];o.style.setProperty("--"+t+"-"+i,e[i]+"px")}}i(n());var a=e.subscribe((function(e){i(e)}));return function(){a();for(var e=0;e<r.length;e++)o.style.removeProperty("--"+t+"-"+r[e])}}}}();if("viewport-segment"===e)return Se();var t=ye[e],n=we(t),r=ke(),o=[],i=Q((function(){if(void 0===r)return;null===c&&v()}),(function(){h()})),a={},l=void 0,c=null,s=!1,u=null;try{var d=Object.defineProperty({},"passive",{get:function(){l={passive:!0}}});D.add(globalThis,{type:"test",callback:Te,options:d})}catch(e){}function p(){var e;s||(s=!0,e=function(){s=!1;var e=m();null!==u&&function(e,t){for(var r=0;r<n.length;r++){var o=n[r];if(e[o]!==t[o])return!1}return!0}(u,e)||(u=e,i.emit(e))},void 0===globalThis.queueMicrotask?"function"!=typeof globalThis.Promise?globalThis.setTimeout(e,0):Promise.resolve().then(e):globalThis.queueMicrotask(e))}function f(e){if(void 0!==e)o.push(e);else for(var t=0;t<o.length;t++)o[t]()}function g(e,n){var o=t[n],i=globalThis.document.createElement("div"),c=globalThis.document.createElement("div"),s=globalThis.document.createElement("div"),u=globalThis.document.createElement("div"),d={position:"absolute",width:"100px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:r+"("+o+")"};ae(i,d),ae(c,d),ae(s,{transition:"0s",animation:"none",width:"400px",height:"400px"}),ae(u,{transition:"0s",animation:"none",width:"250%",height:"250%"}),i.appendChild(s),c.appendChild(u),e.appendChild(i),e.appendChild(c),f((function(){i.scrollTop=c.scrollTop=1e4;var e=i.scrollTop,t=c.scrollTop;function n(){var n;n=this===i?e:t,this.scrollTop!==n&&(i.scrollTop=c.scrollTop=1e4,e=i.scrollTop,t=c.scrollTop,p())}D.add(i,{type:"scroll",callback:n,options:l}),D.add(c,{type:"scroll",callback:n,options:l})}));var g=globalThis.getComputedStyle(i);Object.defineProperty(a,n,{configurable:!0,get:function(){return globalThis.parseFloat(g.paddingBottom)}})}function v(){if(void 0!==r){a={},(c=globalThis.document.createElement("div")).setAttribute("data-"+e+"-observer",""),ae(c,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"});for(t=0;t<n.length;t++)g(c,n[t]);globalThis.document.body.appendChild(c),u=m(),f()}else for(var t=0;t<n.length;t++)a[n[t]]=0}function h(){null!==c&&(null!==c.parentNode&&c.parentNode.removeChild(c),c=null),o.length=0,a={},u=null}function b(e){return a[e]}function m(){for(var e={},t=0;t<n.length;t++){var r=n[t];e[r]=b(r)}return e}return{get value(){if(null!==c)return m();v();var e=m();return h(),e},onChange:function(e,t){return void 0===t&&(t={}),void 0===r?Te:i.subscribe(e,t)},useCssVariable:function(e){if(void 0===r||void 0===globalThis.document)return Te;var t=globalThis.document.documentElement;function o(r){for(var o=0;o<n.length;o++){var i=n[o];t.style.setProperty("--"+e+"-"+String(n[o]),r[i]+"px")}}var a=i.subscribe((function(e){o(e)}));return o(m()),function(){a();for(var r=0;r<n.length;r++)t.style.removeProperty("--"+e+"-"+String(n[r]))}}}}function Pe(e,t){function n(r){if(!(this instanceof n))return new n(r);var o=new t(void 0===r?"":r);if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,n.prototype):o.__proto__=n.prototype,o.name=e,void 0!==r&&(o.message=r),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(o,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(o,n);else if(t.captureStackTrace&&"function"==typeof t.captureStackTrace)t.captureStackTrace(o,n);else try{var i=new t;i.stack&&(o.stack=i.stack)}catch(e){}return o}void 0===t&&(t=Error),n.prototype=Object.create(t.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(t){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}var xe=Pe("PermissionNotGrantedError"),Ie=Pe("NotSupportedError"),Ae=Ee("safe-area-inset"),Oe=Ee("safe-area-max-inset"),De=Ee("keyboard-inset"),Me=Ee("titlebar-area"),Ce=Ee("viewport-segment"),Ne=Q((function(){Ue=Ge(),D.add(globalThis,{type:"resize",callback:Be})}),(function(){Ue=null,D.remove(globalThis,{type:"resize",callback:Be})})),Le=Q((function(){if(void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&"function"==typeof globalThis.screen.orientation.addEventListener)return D.add(globalThis.screen.orientation,{type:"change",callback:He});if(void 0!==globalThis.orientation)return D.add(globalThis,{type:"orientationchange",callback:He});if("not all"!==be.media)return D.add(be,{type:"change",callback:He});throw new Ie("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported")}),(function(){if(void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&"function"==typeof globalThis.screen.orientation.removeEventListener)return D.remove(globalThis.screen.orientation,{type:"change",callback:He});if(void 0!==globalThis.orientation)return D.remove(globalThis,{type:"orientationchange",callback:He});if("not all"!==be.media)return D.remove(be,{type:"change",callback:He});throw new Ie("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported")})),Fe=Q((function(){return new Promise((function(e,t){if(!je())return t(new Ie("'window.DeviceOrientationEvent' does not supported."));var n=DeviceOrientationEvent;if("function"!=typeof n.requestPermission)return D.add(globalThis,{type:"deviceorientation",callback:Ve}),e();n.requestPermission().then((function(n){return"granted"===n?(D.add(globalThis,{type:"deviceorientation",callback:Ve}),e()):t(new xe("'deviceorientation' permission is not granted."))})).catch((function(e){return t(new Ie("'window.DeviceOrientationEvent' does not supported."))}))}))}),(function(){D.remove(globalThis,{type:"deviceorientation",callback:Ve})})),Ue=null,_e=null,qe=null,We={get value(){return Ge()},environment:{safeAreaInset:Ae,safeAreaMaxInset:Oe,keyboardInset:De,titlebarArea:Me,viewportSegment:Ce},screenOrientation:{get supported(){return void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&void 0!==globalThis.screen.orientation.type||void 0!==globalThis.orientation||"not all"!==be.media},get value(){return Re()},onChange:Le.subscribe},deviceOrientation:{get supported(){return je()},get value(){return new Promise((function(e,t){if(null!==qe)return e(qe);if(!je())return t(new Ie("'window.DeviceOrientationEvent' does not supported."));var n=DeviceOrientationEvent,r=function(t){var n={alpha:t.alpha,beta:t.beta,gamma:t.gamma,absolute:t.absolute};return qe=n,D.remove(globalThis,{type:"deviceorientation",callback:r}),e(n)};"function"==typeof n.requestPermission?n.requestPermission().then((function(e){if("granted"!==e)return t(new xe("'deviceorientation' permission is not granted."));D.add(globalThis,{type:"deviceorientation",callback:r})})).catch((function(e){return t(new Ie("'window.DeviceOrientationEvent' does not supported."))})):D.add(globalThis,{type:"deviceorientation",callback:r})}))},onChange:Fe.subscribe},onChange:Ne.subscribe,Constants:{Orientation:ce},Errors:{NotSupportedError:Ie,PermissionNotGrantedError:xe}};function Re(){if(void 0!==globalThis.screen&&void 0!==globalThis.screen.orientation&&void 0!==globalThis.screen.orientation.type)switch(globalThis.screen.orientation.type){case"portrait-primary":return ce.PortraitPrimary;case"portrait-secondary":return ce.PortraitSecondary;case"landscape-primary":return ce.LandscapePrimary;case"landscape-secondary":return ce.LandscapeSecondary}if(void 0!==globalThis.orientation)switch(globalThis.orientation){case 0:return ce.PortraitPrimary;case 180:return ce.PortraitSecondary;case 90:return ce.LandscapePrimary;case-90:case 270:return ce.LandscapeSecondary}if("not all"===be.media)throw new Ie("'screen.orientation', 'window.orientation', and the orientation media query are all unsupported");return be.matches?ce.PortraitPrimary:ce.LandscapePrimary}function Ge(){var e=0,t=0,n=0,r=0,o=void 0!==globalThis.devicePixelRatio?globalThis.devicePixelRatio:-1;return void 0!==globalThis.innerWidth&&(e=globalThis.innerWidth,t=globalThis.innerHeight,n=globalThis.outerWidth,r=globalThis.outerHeight),{innerWidth:e,innerHeight:t,outerWidth:n,outerHeight:r,scale:o}}function Be(){var e=Ge();null!==Ue&&e.innerWidth===Ue.innerWidth&&e.innerHeight===Ue.innerHeight&&e.outerWidth===Ue.outerWidth&&e.outerHeight===Ue.outerHeight&&e.scale===Ue.scale||Ne.emit(Ue=e)}function He(){var e=Re();null!==_e&&e===_e||Le.emit(_e=e)}function je(){return void 0!==globalThis.DeviceOrientationEvent}function Ve(e){qe={alpha:e.alpha,beta:e.beta,gamma:e.gamma,absolute:e.absolute},Fe.emit(qe)}var ze,Ye,Ke=Pe("InvalidStateError"),Ze=null,Xe=null,Je=!1,Qe=function(){if("function"==typeof Symbol){var e=globalThis.__nativeFnFsBridgeKey__;return"symbol"==typeof e?e:globalThis.__nativeFnFsBridgeKey__=Symbol("native.fn.fs.bridged")}return"__nativeFnFsBridged__"}(),$e={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"}}},et=function(){var e=globalThis.document.documentElement;if(void 0!==globalThis.document.fullscreenEnabled||void 0!==globalThis.document.exitFullscreen)return $e.standard;for(var t=["webkit","moz","ms"],n=0;n<t.length;n++){var r=t[n],o=$e[r];if(void 0!==globalThis.document[o.enabled]||void 0!==globalThis.document[o.element]||void 0!==globalThis.document[o.exit])return"webkit"===r&&void 0!==e.webkitRequestFullScreen&&(o.request="webkitRequestFullScreen"),o}return null}(),tt=Q((function(){null!=et&&D.add(globalThis.document,{type:et.events.change,callback:st,options:!1});J.os.name===o.iOS&&gt()}),(function(){null!=et&&D.remove(globalThis.document,{type:et.events.change,callback:st,options:!1});if(J.os.name!==o.iOS)return;for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)D.remove(e[t],{type:"webkitbeginfullscreen",callback:dt,options:!1}),D.remove(e[t],{type:"webkitendfullscreen",callback:pt,options:!1}),e[t][Qe]=!1})),nt=Q((function(){null!=et&&D.add(globalThis.document,{type:et.events.error,callback:ut,options:!1})}),(function(){null!=et&&D.remove(globalThis.document,{type:et.events.error,callback:ut,options:!1})})),rt={get supported(){return function(){if(null!==et)return!0===globalThis.document[et.enabled];if(J.os.name!==o.iOS)return!1;var e=(t=globalThis.document.querySelector("video"),null!==t?t:null===Ze?Ze=globalThis.document.createElement("video"):Ze);var t;return!0===e.webkitSupportsFullscreen||"function"==typeof e.webkitEnterFullscreen}()},get element(){return ot()},get isActive(){return it()},request:function(e,t){return new Promise((function(n,r){if(void 0===e&&(e=function(){if(J.os.name===o.iOS){var e=globalThis.document.querySelector("video");return null!==e?e:void 0}return globalThis.document.documentElement}()),void 0===e)return r(new Ie("Failed to enter fullscreen mode."));if(it()&&ot()!==e&&J.browser.name===l.Safari&&J.os.name===o.iOS)return r(new Ie("There is already a Fullscreen element in this document."));var i=e.tagName.toLowerCase(),a=null!==Xe&&!0===Xe.webkitDisplayingFullscreen;if(null!==et){var c=e[et.request];if("function"==typeof c&&!a){var s=c.call(e,t);return void 0!==s&&"function"==typeof s.then?void s.then(n).catch((function(){try{if(J.os.name!==o.iOS)return r(new Ie('The "'+i+'" element does not support fullscreen requests.'));u()}catch(e){r(new Ie('The "'+i+'" element does not support fullscreen requests.'))}})):n()}}function u(){if(J.os.name===o.iOS&&void 0!==e&&"VIDEO"===e.tagName.toUpperCase()){var t=e;if(t.webkitSupportsFullscreen&&"function"==typeof t.webkitEnterFullscreen){if(null===et&&ft(t),0===t.played.length)t.play().then((function(){try{t.webkitSupportsFullscreen&&"function"==typeof t.webkitEnterFullscreen&&t.webkitEnterFullscreen()}catch(e){return r(new Ke("The object is in an invalid state."))}}));else try{t.webkitEnterFullscreen()}catch(e){return r(new Ke("The object is in an invalid state."))}return Xe=t,n()}}r(new Ie('The "'+i+'" element does not support fullscreen requests.'))}u()}))},exit:function(){return new Promise((function(e,t){if(null!==et){var n=globalThis.document[et.exit];if("function"==typeof n){var r=n.call(globalThis.document);return void 0!==r&&"function"==typeof r.then?void r.then(e).catch(e):e()}}!function(){if(J.os.name===o.iOS){var n=Xe;if(null!==n&&"function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n.webkitDisplayingFullscreen?t(new Ie("Failed to exit fullscreen mode.")):(Xe=null,e());for(var r=globalThis.document.querySelectorAll("video"),i=0;i<r.length;i++){var a=r[i];if("function"==typeof a.webkitExitFullscreen&&!0===a.webkitDisplayingFullscreen)return a.webkitExitFullscreen(),a.webkitDisplayingFullscreen?t(new Ie("Failed to exit fullscreen mode.")):(Xe=null,e())}if(null===ot())return e();t(new Ie("Failed to exit fullscreen mode."))}else t(new Ie("Failed to exit fullscreen mode."))}()}))},toggle:function(e,t){var n=ot();if(void 0!==e)return n===e?this.exit():this.request(e,t);return null!==n?this.exit():this.request(void 0,t)},onChange:function(e,t,n){if("function"==typeof e)return tt.subscribe(e,t);var r=e,o=t;return tt.subscribe((function(e){e.element===r&&o(e)}),n)},onError:function(e,t,n){if("function"==typeof e)return nt.subscribe(e,t);var r=e,o=t;return nt.subscribe((function(e){e.element===r&&o(e)}),n)},Constants:{},Errors:{NotSupportedError:Ie,InvalidStateError:Ke}};function ot(){if(null===et)return null!==Xe&&!0===Xe.webkitDisplayingFullscreen?Xe:null;var e=globalThis.document[et.element];return void 0!==e?e:null}function it(){return null!==ot()}function at(e,t,n){return{nativeEvent:e,element:t,isActive:n}}function lt(e,t,n){tt.emit(at(e,t,n))}function ct(e,t,n){nt.emit(at(e,t,n))}function st(e){var t=e.target;t instanceof globalThis.Element&&lt(e,t,it()),t instanceof globalThis.Document&&lt(e,globalThis.document.documentElement,it())}function ut(e){var t=e.target;t instanceof globalThis.Element&&ct(e,t,it()),t instanceof globalThis.Document&&ct(e,globalThis.document.documentElement,it())}function dt(e){Xe=this,lt(e,this,!0)}function pt(e){Xe===this&&(Xe=null),lt(e,this,!1)}function ft(e){e[Qe]||void 0===e.webkitEnterFullscreen&&void 0===e.onwebkitbeginfullscreen||(D.add(e,{type:"webkitbeginfullscreen",callback:dt,options:!1}),D.add(e,{type:"webkitendfullscreen",callback:pt,options:!1}),e[Qe]=!0)}function gt(){for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)ft(e[t])}Je||(Je=!0,J.os.name===o.iOS&&(gt(),void 0!==globalThis.MutationObserver&&new globalThis.MutationObserver((function(e){if(null!==Xe){for(var t=!1,n=0;n<e.length;n++){for(var r=e[n].removedNodes,o=0;o<r.length;o++)if((a=r[o])===Xe||a.nodeType===Node.ELEMENT_NODE&&a.contains(Xe)){t=!0;break}if(t)break}t&&!globalThis.document.contains(Xe)&&(Xe=null)}for(n=0;n<e.length;n++){var i=e[n].addedNodes;for(o=0;o<i.length;o++){var a;if((a=i[o]).nodeType===Node.ELEMENT_NODE){var l=a;if("VIDEO"!==l.tagName)for(var c=l.querySelectorAll("video"),s=0;s<c.length;s++)ft(c[s]);else ft(l)}}}})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0}))),function(e){e.Notification="notifications",e.Geolocation="geolocation",e.Camera="camera",e.ClipboardRead="clipboard-read",e.Microphone="microphone",e.MIDI="midi",e.DeviceOrientation="device-orientation",e.DeviceMotion="device-motion"}(ze||(ze={})),function(e){e.Grant="grant",e.Denied="denied",e.Prompt="prompt",e.Unsupported="unsupported"}(Ye||(Ye={}));var vt=function(){if(void 0!==globalThis.navigator.mediaDevices&&void 0!==globalThis.navigator.mediaDevices.getUserMedia)return globalThis.navigator.mediaDevices.getUserMedia.bind(globalThis.navigator.mediaDevices);var e=void 0!==globalThis.navigator.getUserMedia?globalThis.navigator.getUserMedia:void 0!==globalThis.navigator.webkitGetUserMedia?globalThis.navigator.webkitGetUserMedia:void 0!==globalThis.navigator.mozGetUserMedia?globalThis.navigator.mozGetUserMedia:void 0!==globalThis.navigator.msGetUserMedia?globalThis.navigator.msGetUserMedia:void 0;return void 0!==e?function(t){return void 0===t&&(t={}),new Promise((function(n,r){e.call(globalThis.navigator,t,n,r)}))}:void 0}(),ht={get supported(){return void 0!==globalThis.navigator.permissions},request:function(e){var t=this;return new Promise((function(n,r){function o(){t.check(e).then(n)}t.check(e).then((function(t){if(t===Ye.Grant)return n(t);switch(e){case ze.Notification:if(void 0===globalThis.Notification)return n(Ye.Unsupported);globalThis.Notification.requestPermission().then((function(e){n(bt(e))}));break;case ze.Geolocation:if(void 0===globalThis.navigator.geolocation)return n(Ye.Unsupported);globalThis.navigator.geolocation.getCurrentPosition(o,o);break;case ze.Microphone:case ze.Camera:if(void 0===vt)return n(Ye.Unsupported);vt({video:e===ze.Camera,audio:e===ze.Microphone}).then((function(e){for(var t=e.getTracks(),n=0;n<t.length;n++)t[n].stop();o()})).catch(o);break;case ze.ClipboardRead:if(void 0===globalThis.navigator.clipboard||void 0===globalThis.navigator.clipboard.read)return n(Ye.Unsupported);globalThis.navigator.clipboard.read().then(o).catch(o);break;case ze.MIDI:if(void 0===globalThis.navigator.requestMIDIAccess)return n(Ye.Unsupported);globalThis.navigator.requestMIDIAccess().then(o).catch(o);break;case ze.DeviceOrientation:case ze.DeviceMotion:var i=mt(e);if(void 0===i||void 0===i.event)return n(Ye.Unsupported);if("function"!=typeof i.event.requestPermission)return n(Ye.Grant);try{i.event.requestPermission().then((function(e){n(bt(e))}))}catch(e){return r(new Ie("'DeviceOrientationEvent.requestPermission()' must be called within a user gesture context."))}break;default:return n(Ye.Unsupported)}}))}))},check:function(e){if(e===ze.DeviceOrientation||e===ze.DeviceMotion)return new Promise((function(t){var n=mt(e);if(void 0===n||void 0===n.event)return t(Ye.Unsupported);if("function"!=typeof n.event.requestPermission)return t(Ye.Grant);var r=!1;D.add(globalThis,{type:n.type,callback:function(){r=!0},options:{once:!0}}),setTimeout((function(){if(r)return t(Ye.Grant);n.event.requestPermission().then((function(e){t(bt(e))})).catch((function(){t(Ye.Prompt)}))}),50)}));return new Promise((function(t){if(void 0===globalThis.navigator.permissions)return t(Ye.Unsupported);globalThis.navigator.permissions.query({name:e}).then((function(e){switch(e.state){case"prompt":return t(Ye.Prompt);case"granted":return t(Ye.Grant);case"denied":return t(Ye.Denied);default:return t(Ye.Unsupported)}}))}))},Constants:{PermissionType:ze,PermissionState:Ye},Errors:{NotSupportedError:Ie}};function bt(e){switch(e){case"granted":return Ye.Grant;case"denied":return Ye.Denied;case"prompt":case"default":return Ye.Prompt;default:return Ye.Unsupported}}function mt(e){switch(e){case ze.DeviceOrientation:return{event:globalThis.DeviceOrientationEvent,type:"deviceorientation"};case ze.DeviceMotion:return{event:globalThis.DeviceMotionEvent,type:"devicemotion"};default:return}}var yt,wt,Tt,kt,St,Et,Pt,xt,It,At,Ot,Dt=Q((function(){if(!Nt())return;ht.request(ze.Geolocation).then((function(e){e===Ye.Grant&&(Mt=globalThis.navigator.geolocation.watchPosition((function(e){var t;t=e.coords,Dt.emit(t)})))}))}),(function(){if(!Nt()||null===Mt)return;globalThis.navigator.geolocation.clearWatch(Mt)})),Mt=null,Ct={get value(){return new Promise((function(e,t){function n(n){(function(e){return new Promise((function(t,n){var r;(r="http://ip-api.com/json?fields=lat,lon",new Promise((function(e){var t={},n=void 0;if(void 0===globalThis.fetch){if("undefined"!=typeof XMLHttpRequest){var o=new XMLHttpRequest;o.open("GET",r,!0);for(var i=we(t),a=0;a<i.length;a++){var l=i[a];o.setRequestHeader(l,t[l])}return o.onreadystatechange=function(){if(4===o.readyState)if(o.status>=200&&o.status<300)try{e(JSON.parse(o.responseText))}catch(t){e(void 0)}else e(void 0)},o.onerror=function(){e(void 0)},void o.send(n)}e(void 0)}else fetch(r,{method:"GET",headers:t,body:n}).then((function(t){return t.ok?t.json().then((function(t){e(t)})).catch((function(){e(void 0)})):(e(void 0),Promise.resolve())})).catch((function(){e(void 0)}))}))).then((function(r){if(void 0!==r){var o={latitude:r.lat,longitude:r.lon,accuracy:-1,altitude:null,altitudeAccuracy:null,heading:null,speed:null};t(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=Object(e[0]),r=1;r<e.length;r++){var o=e[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&"__proto__"!==i&&"constructor"!==i&&"prototype"!==i&&(n[i]=o[i])}return n}(o,{toJSON:function(){return o}}))}else n(e)})).catch((function(){n(e)}))}))})(n).then(e).catch(t)}if(!Nt())return n(new Ie("'navigator.geolocation' does not supported."));ht.request(ze.Geolocation).then((function(t){if(t!==Ye.Grant)return n(new xe("'geolocation' permission is not granted."));globalThis.navigator.geolocation.getCurrentPosition((function(t){e(t.coords)}),(function(e){return n(function(e){switch(e.code){case GeolocationPositionError.PERMISSION_DENIED:return new xe("'geolocation' permission is not granted.");case GeolocationPositionError.POSITION_UNAVAILABLE:return new Ie("The acquisition of the geolocation failed because at least one internal source of position returned an internal error.");case GeolocationPositionError.TIMEOUT:return new Ie("The time allowed to acquire the geolocation was reached before the information was obtained.");default:return new Ie("Unknown error.")}}(e))}))}))}))},get supported(){return Nt()},onChange:Dt.subscribe,Constants:{},Errors:{NotSupportedError:Ie,PermissionNotGrantedError:xe}};function Nt(){return void 0!==globalThis.navigator.geolocation}!function(e){e[e.Scheme=0]="Scheme",e[e.Universal=1]="Universal",e[e.Intent=2]="Intent",e[e.Fallback=3]="Fallback",e[e.Store=4]="Store"}(Et||(Et={})),function(e){e.General="general",e.Network="network",e.Display="display",e.Appearance="appearance",e.Accessibility="accessibility",e.Battery="battery",e.Datetime="datetime",e.Language="language",e.Accounts="accounts",e.Storage="storage"}(Pt||(Pt={})),function(e){e.Image="image",e.Video="video"}(xt||(xt={})),function(e){e.User="user",e.Environment="environment"}(It||(It={})),function(e){e.Desktop="desktop",e.Documents="documents",e.Downloads="downloads",e.Music="music",e.Pictures="pictures",e.Videos="videos"}(At||(At={})),function(e){e.Read="read",e.ReadWrite="readwrite"}(Ot||(Ot={}));var Lt=((yt={})[o.Android]=((wt={})[Pt.General]="intent:#Intent;action=android.settings.SETTINGS;end",wt[Pt.Network]="intent:#Intent;action=android.settings.WIFI_SETTINGS;end",wt[Pt.Display]="intent:#Intent;action=android.settings.DISPLAY_SETTINGS;end",wt[Pt.Appearance]="intent:#Intent;action=android.settings.DISPLAY_SETTINGS;end",wt[Pt.Accessibility]="intent:#Intent;action=android.settings.ACCESSIBILITY_SETTINGS;end",wt[Pt.Battery]="intent:#Intent;action=android.settings.BATTERY_SAVER_SETTINGS;end",wt[Pt.Datetime]="intent:#Intent;action=android.settings.DATE_SETTINGS;end",wt[Pt.Language]="intent:#Intent;action=android.settings.LOCALE_SETTINGS;end",wt[Pt.Accounts]="intent:#Intent;action=android.settings.SYNC_SETTINGS;end",wt[Pt.Storage]="intent:#Intent;action=android.settings.INTERNAL_STORAGE_SETTINGS;end",wt),yt[o.Windows]=((Tt={})[Pt.General]="ms-settings:system",Tt[Pt.Network]="ms-settings:network",Tt[Pt.Display]="ms-settings:display",Tt[Pt.Appearance]="ms-settings:colors",Tt[Pt.Accessibility]="ms-settings:easeofaccess",Tt[Pt.Battery]="ms-settings:batterysaver",Tt[Pt.Datetime]="ms-settings:dateandtime",Tt[Pt.Language]="ms-settings:regionlanguage",Tt[Pt.Accounts]="ms-settings:emailandaccounts",Tt[Pt.Storage]="ms-settings:storagesense",Tt),yt[o.MacOS]=((kt={})[Pt.General]="x-apple.systempreferences:",kt[Pt.Network]="x-apple.systempreferences:com.apple.preference.network",kt[Pt.Display]="x-apple.systempreferences:com.apple.preference.displays",kt[Pt.Appearance]="x-apple.systempreferences:com.apple.preference.general",kt[Pt.Accessibility]="x-apple.systempreferences:com.apple.preference.universalaccess",kt[Pt.Battery]="x-apple.systempreferences:com.apple.preference.energysaver",kt[Pt.Datetime]="x-apple.systempreferences:com.apple.preference.datetime",kt[Pt.Language]="x-apple.systempreferences:com.apple.Localization",kt[Pt.Accounts]="x-apple.systempreferences:com.apple.preferences.internetaccounts",kt[Pt.Storage]="x-apple.systempreferences:",kt),yt["MacOS13+"]=((St={})[Pt.General]="x-apple.systempreferences:com.apple.General-Settings.extension",St[Pt.Network]="x-apple.systempreferences:com.apple.Network-Settings.extension",St[Pt.Display]="x-apple.systempreferences:com.apple.Displays-Settings.extension",St[Pt.Appearance]="x-apple.systempreferences:com.apple.Appearance-Settings.extension",St[Pt.Accessibility]="x-apple.systempreferences:com.apple.Accessibility-Settings.extension",St[Pt.Battery]="x-apple.systempreferences:com.apple.Battery-Settings.extension",St[Pt.Datetime]="x-apple.systempreferences:com.apple.Date-Time-Settings.extension",St[Pt.Language]="x-apple.systempreferences:com.apple.Localization-Settings.extension",St[Pt.Accounts]="x-apple.systempreferences:com.apple.Internet-Accounts-Settings.extension",St[Pt.Storage]="x-apple.systempreferences:com.apple.settings.Storage",St),yt);function Ft(){try{if(null!==globalThis.top&&globalThis.top!==globalThis.window)return globalThis.top.location.href,globalThis.top}catch(e){}return window}function Ut(e,t){var n;void 0===t&&(t=globalThis);try{n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:t})}catch(e){(n=globalThis.document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,null)}e.dispatchEvent(n)}function _t(e){for(var t="",n=(new Date).getTime(),r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt((n=(9301*n+49297)%233280)%62);return t}function qt(e,t,n){return t|=0,"string"!=typeof e&&(e=String(e)),e.length>=t?e:((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),n.slice(0,t)+e)}var Wt=Pe("URLOpenError"),Rt=Pe("UserCancelledError"),Gt={app:function(e){var t,n=J.os.name,r=[],i=[],a={};if(n===o.Android){var l=function(e){return void 0!==e[o.Android]?e[o.Android]:e.android}(e);if(void 0===l)return Promise.reject(un(i));if(t=l.timeout,a.scheme=cn(l.scheme),a.intent=cn(l.intent),a.packageName=l.packageName,a.fallback=cn(l.fallback),a.appStore=Vt(a.packageName,o.Android),a.webStore=zt(a.packageName,o.Android),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.intent&&(void 0===a.scheme||void 0===a.packageName||void 0===a.fallback)){var c=function(e){for(var t={},n=e.split("#Intent;"),r=n[0].substring(9),o=n[1],i=o.substring(0,o.length-4).split(";"),a={},l=0;l<i.length;l++){var c=i[l],s=c.indexOf("=");-1!==s&&(a[c.substring(0,s)]=c.substring(s+1))}void 0!==a.scheme&&(t.scheme=a.scheme+"://"+r);void 0!==a.package&&(t.packageName=a.package);void 0!==a["S.browser_fallback_url"]&&(t.fallback=a["S.browser_fallback_url"]);return t}(a.intent);void 0!==c.scheme&&void 0===a.scheme&&(a.scheme=c.scheme),void 0!==c.packageName&&void 0===a.packageName&&(a.packageName=c.packageName),void 0!==c.fallback&&void 0===a.fallback&&(a.fallback=c.fallback)}void 0!==a.scheme&&void 0===a.intent&&(a.intent=function(e,t,n){var r=e.split("://"),i=r[0],a=r[1],l="intent://";void 0!==a&&(l+=a);l+="#Intent;scheme="+i+";action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;",void 0!==t&&(l+="package="+t+";");void 0!==n&&"string"==typeof n?l+="S.browser_fallback_url="+globalThis.encodeURIComponent(n)+";":void 0!==t&&(l+="S.browser_fallback_url="+globalThis.encodeURIComponent(Vt(t,o.Android))+";");return l+"end"}(a.scheme,a.packageName,a.fallback))}else if(n===o.iOS){l=function(e){return void 0!==e[o.iOS]?e[o.iOS]:e.ios}(e);if(void 0===l)return Promise.reject(un(i));t=l.timeout,a.scheme=cn(l.scheme),a.bundleId=l.bundleId,a.trackId=l.trackId,a.universal=cn(l.universal),a.fallback=cn(l.fallback),a.appStore=Vt(a.trackId,o.iOS),a.webStore=zt(a.trackId,o.iOS),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.bundleId&&void 0===a.trackId&&(a.trackId=jt(a.bundleId))}else if(n===o.Windows){l=function(e){return void 0!==e[o.Windows]?e[o.Windows]:e.windows}(e);if(void 0===l)return Promise.reject(un(i));t=l.timeout,a.scheme=cn(l.scheme),a.productId=l.productId,a.fallback=cn(l.fallback),a.appStore=Vt(a.productId,o.Windows),a.webStore=zt(a.productId,o.Windows),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore}else if(n===o.MacOS){l=function(e){return void 0!==e[o.MacOS]?e[o.MacOS]:e.macos}(e);if(void 0===l)return Promise.reject(un(i));t=l.timeout,a.scheme=cn(l.scheme),a.bundleId=l.bundleId,a.trackId=l.trackId,a.fallback=cn(l.fallback),a.appStore=Vt(a.trackId,o.MacOS),a.webStore=zt(a.trackId,o.MacOS),a.allowAppStore=l.allowAppStore,a.allowWebStore=l.allowWebStore,void 0!==a.bundleId&&void 0===a.trackId&&(a.trackId=jt(a.bundleId))}en(r,a.intent,Et.Intent,Kt()),en(r,a.universal,Et.Universal,Zt()),en(r,a.scheme,Et.Scheme,!0),en(r,a.fallback,Et.Fallback,!0),en(r,a.appStore,Et.Store,a.allowAppStore),en(r,a.webStore,Et.Store,a.allowWebStore),void 0===t&&(t=Yt(n));return new Promise((function(e,n){return function o(a){if(void 0===a&&(a=0),a>=r.length)return n(un(i));var l=r[a],c=l[0],s=l[1];if("string"==typeof s)return i[a]=s,hn(s,a,t).then((function(){e(c)})).catch((function(){o(a+1)}));i[a]="[function fallback]",s(),e(c)}()}))},telephone:function(e){return bn(e,"tel")},message:function(e){return bn(e,"sms")},mail:function(e){return bn(e,"mailto")},file:function(e){if(void 0!==globalThis.showOpenFilePicker){var t={};if(void 0!==e&&(void 0!==e.multiple&&(t.multiple=e.multiple),void 0!==e.id&&(t.id=e.id),void 0!==e.startIn&&(t.startIn=e.startIn),void 0!==e.accept)){var n={};t.excludeAcceptAllOption=!0,t.types=[{description:"",accept:n}];for(var r=0;r<e.accept.length;r++){var o=e.accept[r];/^\.\w+/i.test(o)?(void 0===n["application/octet-stream"]&&(n["application/octet-stream"]=[]),n["application/octet-stream"].push(o)):/^\w+\/\w+$/i.test(o)&&(n[o]=[])}}return gn(globalThis.showOpenFilePicker(t))}var i=le("input");i.type="file",void 0!==e&&(void 0!==e.multiple&&(i.multiple=e.multiple),void 0!==e.accept&&(i.accept=tn(e.accept)));return gn(i)},directory:function(e){if(!Jt())return Promise.reject(new Ie("'window.showDirectoryPicker' and 'HTMLInputElement.prototype.webkitdirectory' does not supported."));if(void 0!==globalThis.showDirectoryPicker){var t={};return void 0!==e&&(void 0!==e.id&&(t.id=e.id),void 0!==e.startIn&&(t.startIn=e.startIn),void 0!==e.mode&&(t.mode=e.mode)),vn(globalThis.showDirectoryPicker(t))}var n=le("input");return n.type="file",n.webkitdirectory=!0,vn(n)},setting:function(e){var t=J.os.name,n=J.os.version;if(!Xt())return Promise.reject(un([]));var r=[];switch(t){case o.Android:e!==Pt.General&&(e===Pt.Accessibility&&u(n,"1.6")>=0?r.push(Lt.Android[Pt.Accessibility]):e===Pt.Battery&&u(n,"5.1")>=0?r.push(Lt.Android[Pt.Battery]):e===Pt.Accounts&&u(n,"1.5")>=0?r.push(Lt.Android[Pt.Accounts]):e===Pt.Storage&&u(n,"3.0")>=0?r.push(Lt.Android[Pt.Storage]):r.push(Lt.Android[e])),r.push(Lt.Android[Pt.General]);break;case o.Windows:r.push(Lt.Windows[e]);break;case o.MacOS:if(e===Pt.Appearance&&u(n,"10.14")<0){r.push(Lt.MacOS[Pt.General]);break}u(n,"13.0")<0?r.push(Lt.MacOS[e]):r.push(Lt["MacOS13+"][e])}return new Promise((function(e,t){return function n(o){return void 0===o&&(o=0),o>=r.length?t(un([])):hn(r[o],o,750).then((function(){e()})).catch((function(){n(o+1)}))}()}))},camera:function(e){var t=le("input");t.type="file",t.accept="image/*;capture=camera",t.capture="environment",void 0!==e&&(void 0!==e.type&&(e.type===xt.Image?t.accept="image/*;capture=camera":t.accept="video/*;capture=camcorder"),void 0!==e.capture&&(e.capture===It.Environment?t.capture="environment":t.capture="user"));return gn(t)},contact:function(e){return new Promise((function(t,n){if(!Qt())return n(new Ie("'navigator.contacts' does not supported."));var r=!1;void 0!==e&&void 0!==e.multiple&&(r=e.multiple),globalThis.navigator.contacts.getProperties().then((function(e){globalThis.navigator.contacts.select(e,{multiple:r}).then((function(e){t(e)}))}))}))},share:function(e){return new Promise((function(t,n){return $t()?globalThis.navigator.canShare(e)?void globalThis.navigator.share(e).then((function(){t()})).catch((function(e){return"AbortError"===e.name?n(new Rt("User cancelled the operation.")):n(new Ie(e.message))})):n(new Ie("The provided data cannot be shared on this device.")):n(new Ie("'navigator.share' does not supported."))}))},calendar:function(e){var t="function"==typeof Date.now?Date.now():(new Date).getTime(),n="BEGIN:VCALENDAR\r\nVERSION:2.0\r\n";""!==globalThis.document.title?n+=ln("PRODID:-//"+on(globalThis.document.title)+"//EN")+"\r\n":n+=ln("PRODID:-//"+on(globalThis.location.host)+"//EN")+"\r\n";n+="BEGIN:VEVENT\r\nUID:"+t+"-"+_t(10)+"\r\nDTSTAMP:"+sn(new Date)+"\r\n",!0===e.allDay?n+="DTSTART;VALUE=DATE:"+sn(e.startDate,!0)+"\r\nDTEND;VALUE=DATE:"+sn(e.endDate,!0)+"\r\n":n+="DTSTART:"+sn(e.startDate)+"\r\nDTEND:"+sn(e.endDate)+"\r\n";void 0!==e.title&&(n+=ln("SUMMARY:"+on(e.title))+"\r\n");void 0!==e.description&&(n+=ln("DESCRIPTION:"+on(e.description))+"\r\n");void 0!==e.location&&(n+=ln("LOCATION:"+on(e.location))+"\r\n");if(void 0!==e.recur){var r="FREQ="+e.recur.frequency;void 0!==e.recur.interval&&e.recur.interval>1&&(r+=";INTERVAL="+String(e.recur.interval)),void 0!==e.recur.count&&(r+=";COUNT="+String(e.recur.count)),void 0!==e.recur.until&&(r+=";UNTIL="+sn(e.recur.until)),void 0!==e.recur.byMonth&&e.recur.byMonth.length>0&&(r+=";BYMONTH="+tn(e.recur.byMonth)),void 0!==e.recur.byWeekNo&&e.recur.byWeekNo.length>0&&(r+=";BYWEEKNO="+tn(e.recur.byWeekNo)),void 0!==e.recur.byYearDay&&e.recur.byYearDay.length>0&&(r+=";BYYEARDAY="+tn(e.recur.byYearDay)),void 0!==e.recur.byMonthDay&&e.recur.byMonthDay.length>0&&(r+=";BYMONTHDAY="+tn(e.recur.byMonthDay)),void 0!==e.recur.byDay&&e.recur.byDay.length>0&&(r+=";BYDAY="+tn(e.recur.byDay)),void 0!==e.recur.byHour&&e.recur.byHour.length>0&&(r+=";BYHOUR="+tn(e.recur.byHour)),void 0!==e.recur.byMinute&&e.recur.byMinute.length>0&&(r+=";BYMINUTE="+tn(e.recur.byMinute)),void 0!==e.recur.bySecond&&e.recur.bySecond.length>0&&(r+=";BYSECOND="+tn(e.recur.bySecond)),void 0!==e.recur.bySetPos&&e.recur.bySetPos.length>0&&(r+=";BYSETPOS="+tn(e.recur.bySetPos)),void 0!==e.recur.weekStart&&"MO"!==e.recur.weekStart&&(r+=";WKST="+e.recur.weekStart),n+=ln("RRULE:"+r)+"\r\n"}if(void 0!==e.alarm)for(var o=0;o<e.alarm.length;o++){var i=e.alarm[o];if(n+="BEGIN:VALARM\r\nACTION:DISPLAY\r\n",void 0!==i.datetime)n+="TRIGGER;VALUE=DATE-TIME:"+sn(i.datetime)+"\r\n";else{var a="";if((void 0===i.before||i.before)&&(a+="-"),a+="P",void 0!==i.weeks&&i.weeks>0)a+=String(i.weeks)+"W";else{void 0!==i.days&&i.days>0&&(a+=String(i.days)+"D");var l=void 0!==i.hours&&i.hours>0,c=void 0!==i.minutes&&i.minutes>0,s=void 0!==i.seconds&&i.seconds>0;(l||c||s)&&(a+="T",l&&(a+=String(i.hours)+"H"),c&&(a+=String(i.minutes)+"M"),s&&(a+=String(i.seconds)+"S"))}n+="TRIGGER:"+a+"\r\n"}void 0!==i.description?n+=ln("DESCRIPTION:"+on(i.description))+"\r\n":n+="DESCRIPTION:Reminder\r\n",void 0===i.datetime&&void 0!==i.repeat&&void 0!==i.repeatDuration&&(n+="REPEAT:"+String(i.repeat)+"\r\n",n+="DURATION:PT"+String(i.repeatDuration)+"M\r\n"),n+="END:VALARM\r\n"}n+="END:VEVENT\r\nEND:VCALENDAR";var u=le("a");u.href="data:text/calendar;charset=utf-8,"+globalThis.encodeURIComponent(n),u.download="event-"+t+".ics",Ut(u)},supported:{get intent(){return Kt()},get universal(){return Zt()},get setting(){return Xt()},get directory(){return Jt()},get camera(){return function(){var e=J.os.name,t=J.os.version;return!J.isWebview&&(e===o.iOS&&0===u(t,"10.3.1")||e===o.Android&&u(t,"3.0")>=0)}()},get contact(){return Qt()},get share(){return $t()},get calendar(){return J.os.name===o.iOS&&u(J.os.version,"15.0")>=0&&J.browser.name===l.Safari&&!J.isWebview}},Constants:{AppOpenState:Et,SettingType:Pt,CameraType:xt,CaptureType:It},Errors:{URLOpenError:Wt,NotSupportedError:Ie,UserCancelledError:Rt}},Bt=void 0;function Ht(){var e=Ft(),t=e.document,n={},r={},i=void 0!==globalThis.cordova,a=J.os.name===o.iOS,l=a&&u(J.os.version,"8.0")>=0,c=a&&!l,s=D.useStd;return i?(n.focus="resume",n.blur="pause",r.focus=t,r.blur=t):l?(n.visibilitychange="visibilitychange",r.visibilitychange=t):c?(n.focus="pageshow",n.blur="pagehide",r.focus=e,r.blur=e):s?(n.focus="focus",n.blur="blur",n.visibilitychange="visibilitychange",r.focus=e,r.blur=e,r.visibilitychange=t):(n.focus="focus",n.blur="blur",n.visibilitychange="visibilitychange",r.focus=t,r.blur=t,r.visibilitychange=t),{type:n,target:r}}function jt(e){try{var t=new XMLHttpRequest;if(t.open("GET","https://itunes.apple.com/lookup?bundleId="+e,!1),t.send(),200===t.status)try{return function(e){if(void 0===e.results)return;var t=e.results;if(0===t.length)return;var n=t[0];return void 0===n?void 0:""+n.trackId}(JSON.parse(t.response))}catch(e){return}return}catch(e){return}}function Vt(e,t){if(void 0!==e)switch(t){case o.Android:return"market://details?id="+e;case o.iOS:return"itms-apps://itunes.apple.com/app/id"+e+"?mt=8";case o.Windows:return"ms-windows-store://pdp/?ProductId="+e;case o.MacOS:return"macappstore://itunes.apple.com/app/id"+e+"?mt=12";default:throw new Wt('Unsupported OS: "'+J.userAgent+'"')}}function zt(e,t){if(void 0!==e)switch(t){case o.Android:return"https://play.google.com/store/apps/details?id="+e;case o.iOS:return"https://itunes.apple.com/app/id"+e+"?mt=8";case o.Windows:return"https://apps.microsoft.com/detail/"+e;case o.MacOS:return"https://apps.apple.com/app/id"+e+"?mt=12";default:throw new Wt('Unsupported OS: "'+J.userAgent+'"')}}function Yt(e){switch(e){case o.iOS:return 2e3;case o.Android:return 1e3;default:return 750}}function Kt(){if(J.os.name!==o.Android)return!1;var e=J.browser.version;return!(J.browser.name===l.SamsungInternet&&u(e,"17.0.1.69")>=0&&u(e,"17.0.7.34")<0)&&(!(J.browser.name===l.Firefox&&u(e,"41.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"59.0")>=0&&u(e,"68.11.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"80.0")>=0&&u(e,"82.0")<0)&&(!(J.browser.name===l.Firefox&&u(e,"96.0")>=0&&u(e,"107.0")<0)&&(!(J.browser.name===l.Opera&&u(e,"14.0")<0)&&!(/(?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/[\w.]+;/i.test(J.userAgent)||/instagram[\/ ][-\w.]+/i.test(J.userAgent)||/micromessenger\/([\w.]+)/i.test(J.userAgent)||/musical_ly(?:.+app_?version\/|_)[\w.]+/i.test(J.userAgent)||/ultralite app_version\/[\w.]+/i.test(J.userAgent)))))))}function Zt(){return J.os.name===o.iOS&&u(J.os.version,"9.0")>=0}function Xt(){var e=J.os.name,t=J.os.version;return e!==o.Unknown&&(!(e===o.Android&&!Kt())&&(e!==o.iOS&&((e!==o.Windows||!("Vista"===t||"XP"===t||"2000"===t||"NT 4.0"===t||"NT 3.11"===t||"ME"===t||u(t,"10")<0))&&!(e===o.MacOS&&u(t,"10.10")<0))))}function Jt(){return void 0!==globalThis.showDirectoryPicker||void 0!==le("input").webkitdirectory}function Qt(){return void 0!==globalThis.navigator.contacts}function $t(){return void 0!==globalThis.navigator.share}function en(e,t,n,r){void 0===r&&(r=!1),"function"!=typeof t&&"string"!=typeof t||!r||e.push([n,t])}function tn(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=",");for(var r=e.length,o="",i=0;i<r;i++)0!==i&&(o+=n),o+=void 0!==t?t(e[i]):e[i];return o}function nn(e){return globalThis.encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}function rn(e){return nn(e).replace(/%22/g,'"').replace(/%40/g,"@").replace(/%2C/gi,",")}function on(e){return e.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\r\n|\n|\r/g,"\\n")}function an(e){return void 0!==globalThis.TextEncoder?(new TextEncoder).encode(e).length:globalThis.unescape(globalThis.encodeURIComponent(e)).length}function ln(e){if(an(e)<=75)return e;for(var t="",n="",r=0,o=0;o<e.length;o++){var i=e[o],a=an(e[o]);""!==n&&r+a>75?(t+=n+"\r\n ",n=i,r=a):(n+=i,r+=a)}return t+=n}function cn(e){return e instanceof URL?e.toString():e}function sn(e,t){return void 0===t&&(t=!1),t?e.getUTCFullYear()+qt(e.getUTCMonth()+1,2,"0")+qt(e.getUTCDate(),2,"0"):e.getUTCFullYear()+qt(e.getUTCMonth()+1,2,"0")+qt(e.getUTCDate(),2,"0")+"T"+qt(e.getUTCHours(),2,"0")+qt(e.getUTCMinutes(),2,"0")+qt(e.getUTCSeconds(),2,"0")+"Z"}function un(e){for(var t="",n=0;n<e.length;n++)t+="\n"+(n+1)+": "+e[n];return t.length>0&&(t="\n"+t+"\n"),new Wt("Failed to open any of the provided URLs: "+t)}function dn(){var e=Ft().document;return"hidden"===e.visibilityState||("hidden"===e.webkitVisibilityState||("hidden"===e.mozVisibilityState||("hidden"===e.msVisibilityState||(void 0!==e.hidden?e.hidden:void 0!==e.webkitHidden?e.webkitHidden:void 0!==e.mozHidden?e.mozHidden:void 0!==e.msHidden?e.msHidden:"function"!=typeof e.hasFocus||!e.hasFocus()))))}function pn(e){return"function"==typeof e.hasFocus&&e.hasFocus()}function fn(e){try{e.focus({preventScroll:!0})}catch(t){try{e.focus()}catch(e){}}}function gn(e){if("[object Promise]"===Object.prototype.toString.call(e)){var t=e;return new Promise((function(e,n){t.then((function(t){for(var r=[],o=0;o<t.length;o++)r[o]=t[o].getFile();Promise.all(r).then(e).catch(n)})).catch((function(e){return"AbortError"===e.name?n(new Rt("User cancelled the operation.")):n(new Ie(e.message))}))}))}var n=e,r=Ht(),o=Ft().document;return new Promise((function(e,t){var i=!1;function a(a){if(!i){i=!0;var u=n.files,d=[];if(null===u)return e(d);for(var p=0;p<u.length;p++)d.push(u[p]);!function(){Bt=void 0;try{D.remove(r.target.focus,{type:r.type.focus,callback:l}),D.remove(r.target.visibilitychange,{type:r.type.visibilitychange,callback:c}),D.remove(o,{type:"click",callback:s})}catch(e){}}(),a?e(d):t(new Rt("User cancelled the operation."))}}function l(){globalThis.setTimeout((function(){n.value.length>0?a(!0):a(!1)}),1e3)}function c(){dn()||l()}function s(){a(!1)}n.onchange=function(){a(!0)},void 0!==Bt&&Bt(),void 0!==n.oncancel?n.oncancel=function(){a(!1)}:n.onclick=function(){D.add(r.target.visibilitychange,{type:r.type.visibilitychange,callback:c}),D.add(r.target.focus,{type:r.type.focus,callback:l}),globalThis.setTimeout((function(){D.add(o,{type:"click",callback:s})}),100),Bt=function(){a(!1)}},Ut(n)}))}function vn(e){if("[object Promise]"===Object.prototype.toString.call(e)){var t=e;return new Promise((function(e,n){t.then((function(t){var r=[],o=[];(function e(t,n){return void 0===n&&(n=""),new Promise((function(i,a){var l=t.entries();!function t(){l.next().then((function(a){if(a.done)return i();var l,c=a.value[0],s=a.value[1];l=""===n?c:n+"/"+c,"file"===s.kind?r.push(s.getFile().then((function(e){o.push({file:e,relativePath:l})}))):r.push(e(s,l)),t()})).catch(a)}()}))})(t,t.name).then((function(){Promise.all(r).then((function(){e(o)})).catch(n)})).catch(n)})).catch((function(e){return"AbortError"===e.name?n(new Rt("User cancelled the operation.")):n(new Ie(e.message))}))}))}var n=e;return new Promise((function(e,t){gn(n).then((function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r];n.push({file:o,relativePath:o.webkitRelativePath})}e(n)})).catch(t)}))}function hn(e,t,n){var r=Ht(),o=Ft().document,i=void 0,a=void 0;return new Promise((function(l,c){var s,u=!1;function d(e){u||(u=!0,function(){void 0!==s&&(clearTimeout(s),s=void 0);try{D.remove(r.target.blur,{type:r.type.blur,callback:p}),D.remove(r.target.focus,{type:r.type.focus,callback:f}),D.remove(r.target.visibilitychange,{type:r.type.visibilitychange,callback:g})}catch(e){}if(void 0!==i)try{o.body.removeChild(i)}catch(e){}if(void 0!==a)try{o.body.removeChild(a)}catch(e){}}(),e?l():c())}function p(){void 0!==s&&(clearTimeout(s),s=void 0),D.remove(r.target.blur,{type:r.type.blur,callback:p}),D.add(r.target.focus,{type:r.type.focus,callback:f})}function f(){d(!0)}function g(){dn()?p():f()}s=globalThis.setTimeout((function(){d(!1)}),n),D.add(r.target.blur,{type:r.type.blur,callback:p}),D.add(r.target.visibilitychange,{type:r.type.visibilitychange,callback:g}),pn(o)||function(){var e=Ft(),t=e.document;if(fn(e),pn(t))return!0;if(t.body.tabIndex<0&&(t.body.tabIndex=-1),fn(t.body),pn(t))return!0;var n=void 0;try{if(void 0===(n=le("input")))return!1;n.type="text",n.readOnly=!0,t.body.appendChild(n),fn(n);try{n.select()}catch(e){}if(pn(t))return!0}catch(e){}finally{if(null!=n){try{n.blur()}catch(e){}try{t.body.removeChild(n)}catch(e){}}}pn(t)}();try{void 0!==globalThis.cordova?globalThis.open(e,"_system"):(i=function(e,t){var n=Ft(),r=n.document,o=void 0;try{return 0===t?void(n.location.href=e):((o=le("a")).href=e,r.body.appendChild(o),Ut(o,n),o)}catch(e){}finally{if(void 0!==o)try{r.body.removeChild(o)}catch(e){}}}(e,t),a=function(e){var t=Ft().document,n=void 0;try{if(void 0===(n=le("iframe")))return;n.src=e,t.body.appendChild(n),globalThis.setTimeout((function(){if(void 0!==n)try{t.body.removeChild(n)}catch(e){}}),500)}catch(e){}return n}(e))}catch(e){d(!1)}}))}function bn(e,t){"string"==typeof e.to&&(e.to=rn(e.to)),"string"==typeof e.cc&&(e.cc=rn(e.cc)),"string"==typeof e.bcc&&(e.bcc=rn(e.bcc)),"string"==typeof e.subject&&(e.subject=nn(e.subject)),"string"==typeof e.body&&(e.body=nn(e.body)),"object"==typeof e.to&&(e.to=tn(e.to,rn)),"object"==typeof e.cc&&(e.cc=tn(e.cc,rn)),"object"==typeof e.bcc&&(e.bcc=tn(e.bcc,rn));var n=[],r=t+":";return"string"==typeof e.to&&(r+=e.to),"string"==typeof e.cc&&n.push("cc="+e.cc),"string"==typeof e.bcc&&n.push("bcc="+e.bcc),"string"==typeof e.subject&&n.push("subject="+e.subject),"string"==typeof e.body&&n.push("body="+e.body),hn(r+"?"+tn(n,void 0,"&"),0,Yt(J.os.name))}var mn=/iemobile/i.test(J.userAgent),yn=/windows phone/i.test(J.userAgent),wn=null,Tn={get value(){return function(){var e=Sn();if(!e)return;var t=e.getAttribute("content");return"string"==typeof t?t:void 0}()},set value(e){var t;void 0===e?(t=Sn())&&(t.remove(),wn=null):function(e){var t=Sn();null===t&&(t=function(){var e=globalThis.document.createElement("meta");return e.setAttribute("name",kn()),globalThis.document.head.prepend(e),wn=e}());t.setAttribute("content",e)}(e)},Constants:{},Errors:{}};function kn(){return mn?"msapplication-navbutton-color":yn?"msapplication-TileColor":"theme-color"}function Sn(){return null!==wn&&wn.isConnected?wn:wn=globalThis.document.querySelector('meta[name="'+kn()+'"]')}var En={get supported(){return Pn()},run:function(e){if(Pn())return globalThis.navigator.vibrate(e);throw new Ie("'navigator.vibrate' does not supported.")},stop:function(){return this.run(0)},Constants:{},Errors:{NotSupportedError:Ie}};function Pn(){return void 0!==globalThis.navigator.vibrate}var xn="picture-in-picture",In="inline",An=null,On=null,Dn=!1,Mn=function(){if("function"==typeof Symbol){var e=globalThis.__nativeFnPipBridgeKey__;return"symbol"==typeof e?e:globalThis.__nativeFnPipBridgeKey__=Symbol("native.fn.pip.bridged")}return"__nativeFnPipBridged__"}(),Cn=Q((function(){if(Un())return D.add(globalThis.document,{type:"enterpictureinpicture",callback:Rn,options:!1}),void D.add(globalThis.document,{type:"leavepictureinpicture",callback:Gn,options:!1});Vn()}),(function(){if(Un())return D.remove(globalThis.document,{type:"enterpictureinpicture",callback:Rn,options:!1}),void D.remove(globalThis.document,{type:"leavepictureinpicture",callback:Gn,options:!1});for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)D.remove(e[t],{type:"webkitpresentationmodechanged",callback:Hn,options:!1}),e[t][Mn]=!1})),Nn=Q((function(){D.add(globalThis.document,{type:"pictureinpictureerror",callback:Bn,options:!1})}),(function(){D.remove(globalThis.document,{type:"pictureinpictureerror",callback:Bn,options:!1})})),Ln={get supported(){return function(){if("boolean"==typeof globalThis.document.pictureInPictureEnabled)return globalThis.document.pictureInPictureEnabled;var e=Fn();return"function"==typeof e.webkitSupportsPresentationMode&&e.webkitSupportsPresentationMode(xn)}()},get element(){return zn()},get isActive(){return Yn()},request:function(e){return new Promise((function(t,n){var r;if(void 0===e&&(r=globalThis.document.querySelector("video"),e=null!==r?r:void 0),void 0===e)return n(new Ie("Failed to enter Picture-in-Picture mode."));if(Yn()&&zn()!==e&&J.browser.name===l.Safari&&J.os.name===o.iOS)return n(new Ie("There is already a Picture-in-Picture element in this document."));var i=e.tagName.toLowerCase();if("video"!==i)return n(new Ie('The "'+i+'" element does not support Picture-in-Picture requests.'));var a=e.requestPictureInPicture,c=null!==On&&On.webkitPresentationMode===xn;if("function"==typeof a&&!_n()&&!c){var s=a.call(e);return void 0!==s&&"function"==typeof s.then?void s.then(t).catch((function(){try{u()}catch(e){n(new Ie('The "'+i+'" element does not support Picture-in-Picture requests.'))}})):t()}function u(){if(void 0!==e&&"function"==typeof e.webkitSupportsPresentationMode&&e.webkitSupportsPresentationMode(xn)&&"function"==typeof e.webkitSetPresentationMode)return e.disablePictureInPicture?n(new Ie("Picture-in-Picture is disabled on this element.")):(jn(e),e.webkitSetPresentationMode(xn),t());n(new Ie('The "'+i+'" element does not support Picture-in-Picture requests.'))}u()}))},exit:function(){return new Promise((function(e,t){var n=globalThis.document.exitPictureInPicture;if("function"==typeof n&&!_n()){var r=n.call(globalThis.document);return void 0!==r&&"function"==typeof r.then?void r.then(e).catch((function(){try{o()}catch(e){t(new Ie("Failed to exit Picture-in-Picture mode."))}})):e()}function o(){if(null!==On&&"function"==typeof On.webkitSetPresentationMode)return On.webkitSetPresentationMode(In),e();for(var t=globalThis.document.querySelectorAll("video"),n=0;n<t.length;n++){var r=t[n];if("function"==typeof r.webkitSetPresentationMode&&r.webkitPresentationMode===xn)return r.webkitSetPresentationMode(In),e()}return e()}o()}))},toggle:function(e){var t=zn();if(void 0!==e)return t===e?this.exit():this.request(e);return null!==t?this.exit():this.request(e)},onChange:function(e,t,n){if("function"==typeof e)return Cn.subscribe(e,t);var r=e,o=t;return Cn.subscribe((function(e){e.element===r&&o(e)}),n)},onError:function(e,t,n){if("function"==typeof e)return Nn.subscribe(e,t);var r=e,o=t;return Nn.subscribe((function(e){e.element===r&&o(e)}),n)},Constants:{},Errors:{NotSupportedError:Ie,InvalidStateError:Ke}};function Fn(){var e=globalThis.document.querySelector("video");return null!==e?e:null===An?An=globalThis.document.createElement("video"):An}function Un(){return void 0!==globalThis.document.pictureInPictureEnabled}function _n(){return"function"==typeof Fn().webkitSetPresentationMode}function qn(e,t,n){return{nativeEvent:e,element:t,isActive:n}}function Wn(e,t,n){Cn.emit(qn(e,t,n))}function Rn(e){var t=e.target;t instanceof globalThis.HTMLVideoElement&&Wn(e,t,!0)}function Gn(e){var t=e.target;t instanceof globalThis.HTMLVideoElement&&Wn(e,t,!1)}function Bn(e){var t,n,r,o=e.target;o instanceof globalThis.HTMLVideoElement&&(t=e,n=o,r=Yn(),Nn.emit(qn(t,n,r)))}function Hn(e){if(this.webkitPresentationMode===xn)return On=this,void Wn(e,this,!0);this.webkitPresentationMode===In&&On===this&&(On=null,Wn(e,this,!1))}function jn(e){e[Mn]||void 0===e.webkitSetPresentationMode&&void 0===e.onwebkitpresentationmodechanged||(D.add(e,{type:"webkitpresentationmodechanged",callback:Hn,options:!1}),e[Mn]=!0)}function Vn(){for(var e=globalThis.document.querySelectorAll("video"),t=0;t<e.length;t++)jn(e[t])}function zn(){var e=globalThis.document.pictureInPictureElement;return null!=e?e:null!==On&&On.webkitPresentationMode===xn?On:null}function Yn(){return null!==zn()}Dn||(Dn=!0,(!Un()||_n())&&(Vn(),void 0!==globalThis.MutationObserver&&new globalThis.MutationObserver((function(e){if(null!==On){for(var t=!1,n=0;n<e.length;n++){for(var r=e[n].removedNodes,o=0;o<r.length;o++)if((a=r[o])===On||a.nodeType===Node.ELEMENT_NODE&&a.contains(On)){t=!0;break}if(t)break}t&&!globalThis.document.contains(On)&&(On=null)}for(n=0;n<e.length;n++){var i=e[n].addedNodes;for(o=0;o<i.length;o++){var a;if((a=i[o]).nodeType===Node.ELEMENT_NODE){var l=a;if("VIDEO"!==l.tagName)for(var c=l.querySelectorAll("video"),s=0;s<c.length;s++)jn(c[s]);else jn(l)}}}})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})));var Kn={get supported(){return Zn()},set:function(e){return Zn()?globalThis.navigator.setAppBadge(e):Promise.reject(new Ie("'navigator.setAppBadge' does not supported."))},clear:function(){return this.set(0)},Constants:{},Errors:{NotSupportedError:Ie}};function Zn(){return void 0!==globalThis.navigator.setAppBadge}var Xn={send:function(e){return new Promise((function(t,n){if(!Jn())return n(new Ie("'window.Notification' does not supported."));ht.request(ze.Notification).then((function(r){if(r===Ye.Grant){var o={badge:e.badge,body:e.body,data:e.data,dir:e.dir,icon:e.icon,lang:e.lang,requireInteraction:e.requireInteraction,silent:e.silent,tag:e.tag},i=new globalThis.Notification(e.title,o);void 0!==e.onClick&&(i.onclick=e.onClick),void 0!==e.onShow&&(i.onshow=e.onShow),void 0!==e.onClose&&(i.onclose=e.onClose),void 0!==e.onError&&(i.onerror=e.onError),t(i)}else n(new xe("'notification' permission is not granted."))}))}))},get supported(){return Jn()},Constants:{},Errors:{NotSupportedError:Ie,PermissionNotGrantedError:xe}};function Jn(){return void 0!==globalThis.Notification}var Qn=Q((function(){if(!nr())return;globalThis.navigator.getBattery().then((function(e){$n=e,D.add(e,{type:"chargingchange",callback:tr}),D.add(e,{type:"levelchange",callback:tr}),D.add(e,{type:"chargingtimechange",callback:tr}),D.add(e,{type:"dischargingtimechange",callback:tr})}))}),(function(){if(!nr()||null===$n)return;D.remove($n,{type:"chargingchange",callback:tr}),D.remove($n,{type:"levelchange",callback:tr}),D.remove($n,{type:"chargingtimechange",callback:tr}),D.remove($n,{type:"dischargingtimechange",callback:tr}),$n=null})),$n=null,er={get supported(){return nr()},get value(){return new Promise((function(e,t){if(!nr())return t(new Ie("'navigator.getBattery' does not supported."));globalThis.navigator.getBattery().then(e)}))},onChange:Qn.subscribe,Constants:{},Errors:{NotSupportedError:Ie}};function tr(){Qn.emit($n)}function nr(){return void 0!==globalThis.navigator.getBattery}!function(){if("object"!=typeof globalThis){Object.defineProperty(Object.prototype,"__getGlobalThis__",{get:function(){return this},configurable:!0});try{var e=__getGlobalThis__;Object.defineProperty(e,"globalThis",{value:e,writable:!0,configurable:!0})}finally{delete Object.prototype.__getGlobalThis__}}}();var rr={version:n,appearance:ne,badge:Kn,battery:er,clipboard:se,dimension:We,fullscreen:rt,geolocation:Ct,notification:Xn,open:Gt,permission:ht,pip:Ln,platform:J,theme:Tn,vibration:En};export{rr as default};
package/dist/native.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var version = "1.3.1";
1
+ var version = "1.3.2";
2
2
  var packageJSON = {
3
3
  version: version};
4
4
 
@@ -2225,26 +2225,26 @@ function screenOrientationSupported() {
2225
2225
  }
2226
2226
  function attachOnScreenOrientationChange() {
2227
2227
  if (typeof globalThis.screen !== 'undefined' && typeof globalThis.screen.orientation !== 'undefined' && typeof globalThis.screen.orientation.addEventListener === 'function')
2228
- EventListener.add(globalThis.screen.orientation, {
2228
+ return EventListener.add(globalThis.screen.orientation, {
2229
2229
  type: 'change',
2230
2230
  callback: onScreenOrientationChange
2231
2231
  });
2232
2232
  else if (typeof globalThis.orientation !== 'undefined')
2233
- EventListener.add(globalThis, { type: 'orientationchange', callback: onScreenOrientationChange });
2233
+ return EventListener.add(globalThis, { type: 'orientationchange', callback: onScreenOrientationChange });
2234
2234
  else if (ORIENTATION_MEDIA_QUERY_LIST.media !== 'not all')
2235
- EventListener.add(ORIENTATION_MEDIA_QUERY_LIST, { type: 'change', callback: onScreenOrientationChange });
2235
+ return EventListener.add(ORIENTATION_MEDIA_QUERY_LIST, { type: 'change', callback: onScreenOrientationChange });
2236
2236
  throw new NotSupportedError('\'screen.orientation\', \'window.orientation\', and the orientation media query are all unsupported');
2237
2237
  }
2238
2238
  function detachOnScreenOrientationChange() {
2239
2239
  if (typeof globalThis.screen !== 'undefined' && typeof globalThis.screen.orientation !== 'undefined' && typeof globalThis.screen.orientation.removeEventListener === 'function')
2240
- EventListener.remove(globalThis.screen.orientation, {
2240
+ return EventListener.remove(globalThis.screen.orientation, {
2241
2241
  type: 'change',
2242
2242
  callback: onScreenOrientationChange
2243
2243
  });
2244
2244
  else if (typeof globalThis.orientation !== 'undefined')
2245
- EventListener.remove(globalThis, { type: 'orientationchange', callback: onScreenOrientationChange });
2245
+ return EventListener.remove(globalThis, { type: 'orientationchange', callback: onScreenOrientationChange });
2246
2246
  else if (ORIENTATION_MEDIA_QUERY_LIST.media !== 'not all')
2247
- EventListener.remove(ORIENTATION_MEDIA_QUERY_LIST, { type: 'change', callback: onScreenOrientationChange });
2247
+ return EventListener.remove(ORIENTATION_MEDIA_QUERY_LIST, { type: 'change', callback: onScreenOrientationChange });
2248
2248
  throw new NotSupportedError('\'screen.orientation\', \'window.orientation\', and the orientation media query are all unsupported');
2249
2249
  }
2250
2250
  function onScreenOrientationChange() {
@@ -4,7 +4,7 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Native = factory());
5
5
  })(this, (function () { 'use strict';
6
6
 
7
- var version = "1.3.1";
7
+ var version = "1.3.2";
8
8
  var packageJSON = {
9
9
  version: version};
10
10
 
@@ -2231,26 +2231,26 @@
2231
2231
  }
2232
2232
  function attachOnScreenOrientationChange() {
2233
2233
  if (typeof globalThis.screen !== 'undefined' && typeof globalThis.screen.orientation !== 'undefined' && typeof globalThis.screen.orientation.addEventListener === 'function')
2234
- EventListener.add(globalThis.screen.orientation, {
2234
+ return EventListener.add(globalThis.screen.orientation, {
2235
2235
  type: 'change',
2236
2236
  callback: onScreenOrientationChange
2237
2237
  });
2238
2238
  else if (typeof globalThis.orientation !== 'undefined')
2239
- EventListener.add(globalThis, { type: 'orientationchange', callback: onScreenOrientationChange });
2239
+ return EventListener.add(globalThis, { type: 'orientationchange', callback: onScreenOrientationChange });
2240
2240
  else if (ORIENTATION_MEDIA_QUERY_LIST.media !== 'not all')
2241
- EventListener.add(ORIENTATION_MEDIA_QUERY_LIST, { type: 'change', callback: onScreenOrientationChange });
2241
+ return EventListener.add(ORIENTATION_MEDIA_QUERY_LIST, { type: 'change', callback: onScreenOrientationChange });
2242
2242
  throw new NotSupportedError('\'screen.orientation\', \'window.orientation\', and the orientation media query are all unsupported');
2243
2243
  }
2244
2244
  function detachOnScreenOrientationChange() {
2245
2245
  if (typeof globalThis.screen !== 'undefined' && typeof globalThis.screen.orientation !== 'undefined' && typeof globalThis.screen.orientation.removeEventListener === 'function')
2246
- EventListener.remove(globalThis.screen.orientation, {
2246
+ return EventListener.remove(globalThis.screen.orientation, {
2247
2247
  type: 'change',
2248
2248
  callback: onScreenOrientationChange
2249
2249
  });
2250
2250
  else if (typeof globalThis.orientation !== 'undefined')
2251
- EventListener.remove(globalThis, { type: 'orientationchange', callback: onScreenOrientationChange });
2251
+ return EventListener.remove(globalThis, { type: 'orientationchange', callback: onScreenOrientationChange });
2252
2252
  else if (ORIENTATION_MEDIA_QUERY_LIST.media !== 'not all')
2253
- EventListener.remove(ORIENTATION_MEDIA_QUERY_LIST, { type: 'change', callback: onScreenOrientationChange });
2253
+ return EventListener.remove(ORIENTATION_MEDIA_QUERY_LIST, { type: 'change', callback: onScreenOrientationChange });
2254
2254
  throw new NotSupportedError('\'screen.orientation\', \'window.orientation\', and the orientation media query are all unsupported');
2255
2255
  }
2256
2256
  function onScreenOrientationChange() {