native-fn 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var te=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var Me=Object.prototype.hasOwnProperty;var xe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ce=(e,t)=>{for(var n in t)te(e,n,{get:t[n],enumerable:!0})},Ue=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Te(t))!Me.call(e,i)&&i!==n&&te(e,i,{get:()=>t[i],enumerable:!(o=ke(t,i))||o.enumerable});return e};var Le=e=>Ue(te({},"__esModule",{value:!0}),e);var ct={};var Se=xe(()=>{(function(e,t){typeof exports=="object"&&typeof module<"u"?t():typeof define=="function"&&define.amd?define(t):t()})(0,function(){"use strict";function e(q){var A=this.constructor;return this.then(function(V){return A.resolve(q()).then(function(){return V})},function(V){return A.resolve(q()).then(function(){return A.reject(V)})})}function t(q){return new this(function(A,V){function d(S,E){if(E&&(typeof E=="object"||typeof E=="function")){var C=E.then;if(typeof C=="function")return void C.call(E,function(M){d(S,M)},function(M){f[S]={status:"rejected",reason:M},--g==0&&A(f)})}f[S]={status:"fulfilled",value:E},--g==0&&A(f)}if(!q||typeof q.length>"u")return V(new TypeError(typeof q+" "+q+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var f=Array.prototype.slice.call(q);if(f.length===0)return A([]);for(var g=f.length,b=0;f.length>b;b++)d(b,f[b])})}function n(q,A){this.name="AggregateError",this.errors=q,this.message=A||""}function o(q){var A=this;return new A(function(V,d){if(!q||typeof q.length>"u")return d(new TypeError("Promise.any accepts an array"));var f=Array.prototype.slice.call(q);if(f.length===0)return d();for(var g=[],b=0;f.length>b;b++)try{A.resolve(f[b]).then(V).catch(function(S){g.push(S),g.length===f.length&&d(new n(g,"All promises were rejected"))})}catch(S){d(S)}})}function i(q){return!(!q||typeof q.length>"u")}function p(){}function r(q){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if(typeof q!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(q,this)}function c(q,A){for(;q._state===3;)q=q._value;q._state!==0?(q._handled=!0,r._immediateFn(function(){var V=q._state===1?A.onFulfilled:A.onRejected;if(V!==null){var d;try{d=V(q._value)}catch(f){return void a(A.promise,f)}l(A.promise,d)}else(q._state===1?l:a)(A.promise,q._value)})):q._deferreds.push(A)}function l(q,A){try{if(A===q)throw new TypeError("A promise cannot be resolved with itself.");if(A&&(typeof A=="object"||typeof A=="function")){var V=A.then;if(A instanceof r)return q._state=3,q._value=A,void m(q);if(typeof V=="function")return void h(function(d,f){return function(){d.apply(f,arguments)}}(V,A),q)}q._state=1,q._value=A,m(q)}catch(d){a(q,d)}}function a(q,A){q._state=2,q._value=A,m(q)}function m(q){q._state===2&&q._deferreds.length===0&&r._immediateFn(function(){q._handled||r._unhandledRejectionFn(q._value)});for(var A=0,V=q._deferreds.length;V>A;A++)c(q,q._deferreds[A]);q._deferreds=null}function h(q,A){var V=!1;try{q(function(d){V||(V=!0,l(A,d))},function(d){V||(V=!0,a(A,d))})}catch(d){if(V)return;V=!0,a(A,d)}}n.prototype=Error.prototype;var s=setTimeout;r.prototype.catch=function(q){return this.then(null,q)},r.prototype.then=function(q,A){var V=new this.constructor(p);return c(this,new function(d,f,g){this.onFulfilled=typeof d=="function"?d:null,this.onRejected=typeof f=="function"?f:null,this.promise=g}(q,A,V)),V},r.prototype.finally=e,r.all=function(q){return new r(function(A,V){function d(S,E){try{if(E&&(typeof E=="object"||typeof E=="function")){var C=E.then;if(typeof C=="function")return void C.call(E,function(M){d(S,M)},V)}f[S]=E,--g==0&&A(f)}catch(M){V(M)}}if(!i(q))return V(new TypeError("Promise.all accepts an array"));var f=Array.prototype.slice.call(q);if(f.length===0)return A([]);for(var g=f.length,b=0;f.length>b;b++)d(b,f[b])})},r.any=o,r.allSettled=t,r.resolve=function(q){return q&&typeof q=="object"&&q.constructor===r?q:new r(function(A){A(q)})},r.reject=function(q){return new r(function(A,V){V(q)})},r.race=function(q){return new r(function(A,V){if(!i(q))return V(new TypeError("Promise.race accepts an array"));for(var d=0,f=q.length;f>d;d++)r.resolve(q[d]).then(A,V)})},r._immediateFn=typeof setImmediate=="function"&&function(q){setImmediate(q)}||function(q){s(q,0)},r._unhandledRejectionFn=function(q){console!==void 0&&console&&console.warn("Possible Unhandled Promise Rejection:",q)};var u=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw Error("unable to locate global object")}();typeof u.Promise!="function"?u.Promise=r:(u.Promise.prototype.finally||(u.Promise.prototype.finally=e),u.Promise.allSettled||(u.Promise.allSettled=t),u.Promise.any||(u.Promise.any=o))})});var lt={};Ce(lt,{App:()=>re,Appearance:()=>k,Camera:()=>ce,Engine:()=>ne,Error:()=>Ie,Geolocation:()=>ue,Messenger:()=>le,Native:()=>Be,OS:()=>I,Theme:()=>qe});module.exports=Le(lt);function w(e){if(typeof Object.freeze!="function"){for(var t=Object.keys(e),n=0,o=t[n];n<t.length;n++)if(e.hasOwnProperty(o))try{Object.defineProperty(e,o,{writable:!1,configurable:!1})}catch{}return e}return Object.freeze(e)}function X(e){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"},n=t[e];return n!==void 0?n:e}function _(e){if(e!==void 0)return e.replace(/_/g,".")}function De(){var e=document.createElement("CANVAS");if(typeof e.getContext=="function"){var t=e.getContext("experimental-webgl")||e.getContext("webgl");if(t!==null){var n=t.getExtension("WEBGL_debug_renderer_info");if(typeof t.getParameter=="function")return n==null?t.getParameter(t.RENDERER):t.getParameter(n.UNMASKED_RENDERER_WEBGL)}}}var Fe=function(e){for(var t,n={renderer:De(),name:"Unknown",version:void 0},o=[[/android\w*[-\/.; ]?([\d.]*)/i,"Android"],[/microsoft windows (vista|xp)/i,"Windows"],[/windows (?:phone(?: os)?|mobile|iot)[\/ ]?([.\w ]*)/i,"Windows",X],[/windows nt 6\.2; (arm)/i,"Windows",X],[/windows[\/ ]([ntce\d. ]+\w)(?!.+xbox)/i,"Windows",X],[/(?:win(?=[39n])|win 9x )([nt\d.]+)/i,"Windows",X],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,"iOS",_],[/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d.]+)/i,"iOS",_],[/cfnetwork\/.+darwin/i,"iOS"],[/mac os x ?([\w. ]*)/i,"MacOS",_],[/(?:macintosh|mac_powerpc\b)(?!.+haiku)/i,"MacOS",_]],i=0;i<o.length;i++)if(t=e.match(o[i][0]),t!==null)return n.name=o[i][1],o[i][2]!==void 0?n.version=o[i][2](t[1]):n.version=t[1],w(n);return w(n)}(navigator.userAgent),I=Fe;function fe(e){return"LibWeb"}var Oe=function(e){for(var t,n={name:"Unknown",isWebView:/; ?wv|applewebkit(?!.*safari)/i.test(e),version:void 0},o=[[/windows.+ edge\/([\w.]+)/i,"EdgeHTML"],[/arkweb\/([\w.]+)/i,"ArkWeb"],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,"Blink"],[/presto\/([\w.]+)/i,"Presto"],[/webkit\/([\w.]+)/i,"WebKit"],[/trident\/([\w.]+)/i,"Trident"],[/netfront\/([\w.]+)/i,"NetFront"],[/netsurf\/([\w.]+)/i,"NetSurf"],[/amaya\/([\w.]+)/i,"Amaya"],[/lynx\/([\w.]+)/i,"Lynx"],[/w3m\/([\w.]+)/i,"w3m"],[/goanna\/([\w.]+)/i,"Goanna"],[/servo\/([\w.]+)/i,"Servo"],[/ekiohflow\/([\w.]+)/i,"Flow"],[/khtml[\/ ]\(?([\w.]+)/i,"KHTML"],[/tasman[\/ ]\(?([\w.]+)/i,"Tasman"],[/links[\/ ]\(?([\w.]+)/i,"Links"],[/icab[\/ ]([23]\.[\d.]+)/i,"iCab"],[/\blibweb/i,"LibWeb",fe],[/ladybird\//i,"LibWeb",fe],[/rv:([\w.]{1,9})\b.+gecko/i,"Gecko"]],i=0;i<o.length;i++)if(t=e.match(o[i][0]),t!==null)return n.name=o[i][1],o[i][2]!==void 0?n.version=o[i][2](t[1]):n.version=t[1],w(n);return w(n)}(navigator.userAgent),ne=Oe;var $=function(){if(typeof window.matchMedia=="function")return window.matchMedia;var e=window.styleMedia||window.media;if(e===void 0){var t=document.createElement("STYLE"),n;t.type="text/css",t.id="match-media-polyfill",document.head.appendChild(t),typeof window.getComputedStyle=="function"?n=window.getComputedStyle(t):n=t.currentStyle,e={matchMedia:function(o){var i="@media "+o+"{ #"+t.id+" {width: 1px;} }";return t.styleSheet!==void 0?t.styleSheet.cssText=i:t.textContent=i,n.width==="1px"}}}return function(o){return{matches:e.matchMedia(o),media:o}}}();var j=[],U=$("(prefers-color-scheme: dark)"),F={addListener:function(e){function t(n){e(n.matches?F.Type.Dark:F.Type.Light)}if(j.push({original:e,wrapped:t}),typeof U.addEventListener=="function")return U.addEventListener("change",t);if(typeof U.addListener=="function")return U.addListener(t)},removeListener:function(e){for(var t=0;t<j.length;t++)if(j[t].original===e){var n=j[t].wrapped;if(typeof U.removeEventListener=="function")U.removeEventListener("change",n);else if(typeof U.removeListener=="function")return U.removeListener(n);j.splice(t,1);return}}};Object.defineProperty(F,"value",{get:function(){return U.matches?F.Type.Dark:F.Type.Light},configurable:!1,enumerable:!0});F.Type=w({Light:"light",Dark:"dark"});var k=F;var z,y={light:void 0,dark:void 0,iosStatusBar:void 0,windowsPhone:void 0},P,O=[],pe=[];function ee(e){var t="",n,o;for(o=0;o<e.length;o++)t+="["+e[o][0]+"='"+e[o][1]+"']";if(n=top.document.head.querySelector("meta"+t),n===null){for(n=top.document.createElement("META"),o=0;o<e.length;o++)n[e[o][0]]=e[o][1];top.document.head.appendChild(n)}return n}function oe(){y.light===void 0&&(y.light=ee([["name","theme-color"],["media","(prefers-color-scheme: light)"]])),y.dark===void 0&&(y.dark=ee([["name","theme-color"],["media","(prefers-color-scheme: dark)"]])),y.iosStatusBar===void 0&&(y.iosStatusBar=ee([["name","apple-mobile-web-app-status-bar-style"]])),y.windowsPhone===void 0&&(y.windowsPhone=ee([["name","msapplication-navbutton-color"]]))}var Y={addListener:function(e){if(typeof window.MutationObserver!="function")return;P===void 0&&(P=new MutationObserver(function(n){var o,i=!1;for(o=0;o<n.length;o++){var p=n[o],r=p.target,c=p.type;if(!(c!=="attributes"||r.tagName!=="META")&&[y.light,y.dark,y.iosStatusBar,y.windowsPhone].indexOf(r)!==-1){i=!0;break}}if(i)for(o=0;o<O.length;o++)O[o](Y.value)}),P.observe(top.document.head,{attributes:!0,childList:!0,subtree:!0}));function t(){oe(),y.dark.content!==y.light.content&&e(Y.value)}k.addListener(t),pe.push(t),O.push(e)},removeListener:function(e){if(!(typeof window.MutationObserver!="function"||P===void 0)){for(var t=0;t<O.length;t++)if(O[t]===e){O.splice(t,1),pe.splice(t,1);break}O.length===0&&(P.disconnect(),P=void 0)}},setTheme:function(e){oe(),z!==void 0&&(k.removeListener(z),z=void 0),z=function(o){var i=e[o];i!==void 0&&(i.iosStatusBar!==void 0&&(y.iosStatusBar.content=i.iosStatusBar),i.windowsPhone!==void 0&&(y.windowsPhone.content=i.iosStatusBar))},k.addListener(z);var t=e.light,n=e.dark;n!==void 0&&n.theme!==void 0&&(y.dark.content=n.theme),t!==void 0&&(t.theme!==void 0&&(y.light.content=t.theme),k.value==="light"&&(t.iosStatusBar!==void 0&&(y.iosStatusBar.content=t.iosStatusBar),t.windowsPhone!==void 0&&(y.windowsPhone.content=t.windowsPhone))),n!==void 0&&(n.theme!==void 0&&(y.dark.content=n.theme),k.value==="dark"&&(n.iosStatusBar!==void 0&&(y.iosStatusBar.content=n.iosStatusBar),n.windowsPhone!==void 0&&(y.windowsPhone.content=n.windowsPhone)))}};Object.defineProperty(Y,"value",{get:function(){var e={};return oe(),y[k.value].content!==""&&(e.theme=y[k.value].content),y.iosStatusBar.content!==""&&(e.iosStatusBar=y.iosStatusBar.content),y.windowsPhone.content!==""&&(e.windowsPhone=y.windowsPhone.content),e},configurable:!1,enumerable:!0});Y.Type=w({Theme:"theme",IOSStatusBar:"iosStatusBar",WindowsPhone:"windowsPhone"});var qe=Y;function Ne(e){return e.document.hidden!==void 0?e.document.hidden:e.document.webkitHidden!==void 0?e.document.webkitHidden:!0}function me(e,t){var n=e.document.createElement("A"),o;n.href=t,e.document.body.appendChild(n);try{o=new e.MouseEvent("click",{bubbles:!0,cancelable:!0,view:e})}catch{o=e.document.createEvent("MouseEvents"),o.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}n.dispatchEvent(o),e.document.body.removeChild(n)}function he(e,t,n,o){return new Promise(function(i,p){var r;function c(){clearTimeout(r),t.removeEventListener("blur",c),t.addEventListener("focus",l)}function l(){t.removeEventListener("focus",l),i()}r=setTimeout(function(){p(),t.removeEventListener("blur",c)},o),t.addEventListener("blur",c),me(t,n)})}function Pe(e,t,n){return new Promise(function(o,i){var p,r=parseInt(e.version)>=8;function c(){clearTimeout(p),t.addEventListener("focus",l),t.removeEventListener("blur",c)}function l(){p=setTimeout(function(){Ne(t)?o():i(),r?t.document.removeEventListener("visibilitychange",a):t.document.removeEventListener("pagehide",a)},2e3),t.removeEventListener("focus",l)}function a(){clearTimeout(p),t.removeEventListener("blur",c),t.removeEventListener("focus",l),r?t.document.removeEventListener("visibilitychange",a):t.document.removeEventListener("pagehide",a),o()}t.addEventListener("blur",c),r?t.document.addEventListener("visibilitychange",a):t.document.addEventListener("pagehide",a),me(t,n)})}function Qe(e,t,n){return he(e,t,n,1e3)}function Re(e,t,n){return he(e,t,n,750)}function K(e,t,n){if(n)switch(e.name){case"Android":return Qe(e,t,n);case"iOS":return Pe(e,t,n);case"Windows":case"MacOS":return Re(e,t,n)}return Promise.reject()}function N(e){function t(n){if(!(this instanceof t))return new t(n);this.name=e,this.message=n,Error.captureStackTrace?Error.captureStackTrace(this,t):this.stack=new Error().stack}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Q=N("InitializationError");var R=N("URLOpenError");function ye(e){try{var t=new XMLHttpRequest;if(t.open("GET","http://itunes.apple.com/lookup?bundleId="+e,!1),t.send(),t.status===200){var n=JSON.parse(t.response);if(n.results.length>0)return n.results[0].trackId}return}catch{return}}function ie(e){return/\w+:\/\/.*/.test(e)?e:e+"://"}function Ge(e){return e.replace(/:\/\/.*$/,"")}var v=function(e){if(e===void 0)throw new TypeError("Failed to construct 'Native.App': Illegal constructor.");this.run=function(){return new Promise(function(s,u){u(new Q("Initialization error."))})};var t,n,o,i,p=Promise.resolve(),r=[],c;switch(I.name){case"Android":if(e.android===void 0)return;var l,a,m;if(t=e.android.scheme,n=e.android.package,o=e.android.fallback,a=e.android.intent,c=e.android.isOpenWebStore,a!==void 0&&t===void 0&&(l=a.match(/scheme=([^;]*)/),l!==null&&(t=l[1])),a!==void 0&&n===void 0&&(l=a.match(/package=([^;]*)/),l!==null&&(n=l[1])),a!==void 0&&o===void 0&&(l=a.match(/S\.browser_fallback_url=([^;]*)/),l!==null&&(o=l[1])),t===void 0&&n===void 0&&o===void 0)return;if(a===void 0&&(a="intent://open#Intent;",t!==void 0&&(a=a+"scheme="+Ge(t)+";"),n!==void 0&&(a=a+"package="+n+";"),a=a+"end;"),window.chrome!==void 0&&(l=navigator.userAgent.match(/chrom(?:e|ium)\/([\w.]+)/i),l!==null&&(m=parseInt(l[1]))),m>=25&&a!==void 0)if(m<=42){p=new Promise(function(s){var u=top.document.createElement("IFRAME"),q="intent://open#Intent;scheme=;end;",A=!1;function V(f){A||(A=!0,s(f),u.removeEventListener("load",d),top.document.body.removeChild(u))}function d(){V(u.src!==q)}u.addEventListener("load",d),u.src=q,top.document.body.appendChild(u),setTimeout(function(){V(!1)},500)}).then(function(s){s?r.push([a,v.State.Intent]):r.push([a.replace(/package=.*?;/,"").replace(/S\.browser_fallback_url=.*?;/,""),v.State.Intent]),o!==void 0?r.push([o,v.State.Fallback]):n!==void 0&&(r.push(["market://details?id="+n,v.State.Store]),c&&r.push(["https://play.google.com/store/apps/details?id="+n,v.State.Store]))});break}else r.push([a,v.State.Intent]);else t!==void 0&&r.push([ie(t),v.State.Scheme]);o!==void 0?r.push([o,v.State.Fallback]):n!==void 0&&(r.push(["market://details?id="+n,v.State.Store]),c&&r.push(["https://play.google.com/store/apps/details?id="+n,v.State.Store]));break;case"Windows":if(e.windows===void 0)return;t=e.windows.scheme,n=e.windows.productId,c=e.windows.isOpenWebStore,o=e.windows.fallback,t!==void 0&&r.push([ie(t),v.State.Scheme]),o!==void 0?r.push([o,v.State.Fallback]):n!==void 0&&(r.push(["ms-windows-store://pdp/?ProductId="+n,v.State.Store]),c&&r.push(["https://apps.microsoft.com/detail/"+n,v.State.Store]));break;case"iOS":if(e.ios===void 0)return;var h=e.ios.universal;t=e.ios.scheme,i=e.ios.package,n=e.ios.trackId,o=e.ios.fallback,h!==void 0&&parseInt(I.version)>=9?r.push([h,v.State.Universal]):t!==void 0&&r.push([t,v.State.Scheme]),n===void 0&&i!==void 0&&(n=ye(i)),o!==void 0?r.push([o,v.State.Fallback]):n!==void 0&&(r.length===0?r.push(["itms-apps://itunes.apple.com/app/id"+n+"?mt=8",v.State.Store]):r.push(["https://itunes.apple.com/kr/app/id"+n+"?mt=8",v.State.Store]));break;case"MacOS":if(e.mac===void 0)return;t=e.mac.scheme,i=e.mac.package,n=e.mac.trackId,o=e.mac.fallback,c=e.mac.isOpenWebStore,t!==void 0&&r.push([ie(t),v.State.Scheme]),n===void 0&&i!==void 0&&(n=ye(i)),o!==void 0?r.push([o,v.State.Fallback]):n!==void 0&&(r.push(["macappstore://itunes.apple.com/app/id"+n+"?mt=12",v.State.Store]),c&&r.push(["https://apps.apple.com/us/app/id"+n+"?mt=12",v.State.Store]));break;default:return}this.run=function(s=top){return p.then(function(){return console.log(r),new Promise(function(u,q){function A(V=0){if(V>=r.length)return q(new R("No url can be opened."));var d=r[V][0],f=r[V][1];return K(I,s,d).then(function(){u(f)}).catch(function(g){A(++V)})}return A()})})}};v.State=w({Scheme:0,Universal:1,Intent:2,Fallback:3,Store:4});var re=v;var Z=N("UserNotSelectedError");var Ae=!1;function je(e,t,n){var o=t.getVideoTracks()[0].getSettings(),i=top.document.documentElement.style.overflow,p=o.width||640,r=o.height||480,c=Xe(e),l=Ye(),a=Ke(),m=He(),h=Je(e),s=We(),u=ve(),q=ve(),A=_e(),V=$e(),d=top.innerHeight*.4/r*p/2,f=!1,g,b=[],S=0,E;m.appendChild(h),e===T.Type.Video&&l.appendChild(s),l.appendChild(a),l.appendChild(c),l.appendChild(m),l.appendChild(u),l.appendChild(q),l.appendChild(A),l.appendChild(V),a.style.left=c.style.left="calc(50% - "+d+"px)",u.style.left=q.style.right="0",A.style.left=V.style.right="calc(50% - "+(d-50)+"px)",u.style.width=q.style.width="calc(50% - "+d+"px)";function C(){}function M(){E!==void 0&&(clearInterval(E),E=void 0)}function de(G,D,x){ge(G).then(function(B){c.src=B,a.style.display=m.style.display="none",c.style.display=A.style.display=V.style.display="block",A.onclick=function(){D({blob:G,dataURL:B})},V.onclick=function(){typeof window.URL=="function"?URL.revokeObjectURL(B):typeof window.webkitURL=="function"&&webkitURL.revokeObjectURL(B),S=0,a.style.display=m.style.display="block",c.style.display=A.style.display=V.style.display="none"}}).catch(function(B){x(B)})}return a.srcObject!==void 0?(a.srcObject=t,C=function(){a.srcObject=null}):a.mozSrcObject!==void 0&&(a.mozSrcObject=t,C=function(){a.mozSrcObject=null}),a.onloadedmetadata=function(){a.muted=!0,a.play()},top.document.documentElement.style.overflow="hidden",top.document.body.appendChild(l),n.push(function(){top.document.documentElement.style.overflow=i,top.document.body.removeChild(l),g!==void 0&&g.state!=="inactive"&&(g.stop(),g=void 0),C(),M()}),new Promise(function(G,D){top.document.addEventListener("keyup",function x(B){n.push(function(){top.document.removeEventListener("keyup",x)}),(B.keyCode===27||B.code==="Escape")&&D(new Z("User did not select."))}),m.onclick=function(){try{if(e===T.Type.Image){nt();var x=document.createElement("canvas");x.width=p,x.height=r;var B=x.getContext("2d");B.drawImage(a,0,0,x.width,x.height),ze(x).then(function(L){de(L,G,D)}).catch(function(L){D(L)})}else f?(tt(),g.stop(),h.style.borderRadius=h.style.WebkitBorderRadius=h.style.MozBorderRadius="50%",h.style.left="3px",h.style.top="3px",h.style.width="44px",h.style.height="44px"):(et(),E=setInterval(function(){++S,s.innerText=ae(S/6e3)+":"+ae(S/100%60)+":"+ae(S%100)},10),g=new MediaRecorder(a.srcObject||a.mozSrcObject),b=[],g.ondataavailable=function(L){L.data.size>0&&b.push(L.data)},g.onstop=function(){M(),de(new Blob(b,{type:"video/webm"}),G,D)},g.start(),h.style.borderRadius=h.style.WebkitBorderRadius=h.style.MozBorderRadius="10%",h.style.top="12px",h.style.left="12px",h.style.width="27px",h.style.height="27px"),f=!f}catch(L){D(L)}}})}function ae(e){return e=parseInt(e),e<=9?"0"+e:e}function ge(e){return new Promise(function(t,n){try{var o=new FileReader;o.onloadend=function(){t(o.result)},o.onerror=function(i){n(i)},o.readAsDataURL(e)}catch(i){n(i)}})}function ze(e){return new Promise(function(t,n){if(typeof e.toBlob=="function")e.toBlob(function(l){t(l)},"image/png");else if(typeof e.msToBlob=="function")t(e.msToBlob());else try{for(var o=e.toDataURL("image/png"),i=atob(o.split(",")[1]),p=new ArrayBuffer(i.length),r=new Uint8Array(p),c=0;c<i.length;c++)r[c]=i.charCodeAt(c);t(new Blob([p],{type:o.split(",")[0].split(":")[1].split(";")[0]}))}catch(l){n(l)}})}function Ye(){var e=document.createElement("DIV"),t=Ze();return e.style.position="absolute",e.style.left="0",e.style.top=top.scrollY+"px",e.style.width="100%",e.style.height="100%",e.style.zIndex="2147483647",e.appendChild(t),e}function ve(){var e=document.createElement("DIV");return e.style.position="absolute",e.style.top="0",e.style.height="100%",e.style.backgroundColor="#000",e}function Ke(){var e=document.createElement("VIDEO");return e.style.position="absolute",e.style.top="30%",e.style.height="40%",e.controls=!1,e}function Ze(){var e=document.createElement("DIV");return e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="#111",e}function We(){var e=document.createElement("DIV");return e.style.position="absolute",e.style.left="calc(50% - 50px)",e.style.top="calc(20% - 12px)",e.style.width="100px",e.style.height="24px",e.style.color="#FFF",e.style.fontWeight="400",e.style.textAlign="center",e.style.fontVariantNumeric="tabular-nums",e.style.fontFeatureSettings=e.style.WebkitFontFeatureSettings=e.style.MozFontFeatureSettings='"tnum"',e.innerText="00:00:00",e}function He(){var e=document.createElement("BUTTON");return e.style.position="relative",e.style.left="calc(50% - 30px)",e.style.top="calc(80% - 30px)",e.style.width="60px",e.style.height="60px",e.style.backgroundColor="#FFFFFF00",e.style.borderRadius=e.style.WebkitBorderRadius=e.style.MozBorderRadius="50%",e.style.cursor="pointer",e.style.border="5px solid #FFF",e}function Je(e){var t=document.createElement("DIV");return t.style.position="absolute",t.style.left="3px",t.style.top="3px",t.style.width="44px",t.style.height="44px",t.style.borderRadius="50%",e===T.Type.Image?t.style.backgroundColor="#FFF":t.style.backgroundColor="#F00",$("(prefers-reduced-motion: no-preference)").matches&&(t.style.transitionProperty=t.style.WebkitTransitionProperty=t.style.MozTransitionProperty="border-radius, width, height, top, left",t.style.transitionDuration=t.style.WebkitTransitionDuration=t.style.MozTransitionDuration="150ms",t.style.transitionTimingFunction=t.style.WebkitTransitionTimingFunction=t.style.MozTransitionTimingFunction="ease"),t}function Xe(e){var t;return e===T.Type.Video?(t=document.createElement("VIDEO"),t.controls=!0):t=document.createElement("IMG"),t.style.position="absolute",t.style.top="30%",t.style.height="40%",t.style.display="none",t}function _e(){var e=document.createElement("BUTTON"),t=document.createElement("DIV");return e.style.display="none",e.style.position="absolute",e.style.top="calc(80% - 15px)",e.style.width="30px",e.style.height="30px",t.style.position="relative",t.style.top="-2px",t.style.display="inline-block",t.style.transform=t.style.webkitTransform=t.style.msTransform=t.style.OTransform=t.style.MozTransform="rotate(45deg)",t.style.width="16px",t.style.height="25px",t.style.borderBottom=t.style.borderRight="5px solid #FFF",e.appendChild(t),e}function $e(){var e=document.createElement("BUTTON"),t=document.createElement("DIV"),n=document.createElement("DIV");return e.style.display="none",e.style.position="absolute",e.style.top="calc(80% - 15px)",e.style.width="30px",e.style.height="30px",t.style.position=n.style.position="relative",t.style.top="1px",t.style.left="3px",t.style.display=n.style.display="inline-block",t.style.transform=t.style.webkitTransform=t.style.msTransform=t.style.OTransform=t.style.MozTransform="rotate(45deg)",t.style.height=n.style.height="28px",t.style.borderRight=n.style.borderRight="5px solid #FFF",n.style.top="1px",n.style.left="-2px",n.style.transform=n.style.webkitTransform=n.style.msTransform=n.style.OTransform=n.style.MozTransform="rotate(315deg)",e.appendChild(t),e.appendChild(n),e}function se(e){typeof window.Audio=="function"&&new Audio("data:audio/mpeg;base64,"+e).play()}function et(){se("SUQzBAAAAAAAIlRTU0UAAAAOAAADTGF2ZjYxLjQuMTAwAAAAAAAAAAAAAAD/+1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYaW5nAAAADwAAAA4AAAi+ACMjIyMjIyNra2tra2trenp6enp6eomJiYmJiYmUlJSUlJSUoKCgoKCgoKysrKysrKy4uLi4uLi4uMTExMTExMTQ0NDQ0NDQ3Nzc3Nzc3Ojo6Ojo6Oj09PT09PT0/////////wAAAABMYXZjNjEuOS4AAAAAAAAAAAAAAAAkAkAAAAAAAAAIvgS8XU8AAAAAAAAAAAAAAAAAAAAA//sQRAAP8AAAf4AAAAgAAA/wAAABAAAB/hQAACAAAD/CgAAEBgVBYCAgDIAA//00wLiP/YsGhlZj0P/7zOLkTXRPdgN2FAwgzvgDMA55M/5BxSjG/xoAEIZCAAAHg4iQDNxRniJogKL/+7BkIgABjxbRXm6AAAzgCmTAAAAIPEtj+byQAIiGbj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qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xBk+4HxYQrQ4MNIwgAADSAAAAEDyCtBIYRkqAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqv/7EGTjD/BVAM6oAAAIAAANIAAAAQAAAf4AAAAgAAA0gAAABKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq")}var T=function(e){if(e==null||e.type==null||!T.isSupported||[T.Type.Image,T.Type.Video].indexOf(e.type)===-1)throw new TypeError("Failed to construct 'Native.Camera': Illegal constructor.");var t=this;this.run=function(){return new Promise(function(r,c){c(new Q("Initialization error."))})},this.bind=function(r){r.onclick=function(c){c.preventDefault(),t.run()}};var n=e.type;switch(I.name){case"Android":case"iOS":var o=document.createElement("INPUT");o.type="file",o.capture="environment",o.accept=e.type+"/*",this.run=function(){return new Promise(function(r,c){o.onchange=function(){var l=o.files;if(l.length>0){var a=l[0];ge(a).then(function(m){r({blob:a,dataURL:m})}).catch(function(m){c(m)})}else c(new Z("User did not select."))},o.click()})};return;case"Windows":case"MacOS":var i;if(navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia=="function")i=function(r){return navigator.mediaDevices.getUserMedia(r)};else{var p=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;typeof p=="function"&&(i=function(r){return new Promise(function(c,l){p.call(navigator,r,c,l)})})}this.run=function(){return new Promise(function(r,c){if(Ae)return c(new Error("Native.Camera is already running."));Ae=!0;var l=[];function a(){Ae=!1;for(var m=0;m<l.length;m++)l[m]()}try{i({video:!0,audio:n===T.Type.Video}).then(function(m){l.push(function(){for(var h=m.getTracks(),s=0;s<h.length;s++)h[s].stop()}),je(n,m,l).then(function(h){r(h)}).catch(function(h){c(h)}).finally(function(){a()})}).catch(function(m){a(),c(m)})}catch(m){a(),c(m)}})};break;default:}};T.Type=w({Image:"image",Video:"video"});Object.defineProperty(T,"isSupported",{get(){return I.name==="Android"||I.name==="iOS"||(typeof navigator.getUserMedia=="function"||typeof navigator.webkitGetUserMedia=="function"||typeof navigator.mozGetUserMedia=="function"||typeof navigator.msGetUserMedia=="function"||navigator.mediaDevices!==void 0&&typeof navigator.mediaDevices.getUserMedia=="function")&&new Blob(["\xE4"]).size===2&&typeof window.MediaRecorder=="function"},configurable:!1,enumerable:!0});var ce=T;function ot(e){if(e==null)return!1;var t=e.length;return typeof t=="number"&&t>=0&&!(t%1)}function W(e){return encodeURIComponent(e).replace(/%20/g,"%20").replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16)})}function we(e){if(e==null)return null;if(e instanceof HTMLFormElement)return we(new FormData(e));if(e instanceof FormData){var t={};return e.forEach(function(n,o){t.hasOwnProperty(o)?(Array.isArray(t[o])||(t[o]=[t[o]]),t[o].push(n)):t[o]=n}),t}return e}function H(e,t=""){if(typeof e!="string"&&ot(e))for(var n="",o=0;o<e.length;o++)n+=W(e[o]),o!==e.length-1&&(n+=",");return e==null?"":e instanceof HTMLInputElement?t+W(e.value):e instanceof HTMLElement?t+W(e.innerText):e instanceof Node?t+W(e.textContent):t+W(e)}var J=function(e){if(e==null||e.type==null||[J.Type.Telephone,J.Type.SMS,J.Type.Mail].indexOf(e.type)===-1)throw new TypeError("Failed to construct 'Native.Messenger': Illegal constructor.");e=we(e);var t=e.type+":"+H(e.to)+"?"+H(e.cc,"cc=")+H(e.bcc,"&bcc=")+H(e.subject,"&subject=")+H(e.body,"&body=");this.run=function(n=top){return new Promise(function(o,i){K(I,n,t).then(function(){o()}).catch(function(){return i(new R("No url can be opened."))})})}};J.Type=w({Telephone:"tel",SMS:"sms",Mail:"mailto"});var le=J;var qt=6e4,it=6e3;function Ve(e){return e*Math.PI/180}function rt(e,t){var n=Math.cos(Ve(e.longitude-t.longitude)),o=Math.cos(Ve(e.latitude-t.latitude)),i=Math.cos(Ve(e.latitude+t.latitude));return Math.acos((n*(o+i)+(o-i))/2)}function At(e,t){return e===void 0||t===void 0||e.latitude===t.latitude&&e.longitude===t.longitude?0:6384e3*rt(e,t)}function Ee(e,t){var n=top.document.createElement("SCRIPT"),o="_"+Math.floor(Math.random()*(1<<30)),i="?";if(/\?[^&=]*=[^&=]*/.test(e)&&(i="&"),n.src=e+i+"callback="+o,top[o]!==void 0)return Ee(e,t);function p(){try{delete top[o]}catch{top[o]=void 0}n.parentNode.removeChild(n)}top[o]=function(r){t(r)},n.onload=function(){p()},n.onerror=function(){p()},top.document.head.appendChild(n)}var at=function(e,t){if(e==null)throw new TypeError("Failed to construct 'Native.Geolocation': Illegal constructor.");var n=navigator.geolocation!==void 0&&navigator.geolocation.watchPosition!==void 0,o,i,p,r;navigator.permissions&&navigator.permissions.query?navigator.permissions.query({name:"geolocation"}).then(function(s){s.addEventListener("change",function(){c(s.state!=="denied")}),c(s.state!=="denied")}).catch(function(s){c(!1)}):navigator.geolocation!==void 0&&navigator.geolocation.getCurrentPosition!==void 0?o=setInterval(function(){navigator.geolocation.getCurrentPosition(function(){c(!0)},function(s){s.code===s.PERMISSION_DENIED&&c(!1)})},qt):c(!1);function c(s){n^s&&(n=s,i!==void 0&&(s?(clearInterval(i),i=h()):(navigator.geolocation.clearWatch(i),i=m())))}function l(s){if(s.distance=At(p,s),s.speed===void 0){var u=new Date().getTime();if(r===void 0)s.speed=0;else{var q=(u-r)/1e3;q>0?s.speed=s.distance/q:s.speed=0}}p=s,r=new Date().getTime()}function a(){if(n){i!==void 0&&clearInterval(i),i=h();return}Ee("http://ip-api.com/json/?fields=lat,lon,status",function(s){var u={};if(s.status==="success"){if(u.latitude=s.lat,u.longitude=s.lon,u.accuracy=-1,p!==void 0&&u.latitude===p.latitude&&u.longitude===p.longitude)return;l(u),e(u)}else t&&t()})}function m(){return a(),setInterval(a,it)}function h(){return navigator.geolocation.watchPosition(function(s){var u={};u.latitude=s.coords.latitude,u.longitude=s.coords.longitude,u.accuracy=s.coords.accuracy,s.coords.altitude!==null&&(u.altitude=s.coords.altitude),s.coords.altitudeAccuracy!==null&&(u.altitudeAccuracy=s.coords.altitudeAccuracy),s.coords.heading!==null&&(u.heading=s.coords.heading),s.coords.speed!==null&&(u.speed=s.coords.speed),l(u),e(u)},function(s){s.code===s.PERMISSION_DENIED?(n=!1,i!==void 0&&navigator.geolocation.clearWatch(i),i=m()):t&&t()})}this.disconnect=function(){i!==void 0&&(n?navigator.geolocation.clearWatch(i):clearInterval(i)),o!==void 0&&clearInterval(o),i=void 0,p=void 0,o=void 0},this.observe=function(){this.disconnect(),n?i=h():i=m()}},ue=at;var be={name:"native-fn",version:"1.0.13",description:" ",scripts:{test:'echo "Error: no test specified" && exit 1',build:"node build.js"},author:"",license:"MIT",type:"module",main:"dist/index.cjs",require:"dist/index.cjs",module:"dist/index.mjs",umd:"dist/index.umd.js",types:"dist/src/index.d.ts",exports:{".":{import:"./dist/index.mjs",require:"./dist/index.cjs",umd:"./dist/index.umd.js",types:"./dist/src/index.d.ts"}},repository:{type:"git",url:"https://github.com/pjy0509/native-fn"},homepage:"https://pjy0509.github.io/example/native-fn/",keywords:["app","app loader","app launcher","app-loader","app-launcher","appearance","camera","engine","geolocation","keyboard inset","keyboard-inset","messenger","os","safe area inset","safe-area-inset","theme","titlebar area","titlebar-area"],devDependencies:{esbuild:"^0.21.4",glob:"^10.4.1","html-webpack-plugin":"^5.6.0","ts-loader":"^9.5.1",typescript:"^5.4.5"}};Promise.resolve().then(()=>Se());var Ie={InitializationError:Q,URLOpenError:R,UserNotSelectedError:Z},Be=w({version:be.version,OS:I,Engine:ne,Appearance:k,Theme:qe,App:re,Camera:ce,Messenger:le,Geolocation:ue,Error:Ie});typeof globalThis<"u"&&(globalThis.Native=Be);
1
+ "use strict";var te=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var Me=Object.prototype.hasOwnProperty;var xe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ce=(e,t)=>{for(var n in t)te(e,n,{get:t[n],enumerable:!0})},Ue=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Te(t))!Me.call(e,i)&&i!==n&&te(e,i,{get:()=>t[i],enumerable:!(o=ke(t,i))||o.enumerable});return e};var Le=e=>Ue(te({},"__esModule",{value:!0}),e);var ct={};var Se=xe(()=>{(function(e,t){typeof exports=="object"&&typeof module<"u"?t():typeof define=="function"&&define.amd?define(t):t()})(0,function(){"use strict";function e(q){var A=this.constructor;return this.then(function(V){return A.resolve(q()).then(function(){return V})},function(V){return A.resolve(q()).then(function(){return A.reject(V)})})}function t(q){return new this(function(A,V){function d(S,b){if(b&&(typeof b=="object"||typeof b=="function")){var C=b.then;if(typeof C=="function")return void C.call(b,function(M){d(S,M)},function(M){p[S]={status:"rejected",reason:M},--g==0&&A(p)})}p[S]={status:"fulfilled",value:b},--g==0&&A(p)}if(!q||typeof q.length>"u")return V(new TypeError(typeof q+" "+q+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var p=Array.prototype.slice.call(q);if(p.length===0)return A([]);for(var g=p.length,E=0;p.length>E;E++)d(E,p[E])})}function n(q,A){this.name="AggregateError",this.errors=q,this.message=A||""}function o(q){var A=this;return new A(function(V,d){if(!q||typeof q.length>"u")return d(new TypeError("Promise.any accepts an array"));var p=Array.prototype.slice.call(q);if(p.length===0)return d();for(var g=[],E=0;p.length>E;E++)try{A.resolve(p[E]).then(V).catch(function(S){g.push(S),g.length===p.length&&d(new n(g,"All promises were rejected"))})}catch(S){d(S)}})}function i(q){return!(!q||typeof q.length>"u")}function h(){}function r(q){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if(typeof q!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],m(q,this)}function c(q,A){for(;q._state===3;)q=q._value;q._state!==0?(q._handled=!0,r._immediateFn(function(){var V=q._state===1?A.onFulfilled:A.onRejected;if(V!==null){var d;try{d=V(q._value)}catch(p){return void s(A.promise,p)}u(A.promise,d)}else(q._state===1?u:s)(A.promise,q._value)})):q._deferreds.push(A)}function u(q,A){try{if(A===q)throw new TypeError("A promise cannot be resolved with itself.");if(A&&(typeof A=="object"||typeof A=="function")){var V=A.then;if(A instanceof r)return q._state=3,q._value=A,void a(q);if(typeof V=="function")return void m(function(d,p){return function(){d.apply(p,arguments)}}(V,A),q)}q._state=1,q._value=A,a(q)}catch(d){s(q,d)}}function s(q,A){q._state=2,q._value=A,a(q)}function a(q){q._state===2&&q._deferreds.length===0&&r._immediateFn(function(){q._handled||r._unhandledRejectionFn(q._value)});for(var A=0,V=q._deferreds.length;V>A;A++)c(q,q._deferreds[A]);q._deferreds=null}function m(q,A){var V=!1;try{q(function(d){V||(V=!0,u(A,d))},function(d){V||(V=!0,s(A,d))})}catch(d){if(V)return;V=!0,s(A,d)}}n.prototype=Error.prototype;var l=setTimeout;r.prototype.catch=function(q){return this.then(null,q)},r.prototype.then=function(q,A){var V=new this.constructor(h);return c(this,new function(d,p,g){this.onFulfilled=typeof d=="function"?d:null,this.onRejected=typeof p=="function"?p:null,this.promise=g}(q,A,V)),V},r.prototype.finally=e,r.all=function(q){return new r(function(A,V){function d(S,b){try{if(b&&(typeof b=="object"||typeof b=="function")){var C=b.then;if(typeof C=="function")return void C.call(b,function(M){d(S,M)},V)}p[S]=b,--g==0&&A(p)}catch(M){V(M)}}if(!i(q))return V(new TypeError("Promise.all accepts an array"));var p=Array.prototype.slice.call(q);if(p.length===0)return A([]);for(var g=p.length,E=0;p.length>E;E++)d(E,p[E])})},r.any=o,r.allSettled=t,r.resolve=function(q){return q&&typeof q=="object"&&q.constructor===r?q:new r(function(A){A(q)})},r.reject=function(q){return new r(function(A,V){V(q)})},r.race=function(q){return new r(function(A,V){if(!i(q))return V(new TypeError("Promise.race accepts an array"));for(var d=0,p=q.length;p>d;d++)r.resolve(q[d]).then(A,V)})},r._immediateFn=typeof setImmediate=="function"&&function(q){setImmediate(q)}||function(q){l(q,0)},r._unhandledRejectionFn=function(q){console!==void 0&&console&&console.warn("Possible Unhandled Promise Rejection:",q)};var f=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw Error("unable to locate global object")}();typeof f.Promise!="function"?f.Promise=r:(f.Promise.prototype.finally||(f.Promise.prototype.finally=e),f.Promise.allSettled||(f.Promise.allSettled=t),f.Promise.any||(f.Promise.any=o))})});var lt={};Ce(lt,{App:()=>re,Appearance:()=>k,Camera:()=>ce,Engine:()=>ne,Error:()=>Ie,Geolocation:()=>ue,Messenger:()=>le,Native:()=>Be,OS:()=>I,Theme:()=>qe});module.exports=Le(lt);function w(e){if(typeof Object.freeze!="function"){for(var t=Object.keys(e),n=0,o=t[n];n<t.length;n++)if(e.hasOwnProperty(o))try{Object.defineProperty(e,o,{writable:!1,configurable:!1})}catch{}return e}return Object.freeze(e)}function X(e){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"},n=t[e];return n!==void 0?n:e}function _(e){if(e!==void 0)return e.replace(/_/g,".")}function De(){var e=document.createElement("CANVAS");if(typeof e.getContext=="function"){var t=e.getContext("experimental-webgl")||e.getContext("webgl");if(t!==null){var n=t.getExtension("WEBGL_debug_renderer_info");if(typeof t.getParameter=="function")return n==null?t.getParameter(t.RENDERER):t.getParameter(n.UNMASKED_RENDERER_WEBGL)}}}var Fe=function(e){for(var t,n={renderer:De(),name:"Unknown",version:void 0},o=[[/android\w*[-\/.; ]?([\d.]*)/i,"Android"],[/microsoft windows (vista|xp)/i,"Windows"],[/windows (?:phone(?: os)?|mobile|iot)[\/ ]?([.\w ]*)/i,"Windows",X],[/windows nt 6\.2; (arm)/i,"Windows",X],[/windows[\/ ]([ntce\d. ]+\w)(?!.+xbox)/i,"Windows",X],[/(?:win(?=[39n])|win 9x )([nt\d.]+)/i,"Windows",X],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,"iOS",_],[/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d.]+)/i,"iOS",_],[/cfnetwork\/.+darwin/i,"iOS"],[/mac os x ?([\w. ]*)/i,"MacOS",_],[/(?:macintosh|mac_powerpc\b)(?!.+haiku)/i,"MacOS",_]],i=0;i<o.length;i++)if(t=e.match(o[i][0]),t!==null)return n.name=o[i][1],o[i][2]!==void 0?n.version=o[i][2](t[1]):n.version=t[1],w(n);return w(n)}(navigator.userAgent),I=Fe;function fe(e){return"LibWeb"}var Oe=function(e){for(var t,n={name:"Unknown",isWebView:/; ?wv|applewebkit(?!.*safari)/i.test(e),version:void 0},o=[[/windows.+ edge\/([\w.]+)/i,"EdgeHTML"],[/arkweb\/([\w.]+)/i,"ArkWeb"],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,"Blink"],[/presto\/([\w.]+)/i,"Presto"],[/webkit\/([\w.]+)/i,"WebKit"],[/trident\/([\w.]+)/i,"Trident"],[/netfront\/([\w.]+)/i,"NetFront"],[/netsurf\/([\w.]+)/i,"NetSurf"],[/amaya\/([\w.]+)/i,"Amaya"],[/lynx\/([\w.]+)/i,"Lynx"],[/w3m\/([\w.]+)/i,"w3m"],[/goanna\/([\w.]+)/i,"Goanna"],[/servo\/([\w.]+)/i,"Servo"],[/ekiohflow\/([\w.]+)/i,"Flow"],[/khtml[\/ ]\(?([\w.]+)/i,"KHTML"],[/tasman[\/ ]\(?([\w.]+)/i,"Tasman"],[/links[\/ ]\(?([\w.]+)/i,"Links"],[/icab[\/ ]([23]\.[\d.]+)/i,"iCab"],[/\blibweb/i,"LibWeb",fe],[/ladybird\//i,"LibWeb",fe],[/rv:([\w.]{1,9})\b.+gecko/i,"Gecko"]],i=0;i<o.length;i++)if(t=e.match(o[i][0]),t!==null)return n.name=o[i][1],o[i][2]!==void 0?n.version=o[i][2](t[1]):n.version=t[1],w(n);return w(n)}(navigator.userAgent),ne=Oe;var $=function(){if(typeof window.matchMedia=="function")return window.matchMedia;var e=window.styleMedia||window.media;if(e===void 0){var t=document.createElement("STYLE"),n;t.type="text/css",t.id="match-media-polyfill",document.head.appendChild(t),typeof window.getComputedStyle=="function"?n=window.getComputedStyle(t):n=t.currentStyle,e={matchMedia:function(o){var i="@media "+o+"{ #"+t.id+" {width: 1px;} }";return t.styleSheet!==void 0?t.styleSheet.cssText=i:t.textContent=i,n.width==="1px"}}}return function(o){return{matches:e.matchMedia(o),media:o}}}();var j=[],U=$("(prefers-color-scheme: dark)"),F={addListener:function(e){function t(n){e(n.matches?F.Type.Dark:F.Type.Light)}if(j.push({original:e,wrapped:t}),typeof U.addEventListener=="function")return U.addEventListener("change",t);if(typeof U.addListener=="function")return U.addListener(t)},removeListener:function(e){for(var t=0;t<j.length;t++)if(j[t].original===e){var n=j[t].wrapped;if(typeof U.removeEventListener=="function")U.removeEventListener("change",n);else if(typeof U.removeListener=="function")return U.removeListener(n);j.splice(t,1);return}}};Object.defineProperty(F,"value",{get:function(){return U.matches?F.Type.Dark:F.Type.Light},configurable:!1,enumerable:!0});F.Type=w({Light:"light",Dark:"dark"});var k=F;var z,y={light:void 0,dark:void 0,iosStatusBar:void 0,windowsPhone:void 0},P,O=[],pe=[];function ee(e){var t="",n,o;for(o=0;o<e.length;o++)t+="["+e[o][0]+"='"+e[o][1]+"']";if(n=top.document.head.querySelector("meta"+t),n===null){for(n=top.document.createElement("META"),o=0;o<e.length;o++)n[e[o][0]]=e[o][1];top.document.head.appendChild(n)}return n}function oe(){y.light===void 0&&(y.light=ee([["name","theme-color"],["media","(prefers-color-scheme: light)"]])),y.dark===void 0&&(y.dark=ee([["name","theme-color"],["media","(prefers-color-scheme: dark)"]])),y.iosStatusBar===void 0&&(y.iosStatusBar=ee([["name","apple-mobile-web-app-status-bar-style"]])),y.windowsPhone===void 0&&(y.windowsPhone=ee([["name","msapplication-navbutton-color"]]))}var Y={addListener:function(e){if(typeof window.MutationObserver!="function")return;P===void 0&&(P=new MutationObserver(function(n){var o,i=!1;for(o=0;o<n.length;o++){var h=n[o],r=h.target,c=h.type;if(!(c!=="attributes"||r.tagName!=="META")&&[y.light,y.dark,y.iosStatusBar,y.windowsPhone].indexOf(r)!==-1){i=!0;break}}if(i)for(o=0;o<O.length;o++)O[o](Y.value)}),P.observe(top.document.head,{attributes:!0,childList:!0,subtree:!0}));function t(){oe(),y.dark.content!==y.light.content&&e(Y.value)}k.addListener(t),pe.push(t),O.push(e)},removeListener:function(e){if(!(typeof window.MutationObserver!="function"||P===void 0)){for(var t=0;t<O.length;t++)if(O[t]===e){O.splice(t,1),pe.splice(t,1);break}O.length===0&&(P.disconnect(),P=void 0)}},setTheme:function(e){oe(),z!==void 0&&(k.removeListener(z),z=void 0),z=function(o){var i=e[o];i!==void 0&&(i.iosStatusBar!==void 0&&(y.iosStatusBar.content=i.iosStatusBar),i.windowsPhone!==void 0&&(y.windowsPhone.content=i.iosStatusBar))},k.addListener(z);var t=e.light,n=e.dark;n!==void 0&&n.theme!==void 0&&(y.dark.content=n.theme),t!==void 0&&(t.theme!==void 0&&(y.light.content=t.theme),k.value==="light"&&(t.iosStatusBar!==void 0&&(y.iosStatusBar.content=t.iosStatusBar),t.windowsPhone!==void 0&&(y.windowsPhone.content=t.windowsPhone))),n!==void 0&&(n.theme!==void 0&&(y.dark.content=n.theme),k.value==="dark"&&(n.iosStatusBar!==void 0&&(y.iosStatusBar.content=n.iosStatusBar),n.windowsPhone!==void 0&&(y.windowsPhone.content=n.windowsPhone)))}};Object.defineProperty(Y,"value",{get:function(){var e={};return oe(),y[k.value].content!==""&&(e.theme=y[k.value].content),y.iosStatusBar.content!==""&&(e.iosStatusBar=y.iosStatusBar.content),y.windowsPhone.content!==""&&(e.windowsPhone=y.windowsPhone.content),e},configurable:!1,enumerable:!0});Y.Type=w({Theme:"theme",IOSStatusBar:"iosStatusBar",WindowsPhone:"windowsPhone"});var qe=Y;function Ne(e){return e.document.hidden!==void 0?e.document.hidden:e.document.webkitHidden!==void 0?e.document.webkitHidden:!0}function me(e,t,n="_self"){var o=e.document.createElement("A"),i;o.href=t,o.target=n,e.document.body.appendChild(o);try{i=new e.MouseEvent("click",{bubbles:!0,cancelable:!0,view:e})}catch{i=e.document.createEvent("MouseEvents"),i.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}o.dispatchEvent(i),e.document.body.removeChild(o)}function he(e,t,n,o,i){return new Promise(function(h,r){var c;function u(){clearTimeout(c),t.removeEventListener("blur",u),t.addEventListener("focus",s)}function s(){t.removeEventListener("focus",s),h()}c=setTimeout(function(){r(),t.removeEventListener("blur",u)},o),t.addEventListener("blur",u),me(t,n,i)})}function Pe(e,t,n,o){return new Promise(function(i,h){var r,c=parseInt(e.version)>=8;function u(){clearTimeout(r),t.addEventListener("focus",s),t.removeEventListener("blur",u)}function s(){r=setTimeout(function(){Ne(t)?i():h(),c?t.document.removeEventListener("visibilitychange",a):t.document.removeEventListener("pagehide",a)},2e3),t.removeEventListener("focus",s)}function a(){clearTimeout(r),t.removeEventListener("blur",u),t.removeEventListener("focus",s),c?t.document.removeEventListener("visibilitychange",a):t.document.removeEventListener("pagehide",a),i()}t.addEventListener("blur",u),c?t.document.addEventListener("visibilitychange",a):t.document.addEventListener("pagehide",a),me(t,n,o)})}function Qe(e,t,n,o){return he(e,t,n,1e3,o)}function Re(e,t,n,o){return he(e,t,n,750,o)}function K(e,t,n,o){if(n)switch(e.name){case"Android":return Qe(e,t,n,o);case"iOS":return Pe(e,t,n,o);case"Windows":case"MacOS":return Re(e,t,n,o)}return Promise.reject()}function N(e){function t(n){if(!(this instanceof t))return new t(n);this.name=e,this.message=n,Error.captureStackTrace?Error.captureStackTrace(this,t):this.stack=new Error().stack}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Q=N("InitializationError");var R=N("URLOpenError");function ye(e){try{var t=new XMLHttpRequest;if(t.open("GET","http://itunes.apple.com/lookup?bundleId="+e,!1),t.send(),t.status===200){var n=JSON.parse(t.response);if(n.results.length>0)return n.results[0].trackId}return}catch{return}}function ie(e){return/\w+:\/\/.*/.test(e)?e:e+"://"}function Ge(e){return e.replace(/:\/\/.*$/,"")}var v=function(e){if(e===void 0)throw new TypeError("Failed to construct 'Native.App': Illegal constructor.");this.run=function(){return new Promise(function(f,q){q(new Q("Initialization error."))})};var t,n,o,i,h=Promise.resolve(),r=[],c,u;switch(I.name){case"Android":if(e.android===void 0)return;var s,a,m;if(t=e.android.scheme,n=e.android.package,o=e.android.fallback,a=e.android.intent,c=e.android.isOpenWebStore,u=e.android.aTarget,a!==void 0&&t===void 0&&(s=a.match(/scheme=([^;]*)/),s!==null&&(t=s[1])),a!==void 0&&n===void 0&&(s=a.match(/package=([^;]*)/),s!==null&&(n=s[1])),a!==void 0&&o===void 0&&(s=a.match(/S\.browser_fallback_url=([^;]*)/),s!==null&&(o=s[1])),t===void 0&&n===void 0&&o===void 0)return;if(a===void 0&&(a="intent://open#Intent;",t!==void 0&&(a=a+"scheme="+Ge(t)+";"),n!==void 0&&(a=a+"package="+n+";"),a=a+"end;"),window.chrome!==void 0&&(s=navigator.userAgent.match(/chrom(?:e|ium)\/([\w.]+)/i),s!==null&&(m=parseInt(s[1]))),m>=25&&a!==void 0)if(m<=42){h=new Promise(function(f){var q=top.document.createElement("IFRAME"),A="intent://open#Intent;scheme=;end;",V=!1;function d(g){V||(V=!0,f(g),q.removeEventListener("load",p),top.document.body.removeChild(q))}function p(){d(q.src!==A)}q.addEventListener("load",p),q.src=A,top.document.body.appendChild(q),setTimeout(function(){d(!1)},500)}).then(function(f){f?r.push([a,v.State.Intent]):r.push([a.replace(/package=.*?;/,"").replace(/S\.browser_fallback_url=.*?;/,""),v.State.Intent]),o!==void 0?r.push([o,v.State.Fallback]):n!==void 0&&(r.push(["market://details?id="+n,v.State.Store]),c&&r.push(["https://play.google.com/store/apps/details?id="+n,v.State.Store]))});break}else r.push([a,v.State.Intent]);else t!==void 0&&r.push([ie(t),v.State.Scheme]);o!==void 0?r.push([o,v.State.Fallback]):n!==void 0&&(r.push(["market://details?id="+n,v.State.Store]),c&&r.push(["https://play.google.com/store/apps/details?id="+n,v.State.Store]));break;case"Windows":if(e.windows===void 0)return;t=e.windows.scheme,n=e.windows.productId,c=e.windows.isOpenWebStore,o=e.windows.fallback,u=e.windows.aTarget,t!==void 0&&r.push([ie(t),v.State.Scheme]),o!==void 0?r.push([o,v.State.Fallback]):n!==void 0&&(r.push(["ms-windows-store://pdp/?ProductId="+n,v.State.Store]),c&&r.push(["https://apps.microsoft.com/detail/"+n,v.State.Store]));break;case"iOS":if(e.ios===void 0)return;var l=e.ios.universal;t=e.ios.scheme,i=e.ios.package,n=e.ios.trackId,o=e.ios.fallback,u=e.ios.aTarget,l!==void 0&&parseInt(I.version)>=9?r.push([l,v.State.Universal]):t!==void 0&&r.push([t,v.State.Scheme]),n===void 0&&i!==void 0&&(n=ye(i)),o!==void 0?r.push([o,v.State.Fallback]):n!==void 0&&(r.length===0?r.push(["itms-apps://itunes.apple.com/app/id"+n+"?mt=8",v.State.Store]):r.push(["https://itunes.apple.com/kr/app/id"+n+"?mt=8",v.State.Store]));break;case"MacOS":if(e.mac===void 0)return;t=e.mac.scheme,i=e.mac.package,n=e.mac.trackId,o=e.mac.fallback,c=e.mac.isOpenWebStore,u=e.mac.aTarget,t!==void 0&&r.push([ie(t),v.State.Scheme]),n===void 0&&i!==void 0&&(n=ye(i)),o!==void 0?r.push([o,v.State.Fallback]):n!==void 0&&(r.push(["macappstore://itunes.apple.com/app/id"+n+"?mt=12",v.State.Store]),c&&r.push(["https://apps.apple.com/us/app/id"+n+"?mt=12",v.State.Store]));break;default:return}this.run=function(f=top){return h.then(function(){return console.log(r),new Promise(function(q,A){function V(d=0){if(d>=r.length)return A(new R("No url can be opened."));var p=r[d][0],g=r[d][1];return K(I,f,p,u).then(function(){q(g)}).catch(function(E){V(++d)})}return V()})})}};v.State=w({Scheme:0,Universal:1,Intent:2,Fallback:3,Store:4});var re=v;var Z=N("UserNotSelectedError");var Ae=!1;function je(e,t,n){var o=t.getVideoTracks()[0].getSettings(),i=top.document.documentElement.style.overflow,h=o.width||640,r=o.height||480,c=Xe(e),u=Ye(),s=Ke(),a=He(),m=Je(e),l=We(),f=ve(),q=ve(),A=_e(),V=$e(),d=top.innerHeight*.4/r*h/2,p=!1,g,E=[],S=0,b;a.appendChild(m),e===T.Type.Video&&u.appendChild(l),u.appendChild(s),u.appendChild(c),u.appendChild(a),u.appendChild(f),u.appendChild(q),u.appendChild(A),u.appendChild(V),s.style.left=c.style.left="calc(50% - "+d+"px)",f.style.left=q.style.right="0",A.style.left=V.style.right="calc(50% - "+(d-50)+"px)",f.style.width=q.style.width="calc(50% - "+d+"px)";function C(){}function M(){b!==void 0&&(clearInterval(b),b=void 0)}function de(G,D,x){ge(G).then(function(B){c.src=B,s.style.display=a.style.display="none",c.style.display=A.style.display=V.style.display="block",A.onclick=function(){D({blob:G,dataURL:B})},V.onclick=function(){typeof window.URL=="function"?URL.revokeObjectURL(B):typeof window.webkitURL=="function"&&webkitURL.revokeObjectURL(B),S=0,s.style.display=a.style.display="block",c.style.display=A.style.display=V.style.display="none"}}).catch(function(B){x(B)})}return s.srcObject!==void 0?(s.srcObject=t,C=function(){s.srcObject=null}):s.mozSrcObject!==void 0&&(s.mozSrcObject=t,C=function(){s.mozSrcObject=null}),s.onloadedmetadata=function(){s.muted=!0,s.play()},top.document.documentElement.style.overflow="hidden",top.document.body.appendChild(u),n.push(function(){top.document.documentElement.style.overflow=i,top.document.body.removeChild(u),g!==void 0&&g.state!=="inactive"&&(g.stop(),g=void 0),C(),M()}),new Promise(function(G,D){top.document.addEventListener("keyup",function x(B){n.push(function(){top.document.removeEventListener("keyup",x)}),(B.keyCode===27||B.code==="Escape")&&D(new Z("User did not select."))}),a.onclick=function(){try{if(e===T.Type.Image){nt();var x=document.createElement("canvas");x.width=h,x.height=r;var B=x.getContext("2d");B.drawImage(s,0,0,x.width,x.height),ze(x).then(function(L){de(L,G,D)}).catch(function(L){D(L)})}else p?(tt(),g.stop(),m.style.borderRadius=m.style.WebkitBorderRadius=m.style.MozBorderRadius="50%",m.style.left="3px",m.style.top="3px",m.style.width="44px",m.style.height="44px"):(et(),b=setInterval(function(){++S,l.innerText=ae(S/6e3)+":"+ae(S/100%60)+":"+ae(S%100)},10),g=new MediaRecorder(s.srcObject||s.mozSrcObject),E=[],g.ondataavailable=function(L){L.data.size>0&&E.push(L.data)},g.onstop=function(){M(),de(new Blob(E,{type:"video/webm"}),G,D)},g.start(),m.style.borderRadius=m.style.WebkitBorderRadius=m.style.MozBorderRadius="10%",m.style.top="12px",m.style.left="12px",m.style.width="27px",m.style.height="27px"),p=!p}catch(L){D(L)}}})}function ae(e){return e=parseInt(e),e<=9?"0"+e:e}function ge(e){return new Promise(function(t,n){try{var o=new FileReader;o.onloadend=function(){t(o.result)},o.onerror=function(i){n(i)},o.readAsDataURL(e)}catch(i){n(i)}})}function ze(e){return new Promise(function(t,n){if(typeof e.toBlob=="function")e.toBlob(function(u){t(u)},"image/png");else if(typeof e.msToBlob=="function")t(e.msToBlob());else try{for(var o=e.toDataURL("image/png"),i=atob(o.split(",")[1]),h=new ArrayBuffer(i.length),r=new Uint8Array(h),c=0;c<i.length;c++)r[c]=i.charCodeAt(c);t(new Blob([h],{type:o.split(",")[0].split(":")[1].split(";")[0]}))}catch(u){n(u)}})}function Ye(){var e=document.createElement("DIV"),t=Ze();return e.style.position="absolute",e.style.left="0",e.style.top=top.scrollY+"px",e.style.width="100%",e.style.height="100%",e.style.zIndex="2147483647",e.appendChild(t),e}function ve(){var e=document.createElement("DIV");return e.style.position="absolute",e.style.top="0",e.style.height="100%",e.style.backgroundColor="#000",e}function Ke(){var e=document.createElement("VIDEO");return e.style.position="absolute",e.style.top="30%",e.style.height="40%",e.controls=!1,e}function Ze(){var e=document.createElement("DIV");return e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="#111",e}function We(){var e=document.createElement("DIV");return e.style.position="absolute",e.style.left="calc(50% - 50px)",e.style.top="calc(20% - 12px)",e.style.width="100px",e.style.height="24px",e.style.color="#FFF",e.style.fontWeight="400",e.style.textAlign="center",e.style.fontVariantNumeric="tabular-nums",e.style.fontFeatureSettings=e.style.WebkitFontFeatureSettings=e.style.MozFontFeatureSettings='"tnum"',e.innerText="00:00:00",e}function He(){var e=document.createElement("BUTTON");return e.style.position="relative",e.style.left="calc(50% - 30px)",e.style.top="calc(80% - 30px)",e.style.width="60px",e.style.height="60px",e.style.backgroundColor="#FFFFFF00",e.style.borderRadius=e.style.WebkitBorderRadius=e.style.MozBorderRadius="50%",e.style.cursor="pointer",e.style.border="5px solid #FFF",e}function Je(e){var t=document.createElement("DIV");return t.style.position="absolute",t.style.left="3px",t.style.top="3px",t.style.width="44px",t.style.height="44px",t.style.borderRadius="50%",e===T.Type.Image?t.style.backgroundColor="#FFF":t.style.backgroundColor="#F00",$("(prefers-reduced-motion: no-preference)").matches&&(t.style.transitionProperty=t.style.WebkitTransitionProperty=t.style.MozTransitionProperty="border-radius, width, height, top, left",t.style.transitionDuration=t.style.WebkitTransitionDuration=t.style.MozTransitionDuration="150ms",t.style.transitionTimingFunction=t.style.WebkitTransitionTimingFunction=t.style.MozTransitionTimingFunction="ease"),t}function Xe(e){var t;return e===T.Type.Video?(t=document.createElement("VIDEO"),t.controls=!0):t=document.createElement("IMG"),t.style.position="absolute",t.style.top="30%",t.style.height="40%",t.style.display="none",t}function _e(){var e=document.createElement("BUTTON"),t=document.createElement("DIV");return e.style.display="none",e.style.position="absolute",e.style.top="calc(80% - 15px)",e.style.width="30px",e.style.height="30px",t.style.position="relative",t.style.top="-2px",t.style.display="inline-block",t.style.transform=t.style.webkitTransform=t.style.msTransform=t.style.OTransform=t.style.MozTransform="rotate(45deg)",t.style.width="16px",t.style.height="25px",t.style.borderBottom=t.style.borderRight="5px solid #FFF",e.appendChild(t),e}function $e(){var e=document.createElement("BUTTON"),t=document.createElement("DIV"),n=document.createElement("DIV");return e.style.display="none",e.style.position="absolute",e.style.top="calc(80% - 15px)",e.style.width="30px",e.style.height="30px",t.style.position=n.style.position="relative",t.style.top="1px",t.style.left="3px",t.style.display=n.style.display="inline-block",t.style.transform=t.style.webkitTransform=t.style.msTransform=t.style.OTransform=t.style.MozTransform="rotate(45deg)",t.style.height=n.style.height="28px",t.style.borderRight=n.style.borderRight="5px solid #FFF",n.style.top="1px",n.style.left="-2px",n.style.transform=n.style.webkitTransform=n.style.msTransform=n.style.OTransform=n.style.MozTransform="rotate(315deg)",e.appendChild(t),e.appendChild(n),e}function se(e){typeof window.Audio=="function"&&new Audio("data:audio/mpeg;base64,"+e).play()}function et(){se("SUQzBAAAAAAAIlRTU0UAAAAOAAADTGF2ZjYxLjQuMTAwAAAAAAAAAAAAAAD/+1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYaW5nAAAADwAAAA4AAAi+ACMjIyMjIyNra2tra2trenp6enp6eomJiYmJiYmUlJSUlJSUoKCgoKCgoKysrKysrKy4uLi4uLi4uMTExMTExMTQ0NDQ0NDQ3Nzc3Nzc3Ojo6Ojo6Oj09PT09PT0/////////wAAAABMYXZjNjEuOS4AAAAAAAAAAAAAAAAkAkAAAAAAAAAIvgS8XU8AAAAAAAAAAAAAAAAAAAAA//sQRAAP8AAAf4AAAAgAAA/wAAABAAAB/hQAACAAAD/CgAAEBgVBYCAgDIAA//00wLiP/YsGhlZj0P/7zOLkTXRPdgN2FAwgzvgDMA55M/5BxSjG/xoAEIZCAAAHg4iQDNxRniJogKL/+7BkIgABjxbRXm6AAAzgCmTAAAAIPEtj+byQAIiGbjsa8AGpphgCAAAAAAAACso7+/xMqNUBjyEogtJ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qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+xBk+4HxYQrQ4MNIwgAADSAAAAEDyCtBIYRkqAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqv/7EGTjD/BVAM6oAAAIAAANIAAAAQAAAf4AAAAgAAA0gAAABKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq")}var T=function(e){if(e==null||e.type==null||!T.isSupported||[T.Type.Image,T.Type.Video].indexOf(e.type)===-1)throw new TypeError("Failed to construct 'Native.Camera': Illegal constructor.");var t=this;this.run=function(){return new Promise(function(r,c){c(new Q("Initialization error."))})},this.bind=function(r){r.onclick=function(c){c.preventDefault(),t.run()}};var n=e.type;switch(I.name){case"Android":case"iOS":var o=document.createElement("INPUT");o.type="file",o.capture="environment",o.accept=e.type+"/*",this.run=function(){return new Promise(function(r,c){o.onchange=function(){var u=o.files;if(u.length>0){var s=u[0];ge(s).then(function(a){r({blob:s,dataURL:a})}).catch(function(a){c(a)})}else c(new Z("User did not select."))},o.click()})};return;case"Windows":case"MacOS":var i;if(navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia=="function")i=function(r){return navigator.mediaDevices.getUserMedia(r)};else{var h=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;typeof h=="function"&&(i=function(r){return new Promise(function(c,u){h.call(navigator,r,c,u)})})}this.run=function(){return new Promise(function(r,c){if(Ae)return c(new Error("Native.Camera is already running."));Ae=!0;var u=[];function s(){Ae=!1;for(var a=0;a<u.length;a++)u[a]()}try{i({video:!0,audio:n===T.Type.Video}).then(function(a){u.push(function(){for(var m=a.getTracks(),l=0;l<m.length;l++)m[l].stop()}),je(n,a,u).then(function(m){r(m)}).catch(function(m){c(m)}).finally(function(){s()})}).catch(function(a){s(),c(a)})}catch(a){s(),c(a)}})};break;default:}};T.Type=w({Image:"image",Video:"video"});Object.defineProperty(T,"isSupported",{get(){return I.name==="Android"||I.name==="iOS"||(typeof navigator.getUserMedia=="function"||typeof navigator.webkitGetUserMedia=="function"||typeof navigator.mozGetUserMedia=="function"||typeof navigator.msGetUserMedia=="function"||navigator.mediaDevices!==void 0&&typeof navigator.mediaDevices.getUserMedia=="function")&&new Blob(["\xE4"]).size===2&&typeof window.MediaRecorder=="function"},configurable:!1,enumerable:!0});var ce=T;function ot(e){if(e==null)return!1;var t=e.length;return typeof t=="number"&&t>=0&&!(t%1)}function W(e){return encodeURIComponent(e).replace(/%20/g,"%20").replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16)})}function we(e){if(e==null)return null;if(e instanceof HTMLFormElement)return we(new FormData(e));if(e instanceof FormData){var t={};return e.forEach(function(n,o){t.hasOwnProperty(o)?(Array.isArray(t[o])||(t[o]=[t[o]]),t[o].push(n)):t[o]=n}),t}return e}function H(e,t=""){if(typeof e!="string"&&ot(e))for(var n="",o=0;o<e.length;o++)n+=W(e[o]),o!==e.length-1&&(n+=",");return e==null?"":e instanceof HTMLInputElement?t+W(e.value):e instanceof HTMLElement?t+W(e.innerText):e instanceof Node?t+W(e.textContent):t+W(e)}var J=function(e){if(e==null||e.type==null||[J.Type.Telephone,J.Type.SMS,J.Type.Mail].indexOf(e.type)===-1)throw new TypeError("Failed to construct 'Native.Messenger': Illegal constructor.");e=we(e);var t=e.type+":"+H(e.to)+"?"+H(e.cc,"cc=")+H(e.bcc,"&bcc=")+H(e.subject,"&subject=")+H(e.body,"&body=");this.run=function(n=top){return new Promise(function(o,i){K(I,n,t).then(function(){o()}).catch(function(){return i(new R("No url can be opened."))})})}};J.Type=w({Telephone:"tel",SMS:"sms",Mail:"mailto"});var le=J;var qt=6e4,it=6e3;function Ve(e){return e*Math.PI/180}function rt(e,t){var n=Math.cos(Ve(e.longitude-t.longitude)),o=Math.cos(Ve(e.latitude-t.latitude)),i=Math.cos(Ve(e.latitude+t.latitude));return Math.acos((n*(o+i)+(o-i))/2)}function At(e,t){return e===void 0||t===void 0||e.latitude===t.latitude&&e.longitude===t.longitude?0:6384e3*rt(e,t)}function Ee(e,t){var n=top.document.createElement("SCRIPT"),o="_"+Math.floor(Math.random()*(1<<30)),i="?";if(/\?[^&=]*=[^&=]*/.test(e)&&(i="&"),n.src=e+i+"callback="+o,top[o]!==void 0)return Ee(e,t);function h(){try{delete top[o]}catch{top[o]=void 0}n.parentNode.removeChild(n)}top[o]=function(r){t(r)},n.onload=function(){h()},n.onerror=function(){h()},top.document.head.appendChild(n)}var at=function(e,t){if(e==null)throw new TypeError("Failed to construct 'Native.Geolocation': Illegal constructor.");var n=navigator.geolocation!==void 0&&navigator.geolocation.watchPosition!==void 0,o,i,h,r;navigator.permissions&&navigator.permissions.query?navigator.permissions.query({name:"geolocation"}).then(function(l){l.addEventListener("change",function(){c(l.state!=="denied")}),c(l.state!=="denied")}).catch(function(l){c(!1)}):navigator.geolocation!==void 0&&navigator.geolocation.getCurrentPosition!==void 0?o=setInterval(function(){navigator.geolocation.getCurrentPosition(function(){c(!0)},function(l){l.code===l.PERMISSION_DENIED&&c(!1)})},qt):c(!1);function c(l){n^l&&(n=l,i!==void 0&&(l?(clearInterval(i),i=m()):(navigator.geolocation.clearWatch(i),i=a())))}function u(l){if(l.distance=At(h,l),l.speed===void 0){var f=new Date().getTime();if(r===void 0)l.speed=0;else{var q=(f-r)/1e3;q>0?l.speed=l.distance/q:l.speed=0}}h=l,r=new Date().getTime()}function s(){if(n){i!==void 0&&clearInterval(i),i=m();return}Ee("http://ip-api.com/json/?fields=lat,lon,status",function(l){var f={};if(l.status==="success"){if(f.latitude=l.lat,f.longitude=l.lon,f.accuracy=-1,h!==void 0&&f.latitude===h.latitude&&f.longitude===h.longitude)return;u(f),e(f)}else t&&t()})}function a(){return s(),setInterval(s,it)}function m(){return navigator.geolocation.watchPosition(function(l){var f={};f.latitude=l.coords.latitude,f.longitude=l.coords.longitude,f.accuracy=l.coords.accuracy,l.coords.altitude!==null&&(f.altitude=l.coords.altitude),l.coords.altitudeAccuracy!==null&&(f.altitudeAccuracy=l.coords.altitudeAccuracy),l.coords.heading!==null&&(f.heading=l.coords.heading),l.coords.speed!==null&&(f.speed=l.coords.speed),u(f),e(f)},function(l){l.code===l.PERMISSION_DENIED?(n=!1,i!==void 0&&navigator.geolocation.clearWatch(i),i=a()):t&&t()})}this.disconnect=function(){i!==void 0&&(n?navigator.geolocation.clearWatch(i):clearInterval(i)),o!==void 0&&clearInterval(o),i=void 0,h=void 0,o=void 0},this.observe=function(){this.disconnect(),n?i=m():i=a()}},ue=at;var be={name:"native-fn",version:"1.0.14",description:" ",scripts:{test:'echo "Error: no test specified" && exit 1',build:"node build.js"},author:"",license:"MIT",type:"module",main:"dist/index.cjs",require:"dist/index.cjs",module:"dist/index.mjs",umd:"dist/index.umd.js",types:"dist/src/index.d.ts",exports:{".":{import:"./dist/index.mjs",require:"./dist/index.cjs",umd:"./dist/index.umd.js",types:"./dist/src/index.d.ts"}},repository:{type:"git",url:"https://github.com/pjy0509/native-fn"},homepage:"https://pjy0509.github.io/example/native-fn/",keywords:["app","app loader","app launcher","app-loader","app-launcher","appearance","camera","engine","geolocation","keyboard inset","keyboard-inset","messenger","os","safe area inset","safe-area-inset","theme","titlebar area","titlebar-area"],devDependencies:{esbuild:"^0.21.4",glob:"^10.4.1","html-webpack-plugin":"^5.6.0","ts-loader":"^9.5.1",typescript:"^5.4.5"}};Promise.resolve().then(()=>Se());var Ie={InitializationError:Q,URLOpenError:R,UserNotSelectedError:Z},Be=w({version:be.version,OS:I,Engine:ne,Appearance:k,Theme:qe,App:re,Camera:ce,Messenger:le,Geolocation:ue,Error:Ie});typeof globalThis<"u"&&(globalThis.Native=Be);
2
2
  //# sourceMappingURL=index.cjs.map