Add progressive web app companion for cross-platform access
Vite + TypeScript PWA that mirrors the Android app's core features: - Pre-processed shelter data (build-time UTM33N→WGS84 conversion) - Leaflet map with shelter markers, user location, and offline tiles - Canvas compass arrow (ported from DirectionArrowView.kt) - IndexedDB shelter cache with 7-day staleness check - Service worker with CacheFirst tiles and precached app shell - i18n for en, nb, nn (ported from Android strings.xml) - iOS/Android compass handling with low-pass filter - Respects user map interaction (no auto-snap on pan/zoom) - Build revision cache-breaker for reliable SW updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
46365b713b
commit
e8428de775
12051 changed files with 1799735 additions and 0 deletions
56
pwa/node_modules/es-abstract/2024/OrdinaryObjectCreate.js
generated
vendored
Normal file
56
pwa/node_modules/es-abstract/2024/OrdinaryObjectCreate.js
generated
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
|
||||
var $TypeError = require('es-errors/type');
|
||||
var $SyntaxError = require('es-errors/syntax');
|
||||
var isObject = require('es-object-atoms/isObject');
|
||||
|
||||
var IsArray = require('./IsArray');
|
||||
|
||||
var forEach = require('../helpers/forEach');
|
||||
|
||||
var SLOT = require('internal-slot');
|
||||
|
||||
var hasProto = require('has-proto')();
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-objectcreate
|
||||
|
||||
module.exports = function OrdinaryObjectCreate(proto) {
|
||||
if (proto !== null && !isObject(proto)) {
|
||||
throw new $TypeError('Assertion failed: `proto` must be null or an object');
|
||||
}
|
||||
var additionalInternalSlotsList = arguments.length < 2 ? [] : arguments[1];
|
||||
if (!IsArray(additionalInternalSlotsList)) {
|
||||
throw new $TypeError('Assertion failed: `additionalInternalSlotsList` must be an Array');
|
||||
}
|
||||
|
||||
// var internalSlotsList = ['[[Prototype]]', '[[Extensible]]']; // step 1
|
||||
// internalSlotsList.push(...additionalInternalSlotsList); // step 2
|
||||
// var O = MakeBasicObject(internalSlotsList); // step 3
|
||||
// setProto(O, proto); // step 4
|
||||
// return O; // step 5
|
||||
|
||||
var O;
|
||||
if (hasProto) {
|
||||
O = { __proto__: proto };
|
||||
} else if ($ObjectCreate) {
|
||||
O = $ObjectCreate(proto);
|
||||
} else {
|
||||
if (proto === null) {
|
||||
throw new $SyntaxError('native Object.create support is required to create null objects');
|
||||
}
|
||||
var T = function T() {};
|
||||
T.prototype = proto;
|
||||
O = new T();
|
||||
}
|
||||
|
||||
if (additionalInternalSlotsList.length > 0) {
|
||||
forEach(additionalInternalSlotsList, function (slot) {
|
||||
SLOT.set(O, slot, void undefined);
|
||||
});
|
||||
}
|
||||
|
||||
return O;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue