diff --git a/package-lock.json b/package-lock.json index bf4334ec3..a7f221ee8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "@types/chrome": "^0.0.266", "@wavesurfer/react": "^1.0.4", "axios": "^1.7.3", + "c2pa": "^0.22.1", "chart.js": "^4.4.3", "chartjs-adapter-dayjs-4": "^1.0.4", "clsx": "^2.1.1", @@ -1981,6 +1982,19 @@ "node": ">=0.1.90" } }, + "node_modules/@contentauth/detector": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@contentauth/detector/-/detector-0.3.5.tgz", + "integrity": "sha512-hxLtBbtFJM8ZUmuUCC+sJwg9ezaTPQGivK/YCFKyglJFIO0IHD5/Nb2hwKacdCASb2zxmOZjNENb7se5N4BElg==" + }, + "node_modules/@contentauth/toolkit": { + "version": "0.11.5", + "resolved": "https://registry.npmjs.org/@contentauth/toolkit/-/toolkit-0.11.5.tgz", + "integrity": "sha512-xoXMlioc/FtdjF8ZdykcoaTxzO8Kdx/UcuFZ3TWqO+STbb2qsy8uTSh/Q2usxJO257C9h49Bl4xEPg7sYSLQgg==", + "engines": { + "node": ">=14" + } + }, "node_modules/@cypress/request": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", @@ -4794,7 +4808,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", - "dev": true, "dependencies": { "call-bind": "^1.0.5", "is-array-buffer": "^3.0.4" @@ -4926,7 +4939,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", - "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.5", @@ -4995,7 +5007,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, "dependencies": { "possible-typed-array-names": "^1.0.0" }, @@ -5406,6 +5417,36 @@ "node": ">= 0.8" } }, + "node_modules/c2pa": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/c2pa/-/c2pa-0.22.1.tgz", + "integrity": "sha512-JuIdEGeTJPdVNHEpwnHvMW/TDQxkE/vIHYOpJK7HO90NXSY9EoaxyY98s9QhZCT1QXbJZUuZTDcUKdIBgILkXA==", + "dependencies": { + "@contentauth/detector": "0.3.5", + "@contentauth/toolkit": "0.11.5", + "debug": "~4.3.4", + "lodash": "^4.17.21", + "make-error": "^1.3.6", + "p-props": "^5.0.0", + "traverse": "~0.6.7" + } + }, + "node_modules/c2pa/node_modules/traverse": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.9.tgz", + "integrity": "sha512-7bBrcF+/LQzSgFmT0X5YclVqQxtv7TDJ1f8Wj7ibBu/U6BMLeOpUxuZjV7rMc44UtKxlnMFigdhFAIszSX1DMg==", + "dependencies": { + "gopd": "^1.0.1", + "typedarray.prototype.slice": "^1.0.3", + "which-typed-array": "^1.1.15" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/cachedir": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.4.0.tgz", @@ -5419,7 +5460,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -6890,7 +6930,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", - "dev": true, "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", @@ -6907,7 +6946,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -6924,7 +6962,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", - "dev": true, "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", @@ -6970,7 +7007,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "devOptional": true, "dependencies": { "ms": "2.1.2" }, @@ -7070,7 +7106,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -7096,7 +7131,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -7459,7 +7493,6 @@ "version": "1.23.3", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", - "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", @@ -7519,7 +7552,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -7531,7 +7563,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -7571,7 +7602,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", - "dev": true, "dependencies": { "es-errors": "^1.3.0" }, @@ -7583,7 +7613,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.2.4", "has-tostringtag": "^1.0.2", @@ -7606,7 +7635,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -8574,7 +8602,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, "dependencies": { "is-callable": "^1.1.3" } @@ -8702,7 +8729,6 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -8720,7 +8746,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -8767,7 +8792,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -8801,7 +8825,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", - "dev": true, "dependencies": { "call-bind": "^1.0.5", "es-errors": "^1.3.0", @@ -8898,7 +8921,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" @@ -8933,7 +8955,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -8986,7 +9007,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -9003,7 +9023,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -9015,7 +9034,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -9027,7 +9045,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -9039,7 +9056,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, "dependencies": { "has-symbols": "^1.0.3" }, @@ -9660,7 +9676,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", - "dev": true, "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.0", @@ -9709,7 +9724,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.2.1" @@ -9745,7 +9759,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, "dependencies": { "has-bigints": "^1.0.1" }, @@ -9769,7 +9782,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -9785,7 +9797,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -9820,7 +9831,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", - "dev": true, "dependencies": { "is-typed-array": "^1.1.13" }, @@ -9835,7 +9845,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -9950,7 +9959,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -9971,7 +9979,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -10019,7 +10026,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -10047,7 +10053,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", - "dev": true, "dependencies": { "call-bind": "^1.0.7" }, @@ -10074,7 +10079,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -10089,7 +10093,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -10104,7 +10107,6 @@ "version": "1.1.13", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, "dependencies": { "which-typed-array": "^1.1.14" }, @@ -10149,7 +10151,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.2" }, @@ -10188,8 +10189,7 @@ "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, "node_modules/isexe": { "version": "2.0.0", @@ -11322,6 +11322,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, "node_modules/mdn-data": { "version": "2.0.30", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", @@ -11570,8 +11575,7 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "devOptional": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/multicast-dns": { "version": "7.2.5", @@ -11762,7 +11766,6 @@ "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -11771,7 +11774,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -11780,7 +11782,6 @@ "version": "4.1.5", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.5", "define-properties": "^1.2.1", @@ -11996,6 +11997,85 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-props": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-props/-/p-props-5.0.0.tgz", + "integrity": "sha512-teg4j2sNFp+tHIswvsDj7T2SpUQyFLaC80svJbZNxFuFLvOx88n/7k6Oakbx/yKcjRPbdOSd71AsglFf63g2Ag==", + "dependencies": { + "p-map": "^5.0.0" + }, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-props/node_modules/aggregate-error": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", + "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", + "dependencies": { + "clean-stack": "^4.0.0", + "indent-string": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-props/node_modules/clean-stack": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", + "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", + "dependencies": { + "escape-string-regexp": "5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-props/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-props/node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-props/node_modules/p-map": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", + "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", + "dependencies": { + "aggregate-error": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-retry": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", @@ -12314,7 +12394,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -13054,7 +13133,6 @@ "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", - "dev": true, "dependencies": { "call-bind": "^1.0.6", "define-properties": "^1.2.1", @@ -13507,7 +13585,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "get-intrinsic": "^1.2.4", @@ -13545,7 +13622,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", - "dev": true, "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", @@ -13838,7 +13914,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -13855,7 +13930,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -13923,7 +13997,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -14240,7 +14313,6 @@ "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -14258,7 +14330,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -14272,7 +14343,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -14814,7 +14884,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -14828,7 +14897,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", @@ -14847,7 +14915,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", - "dev": true, "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", @@ -14867,7 +14934,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", @@ -14883,6 +14949,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typedarray.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.3.tgz", + "integrity": "sha512-8WbVAQAUlENo1q3c3zZYuy5k9VzBQvp8AX9WOtbvyWlLM1v5JaSRmjubLjzHF4JFtptjH/5c/i95yaElvcjC0A==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-errors": "^1.3.0", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-offset": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript-compare": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/typescript-compare/-/typescript-compare-0.0.2.tgz", @@ -14913,7 +14998,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -15644,7 +15728,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -15704,7 +15787,6 @@ "version": "1.1.15", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", - "dev": true, "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", diff --git a/package.json b/package.json index 3731868d8..780ea6dfb 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@types/chrome": "^0.0.266", "@wavesurfer/react": "^1.0.4", "axios": "^1.7.3", + "c2pa": "^0.22.1", "chart.js": "^4.4.3", "chartjs-adapter-dayjs-4": "^1.0.4", "clsx": "^2.1.1", diff --git a/public/c2paAssets/c2pa_worker_min.js b/public/c2paAssets/c2pa_worker_min.js new file mode 100644 index 000000000..ee649d40c --- /dev/null +++ b/public/c2paAssets/c2pa_worker_min.js @@ -0,0 +1,9 @@ +/*!************************************************************************* + * Copyright 2021 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. + **************************************************************************/ +!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){"use strict";function n(n){return Object.getOwnPropertyNames(n).reduce((function(e,t){return Object.defineProperty(e,t,{value:n[t],enumerable:!0})}),{})}let e;const t=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});t.decode();let r=new Uint8Array;function o(){return 0===r.byteLength&&(r=new Uint8Array(e.memory.buffer)),r}function _(n,e){return t.decode(o().subarray(n,n+e))}let i=0;const c=new TextEncoder("utf-8"),u="function"==typeof c.encodeInto?function(n,e){return c.encodeInto(n,e)}:function(n,e){const t=c.encode(n);return e.set(t),{read:n.length,written:t.length}};function b(n,e,t){if(void 0===t){const t=c.encode(n),r=e(t.length);return o().subarray(r,r+t.length).set(t),i=t.length,r}let r=n.length,_=e(r);const b=o();let f=0;for(;f127)break;b[_+f]=e}if(f!==r){0!==f&&(n=n.slice(f)),_=t(_,r,r=f+3*n.length);const e=o().subarray(_+f,_+r);f+=u(n,e).written}return i=f,_}function f(n){return null==n}let a=new Int32Array;function g(){return 0===a.byteLength&&(a=new Int32Array(e.memory.buffer)),a}let w,s=new Float64Array;function l(n){const e=typeof n;if("number"==e||"boolean"==e||null==n)return`${n}`;if("string"==e)return`"${n}"`;if("symbol"==e){const e=n.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=n.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(n)){const e=n.length;let t="[";e>0&&(t+=l(n[0]));for(let r=1;r1))return toString.call(n);if(r=t[1],"Object"==r)try{return"Object("+JSON.stringify(n)+")"}catch(n){return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:r}function d(n){try{const o=e.__wbindgen_add_to_stack_pointer(-16);e.scan_array_buffer(o,n);var t=g()[o/4+0],r=g()[o/4+1];if(g()[o/4+2])throw function(n){const t=e.__wbindgen_export_2.get(n);return e.__externref_table_dealloc(n),t}(r);return t>>>0}finally{e.__wbindgen_add_to_stack_pointer(16)}}function y(){const n={wbg:{}};return n.wbg.__wbg_isArray_27c46c67f498e15d=function(n){return Array.isArray(n)},n.wbg.__wbg_length_6e3bbe7c8bd4dbd8=function(n){return n.length},n.wbg.__wbg_get_57245cc7d7c7619d=function(n,e){return n[e>>>0]},n.wbg.__wbg_isSafeInteger_dfa0593e8d7ac35a=function(n){return Number.isSafeInteger(n)},n.wbg.__wbindgen_string_new=function(n,e){return _(n,e)},n.wbg.__wbg_new_abda76e883ba8a5f=function(){return new Error},n.wbg.__wbg_stack_658279fe44541cf6=function(n,t){const r=b(t.stack,e.__wbindgen_malloc,e.__wbindgen_realloc),o=i;g()[n/4+1]=o,g()[n/4+0]=r},n.wbg.__wbg_error_f851667af71bcfc6=function(n,t){try{console.error(_(n,t))}finally{e.__wbindgen_free(n,t)}},n.wbg.__wbg_length_9e1ae1900cb0fbd5=function(n){return n.length},n.wbg.__wbindgen_memory=function(){return e.memory},n.wbg.__wbg_buffer_3f3d764d4747d564=function(n){return n.buffer},n.wbg.__wbg_new_8c3f0052272a457a=function(n){return new Uint8Array(n)},n.wbg.__wbg_set_83db9690f9353e79=function(n,e,t){n.set(e,t>>>0)},n.wbg.__wbindgen_error_new=function(n,e){return new Error(_(n,e))},n.wbg.__wbindgen_jsval_loose_eq=function(n,e){return n==e},n.wbg.__wbindgen_boolean_get=function(n){return"boolean"==typeof n?n?1:0:2},n.wbg.__wbindgen_string_get=function(n,t){const r="string"==typeof t?t:void 0;var o=f(r)?0:b(r,e.__wbindgen_malloc,e.__wbindgen_realloc),_=i;g()[n/4+1]=_,g()[n/4+0]=o},n.wbg.__wbindgen_number_get=function(n,t){const r="number"==typeof t?t:void 0;(0===s.byteLength&&(s=new Float64Array(e.memory.buffer)),s)[n/8+1]=f(r)?0:r,g()[n/4+0]=!f(r)},n.wbg.__wbg_instanceof_Uint8Array_971eeda69eb75003=function(n){let e;try{e=n instanceof Uint8Array}catch{e=!1}return e},n.wbg.__wbg_instanceof_ArrayBuffer_e5e48f4762c5610b=function(n){let e;try{e=n instanceof ArrayBuffer}catch{e=!1}return e},n.wbg.__wbindgen_debug_string=function(n,t){const r=b(l(t),e.__wbindgen_malloc,e.__wbindgen_realloc),o=i;g()[n/4+1]=o,g()[n/4+0]=r},n.wbg.__wbindgen_throw=function(n,e){throw new Error(_(n,e))},n.wbg.__wbindgen_init_externref_table=function(){const n=e.__wbindgen_export_2,t=n.grow(4);n.set(0,void 0),n.set(t+0,void 0),n.set(t+1,null),n.set(t+2,!0),n.set(t+3,!1)},n}async function m(n){void 0===n&&(n=new URL("detector_bg.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("c2pa.worker.min.js",document.baseURI).href));const t=y();("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:o,module:_}=await async function(n,e){if("function"==typeof Response&&n instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,e)}catch(e){if("application/wasm"==n.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}const t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}{const t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}(await n,t);return function(n,t){return e=n.exports,m.__wbindgen_wasm_module=t,s=new Float64Array,a=new Int32Array,r=new Uint8Array,e.__wbindgen_start(),e}(o,_)}const p=new Array(128).fill(void 0);function h(n){return p[n]}p.push(void 0,null,!0,!1);let A=p.length;function v(n){const e=h(n);return function(n){n<132||(p[n]=A,A=n)}(n),e}const S="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&S.decode();let R=null;function U(){return null!==R&&0!==R.byteLength||(R=new Uint8Array(w.memory.buffer)),R}function k(n,e){return n>>>=0,S.decode(U().subarray(n,n+e))}function W(n){A===p.length&&p.push(p.length+1);const e=A;return A=p[e],p[e]=n,e}function x(n){return null==n}let I=null;let j=null;function F(){return null!==j&&0!==j.byteLength||(j=new Int32Array(w.memory.buffer)),j}let M=0;const E="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},O="function"==typeof E.encodeInto?function(n,e){return E.encodeInto(n,e)}:function(n,e){const t=E.encode(n);return e.set(t),{read:n.length,written:t.length}};function L(n,e,t){if(void 0===t){const t=E.encode(n),r=e(t.length,1)>>>0;return U().subarray(r,r+t.length).set(t),M=t.length,r}let r=n.length,o=e(r,1)>>>0;const _=U();let i=0;for(;i127)break;_[o+i]=e}if(i!==r){0!==i&&(n=n.slice(i)),o=t(o,r,r=i+3*n.length,1)>>>0;const e=U().subarray(o+i,o+r);i+=O(n,e).written,o=t(o,r,i,1)>>>0}return M=i,o}function T(n){const e=typeof n;if("number"==e||"boolean"==e||null==n)return`${n}`;if("string"==e)return`"${n}"`;if("symbol"==e){const e=n.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=n.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(n)){const e=n.length;let t="[";e>0&&(t+=T(n[0]));for(let r=1;r1))return toString.call(n);if(r=t[1],"Object"==r)try{return"Object("+JSON.stringify(n)+")"}catch(n){return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:r}const q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>{w.__wbindgen_export_2.get(n.dtor)(n.a,n.b)}));function $(n,e,t){w._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbad7a0e4a3aa99a6(n,e,W(t))}function B(n,e,t){const r=L(e,w.__wbindgen_malloc,w.__wbindgen_realloc),o=M;var _=x(t)?0:L(t,w.__wbindgen_malloc,w.__wbindgen_realloc),i=M;return v(w.getManifestStoreFromArrayBuffer(W(n),r,o,_,i))}function C(n,e,t,r){const o=L(t,w.__wbindgen_malloc,w.__wbindgen_realloc),_=M;var i=x(r)?0:L(r,w.__wbindgen_malloc,w.__wbindgen_realloc),c=M;return v(w.getManifestStoreFromManifestAndAsset(W(n),W(e),o,_,i,c))}function D(n,e){try{return n.apply(this,e)}catch(n){w.__wbindgen_exn_store(W(n))}}function N(){const n={wbg:{}};return n.wbg.__wbindgen_object_drop_ref=function(n){v(n)},n.wbg.__wbindgen_string_new=function(n,e){return W(k(n,e))},n.wbg.__wbg_debug_9721f1bee7bcd226=function(n,e){console.debug(h(n),h(e))},n.wbg.__wbindgen_object_clone_ref=function(n){return W(h(n))},n.wbg.__wbg_Window_a76cf730260d53e6=function(n){return W(h(n).Window)},n.wbg.__wbindgen_is_undefined=function(n){return void 0===h(n)},n.wbg.__wbg_crypto_11bbe2f671f5bc19=function(){return D((function(n){return W(h(n).crypto)}),arguments)},n.wbg.__wbg_WorkerGlobalScope_f3016016ef278cb5=function(n){return W(h(n).WorkerGlobalScope)},n.wbg.__wbg_crypto_88609e89336ce904=function(){return D((function(n){return W(h(n).crypto)}),arguments)},n.wbg.__wbg_subtle_3588877c3898dad1=function(n){return W(h(n).subtle)},n.wbg.__wbg_new_72fb9a18b5ae2624=function(){return W(new Object)},n.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return W(new Array)},n.wbg.__wbg_push_a5b05aedc7234f9f=function(n,e){return h(n).push(h(e))},n.wbg.__wbg_verify_3f943c5904222a39=function(){return D((function(n,e,t,r,o){return W(h(n).verify(h(e),h(t),h(r),h(o)))}),arguments)},n.wbg.__wbindgen_is_falsy=function(n){return!h(n)},n.wbg.__wbg_newwithlength_e9b4878cebadb3d3=function(n){return W(new Uint8Array(n>>>0))},n.wbg.__wbg_length_c20a40f15020d68a=function(n){return h(n).length},n.wbg.__wbg_set_a47bac70306a19a7=function(n,e,t){h(n).set(h(e),t>>>0)},n.wbg.__wbg_buffer_dd7f74bc60f1faab=function(n){return W(h(n).buffer)},n.wbg.__wbindgen_number_new=function(n){return W(n)},n.wbg.__wbg_set_d4638f722068f043=function(n,e,t){h(n)[e>>>0]=v(t)},n.wbg.__wbg_new_d9bc3a0147634640=function(){return W(new Map)},n.wbg.__wbg_set_f975102236d3c502=function(n,e,t){h(n)[v(e)]=v(t)},n.wbg.__wbg_set_8417257aaedc936b=function(n,e,t){return W(h(n).set(h(e),h(t)))},n.wbg.__wbindgen_is_string=function(n){return"string"==typeof h(n)},n.wbg.__wbg_now_3014639a94423537=function(){return Date.now()},n.wbg.__wbindgen_error_new=function(n,e){return W(new Error(k(n,e)))},n.wbg.__wbg_new_63b92bc8671ed464=function(n){return W(new Uint8Array(h(n)))},n.wbg.__wbg_from_89e3fc3ba5e6fb48=function(n){return W(Array.from(h(n)))},n.wbg.__wbg_String_b9412f8799faab3e=function(n,e){const t=L(String(h(e)),w.__wbindgen_malloc,w.__wbindgen_realloc),r=M;F()[n/4+1]=r,F()[n/4+0]=t},n.wbg.__wbg_new_28c511d9baebfa89=function(n,e){return W(new Error(k(n,e)))},n.wbg.__wbg_setname_c145a9049d9af5bf=function(n,e,t){h(n).name=k(e,t)},n.wbg.__wbg_new_81740750da40724f=function(n,e){try{var t={a:n,b:e};const r=new Promise(((n,e)=>{const r=t.a;t.a=0;try{return function(n,e,t,r){w.wasm_bindgen__convert__closures__invoke2_mut__h7e32ca2058f905ff(n,e,W(t),W(r))}(r,t.b,n,e)}finally{t.a=r}}));return W(r)}finally{t.a=t.b=0}},n.wbg.__wbg_isArray_2ab64d95e09ea0ae=function(n){return Array.isArray(h(n))},n.wbg.__wbg_length_cd7af8117672b8b8=function(n){return h(n).length},n.wbg.__wbg_get_bd8e338fbd5f5cc8=function(n,e){return W(h(n)[e>>>0])},n.wbg.__wbg_isSafeInteger_f7b04ef02296c4d2=function(n){return Number.isSafeInteger(h(n))},n.wbg.__wbindgen_as_number=function(n){return+h(n)},n.wbg.__wbindgen_bigint_from_u64=function(n){return W(BigInt.asUintN(64,n))},n.wbg.__wbg_new0_7d84e5b2cd9fdc73=function(){return W(new Date)},n.wbg.__wbg_getTime_2bc4375165f02d15=function(n){return h(n).getTime()},n.wbg.__wbg_new_abda76e883ba8a5f=function(){return W(new Error)},n.wbg.__wbg_stack_658279fe44541cf6=function(n,e){const t=L(h(e).stack,w.__wbindgen_malloc,w.__wbindgen_realloc),r=M;F()[n/4+1]=r,F()[n/4+0]=t},n.wbg.__wbg_error_f851667af71bcfc6=function(n,e){let t,r;try{t=n,r=e,console.error(k(n,e))}finally{w.__wbindgen_free(t,r,1)}},n.wbg.__wbindgen_memory=function(){return W(w.memory)},n.wbg.__wbg_buffer_12d079cc21e14bdb=function(n){return W(h(n).buffer)},n.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(n,e,t){return W(new Uint8Array(h(n),e>>>0,t>>>0))},n.wbg.__wbg_randomFillSync_b70ccbdf4926a99d=function(){return D((function(n,e){h(n).randomFillSync(v(e))}),arguments)},n.wbg.__wbg_subarray_a1f73cd4b5b42fe1=function(n,e,t){return W(h(n).subarray(e>>>0,t>>>0))},n.wbg.__wbg_getRandomValues_7e42b4fb8779dc6d=function(){return D((function(n,e){h(n).getRandomValues(h(e))}),arguments)},n.wbg.__wbg_crypto_d05b68a3572bb8ca=function(n){return W(h(n).crypto)},n.wbg.__wbindgen_is_object=function(n){const e=h(n);return"object"==typeof e&&null!==e},n.wbg.__wbg_process_b02b3570280d0366=function(n){return W(h(n).process)},n.wbg.__wbg_versions_c1cb42213cedf0f5=function(n){return W(h(n).versions)},n.wbg.__wbg_node_43b1089f407e4ec2=function(n){return W(h(n).node)},n.wbg.__wbg_require_9a7e0f667ead4995=function(){return D((function(){return W(module.require)}),arguments)},n.wbg.__wbindgen_is_function=function(n){return"function"==typeof h(n)},n.wbg.__wbg_msCrypto_10fc94afee92bd76=function(n){return W(h(n).msCrypto)},n.wbg.__wbg_self_ce0dbfc45cf2f5be=function(){return D((function(){return W(self.self)}),arguments)},n.wbg.__wbg_window_c6fb939a7f436783=function(){return D((function(){return W(window.window)}),arguments)},n.wbg.__wbg_globalThis_d1e6af4856ba331b=function(){return D((function(){return W(globalThis.globalThis)}),arguments)},n.wbg.__wbg_global_207b558942527489=function(){return D((function(){return W(global.global)}),arguments)},n.wbg.__wbg_newnoargs_e258087cd0daa0ea=function(n,e){return W(new Function(k(n,e)))},n.wbg.__wbg_call_27c0f87801dedf93=function(){return D((function(n,e){return W(h(n).call(h(e)))}),arguments)},n.wbg.__wbg_call_b3ca7c6051f9bec1=function(){return D((function(n,e,t){return W(h(n).call(h(e),h(t)))}),arguments)},n.wbg.__wbg_set_1f9b04f170055d33=function(){return D((function(n,e,t){return Reflect.set(h(n),h(e),h(t))}),arguments)},n.wbg.__wbindgen_jsval_loose_eq=function(n,e){return h(n)==h(e)},n.wbg.__wbindgen_boolean_get=function(n){const e=h(n);return"boolean"==typeof e?e?1:0:2},n.wbg.__wbindgen_number_get=function(n,e){const t=h(e),r="number"==typeof t?t:void 0;(null!==I&&0!==I.byteLength||(I=new Float64Array(w.memory.buffer)),I)[n/8+1]=x(r)?0:r,F()[n/4+0]=!x(r)},n.wbg.__wbindgen_string_get=function(n,e){const t=h(e),r="string"==typeof t?t:void 0;var o=x(r)?0:L(r,w.__wbindgen_malloc,w.__wbindgen_realloc),_=M;F()[n/4+1]=_,F()[n/4+0]=o},n.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6=function(n){let e;try{e=h(n)instanceof Uint8Array}catch(n){e=!1}return e},n.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2=function(n){let e;try{e=h(n)instanceof ArrayBuffer}catch(n){e=!1}return e},n.wbg.__wbindgen_debug_string=function(n,e){const t=L(T(h(e)),w.__wbindgen_malloc,w.__wbindgen_realloc),r=M;F()[n/4+1]=r,F()[n/4+0]=t},n.wbg.__wbindgen_throw=function(n,e){throw new Error(k(n,e))},n.wbg.__wbg_then_0c86a60e8fcfe9f6=function(n,e){return W(h(n).then(h(e)))},n.wbg.__wbg_queueMicrotask_481971b0d87f3dd4=function(n){queueMicrotask(h(n))},n.wbg.__wbg_then_a73caa9a87991566=function(n,e,t){return W(h(n).then(h(e),h(t)))},n.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6=function(n){return W(h(n).queueMicrotask)},n.wbg.__wbg_resolve_b0083a7967828ec8=function(n){return W(Promise.resolve(h(n)))},n.wbg.__wbindgen_cb_drop=function(n){const e=v(n).original;if(1==e.cnt--)return e.a=0,!0;return!1},n.wbg.__wbg_debug_7d879afce6cf56cb=function(n,e,t,r){console.debug(h(n),h(e),h(t),h(r))},n.wbg.__wbg_error_696630710900ec44=function(n,e,t,r){console.error(h(n),h(e),h(t),h(r))},n.wbg.__wbg_info_80803d9a3f0aad16=function(n,e,t,r){console.info(h(n),h(e),h(t),h(r))},n.wbg.__wbg_log_151eb4333ef0fe39=function(n,e,t,r){console.log(h(n),h(e),h(t),h(r))},n.wbg.__wbg_warn_5d3f783b0bae8943=function(n,e,t,r){console.warn(h(n),h(e),h(t),h(r))},n.wbg.__wbg_importKey_ffc13175d345168c=function(){return D((function(n,e,t,r,o,_,i){return W(h(n).importKey(k(e,t),h(r),h(o),0!==_,h(i)))}),arguments)},n.wbg.__wbindgen_closure_wrapper5636=function(n,e,t){const r=function(n,e,t,r){const o={a:n,b:e,cnt:1,dtor:t},_=(...n)=>{o.cnt++;const e=o.a;o.a=0;try{return r(e,o.b,...n)}finally{0==--o.cnt?(w.__wbindgen_export_2.get(o.dtor)(e,o.b),q.unregister(o)):o.a=e}};return _.original=o,q.register(_,o,o),_}(n,e,211,$);return W(r)},n}async function P(n){if(void 0!==w)return w;void 0===n&&(n=new URL("toolkit_bg.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("c2pa.worker.min.js",document.baseURI).href));const e=N();("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:t,module:r}=await async function(n,e){if("function"==typeof Response&&n instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,e)}catch(e){if("application/wasm"==n.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}const t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}{const t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}(await n,e);return function(n,e){return w=n.exports,P.__wbindgen_wasm_module=e,I=null,j=null,R=null,w.__wbindgen_start(),w}(t,r)}const z={compileWasm:async n=>WebAssembly.compile(n),getReport:async(n,e,t,r)=>(await P(n),B(e,t,r)),async getReportFromAssetAndManifestBuffer(n,e,t,r){await P(n);return C(e,await t.arrayBuffer(),t.type,r)},async scanInput(n,e){await m(n);try{return{found:!0,offset:await d(e)}}catch(n){return{found:!1}}}};var G;G=z,onmessage=async e=>{const{args:t,method:r}=e.data;try{const n=await G[r](...t);postMessage({type:"success",data:n})}catch(e){postMessage({type:"error",error:n(e)})}}})); diff --git a/public/c2paAssets/toolkit_bg.wasm b/public/c2paAssets/toolkit_bg.wasm new file mode 100644 index 000000000..037747ad5 Binary files /dev/null and b/public/c2paAssets/toolkit_bg.wasm differ diff --git a/public/locales/ar/components/NavItems/tools/C2pa.json b/public/locales/ar/components/NavItems/tools/C2pa.json index a0004db12..02085487f 100644 --- a/public/locales/ar/components/NavItems/tools/C2pa.json +++ b/public/locales/ar/components/NavItems/tools/C2pa.json @@ -1 +1 @@ -{"c2pa_title": "C2pa", "c2pa_description": "\u064a\u0642\u0631\u0623 \u0628\u064a\u0627\u0646\u0627\u062a C2pa \u0644\u0635\u0648\u0631\u0629.", "c2pa_results_title": "\u0646\u062a\u0627\u0626\u062c", "c2pa_information": "\u0645\u0639\u0644\u0648\u0645\u0627\u062a c2pa", "no_c2pa_info": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0628\u064a\u0627\u0646\u0627\u062a c2pa \u0645\u062a\u0627\u062d\u0629 \u0644\u0647\u0630\u0647 \u0627\u0644\u0635\u0648\u0631\u0629.", "content_credentials_unknown_source": "\u062a\u0645 \u0625\u0635\u062f\u0627\u0631 \u0647\u0630\u0647 \u0627\u0644\u0634\u0647\u0627\u062f\u0629 \u0645\u0646 \u0642\u0628\u0644 \u0645\u0635\u062f\u0631 \u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641.", "content_credentials_invalid": "\u0647\u0630\u0647 \u0627\u0644\u0634\u0647\u0627\u062f\u0629 \u063a\u064a\u0631 \u0635\u0627\u0644\u062d\u0629\u060c \u0645\u0645\u0627 \u064a\u0639\u0646\u064a \u0623\u0646 \u0623\u064a \u0634\u062e\u0635 \u064a\u0645\u0643\u0646 \u0623\u0646 \u064a\u0643\u0648\u0646 \u0642\u062f \u0639\u062f\u0644 \u0645\u0639\u0644\u0648\u0645\u0627\u062a c2pa \u0644\u0647\u0630\u0647 \u0627\u0644\u0635\u0648\u0631\u0629.", "content_credentials_title": "\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0627\u0639\u062a\u0645\u0627\u062f \u0644\u0644\u0645\u062d\u062a\u0648\u0649", "content_credentials_issuer": "\u0627\u0644\u0645\u064f\u0635\u062f\u0650\u0631: ", "content_credentials_date_issued": "\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0625\u0635\u062f\u0627\u0631: ", "credit_title": "\u0627\u0644\u0627\u0626\u062a\u0645\u0627\u0646", "credit_producer": "\u062a\u0645 \u0627\u0644\u0625\u0646\u062a\u0627\u062c \u0628\u0648\u0627\u0633\u0637\u0629: ", "credit_social": "\u0648\u0633\u0627\u0626\u0644 \u0627\u0644\u062a\u0648\u0627\u0635\u0644 \u0627\u0644\u0627\u062c\u062a\u0645\u0627\u0639\u064a", "credit_no_info": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0639\u0646 \u0627\u0644\u0645\u0646\u062a\u062c \u0644\u0647\u0630\u0647 \u0627\u0644\u0635\u0648\u0631\u0629", "capture_info_title": "\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0627\u0644\u062a\u0642\u0627\u0637", "capture_info_make": "\u062a\u0635\u0646\u064a\u0639: ", "capture_info_model": "\u0646\u0645\u0648\u0630\u062c: ", "capture_info_date": "\u062a\u0627\u0631\u064a\u062e: ", "capture_info_longitude": "\u062e\u0637 \u0627\u0644\u0637\u0648\u0644: ", "capture_info_latitude": "\u062e\u0637 \u0627\u0644\u0639\u0631\u0636: ", "capture_info_more_results": "\u0634\u0627\u0647\u062f \u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0627\u0644\u062a\u0642\u0627\u0637", "capture_info_hide": "\u0625\u062e\u0641\u0627\u0621 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0627\u0644\u062a\u0642\u0627\u0637", "capture_no_info": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u062a\u0642\u0627\u0637 \u0645\u062a\u0627\u062d\u0629.", "process_title": "\u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u0625\u0646\u0634\u0627\u0621", "process_edits": "\u062a\u0639\u062f\u064a\u0644\u0627\u062a", "process_ingredients": "\u0645\u0643\u0648\u0646\u0627\u062a", "process_no_info": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0639\u0646 \u0627\u0644\u0639\u0645\u0644\u064a\u0629 \u0644\u0647\u0630\u0647 \u0627\u0644\u0635\u0648\u0631\u0629.", "previous_image": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629", "first_image": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0623\u0648\u0644\u0649", "content_credential_explanation": "\u0627\u0644\u062c\u0647\u0629 \u0627\u0644\u0645\u064f\u0635\u062f\u0631\u0629 \u0647\u064a \u0627\u0644\u0645\u0646\u0638\u0645\u0629 \u0623\u0648 \u0627\u0644\u062c\u0647\u0627\u0632 \u0623\u0648 \u0627\u0644\u0641\u0631\u062f \u0627\u0644\u0630\u064a \u0633\u062c\u0644 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0648\u0648\u0642\u0639 \u0639\u0644\u0649 \u0634\u0647\u0627\u062f\u0629 \u0627\u0644\u0645\u062d\u062a\u0648\u0649 \u0627\u0644\u062a\u064a \u062a\u0635\u0627\u062f\u0642 \u0639\u0644\u0649 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0641\u064a \u0627\u0644\u0645\u0644\u0641.", "credit_explanation": "\u0647\u0630\u0647 \u0647\u064a \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u062a\u064a \u0627\u062e\u062a\u0627\u0631 \u0645\u0646\u062a\u062c \u0647\u0630\u0647 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0645\u0634\u0627\u0631\u0643\u062a\u0647\u0627.", "capture_info_explanation": "\u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0645\u0623\u062e\u0648\u0630\u0629 \u0645\u0646 \u0627\u0644\u0643\u0627\u0645\u064a\u0631\u0627 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u0629 \u0644\u0627\u0644\u062a\u0642\u0627\u0637 \u0627\u0644\u0635\u0648\u0631\u0629. \u064a\u0645\u0643\u0646 \u062a\u062d\u0631\u064a\u0631 \u0647\u0630\u0647 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0645\u0646 \u0642\u0628\u0644 \u0627\u0644\u0645\u0646\u062a\u062c.", "process_explanation": "\u062a\u0645 \u062a\u0633\u062c\u064a\u0644 \u0647\u0630\u0647 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0628\u0648\u0627\u0633\u0637\u0629 \u0627\u0644\u062a\u0637\u0628\u064a\u0642 \u0623\u0648 \u0627\u0644\u062c\u0647\u0627\u0632 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u0644\u0625\u0646\u062a\u0627\u062c \u0627\u0644\u0635\u0648\u0631\u0629.", "child_depth_exceeded": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0631\u0626\u064a\u0633\u064a\u0629 \u062a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0627\u0644\u0639\u062f\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0643\u0648\u0646\u0627\u062a\u060c \u062a\u0639\u0630\u0631 \u0642\u0631\u0627\u0621\u0629 \u0628\u064a\u0627\u0646\u0627\u062a \u0647\u0630\u0647 \u0627\u0644\u0635\u0648\u0631\u0629.", "submit_button": "\u0625\u0631\u0633\u0627\u0644", "button_localfile": "\u0645\u0644\u0641 \u0645\u062d\u0644\u064a", "image_link": "\u0631\u0627\u0628\u0637 \u0627\u0644\u0635\u0648\u0631\u0629", "placeholder": "\u0627\u0644\u0635\u0642 \u0639\u0646\u0648\u0627\u0646 URL \u0647\u0646\u0627", "geo_maps": "\u0627\u0641\u062a\u062d \u0641\u064a \u062e\u0631\u0627\u0626\u0637 \u062c\u0648\u062c\u0644"} \ No newline at end of file +{"c2pa_title": "C2pa", "c2pa_description": "\u064a\u0642\u0631\u0623 \u0628\u064a\u0627\u0646\u0627\u062a C2pa \u0644\u0635\u0648\u0631\u0629 \u0623\u0648 \u0641\u064a\u062f\u064a\u0648.", "c2pa_results_title": "\u0646\u062a\u0627\u0626\u062c", "c2pa_information": "\u0645\u0639\u0644\u0648\u0645\u0627\u062a c2pa", "no_c2pa_info_image": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0628\u064a\u0627\u0646\u0627\u062a c2pa \u0645\u062a\u0627\u062d\u0629 \u0644\u0647\u0630\u0647 \u0627\u0644\u0635\u0648\u0631\u0629.", "no_c2pa_info_video": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0628\u064a\u0627\u0646\u0627\u062a c2pa \u0645\u062a\u0627\u062d\u0629 \u0644\u0647\u0630\u0627 \u0627\u0644\u0641\u064a\u062f\u064a\u0648.", "content_credentials_unknown_source": "\u062a\u0645 \u0625\u0635\u062f\u0627\u0631 \u0647\u0630\u0647 \u0627\u0644\u0634\u0647\u0627\u062f\u0629 \u0645\u0646 \u0642\u0628\u0644 \u0645\u0635\u062f\u0631 \u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641.", "content_credentials_invalid": "\u0647\u0630\u0647 \u0627\u0644\u0634\u0647\u0627\u062f\u0629 \u063a\u064a\u0631 \u0635\u0627\u0644\u062d\u0629\u060c \u0645\u0645\u0627 \u064a\u0639\u0646\u064a \u0623\u0646 \u0623\u064a \u0634\u062e\u0635 \u064a\u0645\u0643\u0646 \u0623\u0646 \u064a\u0643\u0648\u0646 \u0642\u062f \u0639\u062f\u0644 \u0645\u0639\u0644\u0648\u0645\u0627\u062a c2pa \u0644\u0647\u0630\u0647 \u0627\u0644\u0635\u0648\u0631\u0629.", "content_credentials_title": "\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0627\u0639\u062a\u0645\u0627\u062f \u0644\u0644\u0645\u062d\u062a\u0648\u0649", "content_credentials_issuer": "\u0627\u0644\u0645\u064f\u0635\u062f\u0650\u0631: ", "content_credentials_date_issued": "\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0625\u0635\u062f\u0627\u0631: ", "credit_title": "\u0627\u0644\u0627\u0626\u062a\u0645\u0627\u0646", "credit_producer": "\u062a\u0645 \u0627\u0644\u0625\u0646\u062a\u0627\u062c \u0628\u0648\u0627\u0633\u0637\u0629: ", "credit_social": "\u0648\u0633\u0627\u0626\u0644 \u0627\u0644\u062a\u0648\u0627\u0635\u0644 \u0627\u0644\u0627\u062c\u062a\u0645\u0627\u0639\u064a", "credit_no_info_image": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0639\u0646 \u0627\u0644\u0645\u0646\u062a\u062c \u0644\u0647\u0630\u0647 \u0627\u0644\u0635\u0648\u0631\u0629", "credit_no_info_video": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0639\u0646 \u0627\u0644\u0645\u0646\u062a\u062c \u0644\u0647\u0630\u0627 \u0627\u0644\u0641\u064a\u062f\u064a\u0648.", "capture_info_title": "\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0627\u0644\u062a\u0642\u0627\u0637", "capture_info_make": "\u062a\u0635\u0646\u064a\u0639: ", "capture_info_model": "\u0646\u0645\u0648\u0630\u062c: ", "capture_info_date": "\u062a\u0627\u0631\u064a\u062e: ", "capture_info_longitude": "\u062e\u0637 \u0627\u0644\u0637\u0648\u0644: ", "capture_info_latitude": "\u062e\u0637 \u0627\u0644\u0639\u0631\u0636: ", "capture_info_more_results": "\u0634\u0627\u0647\u062f \u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0627\u0644\u062a\u0642\u0627\u0637", "capture_info_hide": "\u0625\u062e\u0641\u0627\u0621 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u0627\u0644\u062a\u0642\u0627\u0637", "capture_no_info": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u062a\u0642\u0627\u0637 \u0645\u062a\u0627\u062d\u0629.", "process_title": "\u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u0625\u0646\u0634\u0627\u0621", "process_edits": "\u062a\u0639\u062f\u064a\u0644\u0627\u062a", "process_ingredients": "\u0645\u0643\u0648\u0646\u0627\u062a", "process_no_info_image": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0639\u0646 \u0627\u0644\u0639\u0645\u0644\u064a\u0629 \u0644\u0647\u0630\u0647 \u0627\u0644\u0635\u0648\u0631\u0629.", "process_no_info_video": "\u0644\u0627 \u062a\u0648\u062c\u062f \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0639\u0645\u0644\u064a\u0629 \u0644\u0647\u0630\u0627 \u0627\u0644\u0641\u064a\u062f\u064a\u0648.", "previous_image": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629", "first_image": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0623\u0648\u0644\u0649", "content_credential_explanation": "\u0627\u0644\u062c\u0647\u0629 \u0627\u0644\u0645\u064f\u0635\u062f\u0631\u0629 \u0647\u064a \u0627\u0644\u0645\u0646\u0638\u0645\u0629 \u0623\u0648 \u0627\u0644\u062c\u0647\u0627\u0632 \u0623\u0648 \u0627\u0644\u0641\u0631\u062f \u0627\u0644\u0630\u064a \u0633\u062c\u0644 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0648\u0648\u0642\u0639 \u0639\u0644\u0649 \u0634\u0647\u0627\u062f\u0629 \u0627\u0644\u0645\u062d\u062a\u0648\u0649 \u0627\u0644\u062a\u064a \u062a\u0635\u0627\u062f\u0642 \u0639\u0644\u0649 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0641\u064a \u0627\u0644\u0645\u0644\u0641.", "credit_explanation": "\u0647\u0630\u0647 \u0647\u064a \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u062a\u064a \u0627\u062e\u062a\u0627\u0631 \u0645\u0646\u062a\u062c \u0647\u0630\u0647 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0645\u0634\u0627\u0631\u0643\u062a\u0647\u0627.", "capture_info_explanation": "\u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0645\u0623\u062e\u0648\u0630\u0629 \u0645\u0646 \u0627\u0644\u0643\u0627\u0645\u064a\u0631\u0627 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u0629 \u0644\u0627\u0644\u062a\u0642\u0627\u0637 \u0627\u0644\u0635\u0648\u0631\u0629 \u0623\u0648 \u0627\u0644\u0641\u064a\u062f\u064a\u0648. \u064a\u0645\u0643\u0646 \u062a\u062d\u0631\u064a\u0631 \u0647\u0630\u0647 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0645\u0646 \u0642\u0628\u0644 \u0627\u0644\u0645\u0646\u062a\u062c.", "process_explanation": "\u062a\u0645 \u062a\u0633\u062c\u064a\u0644 \u0647\u0630\u0647 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0628\u0648\u0627\u0633\u0637\u0629 \u0627\u0644\u062a\u0637\u0628\u064a\u0642 \u0623\u0648 \u0627\u0644\u062c\u0647\u0627\u0632 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u0644\u0625\u0646\u062a\u0627\u062c \u0627\u0644\u0635\u0648\u0631\u0629 \u0623\u0648 \u0627\u0644\u0641\u064a\u062f\u064a\u0648.", "child_depth_exceeded_image": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0631\u0626\u064a\u0633\u064a\u0629 \u062a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0627\u0644\u0639\u062f\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0643\u0648\u0646\u0627\u062a\u060c \u062a\u0639\u0630\u0631 \u0642\u0631\u0627\u0621\u0629 \u0628\u064a\u0627\u0646\u0627\u062a \u0647\u0630\u0647 \u0627\u0644\u0635\u0648\u0631\u0629.", "child_depth_exceeded_video": "\u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u0631\u0626\u064a\u0633\u064a \u064a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0627\u0644\u0639\u062f\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0643\u0648\u0646\u0627\u062a\u060c \u062a\u0639\u0630\u0631 \u0642\u0631\u0627\u0621\u0629 \u0628\u064a\u0627\u0646\u0627\u062a \u0647\u0630\u0627 \u0627\u0644\u0641\u064a\u062f\u064a\u0648.", "submit_button": "\u0625\u0631\u0633\u0627\u0644", "button_localfile": "\u0645\u0644\u0641 \u0645\u062d\u0644\u064a", "image_link": "\u0631\u0627\u0628\u0637 \u0635\u0648\u0631\u0629 \u0623\u0648 \u0641\u064a\u062f\u064a\u0648", "placeholder": "\u0627\u0644\u0635\u0642 \u0639\u0646\u0648\u0627\u0646 URL \u0647\u0646\u0627", "geo_maps": "\u0627\u0641\u062a\u062d \u0641\u064a \u062e\u0631\u0627\u0626\u0637 \u062c\u0648\u062c\u0644"} \ No newline at end of file diff --git a/public/locales/ar/components/NavItems/tools/CheckGIF.json b/public/locales/ar/components/NavItems/tools/CheckGIF.json index 813a68d70..3f1799ed6 100644 --- a/public/locales/ar/components/NavItems/tools/CheckGIF.json +++ b/public/locales/ar/components/NavItems/tools/CheckGIF.json @@ -1 +1 @@ -{"checkGIF_title": "CheckGif", "checkGIF_description": "\u062a\u0646\u0634\u0626 \u0647\u0630\u0647 \u0627\u0644\u0645\u064a\u0632\u0629 \u0635\u0648\u0631\u0629 gif \u0645\u062a\u062d\u0631\u0643\u0629 \u0645\u0643\u0648\u0646\u0629 \u0645\u0646 \u0635\u0648\u0631\u0629 \u0623\u0635\u0644\u064a\u0629 \u0648\u0635\u0648\u0631\u0629 \u062a\u0645 \u0627\u0644\u062a\u0644\u0627\u0639\u0628 \u0628\u0647\u0627 (\u0628\u0645\u0627 \u0641\u064a \u0630\u0644\u0643 \u0625\u0630\u0627 \u062a\u0645 \u0627\u0642\u062a\u0635\u0627\u0635 \u0627\u0644\u0635\u0648\u0631\u0629) \u0644\u0625\u0638\u0647\u0627\u0631 \u0645\u0639\u0627\u0644\u062c\u0629 \u0627\u0644\u0635\u0648\u0631\u0629 \u0628\u0634\u0643\u0644 \u0623\u0641\u0636\u0644", "cardTitle_images": "\u0635\u0648\u0631 \u0644\u0640 GIF", "title_image1": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0623\u0648\u0644\u0649 (\u0645\u0634\u0628\u0648\u0647\u0629 \u0623\u0648 \u062a\u0645 \u062a\u063a\u064a\u064a\u0631\u0647\u0627)", "title_image2": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u062b\u0627\u0646\u064a\u0629 (\u0645\u0646 \u0627\u0644\u0645\u0641\u062a\u0631\u0636 \u0623\u0646 \u062a\u0643\u0648\u0646 \u0623\u0635\u0644\u064a\u0629)", "body_droparea": "\u0627\u0633\u062d\u0628 \u0623\u064a \u0635\u0648\u0631\u0629 \u0647\u0646\u0627\u060c \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u062a\u0635\u0641\u062d \u0627\u0644\u0635\u0648\u0631\u0629", "button_loadImages": "\u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u0635\u0648\u0631", "cardTitle_generatedGIF": "\u0645\u0639\u0627\u064a\u0646\u0629 GIF", "slider_title": "\u0633\u0631\u0639\u0629 \u0627\u0644\u0631\u0633\u0648\u0645 \u0627\u0644\u0645\u062a\u062d\u0631\u0643\u0629", "slider_label_slow": "\u0628\u0637\u064a\u0621", "slider_label_fast": "\u0633\u0631\u064a\u0639", "button_download": "\u062a\u0646\u0632\u064a\u0644 GIF", "button_video": "\u062d\u0645\u0651\u0644 \u0628\u0635\u064a\u063a\u0629 \u0641\u064a\u062f\u064a\u0648", "cardTitle_source": "\u0645\u0635\u062f\u0631 \u0627\u0644\u0635\u0648\u0631", "title_URL": "\u0627\u0644\u0631\u0648\u0627\u0628\u0637", "description_URL": "\u064a\u062a\u0645 \u062a\u0632\u0648\u064a\u062f \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646 \u0628\u0631\u0627\u0628\u0637\u064a\u0646 \u0628\u0635\u064a\u063a\u0629 \u0639\u0646\u0627\u0648\u064a\u0646 URL", "title_local": "\u0645\u0644\u0641\u0627\u062a \u0645\u062d\u0644\u064a\u0629", "description_local": "\u0627\u0644\u0635\u0648\u0631\u062a\u0627\u0646 \u0645\u0632\u0648\u062f\u062a\u0627\u0646 \u0628\u0645\u0644\u0641\u064a\u0646 \u0645\u062d\u0644\u064a\u064a\u0646", "title_gifcreation": "\u0625\u0646\u0634\u0627\u0621 GIF", "text_preview": "\u062a\u062d\u062a\u0627\u062c \u0625\u0644\u0649 \u062a\u062d\u062f\u064a\u062f \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646 \u0639\u0644\u0649 \u0627\u0644\u064a\u0633\u0627\u0631 \u0648\u0627\u0646\u0642\u0631 \u0641\u0648\u0642 \u0627\u0644\u0632\u0631 \u0644\u0644\u0645\u0639\u0627\u064a\u0646\u0629", "input_label1": "\u0631\u0627\u0628\u0637 \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u0634\u0628\u0648\u0647\u0629 \u0623\u0648 \u0627\u0644\u0645\u062a\u063a\u064a\u0631\u0629", "input_label2": "\u0631\u0627\u0628\u0637 \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0623\u0635\u0644\u064a\u0629 \u0627\u0644\u0645\u0641\u062a\u0631\u0636\u0629", "input_placeholder": "\u0627\u0644\u0635\u0642 \u0627\u0644\u0631\u0627\u0628\u0637 \u0647\u0646\u0627", "title_preview": "\u0645\u0639\u0627\u064a\u0646\u0629 GIF", "error_homo": "\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u062a\u0637\u0627\u0628\u0642 \u0628\u064a\u0646 \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646.", "button_new": "GIF \u062c\u062f\u064a\u062f", "IPOL_IMAGE_UPLOAD_EXCEEDED": "\u064a\u062a\u062c\u0627\u0648\u0632 \u062d\u062c\u0645 \u0627\u0644\u0635\u0648\u0631 \u0627\u0644\u062d\u062f 1 \u0645\u064a\u062c\u0627\u0628\u0627\u064a\u062a", "IPOL_REMOTE_SERVICE_ERROR": "\u062d\u062f\u062b \u062e\u0637\u0623 \u0641\u064a \u0627\u0644\u0634\u0628\u0643\u0629 \u0623\u062b\u0646\u0627\u0621 \u0645\u0639\u0627\u0644\u062c\u0629 \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646", "IPOL_RESOURCE_NOT_FOUND": "\u0643\u0627\u0646 \u062d\u062f\u062b \u062e\u0637\u0623 \u062f\u0627\u062e\u0644\u064a \u0623\u062b\u0646\u0627\u0621 \u0645\u0639\u0627\u0644\u062c\u0629 \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646", "IPOL_FILE_IMAGE_ERROR": "\u062d\u062f\u062b \u062e\u0637\u0623 \u0623\u062b\u0646\u0627\u0621 \u0635\u064a\u0627\u063a\u0629 \u0627\u0644\u0635\u0648\u0631\u0629", "IPOL_BAD_URL_ERROR": "\u0635\u064a\u063a\u0629 \u0639\u0646\u0627\u0648\u064a\u0646 URL \u063a\u064a\u0631 \u0635\u0627\u0644\u062d\u0629", "NO_MATCHES_FOUND": "\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u062a\u0637\u0627\u0628\u0642 \u0628\u064a\u0646 \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646", "INTERNAL_SERVER_ERROR": "\u062d\u062f\u062b \u062e\u0637\u0623 \u062f\u0627\u062e\u0644\u064a \u0623\u062b\u0646\u0627\u0621 \u0645\u0639\u0627\u0644\u062c\u0629 \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646", "button_play": "\u062a\u0634\u063a\u064a\u0644 GIF", "button_modify": "\u062a\u0639\u062f\u064a\u0644 \u0627\u0644\u062a\u0639\u0644\u064a\u0642", "button_add": "\u0625\u0636\u0627\u0641\u0629 \u062a\u0639\u0644\u064a\u0642", "button_remove": "\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u062a\u0639\u0644\u064a\u0642", "fake_annotation_tip": "\u064a\u0645\u0643\u0646 \u0625\u0636\u0627\u0641\u0629 \u062a\u0639\u0644\u064a\u0642 \"Fake\" \u0625\u0644\u0649 \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u0639\u062f\u0644\u0629", "text_size_label": "\u062d\u062c\u0645 \u0627\u0644\u0646\u0635", "colour_label": "\u0644\u0648\u0646", "colour_red": "\u0623\u062d\u0645\u0631", "colour_blue": "\u0623\u0632\u0631\u0642", "colour_white": "\u0623\u0628\u064a\u0636", "draggable_text_tip": "\u064a\u0645\u0643\u0646 \u0633\u062d\u0628 \u0627\u0644\u0646\u0635 \u0625\u0644\u0649 \u0645\u0648\u0636\u0639 \u0623\u0643\u062b\u0631 \u0645\u0644\u0627\u0621\u0645\u0629", "fake_annotation": "\u0645\u0632\u064a\u0641"} \ No newline at end of file +{"checkGIF_title": "CheckGif", "checkGIF_description": "\u062a\u0646\u0634\u0626 \u0647\u0630\u0647 \u0627\u0644\u0645\u064a\u0632\u0629 \u0635\u0648\u0631\u0629 gif \u0645\u062a\u062d\u0631\u0643\u0629 \u0645\u0643\u0648\u0646\u0629 \u0645\u0646 \u0635\u0648\u0631\u0629 \u0623\u0635\u0644\u064a\u0629 \u0648\u0635\u0648\u0631\u0629 \u062a\u0645 \u0627\u0644\u062a\u0644\u0627\u0639\u0628 \u0628\u0647\u0627 (\u0628\u0645\u0627 \u0641\u064a \u0630\u0644\u0643 \u0625\u0630\u0627 \u062a\u0645 \u0627\u0642\u062a\u0635\u0627\u0635 \u0627\u0644\u0635\u0648\u0631\u0629) \u0644\u0625\u0638\u0647\u0627\u0631 \u0645\u0639\u0627\u0644\u062c\u0629 \u0627\u0644\u0635\u0648\u0631\u0629 \u0628\u0634\u0643\u0644 \u0623\u0641\u0636\u0644", "cardTitle_images": "\u0635\u0648\u0631 \u0644\u0640 GIF", "title_image1": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0623\u0648\u0644\u0649 (\u0645\u0634\u0628\u0648\u0647\u0629 \u0623\u0648 \u062a\u0645 \u062a\u063a\u064a\u064a\u0631\u0647\u0627)", "title_image2": "\u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u062b\u0627\u0646\u064a\u0629 (\u0645\u0646 \u0627\u0644\u0645\u0641\u062a\u0631\u0636 \u0623\u0646 \u062a\u0643\u0648\u0646 \u0623\u0635\u0644\u064a\u0629)", "body_droparea": "\u0627\u0633\u062d\u0628 \u0623\u064a \u0635\u0648\u0631\u0629 \u0647\u0646\u0627\u060c \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u062a\u0635\u0641\u062d \u0627\u0644\u0635\u0648\u0631\u0629", "button_loadImages": "\u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u0635\u0648\u0631", "cardTitle_generatedGIF": "\u0645\u0639\u0627\u064a\u0646\u0629 GIF", "slider_title": "\u0633\u0631\u0639\u0629 \u0627\u0644\u0631\u0633\u0648\u0645 \u0627\u0644\u0645\u062a\u062d\u0631\u0643\u0629", "slider_label_slow": "\u0628\u0637\u064a\u0621", "slider_label_fast": "\u0633\u0631\u064a\u0639", "button_download": "\u062a\u0646\u0632\u064a\u0644 GIF", "button_video": "\u062d\u0645\u0651\u0644 \u0628\u0635\u064a\u063a\u0629 \u0641\u064a\u062f\u064a\u0648", "cardTitle_source": "\u0645\u0635\u062f\u0631 \u0627\u0644\u0635\u0648\u0631", "title_URL": "\u0627\u0644\u0631\u0648\u0627\u0628\u0637", "description_URL": "\u064a\u062a\u0645 \u062a\u0632\u0648\u064a\u062f \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646 \u0628\u0631\u0627\u0628\u0637\u064a\u0646 \u0628\u0635\u064a\u063a\u0629 \u0639\u0646\u0627\u0648\u064a\u0646 URL", "title_local": "\u0645\u0644\u0641\u0627\u062a \u0645\u062d\u0644\u064a\u0629", "description_local": "\u0627\u0644\u0635\u0648\u0631\u062a\u0627\u0646 \u0645\u0632\u0648\u062f\u062a\u0627\u0646 \u0628\u0645\u0644\u0641\u064a\u0646 \u0645\u062d\u0644\u064a\u064a\u0646", "title_gifcreation": "\u0625\u0646\u0634\u0627\u0621 GIF", "text_preview": "\u062a\u062d\u062a\u0627\u062c \u0625\u0644\u0649 \u062a\u062d\u062f\u064a\u062f \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646 \u0639\u0644\u0649 \u0627\u0644\u064a\u0633\u0627\u0631 \u0648\u0627\u0646\u0642\u0631 \u0641\u0648\u0642 \u0627\u0644\u0632\u0631 \u0644\u0644\u0645\u0639\u0627\u064a\u0646\u0629", "input_label1": "\u0631\u0627\u0628\u0637 \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u0634\u0628\u0648\u0647\u0629 \u0623\u0648 \u0627\u0644\u0645\u062a\u063a\u064a\u0631\u0629", "input_label2": "\u0631\u0627\u0628\u0637 \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0623\u0635\u0644\u064a\u0629 \u0627\u0644\u0645\u0641\u062a\u0631\u0636\u0629", "input_placeholder": "\u0627\u0644\u0635\u0642 \u0627\u0644\u0631\u0627\u0628\u0637 \u0647\u0646\u0627", "title_preview": "\u0645\u0639\u0627\u064a\u0646\u0629 GIF", "error_homo": "\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u062a\u0637\u0627\u0628\u0642 \u0628\u064a\u0646 \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646.", "button_new": "GIF \u062c\u062f\u064a\u062f", "IPOL_IMAGE_UPLOAD_EXCEEDED": "\u064a\u062a\u062c\u0627\u0648\u0632 \u062d\u062c\u0645 \u0627\u0644\u0635\u0648\u0631 \u0627\u0644\u062d\u062f 1 \u0645\u064a\u062c\u0627\u0628\u0627\u064a\u062a", "IPOL_REMOTE_SERVICE_ERROR": "\u062d\u062f\u062b \u062e\u0637\u0623 \u0641\u064a \u0627\u0644\u0634\u0628\u0643\u0629 \u0623\u062b\u0646\u0627\u0621 \u0645\u0639\u0627\u0644\u062c\u0629 \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646", "IPOL_RESOURCE_NOT_FOUND": "\u0643\u0627\u0646 \u062d\u062f\u062b \u062e\u0637\u0623 \u062f\u0627\u062e\u0644\u064a \u0623\u062b\u0646\u0627\u0621 \u0645\u0639\u0627\u0644\u062c\u0629 \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646", "IPOL_FILE_IMAGE_ERROR": "\u062d\u062f\u062b \u062e\u0637\u0623 \u0623\u062b\u0646\u0627\u0621 \u0635\u064a\u0627\u063a\u0629 \u0627\u0644\u0635\u0648\u0631\u0629", "IPOL_BAD_URL_ERROR": "\u0635\u064a\u063a\u0629 \u0639\u0646\u0627\u0648\u064a\u0646 URL \u063a\u064a\u0631 \u0635\u0627\u0644\u062d\u0629", "NO_MATCHES_FOUND": "\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u062a\u0637\u0627\u0628\u0642 \u0628\u064a\u0646 \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646", "INTERNAL_SERVER_ERROR": "\u062d\u062f\u062b \u062e\u0637\u0623 \u062f\u0627\u062e\u0644\u064a \u0623\u062b\u0646\u0627\u0621 \u0645\u0639\u0627\u0644\u062c\u0629 \u0627\u0644\u0635\u0648\u0631\u062a\u064a\u0646", "button_play": "\u062a\u0634\u063a\u064a\u0644 GIF", "button_modify": "\u062a\u0639\u062f\u064a\u0644 \u0627\u0644\u062a\u0639\u0644\u064a\u0642", "button_add": "\u0625\u0636\u0627\u0641\u0629 \u062a\u0639\u0644\u064a\u0642", "button_remove": "\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u062a\u0639\u0644\u064a\u0642", "fake_annotation_tip": "\u064a\u0645\u0643\u0646 \u0625\u0636\u0627\u0641\u0629 \u062a\u0639\u0644\u064a\u0642 \"\u0645\u0632\u064a\u0641\" \u0625\u0644\u0649 \u0627\u0644\u0635\u0648\u0631\u0629 \u0627\u0644\u0645\u0639\u062f\u0644\u0629.", "text_size_label": "\u062d\u062c\u0645 \u0627\u0644\u0646\u0635", "colour_label": "\u0644\u0648\u0646", "colour_red": "\u0623\u062d\u0645\u0631", "colour_blue": "\u0623\u0632\u0631\u0642", "colour_white": "\u0623\u0628\u064a\u0636", "draggable_text_tip": "\u064a\u0645\u0643\u0646 \u0633\u062d\u0628 \u0627\u0644\u0646\u0635 \u0625\u0644\u0649 \u0645\u0648\u0636\u0639 \u0623\u0643\u062b\u0631 \u0645\u0644\u0627\u0621\u0645\u0629", "fake_annotation": "\u0645\u0632\u064a\u0641"} \ No newline at end of file diff --git a/public/locales/en/components/NavItems/tools/C2pa.json b/public/locales/en/components/NavItems/tools/C2pa.json index ff37f2caf..8da9918fa 100644 --- a/public/locales/en/components/NavItems/tools/C2pa.json +++ b/public/locales/en/components/NavItems/tools/C2pa.json @@ -1 +1 @@ -{"c2pa_title": "C2pa", "c2pa_description": "It reads an image's C2pa data.", "c2pa_results_title": "Results", "c2pa_information": "C2pa information", "no_c2pa_info": "No c2pa data available for this image.", "content_credentials_unknown_source": "This content credential was issued by an unknown source.", "content_credentials_invalid": "This content credential is not valid, meaning anyone could have modified this image's c2pa information.", "content_credentials_title": "Content credentials", "content_credentials_issuer": "Issuer: ", "content_credentials_date_issued": "Date issued: ", "credit_title": "Credit", "credit_producer": "Produced by:", "credit_social": "Socials", "credit_no_info": "No producer information for this image", "capture_info_title": "Capture Information", "capture_info_make": "Make: ", "capture_info_model": "Model: ", "capture_info_date": "Date: ", "capture_info_longitude": "Longitude: ", "capture_info_latitude": "Latitude: ", "capture_info_more_results": "See more capture information", "capture_info_hide": "Hide capture information", "capture_no_info": "No capture information available.", "process_title": "Creation Process", "process_edits": "Edits", "process_ingredients": "Ingredients", "process_no_info": "No process information for this image.", "previous_image": "Previous image", "first_image": "First image", "content_credential_explanation": "The issuer is the organisation, device or individual that recorded the information and signed the Content Credential validating the manifest containing this data.", "credit_explanation": "This is information the producer of this data chose to share.", "capture_info_explanation": "Data sourced from the camera used to capture the image. This data can be edited by the producer.", "process_explanation": "This information was recorded by the app or device used to produce the image.", "child_depth_exceeded": "The main image has too many ingredients, the data of this image could not be read.", "submit_button": "Submit", "button_localfile": "Local file", "image_link": "Image link", "placeholder": "Paste the URL here", "geo_maps": "Open in Google Maps"} \ No newline at end of file +{"c2pa_title": "C2pa", "c2pa_description": "It reads an image or video's C2pa data.", "c2pa_results_title": "Results", "c2pa_information": "C2pa information", "no_c2pa_info_image": "No c2pa data available for this image.", "no_c2pa_info_video": "No c2pa data available for this video.", "content_credentials_unknown_source": "This content credential was issued by an unknown source.", "content_credentials_invalid": "This content credential is not valid, meaning anyone could have modified this image's c2pa information.", "content_credentials_title": "Content credentials", "content_credentials_issuer": "Issuer: ", "content_credentials_date_issued": "Date issued: ", "credit_title": "Credit", "credit_producer": "Produced by:", "credit_social": "Socials", "credit_no_info_image": "No producer information for this image", "credit_no_info_video": "No producer information for this video.", "capture_info_title": "Capture Information", "capture_info_make": "Make: ", "capture_info_model": "Model: ", "capture_info_date": "Date: ", "capture_info_longitude": "Longitude: ", "capture_info_latitude": "Latitude: ", "capture_info_more_results": "See more capture information", "capture_info_hide": "Hide capture information", "capture_no_info": "No capture information available.", "process_title": "Creation Process", "process_edits": "Edits", "process_ingredients": "Ingredients", "process_no_info_image": "No process information for this image.", "process_no_info_video": "No process information for this video.", "previous_image": "Previous image", "first_image": "First image", "content_credential_explanation": "The issuer is the organisation, device or individual that recorded the information and signed the Content Credential validating the manifest containing this data.", "credit_explanation": "This is information the producer of this data chose to share.", "capture_info_explanation": "Data sourced from the camera used to capture the image or video. This data can be edited by the producer.", "process_explanation": "This information was recorded by the app or device used to produce the image or video.", "child_depth_exceeded_image": "The main image has too many ingredients, the data of this image could not be read.", "child_depth_exceeded_video": "The main video has too many ingredients, the data of this video could not be read.", "submit_button": "Submit", "button_localfile": "Local file", "image_link": "Image or Video link", "placeholder": "Paste the URL here", "geo_maps": "Open in Google Maps"} \ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json index c69caba88..e49d3bdbf 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -13,7 +13,8 @@ }, "permissions": [ "contextMenus", - "activeTab" + "activeTab", + "scripting" ], "host_permissions": [ "" @@ -22,5 +23,14 @@ "16": "img/icon-16.png", "48": "img/icon-48.png", "128": "img/icon-128.png" - } + }, + "content_security_policy": { + "extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self';" + }, + "web_accessible_resources": [ + { + "resources": [ "toolkit_bg.wasm" ], + "matches": [ "" ] + } + ] } diff --git a/src/components/NavBar/images/SVG/Image/C2pa.svg b/src/components/NavBar/images/SVG/Image/C2pa.svg new file mode 100644 index 000000000..b6739c2c0 --- /dev/null +++ b/src/components/NavBar/images/SVG/Image/C2pa.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/NavItems/tools/C2pa/C2pa.jsx b/src/components/NavItems/tools/C2pa/C2pa.jsx new file mode 100644 index 000000000..def129d9f --- /dev/null +++ b/src/components/NavItems/tools/C2pa/C2pa.jsx @@ -0,0 +1,94 @@ +import { Box, Card, CardHeader, Grid, LinearProgress } from "@mui/material"; +import HeaderTool from "components/Shared/HeaderTool/HeaderTool"; +import useMyStyles from "components/Shared/MaterialUiStyles/useMyStyles"; +import StringFileUploadField from "components/Shared/StringFileUploadField"; +import { useState } from "react"; +import getC2paData from "./Hooks/useGetC2paData"; +import { useDispatch, useSelector } from "react-redux"; +import C2paResults from "./Results/C2paResults"; +import { c2paStateCleaned } from "redux/reducers/tools/c2paReducer"; +import { i18nLoadNamespace } from "components/Shared/Languages/i18nLoadNamespace"; + +const C2paData = () => { + const isLoading = useSelector((state) => state.c2pa.loading); + const result = useSelector((state) => state.c2pa.result); + + const [input, setInput] = useState(""); + const [imageFile, setImageFile] = useState(undefined); + + const dispatch = useDispatch(); + + const classes = useMyStyles(); + + const keyword = i18nLoadNamespace("components/NavItems/tools/C2pa"); + + const handleSubmit = () => { + dispatch(c2paStateCleaned()); + + if (imageFile) { + const url = URL.createObjectURL(imageFile); + getC2paData(url, dispatch); + } else if (input) { + getC2paData(input, dispatch); + } + }; + + const handleClose = () => { + setImageFile(undefined); + setInput(""); + dispatch(c2paStateCleaned()); + }; + + return ( + + + + + {keyword("image_link")} + + } + className={classes.headerUploadedImage} + /> + + +
+ + +
+ + + {isLoading && ( + + + + )} +
+ + {result && } + + ); +}; + +export default C2paData; diff --git a/src/components/NavItems/tools/C2pa/Hooks/useGetC2paData.jsx b/src/components/NavItems/tools/C2pa/Hooks/useGetC2paData.jsx new file mode 100644 index 000000000..bd19c3462 --- /dev/null +++ b/src/components/NavItems/tools/C2pa/Hooks/useGetC2paData.jsx @@ -0,0 +1,273 @@ +import { + createC2pa, + selectEditsAndActivity, + selectProducer, + selectSocialAccounts, +} from "c2pa"; +import { + c2paCurrentImageIdSet, + c2paLoadingSet, + c2paMainImageIdSet, + c2paResultSet, +} from "redux/reducers/tools/c2paReducer"; + +/** + * This function reads the image's capture information from the assertions + * @param {Array} assertions array containing the assertions of a manifest + * @returns {Object} parsed capture information + */ +const exifData = (assertions) => { + let captureInfo = null; + let allCaptureInfo = null; + + for (let i = 0; i < assertions.length; i++) { + if (assertions[i].label === "stds.exif") { + if (!captureInfo) captureInfo = {}; + if (assertions[i]["data"]["EXIF:Make"]) { + captureInfo.make = assertions[i]["data"]["EXIF:Make"]; + } + if (assertions[i]["data"]["exif:Make"]) { + captureInfo.make = assertions[i]["data"]["exif:Make"]; + } + if (assertions[i]["data"]["EXIF:Model"]) { + captureInfo.model = assertions[i]["data"]["EXIF:Model"]; + } + if (assertions[i]["data"]["exif:Model"]) { + captureInfo.model = assertions[i]["data"]["exif:Model"]; + } + if (assertions[i]["data"]["EXIF:DateTimeOriginal"]) { + captureInfo.dateTime = assertions[i]["data"]["EXIF:DateTimeOriginal"]; + } + if (assertions[i]["data"]["exif:DateTimeOriginal"]) { + captureInfo.dateTime = assertions[i]["data"]["exif:DateTimeOriginal"]; + } + if (assertions[i]["data"]["EXIF:GPSLatitude"]) { + captureInfo.latitude = assertions[i]["data"]["EXIF:GPSLatitude"]; + } + if (assertions[i]["data"]["exif:GPSLatitude"]) { + captureInfo.latitude = assertions[i]["data"]["exif:GPSLatitude"]; + } + if (assertions[i]["data"]["EXIF:GPSLongitude"]) { + captureInfo.longitude = assertions[i]["data"]["EXIF:GPSLongitude"]; + } + if (assertions[i]["data"]["exif:GPSLongitude"]) { + captureInfo.longitude = assertions[i]["data"]["exif:GPSLongitude"]; + } + + if (!allCaptureInfo) allCaptureInfo = []; + allCaptureInfo.push(assertions[i]); + } + } + if (captureInfo) captureInfo.allCaptureInfo = allCaptureInfo; + return captureInfo; +}; + +/** + * This function will recursively parse de data from a c2pa manifest and its children, and add it all to the result object + * @param {Object} manifest the c2pa manifest to be read + * @param {string=} parent id of manifest's parent if there is one + * @param {Object} result Object containing the data for the manifests that have already been read + * @param {string} url image corresponding with the manifest + * @param {number} depth nunber of ancestors of the manifest already read, used to avoid having a result object that is too large if a manifest has many descendants + * @returns {Object} contains the id of the manifest that was just read, as well as the updated results + */ +async function readManifest(manifest, parent, result, url, depth) { + // the object that will contain the data from this manifest, as well as the parent it + const res = { + url: url, + parent: parent, + }; + + if (manifest) { + const manifestId = manifest.instanceId; + + const manifestData = {}; + + manifestData.title = manifest.title; + manifestData.signatureInfo = { + issuer: manifest.signatureInfo.issuer, + time: manifest.signatureInfo.time, + }; + + const editsAndActivity = await selectEditsAndActivity(manifest); + if (editsAndActivity) manifestData.editsAndActivity = editsAndActivity; + + const captureInfo = exifData(manifest.assertions.data); + if (captureInfo) manifestData.captureInfo = captureInfo; + + if (manifest.ingredients.length > 0) { + let children = []; + + for (let i = 0; i < manifest.ingredients.length; i++) { + let thumbnail = manifest.ingredients[i].thumbnail; + let ingredientUrl = thumbnail.getUrl(); + let validationIssues = getValidationIssues( + manifest.ingredients[i].validationStatus, + ); + let ingredientId; + + // if a child has more than 5 ancestors, c2pa data will not be shown. + if (depth < 5) { + if (manifest.ingredients[i].manifest) { + let { id, data } = await readManifest( + manifest.ingredients[i].manifest, + manifestId, + result, + ingredientUrl.url, + depth + 1, + ); + ingredientId = id; + result = data; + result[id].validationIssues = validationIssues; + } else { + ingredientId = manifest.ingredients[i].instanceId; + result[ingredientId] = { + url: ingredientUrl.url, + parent: manifestId, + }; + } + } else { + ingredientId = manifest.ingredients[i].instanceId; + result[ingredientId] = { + url: ingredientUrl.url, + parent: manifestId, + depthExceeded: true, + }; + } + children.push(ingredientId); + manifestData.children = children; + } + } + + const producer = selectProducer(manifest); + if (producer) manifestData.producer = { name: producer.name }; + + const producerSocials = selectSocialAccounts(manifest); + if (producerSocials && producerSocials.length > 0) { + manifestData.producer + ? (manifestData.producer.socials = producerSocials) + : (manifestData.producer = { socials: producerSocials.name }); + } + + res.manifestData = manifestData; + + result[manifestId] = res; + + return { id: manifestId, data: result }; + } +} + +/** + * + * @param {Array} validationStatus Array containing validation issues if there are any + * @returns {Object} contains a boolean determining wheter or not the issues are do to trust in a source, as well as the messages for the issues + */ +function getValidationIssues(validationStatus) { + if (validationStatus.length > 0) { + let errorMessages = []; + let trustedSourceIssue = false; + + for (let i = 0; i < validationStatus.length; i++) { + if (validationStatus[i].code === "signingCredential.untrusted") { + trustedSourceIssue = true; + } + errorMessages.push(validationStatus[i].explanation); + } + return { trustedSourceIssue, errorMessages }; + } else { + return null; + } +} + +/** + * + * @param {string} file + * @returns + */ +async function loadTrustResource(file) { + const res = await fetch(`https://contentcredentials.org/trust/${file}`); + + return res.text(); +} + +/** + * + * @returns {Object} settings allowing the c2pa.read function to determine if the source of the Content Credentials is on adobe's trusted list + */ +async function getToolkitSettings() { + const [trustAnchors, allowedList, trustConfig] = await Promise.all( + ["anchors.pem", "allowed.sha256.txt", "store.cfg"].map(loadTrustResource), + ); + + return { + trust: { + trustConfig, + trustAnchors, + allowedList, + }, + verify: { + verifyTrust: true, + }, + }; +} + +/** + * + * @param {Object} url the url of the image containing c2pa data + * @param {function} dispatch + */ + +async function getC2paData(url, dispatch) { + const settings = await getToolkitSettings(); + + const c2pa = await createC2pa({ + wasmSrc: "./c2paAssets/toolkit_bg.wasm", + workerSrc: "./c2paAssets/c2pa_worker_min.js", + }); + + dispatch(c2paLoadingSet(true)); + // const url = URL.createObjectURL(image); + + try { + const { manifestStore } = await c2pa.read(url, { + settings: settings, + }); + + if (manifestStore) { + const activeManifest = manifestStore.activeManifest + ? manifestStore.activeManifest + : null; + + let validationIssues = null; + if (manifestStore.validationStatus.length > 0) { + validationIssues = getValidationIssues(manifestStore.validationStatus); + } + if (activeManifest) { + let { id, data } = await readManifest(activeManifest, null, {}, url, 0); + data[id].validationIssues = validationIssues; + dispatch(c2paResultSet(data)); + + // each manifest has an id. The current image id determines which image's data is displayed + // and the main image id is used to return to the first image if a child image is being displayed + + dispatch(c2paCurrentImageIdSet(id)); + dispatch(c2paMainImageIdSet(id)); + } else { + console.log("no active manifest"); + } + } else { + // if there is no manifest store, the only data saved for an image is its url + const data = {}; + data["id"] = { url: url }; + dispatch(c2paResultSet(data)); + dispatch(c2paCurrentImageIdSet("id")); + dispatch(c2paMainImageIdSet("id")); + } + dispatch(c2paLoadingSet(false)); + } catch (err) { + console.error("Error reading image:", err); + dispatch(c2paLoadingSet(false)); + } +} + +export default getC2paData; diff --git a/src/components/NavItems/tools/C2pa/Results/C2paResults.jsx b/src/components/NavItems/tools/C2pa/Results/C2paResults.jsx new file mode 100644 index 000000000..c3d267793 --- /dev/null +++ b/src/components/NavItems/tools/C2pa/Results/C2paResults.jsx @@ -0,0 +1,515 @@ +import { + Alert, + Box, + Card, + CardContent, + CardHeader, + Divider, + Grid, + Stack, + Typography, + IconButton, + Button, + Accordion, + AccordionDetails, + AccordionSummary, + Tooltip, +} from "@mui/material"; + +import { + Close, + ExpandMore, + KeyboardArrowLeft, + KeyboardDoubleArrowLeft, +} from "@mui/icons-material"; +import { useDispatch, useSelector } from "react-redux"; +import { c2paCurrentImageIdSet } from "redux/reducers/tools/c2paReducer"; +import moment from "moment"; +import { i18nLoadNamespace } from "components/Shared/Languages/i18nLoadNamespace"; +import { MapContainer, Marker, Popup, TileLayer } from "react-leaflet"; +import { Icon as GeoIcon } from "leaflet"; +import { useEffect, useState } from "react"; +import MapIcon from "@mui/icons-material/Map"; +import HelpIcon from "@mui/icons-material/Help"; + +/** + * + * @param {Object} result Object containing the parsed c2pa information for this image + * @param {function} handleClose Closes the result + * @returns {React.JSX.Element} + */ + +const C2paResults = (props = { result, handleClose }) => { + const currentImageId = useSelector((state) => state.c2pa.currentImageId); + const mainImageId = useSelector((state) => state.c2pa.mainImageId); + + const data = props.result; + + const url = data[currentImageId].url; + const parentId = data[currentImageId].parent; + const manifestData = data[currentImageId].manifestData; + const validationIssues = data[currentImageId].validationIssues; + + const latitude = + manifestData && manifestData.captureInfo + ? manifestData.captureInfo.latitude + : null; + const longitude = + manifestData && manifestData.captureInfo + ? manifestData.captureInfo.longitude + : null; + + const depthExceeded = data[currentImageId].depthExceeded; + + const [isImage, setIsImage] = useState(true); + + const dispatch = useDispatch(); + + const keyword = i18nLoadNamespace("components/NavItems/tools/C2pa"); + + const handleClose = () => { + props.handleClose(); + }; + + const setImage = (ingredientId) => { + dispatch(c2paCurrentImageIdSet(ingredientId)); + }; + + useEffect(() => { + var testImage = new Image(); + testImage.src = url; + testImage.onload = function () { + setIsImage(true); + }; + testImage.onerror = function () { + setIsImage(false); + }; + }, []); + + /** + * + * @param {String} title the keywoed for the title + * @param {String} information the keyword for the title description + * @returns {React.JSX.Element} + */ + const title = (title, information) => { + return ( + + + {keyword(title)} + + + {keyword(information)}}> + + + + ); + }; + + const validationMessage = (issues) => { + if (issues.trustedSourceIssue && issues.errorMessages.length <= 2) { + return keyword("content_credentials_unknown_source"); + } else { + return keyword("content_credentials_invalid"); + } + }; + + return ( + + + + + } + /> + + + + + {isImage ? ( + + ) : ( + + )} + + + + + + {!manifestData ? ( + + {depthExceeded ? ( + + {isImage + ? keyword("child_depth_exceeded_image") + : keyword("child_depth_exceeded_video")} + + ) : ( + + {isImage + ? keyword("no_c2pa_info_image") + : keyword("no_c2pa_info_video")} + + )} + + + ) : ( + <> + {validationIssues ? ( + + + {validationMessage(validationIssues)} + + + + ) : null} + + {keyword("c2pa_information")} + + + + {manifestData.title} + + + + {title( + "content_credentials_title", + "content_credential_explanation", + )} + + + + {keyword("content_credentials_issuer") + + manifestData.signatureInfo.issuer} + + + {keyword("content_credentials_date_issued") + + moment(manifestData.signatureInfo.time).format( + "D.MM.yyyy", + )} + + + + + + + + + + {title("credit_title", "credit_explanation")} + + {manifestData.producer ? ( + <> + + {manifestData.producer.name + ? keyword("credit_producer") + + manifestData.producer.name + : ""} + + {manifestData.producer.socials ? ( + <> + + {keyword("credit_social")} + + + {manifestData.producer.socials.map( + (obj, key) => { + return ( + + {obj["@id"]} + + ); + }, + )} + + + ) : null} + + ) : ( + + {isImage + ? keyword("credit_no_info_image") + : keyword("credit_no_info_video")} + + )} + + + + + + + + + {title( + "capture_info_title", + "capture_info_explanation", + )} + + {manifestData.captureInfo ? ( + <> + {manifestData.captureInfo.make ? ( + + {keyword("capture_info_make") + + manifestData.captureInfo.make} + + ) : null} + {manifestData.captureInfo.model ? ( + + {keyword("capture_info_model") + + manifestData.captureInfo.model} + + ) : null} + {manifestData.captureInfo.dateTime ? ( + + {keyword("capture_info_date") + + moment( + manifestData.captureInfo.dateTime, + ).format("D.MM.yyyy")} + + ) : null} + {manifestData.captureInfo.latitude ? ( + <> + + {keyword("capture_info_latitude") + + manifestData.captureInfo.latitude} + + + ) : null} + {manifestData.captureInfo.longitude ? ( + <> + + {keyword("capture_info_longitude") + + manifestData.captureInfo.longitude} + + + ) : null} + {longitude && latitude ? ( + + {!isNaN(longitude) && !isNaN(latitude) ? ( + <> + + + + + + + ) : null} + + + + ) : null} + {manifestData.captureInfo.allCaptureInfo ? ( + + + } + > + + {keyword("capture_info_more_results")} + + + + {manifestData.captureInfo.allCaptureInfo.map( + (obj, key) => { + return ( + + {Object.keys(obj.data).map( + (objKey, index) => { + if ( + typeof obj.data[objKey] === + "string" + ) { + return ( + + {objKey + + ": " + + obj.data[objKey]} + + ); + } else { + return null; + } + }, + )} + + ); + }, + )} + + + + ) : null} + + ) : ( + + {keyword("capture_no_info")} + + )} + + + + + + + + {title("process_title", "process_explanation")} + + {manifestData.editsAndActivity || + manifestData.children ? ( + + {manifestData.editsAndActivity ? ( + <> + + {keyword("process_edits")} + + + + {manifestData.editsAndActivity.map( + (obj, key) => { + return ( + + + + + {obj.label + ":"} + + + + {obj.description} + + + + ); + }, + )} + + + ) : null} + + {manifestData.children ? ( + <> + + {keyword("process_ingredients")} + + + + {manifestData.children.map((obj, key) => { + return ( + + { + setImage(obj); + }} + /> + + ); + })} + + + ) : null} + + ) : ( + + {isImage + ? keyword("process_no_info_image") + : keyword("process_no_info_video")} + + )} + + + + + )} + {parentId ? ( + + + + {parentId !== mainImageId ? ( + + ) : null} + + ) : null} + + + + + + ); +}; + +export default C2paResults; diff --git a/src/constants/tools.jsx b/src/constants/tools.jsx index 3a3a6edaa..faea0a371 100644 --- a/src/constants/tools.jsx +++ b/src/constants/tools.jsx @@ -23,6 +23,7 @@ import ForensicIcon from "../components/NavBar/images/SVG/Image/Forensic.svg"; import OcrIcon from "../components/NavBar/images/SVG/Image/OCR.svg"; import GifIcon from "../components/NavBar/images/SVG/Image/Gif.svg"; import GeolocationIcon from "../components/NavBar/images/SVG/Image/Geolocation.svg"; +import C2paIcon from "../components/NavBar/images/SVG/Image/C2pa.svg"; import TwitterSearchIcon from "../components/NavBar/images/SVG/Search/Twitter_search.svg"; import CovidSearchIcon from "../components/NavBar/images/SVG/Search/Covid19.svg"; @@ -54,6 +55,7 @@ import TwitterSna from "../components/NavItems/tools/TwitterSna/TwitterSna"; import Archive from "../components/NavItems/tools/Archive"; import About from "../components/NavItems/About/About"; import { ROLES } from "./roles"; +import C2paData from "components/NavItems/tools/C2pa/C2pa"; /** * Represents the categories to which the tools belong @@ -234,6 +236,10 @@ const aboutSvgIcon = (props) => { return ; }; +const c2paSvgIcon = (props) => { + return ; +}; + /** * The Homepage that lists all the tools available * @type {Tool} @@ -591,6 +597,19 @@ const about = new Tool( null, ); +const c2paData = new Tool( + "navbar_c2pa", + "navbar_c2pa_description", + c2paSvgIcon, + TOOLS_CATEGORIES.IMAGE, + [TOOL_STATUS_ICON.NEW, TOOL_STATUS_ICON.LOCK], + [ROLES.BETA_TESTER], + "c2pa", + TOOL_GROUPS.VERIFICATION, + , + null, +); + export const tools = Object.freeze([ toolsHome, videoAnalysis, @@ -617,4 +636,5 @@ export const tools = Object.freeze([ dataAnalysisCrowdtangle, archiving, about, + c2paData, ]); diff --git a/src/redux/reducers/index.jsx b/src/redux/reducers/index.jsx index 0269ff87a..2b579e6a8 100644 --- a/src/redux/reducers/index.jsx +++ b/src/redux/reducers/index.jsx @@ -27,6 +27,7 @@ import geolocationReducer from "./tools/geolocationReducer"; import twitterSnaReducer from "./tools/twitterSnaReducer"; import languageSupportReducer from "./languageSupportReducer"; import loccusReducer from "./tools/loccusReducer"; +import c2paReducer from "./tools/c2paReducer"; const allReducers = combineReducers({ language: languageReducer, @@ -57,6 +58,7 @@ const allReducers = combineReducers({ deepfakeVideo: deepfakeReducerVideo, geolocation: geolocationReducer, languagesSupport: languageSupportReducer, + c2pa: c2paReducer, }); export default allReducers; diff --git a/src/redux/reducers/tools/c2paReducer.jsx b/src/redux/reducers/tools/c2paReducer.jsx new file mode 100644 index 000000000..c7b61df04 --- /dev/null +++ b/src/redux/reducers/tools/c2paReducer.jsx @@ -0,0 +1,59 @@ +const { createSlice } = require("@reduxjs/toolkit"); + +const initialState = { + result: null, + loading: false, + url: null, + currentImageId: null, + mainImageId: null, + validationIssues: false, +}; + +const c2paSlice = createSlice({ + name: "c2pa", + initialState, + reducers: { + c2paResultSet(state, action) { + if (!state.result) state.result = {}; + state.result = action.payload; + }, + c2paCurrentImageIdSet(state, action) { + state.currentImageId = action.payload; + }, + c2paMainImageIdSet(state, action) { + state.mainImageId = action.payload; + }, + c2paUrlSet(state, action) { + state.url = action.payload; + }, + c2paLoadingSet(state, action) { + state.loading = action.payload; + }, + c2paStateCleaned(state, action) { + state.result = null; + state.url = null; + state.currentManifest = null; + state.validationIssues = false; + }, + c2paIngredientResultCleaned(state, action) { + state.ingredientResult = null; + }, + c2paValidationIssuesSet(state, action) { + state.validationIssues = action.payload; + }, + }, +}); + +export const { + c2paResultSet, + c2paCurrentImageIdSet, + c2paMainImageIdSet, + c2paUrlSet, + c2paLoadingSet, + c2paStateCleaned, + c2paIngredientResultCleaned, + c2paValidationIssuesSet, +} = c2paSlice.actions; + +const c2paReducer = c2paSlice.reducer; +export default c2paReducer; diff --git a/webpack.config.js b/webpack.config.js index 9c79d429a..547b3f6e4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -89,4 +89,7 @@ module.exports = { extensions: [".js", ".jsx"], modules: ["node_modules", "src"], }, + experiments: { + asyncWebAssembly: true, + } }; \ No newline at end of file