New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@openhps/capacitor-geolocation

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openhps/capacitor-geolocation - npm Package Compare versions

Comparing version 0.1.17 to 0.1.18

dist/web/966.openhps-capacitor-geolocation.es.min.js

10

dist/web/node_modules_capacitor_geolocation_dist_esm_web_js.openhps-capacitor-geolocation.es.js
(self["webpackChunk_openhps_capacitor_geolocation"] = self["webpackChunk_openhps_capacitor_geolocation"] || []).push([["node_modules_capacitor_geolocation_dist_esm_web_js"],{
/***/ "./node_modules/@capacitor/geolocation/dist/esm/web.js":
/*!*************************************************************!*\
!*** ./node_modules/@capacitor/geolocation/dist/esm/web.js ***!
\*************************************************************/
/***/ "../../node_modules/@capacitor/geolocation/dist/esm/web.js":
/*!*****************************************************************!*\
!*** ../../node_modules/@capacitor/geolocation/dist/esm/web.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

@@ -14,3 +14,3 @@

/* harmony export */ });
/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @capacitor/core */ "./node_modules/@capacitor/core/dist/index.js");
/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @capacitor/core */ "../../node_modules/@capacitor/core/dist/index.js");

@@ -17,0 +17,0 @@ class GeolocationWeb extends _capacitor_core__WEBPACK_IMPORTED_MODULE_0__.WebPlugin {

"use strict";
((typeof self !== 'undefined' ? self : this)["webpackChunkOpenHPS_geolocation"] = (typeof self !== 'undefined' ? self : this)["webpackChunkOpenHPS_geolocation"] || []).push([["node_modules_capacitor_geolocation_dist_esm_web_js"],{
/***/ "./node_modules/@capacitor/geolocation/dist/esm/web.js":
/*!*************************************************************!*\
!*** ./node_modules/@capacitor/geolocation/dist/esm/web.js ***!
\*************************************************************/
/***/ "../../node_modules/@capacitor/geolocation/dist/esm/web.js":
/*!*****************************************************************!*\
!*** ../../node_modules/@capacitor/geolocation/dist/esm/web.js ***!
\*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

@@ -15,3 +15,3 @@

/* harmony export */ });
/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @capacitor/core */ "./node_modules/@capacitor/core/dist/index.js");
/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @capacitor/core */ "../../node_modules/@capacitor/core/dist/index.js");

@@ -18,0 +18,0 @@ class GeolocationWeb extends _capacitor_core__WEBPACK_IMPORTED_MODULE_0__.WebPlugin {

@@ -14,3 +14,3 @@ import * as __WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__ from "./openhps-core.es.js";

/* harmony import */ var _openhps_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @openhps/core */ "@openhps/core");
/* harmony import */ var _capacitor_geolocation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @capacitor/geolocation */ "./node_modules/@capacitor/geolocation/dist/esm/index.js");
/* harmony import */ var _capacitor_geolocation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @capacitor/geolocation */ "../../node_modules/@capacitor/geolocation/dist/esm/index.js");

@@ -106,6 +106,6 @@

/***/ "./node_modules/@capacitor/core/dist/index.js":
/*!****************************************************!*\
!*** ./node_modules/@capacitor/core/dist/index.js ***!
\****************************************************/
/***/ "../../node_modules/@capacitor/core/dist/index.js":
/*!********************************************************!*\
!*** ../../node_modules/@capacitor/core/dist/index.js ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

@@ -687,3 +687,4 @@

}
else if (type.includes('multipart/form-data')) {
else if (type.includes('multipart/form-data') ||
options.data instanceof FormData) {
const form = new FormData();

@@ -804,6 +805,6 @@ if (options.data instanceof FormData) {

/***/ "./node_modules/@capacitor/geolocation/dist/esm/definitions.js":
/*!*********************************************************************!*\
!*** ./node_modules/@capacitor/geolocation/dist/esm/definitions.js ***!
\*********************************************************************/
/***/ "../../node_modules/@capacitor/geolocation/dist/esm/definitions.js":
/*!*************************************************************************!*\
!*** ../../node_modules/@capacitor/geolocation/dist/esm/definitions.js ***!
\*************************************************************************/
/***/ (() => {

@@ -816,6 +817,6 @@

/***/ "./node_modules/@capacitor/geolocation/dist/esm/index.js":
/*!***************************************************************!*\
!*** ./node_modules/@capacitor/geolocation/dist/esm/index.js ***!
\***************************************************************/
/***/ "../../node_modules/@capacitor/geolocation/dist/esm/index.js":
/*!*******************************************************************!*\
!*** ../../node_modules/@capacitor/geolocation/dist/esm/index.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

@@ -826,7 +827,7 @@

/* harmony export */ });
/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @capacitor/core */ "./node_modules/@capacitor/core/dist/index.js");
/* harmony import */ var _definitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./definitions */ "./node_modules/@capacitor/geolocation/dist/esm/definitions.js");
/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @capacitor/core */ "../../node_modules/@capacitor/core/dist/index.js");
/* harmony import */ var _definitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./definitions */ "../../node_modules/@capacitor/geolocation/dist/esm/definitions.js");
const Geolocation = (0,_capacitor_core__WEBPACK_IMPORTED_MODULE_0__.registerPlugin)('Geolocation', {
web: () => __webpack_require__.e(/*! import() */ "node_modules_capacitor_geolocation_dist_esm_web_js").then(__webpack_require__.bind(__webpack_require__, /*! ./web */ "./node_modules/@capacitor/geolocation/dist/esm/web.js")).then(m => new m.GeolocationWeb()),
web: () => __webpack_require__.e(/*! import() */ "node_modules_capacitor_geolocation_dist_esm_web_js").then(__webpack_require__.bind(__webpack_require__, /*! ./web */ "../../node_modules/@capacitor/geolocation/dist/esm/web.js")).then(m => new m.GeolocationWeb()),
});

@@ -845,5 +846,7 @@

var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
var y = x => () => x
module.exports = x({ ["Accuracy2D"]: () => __WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.Accuracy2D, ["AngleUnit"]: () => __WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.AngleUnit, ["DataFrame"]: () => __WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.DataFrame, ["DataObject"]: () => __WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.DataObject, ["GeographicalPosition"]: () => __WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.GeographicalPosition, ["LengthUnit"]: () => __WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.LengthUnit, ["LinearVelocity"]: () => __WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.LinearVelocity, ["Orientation"]: () => __WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.Orientation, ["SourceNode"]: () => __WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.SourceNode });
var x = (y) => {
var x = {}; __webpack_require__.d(x, y); return x
}
var y = (x) => (() => (x))
module.exports = x({ ["Accuracy2D"]: () => (__WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.Accuracy2D), ["AngleUnit"]: () => (__WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.AngleUnit), ["DataFrame"]: () => (__WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.DataFrame), ["DataObject"]: () => (__WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.DataObject), ["GeographicalPosition"]: () => (__WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.GeographicalPosition), ["LengthUnit"]: () => (__WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.LengthUnit), ["LinearVelocity"]: () => (__WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.LinearVelocity), ["Orientation"]: () => (__WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.Orientation), ["SourceNode"]: () => (__WEBPACK_EXTERNAL_MODULE__openhps_core_es_js_870a26f4__.SourceNode) });

@@ -850,0 +853,0 @@ /***/ })

/*! For license information please see openhps-capacitor-geolocation.es.min.js.LICENSE.txt */
import*as e from"./openhps-core.es.min.js";var t,n,o={895:(e,t,n)=>{n.d(t,{Uw:()=>WebPlugin,fo:()=>a});const o=(e=>e.CapacitorPlatforms=(e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t};return n.addPlatform=(e,t)=>{n.platforms.set(e,t)},n.setPlatform=e=>{n.platforms.has(e)&&(n.currentPlatform=n.platforms.get(e))},n})(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{});o.addPlatform,o.setPlatform;var r;!function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"}(r||(r={}));class CapacitorException extends Error{constructor(e,t,n){super(e),this.message=e,this.code=t,this.data=n}}const i=e=>{var t,n,o,i,s;const a=e.CapacitorCustomPlatform||null,c=e.Capacitor||{},l=c.Plugins=c.Plugins||{},d=e.CapacitorPlatforms,u=(null===(t=null==d?void 0:d.currentPlatform)||void 0===t?void 0:t.getPlatform)||(()=>null!==a?a.name:(e=>{var t,n;return(null==e?void 0:e.androidBridge)?"android":(null===(n=null===(t=null==e?void 0:e.webkit)||void 0===t?void 0:t.messageHandlers)||void 0===n?void 0:n.bridge)?"ios":"web"})(e)),p=(null===(n=null==d?void 0:d.currentPlatform)||void 0===n?void 0:n.isNativePlatform)||(()=>"web"!==u()),m=(null===(o=null==d?void 0:d.currentPlatform)||void 0===o?void 0:o.isPluginAvailable)||(e=>{const t=g.get(e);return!!(null==t?void 0:t.platforms.has(u()))||!!h(e)}),h=(null===(i=null==d?void 0:d.currentPlatform)||void 0===i?void 0:i.getPluginHeader)||(e=>{var t;return null===(t=c.PluginHeaders)||void 0===t?void 0:t.find((t=>t.name===e))}),g=new Map,f=(null===(s=null==d?void 0:d.currentPlatform)||void 0===s?void 0:s.registerPlugin)||((e,t={})=>{const n=g.get(e);if(n)return console.warn(`Capacitor plugin "${e}" already registered. Cannot register plugins twice.`),n.proxy;const o=u(),i=h(e);let s;const d=n=>{let l;const d=(...d)=>{const u=(async()=>(!s&&o in t?s=s="function"==typeof t[o]?await t[o]():t[o]:null!==a&&!s&&"web"in t&&(s=s="function"==typeof t.web?await t.web():t.web),s))().then((t=>{const s=((t,n)=>{var s,a;if(!i){if(t)return null===(a=t[n])||void 0===a?void 0:a.bind(t);throw new CapacitorException(`"${e}" plugin is not implemented on ${o}`,r.Unimplemented)}{const o=null==i?void 0:i.methods.find((e=>n===e.name));if(o)return"promise"===o.rtype?t=>c.nativePromise(e,n.toString(),t):(t,o)=>c.nativeCallback(e,n.toString(),t,o);if(t)return null===(s=t[n])||void 0===s?void 0:s.bind(t)}})(t,n);if(s){const e=s(...d);return l=null==e?void 0:e.remove,e}throw new CapacitorException(`"${e}.${n}()" is not implemented on ${o}`,r.Unimplemented)}));return"addListener"===n&&(u.remove=async()=>l()),u};return d.toString=()=>`${n.toString()}() { [capacitor code] }`,Object.defineProperty(d,"name",{value:n,writable:!1,configurable:!1}),d},p=d("addListener"),m=d("removeListener"),f=(e,t)=>{const n=p({eventName:e},t),o=async()=>{const o=await n;m({eventName:e,callbackId:o},t)},r=new Promise((e=>n.then((()=>e({remove:o})))));return r.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await o()},r},w=new Proxy({},{get(e,t){switch(t){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return i?f:p;case"removeListener":return m;default:return d(t)}}});return l[e]=w,g.set(e,{name:e,proxy:w,platforms:new Set([...Object.keys(t),...i?[o]:[]])}),w});return c.convertFileSrc||(c.convertFileSrc=e=>e),c.getPlatform=u,c.handleError=t=>e.console.error(t),c.isNativePlatform=p,c.isPluginAvailable=m,c.pluginMethodNoop=(e,t,n)=>Promise.reject(`${n} does not have an implementation of "${t}".`),c.registerPlugin=f,c.Exception=CapacitorException,c.DEBUG=!!c.DEBUG,c.isLoggingEnabled=!!c.isLoggingEnabled,c.platform=c.getPlatform(),c.isNative=c.isNativePlatform(),c},s=(e=>e.Capacitor=i(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{}),a=s.registerPlugin;s.Plugins;class WebPlugin{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const o=async()=>this.removeListener(e,t),r=Promise.resolve({remove:o});return Object.defineProperty(r,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await o()}}),r}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t){const n=this.listeners[e];n&&n.forEach((e=>e(t)))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:e=>{this.notifyListeners(t,e)}}}unimplemented(e="not implemented"){return new s.Exception(e,r.Unimplemented)}unavailable(e="not available"){return new s.Exception(e,r.Unavailable)}async removeListener(e,t){const n=this.listeners[e];if(!n)return;const o=n.indexOf(t);this.listeners[e].splice(o,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const c=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),l=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class CapacitorCookiesPluginWeb extends WebPlugin{async getCookies(){const e=document.cookie,t={};return e.split(";").forEach((e=>{if(e.length<=0)return;let[n,o]=e.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");n=l(n).trim(),o=l(o).trim(),t[n]=o})),t}async setCookie(e){try{const t=c(e.key),n=c(e.value),o=`; expires=${(e.expires||"").replace("expires=","")}`,r=(e.path||"/").replace("path=",""),i=null!=e.url&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${t}=${n||""}${o}; path=${r}; ${i};`}catch(e){return Promise.reject(e)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(e){return Promise.reject(e)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const t of e)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}a("CapacitorCookies",{web:()=>new CapacitorCookiesPluginWeb});const d=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=((e={})=>{const t=Object.keys(e);return Object.keys(e).map((e=>e.toLocaleLowerCase())).reduce(((n,o,r)=>(n[o]=e[t[r]],n)),{})})(e.headers)["content-type"]||"";if("string"==typeof e.data)n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const t=new URLSearchParams;for(const[n,o]of Object.entries(e.data||{}))t.set(n,o);n.body=t.toString()}else if(o.includes("multipart/form-data")){const t=new FormData;if(e.data instanceof FormData)e.data.forEach(((e,n)=>{t.append(n,e)}));else for(const n of Object.keys(e.data))t.append(n,e.data[n]);n.body=t;const o=new Headers(n.headers);o.delete("content-type"),n.headers=o}else(o.includes("application/json")||"object"==typeof e.data)&&(n.body=JSON.stringify(e.data));return n};class CapacitorHttpPluginWeb extends WebPlugin{async request(e){const t=d(e,e.webFetchExtra),n=((e,t=!0)=>e?Object.entries(e).reduce(((e,n)=>{const[o,r]=n;let i,s;return Array.isArray(r)?(s="",r.forEach((e=>{i=t?encodeURIComponent(e):e,s+=`${o}=${i}&`})),s.slice(0,-1)):(i=t?encodeURIComponent(r):r,s=`${o}=${i}`),`${e}&${s}`}),"").substr(1):null)(e.params,e.shouldEncodeUrlParams),o=n?`${e.url}?${n}`:e.url,r=await fetch(o,t),i=r.headers.get("content-type")||"";let s,a,{responseType:c="text"}=r.ok?e:{};switch(i.includes("application/json")&&(c="json"),c){case"arraybuffer":case"blob":a=await r.blob(),s=await(async e=>new Promise(((t,n)=>{const o=new FileReader;o.onload=()=>{const e=o.result;t(e.indexOf(",")>=0?e.split(",")[1]:e)},o.onerror=e=>n(e),o.readAsDataURL(e)})))(a);break;case"json":s=await r.json();break;default:s=await r.text()}const l={};return r.headers.forEach(((e,t)=>{l[t]=e})),{data:s,headers:l,status:r.status,url:r.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}a("CapacitorHttp",{web:()=>new CapacitorHttpPluginWeb})}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return o[e](n,n.exports,i),n.exports}i.m=o,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>"web/"+e+".openhps-capacitor-geolocation.es.min.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="@openhps/capacitor-geolocation:",i.l=(e,o,r,s)=>{if(t[e])t[e].push(o);else{var a,c;if(void 0!==r)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+r){a=u;break}}a||(c=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.setAttribute("data-webpack",n+r),a.src=e),t[e]=[o];var p=(n,o)=>{a.onerror=a.onload=null,clearTimeout(m);var r=t[e];if(delete t[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(o))),n)return n(o)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),c&&document.head.appendChild(a)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e+"../"})(),(()=>{var e={179:0};i.f.j=(t,n)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var r=new Promise(((n,r)=>o=e[t]=[n,r]));n.push(o[2]=r);var s=i.p+i.u(t),a=new Error;i.l(s,(n=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var r=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+r+": "+s+")",a.name="ChunkLoadError",a.type=r,a.request=s,o[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var o,r,[s,a,c]=n,l=0;if(s.some((t=>0!==e[t]))){for(o in a)i.o(a,o)&&(i.m[o]=a[o]);if(c)c(i)}for(t&&t(n);l<s.length;l++)r=s[l],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=self.webpackChunk_openhps_capacitor_geolocation=self.webpackChunk_openhps_capacitor_geolocation||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var s={};(()=>{i.d(s,{R:()=>GeolocationSourceNode});const t=(e=>{var t={};return i.d(t,e),t})({Accuracy2D:()=>e.Accuracy2D,AngleUnit:()=>e.AngleUnit,DataFrame:()=>e.DataFrame,DataObject:()=>e.DataObject,GeographicalPosition:()=>e.GeographicalPosition,LengthUnit:()=>e.LengthUnit,LinearVelocity:()=>e.LinearVelocity,Orientation:()=>e.Orientation,SourceNode:()=>e.SourceNode});const n=(0,i(895).fo)("Geolocation",{web:()=>i.e(642).then(i.bind(i,642)).then((e=>new e.GeolocationWeb))});class GeolocationSourceNode extends t.SourceNode{constructor(e){var n;super(e),this.options.interval=this.options.interval||1e3,this.options.autoStart&&this.once("build",this.start.bind(this)),this.options.source=null!==(n=this.source)&&void 0!==n?n:new t.DataObject}static checkPermissions(){return n.checkPermissions()}static requestPermissions(){return n.requestPermissions({permissions:["location"]})}start(){return new Promise(((e,o)=>{n.watchPosition({maximumAge:this.options.interval,timeout:this.options.timeout,enableHighAccuracy:!0},(e=>{const n=this._convertPosition(e);this.source.setPosition(n),this.push(new t.DataFrame(this.source))})).then((e=>{this._watchId=e})).catch((e=>{this.logger("error","Unable to watch for position changes!",e),o(e)})),e()}))}_convertPosition(e){const n=new t.GeographicalPosition;return n.accuracy=new t.Accuracy2D(e.coords.accuracy,e.coords.altitudeAccuracy,t.LengthUnit.METER),n.altitude=e.coords.altitude,n.latitude=e.coords.latitude,n.longitude=e.coords.longitude,e.coords.speed&&(n.linearVelocity=new t.LinearVelocity(e.coords.speed)),e.coords.heading&&(n.orientation=t.Orientation.fromEuler({yaw:e.coords.heading,pitch:0,roll:0,unit:t.AngleUnit.DEGREE})),n}stop(){return new Promise((e=>{n.clearWatch({id:this._watchId}),e()}))}onPull(){return new Promise(((e,o)=>{n.getCurrentPosition({enableHighAccuracy:!0,timeout:this.options.timeout}).then((n=>{const o=this._convertPosition(n);this.source.setPosition(o),e(new t.DataFrame(this.source))})).catch(o)}))}}})();var a=s.R;export{a as GeolocationSourceNode};
import*as e from"./openhps-core.es.min.js";var t,n,o={629:(e,t,n)=>{n.d(t,{E_:()=>WebPlugin,F3:()=>s});const o=(e=>e.CapacitorPlatforms=(e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t};return n.addPlatform=(e,t)=>{n.platforms.set(e,t)},n.setPlatform=e=>{n.platforms.has(e)&&(n.currentPlatform=n.platforms.get(e))},n})(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{});o.addPlatform,o.setPlatform;var r;!function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"}(r||(r={}));class CapacitorException extends Error{constructor(e,t,n){super(e),this.message=e,this.code=t,this.data=n}}const i=e=>{var t,n,o,i,a;const s=e.CapacitorCustomPlatform||null,c=e.Capacitor||{},l=c.Plugins=c.Plugins||{},d=e.CapacitorPlatforms,u=(null===(t=null==d?void 0:d.currentPlatform)||void 0===t?void 0:t.getPlatform)||(()=>null!==s?s.name:(e=>{var t,n;return(null==e?void 0:e.androidBridge)?"android":(null===(n=null===(t=null==e?void 0:e.webkit)||void 0===t?void 0:t.messageHandlers)||void 0===n?void 0:n.bridge)?"ios":"web"})(e)),p=(null===(n=null==d?void 0:d.currentPlatform)||void 0===n?void 0:n.isNativePlatform)||(()=>"web"!==u()),m=(null===(o=null==d?void 0:d.currentPlatform)||void 0===o?void 0:o.isPluginAvailable)||(e=>{const t=g.get(e);return!!(null==t?void 0:t.platforms.has(u()))||!!h(e)}),h=(null===(i=null==d?void 0:d.currentPlatform)||void 0===i?void 0:i.getPluginHeader)||(e=>{var t;return null===(t=c.PluginHeaders)||void 0===t?void 0:t.find((t=>t.name===e))}),g=new Map,f=(null===(a=null==d?void 0:d.currentPlatform)||void 0===a?void 0:a.registerPlugin)||((e,t={})=>{const n=g.get(e);if(n)return console.warn(`Capacitor plugin "${e}" already registered. Cannot register plugins twice.`),n.proxy;const o=u(),i=h(e);let a;const d=n=>{let l;const d=(...d)=>{const u=(async()=>(!a&&o in t?a=a="function"==typeof t[o]?await t[o]():t[o]:null!==s&&!a&&"web"in t&&(a=a="function"==typeof t.web?await t.web():t.web),a))().then((t=>{const a=((t,n)=>{var a,s;if(!i){if(t)return null===(s=t[n])||void 0===s?void 0:s.bind(t);throw new CapacitorException(`"${e}" plugin is not implemented on ${o}`,r.Unimplemented)}{const o=null==i?void 0:i.methods.find((e=>n===e.name));if(o)return"promise"===o.rtype?t=>c.nativePromise(e,n.toString(),t):(t,o)=>c.nativeCallback(e,n.toString(),t,o);if(t)return null===(a=t[n])||void 0===a?void 0:a.bind(t)}})(t,n);if(a){const e=a(...d);return l=null==e?void 0:e.remove,e}throw new CapacitorException(`"${e}.${n}()" is not implemented on ${o}`,r.Unimplemented)}));return"addListener"===n&&(u.remove=async()=>l()),u};return d.toString=()=>`${n.toString()}() { [capacitor code] }`,Object.defineProperty(d,"name",{value:n,writable:!1,configurable:!1}),d},p=d("addListener"),m=d("removeListener"),f=(e,t)=>{const n=p({eventName:e},t),o=async()=>{const o=await n;m({eventName:e,callbackId:o},t)},r=new Promise((e=>n.then((()=>e({remove:o})))));return r.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await o()},r},w=new Proxy({},{get(e,t){switch(t){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return i?f:p;case"removeListener":return m;default:return d(t)}}});return l[e]=w,g.set(e,{name:e,proxy:w,platforms:new Set([...Object.keys(t),...i?[o]:[]])}),w});return c.convertFileSrc||(c.convertFileSrc=e=>e),c.getPlatform=u,c.handleError=t=>e.console.error(t),c.isNativePlatform=p,c.isPluginAvailable=m,c.pluginMethodNoop=(e,t,n)=>Promise.reject(`${n} does not have an implementation of "${t}".`),c.registerPlugin=f,c.Exception=CapacitorException,c.DEBUG=!!c.DEBUG,c.isLoggingEnabled=!!c.isLoggingEnabled,c.platform=c.getPlatform(),c.isNative=c.isNativePlatform(),c},a=(e=>e.Capacitor=i(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{}),s=a.registerPlugin;a.Plugins;class WebPlugin{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const o=async()=>this.removeListener(e,t),r=Promise.resolve({remove:o});return Object.defineProperty(r,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await o()}}),r}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t){const n=this.listeners[e];n&&n.forEach((e=>e(t)))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:e=>{this.notifyListeners(t,e)}}}unimplemented(e="not implemented"){return new a.Exception(e,r.Unimplemented)}unavailable(e="not available"){return new a.Exception(e,r.Unavailable)}async removeListener(e,t){const n=this.listeners[e];if(!n)return;const o=n.indexOf(t);this.listeners[e].splice(o,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const c=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),l=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class CapacitorCookiesPluginWeb extends WebPlugin{async getCookies(){const e=document.cookie,t={};return e.split(";").forEach((e=>{if(e.length<=0)return;let[n,o]=e.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");n=l(n).trim(),o=l(o).trim(),t[n]=o})),t}async setCookie(e){try{const t=c(e.key),n=c(e.value),o=`; expires=${(e.expires||"").replace("expires=","")}`,r=(e.path||"/").replace("path=",""),i=null!=e.url&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${t}=${n||""}${o}; path=${r}; ${i};`}catch(e){return Promise.reject(e)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(e){return Promise.reject(e)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const t of e)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}s("CapacitorCookies",{web:()=>new CapacitorCookiesPluginWeb});const d=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=((e={})=>{const t=Object.keys(e);return Object.keys(e).map((e=>e.toLocaleLowerCase())).reduce(((n,o,r)=>(n[o]=e[t[r]],n)),{})})(e.headers)["content-type"]||"";if("string"==typeof e.data)n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const t=new URLSearchParams;for(const[n,o]of Object.entries(e.data||{}))t.set(n,o);n.body=t.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const t=new FormData;if(e.data instanceof FormData)e.data.forEach(((e,n)=>{t.append(n,e)}));else for(const n of Object.keys(e.data))t.append(n,e.data[n]);n.body=t;const o=new Headers(n.headers);o.delete("content-type"),n.headers=o}else(o.includes("application/json")||"object"==typeof e.data)&&(n.body=JSON.stringify(e.data));return n};class CapacitorHttpPluginWeb extends WebPlugin{async request(e){const t=d(e,e.webFetchExtra),n=((e,t=!0)=>e?Object.entries(e).reduce(((e,n)=>{const[o,r]=n;let i,a;return Array.isArray(r)?(a="",r.forEach((e=>{i=t?encodeURIComponent(e):e,a+=`${o}=${i}&`})),a.slice(0,-1)):(i=t?encodeURIComponent(r):r,a=`${o}=${i}`),`${e}&${a}`}),"").substr(1):null)(e.params,e.shouldEncodeUrlParams),o=n?`${e.url}?${n}`:e.url,r=await fetch(o,t),i=r.headers.get("content-type")||"";let a,s,{responseType:c="text"}=r.ok?e:{};switch(i.includes("application/json")&&(c="json"),c){case"arraybuffer":case"blob":s=await r.blob(),a=await(async e=>new Promise(((t,n)=>{const o=new FileReader;o.onload=()=>{const e=o.result;t(e.indexOf(",")>=0?e.split(",")[1]:e)},o.onerror=e=>n(e),o.readAsDataURL(e)})))(s);break;case"json":a=await r.json();break;default:a=await r.text()}const l={};return r.headers.forEach(((e,t)=>{l[t]=e})),{data:a,headers:l,status:r.status,url:r.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}s("CapacitorHttp",{web:()=>new CapacitorHttpPluginWeb})}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return o[e](n,n.exports,i),n.exports}i.m=o,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>"web/"+e+".openhps-capacitor-geolocation.es.min.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="@openhps/capacitor-geolocation:",i.l=(e,o,r,a)=>{if(t[e])t[e].push(o);else{var s,c;if(void 0!==r)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+r){s=u;break}}s||(c=!0,(s=document.createElement("script")).type="module",s.charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",n+r),s.src=e),t[e]=[o];var p=(n,o)=>{s.onerror=s.onload=null,clearTimeout(m);var r=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((e=>e(o))),n)return n(o)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),c&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e+"../"})(),(()=>{var e={792:0};i.f.j=(t,n)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var r=new Promise(((n,r)=>o=e[t]=[n,r]));n.push(o[2]=r);var a=i.p+i.u(t),s=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var r=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",s.name="ChunkLoadError",s.type=r,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var o,r,[a,s,c]=n,l=0;if(a.some((t=>0!==e[t]))){for(o in s)i.o(s,o)&&(i.m[o]=s[o]);if(c)c(i)}for(t&&t(n);l<a.length;l++)r=a[l],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=self.webpackChunk_openhps_capacitor_geolocation=self.webpackChunk_openhps_capacitor_geolocation||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var a={};(()=>{i.d(a,{O:()=>GeolocationSourceNode});const t=(e=>{var t={};return i.d(t,e),t})({Accuracy2D:()=>e.Accuracy2D,AngleUnit:()=>e.AngleUnit,DataFrame:()=>e.DataFrame,DataObject:()=>e.DataObject,GeographicalPosition:()=>e.GeographicalPosition,LengthUnit:()=>e.LengthUnit,LinearVelocity:()=>e.LinearVelocity,Orientation:()=>e.Orientation,SourceNode:()=>e.SourceNode});const n=(0,i(629).F3)("Geolocation",{web:()=>i.e(966).then(i.bind(i,966)).then((e=>new e.GeolocationWeb))});class GeolocationSourceNode extends t.SourceNode{constructor(e){var n;super(e),this.options.interval=this.options.interval||1e3,this.options.autoStart&&this.once("build",this.start.bind(this)),this.options.source=null!==(n=this.source)&&void 0!==n?n:new t.DataObject}static checkPermissions(){return n.checkPermissions()}static requestPermissions(){return n.requestPermissions({permissions:["location"]})}start(){return new Promise(((e,o)=>{n.watchPosition({maximumAge:this.options.interval,timeout:this.options.timeout,enableHighAccuracy:!0},(e=>{const n=this._convertPosition(e);this.source.setPosition(n),this.push(new t.DataFrame(this.source))})).then((e=>{this._watchId=e})).catch((e=>{this.logger("error","Unable to watch for position changes!",e),o(e)})),e()}))}_convertPosition(e){const n=new t.GeographicalPosition;return n.accuracy=new t.Accuracy2D(e.coords.accuracy,e.coords.altitudeAccuracy,t.LengthUnit.METER),n.altitude=e.coords.altitude,n.latitude=e.coords.latitude,n.longitude=e.coords.longitude,e.coords.speed&&(n.linearVelocity=new t.LinearVelocity(e.coords.speed)),e.coords.heading&&(n.orientation=t.Orientation.fromEuler({yaw:e.coords.heading,pitch:0,roll:0,unit:t.AngleUnit.DEGREE})),n}stop(){return new Promise((e=>{n.clearWatch({id:this._watchId}),e()}))}onPull(){return new Promise(((e,o)=>{n.getCurrentPosition({enableHighAccuracy:!0,timeout:this.options.timeout}).then((n=>{const o=this._convertPosition(n);this.source.setPosition(o),e(new t.DataFrame(this.source))})).catch(o)}))}}})();var s=a.O;export{s as GeolocationSourceNode};
//# sourceMappingURL=openhps-capacitor-geolocation.es.min.js.map

@@ -25,3 +25,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

const core_1 = __webpack_require__(/*! @openhps/core */ "@openhps/core");
const geolocation_1 = __webpack_require__(/*! @capacitor/geolocation */ "./node_modules/@capacitor/geolocation/dist/esm/index.js");
const geolocation_1 = __webpack_require__(/*! @capacitor/geolocation */ "../../node_modules/@capacitor/geolocation/dist/esm/index.js");
/**

@@ -130,6 +130,6 @@ * Geolocation source node using @capacitor/geolocation.

/***/ "./node_modules/@capacitor/core/dist/index.js":
/*!****************************************************!*\
!*** ./node_modules/@capacitor/core/dist/index.js ***!
\****************************************************/
/***/ "../../node_modules/@capacitor/core/dist/index.js":
/*!********************************************************!*\
!*** ../../node_modules/@capacitor/core/dist/index.js ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

@@ -711,3 +711,4 @@

}
else if (type.includes('multipart/form-data')) {
else if (type.includes('multipart/form-data') ||
options.data instanceof FormData) {
const form = new FormData();

@@ -828,6 +829,6 @@ if (options.data instanceof FormData) {

/***/ "./node_modules/@capacitor/geolocation/dist/esm/definitions.js":
/*!*********************************************************************!*\
!*** ./node_modules/@capacitor/geolocation/dist/esm/definitions.js ***!
\*********************************************************************/
/***/ "../../node_modules/@capacitor/geolocation/dist/esm/definitions.js":
/*!*************************************************************************!*\
!*** ../../node_modules/@capacitor/geolocation/dist/esm/definitions.js ***!
\*************************************************************************/
/***/ (() => {

@@ -840,6 +841,6 @@

/***/ "./node_modules/@capacitor/geolocation/dist/esm/index.js":
/*!***************************************************************!*\
!*** ./node_modules/@capacitor/geolocation/dist/esm/index.js ***!
\***************************************************************/
/***/ "../../node_modules/@capacitor/geolocation/dist/esm/index.js":
/*!*******************************************************************!*\
!*** ../../node_modules/@capacitor/geolocation/dist/esm/index.js ***!
\*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

@@ -851,7 +852,7 @@

/* harmony export */ });
/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @capacitor/core */ "./node_modules/@capacitor/core/dist/index.js");
/* harmony import */ var _definitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./definitions */ "./node_modules/@capacitor/geolocation/dist/esm/definitions.js");
/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @capacitor/core */ "../../node_modules/@capacitor/core/dist/index.js");
/* harmony import */ var _definitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./definitions */ "../../node_modules/@capacitor/geolocation/dist/esm/definitions.js");
const Geolocation = (0,_capacitor_core__WEBPACK_IMPORTED_MODULE_0__.registerPlugin)('Geolocation', {
web: () => __webpack_require__.e(/*! import() */ "node_modules_capacitor_geolocation_dist_esm_web_js").then(__webpack_require__.bind(__webpack_require__, /*! ./web */ "./node_modules/@capacitor/geolocation/dist/esm/web.js")).then(m => new m.GeolocationWeb()),
web: () => __webpack_require__.e(/*! import() */ "node_modules_capacitor_geolocation_dist_esm_web_js").then(__webpack_require__.bind(__webpack_require__, /*! ./web */ "../../node_modules/@capacitor/geolocation/dist/esm/web.js")).then(m => new m.GeolocationWeb()),
});

@@ -1359,3 +1360,3 @@

/******/ var i = scripts.length - 1;
/******/ while (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;
/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
/******/ }

@@ -1362,0 +1363,0 @@ /******/ }

/*! For license information please see openhps-capacitor-geolocation.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@openhps/core")):"function"==typeof define&&define.amd?define("OpenHPS",["core"],t):"object"==typeof exports?exports.OpenHPS=t(require("@openhps/core")):(e.OpenHPS=e.OpenHPS||{},e.OpenHPS.geolocation=t(e.OpenHPS.core))}("undefined"!=typeof self?self:this,(e=>(()=>{"use strict";var t,n,r={629:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GeolocationSourceNode=void 0;const r=n(0),o=n(411);class GeolocationSourceNode extends r.SourceNode{constructor(e){var t;super(e),this.options.interval=this.options.interval||1e3,this.options.autoStart&&this.once("build",this.start.bind(this)),this.options.source=null!==(t=this.source)&&void 0!==t?t:new r.DataObject}static checkPermissions(){return o.Geolocation.checkPermissions()}static requestPermissions(){return o.Geolocation.requestPermissions({permissions:["location"]})}start(){return new Promise(((e,t)=>{o.Geolocation.watchPosition({maximumAge:this.options.interval,timeout:this.options.timeout,enableHighAccuracy:!0},(e=>{const t=this._convertPosition(e);this.source.setPosition(t),this.push(new r.DataFrame(this.source))})).then((e=>{this._watchId=e})).catch((e=>{this.logger("error","Unable to watch for position changes!",e),t(e)})),e()}))}_convertPosition(e){const t=new r.GeographicalPosition;return t.accuracy=new r.Accuracy2D(e.coords.accuracy,e.coords.altitudeAccuracy,r.LengthUnit.METER),t.altitude=e.coords.altitude,t.latitude=e.coords.latitude,t.longitude=e.coords.longitude,e.coords.speed&&(t.linearVelocity=new r.LinearVelocity(e.coords.speed)),e.coords.heading&&(t.orientation=r.Orientation.fromEuler({yaw:e.coords.heading,pitch:0,roll:0,unit:r.AngleUnit.DEGREE})),t}stop(){return new Promise((e=>{o.Geolocation.clearWatch({id:this._watchId}),e()}))}onPull(){return new Promise(((e,t)=>{o.Geolocation.getCurrentPosition({enableHighAccuracy:!0,timeout:this.options.timeout}).then((t=>{const n=this._convertPosition(t);this.source.setPosition(n),e(new r.DataFrame(this.source))})).catch(t)}))}}t.GeolocationSourceNode=GeolocationSourceNode},915:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});n(163).__exportStar(n(629),t)},895:(e,t,n)=>{n.d(t,{Uw:()=>WebPlugin,fo:()=>s});const r=(e=>e.CapacitorPlatforms=(e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t};return n.addPlatform=(e,t)=>{n.platforms.set(e,t)},n.setPlatform=e=>{n.platforms.has(e)&&(n.currentPlatform=n.platforms.get(e))},n})(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{});r.addPlatform,r.setPlatform;var o;!function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"}(o||(o={}));class CapacitorException extends Error{constructor(e,t,n){super(e),this.message=e,this.code=t,this.data=n}}const i=e=>{var t,n,r,i,a;const s=e.CapacitorCustomPlatform||null,c=e.Capacitor||{},l=c.Plugins=c.Plugins||{},u=e.CapacitorPlatforms,d=(null===(t=null==u?void 0:u.currentPlatform)||void 0===t?void 0:t.getPlatform)||(()=>null!==s?s.name:(e=>{var t,n;return(null==e?void 0:e.androidBridge)?"android":(null===(n=null===(t=null==e?void 0:e.webkit)||void 0===t?void 0:t.messageHandlers)||void 0===n?void 0:n.bridge)?"ios":"web"})(e)),f=(null===(n=null==u?void 0:u.currentPlatform)||void 0===n?void 0:n.isNativePlatform)||(()=>"web"!==d()),p=(null===(r=null==u?void 0:u.currentPlatform)||void 0===r?void 0:r.isPluginAvailable)||(e=>{const t=m.get(e);return!!(null==t?void 0:t.platforms.has(d()))||!!h(e)}),h=(null===(i=null==u?void 0:u.currentPlatform)||void 0===i?void 0:i.getPluginHeader)||(e=>{var t;return null===(t=c.PluginHeaders)||void 0===t?void 0:t.find((t=>t.name===e))}),m=new Map,y=(null===(a=null==u?void 0:u.currentPlatform)||void 0===a?void 0:a.registerPlugin)||((e,t={})=>{const n=m.get(e);if(n)return console.warn(`Capacitor plugin "${e}" already registered. Cannot register plugins twice.`),n.proxy;const r=d(),i=h(e);let a;const u=n=>{let l;const u=(...u)=>{const d=(async()=>(!a&&r in t?a=a="function"==typeof t[r]?await t[r]():t[r]:null!==s&&!a&&"web"in t&&(a=a="function"==typeof t.web?await t.web():t.web),a))().then((t=>{const a=((t,n)=>{var a,s;if(!i){if(t)return null===(s=t[n])||void 0===s?void 0:s.bind(t);throw new CapacitorException(`"${e}" plugin is not implemented on ${r}`,o.Unimplemented)}{const r=null==i?void 0:i.methods.find((e=>n===e.name));if(r)return"promise"===r.rtype?t=>c.nativePromise(e,n.toString(),t):(t,r)=>c.nativeCallback(e,n.toString(),t,r);if(t)return null===(a=t[n])||void 0===a?void 0:a.bind(t)}})(t,n);if(a){const e=a(...u);return l=null==e?void 0:e.remove,e}throw new CapacitorException(`"${e}.${n}()" is not implemented on ${r}`,o.Unimplemented)}));return"addListener"===n&&(d.remove=async()=>l()),d};return u.toString=()=>`${n.toString()}() { [capacitor code] }`,Object.defineProperty(u,"name",{value:n,writable:!1,configurable:!1}),u},f=u("addListener"),p=u("removeListener"),y=(e,t)=>{const n=f({eventName:e},t),r=async()=>{const r=await n;p({eventName:e,callbackId:r},t)},o=new Promise((e=>n.then((()=>e({remove:r})))));return o.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await r()},o},w=new Proxy({},{get(e,t){switch(t){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return i?y:f;case"removeListener":return p;default:return u(t)}}});return l[e]=w,m.set(e,{name:e,proxy:w,platforms:new Set([...Object.keys(t),...i?[r]:[]])}),w});return c.convertFileSrc||(c.convertFileSrc=e=>e),c.getPlatform=d,c.handleError=t=>e.console.error(t),c.isNativePlatform=f,c.isPluginAvailable=p,c.pluginMethodNoop=(e,t,n)=>Promise.reject(`${n} does not have an implementation of "${t}".`),c.registerPlugin=y,c.Exception=CapacitorException,c.DEBUG=!!c.DEBUG,c.isLoggingEnabled=!!c.isLoggingEnabled,c.platform=c.getPlatform(),c.isNative=c.isNativePlatform(),c},a=(e=>e.Capacitor=i(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{}),s=a.registerPlugin;a.Plugins;class WebPlugin{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const r=async()=>this.removeListener(e,t),o=Promise.resolve({remove:r});return Object.defineProperty(o,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await r()}}),o}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t){const n=this.listeners[e];n&&n.forEach((e=>e(t)))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:e=>{this.notifyListeners(t,e)}}}unimplemented(e="not implemented"){return new a.Exception(e,o.Unimplemented)}unavailable(e="not available"){return new a.Exception(e,o.Unavailable)}async removeListener(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);this.listeners[e].splice(r,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const c=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),l=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class CapacitorCookiesPluginWeb extends WebPlugin{async getCookies(){const e=document.cookie,t={};return e.split(";").forEach((e=>{if(e.length<=0)return;let[n,r]=e.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");n=l(n).trim(),r=l(r).trim(),t[n]=r})),t}async setCookie(e){try{const t=c(e.key),n=c(e.value),r=`; expires=${(e.expires||"").replace("expires=","")}`,o=(e.path||"/").replace("path=",""),i=null!=e.url&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${t}=${n||""}${r}; path=${o}; ${i};`}catch(e){return Promise.reject(e)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(e){return Promise.reject(e)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const t of e)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}s("CapacitorCookies",{web:()=>new CapacitorCookiesPluginWeb});const u=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),r=((e={})=>{const t=Object.keys(e);return Object.keys(e).map((e=>e.toLocaleLowerCase())).reduce(((n,r,o)=>(n[r]=e[t[o]],n)),{})})(e.headers)["content-type"]||"";if("string"==typeof e.data)n.body=e.data;else if(r.includes("application/x-www-form-urlencoded")){const t=new URLSearchParams;for(const[n,r]of Object.entries(e.data||{}))t.set(n,r);n.body=t.toString()}else if(r.includes("multipart/form-data")){const t=new FormData;if(e.data instanceof FormData)e.data.forEach(((e,n)=>{t.append(n,e)}));else for(const n of Object.keys(e.data))t.append(n,e.data[n]);n.body=t;const r=new Headers(n.headers);r.delete("content-type"),n.headers=r}else(r.includes("application/json")||"object"==typeof e.data)&&(n.body=JSON.stringify(e.data));return n};class CapacitorHttpPluginWeb extends WebPlugin{async request(e){const t=u(e,e.webFetchExtra),n=((e,t=!0)=>e?Object.entries(e).reduce(((e,n)=>{const[r,o]=n;let i,a;return Array.isArray(o)?(a="",o.forEach((e=>{i=t?encodeURIComponent(e):e,a+=`${r}=${i}&`})),a.slice(0,-1)):(i=t?encodeURIComponent(o):o,a=`${r}=${i}`),`${e}&${a}`}),"").substr(1):null)(e.params,e.shouldEncodeUrlParams),r=n?`${e.url}?${n}`:e.url,o=await fetch(r,t),i=o.headers.get("content-type")||"";let a,s,{responseType:c="text"}=o.ok?e:{};switch(i.includes("application/json")&&(c="json"),c){case"arraybuffer":case"blob":s=await o.blob(),a=await(async e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>{const e=r.result;t(e.indexOf(",")>=0?e.split(",")[1]:e)},r.onerror=e=>n(e),r.readAsDataURL(e)})))(s);break;case"json":a=await o.json();break;default:a=await o.text()}const l={};return o.headers.forEach(((e,t)=>{l[t]=e})),{data:a,headers:l,status:o.status,url:o.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}s("CapacitorHttp",{web:()=>new CapacitorHttpPluginWeb})},411:(e,t,n)=>{n.r(t),n.d(t,{Geolocation:()=>r});const r=(0,n(895).fo)("Geolocation",{web:()=>n.e(642).then(n.bind(n,642)).then((e=>new e.GeolocationWeb))})},163:(e,t,n)=>{n.r(t),n.d(t,{__assign:()=>i,__asyncDelegator:()=>E,__asyncGenerator:()=>j,__asyncValues:()=>S,__await:()=>O,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>$,__classPrivateFieldSet:()=>A,__createBinding:()=>y,__decorate:()=>s,__esDecorate:()=>l,__exportStar:()=>w,__extends:()=>o,__generator:()=>m,__importDefault:()=>L,__importStar:()=>k,__makeTemplateObject:()=>x,__metadata:()=>p,__param:()=>c,__propKey:()=>d,__read:()=>b,__rest:()=>a,__runInitializers:()=>u,__setFunctionName:()=>f,__spread:()=>g,__spreadArray:()=>_,__spreadArrays:()=>P,__values:()=>v});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function l(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var y=(0,n[p])("accessor"===c?{get:d.get,set:d.set}:d[l],h);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(d.get=s),(s=a(y.set))&&(d.set=s),(s=a(y.init))&&o.push(s)}else(s=a(y))&&("field"===c?o.push(s):d[l]=s)}u&&Object.defineProperty(u,r.name,d),f=!0}function u(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function m(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var y=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function w(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||y(t,e,n)}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function P(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function _(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function O(e){return this instanceof O?(this.v=e,this):new O(e)}function j(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof O?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function E(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:O(e[r](t)),done:!1}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=v(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var C=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&y(t,e,n);return C(t,e),t}function L(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function A(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function $(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},0:t=>{t.exports=e}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}return i.m=r,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>"web/"+e+".openhps-capacitor-geolocation.min.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="OpenHPS.geolocation:",i.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var s,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==n+o){s=d;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",n+o),s.src=e),t[e]=[r];var f=(n,r)=>{s.onerror=s.onload=null,clearTimeout(p);var o=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(r))),n)return n(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),c&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e+"../"})(),(()=>{var e={179:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var a=i.p+i.u(t),s=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[a,s,c]=n,l=0;if(a.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(c)c(i)}for(t&&t(n);l<a.length;l++)o=a[l],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=("undefined"!=typeof self?self:this).webpackChunkOpenHPS_geolocation=("undefined"!=typeof self?self:this).webpackChunkOpenHPS_geolocation||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i(915)})()));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@openhps/core")):"function"==typeof define&&define.amd?define("OpenHPS",["core"],t):"object"==typeof exports?exports.OpenHPS=t(require("@openhps/core")):(e.OpenHPS=e.OpenHPS||{},e.OpenHPS.geolocation=t(e.OpenHPS.core))}("undefined"!=typeof self?self:this,(e=>(()=>{"use strict";var t,n,r={908:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GeolocationSourceNode=void 0;const r=n(955),o=n(772);class GeolocationSourceNode extends r.SourceNode{constructor(e){var t;super(e),this.options.interval=this.options.interval||1e3,this.options.autoStart&&this.once("build",this.start.bind(this)),this.options.source=null!==(t=this.source)&&void 0!==t?t:new r.DataObject}static checkPermissions(){return o.Geolocation.checkPermissions()}static requestPermissions(){return o.Geolocation.requestPermissions({permissions:["location"]})}start(){return new Promise(((e,t)=>{o.Geolocation.watchPosition({maximumAge:this.options.interval,timeout:this.options.timeout,enableHighAccuracy:!0},(e=>{const t=this._convertPosition(e);this.source.setPosition(t),this.push(new r.DataFrame(this.source))})).then((e=>{this._watchId=e})).catch((e=>{this.logger("error","Unable to watch for position changes!",e),t(e)})),e()}))}_convertPosition(e){const t=new r.GeographicalPosition;return t.accuracy=new r.Accuracy2D(e.coords.accuracy,e.coords.altitudeAccuracy,r.LengthUnit.METER),t.altitude=e.coords.altitude,t.latitude=e.coords.latitude,t.longitude=e.coords.longitude,e.coords.speed&&(t.linearVelocity=new r.LinearVelocity(e.coords.speed)),e.coords.heading&&(t.orientation=r.Orientation.fromEuler({yaw:e.coords.heading,pitch:0,roll:0,unit:r.AngleUnit.DEGREE})),t}stop(){return new Promise((e=>{o.Geolocation.clearWatch({id:this._watchId}),e()}))}onPull(){return new Promise(((e,t)=>{o.Geolocation.getCurrentPosition({enableHighAccuracy:!0,timeout:this.options.timeout}).then((t=>{const n=this._convertPosition(t);this.source.setPosition(n),e(new r.DataFrame(this.source))})).catch(t)}))}}t.GeolocationSourceNode=GeolocationSourceNode},71:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});n(478).__exportStar(n(908),t)},629:(e,t,n)=>{n.d(t,{E_:()=>WebPlugin,F3:()=>s});const r=(e=>e.CapacitorPlatforms=(e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t};return n.addPlatform=(e,t)=>{n.platforms.set(e,t)},n.setPlatform=e=>{n.platforms.has(e)&&(n.currentPlatform=n.platforms.get(e))},n})(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{});r.addPlatform,r.setPlatform;var o;!function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"}(o||(o={}));class CapacitorException extends Error{constructor(e,t,n){super(e),this.message=e,this.code=t,this.data=n}}const i=e=>{var t,n,r,i,a;const s=e.CapacitorCustomPlatform||null,c=e.Capacitor||{},l=c.Plugins=c.Plugins||{},u=e.CapacitorPlatforms,d=(null===(t=null==u?void 0:u.currentPlatform)||void 0===t?void 0:t.getPlatform)||(()=>null!==s?s.name:(e=>{var t,n;return(null==e?void 0:e.androidBridge)?"android":(null===(n=null===(t=null==e?void 0:e.webkit)||void 0===t?void 0:t.messageHandlers)||void 0===n?void 0:n.bridge)?"ios":"web"})(e)),f=(null===(n=null==u?void 0:u.currentPlatform)||void 0===n?void 0:n.isNativePlatform)||(()=>"web"!==d()),p=(null===(r=null==u?void 0:u.currentPlatform)||void 0===r?void 0:r.isPluginAvailable)||(e=>{const t=m.get(e);return!!(null==t?void 0:t.platforms.has(d()))||!!h(e)}),h=(null===(i=null==u?void 0:u.currentPlatform)||void 0===i?void 0:i.getPluginHeader)||(e=>{var t;return null===(t=c.PluginHeaders)||void 0===t?void 0:t.find((t=>t.name===e))}),m=new Map,y=(null===(a=null==u?void 0:u.currentPlatform)||void 0===a?void 0:a.registerPlugin)||((e,t={})=>{const n=m.get(e);if(n)return console.warn(`Capacitor plugin "${e}" already registered. Cannot register plugins twice.`),n.proxy;const r=d(),i=h(e);let a;const u=n=>{let l;const u=(...u)=>{const d=(async()=>(!a&&r in t?a=a="function"==typeof t[r]?await t[r]():t[r]:null!==s&&!a&&"web"in t&&(a=a="function"==typeof t.web?await t.web():t.web),a))().then((t=>{const a=((t,n)=>{var a,s;if(!i){if(t)return null===(s=t[n])||void 0===s?void 0:s.bind(t);throw new CapacitorException(`"${e}" plugin is not implemented on ${r}`,o.Unimplemented)}{const r=null==i?void 0:i.methods.find((e=>n===e.name));if(r)return"promise"===r.rtype?t=>c.nativePromise(e,n.toString(),t):(t,r)=>c.nativeCallback(e,n.toString(),t,r);if(t)return null===(a=t[n])||void 0===a?void 0:a.bind(t)}})(t,n);if(a){const e=a(...u);return l=null==e?void 0:e.remove,e}throw new CapacitorException(`"${e}.${n}()" is not implemented on ${r}`,o.Unimplemented)}));return"addListener"===n&&(d.remove=async()=>l()),d};return u.toString=()=>`${n.toString()}() { [capacitor code] }`,Object.defineProperty(u,"name",{value:n,writable:!1,configurable:!1}),u},f=u("addListener"),p=u("removeListener"),y=(e,t)=>{const n=f({eventName:e},t),r=async()=>{const r=await n;p({eventName:e,callbackId:r},t)},o=new Promise((e=>n.then((()=>e({remove:r})))));return o.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await r()},o},w=new Proxy({},{get(e,t){switch(t){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return i?y:f;case"removeListener":return p;default:return u(t)}}});return l[e]=w,m.set(e,{name:e,proxy:w,platforms:new Set([...Object.keys(t),...i?[r]:[]])}),w});return c.convertFileSrc||(c.convertFileSrc=e=>e),c.getPlatform=d,c.handleError=t=>e.console.error(t),c.isNativePlatform=f,c.isPluginAvailable=p,c.pluginMethodNoop=(e,t,n)=>Promise.reject(`${n} does not have an implementation of "${t}".`),c.registerPlugin=y,c.Exception=CapacitorException,c.DEBUG=!!c.DEBUG,c.isLoggingEnabled=!!c.isLoggingEnabled,c.platform=c.getPlatform(),c.isNative=c.isNativePlatform(),c},a=(e=>e.Capacitor=i(e))("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{}),s=a.registerPlugin;a.Plugins;class WebPlugin{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const r=async()=>this.removeListener(e,t),o=Promise.resolve({remove:r});return Object.defineProperty(o,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await r()}}),o}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t){const n=this.listeners[e];n&&n.forEach((e=>e(t)))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:e=>{this.notifyListeners(t,e)}}}unimplemented(e="not implemented"){return new a.Exception(e,o.Unimplemented)}unavailable(e="not available"){return new a.Exception(e,o.Unavailable)}async removeListener(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);this.listeners[e].splice(r,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const c=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),l=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class CapacitorCookiesPluginWeb extends WebPlugin{async getCookies(){const e=document.cookie,t={};return e.split(";").forEach((e=>{if(e.length<=0)return;let[n,r]=e.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");n=l(n).trim(),r=l(r).trim(),t[n]=r})),t}async setCookie(e){try{const t=c(e.key),n=c(e.value),r=`; expires=${(e.expires||"").replace("expires=","")}`,o=(e.path||"/").replace("path=",""),i=null!=e.url&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${t}=${n||""}${r}; path=${o}; ${i};`}catch(e){return Promise.reject(e)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(e){return Promise.reject(e)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const t of e)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${(new Date).toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}s("CapacitorCookies",{web:()=>new CapacitorCookiesPluginWeb});const u=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),r=((e={})=>{const t=Object.keys(e);return Object.keys(e).map((e=>e.toLocaleLowerCase())).reduce(((n,r,o)=>(n[r]=e[t[o]],n)),{})})(e.headers)["content-type"]||"";if("string"==typeof e.data)n.body=e.data;else if(r.includes("application/x-www-form-urlencoded")){const t=new URLSearchParams;for(const[n,r]of Object.entries(e.data||{}))t.set(n,r);n.body=t.toString()}else if(r.includes("multipart/form-data")||e.data instanceof FormData){const t=new FormData;if(e.data instanceof FormData)e.data.forEach(((e,n)=>{t.append(n,e)}));else for(const n of Object.keys(e.data))t.append(n,e.data[n]);n.body=t;const r=new Headers(n.headers);r.delete("content-type"),n.headers=r}else(r.includes("application/json")||"object"==typeof e.data)&&(n.body=JSON.stringify(e.data));return n};class CapacitorHttpPluginWeb extends WebPlugin{async request(e){const t=u(e,e.webFetchExtra),n=((e,t=!0)=>e?Object.entries(e).reduce(((e,n)=>{const[r,o]=n;let i,a;return Array.isArray(o)?(a="",o.forEach((e=>{i=t?encodeURIComponent(e):e,a+=`${r}=${i}&`})),a.slice(0,-1)):(i=t?encodeURIComponent(o):o,a=`${r}=${i}`),`${e}&${a}`}),"").substr(1):null)(e.params,e.shouldEncodeUrlParams),r=n?`${e.url}?${n}`:e.url,o=await fetch(r,t),i=o.headers.get("content-type")||"";let a,s,{responseType:c="text"}=o.ok?e:{};switch(i.includes("application/json")&&(c="json"),c){case"arraybuffer":case"blob":s=await o.blob(),a=await(async e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>{const e=r.result;t(e.indexOf(",")>=0?e.split(",")[1]:e)},r.onerror=e=>n(e),r.readAsDataURL(e)})))(s);break;case"json":a=await o.json();break;default:a=await o.text()}const l={};return o.headers.forEach(((e,t)=>{l[t]=e})),{data:a,headers:l,status:o.status,url:o.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}s("CapacitorHttp",{web:()=>new CapacitorHttpPluginWeb})},772:(e,t,n)=>{n.r(t),n.d(t,{Geolocation:()=>r});const r=(0,n(629).F3)("Geolocation",{web:()=>n.e(966).then(n.bind(n,966)).then((e=>new e.GeolocationWeb))})},478:(e,t,n)=>{n.r(t),n.d(t,{__assign:()=>i,__asyncDelegator:()=>E,__asyncGenerator:()=>j,__asyncValues:()=>S,__await:()=>O,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>$,__classPrivateFieldSet:()=>A,__createBinding:()=>y,__decorate:()=>s,__esDecorate:()=>l,__exportStar:()=>w,__extends:()=>o,__generator:()=>m,__importDefault:()=>L,__importStar:()=>k,__makeTemplateObject:()=>x,__metadata:()=>p,__param:()=>c,__propKey:()=>d,__read:()=>b,__rest:()=>a,__runInitializers:()=>u,__setFunctionName:()=>f,__spread:()=>g,__spreadArray:()=>_,__spreadArrays:()=>P,__values:()=>v});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function l(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var y=(0,n[p])("accessor"===c?{get:d.get,set:d.set}:d[l],h);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(d.get=s),(s=a(y.set))&&(d.set=s),(s=a(y.init))&&o.push(s)}else(s=a(y))&&("field"===c?o.push(s):d[l]=s)}u&&Object.defineProperty(u,r.name,d),f=!0}function u(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function m(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var y=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function w(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||y(t,e,n)}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function P(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function _(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function O(e){return this instanceof O?(this.v=e,this):new O(e)}function j(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof O?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function E(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:O(e[r](t)),done:!1}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=v(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var C=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&y(t,e,n);return C(t,e),t}function L(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function A(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function $(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},955:t=>{t.exports=e}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}return i.m=r,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>"web/"+e+".openhps-capacitor-geolocation.min.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},n="OpenHPS.geolocation:",i.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var s,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==n+o){s=d;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",n+o),s.src=e),t[e]=[r];var f=(n,r)=>{s.onerror=s.onload=null,clearTimeout(p);var o=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(r))),n)return n(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),c&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e+"../"})(),(()=>{var e={792:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var a=i.p+i.u(t),s=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[a,s,c]=n,l=0;if(a.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(c)c(i)}for(t&&t(n);l<a.length;l++)o=a[l],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=("undefined"!=typeof self?self:this).webpackChunkOpenHPS_geolocation=("undefined"!=typeof self?self:this).webpackChunkOpenHPS_geolocation||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i(71)})()));
//# sourceMappingURL=openhps-capacitor-geolocation.min.js.map
{
"name": "@openhps/capacitor-geolocation",
"version": "0.1.17",
"version": "0.1.18",
"description": "Open Hybrid Positioning System - Web Geolocation API",

@@ -54,6 +54,6 @@ "author": "Maxim Van de Wynckel",

"devDependencies": {
"@capacitor/core": "^5.5.1",
"@capacitor/core": "^5.7.0",
"cross-env": "^7.0.3",
"@capacitor/geolocation": "^5.0.6"
"@capacitor/geolocation": "^5.0.7"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc