diff --git a/package-lock.json b/package-lock.json index e87ba2d..b3badc9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,14 +28,13 @@ "@suid/vite-plugin": "^0.1.3", "com-darryncampbell-cordova-plugin-intent": "^2.2.0", "cordova-plugin-fullscreen": "^1.3.0", - "exifreader": "^4.12.0", - "image-js": "^0.35.3", "isomorphic-xml2js": "^0.1.3", "lodash": "^4.17.21", "memoizee": "^0.4.15", "ol": "^7.3.0", "osmtogeojson": "^3.0.0-beta.5", "patch-package": "^6.5.1", + "piexifjs": "^1.0.6", "pluscodes": "^2.6.0", "pouchdb": "^8.0.1", "pouchdb-adapter-indexeddb": "^8.0.1", @@ -573,6 +572,7 @@ "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", + "dev": true, "dependencies": { "regenerator-runtime": "^0.13.11" }, @@ -1614,14 +1614,6 @@ "vite": "^4.0.0" } }, - "node_modules/@swiftcarrot/color-fns": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@swiftcarrot/color-fns/-/color-fns-3.2.0.tgz", - "integrity": "sha512-6SCpc4LwmGGqWHpBY9WaBzJwPF4nfgvFfejOX7Ub0kTehJysFkLUAvGID8zEx39n0pGlfr9pTiQE/7/buC7X5w==", - "dependencies": { - "@babel/runtime": "^7.10.3" - } - }, "node_modules/@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", @@ -2029,11 +2021,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" }, - "node_modules/@types/pako": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/pako/-/pako-1.0.4.tgz", - "integrity": "sha512-Z+5bJSm28EXBSUJEgx29ioWeEEHUh6TiMkZHDhLwjc9wVFH+ressbkmX6waUZc5R3Gobn4Qu5llGxaoflZ+yhA==" - }, "node_modules/@types/pouchdb": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/@types/pouchdb/-/pouchdb-6.4.0.tgz", @@ -2671,11 +2658,6 @@ "node": ">=0.6" } }, - "node_modules/blob-util": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", - "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==" - }, "node_modules/blueimp-md5": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", @@ -2977,11 +2959,6 @@ } ] }, - "node_modules/canny-edge-detector": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/canny-edge-detector/-/canny-edge-detector-1.0.0.tgz", - "integrity": "sha512-SpewmkHDE1PbJ1/AVAcpvZKOufYpUXT0euMvhb5C4Q83Q9XEOmSXC+yR7jl3F4Ae1Ev6OtQKbFgdcPrOdHjzQg==" - }, "node_modules/chai": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", @@ -3971,24 +3948,6 @@ "node": ">=6" } }, - "node_modules/exifreader": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/exifreader/-/exifreader-4.12.0.tgz", - "integrity": "sha512-aRSmNyw2c6f6qPK4jmC56W/5XePDN7LVwt8tQjgMchxoY3MCxqEToegirKdS7A3CYCWAOPehfypMZWGWxtLhzw==", - "hasInstallScript": true, - "optionalDependencies": { - "@xmldom/xmldom": "^0.7.8" - } - }, - "node_modules/exifreader/node_modules/@xmldom/xmldom": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.9.tgz", - "integrity": "sha512-yceMpm/xd4W2a85iqZyO09gTnHvXF6pyiWjD2jcOJs7hRoZtNNOO1eJlhHj1ixA+xip2hOyGn+LgcvLCMo5zXA==", - "optional": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/expect": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/expect/-/expect-29.3.1.tgz", @@ -4018,14 +3977,6 @@ "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" }, - "node_modules/fast-bmp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-bmp/-/fast-bmp-2.0.1.tgz", - "integrity": "sha512-MOSG2rHYJCjIfL3/Llseuj39yl5U3d3XLtWFLFm5ZSTublGEXyvNcwi4Npyv6nzDPRSbAP53rvVRUswgftWCcQ==", - "dependencies": { - "iobuffer": "^5.1.0" - } - }, "node_modules/fast-diff": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", @@ -4048,49 +3999,12 @@ "node": ">=8.6.0" } }, - "node_modules/fast-jpeg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fast-jpeg/-/fast-jpeg-1.0.1.tgz", - "integrity": "sha512-nyoYDzmdxgLOBfEhJGwYRsRLqGKziG/wic0SMct17dTVHkseTPvNwHCfihE47tcpGA1cTJO2MNsYYHezmkuA6w==", - "dependencies": { - "iobuffer": "^2.1.0", - "tiff": "^2.0.0" - } - }, - "node_modules/fast-jpeg/node_modules/iobuffer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/iobuffer/-/iobuffer-2.1.0.tgz", - "integrity": "sha512-0XZfU0STJ6NVHBZdMRPjF7jtkDEC5f4AxM/n5DSZOu11SQ+7tAl1csuEnEPoSPYWdaGZ/HOfn5Q837IEHddL2w==" - }, - "node_modules/fast-jpeg/node_modules/tiff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tiff/-/tiff-2.1.0.tgz", - "integrity": "sha512-Q4zLT4+Csn/ZhFVacYCAl+w/1J51NW/m2y2yx7Qxp/bsHYOEsK7+5JOID2kfk+EvsaF0LbA6ccAkqiuXOmAbYw==", - "dependencies": { - "iobuffer": "^2.1.0" - } - }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, - "node_modules/fast-list": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/fast-list/-/fast-list-1.0.3.tgz", - "integrity": "sha512-Lm56Ci3EqefHNdIneRFuzhpPcpVVBz9fgqVmG3UQIxAefJv1mEYsZ1WQLTWqmdqeGEwbI2t6fbZgp9TqTYARuA==" - }, - "node_modules/fast-png": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/fast-png/-/fast-png-6.1.0.tgz", - "integrity": "sha512-v8e/40RKZbE1mALigoqBOkYnemCVSMmVlGSz8fawZAZg5UQ9OZeR00L++CPvrhIGm2F6TxV5u9lbWD0oOJHcCw==", - "dependencies": { - "@types/pako": "^1.0.2", - "iobuffer": "^5.0.4", - "pako": "^2.0.4" - } - }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -4126,19 +4040,6 @@ "integrity": "sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw==", "dev": true }, - "node_modules/fft.js": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/fft.js/-/fft.js-4.0.4.tgz", - "integrity": "sha512-f9c00hphOgeQTlDyavwTtu6RiK8AIFjD6+jvXkNkpeQ7rirK3uFWVpalkoS4LAwbdX7mfZ8aoBfFVQX1Re/8aw==" - }, - "node_modules/file-type": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-10.11.0.tgz", - "integrity": "sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw==", - "engines": { - "node": ">=6" - } - }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -4491,11 +4392,6 @@ "node": ">=4" } }, - "node_modules/has-own": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-own/-/has-own-1.0.1.tgz", - "integrity": "sha512-RDKhzgQTQfMaLvIFhjahU+2gGnRBK6dYOd5Gd9BzkmnBneOCRYjRC003RIMrdAbH52+l+CnMS4bBCXGer8tEhg==" - }, "node_modules/has-property-descriptors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", @@ -4689,52 +4585,6 @@ } ] }, - "node_modules/image-js": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/image-js/-/image-js-0.35.3.tgz", - "integrity": "sha512-zwPOeWMGFKHhXMG75hySP3Cfbb/d0Tj+h4qW2ltQ60fgwxFTe18m6grPE5nFQuHY7arXQqVyttNge275TPjbng==", - "dependencies": { - "@swiftcarrot/color-fns": "^3.2.0", - "blob-util": "^2.0.2", - "canny-edge-detector": "^1.0.0", - "fast-bmp": "^2.0.1", - "fast-jpeg": "^1.0.1", - "fast-list": "^1.0.3", - "fast-png": "^6.1.0", - "has-own": "^1.0.1", - "image-type": "^4.1.0", - "is-array-type": "^1.0.0", - "is-integer": "^1.0.7", - "jpeg-js": "^0.4.3", - "js-priority-queue": "^0.1.5", - "js-quantities": "^1.7.6", - "median-quickselect": "^1.0.1", - "ml-convolution": "0.2.0", - "ml-disjoint-set": "^1.0.0", - "ml-matrix": "^6.8.0", - "ml-matrix-convolution": "0.4.3", - "ml-regression": "^5.0.0", - "monotone-chain-convex-hull": "^1.0.0", - "new-array": "^1.0.0", - "robust-point-in-polygon": "^1.0.3", - "tiff": "^5.0.2", - "web-worker-manager": "^0.2.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/image-type": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/image-type/-/image-type-4.1.0.tgz", - "integrity": "sha512-CFJMJ8QK8lJvRlTCEgarL4ro6hfDQKif2HjSvYCdQZESaIPV4v9imrf7BQHK+sQeTeNeMpWciR9hyC/g8ybXEg==", - "dependencies": { - "file-type": "^10.10.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/immediate": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", @@ -4813,16 +4663,6 @@ "node": ">= 0.10" } }, - "node_modules/iobuffer": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/iobuffer/-/iobuffer-5.3.2.tgz", - "integrity": "sha512-kO3CjNfLZ9t+tHxAMd+Xk4v3D/31E91rMs1dHrm7ikEQrlZ8mLDbQ4z3tZfDM48zOkReas2jx8MWSAmN9+c8Fw==" - }, - "node_modules/is-any-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-any-array/-/is-any-array-2.0.0.tgz", - "integrity": "sha512-WdPV58rT3aOWXvvyuBydnCq4S2BM1Yz8shKxlEpk/6x+GX202XRvXOycEFtNgnHVLoc46hpexPFx8Pz1/sMS0w==" - }, "node_modules/is-arguments": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", @@ -4853,11 +4693,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-array-type": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-array-type/-/is-array-type-1.0.0.tgz", - "integrity": "sha512-LLwKQdMAO/XUkq4XTed1VYqwR2OahiwkBg+yUtZT88LXX4MLXP28qGsVfSNVP8X0wc7fzDhcZD3nns/IK8UfKw==" - }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -4964,17 +4799,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -5012,14 +4836,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-integer": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.7.tgz", - "integrity": "sha512-RPQc/s9yBHSvpi+hs9dYiJ2cuFeU6x3TyyIp8O2H6SKEltIvJOzRj9ToyvcStDvPR/pS4rxgr1oBFajQjZ2Szg==", - "dependencies": { - "is-finite": "^1.0.0" - } - }, "node_modules/is-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", @@ -5612,21 +5428,6 @@ "node": ">=8" } }, - "node_modules/jpeg-js": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz", - "integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==" - }, - "node_modules/js-priority-queue": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/js-priority-queue/-/js-priority-queue-0.1.5.tgz", - "integrity": "sha512-2dPmJT4GbXUpob7AZDR1wFMKz3Biy6oW69mwt5PTtdeoOgDin1i0p5gUV9k0LFeUxDpwkfr+JGMZDpcprjiY5w==" - }, - "node_modules/js-quantities": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/js-quantities/-/js-quantities-1.7.6.tgz", - "integrity": "sha512-h6TH1xK1u/zdjD26M6kKVthZONJSDTIRzrohbqOILfJAyanWHGlJLWuAWkSMtqi8k/IxshStsc97Pkf8SL9yvA==" - }, "node_modules/js-string-escape": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", @@ -6351,11 +6152,6 @@ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" }, - "node_modules/median-quickselect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/median-quickselect/-/median-quickselect-1.0.1.tgz", - "integrity": "sha512-/QL9ptNuLsdA68qO+2o10TKCyu621zwwTFdLvtu8rzRNKsn8zvuGoq/vDxECPyELFG8wu+BpyoMR9BnsJqfVZQ==" - }, "node_modules/memoizee": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", @@ -6519,204 +6315,6 @@ "node": ">=10" } }, - "node_modules/ml-array-max": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/ml-array-max/-/ml-array-max-1.2.4.tgz", - "integrity": "sha512-BlEeg80jI0tW6WaPyGxf5Sa4sqvcyY6lbSn5Vcv44lp1I2GR6AWojfUvLnGTNsIXrZ8uqWmo8VcG1WpkI2ONMQ==", - "dependencies": { - "is-any-array": "^2.0.0" - } - }, - "node_modules/ml-array-median": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/ml-array-median/-/ml-array-median-1.1.6.tgz", - "integrity": "sha512-V6bV6bTPFRX8v5CaAx/7fuRXC39LLTHfPSVZZafdNaqNz2PFL5zEA7gesjv8dMXh+gwPeUMtB5QPovlTBaa4sw==", - "dependencies": { - "is-any-array": "^2.0.0", - "median-quickselect": "^1.0.1" - } - }, - "node_modules/ml-array-min": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/ml-array-min/-/ml-array-min-1.2.3.tgz", - "integrity": "sha512-VcZ5f3VZ1iihtrGvgfh/q0XlMobG6GQ8FsNyQXD3T+IlstDv85g8kfV0xUG1QPRO/t21aukaJowDzMTc7j5V6Q==", - "dependencies": { - "is-any-array": "^2.0.0" - } - }, - "node_modules/ml-array-rescale": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ml-array-rescale/-/ml-array-rescale-1.3.7.tgz", - "integrity": "sha512-48NGChTouvEo9KBctDfHC3udWnQKNKEWN0ziELvY3KG25GR5cA8K8wNVzracsqSW1QEkAXjTNx+ycgAv06/1mQ==", - "dependencies": { - "is-any-array": "^2.0.0", - "ml-array-max": "^1.2.4", - "ml-array-min": "^1.2.3" - } - }, - "node_modules/ml-convolution": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ml-convolution/-/ml-convolution-0.2.0.tgz", - "integrity": "sha512-km5f81jFVnEWG0eFEKAwt00X3xGUIAcUqZZlUk+w0q2sZOz1vkEYhIKOXAlmaEi9rnrTknxW//Ttm399zPzDPg==", - "dependencies": { - "fft.js": "^4.0.3", - "next-power-of-two": "^1.0.0" - } - }, - "node_modules/ml-disjoint-set": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ml-disjoint-set/-/ml-disjoint-set-1.0.0.tgz", - "integrity": "sha512-UcEzgvRzVhsKpT66syfdhaK8R+av6GxDFmU37t+6WClT/kHDIN6OMRfO7OPwQIV8+L8FSc2E6lNKpvdqf6OgLw==" - }, - "node_modules/ml-distance-euclidean": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ml-distance-euclidean/-/ml-distance-euclidean-2.0.0.tgz", - "integrity": "sha512-yC9/2o8QF0A3m/0IXqCTXCzz2pNEzvmcE/9HFKOZGnTjatvBbsn4lWYJkxENkA4Ug2fnYl7PXQxnPi21sgMy/Q==" - }, - "node_modules/ml-fft": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ml-fft/-/ml-fft-1.3.5.tgz", - "integrity": "sha512-laAATDyUuWPbIlX57thIds41wqFLsB+Zl7i1yrLRo/4CFg+hFaF9Xle8InblQseyiaVtt1KSlDG+6lgUMPOj3g==" - }, - "node_modules/ml-kernel": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ml-kernel/-/ml-kernel-3.0.0.tgz", - "integrity": "sha512-R+ZR0Kl5xJ7vnxtlDqjZ26xVk7mAw7ctK4NlzRHviBFXxp7keC9+hWirMOdzi2DOQA0t6CaRwjElZ6SdirOmow==", - "dependencies": { - "ml-distance-euclidean": "^2.0.0", - "ml-kernel-gaussian": "^2.0.2", - "ml-kernel-polynomial": "^2.0.1", - "ml-kernel-sigmoid": "^1.0.1", - "ml-matrix": "^6.1.2" - } - }, - "node_modules/ml-kernel-gaussian": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ml-kernel-gaussian/-/ml-kernel-gaussian-2.0.2.tgz", - "integrity": "sha512-5MBrH2g9MBO53I6mcyXvMhyOLsmO2w21+26A1ZV/vYoxqpsov2PWkT8bhdFCEe0kgDupmAb6u81iOID/rhnarA==", - "dependencies": { - "ml-distance-euclidean": "^2.0.0" - } - }, - "node_modules/ml-kernel-polynomial": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ml-kernel-polynomial/-/ml-kernel-polynomial-2.0.1.tgz", - "integrity": "sha512-aGDNRPHDiKeJmBxB0L9wTxKNLfp5JytbdRIo5K+FTcmFjkWDe3YZPo6R6wBB5mxaJ5eqTRawzeV4RoIWHbakyQ==" - }, - "node_modules/ml-kernel-sigmoid": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ml-kernel-sigmoid/-/ml-kernel-sigmoid-1.0.1.tgz", - "integrity": "sha512-mSbYOSbNQ7GsUAGrHuUHNsLgM3bZGpXkotw/FBdKZD9YMXfVOgQb1LvvvVeSlOR/ZdmX23qqaV0RnKSYWBF8og==" - }, - "node_modules/ml-matrix": { - "version": "6.10.4", - "resolved": "https://registry.npmjs.org/ml-matrix/-/ml-matrix-6.10.4.tgz", - "integrity": "sha512-rUyEhfNPzqFsltYwvjNeYQXlYEaVea3KgzcJKJteQUj2WVAGFx9fLNRjtMR9mg2B6bd5buxlmkZmxM4hmO+SKg==", - "dependencies": { - "is-any-array": "^2.0.0", - "ml-array-rescale": "^1.3.7" - } - }, - "node_modules/ml-matrix-convolution": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/ml-matrix-convolution/-/ml-matrix-convolution-0.4.3.tgz", - "integrity": "sha512-B4AATOjxDw4J0oVcoeYHsXrhMr31x9SWhVKZjWucDU+brwXLR0enMdqb1OuRy/REdpL5/iSshA46sS2B1dO2OQ==", - "dependencies": { - "ml-fft": "1.3.5", - "ml-stat": "^1.2.0" - } - }, - "node_modules/ml-regression": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ml-regression/-/ml-regression-5.0.0.tgz", - "integrity": "sha512-mBn0LpfEWV3Dk0dj+8PRNUqIHvO87rUY0PmCUTYv3MKfECx7TtlKyeacJeOBLZ4YAVixX8U5hn4HwRL6TpTYaw==", - "dependencies": { - "ml-kernel": "^3.0.0", - "ml-matrix": "^6.1.2", - "ml-regression-base": "^2.0.1", - "ml-regression-exponential": "^2.0.0", - "ml-regression-multivariate-linear": "^2.0.2", - "ml-regression-polynomial": "^2.0.0", - "ml-regression-power": "^2.0.0", - "ml-regression-robust-polynomial": "^2.0.0", - "ml-regression-simple-linear": "^2.0.2", - "ml-regression-theil-sen": "^2.0.0" - } - }, - "node_modules/ml-regression-base": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/ml-regression-base/-/ml-regression-base-2.1.6.tgz", - "integrity": "sha512-yTckvEc8szc6VrUTJSgAClShvCoPZdNt8pmyRe8aGsIWGjg6bYFotp9mDUwAB0snvKAbQWd6A4trL/PDCASLug==", - "dependencies": { - "is-any-array": "^2.0.0" - } - }, - "node_modules/ml-regression-exponential": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ml-regression-exponential/-/ml-regression-exponential-2.1.0.tgz", - "integrity": "sha512-6ZgGbzIkXnONfGGUU0LjIb9qb35WzVqdAFSX8vFr8UEhgXhfgEws9pGrBJu19VBEh7ZTtttcPObI3aoBscq4Kg==", - "dependencies": { - "ml-regression-base": "^2.1.3", - "ml-regression-simple-linear": "^2.0.3" - } - }, - "node_modules/ml-regression-multivariate-linear": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/ml-regression-multivariate-linear/-/ml-regression-multivariate-linear-2.0.4.tgz", - "integrity": "sha512-/vShPAlP+mB7P2mC5TuXwObSJNl/UBI71/bszt9ilTg6yLKy6btDLpAYyJNa6t+JnL5a7q+Yy4dCltfpvqXRIw==", - "dependencies": { - "ml-matrix": "^6.10.1" - } - }, - "node_modules/ml-regression-polynomial": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ml-regression-polynomial/-/ml-regression-polynomial-2.2.0.tgz", - "integrity": "sha512-WxFsEmi6oLxgq9TeaVoAA+vVUJFp1kGarX6WWClR8OmlanoIW5iLMnaeXfQcYuH8xNq4R1Cax2N9hYYmeWWkLg==", - "dependencies": { - "ml-matrix": "^6.8.0", - "ml-regression-base": "^2.1.3" - } - }, - "node_modules/ml-regression-power": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ml-regression-power/-/ml-regression-power-2.0.0.tgz", - "integrity": "sha512-u8O9Fy45+OeYm/4ZBcNDn5w3w+MHc6kZz/AWSJIwmJcyjz6PRkTZnNfgGYdVKwKKDlAOS7G/AFvMKSTWRNO4RQ==", - "dependencies": { - "ml-regression-base": "^2.0.1", - "ml-regression-simple-linear": "^2.0.2" - } - }, - "node_modules/ml-regression-robust-polynomial": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ml-regression-robust-polynomial/-/ml-regression-robust-polynomial-2.0.1.tgz", - "integrity": "sha512-WkxA224Cil1G3Ug/T1O8H/2IDADlca21oC5WDplcM+gQRTqtueT/Su4ubH70tG6s79XHM046HfO8xQSpDQxqqg==", - "dependencies": { - "ml-matrix": "^6.8.0", - "ml-regression-base": "^2.1.3" - } - }, - "node_modules/ml-regression-simple-linear": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/ml-regression-simple-linear/-/ml-regression-simple-linear-2.0.3.tgz", - "integrity": "sha512-xcLviI0Gqs0TXE5+QsPLbJm372RyZsX6xmsufez3Dz6vq/r10+KyOJ8JvUimhryKvPaZQvx6BTnzAfQbj/IeLQ==", - "dependencies": { - "ml-regression-base": "^2.0.1" - } - }, - "node_modules/ml-regression-theil-sen": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ml-regression-theil-sen/-/ml-regression-theil-sen-2.0.0.tgz", - "integrity": "sha512-RO//tYzo69XbWDO5LIPdGp8ef1MSTPPJY0bXNlmOLMSay7YR9FQqtNgqn29T9DSYTa863VAafRlCeXwDQNXkBw==", - "dependencies": { - "ml-array-median": "^1.1.1", - "ml-regression-base": "^2.0.1" - } - }, - "node_modules/ml-stat": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/ml-stat/-/ml-stat-1.3.3.tgz", - "integrity": "sha512-F6plydFIKFZA+7j/pRsRrfRu4nwsruQvYD9QxHWc4hFUdASVznsKUL2hgAwgMVizY/P0+b1L9bVQexKES5y/uw==" - }, "node_modules/mlly": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.2.0.tgz", @@ -6729,11 +6327,6 @@ "ufo": "^1.1.1" } }, - "node_modules/monotone-chain-convex-hull": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/monotone-chain-convex-hull/-/monotone-chain-convex-hull-1.1.0.tgz", - "integrity": "sha512-iZGaoO2qtqIWaAfscTtsH2LolE06U4JzTw8AgtjT/yzYIA0aoAHDdwBtsesnQXfVRvS375Wu0Y1+FqdI5Y22GA==" - }, "node_modules/mrmime": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", @@ -6789,16 +6382,6 @@ "node": ">=12.13.0" } }, - "node_modules/new-array": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/new-array/-/new-array-1.0.0.tgz", - "integrity": "sha512-K5AyFYbuHZ4e/ti52y7k18q8UHsS78FlRd85w2Fmsd6AkuLipDihPflKC0p3PN5i8II7+uHxo+CtkLiJDfmS5A==" - }, - "node_modules/next-power-of-two": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-power-of-two/-/next-power-of-two-1.0.0.tgz", - "integrity": "sha512-+z6QY1SxkDk6CQJAeaIZKmcNubBCRP7J8DMQUBglz/sSkNsZoJ1kULjqk9skNPPplzs4i9PFhYrvNDdtQleF/A==" - }, "node_modules/next-tick": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", @@ -7452,6 +7035,11 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/piexifjs": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/piexifjs/-/piexifjs-1.0.6.tgz", + "integrity": "sha512-0wVyH0cKohzBQ5Gi2V1BuxYpxWfxF3cSqfFXfPIpl5tl9XLS5z4ogqhUCD20AbHi0h9aJkqXNJnkVev6gwh2ag==" + }, "node_modules/pkg-types": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.2.tgz", @@ -7953,7 +7541,8 @@ "node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "dev": true }, "node_modules/regexp.prototype.flags": { "version": "1.4.3", @@ -8066,44 +7655,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/robust-orientation": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/robust-orientation/-/robust-orientation-1.2.1.tgz", - "integrity": "sha512-FuTptgKwY6iNuU15nrIJDLjXzCChWB+T4AvksRtwPS/WZ3HuP1CElCm1t+OBfgQKfWbtZIawip+61k7+buRKAg==", - "dependencies": { - "robust-scale": "^1.0.2", - "robust-subtract": "^1.0.0", - "robust-sum": "^1.0.0", - "two-product": "^1.0.2" - } - }, - "node_modules/robust-point-in-polygon": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/robust-point-in-polygon/-/robust-point-in-polygon-1.0.3.tgz", - "integrity": "sha512-pPzz7AevOOcPYnFv4Vs5L0C7BKOq6C/TfAw5EUE58CylbjGiPyMjAnPLzzSuPZ2zftUGwWbmLWPOjPOz61tAcA==", - "dependencies": { - "robust-orientation": "^1.0.2" - } - }, - "node_modules/robust-scale": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/robust-scale/-/robust-scale-1.0.2.tgz", - "integrity": "sha512-jBR91a/vomMAzazwpsPTPeuTPPmWBacwA+WYGNKcRGSh6xweuQ2ZbjRZ4v792/bZOhRKXRiQH0F48AvuajY0tQ==", - "dependencies": { - "two-product": "^1.0.2", - "two-sum": "^1.0.0" - } - }, - "node_modules/robust-subtract": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/robust-subtract/-/robust-subtract-1.0.0.tgz", - "integrity": "sha512-xhKUno+Rl+trmxAIVwjQMiVdpF5llxytozXJOdoT4eTIqmqsndQqFb1A0oiW3sZGlhMRhOi6pAD4MF1YYW6o/A==" - }, - "node_modules/robust-sum": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/robust-sum/-/robust-sum-1.0.0.tgz", - "integrity": "sha512-AvLExwpaqUqD1uwLU6MwzzfRdaI6VEZsyvQ3IAQ0ZJ08v1H+DTyqskrf2ZJyh0BDduFVLN7H04Zmc+qTiahhAw==" - }, "node_modules/rollup": { "version": "3.20.6", "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.6.tgz", @@ -8823,15 +8374,6 @@ "readable-stream": "3" } }, - "node_modules/tiff": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/tiff/-/tiff-5.0.3.tgz", - "integrity": "sha512-R0WckwRGhawWDNdha8iPQCjHyOiaEEmfFjhmalUVCIEELsON7Y/XO3eeGmBkoCXQp0Gg2nmTozN92Z4hlwbsow==", - "dependencies": { - "iobuffer": "^5.0.4", - "pako": "^2.0.4" - } - }, "node_modules/time-zone": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", @@ -8993,16 +8535,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" }, - "node_modules/two-product": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/two-product/-/two-product-1.0.2.tgz", - "integrity": "sha512-vOyrqmeYvzjToVM08iU52OFocWT6eB/I5LUWYnxeAPGXAhAxXYU/Yr/R2uY5/5n4bvJQL9AQulIuxpIsMoT8XQ==" - }, - "node_modules/two-sum": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/two-sum/-/two-sum-1.0.0.tgz", - "integrity": "sha512-phP48e8AawgsNUjEY2WvoIWqdie8PoiDZGxTDv70LDr01uX5wLEQbOgSP7Z/B6+SW5oLtbe8qaYX2fKJs3CGTw==" - }, "node_modules/type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", @@ -9526,11 +9058,6 @@ "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz", "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==" }, - "node_modules/web-worker-manager": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/web-worker-manager/-/web-worker-manager-0.2.0.tgz", - "integrity": "sha512-WmGabA4GLth1ju9VLm/oMDcPMhMngHoBSdY1OMhrEJvNsPl7z2p+7RBOXjEi5zlP0dK+Shd3Wm+BdD5WZrNYBA==" - }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", diff --git a/package.json b/package.json index bb00e55..b90d125 100644 --- a/package.json +++ b/package.json @@ -51,14 +51,13 @@ "@suid/vite-plugin": "^0.1.3", "com-darryncampbell-cordova-plugin-intent": "^2.2.0", "cordova-plugin-fullscreen": "^1.3.0", - "exifreader": "^4.12.0", - "image-js": "^0.35.3", "isomorphic-xml2js": "^0.1.3", "lodash": "^4.17.21", "memoizee": "^0.4.15", "ol": "^7.3.0", "osmtogeojson": "^3.0.0-beta.5", "patch-package": "^6.5.1", + "piexifjs": "^1.0.6", "pluscodes": "^2.6.0", "pouchdb": "^8.0.1", "pouchdb-adapter-indexeddb": "^8.0.1", diff --git a/patches/piexifjs+1.0.6.patch b/patches/piexifjs+1.0.6.patch new file mode 100644 index 0000000..d9a76e2 --- /dev/null +++ b/patches/piexifjs+1.0.6.patch @@ -0,0 +1,33 @@ +diff --git a/node_modules/piexifjs/piexif.js b/node_modules/piexifjs/piexif.js +index 3d0bd12..a920f5e 100644 +--- a/node_modules/piexifjs/piexif.js ++++ b/node_modules/piexifjs/piexif.js +@@ -1781,6 +1781,18 @@ SOFTWARE. + 'name': 'DateTimeDigitized', + 'type': 'Ascii' + }, ++ 36880: { ++ 'name': 'OffsetTime', ++ 'type': 'Ascii' ++ }, ++ 36881: { ++ 'name': 'OffsetTimeOriginal', ++ 'type': 'Ascii' ++ }, ++ 36882: { ++ 'name': 'OffsetTimeDigitized', ++ 'type': 'Ascii' ++ }, + 37121: { + 'name': 'ComponentsConfiguration', + 'type': 'Undefined' +@@ -2349,6 +2361,9 @@ SOFTWARE. + ExifVersion:36864, + DateTimeOriginal:36867, + DateTimeDigitized:36868, ++ OffsetTime:36880, ++ OffsetTimeOriginal:36881, ++ OffsetTimeDigitized:36882, + ComponentsConfiguration:37121, + CompressedBitsPerPixel:37122, + ShutterSpeedValue:37377, diff --git a/src/components/import/ImportSingleFile.tsx b/src/components/import/ImportSingleFile.tsx index 8ed6973..78b32f4 100644 --- a/src/components/import/ImportSingleFile.tsx +++ b/src/components/import/ImportSingleFile.tsx @@ -19,8 +19,7 @@ import { Filesystem as CapacitorFileSystem, Encoding, } from '@capacitor/filesystem'; -import ExifReader from 'exifreader'; -import { Image } from 'image-js'; +import piexif from 'piexifjs'; interface Props { file: File; @@ -101,40 +100,42 @@ const ImportSingleFile: Component = ({ file: file }) => { } else { const reader = new FileReader(); if (file.type === 'image/jpeg') { - reader.readAsArrayBuffer(file); + reader.readAsDataURL(file); reader.addEventListener( 'load', async () => { - const tags = ExifReader.load(reader.result, { expanded: true }); - const exif = tags.exif; - const dateSegments = exif?.DateTimeOriginal?.value[0].split(' '); + const imageUrl = reader.result; + const exifObj = piexif.load(imageUrl); + const id = ''; + const gps = {}; + const dateSegments = + exifObj.Exif[piexif.ExifIFD.DateTimeOriginal].split(' '); const date = `${dateSegments[0].replaceAll(':', '-')}T${ dateSegments[1] - }.${exif?.SubSecTimeOriginal?.value[0] || '0'}${ - exif?.OffsetTimeOriginal?.value[0] + }.${exifObj.Exif[piexif.ExifIFD.SubSecTimeOriginal] || '0'}${ + exifObj.Exif[piexif.ExifIFD.OffsetTimeOriginal] }`; - const id = exif?.ImageUniqueID?.value[0]; - const gps = tags.gps; - const image = await Image.load(reader.result); - const thumbnail = image.resize({ - width: 256, - interpolation: 'bilinear', - }); - const thumbnailUrl = thumbnail.toDataURL(); - // const thumbnail = tags.Thumbnail; - //const thumbnailUrl = `data:${thumbnail?.type};base64,${thumbnail?.base64}`; + // const id = exif?.ImageUniqueID?.value[0]; + // const gps = tags.gps; + // const image = await Image.load(reader.result); + // const thumbnail = image.resize({ + // width: 256, + // interpolation: 'bilinear', + // }); + // const thumbnailUrl = thumbnail.toDataURL(); + // // const thumbnail = tags.Thumbnail; + // //const thumbnailUrl = `data:${thumbnail?.type};base64,${thumbnail?.base64}`; console.log({ caller: 'ImportSingleFile / Jpeg', file, - type: file.type, - result: reader.result, - tags, - date, id, gps, - thumbnailUrl, + date, + type: file.type, + result: reader.result, + exifObj, }); - setPicture({ id, gps, thumbnailUrl, date }); + setPicture({ id, gps, date, thumbnailUrl: imageUrl }); }, false ); diff --git a/src/missing-typedefs/piexifjs.d.ts b/src/missing-typedefs/piexifjs.d.ts new file mode 100644 index 0000000..115a8c6 --- /dev/null +++ b/src/missing-typedefs/piexifjs.d.ts @@ -0,0 +1 @@ +declare module 'piexifjs';