From 86c6df3ef7fdf8473322ea563af703729dc3494d Mon Sep 17 00:00:00 2001 From: hackerman <3372410+aeneasr@users.noreply.github.com> Date: Mon, 6 Apr 2020 22:34:50 +0200 Subject: [PATCH] fix: use js to render svg animations (#79) Resolves a new sfari 13.1+ bug where animations stopped working. --- .DS_Store | Bin 8196 -> 0 bytes .eslintignore | 1 + gatsby-config.js | 8 + package-lock.json | 861 +++++++++---- package.json | 2 + src/.DS_Store | Bin 8196 -> 12292 bytes src/components/stats.tsx | 1 - src/html.js | 124 +- src/images/.DS_Store | Bin 10244 -> 12292 bytes src/images/animations/kratos.svg | 22 + src/pages/kratos.tsx | 10 +- src/pages/markdown/imprint.md | 16 +- static/scripts/keyshapejs-1.1.0.min.js | 1566 ++++++++++++++++++++++++ typings.d.ts | 18 +- 14 files changed, 2335 insertions(+), 294 deletions(-) delete mode 100644 .DS_Store create mode 100644 .eslintignore create mode 100644 src/images/animations/kratos.svg create mode 100644 static/scripts/keyshapejs-1.1.0.min.js diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 97e50ac293dac8ae5493e4719254921090c754da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHM&1(}u6o1>K$tJd%g3zj$1+93nB@sUkQcTknEU1VndQeF>A5CL7yCIu2)Y_7Z zh-WW~f?h=gk6si7FXBOZ@(&U5sK5DWnoLsZNtDjO%$w}|esA7;Gdt6_B_bo$C?tr+ zh{!}`GPVy*pTfpj?I{ED$uUR+e4-^P(+U-xQX<9bOdw+bOdw+bOio|2;k0U z#oXcE7o)n>5zrCXlM!I&gN4duQp%Q){OCZ#Qvk>y9`k}e@&L}Uq)bZL5|UG)Q)CZ@ zq#82CFa#ar7K1}3rECc)=wt{w8FFSrW+(=q9XyM}$w&&RTO9!%f!+wP+})%}vZ+S- z&ip;^RjL9$@~9uC;-%9$$IG#?wRf9G-#_^{-5*!j6|TCJ$ZXGPK^5%EcH1@QczHP| zd(F?Ip7_NJgHssz92j|8rUq3N^vge^**A;!{NWcHz4|&mem=fDE3+w<0{YsSa6CIQJD!5F8I^RrhxVH$o+@ z(T7c|G=a7TUXy&xQR`>jfURhVDH`(NyR-=ZN`3iX75;vO?}E?#?Gu^6l)@cWxIXOe zYjxn2!VJ?Tnxh$-r7M)7+3sit4=HGqE+b0Iu!{NRP*K4@Q1C;Dfbb$q72azwmbx0j z9|~^-t1Nc44bO^L4+m_v%Xu`=ce`gE%qtp(6b(D^HWgk7yara^fq(h#IYJi{Y=o{M zZqt-TRAymWMcs{|*9s%R*G17AKGGkRYx-6B?tjTuow8q#$G;f^f#6^$Y?@IsIvl;7 zS@N2hx?OMhDZ6%){km$`mvXW{?|DwUZ|AO;i_L88;Edz5iK)4T%Ie*x~d|aMI?a}QssCTsU z>@hwhp>#{@N~Y#Io?F5bW<2 PpJ#Xa{^y%;4>rF6Q*=o8 diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000000..fbd4169a62 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +static/scripts/* \ No newline at end of file diff --git a/gatsby-config.js b/gatsby-config.js index 337ddec64f..02fc405a8e 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -29,6 +29,14 @@ module.exports = { }, }, `gatsby-plugin-sharp`, + { + resolve: "gatsby-plugin-react-svg", + options: { + rule: { + include: /.*images\/animations\/.*\.svg$/ // See below to configure properly + } + } + }, { resolve: `gatsby-transformer-remark`, options: { diff --git a/package-lock.json b/package-lock.json index c535d54572..10b4762e4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1058,42 +1058,56 @@ } }, "@jimp/bmp": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.6.8.tgz", - "integrity": "sha512-uxVgSkI62uAzk5ZazYHEHBehow590WAkLKmDXLzkr/XP/Hv2Fx1T4DKwJ/15IY5ktq5VAhAUWGXTyd8KWFsx7w==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.9.8.tgz", + "integrity": "sha512-CZYQPEC3iUBMuaGWrtIG+GKNl93q/PkdudrCKJR/B96dfNngsmoosEm3LuFgJHEcJIfvnJkNqKw74l+zEiqCbg==", "requires": { - "@jimp/utils": "^0.6.8", + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", "bmp-js": "^0.1.0", - "core-js": "^2.5.7" + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/core": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/core/-/core-0.6.8.tgz", - "integrity": "sha512-JOFqBBcSNiDiMZJFr6OJqC6viXj5NVBQISua0eacoYvo4YJtTajOIxC4MqWyUmGrDpRMZBR8QhSsIOwsFrdROA==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/core/-/core-0.9.8.tgz", + "integrity": "sha512-N4GCjcXb0QwR5GBABDK2xQ3cKyaF7LlCYeJEG9mV7G/ynBoRqJe4JA6YKU9Ww9imGkci/4A594nQo8tUIqdcBw==", "requires": { - "@jimp/utils": "^0.6.8", + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", "any-base": "^1.1.0", "buffer": "^5.2.0", - "core-js": "^2.5.7", + "core-js": "^3.4.1", "exif-parser": "^0.1.12", "file-type": "^9.0.0", "load-bmfont": "^1.3.1", - "mkdirp": "0.5.1", + "mkdirp": "^0.5.1", "phin": "^2.9.1", "pixelmatch": "^4.0.2", "tinycolor2": "^1.4.1" }, "dependencies": { "buffer": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", - "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.5.0.tgz", + "integrity": "sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww==", "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4" } }, + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + }, "file-type": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-9.0.0.tgz", @@ -1102,254 +1116,526 @@ } }, "@jimp/custom": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.6.8.tgz", - "integrity": "sha512-FrYlzZRVXP2vuVwd7Nc2dlK+iZk4g6IaT1Ib8Z6vU5Kkwlt83FJIPJ2UUFABf3bF5big0wkk8ZUihWxE4Nzdng==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.9.8.tgz", + "integrity": "sha512-1UpJjI7fhX02BWLJ/KEqPwkHH60eNkCNeD6hEd+IZdTwLXfZCfFiM5BVlpgiZYZJSsVoRiAL4ne2Q5mCiKPKyw==", "requires": { - "@jimp/core": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/core": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/gif": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/gif/-/gif-0.6.8.tgz", - "integrity": "sha512-yyOlujjQcgz9zkjM5ihZDEppn9d1brJ7jQHP5rAKmqep0G7FU1D0AKcV+Ql18RhuI/CgWs10wAVcrQpmLnu4Yw==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/gif/-/gif-0.9.8.tgz", + "integrity": "sha512-LEbfpcO1sBJIQCJHchZjNlyNxzPjZQQ4X32klpQHZJG58n9FvL7Uuh1rpkrJRbqv3cU3P0ENNtTrsBDxsYwcfA==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7", + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1", "omggif": "^1.0.9" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/jpeg": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/jpeg/-/jpeg-0.6.8.tgz", - "integrity": "sha512-rGtXbYpFXAn471qLpTGvhbBMNHJo5KiufN+vC5AWyufntmkt5f0Ox2Cx4ijuBMDtirZchxbMLtrfGjznS4L/ew==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/jpeg/-/jpeg-0.9.8.tgz", + "integrity": "sha512-5u29SUzbZ32ZMmOaz3gO0hXatwSCnsvEAXRCKZoPPgbsPoyFAiZKVxjfLzjkeQF6awkvJ8hZni5chM15SNMg+g==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7", + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1", "jpeg-js": "^0.3.4" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-blit": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.6.8.tgz", - "integrity": "sha512-7Tl6YpKTSpvwQbnGNhsfX2zyl3jRVVopd276Y2hF2zpDz9Bycow7NdfNU/4Nx1jaf96X6uWOtSVINcQ7rGd47w==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.9.8.tgz", + "integrity": "sha512-6xTDomxJybhBcby1IUVaPydZFhxf+V0DRgfDlVK81kR9kSCoshJpzWqDuWrMqjNEPspPE7jRQwHMs0FdU7mVwQ==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-blur": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.6.8.tgz", - "integrity": "sha512-NpZCMKxXHLDQsX9zPlWtpMA660DQStY6/z8ZetyxCDbqrLe9YCXpeR4MNhdJdABIiwTm1W5FyFF4kp81PHJx3Q==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.9.8.tgz", + "integrity": "sha512-dqbxuNFBRbmt35iIRacdgma7nlXklmPThsKcGWNTDmqb/hniK5IC+0xSPzBV4qMI2fLGP39LWHqqDZ0xDz14dA==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } + } + }, + "@jimp/plugin-circle": { + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-circle/-/plugin-circle-0.9.8.tgz", + "integrity": "sha512-+UStXUPCzPqzTixLC8eVqcFcEa6TS+BEM/6/hyM11TDb9sbiMGeUtgpwZP/euR5H5gfpAQDA1Ppzqhh5fuMDlw==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-color": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.6.8.tgz", - "integrity": "sha512-jjFyU0zNmGOH2rjzHuOMU4kaia0oo82s/7UYfn5h7OUkmUZTd6Do3ZSK1PiXA7KR+s4B76/Omm6Doh/0SGb7BQ==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.9.8.tgz", + "integrity": "sha512-SDHxOQsJHpt75hk6+sSlCPc2B3UJlXosFW+iLZ11xX1Qr0IdDtbfYlIoPmjKQFIDUNzqLSue/z7sKQ1OMZr/QA==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7", + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1", "tinycolor2": "^1.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-contain": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-contain/-/plugin-contain-0.6.8.tgz", - "integrity": "sha512-p/P2wCXhAzbmEgXvGsvmxLmbz45feF6VpR4m9suPSOr8PC/i/XvTklTqYEUidYYAft4vHgsYJdS74HKSMnH8lw==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-contain/-/plugin-contain-0.9.8.tgz", + "integrity": "sha512-oK52CPt7efozuLYCML7qOmpFeDt3zpU8qq8UZlnjsDs15reU6L8EiUbwYpJvzoEnEOh1ZqamB8F/gymViEO5og==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-cover": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-cover/-/plugin-cover-0.6.8.tgz", - "integrity": "sha512-2PvWgk+PJfRsfWDI1G8Fpjrsu0ZlpNyZxO2+fqWlVo6y/y2gP4v08FqvbkcqSjNlOu2IDWIFXpgyU0sTINWZLg==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-cover/-/plugin-cover-0.9.8.tgz", + "integrity": "sha512-nnamtHzMrNd5j5HRSPd1VzpZ8v9YYtUJPtvCdHOOiIjqG72jxJ2kTBlsS3oG5XS64h/2MJwpl/fmmMs1Tj1CmQ==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-crop": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.6.8.tgz", - "integrity": "sha512-CbrcpWE2xxPK1n/JoTXzhRUhP4mO07mTWaSavenCg664oQl/9XCtL+A0FekuNHzIvn4myEqvkiTwN7FsbunS/Q==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.9.8.tgz", + "integrity": "sha512-Nv/6AIp4aJmbSIH2uiIqm+kSoShKM8eaX2fyrUTj811kio0hwD3f/vIxrWebvAqwDZjAFIAmMufFoFCVg6caoQ==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-displace": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-displace/-/plugin-displace-0.6.8.tgz", - "integrity": "sha512-RmV2bPxoPE6mrPxtYSPtHxm2cGwBQr5a2p+9gH6SPy+eUMrbGjbvjwKNfXWUYD0leML+Pt5XOmAS9pIROmuruQ==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-displace/-/plugin-displace-0.9.8.tgz", + "integrity": "sha512-0OgPjkOVa2xdbqI8P6gBKX/UK36RbaYVrFyXL8Jy9oNF69+LYWyTskuCu9YbGxzlCVjY/JFqQOvrKDbxgMYAKA==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-dither": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-dither/-/plugin-dither-0.6.8.tgz", - "integrity": "sha512-x6V/qjxe+xypjpQm7GbiMNqci1EW5UizrcebOhHr8AHijOEqHd2hjXh5f6QIGfrkTFelc4/jzq1UyCsYntqz9Q==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-dither/-/plugin-dither-0.9.8.tgz", + "integrity": "sha512-jGM/4ByniZJnmV2fv8hKwyyydXZe/YzvgBcnB8XxzCq8kVR3Imcn+qnd2PEPZzIPKOTH4Cig/zo9Vk9Bs+m5FQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } + } + }, + "@jimp/plugin-fisheye": { + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-fisheye/-/plugin-fisheye-0.9.8.tgz", + "integrity": "sha512-VnsalrD05f4pxG1msjnkwIFi5QveOqRm4y7VkoZKNX+iqs4TvRnH5+HpBnfdMzX/RXBi+Lf/kpTtuZgbOu/QWw==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-flip": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-0.6.8.tgz", - "integrity": "sha512-4il6Da6G39s9MyWBEee4jztEOUGJ40E6OlPjkMrdpDNvge6hYEAB31BczTYBP/CEY74j4LDSoY5LbcU4kv06yA==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-flip/-/plugin-flip-0.9.8.tgz", + "integrity": "sha512-XbiZ4OfHD6woc0f6Sk7XxB6a7IyMjTRQ4pNU7APjaNxsl3L6qZC8qfCQphWVe3DHx7f3y7jEiPMvNnqRDP1xgA==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-gaussian": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-gaussian/-/plugin-gaussian-0.6.8.tgz", - "integrity": "sha512-pVOblmjv7stZjsqloi4YzHVwAPXKGdNaHPhp4KP4vj41qtc6Hxd9z/+VWGYRTunMFac84gUToe0UKIXd6GhoKw==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-gaussian/-/plugin-gaussian-0.9.8.tgz", + "integrity": "sha512-ZBl5RA6+4XAD+mtqLfiG7u+qd8W5yqq3RBNca8eFqUSVo1v+eB2tzeLel0CWfVC/z6cw93Awm/nVnm6/CL2Oew==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-invert": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-invert/-/plugin-invert-0.6.8.tgz", - "integrity": "sha512-11zuLiXDHr6tFv4U8aieXqNXQEKbDbSBG/h+X62gGTNFpyn8EVPpncHhOqrAFtZUaPibBqMFlNJ15SzwC7ExsQ==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-invert/-/plugin-invert-0.9.8.tgz", + "integrity": "sha512-ESploqCoF6qUv5IWhVLaO5fEcrYZEsAWPFflh6ROiD2mmFKQxfeK+vHnk3IDLHtUwWTkAZQNbk89BVq7xvaNpQ==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-mask": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-0.6.8.tgz", - "integrity": "sha512-hZJ0OiKGJyv7hDSATwJDkunB1Ie80xJnONMgpUuUseteK45YeYNBOiZVUe8vum8QI1UwavgBzcvQ9u4fcgXc9g==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-mask/-/plugin-mask-0.9.8.tgz", + "integrity": "sha512-zSvEisTV4iGsBReitEdnQuGJq9/1xB5mPATadYZmIlp8r5HpD72HQb0WdEtb51/pu9Odt8KAxUf0ASg/PRVUiQ==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-normalize": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-normalize/-/plugin-normalize-0.6.8.tgz", - "integrity": "sha512-Q4oYhU+sSyTJI7pMZlg9/mYh68ujLfOxXzQGEXuw0sHGoGQs3B0Jw7jmzGa6pIS06Hup5hD2Zuh1ppvMdjJBfQ==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-normalize/-/plugin-normalize-0.9.8.tgz", + "integrity": "sha512-dPFBfwTa67K1tRw1leCidQT25R3ozrTUUOpO4jcGFHqXvBTWaR8sML1qxdfOBWs164mE5YpfdTvu6MM/junvCg==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-print": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-print/-/plugin-print-0.6.8.tgz", - "integrity": "sha512-2aokejGn4Drv1FesnZGqh5KEq0FQtR0drlmtyZrBH+r9cx7hh0Qgf4D1BOTDEgXkfSSngjGRjKKRW/fwOrVXYw==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-print/-/plugin-print-0.9.8.tgz", + "integrity": "sha512-nLLPv1/faehRsOjecXXUb6kzhRcZzImO55XuFZ0c90ZyoiHm4UFREwO5sKxHGvpLXS6RnkhvSav4+IWD2qGbEQ==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7", + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1", "load-bmfont": "^1.4.0" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-resize": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.6.8.tgz", - "integrity": "sha512-27nPh8L1YWsxtfmV/+Ub5dOTpXyC0HMF2cu52RQSCYxr+Lm1+23dJF70AF1poUbUe+FWXphwuUxQzjBJza9UoA==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.9.8.tgz", + "integrity": "sha512-L80NZ+HKsiKFyeDc6AfneC4+5XACrdL2vnyAVfAAsb3pmamgT/jDInWvvGhyI0Y76vx2w6XikplzEznW/QQvWg==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-rotate": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.6.8.tgz", - "integrity": "sha512-GbjETvL05BDoLdszNUV4Y0yLkHf177MnqGqilA113LIvx9aD0FtUopGXYfRGVvmtTOTouoaGJUc+K6qngvKxww==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.9.8.tgz", + "integrity": "sha512-bpqzQheISYnBXKyU1lIj46uR7mRs0UhgEREWK70HnvFJSlRshdcoNMIrKamyrJeFdJrkYPSfR/a6D0d5zsWf1Q==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugin-scale": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.6.8.tgz", - "integrity": "sha512-GzIYWR/oCUK2jAwku23zt19V1ssaEU4pL0x2XsLNKuuJEU6DvEytJyTMXCE7OLG/MpDBQcQclJKHgiyQm5gIOQ==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.9.8.tgz", + "integrity": "sha512-QU3ZS4Lre8nN66U9dKCOC4FNfaOh/QJFYUmQPKpPS924oYbtnm4OlmsdfpK2hVMSVVyVOis8M+xpA1rDBnIp7w==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } + } + }, + "@jimp/plugin-shadow": { + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-shadow/-/plugin-shadow-0.9.8.tgz", + "integrity": "sha512-t/pE+QS3r1ZUxGIQNmwWDI3c5+/hLU+gxXD+C3EEC47/qk3gTBHpj/xDdGQBoObdT/HRjR048vC2BgBfzjj2hg==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } + } + }, + "@jimp/plugin-threshold": { + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugin-threshold/-/plugin-threshold-0.9.8.tgz", + "integrity": "sha512-WWmC3lnIwOTPvkKu55w4DUY8Ehlzf3nU98bY0QtIzkqxkAOZU5m+lvgC/JxO5FyGiA57j9FLMIf0LsWkjARj7g==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/plugins": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/plugins/-/plugins-0.6.8.tgz", - "integrity": "sha512-fMcTI72Vn/Lz6JftezTURmyP5ml/xGMe0Ljx2KRJ85IWyP33vDmGIUuutFiBEbh2+y7lRT+aTSmjs0QGa/xTmQ==", - "requires": { - "@jimp/plugin-blit": "^0.6.8", - "@jimp/plugin-blur": "^0.6.8", - "@jimp/plugin-color": "^0.6.8", - "@jimp/plugin-contain": "^0.6.8", - "@jimp/plugin-cover": "^0.6.8", - "@jimp/plugin-crop": "^0.6.8", - "@jimp/plugin-displace": "^0.6.8", - "@jimp/plugin-dither": "^0.6.8", - "@jimp/plugin-flip": "^0.6.8", - "@jimp/plugin-gaussian": "^0.6.8", - "@jimp/plugin-invert": "^0.6.8", - "@jimp/plugin-mask": "^0.6.8", - "@jimp/plugin-normalize": "^0.6.8", - "@jimp/plugin-print": "^0.6.8", - "@jimp/plugin-resize": "^0.6.8", - "@jimp/plugin-rotate": "^0.6.8", - "@jimp/plugin-scale": "^0.6.8", - "core-js": "^2.5.7", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/plugins/-/plugins-0.9.8.tgz", + "integrity": "sha512-tD+cxS9SuEZaQ1hhAkNKw9TkUAqfoBAhdWPBrEZDr/GvGPrvJR4pYmmpSYhc5IZmMbXfQayHTTGqjj8D18bToA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/plugin-blit": "^0.9.8", + "@jimp/plugin-blur": "^0.9.8", + "@jimp/plugin-circle": "^0.9.8", + "@jimp/plugin-color": "^0.9.8", + "@jimp/plugin-contain": "^0.9.8", + "@jimp/plugin-cover": "^0.9.8", + "@jimp/plugin-crop": "^0.9.8", + "@jimp/plugin-displace": "^0.9.8", + "@jimp/plugin-dither": "^0.9.8", + "@jimp/plugin-fisheye": "^0.9.8", + "@jimp/plugin-flip": "^0.9.8", + "@jimp/plugin-gaussian": "^0.9.8", + "@jimp/plugin-invert": "^0.9.8", + "@jimp/plugin-mask": "^0.9.8", + "@jimp/plugin-normalize": "^0.9.8", + "@jimp/plugin-print": "^0.9.8", + "@jimp/plugin-resize": "^0.9.8", + "@jimp/plugin-rotate": "^0.9.8", + "@jimp/plugin-scale": "^0.9.8", + "@jimp/plugin-shadow": "^0.9.8", + "@jimp/plugin-threshold": "^0.9.8", + "core-js": "^3.4.1", "timm": "^1.6.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/png": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/png/-/png-0.6.8.tgz", - "integrity": "sha512-JHHg/BZ7KDtHQrcG+a7fztw45rdf7okL/YwkN4qU5FH7Fcrp41nX5QnRviDtD9hN+GaNC7kvjvcqRAxW25qjew==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/png/-/png-0.9.8.tgz", + "integrity": "sha512-9CqR8d40zQCDhbnXHqcwkAMnvlV0vk9xSyE6LHjkYHS7x18Unsz5txQdsaEkEcXxCrOQSoWyITfLezlrWXRJAA==", "requires": { - "@jimp/utils": "^0.6.8", - "core-js": "^2.5.7", + "@babel/runtime": "^7.7.2", + "@jimp/utils": "^0.9.8", + "core-js": "^3.4.1", "pngjs": "^3.3.3" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/tiff": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.6.8.tgz", - "integrity": "sha512-iWHbxd+0IKWdJyJ0HhoJCGYmtjPBOusz1z1HT/DnpePs/Lo3TO4d9ALXqYfUkyG74ZK5jULZ69KLtwuhuJz1bg==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/tiff/-/tiff-0.9.8.tgz", + "integrity": "sha512-eMxcpJivJqMByn2dZxUHLeh6qvVs5J/52kBF3TFa3C922OJ97D9l1C1h0WKUCBqFMWzMYapQQ4vwnLgpJ5tkow==", "requires": { - "core-js": "^2.5.7", + "@babel/runtime": "^7.7.2", + "core-js": "^3.4.1", "utif": "^2.0.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/types": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/types/-/types-0.6.8.tgz", - "integrity": "sha512-vCZ/Cp2osy69VP21XOBACfHI5HeR60Rfd4Jidj4W73UL+HrFWOtyQiJ7hlToyu1vI5mR/NsUQpzyQvz56ADm5A==", - "requires": { - "@jimp/bmp": "^0.6.8", - "@jimp/gif": "^0.6.8", - "@jimp/jpeg": "^0.6.8", - "@jimp/png": "^0.6.8", - "@jimp/tiff": "^0.6.8", - "core-js": "^2.5.7", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/types/-/types-0.9.8.tgz", + "integrity": "sha512-H5y/uqt0lqJ/ZN8pWqFG+pv8jPAppMKkTMByuC8YBIjWSsornwv44hjiWl93sbYhduLZY8ubz/CbX9jH2X6EwA==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/bmp": "^0.9.8", + "@jimp/gif": "^0.9.8", + "@jimp/jpeg": "^0.9.8", + "@jimp/png": "^0.9.8", + "@jimp/tiff": "^0.9.8", + "core-js": "^3.4.1", "timm": "^1.6.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@jimp/utils": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.6.8.tgz", - "integrity": "sha512-7RDfxQ2C/rarNG9iso5vmnKQbcvlQjBIlF/p7/uYj72WeZgVCB+5t1fFBKJSU4WhniHX4jUMijK+wYGE3Y3bGw==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@jimp/utils/-/utils-0.9.8.tgz", + "integrity": "sha512-UK0Fu0eevQlpRXq5ff4o/71HJlpX9wJMddJjMYg9vUqCCl8ZnumRAljfShHFhGyO+Vc9IzN6dd8Y5JZZTp1KOw==", "requires": { - "core-js": "^2.5.7" + "@babel/runtime": "^7.7.2", + "core-js": "^3.4.1" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "@mikaelkristiansson/domready": { @@ -2727,14 +3013,60 @@ } }, "babel-loader": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.6.tgz", - "integrity": "sha512-4BmWKtBOBm13uoUwd08UwjZlaw3O9GWf456R9j+5YykFZ6LUIjIKLc0zEZf+hauxPOJs96C8k6FvYD09vWzhYw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", + "integrity": "sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==", "requires": { - "find-cache-dir": "^2.0.0", - "loader-utils": "^1.0.2", - "mkdirp": "^0.5.1", - "pify": "^4.0.1" + "find-cache-dir": "^2.1.0", + "loader-utils": "^1.4.0", + "mkdirp": "^0.5.3", + "pify": "^4.0.1", + "schema-utils": "^2.6.5" + }, + "dependencies": { + "ajv": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + }, + "schema-utils": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.5.tgz", + "integrity": "sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ==", + "requires": { + "ajv": "^6.12.0", + "ajv-keywords": "^3.4.1" + } + } } }, "babel-plugin-add-module-exports": { @@ -3636,9 +3968,9 @@ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, "cacache": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", - "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", "requires": { "bluebird": "^3.5.5", "chownr": "^1.1.1", @@ -4849,6 +5181,24 @@ "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=" }, + "css": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", + "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "requires": { + "inherits": "^2.0.3", + "source-map": "^0.6.1", + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, "css-blank-pseudo": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz", @@ -5284,9 +5634,9 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, "decompress": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.0.tgz", - "integrity": "sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", "requires": { "decompress-tar": "^4.0.0", "decompress-tarbz2": "^4.0.0", @@ -7606,9 +7956,9 @@ } }, "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==" + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==" }, "figures": { "version": "2.0.0", @@ -9001,6 +9351,14 @@ "@babel/runtime": "^7.7.6" } }, + "gatsby-plugin-react-svg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gatsby-plugin-react-svg/-/gatsby-plugin-react-svg-3.0.0.tgz", + "integrity": "sha512-myZl5NjVZwLLn4ovwSDM7cufa8yjaRiU5KoufJrz8FEalRroZ/hFSCCKNVna3blTwxcS0rZgISigYn9/xY7rkw==", + "requires": { + "svg-react-loader": "^0.4.4" + } + }, "gatsby-plugin-sharp": { "version": "2.5.3", "resolved": "https://registry.npmjs.org/gatsby-plugin-sharp/-/gatsby-plugin-sharp-2.5.3.tgz", @@ -11421,21 +11779,29 @@ } }, "jimp": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.6.8.tgz", - "integrity": "sha512-F7emeG7Hp61IM8VFbNvWENLTuHe0ghizWPuP4JS9ujx2r5mCVYEd/zdaz6M2M42ZdN41blxPajLWl9FXo7Mr2Q==", - "requires": { - "@jimp/custom": "^0.6.8", - "@jimp/plugins": "^0.6.8", - "@jimp/types": "^0.6.8", - "core-js": "^2.5.7", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.9.8.tgz", + "integrity": "sha512-DHN4apKMwLIvD/TKO9tFfPuankNuVK98vCwHm/Jv9z5cJnrd38xhi+4I7IAGmDU3jIDlrEVhzTkFH1Ymv5yTQQ==", + "requires": { + "@babel/runtime": "^7.7.2", + "@jimp/custom": "^0.9.8", + "@jimp/plugins": "^0.9.8", + "@jimp/types": "^0.9.8", + "core-js": "^3.4.1", "regenerator-runtime": "^0.13.3" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } } }, "jpeg-js": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.6.tgz", - "integrity": "sha512-MUj2XlMB8kpe+8DJUGH/3UJm4XpI8XEgZQ+CiHDeyrGoKPdW/8FJv6ku+3UiYm5Fz3CWaL+iXmD8Q4Ap6aC1Jw==" + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.7.tgz", + "integrity": "sha512-9IXdWudL61npZjvLuVe/ktHiA41iE8qFyLB+4VDTblEsWBzeg8WQTlktdUK4CdncUqtUgUg0bbOmTE2bKBKaBQ==" }, "js-base64": { "version": "2.5.1", @@ -11679,12 +12045,12 @@ } }, "loader-fs-cache": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/loader-fs-cache/-/loader-fs-cache-1.0.2.tgz", - "integrity": "sha512-70IzT/0/L+M20jUlEqZhZyArTU6VKLRTYRDAYN26g4jfzpJqjipLL3/hgYpySqI9PwsVRHHFja0LfEmsx9X2Cw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/loader-fs-cache/-/loader-fs-cache-1.0.3.tgz", + "integrity": "sha512-ldcgZpjNJj71n+2Mf6yetz+c9bM4xpKtNds4LbqXzU/PTdeAX0g3ytnU1AJMEcTk2Lex4Smpe3Q/eCTsvUBxbA==", "requires": { "find-cache-dir": "^0.1.1", - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" }, "dependencies": { "find-cache-dir": { @@ -12629,18 +12995,11 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } + "minimist": "^1.2.5" } }, "mkdirp-classic": { @@ -15374,11 +15733,11 @@ } }, "potrace": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/potrace/-/potrace-2.1.2.tgz", - "integrity": "sha512-dNcUBapRgPkiv3j+70+rSlf0whtJJqEszC04g9a/Ll3p6kA7QVRV1Vsi3jg22voJr2jA9x9fjPbz5MdD+ngbUg==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/potrace/-/potrace-2.1.5.tgz", + "integrity": "sha512-huAWS0flSZttRm+WA5IGSFxHLXgVd9JCGU8+heDD3fAvFmW1Wf1Y7qq3Un2hH2xBNMwDY7vP1PYA0VQUh7CC+Q==", "requires": { - "jimp": "^0.6.4" + "jimp": "^0.9.6" } }, "prebuild-install": { @@ -15668,6 +16027,11 @@ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==" }, + "ramda": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.21.0.tgz", + "integrity": "sha1-oAGr7bP/YQd9T/HVd9RN536NCjU=" + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -16086,6 +16450,25 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==" }, + "react-keyshape": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/react-keyshape/-/react-keyshape-3.3.0.tgz", + "integrity": "sha512-PFaG60mSskg9Qgah7fzZiAuC9CWphT+Gkj0RsDmslphuEQv4GlzjRBO2U+gcHw3KLi9QUDeCEfMCAbv+I8DIug==", + "requires": { + "axios": "^0.17.1" + }, + "dependencies": { + "axios": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz", + "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", + "requires": { + "follow-redirects": "^1.2.5", + "is-buffer": "^1.1.5" + } + } + } + }, "react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", @@ -16873,6 +17256,11 @@ "aproba": "^1.1.1" } }, + "rx": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" + }, "rx-lite": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", @@ -18328,6 +18716,58 @@ "has-flag": "^3.0.0" } }, + "svg-react-loader": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/svg-react-loader/-/svg-react-loader-0.4.6.tgz", + "integrity": "sha512-HVEypjWQsQuJdBIPzXGxpmQsQts7QwfQuYgK1rah6BVCMoLNSCh/ESKVNd7/tHq8DkWYHHTyaUMDA1FjqZYrgA==", + "requires": { + "css": "2.2.4", + "loader-utils": "1.1.0", + "ramda": "0.21.0", + "rx": "4.1.0", + "traverse": "0.6.6", + "xml2js": "0.4.17" + }, + "dependencies": { + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==" + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + }, + "xml2js": { + "version": "0.4.17", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.17.tgz", + "integrity": "sha1-F76T6q4/O3eTWceVtBlwWogX6Gg=", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "^4.1.0" + } + }, + "xmlbuilder": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", + "integrity": "sha1-qlijBBoGb5DqoWwvU4n/GfP0YaU=", + "requires": { + "lodash": "^4.0.0" + } + } + } + }, "svgo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", @@ -18732,6 +19172,11 @@ } } }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, "trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", @@ -19050,9 +19495,9 @@ } }, "unbzip2-stream": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz", - "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.0.tgz", + "integrity": "sha512-kVx7CDAsdBSWVf404Mw7oI9i09w5/mTT/Ruk+RWa64PLYKvsAucLLFHvQtnvjeADM4ZizxrvG5SHnF4Te4T2Cg==", "requires": { "buffer": "^5.2.1", "through": "^2.3.8" diff --git a/package.json b/package.json index 4d569c84fe..40720cc7a1 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "gatsby-plugin-offline": "~3.0.40", "gatsby-plugin-postcss": "~2.1.21", "gatsby-plugin-react-helmet": "~3.1.23", + "gatsby-plugin-react-svg": "^3.0.0", "gatsby-plugin-sharp": "^2.5.3", "gatsby-plugin-sitemap": "~2.2.29", "gatsby-plugin-typescript": "~2.1.27", @@ -60,6 +61,7 @@ "react-countup": "~4.3.2", "react-dom": "~16.13.0", "react-helmet": "~5.2.1", + "react-keyshape": "^3.3.0", "react-prism": "~4.3.2", "react-visibility-sensor": "~5.1.1", "regression": "~2.0.1", diff --git a/src/.DS_Store b/src/.DS_Store index ba345e0bc2457fc4b97e148e900a55f84fdf588e..2db9922227f2d430a0b31d448aab23506e032cdc 100644 GIT binary patch literal 12292 zcmeHNYitx%6h3E5%k1#zfFSG&bVDtm^62)7mg1H!Vif|Rl=6}?yEAPEW@pyUZc7W* zs=+75UnnU4(Zqycj6s1vM!^_@;v-QM)R5>8qw+&d{Gk$!o;x$!&g^b!LKGUDo7_2f z?>Xn*d(Qp#o_p^M0N}E;6b6_F032mTh4J)w6d*K?s3S2x%Q>llYLIdzWhx5*8nlA~ z9k38mInucmKB{8+V<__w2i>J_z|JOBkH=I!Mto`w%2RsjW9`HQi zdEiPsz+x{YE-T(!wcgY7faih#wFlVx5TeXz#HIrlHJ1*0uq`~}vn{-ts7zaRvo2)Q zh)oA9YO0cssY=vRMf-?>mO9mkm^jghO$RJ$sRLT-fOgMlpHR^3o%BMcIAFx0-qZ7d z=Yd=g+)Pztp_9(*2~g?Wz8#FLQ}-T{aGtu0=!BmDkxuz?j_j|Ola2KlN&7T^CYDqc zBUN604t)h<3X8^a9MAC+`1_hW^`7RGm`WSV#IDWk*BUX^8MDjlbX^@Ri?Q{J+|wpZ zY1FlpsAzJRsjNsciEL?AG)eDSrl&Q@FxzRi7#!#4{B1&T*RF8I;_~^S+RFa3(I!lai)uWriYd84Rhh7{AtmojvC<|(?@BeAf^CA3HsrN3$tm4(l%z>@GHYpd zGNtI6v0m;nh?Yjm*^mMJhsRHyIeX4+<<)oG89h5;VzDr3GS6=!$7(61U6H$5dK4+u zxluIYvL-27M{BoYC^1!Dr-=!9l8^KI&)zs~`h-9*FeAgtR^fzFZbLez+@Drby=EV? zN&@^AiAJ|dmsl^7aFp|#oYIm&U^C-1cFFXVIL@q|J1@YmGssp!v<2rc;Q4hs2oZuo zLtq0BSMY%rRgB51Ao(q|np!^4+HILE+-q0XE#U(jXwnj7qA>~Q+trbVKwvBDd8KHi zRwreRMs=FHH?1oPtl+qfjN2edG^)}FyIrGXy1_57P#1vNPz6h14QvDndSEZ?gJS!yj-7{)E4<2#awB&cYH5;VoE=HCT%gT#hU7ZfwG} z*oqr*6K+Ncx1)*))UXF1#E0-m1-Gf%ugB{!svZu>9o+nNuu!Mj%Q(Q69XFUMOry379~zEI5}V zPzyej%ikI#Ns$u@Ea63bm?Mx1g%-DpukjO%g)tWQcD{}yvu*6*@l z)Xxc+jlp3NcnFTbN%#mpCFEUz@8BZ*hJYMS#OWsLW@9Oq;X+)5VXVL^tjDEQN&#mDgpLgLf-jE%*E_#(c7hqI8^l);=u z@zrePCG=?24kp}V?XP`*s`%Z8Tp4LZnPjJ9Q9k}U>&}Jn?&dB{)wK?)Xa9;qNahcH zK9RW2FzJwVF8tuDrYm-5J5EdX9Di@l+XqfEOC0(MeaMdd5>6|?_Y0|$zCl4}M>;6!j9rcfTn50{7I*Vb13tL)q|hF-4H#_JX+VAnmjPhLn@y1L zvrKTwjRI^sH4WQU}CsRj1! zfP?E?V#|#Eb(ONcCm8I>xhKdk;a*Y&=11!*0Tx5pw*oTdob3%9${KTCol&+&_!sXY z@|x?OtV?VMnqSVlg3vm=D~M5k1u-0Sy{icCD&p!~MdU@GGv-~a{eAK2ndX(mFtS4j zi;-kqaj@VUTD$Wv-tP03h}4cS}9~rQGjRf|CbN{{hul1JvUgQ|9=45kj%~i delta 306 zcmZokXmOBWU|?W$DortDU;r^WfEYvza8E20o2Vx_*+7Ry9LQ(T1!6{^I0Hk9XHI@{ zQcix-#*1d`6CdPnX6InxVAP$=qwq~2C*3eOIX|}mq=SLs;h)KjN)jTu`7SOX^*|Ah zJcHv}p34q8LM2kLN=#m-&c_tMFmZzUWPX8flXE3~CkF`{dTlkY0UE)^kjaqCkjRkE zkjhYuY;=f9)d?@4(U@uwwm{WP{v{^Iv}3_$De(jrL1v%^Aduh&60RVhZ@l=Oc{0C_ ZE+fNa6CUNs2|65;<9ViTE|6en1^~UrP2m6l diff --git a/src/components/stats.tsx b/src/components/stats.tsx index 8e81b29bed..1fda5a2f53 100644 --- a/src/components/stats.tsx +++ b/src/components/stats.tsx @@ -236,7 +236,6 @@ class Stats extends Component { } render() { - console.log(this.state) return (
diff --git a/src/html.js b/src/html.js index 1c0d9cb687..1e8de3973c 100644 --- a/src/html.js +++ b/src/html.js @@ -23,74 +23,80 @@ import icon17 from './images/icon/mstile-310x310.png' export default function HTML(props) { return ( - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - {props.headComponents} - \ No newline at end of file diff --git a/src/pages/kratos.tsx b/src/pages/kratos.tsx index c1ba6e9141..d69a16d99c 100644 --- a/src/pages/kratos.tsx +++ b/src/pages/kratos.tsx @@ -7,18 +7,10 @@ import SEO from '../components/seo' import kratosPolyglot from '../images/kratos/svg_kratos_p.svg' import Stats from '../components/stats' import CodeBox, { Languages } from '../components/codebox' -import kratosProcess from '../images/kratos/svg_kratos.svg' +import KratosAnimation from '../images/animations/kratos.svg' import { brandPrefix } from '../config' import Collaborator from '../components/collaborator' -const KratosAnimation = () => ( - The ORY Kratos user login and registration service -) - const KratosSdk = () => ( ORY Kratos SDKs ) diff --git a/src/pages/markdown/imprint.md b/src/pages/markdown/imprint.md index a99fc1e084..0e14d9e053 100644 --- a/src/pages/markdown/imprint.md +++ b/src/pages/markdown/imprint.md @@ -1,15 +1,15 @@ --- -published: true -path: '/imprint/' -title: 'Imprint' -metaTitle: 'ORY Imprint' -metaDescription: 'Read the ORY imprint.' -lastUpdatedAt: 'Apr 6th, 2020' +published: true +path: '/imprint/' +title: 'Imprint' +metaTitle: 'ORY Imprint' +metaDescription: 'Read the ORY imprint.' +lastUpdatedAt: 'Apr 6th, 2020' --- **ORY Corp** 32 Veterans Lane, Ste A-128 Doylestown, PA 18901-3424 -United States of America +United States of America -E-Mail: [hi@ory.sh](mailto:hi@ory.sh) \ No newline at end of file +E-Mail: [hi@ory.sh](mailto:hi@ory.sh) diff --git a/static/scripts/keyshapejs-1.1.0.min.js b/static/scripts/keyshapejs-1.1.0.min.js new file mode 100644 index 0000000000..322a95bfa1 --- /dev/null +++ b/static/scripts/keyshapejs-1.1.0.min.js @@ -0,0 +1,1566 @@ +/** @license KeyshapeJS v1.1.0 (c) 2018-2019 Pixofield Ltd | pixofield.com/keyshapejs/mit-license */ +window['KeyshapeJS'] = (function () { + + function ERR(msg) { return Error(msg); } + var NOT_IN_LIST_EXCEPTION = ERR("Not in timeline list"); + +// Properties with predefined names and types + var P_MOTION_DISTANCE = 0; + var P_POSITIONX = 1; + var P_POSITIONY = 2; + var P_ROTATE = 6; + var P_SKEWX = 7; + var P_SKEWY = 8; + var P_SCALEX = 10; + var P_SCALEY = 11; + var P_ANCHORX = 13; + var P_ANCHORY = 14; + +// names for animate() + var transformProps = [ "mpath", "posX", "posY", "", "", "", "rotate", + "skewX", "skewY", "", "scaleX", "scaleY", "", "anchorX", "anchorY" ]; + +// CSS transform names + var transformNames = [ "", "translate", "translate", "", "", "", "rotate", + "skewX", "skewY", "", "scale", "scale", "", "translate", "translate" ]; + +// Filter function types + var FILTER_NONE = 0; + var FILTER_URL = 1; + var FILTER_BLUR = 2; + var FILTER_BRIGHTNESS = 3; + var FILTER_CONTRAST = 4; + var FILTER_DROPSHADOW = 5; + var FILTER_GRAYSCALE = 6; + var FILTER_HUEROTATE = 7; + var FILTER_INVERT = 8; + var FILTER_OPACITY = 9; + var FILTER_SATURATE = 10; + var FILTER_SEPIA = 11; + +// Filter function names, the order matching the types + var filterNames = [ "none", "url", "blur", "brightness", "contrast", "drop-shadow", + "grayscale", "hue-rotate", "invert", "opacity", "saturate", "sepia" ]; + +// Indexes to pdata internal array + var INX_PROP = 0; + var INX_FLAGS = 1; + var INX_STARTTIME = 2; + var INX_ITERATIONDUR = 3; // begin+iteration dur = iteration end + var INX_TIMES = 4; + var INX_VALUES = 5; + var INX_EASING = 6; + var INX_ITERATIONS = 7; + var INX_MPATH = 8; + +// INX_MPATH and elements with motion path have this data + var MPATH_AUTOROTATE = 0; + var MPATH_ELEMENT = 1; + var MPATH_PATHLENGTH = 2; + +// values for INX_FLAGS +// bits 0-1: target types + var FLAG_TARGET_CSS_PROPERTY = 0x00; + var FLAG_TARGET_ATTRIBUTE = 0x01; +// bits 4-7: property types + var FLAG_TYPE_STRING = 0x00; + var FLAG_TYPE_NUMBER = 0x10; + var FLAG_TYPE_LENGTH = 0x20; + var FLAG_TYPE_COLOR = 0x30; + var FLAG_TYPE_LENGTH_LIST = 0x40; + var FLAG_TYPE_FILTER = 0x50; + var FLAG_TYPE_PATH = 0x60; + +// Timing function values + var TIMING_FN_LINEAR = 0; + var TIMING_FN_CUBIC = 1; + var TIMING_FN_STEP_START = 2; + var TIMING_FN_STEP_END = 3; + +// play states + var STATE_IDLE = "idle"; + var STATE_PAUSED = "paused"; + var STATE_RUNNING = "running"; + var STATE_FINISHED = "finished"; + +// pending callback constants + var PENDING_NONE = 0; + var PENDING_ONFINISH = 1; + var PENDING_ONLOOP = 2; + + var reqAnimationFrame = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || null; + if (!reqAnimationFrame) { // IE9 needs setTimeout() + reqAnimationFrame = function(cb) { + window.setTimeout(cb, 16); + }; + } + + function isSet(value) + { + return typeof value !== "undefined"; + } + + function startsWith(str, s) + { + return str && str.indexOf(s) == 0; + } + + function copyArray(arr) + { + return arr.slice(); + } + + function copyMap(map) + { + var res = {}; + for (var key in map) { + res[key] = map[key]; + } + return res; + } + + function removeItemFromArray(arr, item) + { + var i = arr.indexOf(item); + if (i > -1) { + arr.splice(i, 1); + } + } + + function checkIsFinite(value) + { + if (!isFinite(value)) { + throw ERR("Non-finite value"); + } + } + + function setAttr(elem, attrName, val) + { + elem.setAttribute(attrName, val); + } + +// properties with special flags + var propertyData = { + "d": FLAG_TARGET_ATTRIBUTE | FLAG_TYPE_PATH, + "fill": FLAG_TARGET_CSS_PROPERTY | FLAG_TYPE_COLOR, + "fillOpacity": FLAG_TARGET_CSS_PROPERTY | FLAG_TYPE_NUMBER, + "filter": FLAG_TARGET_CSS_PROPERTY | FLAG_TYPE_FILTER, + "height": FLAG_TARGET_ATTRIBUTE | FLAG_TYPE_LENGTH, + "opacity": FLAG_TARGET_CSS_PROPERTY | FLAG_TYPE_NUMBER, + "offsetDistance": FLAG_TARGET_ATTRIBUTE | FLAG_TYPE_LENGTH, + "stroke": FLAG_TARGET_CSS_PROPERTY | FLAG_TYPE_COLOR, + "strokeDasharray": FLAG_TARGET_CSS_PROPERTY | FLAG_TYPE_LENGTH_LIST, + "strokeDashoffset": FLAG_TARGET_CSS_PROPERTY | FLAG_TYPE_LENGTH, + "strokeOpacity": FLAG_TARGET_CSS_PROPERTY | FLAG_TYPE_NUMBER, + "strokeWidth": FLAG_TARGET_CSS_PROPERTY | FLAG_TYPE_LENGTH, + "transform": FLAG_TARGET_ATTRIBUTE | FLAG_TYPE_STRING, + "width": FLAG_TARGET_ATTRIBUTE | FLAG_TYPE_LENGTH + }; + + function isValidProperty(prop) + { + // is it a string without a dash + return typeof prop == "string" && prop.indexOf("-") == -1 && prop !== "" && + (propertyData[prop] > 0 || transformProps.indexOf(prop) >= 0); + } + +// returns property type for the given property and its value + function propertyType(flags) + { + return flags & 0xf0; + } + + var allCssProps = window.getComputedStyle(document.documentElement); + + function propertyFlags(prop) + { + if (prop <= P_ANCHORY) { + return FLAG_TARGET_CSS_PROPERTY | FLAG_TYPE_NUMBER; + } + var flags = propertyData[prop]; + if (!flags) { + // check if it is a css property or an attribute + if (isSet(allCssProps[prop])) { + flags = FLAG_TARGET_CSS_PROPERTY; + flags |= (prop.toLowerCase().indexOf("color") == prop.length-5 ? FLAG_TYPE_COLOR + : FLAG_TYPE_STRING); + } else { + flags = FLAG_TARGET_ATTRIBUTE | FLAG_TYPE_STRING; + } + } + return flags; + } + + function cubeRoot(a) + { + return a >= 0 ? Math.pow(a, 1/3) : -Math.pow(-a, 1/3); + } + +// Solves quadratic equation ax^2 + bx + c = 0 and returns result between [0, 1] + function solveRestrictedQuadraticEquation(a, b, c) + { + if (a == 0) return -c/b; + + var sqrtDisc = Math.sqrt(b*b - 4.0*a*c); + var x = (-b + sqrtDisc) / (2.0*a); + if (x >= 0 && x <= 1) return x; + + x = (-b - sqrtDisc) / (2.0*a); + if (x >= 0 && x <= 1) return x; + + // NOTREACHED + return 0; + } + +// tested manually (values from http://www.1728.org/cubic2.htm): +// solveRestrictedCubicEquation(2, -4, -22, 24); x1=4, x2=-3, x3=1 +// solveRestrictedCubicEquation(3, -10, 14, 27); x1=-1, x2=x3=2.16 +// solveRestrictedCubicEquation(1, 6, 12, 8); x1=x2=x3=-2 + +// Solves cubic equation ax^3 + bx^2 + cx + d = 0 and returns the real part of the result +// between [0, 1] + function solveRestrictedCubicEquation(a, b, c, d) + { + // Based on cubic equation solver + // theory: http://www.1728.org/cubic2.htm + + if (a == 0) { + return solveRestrictedQuadraticEquation(b, c, d); + } + var f = c/a - ((b*b)/(a*a))/3.0; + var g = ((b*b*b)/(a*a*a))/13.5 - b*c/(a*a)/3.0 + d/a; + var h = g*g/4.0 + f*f*f/27.0; + var p = -b/(3.0*a); + + if (h <= 0) { // 3 real roots + if (f == 0 && g == 0) { // all roots equal + // this code avoids possible divide by zero error when evaluating k below + return -cubeRoot(d/a); // x1, x2, x3, i = 0 + + } else { // 3 real unequal roots + var j = Math.sqrt(g*g/4.0 - h); + var k = Math.acos(-g/2.0/j); + var m = Math.cos(k/3.0); + var n = Math.sqrt(3.0)*Math.sin(k/3.0); + j = cubeRoot(j); + var x = 2.0*j*m + p; // x1, i=0 + if (x >= 0 && x <= 1) return x; + + x = -j*(m+n) + p; // x2, i=0 + if (x >= 0 && x <= 1) return x; + + x = j*(n-m) + p; // x3, i=0 + if (x >= 0 && x <= 1) return x; + } + + } else { // 2 complex roots + var r = -g/2.0 + Math.sqrt(h); + var s = cubeRoot(r); + var t = -g/2.0 - Math.sqrt(h); + var u = cubeRoot(t); + var xx = s + u + p; // x1, i = 0 + if (xx >= 0 && xx <= 1) return xx; + + xx = -(s + u)/2.0 + p; // x2, x3, i = +-(s - u)*sqrt(3.0)/2 + if (xx >= 0 && xx <= 1) return xx; + } + // NOTREACHED + return 0; + } + +// calculate y for x on a cubic bezier defined by cbdata [CB, p1x, p1y, p2x, p2y] + function cubicBezierY(cbdata, x) + { + if (x <= 0) return 0; + if (x >= 1) return 1; + + // calculate t for x on a cubic bezier 0.0, x1, x2, 1.0 + var x1 = cbdata[1]; + var x2 = cbdata[3]; + var a = 3*x1 - 3*x2 + 1; + var b = -6*x1 + 3*x2; + var c = 3*x1; + var d = - x; + var t = solveRestrictedCubicEquation(a, b, c, d); + + // get cubic curve y coordinate for t, p1y and p2y (p0y = 0 and p3y = 1) + return /*(1-t)*(1-t)*(1-t)*0 +*/ 3*t*(1-t)*(1-t)*cbdata[2] + 3*t*t*(1-t)*cbdata[4] + t*t*t; + } + + function getCurrentTimeIndex(simpleTime, pdata) + { + var starttime = pdata[INX_STARTTIME]; + simpleTime += starttime; + var tlen = pdata[INX_TIMES].length; + for (var i = 0; i < tlen; ++i) { + if (simpleTime < pdata[INX_TIMES][i]) { + return i; + } + } + return tlen-1; + } + +// converts the given raw value to an svg value (possibly a string) + function convertToSvgValue(type, val) + { + // non-numeric colors are returned as such + if (type == FLAG_TYPE_COLOR && typeof val === 'number') { + return "rgba("+(val>>>24)+","+((val>>>16)&255)+","+((val>>>8)&255)+","+((val&255)/255)+")"; + + } else if (type == FLAG_TYPE_LENGTH_LIST) { + val = val.map(function(v) { return v+"px"; }); + return val.join(","); + + } else if (type == FLAG_TYPE_PATH) { + var path = ""; + var len = val.length; + for (var ip = 0; ip < len; ip += 2) { + path += val[ip]; // command + path += val[ip+1].join(','); // values + } + return path; + + } else if (type == FLAG_TYPE_FILTER) { + if (val[0] == FILTER_NONE) { + return "none"; + } + var filters = ""; + var flen = val.length; + var i = 0; + while (i < flen) { + filters += filterNames[val[i]]; + if (val[i] == FILTER_URL) { + filters += "("+val[i+1]+") "; + } else if (val[i] == FILTER_DROPSHADOW) { + var r = val[i+4] >>> 24; // triple >>> to get unsigned shift + var g = (val[i+4] >> 16) & 255; + var b = (val[i+4] >> 8) & 255; + var a = val[i+4] & 255; + filters += "("+val[i+1]+"px "+val[i+2]+"px "+val[i+3]+"px rgba("+ + r+","+g+","+b+","+(a/255)+")"+") "; + i += 3; + } else if (val[i] == FILTER_BLUR) { + filters += "("+val[i+1]+"px) "; + } else if (val[i] == FILTER_HUEROTATE) { + filters += "("+val[i+1]+"deg) "; + } else { // other filters + // clamp negative values, like all browsers seems to be doing for these values + filters += "("+(val[i+1]< 0 ? 0 : val[i+1])+") "; + } + i += 2; + } + return filters; + } else if (type == FLAG_TYPE_LENGTH) { + return val+"px"; + } + return val; + } + + function clampColor(n) + { + return n <= 0 ? 0 : n >= 255 ? 255 : n; + } + +// interpolates between the given values v1 and v2 using t [0, 1] + function interpolate(type, v1, v2, t) + { + if (type == FLAG_TYPE_NUMBER || type == FLAG_TYPE_LENGTH) { // number or length + return (v2-v1) * t + v1; + } + if (type == FLAG_TYPE_STRING) { + return t < 0.5 ? v1 : v2; + } + if (type == FLAG_TYPE_COLOR) { + if (typeof v1 === 'number' && typeof v2 === 'number') { + // interpolate rgba colors + var nt = 1-t; + var r = nt*(v1>>>24) + t*(v2>>>24); + var g = nt*((v1>>>16)&255) + t*((v2>>>16)&255); + var b = nt*((v1>>>8)&255) + t*((v2>>>8)&255); + var a = nt*(v1&255) + t*(v2&255); + return (clampColor(r)<<24 | clampColor(g)<<16 | clampColor(b)<<8 | clampColor(a)) >>> 0; + } + // gradients are like strings + return t < 0.5 ? v1 : v2; + } + if (type == FLAG_TYPE_LENGTH_LIST) { + // if either is empty ("none"), then use value zero + if (v1.length == 0) { + v1 = [ 0 ]; + } + if (v2.length == 0) { + v2 = [ 0 ]; + } + var reslen = v1.length; + // different sizes will create from*to items to match browser behaviour + if (v1.length != v2.length) { + reslen = v1.length * v2.length; + } + var res = []; + for (var i = 0; i < reslen; ++i) { + var fromVal = v1[i % v1.length]; + var toVal = v2[i % v2.length]; + var r = (toVal - fromVal) * t + fromVal; + if (r < 0) { r = 0; } + res.push(r); + } + return res; + } + if (type == FLAG_TYPE_PATH) { + if (v1.length != v2.length) { + return t < 0.5 ? v1 : v2; + } + var reslen = v1.length; + var res = []; + for (var i = 0; i < reslen; i += 2) { + if (v1[i] !== v2[i]) { // commands must match + return t < 0.5 ? v1 : v2; + } + res[i] = v1[i]; + // coordinate data + res[i+1] = []; + for (var j = 0; j < v1[i+1].length; ++j) { + var newval = (v2[i+1][j]-v1[i+1][j]) * t + v1[i+1][j]; + res[i+1].push(newval); + } + } + return res; + } + if (type == FLAG_TYPE_FILTER) { + var reslen = v1.length; + if (reslen != v2.length) { + // TODO: extra filters should be appended to the shorter list + return t < 0.5 ? v1 : v2; + } + var res = []; + var i = 0; + while (i < reslen) { + if (v1[i] != v2[i] || v1[i] == FILTER_URL) { + return t < 0.5 ? v1 : v2; + } + res[i] = v1[i]; + res[i+1] = (v2[i+1]-v1[i+1]) * t + v1[i+1]; + if (v1[i] == FILTER_DROPSHADOW) { // multiple values and color for drop-shadow + res[i+2] = (v2[i+2]-v1[i+2]) * t + v1[i+2]; + res[i+3] = (v2[i+3]-v1[i+3]) * t + v1[i+3]; + // interpolate rgba colors + var nt = 1-t; + var c1 = v1[i+4]; + var c2 = v2[i+4]; + var r = nt*(c1>>>24) + t*(c2>>>24); // triple >>> to get unsigned shift + var g = nt*((c1>>16)&255) + t*((c2>>16)&255); + var b = nt*((c1>>8)&255) + t*((c2>>8)&255); + var a = nt*(c1&255) + t*(c2&255); + res[i+4] = (clampColor(g)<<16 | clampColor(b)<<8 | + clampColor(a)) + (clampColor(r)|0)*16777216; + i += 3; + } + i += 2; + } + return res; + } + return 0; + } + +// returns an interpolated raw value for the given pdata + function animateProperty(simpleTime, pdata) + { + var ti = getCurrentTimeIndex(simpleTime, pdata); + var starttime = pdata[INX_STARTTIME]; + var t1 = pdata[INX_TIMES][ti-1] - starttime; + var t2 = pdata[INX_TIMES][ti] - starttime; + var t = (simpleTime-t1) / (t2-t1); + + // apply easing (timing function) if needed + if (pdata[INX_EASING] && pdata[INX_EASING].length > ti-1) { + var v = pdata[INX_EASING][ti-1]; + // TIMING_FN_LINEAR doesn't need processing, t = t + if (v[0] == TIMING_FN_CUBIC) { + t = cubicBezierY(v, t); + + } else if (v[0] == TIMING_FN_STEP_START) { + var steps = v[1]; + t = Math.ceil(t*steps)/steps; + + } else if (v[0] == TIMING_FN_STEP_END) { + var steps = v[1]; + t = Math.floor(t*steps)/steps; + } + } + var v1 = pdata[INX_VALUES][ti-1]; + var v2 = pdata[INX_VALUES][ti]; + var rawval = interpolate(propertyType(pdata[INX_FLAGS]), v1, v2, t); + return rawval; + } + +// true if the requestAnimationFrame is running + var isTicking = false; + +// timeline time + var sysTimelineTime = new Date().getTime(); + +// timeline hold time after global pause, undefined if not paused + var holdTimelineTime; + +// timeline adjust time, which is affected by global pause + var sysTimelineTimeDrift = 0; + +// all timelines + var globalTimelineList = []; + +// list of pending callbacks +// values: [ timeline, PENDING_ONFINISH ] or [ timeline, PENDING_ONLOOP ] + var pendingCallbacks = []; + + function updateSysTimelineTime() + { + if (holdTimelineTime) { + return; + } + sysTimelineTime = new Date().getTime() + sysTimelineTimeDrift; + } + + function updateAllAnimations(mainUpdate) + { + if (!mainUpdate && isTicking) { // no update if mainloop will do it + return; + } + var hasActiveTimelines = false; + for (var myi = 0; myi < globalTimelineList.length; ++myi) { + var curTl = globalTimelineList[myi]; + if (curTl._updateValues(mainUpdate)) { + hasActiveTimelines = true; + } + } + if (mainUpdate) { + // call pending callbacks (onloop and onfinish) and do autoremove for finished ones + while (pendingCallbacks.length > 0) { + var item = pendingCallbacks.shift(); + var tl = item[0]; + if (item[1] == PENDING_ONFINISH) { + if (tl['onfinish']) { + // calling as a method sets 'this' to tl + tl['onfinish'](); + // keep hasActiveTimelines for one more requestAnimationFrame so that + // play() etc. in onfinish callback keeps the timeline running + hasActiveTimelines = true; + } + tl._performAutoRemove(); + + } else if (item[1] == PENDING_ONLOOP) { + if (tl['onloop']) { + // calling as a method sets 'this' to tl + tl['onloop'](); + } + } + } + } + return hasActiveTimelines; + } + +// mainloop animates elements in DOM and calls again reqAnimationFrame if needed + function mainloop() + { + updateSysTimelineTime(); + // isTicking can be set to false or true below + // note: onfinish callback may add active animations, in that case isTicking should stay true + if (updateAllAnimations(true) && !holdTimelineTime) { + isTicking = true; + reqAnimationFrame(mainloop); + } else { + isTicking = false; + } + }; + + function startTicking() + { + if (!isTicking) { + isTicking = true; + reqAnimationFrame(mainloop); + } + }; + + function parseFloatList(str, separator) + { + var parts = str.split(separator); + var res = []; + parts.forEach(function(v) { res.push(parseFloat(v)); }); + return res; + } + + function parseCommaSeparated(str) + { + // IE uses space as separator in transform attribute, so convert them to comma before parsing + if (str.indexOf(',') == -1) { + str = str.replace(' ', ','); + } + return parseFloatList(str, ','); + } + + function parseTransform(elem) + { + if (!elem._ks) { + elem._ks = { }; + } + if (elem._ks.transform) { + return; + } + var trans = elem._ks.transform = []; + for (var i = 0 ; i <= P_ANCHORY ; ++i) { + trans[i] = 0; + } + trans[P_SCALEX] = 1; + trans[P_SCALEY] = 1; + // split transforms with ') ' because IE returns 'translate(x y)' while + // other browsers return 'translate(x,y)' + var transAttr = elem.getAttribute("transform"); + if (!transAttr) { + return; + } + var parts = transAttr.trim().split(') '); + // skips anchor translate and seeks to position translate to remove extra tranforms before it + for (var j = parts.length-2; j >= 0; --j) { + if (startsWith(parts[j], "translate(")) { + for (var k = 0; k < j; k++) { + parts.shift(); + } + break; + } + } + var first = parts.shift(); + var vals; + if (startsWith(first, "translate(")) { + vals = parseCommaSeparated(first.substring(10)); + trans[P_POSITIONX] = vals[0]; + trans[P_POSITIONY] = isSet(vals[1]) ? vals[1] : 0; // IE may have only one translate value + first = parts.shift(); + } + if (startsWith(first, "rotate(")) { + vals = parseCommaSeparated(first.substring(7)); + trans[P_ROTATE] = vals[0]; + first = parts.shift(); + } + if (startsWith(first, "skewX(")) { + vals = parseCommaSeparated(first.substring(6)); + trans[P_SKEWX] = vals[0]; + first = parts.shift(); + } + if (startsWith(first, "skewY(")) { + vals = parseCommaSeparated(first.substring(6)); + trans[P_SKEWY] = vals[0]; + first = parts.shift(); + } + if (startsWith(first, "scale(")) { + vals = parseCommaSeparated(first.substring(6)); + trans[P_SCALEX] = vals[0]; + trans[P_SCALEY] = isSet(vals[1]) ? vals[1] : vals[0]; + first = parts.shift(); + } + if (startsWith(first, "translate(")) { + vals = parseCommaSeparated(first.substring(10)); + trans[P_ANCHORX] = vals[0]; + trans[P_ANCHORY] = isSet(vals[1]) ? vals[1] : 0; + } + } + + function composeAndSetTransformAttr(elem) + { + parseTransform(elem); + var trans = elem._ks.transform; + var transform = ""; + + var mpath = elem._ks['mpath']; + if (mpath) { + // use the interpolated distance to get point on motion path + var dist = trans[P_MOTION_DISTANCE]; + if (dist < 0) { dist = 0; } // old SVG1.1 browsers don't clamp getPointAtLength(dist) + if (dist > 100) { dist = 100; } + dist = dist * mpath[MPATH_PATHLENGTH] / 100; + var pt = mpath[MPATH_ELEMENT].getPointAtLength(dist); + transform = "translate("+pt.x+","+pt.y+") "; + + // auto motion-rotate + if (mpath[MPATH_AUTOROTATE]) { + // get tangent of path by sampling another point just before or after + var prevpt; + if (dist < 0.5) { // tangent of start point 0 and point at 0.5 + prevpt = pt; + pt = mpath[MPATH_ELEMENT].getPointAtLength(0.5); + + } else { // get point before dist + prevpt = mpath[MPATH_ELEMENT].getPointAtLength(dist-0.5); + } + var deg = Math.atan2(pt.y - prevpt.y, pt.x - prevpt.x) * 180 / Math.PI; + transform += "rotate("+deg+") "; + } + } + for (var prop = P_POSITIONX; prop < trans.length; ++prop) { + var val = trans[prop]; + var defaultVal = (prop == P_SCALEX || prop == P_SCALEY) ? 1 : 0; + if (val != defaultVal) { + transform += " "+transformNames[prop]+"("; + if (prop <= P_POSITIONY) { // position x and y + transform += (prop == P_POSITIONX) ? val+",0" : "0,"+val; + } else if (prop >= P_ANCHORX) { // anchor x and y + transform += (prop == P_ANCHORX) ? val+",0" : "0,"+val; + } else if (prop >= P_SCALEX) { // scale x and y + transform += (prop == P_SCALEX) ? val+",1" : "1,"+val; + } else { + transform += val; // skew x/y or rotate + } + transform += ")"; + } + } + setAttr(elem, "transform", transform); + } + + /** + * @constructor + */ + function KsAnimation(options) + { + // optional options + this._options = options; + + // animation data + this._targets = []; + this._data = []; + + // duration and end time of the timeline + this._endTime = 0; + + // states are mapped to hold and start times: + // idle: holdTime and startTime null + // running: holdTime null, startTime set + // paused: holdTime set, startTime null + // finished: holdTime and startTime set, current time <= in or >= out time + + // start time + this._startTimeVal = null; + + // hold time - time used when timeline isn't progressing (rate is zero, paused or finished) + this._holdTime = null; + + this._previousCurrentTime = null; + + // range playback values + this._rangeIn = 0; + this._rangeOut = 0; + + // play loop count + this._loopCount = 0; + + // playback rate, default value is 1, which is normal playback rate. + // zero and negative values are allowed + this._playRate = 1; + + // set to true when Timeline is scheduled to play - used to set startTime during first update + this._hasPendingPlay = false; + + // set to true if base transform is already parsed and stored + this._baseTransformStored = false; + + // set to true if this has been added to the global timeline list + this._addedToList = false; + } + + KsAnimation.prototype = { + + _updateFinishedState: function(didSeek) + { + var pendingCallback = PENDING_NONE; + // check if finished + if (this._startTimeVal !== null) { + var curTime = this._getCurrentTime(); + + // check if end is reached + if (this._playRate > 0 && curTime !== null && curTime >= this._rangeOut) { + if (this._loopCount) { // loop jumping to range in + this._startTimeVal = sysTimelineTime - (this._rangeIn / this._playRate); + this._loopCount--; // this doesn't decrement Infinity + pendingCallback = PENDING_ONLOOP; + + } else { // no looping + pendingCallback = PENDING_ONFINISH; + if (didSeek) { + this._holdTime = curTime; + } else { + if (this._previousCurrentTime) { + // _previousCurrentTime ensures that jumping to a time after _rangeOut + // during "running" will be possible without clamping the time + // to _rangeOut - the time is preserved and state becomes "finished" + this._holdTime = Math.max(this._previousCurrentTime, this._rangeOut); + } else { + this._holdTime = this._rangeOut; + } + } + } + + // check if zero time is reached + } else if (this._playRate < 0 && curTime !== null && curTime <= this._rangeIn) { + if (this._loopCount && this._rangeOut != Infinity) { // loop jumping to range out + this._startTimeVal = sysTimelineTime - (this._rangeOut / this._playRate); + this._loopCount--; // this doesn't decrement Infinity + pendingCallback = PENDING_ONLOOP; + + } else { // no looping + this._loopCount = 0; // clear _loopCount for the rangeOut Infinity case + pendingCallback = PENDING_ONFINISH; + if (didSeek) { + this._holdTime = curTime; + } else { + if (this._previousCurrentTime) { + // _previousCurrentTime ensures that jumping to a time before _rangeIn + // during "running" will be possible without clamping the time + // to _rangeIn - the time is preserved and state becomes "finished" + this._holdTime = Math.min(this._previousCurrentTime, this._rangeIn); + } else { + this._holdTime = this._rangeIn; + } + } + } + + // from "finished" state back to "running" + } else if (curTime !== null && this._playRate != 0) { + if (didSeek && this._holdTime !== null) { + // start time and hold time have values, which means we are in finished state, + // this happens if animation is finished and playback rate is reversed or + // time is set + this._startTimeVal = sysTimelineTime - (this._holdTime / this._playRate); + } + this._holdTime = null; + } + } + this._previousCurrentTime = this._getCurrentTime(); + return pendingCallback; + }, + + _updateValues: function(mainUpdate) + { + if (mainUpdate) { + if (this._hasPendingPlay) { + this._hasPendingPlay = false; + // set start time during the first animation tick so that no frames are skipped + // in the beginning + if (this._startTimeVal === null) { + if (this._playRate != 0 && this._holdTime !== null) { + this._startTimeVal = sysTimelineTime - this._holdTime / this._playRate; + this._holdTime = null; + } else { + this._startTimeVal = sysTimelineTime; + } + } + } + + // running animation, so check finished state (can't check getState() because + // it may return finished for animation which doesn't have onfinish called) + // the callbacks will be called later so that them calling remove() works + if (this._holdTime === null && this._startTimeVal !== null) { + var pendingcb = this._updateFinishedState(false); + if (pendingcb != PENDING_NONE) { + pendingCallbacks.push([ this, pendingcb ]); + } + } + } + var curTime = this._getCurrentTime(); + + // don't update values if animation is idle + if (curTime === null) { + return false; + } + + var targets = this._targets; + var adata = this._data; + for (var e = 0; e < targets.length; ++e) { + var target = targets[e]; + var hasTransform = false; + for (var p = 0; p < adata[e].length; ++p) { + var pdata = adata[e][p]; + var prop = pdata[INX_PROP]; + if (prop === null) { + continue; + } + + var val; + + // interpolate value + var starttime = pdata[INX_STARTTIME]; + var tlen = pdata[INX_TIMES].length; + var dur = pdata[INX_TIMES][tlen-1] - starttime; + + if (dur == 0) { // zero duration + val = pdata[INX_VALUES][tlen-1]; + + } else if (curTime <= starttime) { // before begin time + val = pdata[INX_VALUES][0]; + + // after iteration has ended + } else if (curTime >= starttime + pdata[INX_ITERATIONDUR]) { + if ((pdata[INX_ITERATIONDUR] % dur) == 0) { + // use optimized path, if the end time is a multiple of last keyframe time, + // this means that iteration stopped exactly at last keyframe + val = pdata[INX_VALUES][tlen-1]; + } else { + // calculate iteration end value, needs to interpolate because it is not at + // a keyframe + val = animateProperty(pdata[INX_ITERATIONDUR] % dur, pdata); + } + + } else { // during active time + // calculate simple time + var simpleTime = ((curTime-starttime) % dur); + val = animateProperty(simpleTime, pdata); + } + + if (prop == P_MOTION_DISTANCE) { + // store motion path values + target._ks['mpath'] = pdata[INX_MPATH]; + target._ks.transform[prop] = val; + hasTransform = true; + + } else if (prop <= P_ANCHORY) { + // store transform value + target._ks.transform[prop] = val; + hasTransform = true; + + } else { // set other properties + var svgval = convertToSvgValue(propertyType(pdata[INX_FLAGS]), val); + if (pdata[INX_FLAGS] & FLAG_TARGET_ATTRIBUTE) { + setAttr(target, prop, svgval); + } else { + target.style[prop] = svgval; + } + } + } + // if transform was animated, then set it + if (hasTransform) { + composeAndSetTransformAttr(target); + } + } + // return flag indicating if this animation wants to keep ticking + return this._getState() == STATE_RUNNING; + }, + + _performAutoRemove: function() + { + if (this._options['autoremove'] !== false && this._getState() == STATE_FINISHED) { + remove(this); + } + }, + + _saveBaseTransform: function() + { + if (this._baseTransformStored) { + return; + } + this._baseTransformStored = true; + var atargets = this._targets; + var adata = this._data; + for (var e = 0; e < atargets.length; ++e) { + var target = atargets[e]; + var compVals = false; + for (var p = 0; p < adata[e].length; ++p) { + var pdata = adata[e][p]; + var prop = pdata[INX_PROP]; + // including motion path (distance) + if (prop <= P_ANCHORY) { + parseTransform(target); + } + } + } + }, + + _parseTime(value) + { + if (typeof value == 'number') { + return value; + } + if (!isSet(this._options['markers']) || !isSet(this._options['markers'][value])) { + throw ERR("Invalid marker: "+value); + } + return +(this._options['markers'][value]); + }, + + // starts playing the timeline + 'play': function(millisecs) + { + if (isSet(millisecs) && millisecs !== null) { + millisecs = this._parseTime(millisecs); + checkIsFinite(millisecs); + // don't allow before or after range, because that would go directly to finished state + if (this._playRate < 0 && millisecs < this._rangeIn) { millisecs = this._rangeIn; } + if (this._playRate > 0 && millisecs > this._rangeOut) { millisecs = this._rangeOut; } + this._setCurrentTime(millisecs, true); + } + if (!this._addedToList) { + throw NOT_IN_LIST_EXCEPTION; + } + var t = this._getCurrentTime(); + if (this._playRate > 0 && (t === null || t >= this._rangeOut)) { + this._holdTime = this._rangeIn; + } else if (this._playRate < 0 && (t === null || t <= this._rangeIn)) { + if (this._rangeOut == Infinity) { + throw ERR("Cannot seek to Infinity"); + } + this._holdTime = this._rangeOut; + } else if (this._playRate == 0 && t === null) { + this._holdTime = this._rangeIn; + } + // break out if the timeline is already playing + if (this._holdTime === null) { + return this; + } + // schedule start, so that start time is accurately calculated in animation mainloop + this._startTimeVal = null; + this._hasPendingPlay = true; + this._saveBaseTransform(); + startTicking(); + return this; + }, + + // pauses the timeline + 'pause': function(millisecs) + { + if (!this._addedToList) { + throw NOT_IN_LIST_EXCEPTION; + } + if (isSet(millisecs)) { + millisecs = this._parseTime(millisecs); + checkIsFinite(millisecs); + } + if (this._getState() != STATE_PAUSED) { + updateSysTimelineTime(); + var curTime = this._getCurrentTime(); + if (curTime === null) { + if (this._playRate >= 0) { + this._holdTime = this._rangeIn; + } else { + if (this._rangeOut == Infinity) { + throw ERR("Cannot seek to Infinity"); + } + this._holdTime = this._rangeOut; + } + } + if (this._startTimeVal !== null && this._holdTime === null) { + this._holdTime = curTime; + } + this._startTimeVal = null; + this._hasPendingPlay = false; + this._updateFinishedState(false); + this._saveBaseTransform(); + startTicking(); + } + if (isSet(millisecs)) { + this._setCurrentTime(millisecs, true); + } + return this; + }, + + 'range': function(inTime, outTime) + { + if (arguments.length == 0) { + return { "in": this._rangeIn, "out": this._rangeOut }; + } + var pin = this._parseTime(inTime); + var pout = this._endTime; + if (isSet(outTime)) { + pout = this._parseTime(outTime); + } + checkIsFinite(pin); + if (pin < 0 || pout < 0 || pin >= pout || isNaN(pout)) { + throw ERR("Invalid range"); + } + var oldState = this._getState(); + this._rangeIn = pin; + this._rangeOut = pout; + // update state to play if it was finished and range changed it to running + if (oldState == STATE_FINISHED && this._getState() == STATE_RUNNING) { + this['play'](); + } + return this; + }, + + 'loop': function(loopCount) + { + if (!isSet(loopCount)) { + return { "count": this._loopCount }; + } + this._loopCount = loopCount === true ? Infinity : Math.floor(loopCount); + if (this._loopCount < 0 || isNaN(this._loopCount)) { this._loopCount = 0; } + return this; + }, + + _getCurrentTime: function() + { + if (this._holdTime !== null) { + return this._holdTime; + } + if (this._startTimeVal === null) { + return null; + } + return (sysTimelineTime - this._startTimeVal) * this._playRate; + }, + + // sets the time to the given millisecs + _setCurrentTime: function(seekTime, updateTime) + { + // update timeline time before checking seekTime is null + if (updateTime) { + updateSysTimelineTime(); + } + if (seekTime === null) { + return; + } + + this._saveBaseTransform(); + if (this._holdTime !== null || this._startTimeVal === null || this._playRate == 0) { + this._holdTime = seekTime; + updateAllAnimations(false); + } else { + this._startTimeVal = sysTimelineTime - (seekTime / this._playRate); + } + if (!this._addedToList) { + this._startTimeVal = null; + } + this._previousCurrentTime = null; + this._updateFinishedState(true); + startTicking(); + }, + + // gets the time + _getTime: function() + { + return this._getCurrentTime(); + }, + + 'time': function(millisecs) { + if (isSet(millisecs)) { + if (!this._addedToList) { + throw NOT_IN_LIST_EXCEPTION; + } + millisecs = this._parseTime(millisecs); + checkIsFinite(millisecs); + this._setCurrentTime(millisecs, true); + return this; + } + return this._getTime(); + }, + + + _getState: function() + { + var curTime = this._getCurrentTime(); + if (this._hasPendingPlay) { // additional condition, there is no "pending" state + return STATE_RUNNING; + } + if (curTime === null) { + return STATE_IDLE; + } + if (this._startTimeVal === null) { + return STATE_PAUSED; + } + if ((this._playRate > 0 && curTime >= this._rangeOut) || + (this._playRate < 0 && curTime <= this._rangeIn)) { + return STATE_FINISHED; + } + return STATE_RUNNING; + }, + + // returns play state + 'state': function() { + return this._getState(); + }, + + // returns the duration of the animation or Infinity if it runs forever + 'duration': function() + { + return this._endTime; + }, + + // gets the playback rate, 1=normal, zero stops the progress, negative values reverse + // the playback + _getRate: function() + { + return this._playRate; + }, + + // sets the playback rate, 1=normal, zero stops the progress, negative values reverse + // the playback + _setRate: function(value) + { + checkIsFinite(value); + updateSysTimelineTime(); + var oldTime = this._getCurrentTime(); + this._playRate = value; + if (oldTime !== null) { + this._setCurrentTime(oldTime, false); + } + }, + + 'rate': function(r) { + if (isSet(r)) { + this._setRate(r); + return this; + } + return this._getRate(); + }, + + 'marker': function(name) { + return isSet(this._options['markers']) ? this._options['markers'][name] : undefined; + }, + + '_cancel': function() { + if (!this._addedToList || this._getState() == STATE_IDLE) { + return this; + } + this._holdTime = null; + this._startTimeVal = null; + this._hasPendingPlay = false; + return this; + } + } + + function getShortOrLong(kf, name1, name2) + { + var value = kf[name1]; + if (value === undefined) { + value = kf[name2]; + } + return value; + } + + function fillEasing(easing, len) + { + if (!easing) { + easing = []; + } + while (easing.length < len) { + easing.push([ TIMING_FN_CUBIC, 0, 0, 0.58, 1 ]); // default: ease-out + } + return easing; + } + + function parseInt10(value) + { + return parseInt(value, 10); + } + + function parseTimingFn(val) + { + if (Array.isArray(val)) { // array means a shorthand timing function + return val; + } + if (startsWith(val, "cubic-bezier(")) { + var vals = val.substring(13, val.length-1).split(','); + return [ TIMING_FN_CUBIC, + parseFloat(vals[0]), parseFloat(vals[1]), parseFloat(vals[2]), parseFloat(vals[3]) ]; + + } else if (startsWith(val, "steps(")) { + var svals = val.substring(6, val.length-1).split(','); + return [ svals[1] && svals[1].trim() == "start" ? TIMING_FN_STEP_START : TIMING_FN_STEP_END, + parseFloat(svals[0]) ]; + } + // other are linear + return [ TIMING_FN_LINEAR ]; + } + + function parseColor(cstr) + { + cstr = cstr.trim(); + if (startsWith(cstr, "#")) { + return (parseInt(cstr.substring(1), 16) << 8) + 255; + } + if (startsWith(cstr, "rgba(")) { + cstr = cstr.substring(5, cstr.length-1); + var p = cstr.split(','); + return (parseInt10(p[0]) << 24) + (parseInt10(p[1]) << 16) + (parseInt10(p[2]) << 8) + + (parseFloat(p[3])*255) << 0; // shift alpha by 0 to convert it to int + } + return cstr; + } + + function parseFilter(filter) + { + if (filter == "none") { + return [ FILTER_NONE ]; + } + var res = []; + var fninx = filter.indexOf('('); + while (fninx > 0) { + var inx = filterNames.indexOf(filter.substring(0, fninx)); + if (inx >= 0) { + res.push(inx); + var endinx = filter.indexOf(') '); + if (endinx < 0) endinx = filter.length-1; + var params = filter.substring(fninx+1, endinx).split(' '); + if (inx == FILTER_DROPSHADOW) { // 3 numbers and a color + res.push(parseFloat(params[0])); + res.push(parseFloat(params[1])); + res.push(parseFloat(params[2])); + res.push(parseColor(params[3])); + + } else if (inx == FILTER_URL) { // string parameter + res.push(params[0]); + + } else { // numeric parameter + res.push(parseFloat(params[0])); + } + filter = filter.substring(endinx+1).trim(); + // get next filter + fninx = filter.indexOf('('); + } else { + break; + } + } + return res; + } + + /** + * @return {Element} DOM element + */ + function solveTarget(t) + { + var e = (t instanceof Element) ? t : document.getElementById(t.substring(1)); + if (!e) { throw ERR("Invalid target: "+t); } + return e; + } + + function parseValues(prop, values) + { + var type = propertyType(propertyFlags(prop)); + for (var i = 0; i < values.length; ++i) { + if (type == FLAG_TYPE_PATH) { + // split values for fast interpolation + var val = values[i].substring(6, values[i].length-2); // remove "path('')" + var commands = val.match(/[A-DF-Za-df-z][-+0-9eE., ]*/ig); + var s = []; + for (var k = 0; k < commands.length; ++k) { + s.push(commands[k][0]); + var coords = commands[k].trim().length > 1 ? + commands[k].substring(1).split(',') : []; + for (var ci = 0; ci < coords.length; ++ci) { + coords[ci] = parseFloat(coords[ci]); + } + s.push(coords); + } + values[i] = s; + + } else if (type == FLAG_TYPE_COLOR) { + if (startsWith(values[i], "#")) { + var hasAlpha = (values[i].length == 9); + values[i] = parseInt(values[i].substring(1), 16); + if (!hasAlpha) { // add alpha to colors without it + values[i] = (values[i]*256) | 255; + } + } else if (!startsWith(values[i], "url(") && values[i] != "none") { + console.warn("unsupported color: "+values[i]); + values[i] = 0; + } + } else if (type == FLAG_TYPE_FILTER) { + values[i] = parseFilter(values[i]); + + } else if (type == FLAG_TYPE_LENGTH_LIST) { + if (values[i] != "none") { + if (!/^[0-9 .]*$/.test(values[i])) { // units are not allowed + console.warn("unsupported value: "+values[i]); + values[i] = [ 0 ]; + } else { + values[i] = parseFloatList(values[i], ' '); + } + } else { + values[i] = [ 0 ]; + } + + } else if (type == FLAG_TYPE_LENGTH) { + checkIsFinite(values[i]); + values[i] = parseFloat(values[i]); + + } else if (prop === P_MOTION_DISTANCE) { + // ignores possible trailing percentage + values[i] = parseFloat(values[i]); + } + } + } + + function validateTimes(times) + { + if (!isFinite(times[0]) || times[0] < 0) { + throw ERR("Invalid time: "+times[0]); + } + for (var i = 1; i < times.length; ++i) { + if (!isFinite(times[i]) || times[i] < 0 || times[i] < times[i-1]) { + throw ERR("Invalid time: "+times[i]); + } + } + } + + function initTimeline(tl, tlData) + { + var totalEnd = 0; + for (var ai = 0; ai < tlData.length-1; ai += 2) { + var te = solveTarget(tlData[ai]); + var anim = tlData[ai+1]; + if (!te._ks) { + te._ks = { }; + } + var newadata = []; + for (var i = 0; i < anim.length; ++i) { + var kf = anim[i]; + var prop = getShortOrLong(kf, "p", "property"); + if (!isValidProperty(prop)) { + throw ERR("Invalid property: "+prop); + } + var propIndex = transformProps.indexOf(prop); // convert transform strings to numbers + if (prop !== "" && propIndex >= 0) { + prop = propIndex; + } + var flags = propertyFlags(prop); + + var times = getShortOrLong(kf, "t", "times"); + if (!times || times.length < 2) { + throw ERR("Not enough times"); + } + times = copyArray(times); + validateTimes(times); + var starttime = times[0]; + var endtime = times[times.length-1]; + var rdur = endtime - starttime; + var iters = kf["iterations"] || 0; + if (iters < 1) { + iters = 1; + } + rdur = rdur * iters; + if (totalEnd < rdur + starttime) { + totalEnd = rdur + starttime; + } + + var values = getShortOrLong(kf, "v", "values"); + if (!values || values.length != times.length) { + throw ERR("Values do not match times"); + } + values = copyArray(values); + parseValues(prop, values); + + var easing = getShortOrLong(kf, "e", "easing"); + easing = fillEasing(easing, times.length); + for (var ei = 0; ei < easing.length; ++ei) { + easing[ei] = parseTimingFn(easing[ei]); + } + var nprop = [ prop, flags, starttime, rdur, times, values, easing, iters ]; + + var motionPath = getShortOrLong(kf, "mp", "motionPath"); + if (isSet(motionPath) && prop === P_MOTION_DISTANCE) { + nprop[INX_MPATH] = []; + // store auto rotate flag + nprop[INX_MPATH][MPATH_AUTOROTATE] = kf["motionRotate"]; + // create and store a path element so it can be sampled in animation mainloop + var mpathElement = document.createElementNS("http://www.w3.org/2000/svg", 'path'); + if (!motionPath) { + motionPath = "M0,0"; + } + mpathElement.setAttribute("d", motionPath); + nprop[INX_MPATH][MPATH_ELEMENT] = mpathElement; + // store total length for faster access + nprop[INX_MPATH][MPATH_PATHLENGTH] = mpathElement.getTotalLength(); + } + newadata.push(nprop); + } + if (newadata.length > 0) { + tl._targets.push(te); + tl._data.push(newadata); + } + } + tl._endTime = totalEnd; + tl._rangeIn = 0; + tl._rangeOut = tl._endTime; + } + + function animate() + { + var options = {}; + if (arguments.length % 2 == 1) { // odd count of arguments means that options are given + options = copyMap(arguments[arguments.length-1]); + } + + var tl = new KsAnimation(options); + initTimeline(tl, arguments); + add(tl); + return tl; + } + + function add(timeline) + { + if (timeline._addedToList === false) { + globalTimelineList.push(timeline); + timeline._addedToList = true; + if (timeline._options['autoplay'] !== false) { + timeline.play(); + } + } + return this; + } + + function remove(timeline) { + if (timeline._addedToList === true) { + timeline["_cancel"](); + removeItemFromArray(globalTimelineList, timeline); + // removed timeline won't have any pending callbacks called + removeItemFromArray(pendingCallbacks, timeline); + timeline._addedToList = false; + } + return this; + } + + function removeAll() + { + for (var i = globalTimelineList.length-1; i >= 0; --i) { + remove(globalTimelineList[i]); + } + return this; + } + + function timelines() + { + return copyArray(globalTimelineList); + } + + function globalPlay() + { + if (holdTimelineTime) { + sysTimelineTimeDrift = holdTimelineTime - new Date().getTime(); + holdTimelineTime = undefined; + startTicking(); + } + return this; + } + + function globalPause() + { + if (!holdTimelineTime) { + holdTimelineTime = sysTimelineTime; + updateAllAnimations(false); + } + return this; + } + + function globalState() + { + return holdTimelineTime ? STATE_PAUSED : STATE_RUNNING; + } + + return { + 'version': '1.1.0', + 'animate': animate, + 'add': add, + 'remove': remove, + 'removeAll': removeAll, + 'timelines': timelines, + 'globalPlay': globalPlay, + 'globalPause': globalPause, + 'globalState': globalState + }; +})(); diff --git a/typings.d.ts b/typings.d.ts index f43275daa0..4990a9806e 100644 --- a/typings.d.ts +++ b/typings.d.ts @@ -1,14 +1,14 @@ -declare module "*.svg" { - const content: any; - export default content; +declare module '*.svg' { + const content: any + export default content } -declare module "*.png" { - const content: any; - export default content; +declare module '*.png' { + const content: any + export default content } -declare module "*.csv" { - const content: any; - export default content; +declare module '*.csv' { + const content: any + export default content }